Snowstorm, forfeiting trainer battles, battle outcome values

This commit is contained in:
Maruno17
2024-06-15 21:29:00 +01:00
parent 22b33ca6c2
commit 8e9417c3b7
41 changed files with 284 additions and 214 deletions

View File

@@ -221,14 +221,14 @@ EventHandlers.add(:on_wild_pokemon_created, :poke_radar_shiny,
)
EventHandlers.add(:on_wild_battle_end, :poke_radar_continue_chain,
proc { |species, level, decision|
if $game_temp.poke_radar_data && [1, 4].include?(decision) # Defeated/caught
proc { |species, level, outcome|
if $game_temp.poke_radar_data && [Battle::Outcome::WIN, Battle::Outcome::CATCH].include?(outcome)
$game_temp.poke_radar_data[0] = species
$game_temp.poke_radar_data[1] = level
$game_temp.poke_radar_data[2] += 1
$stats.poke_radar_longest_chain = [$game_temp.poke_radar_data[2], $stats.poke_radar_longest_chain].max
# Catching makes the next Radar encounter more likely to continue the chain
$game_temp.poke_radar_data[4] = (decision == 4)
$game_temp.poke_radar_data[4] = (outcome == Battle::Outcome::CATCH)
pbPokeRadarHighlightGrass(false)
else
pbPokeRadarCancel