mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-19 23:02:19 +02:00
Add applyPreLeaveFieldAbAttrs call to AttemptRunPhase
This commit is contained in:
parent
c977bc86c1
commit
6d041e1f6a
@ -1,4 +1,4 @@
|
||||
import { applyAbAttrs, RunSuccessAbAttr } from "#app/data/ability";
|
||||
import { applyAbAttrs, applyPreLeaveFieldAbAttrs, PreLeaveFieldAbAttr, RunSuccessAbAttr } from "#app/data/ability";
|
||||
import { Stat } from "#app/enums/stat";
|
||||
import { StatusEffect } from "#app/enums/status-effect";
|
||||
import type { PlayerPokemon, EnemyPokemon } from "#app/field/pokemon";
|
||||
@ -34,6 +34,8 @@ export class AttemptRunPhase extends PokemonPhase {
|
||||
applyAbAttrs(RunSuccessAbAttr, playerPokemon, null, false, escapeChance);
|
||||
|
||||
if (playerPokemon.randSeedInt(100) < escapeChance.value && !this.forceFailEscape) {
|
||||
enemyField.forEach(enemyPokemon => applyPreLeaveFieldAbAttrs(PreLeaveFieldAbAttr, enemyPokemon));
|
||||
|
||||
globalScene.playSound("se/flee");
|
||||
globalScene.queueMessage(i18next.t("battle:runAwaySuccess"), null, true, 500);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user