diff --git a/src/data/ability.ts b/src/data/ability.ts index 39c70fd7e..57d1402ad 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -3224,8 +3224,7 @@ export function initAbilities() { .attr(UncopiableAbilityAbAttr) .attr(UnswappableAbilityAbAttr) .attr(UnsuppressableAbilityAbAttr) - .attr(NoFusionAbilityAbAttr) - .partial(), + .attr(NoFusionAbilityAbAttr), new Ability(Abilities.POWER_CONSTRUCT, 7) // TODO: 10% Power Construct Zygarde isn't accounted for yet. If changed, update Zygarde's getSpeciesFormIndex entry accordingly .attr(PostBattleInitFormChangeAbAttr, p => p.getHpRatio() <= 0.5 ? 4 : 2) .attr(PostSummonFormChangeAbAttr, p => p.getHpRatio() <= 0.5 ? 4 : 2) diff --git a/src/data/move.ts b/src/data/move.ts index b8a516e40..60e492deb 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,23 @@ 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 == Species.GRENINJA && user.hasAbility(Abilities.BATTLE_BOND) && user.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 +2068,16 @@ export class KnockOffPowerAttr extends VariablePowerAttr { } } +export class WaterShurikenPowerAttr extends VariablePowerAttr { + apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { + if (user.species.speciesId == Species.GRENINJA && user.hasAbility(Abilities.BATTLE_BOND) && user.formIndex == 2) { + (args[0] as Utils.IntegerHolder).value = 20 + return true; + } + return false; + } +} + export class VariableAtkAttr extends MoveAttr { constructor() { super(); @@ -5502,7 +5531,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)