Thread: [Question] Ability cloning Zen Mode?
View Single Post
  #12    
Old September 28th, 2012 (09:17 AM).
JynxedOne's Avatar
JynxedOne JynxedOne is offline
 
Join Date: Sep 2012
Location: Upstate New York
Gender: Male
Nature: Hasty
Posts: 138
I took a look at PokeBattle_MoveEffects. Scripting was never my strong suit, but I tried piecing together code for an attack to hit twice, and when the user is part Ghost it would double damage hit twice and paralyze. Could one of you check over the code? I know there's stuff wrong with it but I would never be able to find out what myself.

################################################################################
# Hits twice. If Ghost Type hits twice paralyze and double damage.
################################################################################
class PokeBattle_Move_133 < PokeBattle_Move
def pbIsMultiHit
return true
end

def pbNumHits
return 2
end
end
def pbBaseDamage(damage,attacker,opponent)
if !attacker.pbHasType?(:GHOST)
damage*=2
end
return damage
end
return -1 if !opponent.pbCanParalyze?(true)
@battle.pbAnimation(@id,attacker,opponent)
opponent.pbParalyze(attacker)
@battle.pbDisplay(_INTL("{1} is paralyzed! It may be unable to move!",opponent.pbThis))
return 0
end
end
Reply With Quote