- 37
- Posts
- 8
- Years
- Seen Jan 21, 2021
Trying to implement dual-type moves that work just like Flying Press into v16 but the secondary type (indicated in the script, coincidentally also Flying) doesn't seem to be having any effect in battle. I modeled the script on the Flying Press script in v17, as in contrast to v18 afaik there's no major differences in the script language for battles, but I'm thinking there's some difference I'm missing. This is what I have (it has a secondary effect that I don't believe should be influencing anything):
################################################################################
# Bloody Talon - Dual type Dark+Flying move with chance to Flinch
################################################################################
class PokeBattle_Move_162 < PokeBattle_Move
def pbModifyDamage(damagemult,attacker,opponent)
type=getConst(PBTypes,:FLYING) || -1
if type>=0
mult=PBTypes.getCombinedEffectiveness(type,
opponent.type1,opponent.type2,opponent.effects[PBEffects::Type3])
return ((damagemult*mult)/8).round
end
return damagemult
end
def pbAdditionalEffect(attacker,opponent)
return if opponent.damagestate.substitute
opponent.pbFlinch(attacker)
end
end
The spacing isn't showing up here but should be accurate in the script (as an aside, how do you post proper spaced lines in a comment here?).
Would appreciate any input.
################################################################################
# Bloody Talon - Dual type Dark+Flying move with chance to Flinch
################################################################################
class PokeBattle_Move_162 < PokeBattle_Move
def pbModifyDamage(damagemult,attacker,opponent)
type=getConst(PBTypes,:FLYING) || -1
if type>=0
mult=PBTypes.getCombinedEffectiveness(type,
opponent.type1,opponent.type2,opponent.effects[PBEffects::Type3])
return ((damagemult*mult)/8).round
end
return damagemult
end
def pbAdditionalEffect(attacker,opponent)
return if opponent.damagestate.substitute
opponent.pbFlinch(attacker)
end
end
The spacing isn't showing up here but should be accurate in the script (as an aside, how do you post proper spaced lines in a comment here?).
Would appreciate any input.
Last edited: