From 17df21b4202a12dcdc3c98a1a997817a0fbf7430 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Tue, 30 Aug 2011 14:05:45 +0300 Subject: [PATCH] fixup! Disable breeding tutor (and level-up) moves --- pokedex/tests/test_movesets.py | 1 + pokedex/util/movesets.py | 10 ++++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/pokedex/tests/test_movesets.py b/pokedex/tests/test_movesets.py index 86f588d..3e46b15 100644 --- a/pokedex/tests/test_movesets.py +++ b/pokedex/tests/test_movesets.py @@ -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) diff --git a/pokedex/util/movesets.py b/pokedex/util/movesets.py index db7d854..232f1ba 100755 --- a/pokedex/util/movesets.py +++ b/pokedex/util/movesets.py @@ -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()