Disable relearning & breeding in generation I

This commit is contained in:
Petr Viktorin 2011-05-04 14:39:14 +03:00
parent a765f95eda
commit cb97423f41

View file

@ -1091,7 +1091,8 @@ class PokemonNode(Node, Facade, namedtuple('PokemonNode',
cost += level - self.level * search.costs['per-level'] cost += level - self.level * search.costs['per-level']
yield self._learn(move, method, cost, yield self._learn(move, method, cost,
level=level, new_level=True) level=level, new_level=True)
else: elif search.generation_id_by_version_group[
self.version_group_] > 1:
yield self._learn(move, 'relearn', yield self._learn(move, 'relearn',
search.costs['relearn'], search.costs['relearn'],
action=RelearnAction(self.search, move), action=RelearnAction(self.search, move),
@ -1233,6 +1234,8 @@ class PokemonNode(Node, Facade, namedtuple('PokemonNode',
search = self.search search = self.search
if self.pokemon_ in search.unbreedable: if self.pokemon_ in search.unbreedable:
return return
if search.generation_id_by_version_group[self.version_group_] == 1:
return
evo_chain = search.evolution_chains[self.pokemon_] evo_chain = search.evolution_chains[self.pokemon_]
egg_groups = search.egg_groups[evo_chain] egg_groups = search.egg_groups[evo_chain]
breeds_required = search.breeds_required breeds_required = search.breeds_required