From 883f986ed205b38b6c3f4139ea69d4ee4fcf64b7 Mon Sep 17 00:00:00 2001 From: InfernoVulpix Date: Sun, 21 Apr 2024 03:27:46 -0400 Subject: [PATCH] Implemented Synchronoise's effect Tested with Soak, Forest's Curse, and a variety of attacker and defender types. --- 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 d5bd71ad2e1..fe1ab24a863 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -3585,6 +3585,8 @@ export class FirstMoveCondition extends MoveCondition { } } +const sameTypeCondition: MoveConditionFunc = (user, target, move) => user.getTypes().some(item => target.getTypes().includes(item)); + export type MoveTargetSet = { targets: BattlerIndex[]; multiple: boolean; @@ -4961,7 +4963,7 @@ export function initMoves() { .attr(CompareWeightPowerAttr), new AttackMove(Moves.SYNCHRONOISE, Type.PSYCHIC, MoveCategory.SPECIAL, 120, 100, 10, -1, 0, 5) .target(MoveTarget.ALL_NEAR_OTHERS) - .partial(), + .condition(sameTypeCondition), new AttackMove(Moves.ELECTRO_BALL, Type.ELECTRIC, MoveCategory.SPECIAL, -1, 100, 10, -1, 0, 5) .attr(BattleStatRatioPowerAttr, Stat.SPD) .ballBombMove(),