if !attacker || !attacker.hasMoldBreaker
if hasWorkingAbility(:IMMUNITY) ||
(hasWorkingAbility(:FLOWERVEIL) && pbHasType?(:GRASS)) ||
(hasWorkingAbility(:LEAFGUARD) && (@battle.pbWeather==PBWeather::SUNNYDAY ||
@battle.pbWeather==PBWeather::HARSHSUN)) [COLOR="Red"]|| hasWorkingAbility(:MITHRIDATISM)[/COLOR]
@battle.pbDisplay(_INTL(.....etc
for i in priority
next if i.isFainted?
# Poison/Bad poison
if i.status==PBStatuses::POISON [COLOR="Red"]|| i.hasWorkingAbility(:MITHRIDATISM)[/COLOR]
if i.hasWorkingAbility(:POISONHEAL)
pbCommonAnimation("Poison",i,nil)
if i.effects[PBEffects::HealBlock]==0 && i.hp<i.totalhp
PBDebug.log("[Ability triggered] #{i.pbThis}'s Poison Heal")
i.pbRecoverHP((i.totalhp/8).floor,true)
pbDisplay(_INTL("{1} healed itself!",i.pbThis))
end
[COLOR="red"]elsif i.hasWorkingAbility(:MITHRIDATISM)
pbCommonAnimation("HealthUp",i,nil)
if i.effects[PBEffects::HealBlock]==0 && i.hp<i.totalhp
i.pbRecoverHP((i.totalhp/8).floor,true)
pbDisplay(_INTL("{1} healed itself thanks to his ability!",i.pbThis))
end[/COLOR]
else
I did test but It do blood loss of pokemon use here abilities. And it don't disable Poison typeI haven't tested this mind you.
Let's say you already created the new ability and that you called it MITHRIDATISM:
Around line 136 of Pokèbattle_Battlereffects you'll find this code, add the red part:
Code:if !attacker || !attacker.hasMoldBreaker if hasWorkingAbility(:IMMUNITY) || (hasWorkingAbility(:FLOWERVEIL) && pbHasType?(:GRASS)) || (hasWorkingAbility(:LEAFGUARD) && (@battle.pbWeather==PBWeather::SUNNYDAY || @battle.pbWeather==PBWeather::HARSHSUN)) [COLOR="Red"]|| hasWorkingAbility(:MITHRIDATISM)[/COLOR] @battle.pbDisplay(_INTL(.....etc
Around line 3651 of Pokèbattle_battle paste the red part (it's a rough addition but it should work):
Code:for i in priority next if i.isFainted? # Poison/Bad poison if i.status==PBStatuses::POISON [COLOR="Red"]|| i.hasWorkingAbility(:MITHRIDATISM)[/COLOR]
Around line 3659 of Pokèbattle_battle paste the red part:
Code:if i.hasWorkingAbility(:POISONHEAL) pbCommonAnimation("Poison",i,nil) if i.effects[PBEffects::HealBlock]==0 && i.hp<i.totalhp PBDebug.log("[Ability triggered] #{i.pbThis}'s Poison Heal") i.pbRecoverHP((i.totalhp/8).floor,true) pbDisplay(_INTL("{1} healed itself!",i.pbThis)) end [COLOR="red"]elsif i.hasWorkingAbility(:MITHRIDATISM) pbCommonAnimation("HealthUp",i,nil) if i.effects[PBEffects::HealBlock]==0 && i.hp<i.totalhp i.pbRecoverHP((i.totalhp/8).floor,true) pbDisplay(_INTL("{1} healed itself thanks to his ability!",i.pbThis)) end[/COLOR] else
It should work.