mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-12 23:44:58 +00:00
Fixed bug with Neutralizing Gas, fixed typo
This commit is contained in:
@@ -338,15 +338,16 @@ class PokeBattle_Battler
|
||||
# active, and the code for the two combined would cause an infinite loop
|
||||
# (regardless of whether any Pokémon actually has either the ability or
|
||||
# the item - the code existing is enough to cause the loop).
|
||||
def abilityActive?(ignore_fainted = false)
|
||||
def abilityActive?(ignore_fainted = false, check_ability = nil)
|
||||
return false if fainted? && !ignore_fainted
|
||||
return false if @effects[PBEffects::GastroAcid]
|
||||
return false if self.ability != :NEUTRALIZINGGAS && @battle.pbCheckGlobalAbility(:NEUTRALIZINGGAS)
|
||||
return false if check_ability != :NEUTRALIZINGGAS && self.ability != :NEUTRALIZINGGAS &&
|
||||
@battle.pbCheckGlobalAbility(:NEUTRALIZINGGAS)
|
||||
return true
|
||||
end
|
||||
|
||||
def hasActiveAbility?(check_ability, ignore_fainted = false)
|
||||
return false if !abilityActive?(ignore_fainted)
|
||||
return false if !abilityActive?(ignore_fainted, check_ability)
|
||||
return check_ability.include?(@ability_id) if check_ability.is_a?(Array)
|
||||
return self.ability == check_ability
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user