From f65d8bb062af08c645ef816a99697028f0a46e39 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Wed, 4 May 2011 20:47:59 +0300 Subject: [PATCH] Fix level-up evolution without a level restriction --- pokedex/util/movesets.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pokedex/util/movesets.py b/pokedex/util/movesets.py index 9558383..687f090 100755 --- a/pokedex/util/movesets.py +++ b/pokedex/util/movesets.py @@ -1196,6 +1196,10 @@ class PokemonNode(Node, Facade, namedtuple('PokemonNode', cost += search.costs['evolution-delayed'] else: cost += search.costs['evolution-delayed'] + elif trigger == 'level-up': + # Have to gain a level + kwargs['level'] = self.level + 1 + kwargs['new_level'] = True if trigger in 'level-up use-item'.split(): pass elif trigger == 'trade': @@ -1354,7 +1358,7 @@ class BaseBreedNode(Node): action = BreedAction(self.search, baby, all_bred_moves) node = PokemonNode(search=self.search, pokemon_=baby, level=hatch_level, version_group_=vg, - moves_=all_bred_moves, new_level=True) + moves_=all_bred_moves, new_level=False) yield 0, action, node def is_goal(self):