- 186
- Posts
- 6
- Years
- Seen Apr 7, 2025
Shell Side Arm
In PokeBattle_MoveEffects, paste below any other function code (Set XXX to a new code)
In your Moves.txt PBS file add the following, where YYY is a new number and XXX is the function code
In PokeBattle_MoveEffects, paste below any other function code (Set XXX to a new code)
Spoiler:
Code:
################################################################################
# Becomes physical if Atk does more than Sp. Atk. May poison target (Shell Side Arm)
################################################################################
class PokeBattle_Move_XXX < PokeBattle_Move
def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
stagemul=[10,10,10,10,10,10,10,15,20,25,30,35,40]
stagediv=[40,35,30,25,20,15,10,10,10,10,10,10,10]
calcattackstage=attacker.stages[PBStats::ATTACK]+6
calcattack=(attacker.attack*1.0*stagemul[calcattackstage]/stagediv[calcattackstage]).floor
calcspatkstage=attacker.stages[PBStats::SPATK]+6
calcspatk=(attacker.spatk*1.0*stagemul[calcspatkstage]/stagediv[calcspatkstage]).floor
calcdefensestage=opponent.stages[PBStats::DEFENSE]+6
calcdefense=(opponent.defense*1.0*stagemul[calcdefensestage]/stagediv[calcdefensestage]).floor
calcspdefstage=opponent.stages[PBStats::SPDEF]+6
calcspdef=(opponent.spdef*1.0*stagemul[calcspdefstage]/stagediv[calcspdefstage]).floor
@category=(calcattack-calcdefense>calcspatk-calcspdef) ? 0 : 1
@flags= (calcattack-calcdefense>calcspatk-calcspdef) ? @flags : @flags && (0x02 || 0x10 || 0x20) #Turns off contact if special move
return super(attacker,opponent,hitnum,alltargets,showanimation) if pbIsDamaging?
end
def pbAdditionalEffect(attacker,opponent)
return if opponent.damagestate.substitute
if opponent.pbCanPoison?(attacker,false,self)
opponent.pbPoison(attacker)
end
end
end
In your Moves.txt PBS file add the following, where YYY is a new number and XXX is the function code
Spoiler:
Code:
YYY,SHELLSIDEARM,Shell Side Arm,XXX,90,POISON,Physical,100,10,10,00,0,abef,"This move inflicts physical or special damage, whichever will be more effective. This may also poison the target."