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
OK pikachu volt-tackle encore headbutt grass-knot
#OK suicune extremespeed dig icy-wind bite
NO nidoran-m horn-drill head-smash -l 5 -v platinum --pomeg-glitch
""".strip().splitlines()
@single_params(*argstrings)

View file

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