Apply RunSuccessAbAttr to second Pokemon in doubles battle

This commit is contained in:
jnotsknab 2025-06-17 04:04:06 -05:00
parent 6b6e2ad93a
commit e135751537

View File

@ -18,13 +18,16 @@ export class AttemptRunPhase extends PokemonPhase {
const playerField = globalScene.getPlayerField();
const enemyField = globalScene.getEnemyField();
const escapeChance = new NumberHolder(0);
this.attemptRunAway(playerField, enemyField, escapeChance);
applyAbAttrs("RunSuccessAbAttr", playerField[0], null, false, escapeChance);
if (globalScene.currentBattle.double) {
applyAbAttrs("RunSuccessAbAttr", playerField[1], null, false, escapeChance);
}
if (playerField[0].randBattleSeedInt(100) < escapeChance.value && !this.forceFailEscape) {
enemyField.forEach(enemyPokemon => applyPreLeaveFieldAbAttrs("PreLeaveFieldAbAttr", enemyPokemon));