pokerogue icon indicating copy to clipboard operation
pokerogue copied to clipboard

Repels Implementation

Open ojukeihpos opened this issue 9 months ago • 2 comments

Implements all types of Repels (Regular, Super, and Max) with functionality as described on the Trello Board. Repels last for (5/10/25) waves and prevent double battles from occurring (including trainer doubles) by checking if the player has the modifier active during newBattle(), and overriding the double parameter to be false.

Also modifies the weightings of both repels and lures so that they do not show up in the shop if the player already has one of either.

ojukeihpos avatar May 06 '24 09:05 ojukeihpos

For whatever reason trying to grab the latest commits from the main repo completely broke whatever I had, I'll fix it and reopen

ojukeihpos avatar May 06 '24 18:05 ojukeihpos

https://github.com/pagefaultgames/pokerogue/assets/10471964/e699a9e9-ed9f-4ff5-a7e8-edc103394804

Video is subtitled, explanation of implementation is written here for easy access:

The implementation was tested by setting the double battle override to true, forcing double battles to always occur. Normal Repel weighting was set to 10000 to ensure it appears in the store for demonstration purposes.

When newBattle() is called, there is a check for if a modifier of DoubleBattleChanceModifierType exists in the player's modifiers list. If it does, then one of the following occurs:

If the newBattleType is a Trainer, the doubleTrainer value is overwritten to always be false. This does not apply if the Trainer can ONLY be a double battle. Otherwise, newDouble's value is overwritten to always be false as long as the player has a Repel.

This also overrides the DOUBLE_BATTLE_OVERRIDE value. Let me know if that shouldn't be the case.

ojukeihpos avatar May 19 '24 21:05 ojukeihpos

Closing due to inactivity and merge conflicts. We're also not sure if we want repels right now.

Tempo-anon avatar Jul 11 '24 17:07 Tempo-anon