mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Fix level-up evolution without a level restriction
This commit is contained in:
parent
731a172854
commit
f65d8bb062
1 changed files with 5 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue