def makeGame(self): from game import autoenv from gamepack.thb.thb3v3 import THBattle from gamepack.thb.cards import Deck, CardList from gamepack.thb.characters.eirin import FirstAid, Medic from utils import BatchList autoenv.init('Server') g = THBattle() g.IS_DEBUG = True g.random = random hook_game(g) deck = Deck() g.deck = deck pl = [create_mock_player([]) for i in xrange(6)] for p in pl: p.skills = [FirstAid, Medic] p.cards = CardList(p, 'cards') # Cards in hand p.showncards = CardList( p, 'showncard' ) # Cards which are shown to the others, treated as 'Cards in hand' p.equips = CardList(p, 'equips') # Equipments p.fatetell = CardList(p, 'fatetell') # Cards in the Fatetell Zone p.faiths = CardList(p, 'faiths') # Cards in the Fatetell Zone p.special = CardList(p, 'special') # used on special purpose p.showncardlists = [p.showncards, p.fatetell] p.tags = defaultdict(int) p.dead = False p = pl[0] p.client.gdevent.set() g.players = BatchList(pl) return g, p
def makeGame(self): from game import autoenv from gamepack.thb.thb3v3 import THBattle from gamepack.thb.cards import Deck, CardList from gamepack.thb.characters.eirin import FirstAid, Medic from utils import BatchList autoenv.init('Server') g = THBattle() g.IS_DEBUG = True g.random = random hook_game(g) deck = Deck() g.deck = deck pl = [create_mock_player([]) for i in xrange(6)] for p in pl: p.skills = [FirstAid, Medic] p.cards = CardList(p, 'cards') # Cards in hand p.showncards = CardList(p, 'showncard') # Cards which are shown to the others, treated as 'Cards in hand' p.equips = CardList(p, 'equips') # Equipments p.fatetell = CardList(p, 'fatetell') # Cards in the Fatetell Zone p.faiths = CardList(p, 'faiths') # Cards in the Fatetell Zone p.special = CardList(p, 'special') # used on special purpose p.showncardlists = [p.showncards, p.fatetell] p.tags = defaultdict(int) p.dead = False p = pl[0] p.client.gdevent.set() g.players = BatchList(pl) return g, p