mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Shedinja fixes
This commit is contained in:
parent
5fb0eed9dc
commit
d99d9219d2
1 changed files with 3 additions and 0 deletions
|
@ -1124,6 +1124,7 @@ class PokemonNode(Node, Facade, namedtuple('PokemonNode',
|
||||||
if level:
|
if level:
|
||||||
if level > self.level:
|
if level > self.level:
|
||||||
kwargs['level'] = level
|
kwargs['level'] = level
|
||||||
|
cost += search.costs['per-level'] * (level - self.level)
|
||||||
kwargs['new_level'] = True
|
kwargs['new_level'] = True
|
||||||
elif level == self.level:
|
elif level == self.level:
|
||||||
if self.new_level:
|
if self.new_level:
|
||||||
|
@ -1156,6 +1157,8 @@ class PokemonNode(Node, Facade, namedtuple('PokemonNode',
|
||||||
shed_kwargs = dict(kwargs)
|
shed_kwargs = dict(kwargs)
|
||||||
shed_kwargs['level'] = new_level
|
shed_kwargs['level'] = new_level
|
||||||
for shed_moves in powerset(moves):
|
for shed_moves in powerset(moves):
|
||||||
|
if not shed_moves:
|
||||||
|
continue
|
||||||
shed_kwargs['moves_'] = new_moves = self.moves_.union(shed_moves)
|
shed_kwargs['moves_'] = new_moves = self.moves_.union(shed_moves)
|
||||||
yield cost, ShedEvolutionAction(search, child, trigger, new_moves), self._replace(
|
yield cost, ShedEvolutionAction(search, child, trigger, new_moves), self._replace(
|
||||||
**shed_kwargs)
|
**shed_kwargs)
|
||||||
|
|
Loading…
Reference in a new issue