fixup! Disable breeding tutor (and level-up) moves

This commit is contained in:
Petr Viktorin 2011-08-30 14:05:45 +03:00
parent 715947d73b
commit 17df21b420
2 changed files with 5 additions and 6 deletions

View file

@ -61,6 +61,7 @@ OK pikachu reversal bide nasty-plot discharge
NO pikachu surf charge NO pikachu surf charge
OK pikachu volt-tackle encore headbutt grass-knot OK pikachu volt-tackle encore headbutt grass-knot
#OK suicune extremespeed dig icy-wind bite #OK suicune extremespeed dig icy-wind bite
NO nidoran-m horn-drill head-smash -l 5 -v platinum --pomeg-glitch
""".strip().splitlines() """.strip().splitlines()
@single_params(*argstrings) @single_params(*argstrings)

View file

@ -1257,21 +1257,19 @@ class PokemonNode(Node, Facade, namedtuple('PokemonNode',
version_group_=self.version_group_, moves_=self.moves_) version_group_=self.version_group_, moves_=self.moves_)
def expand_sketch(self): def expand_sketch(self):
moves = self.moves_
sketch = self.search.sketch sketch = self.search.sketch
if sketch in moves: if sketch in self.moves_:
for sketched in sorted(self.search.goal_moves): for sketched in sorted(self.search.goal_moves):
if sketched in self.search.unsketchable: if sketched in self.search.unsketchable:
continue continue
if sketched not in moves: if sketched not in self.moves_:
moves = set(moves) moves = set(self.moves_)
moves.remove(sketch) moves.remove(sketch)
moves.add(sketched) moves.add(sketched)
action = SketchAction(self.search, sketched) action = SketchAction(self.search, sketched)
cost = self.search.costs['sketch'] cost = self.search.costs['sketch']
yield cost, action, self._replace( yield cost, action, self._replace(
new_level=False, moves_=frozenset(moves)) new_level=False, moves_=frozenset(moves))
return
def estimate(self): def estimate(self):
# Given good estimates, A* finds solutions much faster. # Given good estimates, A* finds solutions much faster.
@ -1316,7 +1314,7 @@ class BaseBreedNode(Node):
learns = True learns = True
break break
if not learns: if not learns:
continue break
if not learns: if not learns:
continue continue
extra_moves = set() extra_moves = set()