From 6979fb056b82f0fbd8e7c063f1e01adb43d1880f Mon Sep 17 00:00:00 2001 From: Maruno17 Date: Sat, 12 Sep 2020 22:11:19 +0100 Subject: [PATCH] Correction to unstoppable/ungainable ability methods --- .../012_Battle/001_Battler/001_PokeBattle_Battler.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Data/Scripts/012_Battle/001_Battler/001_PokeBattle_Battler.rb b/Data/Scripts/012_Battle/001_Battler/001_PokeBattle_Battler.rb index 03a58e2f2..33f333d63 100644 --- a/Data/Scripts/012_Battle/001_Battler/001_PokeBattle_Battler.rb +++ b/Data/Scripts/012_Battle/001_Battler/001_PokeBattle_Battler.rb @@ -340,7 +340,8 @@ class PokeBattle_Battler # Applies to both losing self's ability (i.e. being replaced by another) and # having self's ability be negated. - def unstoppableAbility? + def unstoppableAbility?(abil = nil) + abil = @ability if !abil abilityBlacklist = [ # Form-changing abilities :BATTLEBOND, @@ -358,13 +359,14 @@ class PokeBattle_Battler :RKSSYSTEM ] abilityBlacklist.each do |a| - return true if isConst?(@ability, PBAbilities, a) + return true if isConst?(abil, PBAbilities, a) end return false end # Applies to gaining the ability. - def ungainableAbility?(abil) + def ungainableAbility?(abil = nil) + abil = @ability if !abil abilityBlacklist = [ # Form-changing abilities :BATTLEBOND,