Added prompt for what to do with a caught Pokémon if the party is full, and a battle rule that forces a capture into the party

This commit is contained in:
Maruno17
2022-04-05 23:01:07 +01:00
parent 22e0d1dfc5
commit 0680f8665d
9 changed files with 140 additions and 38 deletions

View File

@@ -294,7 +294,9 @@ class Battle::Move
@battle.pbDisplay(_INTL("The substitute took damage for {1}!", target.pbThis(true)))
end
if target.damageState.critical
if $game_temp.party_critical_hits_dealt && user.pbOwnedByPlayer?
if $game_temp.party_critical_hits_dealt &&
$game_temp.party_critical_hits_dealt[user.pokemonIndex] &&
user.pbOwnedByPlayer?
$game_temp.party_critical_hits_dealt[user.pokemonIndex] += 1
end
if target.damageState.affection_critical
@@ -388,7 +390,9 @@ class Battle::Move
target.lastHPLostFromFoe = damage # For Metal Burst
target.lastFoeAttacker.push(user.index) # For Metal Burst
end
if $game_temp.party_direct_damage_taken && target.pbOwnedByPlayer?
if $game_temp.party_direct_damage_taken &&
$game_temp.party_direct_damage_taken[target.pokemonIndex] &&
target.pbOwnedByPlayer?
$game_temp.party_direct_damage_taken[target.pokemonIndex] += damage
end
end