def setUp(self): self.blastoise = Pokemon.from_state_pokemon_dict( StatePokemon("blastoise", 100).to_dict()) self.venusaur = Pokemon.from_state_pokemon_dict( StatePokemon("venusaur", 100).to_dict()) self.state = State( Side(self.blastoise, dict(), (0, 0), defaultdict(lambda: 0)), Side(self.venusaur, dict(), (0, 0), defaultdict(lambda: 0)), None, None, None)
def test_pokemon_init_gives_correct_number_of_physical_moves(self): # 2 moves that are physical moves = [ {constants.ID: 'flamethrower'}, {constants.ID: 'flareblitz'}, {constants.ID: 'flamewheel'}, {constants.ID: 'reflect'}, ] state_pkmn_dict = StatePokemon('charizardmegax', 100).to_dict() state_pkmn_dict[constants.MOVES] = moves pkmn = Pokemon.from_state_pokemon_dict(state_pkmn_dict) self.assertEqual(2, pkmn.burn_multiplier)
def setUp(self): self.state = State( Side( Pokemon.from_state_pokemon_dict( StatePokemon("pikachu", 100).to_dict()), { "rattata": Pokemon.from_state_pokemon_dict( StatePokemon("rattata", 100).to_dict()), "charmander": Pokemon.from_state_pokemon_dict( StatePokemon("charmander", 100).to_dict()), "squirtle": Pokemon.from_state_pokemon_dict( StatePokemon("squirtle", 100).to_dict()), "bulbasaur": Pokemon.from_state_pokemon_dict( StatePokemon("bulbasaur", 100).to_dict()), "pidgey": Pokemon.from_state_pokemon_dict( StatePokemon("pidgey", 100).to_dict()) }, defaultdict(lambda: 0)), Side( Pokemon.from_state_pokemon_dict( StatePokemon("pikachu", 100).to_dict()), { "rattata": Pokemon.from_state_pokemon_dict( StatePokemon("rattata", 100).to_dict()), "charmander": Pokemon.from_state_pokemon_dict( StatePokemon("charmander", 100).to_dict()), "squirtle": Pokemon.from_state_pokemon_dict( StatePokemon("squirtle", 100).to_dict()), "bulbasaur": Pokemon.from_state_pokemon_dict( StatePokemon("bulbasaur", 100).to_dict()), "pidgey": Pokemon.from_state_pokemon_dict( StatePokemon("pidgey", 100).to_dict()) }, defaultdict(lambda: 0)), None, None, False) self.mutator = StateMutator(self.state)
def setUp(self): self.charizard = Pokemon.from_state_pokemon_dict( StatePokemon("charizard", 100).to_dict()) self.venusaur = Pokemon.from_state_pokemon_dict( StatePokemon("venusaur", 100).to_dict())
def setUp(self): self.state = State( Side( Pokemon.from_state_pokemon_dict(StatePokemon("raichu", 73).to_dict()), { "xatu": Pokemon.from_state_pokemon_dict(StatePokemon("xatu", 81).to_dict()), "starmie": Pokemon.from_state_pokemon_dict(StatePokemon("starmie", 81).to_dict()), "gyarados": Pokemon.from_state_pokemon_dict(StatePokemon("gyarados", 81).to_dict()), "dragonite": Pokemon.from_state_pokemon_dict(StatePokemon("dragonite", 81).to_dict()), "hitmonlee": Pokemon.from_state_pokemon_dict(StatePokemon("hitmonlee", 81).to_dict()), }, (0, 0), defaultdict(lambda: 0) ), Side( Pokemon.from_state_pokemon_dict(StatePokemon("aromatisse", 81).to_dict()), { "yveltal": Pokemon.from_state_pokemon_dict(StatePokemon("yveltal", 73).to_dict()), "slurpuff": Pokemon.from_state_pokemon_dict(StatePokemon("slurpuff", 73).to_dict()), "victini": Pokemon.from_state_pokemon_dict(StatePokemon("victini", 73).to_dict()), "toxapex": Pokemon.from_state_pokemon_dict(StatePokemon("toxapex", 73).to_dict()), "bronzong": Pokemon.from_state_pokemon_dict(StatePokemon("bronzong", 73).to_dict()), }, (0, 0), defaultdict(lambda: 0) ), None, None, False ) self.state.self.active.moves = [ {constants.ID: 'tackle', constants.DISABLED: False}, {constants.ID: 'charm', constants.DISABLED: False}, {constants.ID: 'growl', constants.DISABLED: False}, {constants.ID: 'stringshot', constants.DISABLED: False}, ] self.state.opponent.active.moves = [ {constants.ID: 'tackle', constants.DISABLED: False}, {constants.ID: 'charm', constants.DISABLED: False}, {constants.ID: 'growl', constants.DISABLED: False}, {constants.ID: 'stringshot', constants.DISABLED: False}, ]
def setUp(self): self.pokemon = Pokemon.from_state_pokemon_dict( StatePokemon('pikachu', 100).to_dict() )