diff --git a/Data/Scripts/012_Overworld/001_Overworld.rb b/Data/Scripts/012_Overworld/001_Overworld.rb index 20f420bce..a2e3b28e5 100644 --- a/Data/Scripts/012_Overworld/001_Overworld.rb +++ b/Data/Scripts/012_Overworld/001_Overworld.rb @@ -283,7 +283,13 @@ Events.onMapChange += proc { |_sender, e| if new_map_metadata && new_map_metadata.teleport_destination $PokemonGlobal.healingSpot = new_map_metadata.teleport_destination end - $PokemonMap.clear if $PokemonMap + if $PokemonMap + blackFluteUsed = $PokemonMap.blackFluteUsed + whiteFluteUsed = $PokemonMap.whiteFluteUsed + $PokemonMap.clear + $PokemonMap.blackFluteUsed = blackFluteUsed + $PokemonMap.whiteFluteUsed = whiteFluteUsed + end $PokemonEncounters.setup($game_map.map_id) if $PokemonEncounters $PokemonGlobal.visitedMaps[$game_map.map_id] = true next if old_map_ID == 0 || old_map_ID == $game_map.map_id diff --git a/Data/Scripts/013_Items/002_Item_Effects.rb b/Data/Scripts/013_Items/002_Item_Effects.rb index 078a819bf..1f7099d8d 100644 --- a/Data/Scripts/013_Items/002_Item_Effects.rb +++ b/Data/Scripts/013_Items/002_Item_Effects.rb @@ -148,17 +148,19 @@ Events.onStepTaken += proc { ItemHandlers::UseInField.add(:BLACKFLUTE, proc { |item| pbUseItemMessage(item) - pbMessage(_INTL("Wild Pokémon will be repelled.")) - $PokemonMap.blackFluteUsed = true + message = $PokemonMap.blackFluteUsed ? "Wild Pokemon will no longer be repelled.": "Wild Pokémon will be repelled." + pbMessage(_INTL(message)) + $PokemonMap.blackFluteUsed = !$PokemonMap.blackFluteUsed $PokemonMap.whiteFluteUsed = false next 1 }) ItemHandlers::UseInField.add(:WHITEFLUTE, proc { |item| pbUseItemMessage(item) - pbMessage(_INTL("Wild Pokémon will be lured.")) + message = $PokemonMap.whiteFluteUsed ? "Wild Pokemon will no longer be lured.": "Wild Pokémon will be lured." + pbMessage(_INTL(message)) + $PokemonMap.whiteFluteUsed = !$PokemonMap.whiteFluteUsed $PokemonMap.blackFluteUsed = false - $PokemonMap.whiteFluteUsed = true next 1 }) diff --git a/Data/Scripts/014_Pokemon/001_Pokemon.rb b/Data/Scripts/014_Pokemon/001_Pokemon.rb index cc0f15f33..1cb1d6d41 100644 --- a/Data/Scripts/014_Pokemon/001_Pokemon.rb +++ b/Data/Scripts/014_Pokemon/001_Pokemon.rb @@ -606,12 +606,12 @@ class Pokemon # Makes this Pokémon male. def makeMale - self.gender = 0; + @gender = 0 end # Makes this Pokémon female. def makeFemale - self.gender = 1; + @gender = 1 end # @return [Boolean] whether this Pokémon is male