################################################################################
# Heals target by 1/2 of its max HP.
[COLOR="Red"]# If user has ability Mega Launcher, heals target by 3/4 of its max HP.[/COLOR]
################################################################################
class PokeBattle_Move_0DF < PokeBattle_Move
def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
if opponent.effects[PBEffects::Substitute]>0
@battle.pbDisplay(_INTL("But it failed!"))
return -1
end
if opponent.effects[PBEffects::HealBlock]>0
@battle.pbDisplay(_INTL("{1} was prevented from healing due to Heal Block!",opponent.pbThis))
return -1
end
if opponent.hp==opponent.totalhp
@battle.pbDisplay(_INTL("{1}'s HP is full!",opponent.pbThis))
return -1
end
pbShowAnimation(@id,attacker,opponent,hitnum,alltargets,showanimation)
hpgain=((opponent.totalhp+1)/2).floor
[COLOR="red"]hpgain=(((opponent.totalhp+1)*3)/4).floor if attacker.hasWorkingAbility(:MEGALAUNCHER)
[/COLOR] opponent.pbRecoverHP(hpgain,true)
@battle.pbDisplay(_INTL("{1}'s HP was restored.",opponent.pbThis))
return 0
end
end