diff --git a/sim/tools/random-player-ai.ts b/sim/tools/random-player-ai.ts index 455f19d925..2494d3c781 100644 --- a/sim/tools/random-player-ai.ts +++ b/sim/tools/random-player-ai.ts @@ -99,7 +99,7 @@ export class RandomPlayerAI extends BattlePlayer { // Filter out adjacentAlly moves if we have no allies left, unless they're our // only possible move options. - const hasAlly = !pokemon[i ^ 1].condition.endsWith(` fnt`); + const hasAlly = pokemon.length > 1 && !pokemon[i ^ 1].condition.endsWith(` fnt`); const filtered = canMove.filter(m => m.target !== `adjacentAlly` || hasAlly); canMove = filtered.length ? filtered : canMove;