Ability :MUMMY raises an error
Closed this issue · 0 comments
Hokath commented
BattleHandlers::TargetAbilityOnHit.add(:MUMMY,
proc { |ability,user,target,move,battle|
next if !move.pbContactMove?(user)
next if user.fainted?
next if user.unstoppableAbility? || user.ability == ability
oldAbil = -1
battle.pbShowAbilitySplash(target) if user.opposes?(target)
if user.affectedByContactEffect?(PokeBattle_SceneConstants::USE_ABILITY_SPLASH)
oldAbil = user.ability
battle.pbShowAbilitySplash(user,true,false) if user.opposes?(target)
user.ability = ability
battle.pbReplaceAbilitySplash(user) if user.opposes?(target)
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
battle.pbDisplay(_INTL("{1}'s Ability became {2}!",user.pbThis,user.abilityName))
else
battle.pbDisplay(_INTL("{1}'s Ability became {2} because of {3}!",
user.pbThis,user.abilityName,target.pbThis(true)))
end
battle.pbHideAbilitySplash(user) if user.opposes?(target)
end
battle.pbHideAbilitySplash(target) if user.opposes?(target)
user.pbOnAbilityChanged(oldAbil) if oldAbil>=0
}
)
It doesn't like the last line.
I guess it used to refer to an ID which was a number, but not it is a symbol it doesn't like the >= logic?
(this won't crash the game once you dismiss the warning)