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

@@ -40,7 +40,7 @@ class Battle
# Use Pursuit
@choices[b.index][3] = idxSwitcher # Change Pursuit's target
b.pbProcessTurn(@choices[b.index], false)
break if @decision > 0 || @battlers[idxSwitcher].fainted?
break if decided? || @battlers[idxSwitcher].fainted?
end
@switching = false
end
@@ -55,7 +55,7 @@ class Battle
pbMessageOnRecall(b)
# Pursuit interrupts switching
pbPursuit(b.index)
return if @decision > 0
return if decided?
# Switch Pokémon
allBattlers.each do |b2|
b2.droppedBelowHalfHP = false
@@ -84,7 +84,7 @@ class Battle
else
next
end
return if @decision > 0
return if decided?
end
pbCalculatePriority if Settings::RECALCULATE_TURN_ORDER_AFTER_SPEED_CHANGES
end
@@ -118,7 +118,7 @@ class Battle
advance = b.pbProcessTurn(@choices[b.index])
break if advance
end
return if @decision > 0
return if decided?
next if advance
# Regular priority order
priority.each do |b|
@@ -128,7 +128,7 @@ class Battle
advance = b.pbProcessTurn(@choices[b.index])
break if advance
end
return if @decision > 0
return if decided?
next if advance
# Quashed
if Settings::MECHANICS_GENERATION >= 8
@@ -155,7 +155,7 @@ class Battle
break if advance || !moreQuash
end
end
return if @decision > 0
return if decided?
next if advance
# Check for all done
priority.each do |b|
@@ -193,9 +193,9 @@ class Battle
pbAttackPhasePriorityChangeMessages
pbAttackPhaseCall
pbAttackPhaseSwitch
return if @decision > 0
return if decided?
pbAttackPhaseItems
return if @decision > 0
return if decided?
pbAttackPhaseMegaEvolution
pbAttackPhaseMoves
end