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']
|
cost += search.costs['evolution-delayed']
|
||||||
else:
|
else:
|
||||||
cost += search.costs['evolution-delayed']
|
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():
|
if trigger in 'level-up use-item'.split():
|
||||||
pass
|
pass
|
||||||
elif trigger == 'trade':
|
elif trigger == 'trade':
|
||||||
|
@ -1354,7 +1358,7 @@ class BaseBreedNode(Node):
|
||||||
action = BreedAction(self.search, baby, all_bred_moves)
|
action = BreedAction(self.search, baby, all_bred_moves)
|
||||||
node = PokemonNode(search=self.search, pokemon_=baby,
|
node = PokemonNode(search=self.search, pokemon_=baby,
|
||||||
level=hatch_level, version_group_=vg,
|
level=hatch_level, version_group_=vg,
|
||||||
moves_=all_bred_moves, new_level=True)
|
moves_=all_bred_moves, new_level=False)
|
||||||
yield 0, action, node
|
yield 0, action, node
|
||||||
|
|
||||||
def is_goal(self):
|
def is_goal(self):
|
||||||
|
|
Loading…
Reference in a new issue