From bd60de6624ed44e5b320f6172973fab031c81fef Mon Sep 17 00:00:00 2001 From: Christopher Schmidt Date: Fri, 19 Jul 2024 17:29:50 -0400 Subject: [PATCH] Combines moveset from allies and uses it to get a move --- src/data/move.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/data/move.ts b/src/data/move.ts index a00d81e5980..122f93c5dd8 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -5000,7 +5000,9 @@ export class RandomMovesetMoveAttr extends OverrideMoveEffectAttr { apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { const moveset = (!this.enemyMoveset ? user : target).getMoveset(); - const moves = moveset.filter(m => !m.getMove().hasFlag(MoveFlags.IGNORE_VIRTUAL)); + const allies = moveset.concat(user.scene.getParty().map(p => p.moveset).flat()); + + const moves = allies.filter(m => !m.getMove().hasFlag(MoveFlags.IGNORE_VIRTUAL)); if (moves.length) { const move = moves[user.randSeedInt(moves.length)]; const moveIndex = moveset.findIndex(m => m.moveId === move.moveId);