Refactoring of code relating to switching, effect damage and effects that trigger after a move is used

This commit is contained in:
Maruno17
2021-09-19 19:03:17 +01:00
parent f00f030825
commit 1fb3ff5408
24 changed files with 345 additions and 343 deletions

View File

@@ -59,7 +59,7 @@ class PokeBattle_Move_MaxUserAttackLoseHalfOfTotalHP < PokeBattle_Move
def pbEffectGeneral(user)
hpLoss = [user.totalhp/2,1].max
user.pbReduceHP(hpLoss,false)
user.pbReduceHP(hpLoss, false, false)
if user.hasActiveAbility?(:CONTRARY)
user.stages[:ATTACK] = -6
user.statsLowered = true