pokerogue
pokerogue copied to clipboard
Repels Implementation
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.
For whatever reason trying to grab the latest commits from the main repo completely broke whatever I had, I'll fix it and reopen
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.
Closing due to inactivity and merge conflicts. We're also not sure if we want repels right now.