mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-21 06:49:35 +02:00
Prevent ENEMY_SIDE targeted moves from occurring twice in double battles
This commit is contained in:
parent
8e90a18788
commit
19e329e173
@ -130,6 +130,10 @@ export class MoveEffectPhase extends PokemonPhase {
|
|||||||
/** Has the move successfully hit a target (for damage) yet? */
|
/** Has the move successfully hit a target (for damage) yet? */
|
||||||
let hasHit: boolean = false;
|
let hasHit: boolean = false;
|
||||||
for (const target of targets) {
|
for (const target of targets) {
|
||||||
|
// Prevent ENEMY_SIDE targeted moves from occurring twice in double battles
|
||||||
|
if (move.moveTarget === MoveTarget.ENEMY_SIDE && target !== targets[targets.length - 1]) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
/** The {@linkcode ArenaTagSide} to which the target belongs */
|
/** The {@linkcode ArenaTagSide} to which the target belongs */
|
||||||
const targetSide = target.isPlayer() ? ArenaTagSide.PLAYER : ArenaTagSide.ENEMY;
|
const targetSide = target.isPlayer() ? ArenaTagSide.PLAYER : ArenaTagSide.ENEMY;
|
||||||
|
Loading…
Reference in New Issue
Block a user