- 1
- Posts
- 7
- Years
- Seen Sep 22, 2017
I am creating a new move called Crasher Kick which is a multi-hit move, hitting 2 times (like bonemerang) however, the first hit is Ground type and the second hit is Fighting type.
PBEffects:
PokeBattle_Battler below "@effects[PBEffects::Yawn] = 0":
At around line 2869 in the "def pbProcessMoveAgainstTarget" section:
Pokebattle_MoveEffects:
Finally in Pokebattle_Battle in the "End of round" section:
I keep getting this error (attachment) whenever i try to use the move and i'm not sure why?
PBEffects:
Code:
CrasherKick=115
PokeBattle_Battler below "@effects[PBEffects::Yawn] = 0":
Code:
@effects[PBEffects::CrasherKick] = false
At around line 2869 in the "def pbProcessMoveAgainstTarget" section:
Code:
if thismove.function==0x187 && numhits>1 # Crasher Kick
user.effects[PBEffects::CrasherKick]=true
end
Pokebattle_MoveEffects:
Code:
class PokeBattle_Move_187 < PokeBattle_Move
def pbIsMultiHit
return true
end
def pbNumHits(attacker)
return 2
end
def pbModifyType(type,attacker,opponent)
if attacker.effects[PBEffects::CrasherKick]==true
type=getConst(PBTypes,:FIGHTING)
end
end
end
Finally in Pokebattle_Battle in the "End of round" section:
Code:
@battlers[i].effects[PBEffects::CrasherKick]=false
I keep getting this error (attachment) whenever i try to use the move and i'm not sure why?