mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Correction to unstoppable/ungainable ability methods
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user