mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +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
|
||||
|
||||
@@ -1865,7 +1865,7 @@ BattleHandlers::UserAbilityEndOfMove.add(:MAGICIAN,
|
||||
end
|
||||
user.item = b.item
|
||||
b.item = nil
|
||||
b.effects[PBEffects::Unburden] = true if n.hasActiveAbility?(:UNBURDEN)
|
||||
b.effects[PBEffects::Unburden] = true if b.hasActiveAbility?(:UNBURDEN)
|
||||
if battle.wildBattle? && !user.initialItem && user.item == b.initialItem
|
||||
user.setInitialItem(user.item)
|
||||
b.setInitialItem(nil)
|
||||
|
||||
Reference in New Issue
Block a user