I got it to change type but it only changes to fire.No, Flying Press calculates for two types at the same time, not two types at different times. I think looking at something like Weather Ball would be better, and then just use the type-changing code of it for each hit.
You've almost got it! The trouble is that numHit is actually the number of hits the move will have, not the hit number the move is on. You'll want to use realNumHits instead, which counts how many hits have been completed.I got it to change type but it only changes to fire.
class PokeBattle_Move_206 < PokeBattle_Move
def multiHitMove?; return true; end
def pbNumHits(user,targets); return 3; end
def pbBaseDamage(baseDmg,user,target)
return baseDmg
end
def pbBaseType(user)
if numHit = 1
getConst(PBTypes,:DRAGON)
if numHit = 2
getConst(PBTypes,:POISON)
if numHit = 3
getConst(PBTypes,:FIRE)
end
end
end
end
end
this is the code i'm using atm, i really don't know how to track each hit. Also how would i go about changing animations for each hit?
Thanks,
Zachary
def pbBaseType(user)
case realNumHits
when 0
getConst(PBTypes,:DRAGON)
when 1
getConst(PBTypes,:POISON)
when 2
getConst(PBTypes,:FIRE)
end
end
That works! Also got the animations working (Just Copied over crunch,fire and poison fang and set them up like a multi hit move animation)You've almost got it! The trouble is that numHit is actually the number of hits the move will have, not the hit number the move is on. You'll want to use realNumHits instead, which counts how many hits have been completed.
Ruby:def pbBaseType(user) case realNumHits when 0 getConst(PBTypes,:DRAGON) when 1 getConst(PBTypes,:POISON) when 2 getConst(PBTypes,:FIRE) end end
I'm not especially familiar with the move animation editor, but I know Turner has a tutorial on it here, and I think it's most just a matter of having separate animations before the main hit animation? Not positive, though.
Nice!That works! Also got the animations working (Just Copied over crunch,fire and poison fang and set them up like a multi hit move animation)
Is there anyway to add a display message for each hit and i don't know if its possible but since its set as a Dragon move in the PBS, it fails when against a Fairy type and doesn't continue the attack, Is there a way to Skip hits that don't effect the Target and still hit the others that effect it?
Thanks,
Zachary
def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true)
super
case realNumHits
when 0
@battle.pbDisplay(_INTL("Message 1"))
when 1
@battle.pbDisplay(_INTL("Message 2"))
when 2
@battle.pbDisplay(_INTL("Message 3"))
end
end
def pbFailsAgainstTarget?(user,target)
return super
end
And the Error:class PokeBattle_Move_206 < PokeBattle_Move
def multiHitMove?; return true; end
def pbNumHits(user,targets); return 3; end
def pbFailsAgainstTarget?(user,target); return super; end
def pbBaseType(user)
case @realNumHits
when 0
getConst(PBTypes,:DRAGON)
when 1
getConst(PBTypes,:POISON)
when 2
getConst(PBTypes,:FIRE)
end
end
def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true)
super
case @realNumHits
when 0
@battle.pbDisplay(_INTL("Dragon Head Bites"))
when 1
@battle.pbDisplay(_INTL("Snake Head Bites"))
when 2
@battle.pbDisplay(_INTL("Lion Head Bites"))
end
end
end
---------------------------
Pokemon Mason
---------------------------
[Pokémon Essentials version 18.1.dev]
Exception: NoMethodError
Message: undefined method `<' for nil:NilClass
Backtrace:
Move_Usage_Calculations:68:in `pbCalcTypeMod'
Battler_UseMove_SuccessChecks:326:in `pbSuccessCheckAgainstTarget'
Battler_UseMove:431:in `_ZUD_pbUseMove'
Battler_UseMove:428:in `each'
Battler_UseMove:428:in `_ZUD_pbUseMove'
ZUD_04_Battle_Effects:546:in `pbUseMove'
ZUD_04_Battle_Effects:408:in `pbProcessTurn'
ZUD_04_Battle_Effects:407:in `logonerr'
ZUD_04_Battle_Effects:407:in `pbProcessTurn'
Battle_Phase_Attack:128:in `pbAttackPhaseMoves'
This exception was logged in
C:\Users\USERNAME\Saved Games\Pokemon Mason\errorlog.txt.
Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK
---------------------------
Hm, well, it does mention some of their scripts, but I think it's more likely that I was just mistaken with the pbFailsAgainstTarget- I think it's causing issues with the check to see if the move fails. The trouble is, I'm not sure how to make it where we could prevent it failing against a Fairy-type and still have it deal no damage to a Fairy-type.I do have the ZUD Dynamax and Z Move Scripts installed, would that interfere with it?
def pbCalcTypeModSingle(moveType,defType,user,target)
return PBTypeEffectiveness::NORMAL_EFFECTIVE_ONE if isConst?(moveType,PBTypes,:DRAGON) &&
isConst?(defType,PBTypes,:FAIRY)
return super
end
Gave up on doing the messages but it all works, i changed PBTypeEffectiveness::NORMAL_EFFECTIVE_ONE to PBTypeEffectiveness::NOT_EFFECTIVE_ONE just to Nerf it a little.Hm, well, it does mention some of their scripts, but I think it's more likely that I was just mistaken with the pbFailsAgainstTarget- I think it's causing issues with the check to see if the move fails. The trouble is, I'm not sure how to make it where we could prevent it failing against a Fairy-type and still have it deal no damage to a Fairy-type.
We could make it where the Dragon attack did regular damage against Fairy-types by adding this-
Ruby:def pbCalcTypeModSingle(moveType,defType,user,target) return PBTypeEffectiveness::NORMAL_EFFECTIVE_ONE if isConst?(moveType,PBTypes,:DRAGON) && isConst?(defType,PBTypes,:FAIRY) return super end
Or we could rearrange the order of the hits so that the Dragon attack is last? That way it wouldn't stop the other hits from going through.
(Oh, and delete "def pbFailsAgainstTarget?(user,target); return super; end", since that's probably what's causing the error)