pokerogue icon indicating copy to clipboard operation
pokerogue copied to clipboard

Implement Treasures of Ruin abilities

Open innerthunder opened this issue 9 months ago • 1 comments

I've created a new set of arena tags to implement the abilities of the Treasures of Ruin (namely Vessel of Ruin, Sword of Ruin, Tablets of Ruin, and Beads of Ruin).

The basic idea of the implementation:

  • When a Pokemon with a Treasure of Ruin ability is summoned, it will create a TreasureOfRuinTag with the corresponding Stat type to weaken.
  • While the TreasureOfRuinTag is active, it will multiply its corresponding stat by 0.75 during battle stat calculation in Pokemon.getBattleStat()
  • When the source Pokemon leaves battle, the TreasureOfRuinTag is removed without any notification.

I've written the required arena tags and modified getBattleStat(), so all I need to do now is incorporate the tag addition and removal in data/ability.

Also, a note about implementation: As far as I know, this is the first ability to use an arena tag in its implementation. The ArenaTag class requires a sourceMove field, which I've left as Moves.NONE for TreasureOfRuinTag. It might be a good idea to generalize the ArenaTag class in the future to include support for source abilities.

innerthunder avatar May 26 '24 09:05 innerthunder