I have defined this ability called Infected Fur, which badly poisons the attacker on contact but also prevents the user from being poisoned. The way it prevents the user from being poisoned works but the bad poisoning on contact doesn't!
I also want it to be a 100% chance of badly poisoning the target on contact!
Here's the code:
if user.hasWorkingAbility(:INFECTEDFUR,true) && @battle.pbRandom(10)==10 &&
target.pbCanPoison?(nil,true)
PBDebug.log("[Ability triggered] #{user.pbThis}'s Infected Fur")
target.pbPoison(user,_INTL("{1}'s {2} poisoned {3}!",user.pbThis,
PBAbilities.getName(user.ability),target.pbThis(true)),toxic)
end
What am I doing wrong?
I also want it to be a 100% chance of badly poisoning the target on contact!
Here's the code:
if user.hasWorkingAbility(:INFECTEDFUR,true) && @battle.pbRandom(10)==10 &&
target.pbCanPoison?(nil,true)
PBDebug.log("[Ability triggered] #{user.pbThis}'s Infected Fur")
target.pbPoison(user,_INTL("{1}'s {2} poisoned {3}!",user.pbThis,
PBAbilities.getName(user.ability),target.pbThis(true)),toxic)
end
What am I doing wrong?