mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 04:01:32 -06:00
Pokémon R/B: Fix move intervention (#2687)
This commit is contained in:
@@ -353,7 +353,9 @@ class PokemonRedBlueWorld(World):
|
||||
location.show_in_spoiler = False
|
||||
|
||||
def intervene(move, test_state):
|
||||
if self.multiworld.randomize_wild_pokemon[self.player]:
|
||||
move_bit = pow(2, poke_data.hm_moves.index(move) + 2)
|
||||
viable_mons = [mon for mon in self.local_poke_data if self.local_poke_data[mon]["tms"][6] & move_bit]
|
||||
if self.multiworld.randomize_wild_pokemon[self.player] and viable_mons:
|
||||
accessible_slots = [loc for loc in self.multiworld.get_reachable_locations(test_state, self.player) if
|
||||
loc.type == "Wild Encounter"]
|
||||
|
||||
@@ -363,8 +365,6 @@ class PokemonRedBlueWorld(World):
|
||||
zones.add(loc.name.split(" - ")[0])
|
||||
return len(zones)
|
||||
|
||||
move_bit = pow(2, poke_data.hm_moves.index(move) + 2)
|
||||
viable_mons = [mon for mon in self.local_poke_data if self.local_poke_data[mon]["tms"][6] & move_bit]
|
||||
placed_mons = [slot.item.name for slot in accessible_slots]
|
||||
|
||||
if self.multiworld.area_1_to_1_mapping[self.player]:
|
||||
|
Reference in New Issue
Block a user