From ba311f6a13713c55d368513bd70c382873b6abf5 Mon Sep 17 00:00:00 2001 From: Madi Simpson Date: Sat, 4 May 2024 16:17:57 -0700 Subject: [PATCH] moves: water shuriken hits 3x 20bp in ash greninja forme --- src/data/move.ts | 41 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/src/data/move.ts b/src/data/move.ts index 054d0505e..ae4823902 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -756,7 +756,7 @@ export enum MultiHitType { _2_TO_5, _3, _3_INCR, - _1_TO_10 + _1_TO_10, } export class HealAttr extends MoveEffectAttr { @@ -912,7 +912,9 @@ export class MultiHitAttr extends MoveAttr { apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { let hitTimes: integer; - switch (this.multiHitType) { + const hitType = new Utils.IntegerHolder(this.multiHitType) + applyMoveAttrs(ChangeMultiHitTypeAttr, user, target, move, hitType) + switch (hitType.value) { case MultiHitType._2_TO_5: { const rand = user.randSeedInt(16); @@ -975,6 +977,25 @@ export class MultiHitAttr extends MoveAttr { } } +export class ChangeMultiHitTypeAttr extends MoveAttr { + apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { + //const hitType = args[0] as Utils.NumberHolder; + return false; + } +} + +export class WaterShurikenMultiHitTypeAttr extends ChangeMultiHitTypeAttr { + apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { + if ([user.species.speciesId, user.fusionSpecies?.speciesId].includes(Species.GRENINJA) && user.hasAbility(Abilities.BATTLE_BOND)) { + if ((user.species.speciesId === Species.GRENINJA ? user.formIndex : user.fusionSpecies.formIndex) == 2) { + (args[0] as Utils.IntegerHolder).value = MultiHitType._3 + return true; + } + return false; + } + } +} + export class StatusEffectAttr extends MoveEffectAttr { public effect: StatusEffect; public cureTurn: integer; @@ -2049,6 +2070,18 @@ export class KnockOffPowerAttr extends VariablePowerAttr { } } +export class WaterShurikenPowerAttr extends VariablePowerAttr { + apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { + if ([user.species.speciesId, user.fusionSpecies?.speciesId].includes(Species.GRENINJA) && user.hasAbility(Abilities.BATTLE_BOND)) { + if ((user.species.speciesId === Species.GRENINJA ? user.formIndex : user.fusionSpecies.formIndex) == 2) { + (args[0] as Utils.IntegerHolder).value = 20 + return true; + } + return false; + } + } +} + export class VariableAtkAttr extends MoveAttr { constructor() { super(); @@ -5473,7 +5506,9 @@ export function initMoves() { new AttackMove(Moves.HYPERSPACE_HOLE, Type.PSYCHIC, MoveCategory.SPECIAL, 80, -1, 5, -1, 0, 6) .ignoresProtect(), new AttackMove(Moves.WATER_SHURIKEN, Type.WATER, MoveCategory.SPECIAL, 15, 100, 20, -1, 1, 6) - .attr(MultiHitAttr), + .attr(MultiHitAttr) + .attr(WaterShurikenPowerAttr) + .attr(WaterShurikenMultiHitTypeAttr), new AttackMove(Moves.MYSTICAL_FIRE, Type.FIRE, MoveCategory.SPECIAL, 75, 100, 10, 100, 0, 6) .attr(StatChangeAttr, BattleStat.SPATK, -1), new SelfStatusMove(Moves.SPIKY_SHIELD, Type.GRASS, -1, 10, -1, 4, 6)