Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- from random import randint
- competitiveJacks = [(" * Marauder",10), (" * Juggernaut", 12), (" * Devastator", 14), (" * Destroyer", 14), (" * Kodiak", 13)]
- badJacks = [(" * Ruin ", 17, 1), (" * Behemoth", 25, 1), (" * Spriggan", 19, 1)]
- jackFilling = [("Battle Mechs (4)",3), ("Battle Mechs (6)",5), ("Gobber Tinker",2), ("Orin Midwinter", 5), ("Ogrun bokur", 5)]
- jackCasters = [("Karchev", -30), ("Harkevich",-28), ("Malakov 2",-28)]
- badCasters = [("Butcher 1", -28), ("Butcher 2", -28), ("Butcher 3", -22), ("Irusk 1", -27), ("Irusk 2", -27), ("Kozlov 1", -28), ("Old Witch", -18), ("Sorcha 1", -29), ("Sorcha 2", -27), ("Strakov", -28), ("Vladimir 1", -28), ("Vladimir 2", -27), ("Vladimir 3", -27), ("Zerkova 1", -28), ("Zerkova 2", -27)]
- badFilling = [("Gun carriage", 18, 2), ("Kayazi Elim", 5, 2), ("MoW Drakhun", 9, 2), ("Orin Midwinter", 5, 1), ("Ogrun bokur", 5, 2)]
- def generateJackSpam():
- list = []
- caster = jackCasters[randint(0, len(jackCasters)-1)]
- list.append(caster)
- points = caster[1]
- while points < 65:
- warjack = competitiveJacks[randint(0, len(competitiveJacks)-1)]
- cost = warjack[1]
- if cost + points < 75:
- list.append(warjack)
- points += cost
- while points < 71:
- filling = jackFilling[randint(0, len(jackFilling)-1)]
- cost = filling[1]
- if cost + points < 75:
- list.append(filling)
- points += cost
- printList(list)
- def generateScareList():
- allJacks = competitiveJacks + badJacks
- list = []
- caster = badCasters[randint(0, len(badCasters)-1)]
- list.append(caster)
- points = caster[1]
- restriction = {}
- while points < 0:
- warjack = allJacks[randint(0, len(allJacks)-1)]
- cost = warjack[1]
- if cost + points <= 75 and passRestriction(restriction, warjack):
- updateRestriction(restriction, warjack)
- list.append(warjack)
- points += cost
- list.append((" * Reinholt ",4))
- list.append(("Rifflecorps (6)",8))
- list.append((" * Rocketeer",2))
- list.append((" * Rocketeer",2))
- list.append((" * Rocketeer",2))
- list.append(("Rifflecorps (6)",8))
- list.append((" * Rocketeer",2))
- list.append((" * Rocketeer",2))
- list.append((" * Rocketeer",2))
- list.append(("Rifflecorps (6)",8))
- list.append((" * Rocketeer",2))
- list.append((" * Rocketeer",2))
- list.append((" * Rocketeer",2))
- points += 46
- while points < 71:
- filling = badFilling[randint(0, len(badFilling)-1)]
- cost = filling[1]
- if cost + points <= 75 and passRestriction(restriction, filling):
- updateRestriction(restriction, filling)
- list.append(filling)
- points += cost
- printList(list)
- def passRestriction(restriction, reference):
- if len(reference) == 2 :
- return True
- elif reference not in restriction :
- return True
- else:
- return restriction[reference] < reference [2]
- def updateRestriction(restriction, reference):
- if reference in restriction:
- restriction[reference] += 1
- else :
- restriction[reference] = 1
- return restriction
- def printList(list):
- print
- total = 0
- for each in list :
- total +=each[1]
- print each[0], "\t", each[1], "\t", total
- if __name__ == "__main__":
- print "\nYour pairing is :"
- generateJackSpam()
- generateScareList()
- print "\nRemember to ask your friends for missing refs, don't buy those !"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement