Hi,
I'm trying to make a couple of scripts for two new type of berries. One reduces incoming physical damage, while the other reduces special damage.
But it doesn't seem to work:/ what should I start looking to fix?
I'm trying to make a couple of scripts for two new type of berries. One reduces incoming physical damage, while the other reduces special damage.
Code:
def pbMoveWeakeningBerryF(move,mults)
return if !move.physicalMove?
mults[:final_damage_multiplier] /= 2
@damageState.berryWeakened = true
ripening = false
if hasActiveAbility?(:RIPEN)
@battle.pbShowAbilitySplash(self)
mults[:final_damage_multiplier] /= 2
ripening = true
end
@battle.pbCommonAnimation("EatBerry", self)
@battle.pbHideAbilitySplash(self) if ripening
end
def pbMoveWeakeningBerryS(move,mults)
return if !move.specialMove?
mults[:final_damage_multiplier] /= 2
@damageState.berryWeakened = true
ripening = false
if hasActiveAbility?(:RIPEN)
@battle.pbShowAbilitySplash(self)
mults[:final_damage_multiplier] /= 2
ripening = true
end
@battle.pbCommonAnimation("EatBerry", self)
@battle.pbHideAbilitySplash(self) if ripening
end
But it doesn't seem to work:/ what should I start looking to fix?