mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 21:54:58 +00:00
Snowstorm, forfeiting trainer battles, battle outcome values
This commit is contained in:
@@ -52,11 +52,7 @@ ItemHandlers::CanUseInBattle.addIf(:poke_balls,
|
||||
# this case, but only in trainer battles, and the trainer will deflect
|
||||
# them if they are trying to catch a non-Shadow Pokémon.)
|
||||
if battle.pbOpposingBattlerCount > 1 && !(GameData::Item.get(item).is_snag_ball? && battle.trainerBattle?)
|
||||
if battle.pbOpposingBattlerCount == 2
|
||||
scene.pbDisplay(_INTL("It's no good! It's impossible to aim when there are two Pokémon!")) if showMessages
|
||||
elsif showMessages
|
||||
scene.pbDisplay(_INTL("It's no good! It's impossible to aim when there is more than one Pokémon!"))
|
||||
end
|
||||
scene.pbDisplay(_INTL("It's no good! It's impossible to aim unless there is only one Pokémon!")) if showMessages
|
||||
next false
|
||||
end
|
||||
next true
|
||||
@@ -306,7 +302,7 @@ ItemHandlers::UseInBattle.add(:GUARDSPEC, proc { |item, battler, battle|
|
||||
})
|
||||
|
||||
ItemHandlers::UseInBattle.add(:POKEDOLL, proc { |item, battler, battle|
|
||||
battle.decision = 3
|
||||
battle.decision = Battle::Outcome::FLEE
|
||||
battle.pbDisplayPaused(_INTL("You got away safely!"))
|
||||
})
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user