mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 21:24:59 +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
|
# 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,
|
||||||
|
|||||||
Reference in New Issue
Block a user