Correction to unstoppable/ungainable ability methods

This commit is contained in:
Maruno17
2020-09-12 22:11:19 +01:00
parent d4db99719b
commit 6979fb056b

View File

@@ -340,7 +340,8 @@ class PokeBattle_Battler
# Applies to both losing self's ability (i.e. being replaced by another) and # Applies to both losing self's ability (i.e. being replaced by another) and
# having self's ability be negated. # having self's ability be negated.
def unstoppableAbility? def unstoppableAbility?(abil = nil)
abil = @ability if !abil
abilityBlacklist = [ abilityBlacklist = [
# Form-changing abilities # Form-changing abilities
:BATTLEBOND, :BATTLEBOND,
@@ -358,13 +359,14 @@ class PokeBattle_Battler
:RKSSYSTEM :RKSSYSTEM
] ]
abilityBlacklist.each do |a| abilityBlacklist.each do |a|
return true if isConst?(@ability, PBAbilities, a) return true if isConst?(abil, PBAbilities, a)
end end
return false return false
end end
# Applies to gaining the ability. # Applies to gaining the ability.
def ungainableAbility?(abil) def ungainableAbility?(abil = nil)
abil = @ability if !abil
abilityBlacklist = [ abilityBlacklist = [
# Form-changing abilities # Form-changing abilities
:BATTLEBOND, :BATTLEBOND,