pokerogue icon indicating copy to clipboard operation
pokerogue copied to clipboard

Fix Wind Rider boosting stat everytime AI's moveset is calculated

Open LaukkaE opened this issue 9 months ago • 3 comments

Wind Rider boosted attack everytime AI's moveset was calculated, even multiple stages per turn.

LaukkaE avatar May 07 '24 18:05 LaukkaE

Thanks for fixing this for me. While you're here, do you mind adding the on summon effect of wind rider? Full functionality would also mean changes in the Tailwind onAdd but here should be all the code to be added on the ability side of things.

export class PostSummonStatChangeOnArenaAbAttr extends PostSummonStatChangeAbAttr {
  private tagType: ArenaTagType;
  constructor(tagType: ArenaTagType) {
    super([BattleStat.ATK], 1, true, false);
    this.tagType = tagType;
  }

  applyPostSummon(pokemon: Pokemon, passive: boolean, args: any[]): boolean {
    if (pokemon.scene.arena.getTag(this.tagType)) {
      return super.applyPostSummon(pokemon, passive, args);
    }
    return false;
  }
}
  new Ability(Abilities.WIND_RIDER, 9)
    .attr(MoveImmunityStatChangeAbAttr, (pokemon, attacker, move) => pokemon !== attacker && move.getMove().hasFlag(MoveFlags.WIND_MOVE), BattleStat.ATK, 1)
    .ignorable()
    .attr(PostSummonStatChangeOnArenaAbAttr, ArenaTagType.TAILWIND)
    .partial(),

Tempo-anon avatar May 07 '24 22:05 Tempo-anon

Closing this due to inactivity. Feel free to make a new request if interest is reignited

bennybroseph avatar May 19 '24 15:05 bennybroseph

Could you fix the merge conflicts? Then this should be good to go.

Xavion3 avatar May 24 '24 18:05 Xavion3