mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-10-25 06:25:52 +02:00
* [Bug] Toxic Spikes implementation issues fixed Adjusted MoveEffectPhase.start() so that ENEMY_SIDE targeted moves no longer occur twice per use in double battles. Updated Toxic Orb test to no longer expect a tick of damage turn 1. Fixed Toxic/Poison dealing damage immediately when applied. Fixed Hazards not persisting through save Added unit tests Fixed flyout not displaying correct number of Spikes/Toxic Spikes after a refresh * Update Toxic Orb test * Updates Toxic Spikes tests * Apply suggestions from code review * Fix merge issues Replace `integer` with `number` in `arena-tag.ts` * Remove partial Magic Bounce implementation * Remove stray newline * Remove extra change in safeguard test --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
24 lines
694 B
TypeScript
24 lines
694 B
TypeScript
import { PostTurnStatusEffectPhase } from "#app/phases/post-turn-status-effect-phase";
|
|
import { Phase } from "#app/phase";
|
|
import { BattlerIndex } from "#app/battle";
|
|
import BattleScene from "#app/battle-scene";
|
|
|
|
export class CheckStatusEffectPhase extends Phase {
|
|
private order : BattlerIndex[];
|
|
constructor(scene : BattleScene, order : BattlerIndex[]) {
|
|
super(scene);
|
|
this.scene = scene;
|
|
this.order = order;
|
|
}
|
|
|
|
start() {
|
|
const field = this.scene.getField();
|
|
for (const o of this.order) {
|
|
if (field[o].status && field[o].status.isPostTurn()) {
|
|
this.scene.unshiftPhase(new PostTurnStatusEffectPhase(this.scene, o));
|
|
}
|
|
}
|
|
this.end();
|
|
}
|
|
}
|