I have this code for a move called Cyanide Spit. Aparently, the move is like Smack Down but instead of allowing the use of Ground-type moves on fliers, it allows the use of Poison-type moves on Steel-types.
Here's the WIP code:
Any help please?
Here's the WIP code:
Spoiler:
################################################################################
# Weakens Steel-type Pokemon, allowing Poison-type moves to deal normal damage. (Cyanide Spit)
################################################################################
class PokeBattle_Move_15A < PokeBattle_Move
def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
ret=super(attacker,opponent,hitnum,alltargets,showanimation)
if opponent.damagestate.calcdamage>0 && !opponent.damagestate.substitute
opponent.effects[PBEffects::CyanideSpit]=true
showmsg=(opponent.pbHasType?(:STEEL))
end
@battle.pbDisplay(_INTL("{1} was weakened!",opponent.pbThis)) if showmsg
end
return ret
end
end
# Weakens Steel-type Pokemon, allowing Poison-type moves to deal normal damage. (Cyanide Spit)
################################################################################
class PokeBattle_Move_15A < PokeBattle_Move
def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
ret=super(attacker,opponent,hitnum,alltargets,showanimation)
if opponent.damagestate.calcdamage>0 && !opponent.damagestate.substitute
opponent.effects[PBEffects::CyanideSpit]=true
showmsg=(opponent.pbHasType?(:STEEL))
end
@battle.pbDisplay(_INTL("{1} was weakened!",opponent.pbThis)) if showmsg
end
return ret
end
end
Any help please?