ItemHandlers::BattleUseOnPokemon.add(:CHERIBERRY,proc{|item,pokemon,battler,scene|
if pokemon.hp<=0 || pokemon.status!=PBStatuses::PARALYSIS
scene.pbDisplay(_INTL("It won't have any effect."))
next false
else
$game_system.se_play("potion.wav")
scene.pbDisplay(_INTL("{1} was cured of paralysis.",pokemon.name))
pokemon.status=0
battler.status=0 if battler
next true
end
})
ItemHandlers::BattleUseOnPokemon.copy(:CHESTOBERRY,:PARLYZHEAL)
ItemHandlers::BattleUseOnPokemon.add(:CHESTOBERRY,proc{|item,pokemon,battler,scene|
if pokemon.hp<=0 || pokemon.status!=PBStatuses::SLEEP
scene.pbDisplay(_INTL("It won't have any effect."))
next false
else
$game_system.se_play("potion.wav")
scene.pbDisplay(_INTL("{1} woke up.",pokemon.name))
pokemon.status=0
battler.status=0 if battler
next true
end
})
ItemHandlers::BattleUseOnPokemon.copy(:CHESTOBERRY,:AWAKENING,:BLUEFLUTE)
ItemHandlers::BattleUseOnPokemon.add(:PECHABERRY,proc{|item,pokemon,battler,scene|
if pokemon.hp<=0 || pokemon.status!=PBStatuses::POISON
scene.pbDisplay(_INTL("It won't have any effect."))
next false
else
$game_system.se_play("potion.wav")
scene.pbDisplay(_INTL("{1} was cured of its poisoning.",pokemon.name))
pokemon.status=0
battler.status=0 if battler
next true
end
})