pokeemerald/data/battle_scripts_1.s
Papa Cancer 3cde800bd0 Magnetic Flux + Gear Up
Both have the same effect so they're in one commit. Uses custom script to check both user and partner for stats and abilities.
Magnetic Flux uses Charge animation.
2019-04-20 20:17:56 +01:00

6966 lines
203 KiB
ArmAsm

#include "constants/battle.h"
#include "constants/pokemon.h"
#include "constants/battle_script_commands.h"
#include "constants/battle_anim.h"
#include "constants/battle_string_ids.h"
#include "constants/abilities.h"
#include "constants/moves.h"
#include "constants/songs.h"
#include "constants/game_stat.h"
.include "asm/macros.inc"
.include "asm/macros/battle_script.inc"
.include "constants/constants.inc"
.section script_data, "aw", %progbits
.align 2
gBattleScriptsForMoveEffects:: @ 82D86A8
.4byte BattleScript_EffectHit
.4byte BattleScript_EffectSleep
.4byte BattleScript_EffectPoisonHit
.4byte BattleScript_EffectAbsorb
.4byte BattleScript_EffectBurnHit
.4byte BattleScript_EffectFreezeHit
.4byte BattleScript_EffectParalyzeHit
.4byte BattleScript_EffectExplosion
.4byte BattleScript_EffectDreamEater
.4byte BattleScript_EffectMirrorMove
.4byte BattleScript_EffectAttackUp
.4byte BattleScript_EffectDefenseUp
.4byte BattleScript_EffectSpeedUp
.4byte BattleScript_EffectSpecialAttackUp
.4byte BattleScript_EffectSpecialDefenseUp
.4byte BattleScript_EffectAccuracyUp
.4byte BattleScript_EffectEvasionUp
.4byte BattleScript_EffectSpecialAttackUp3
.4byte BattleScript_EffectAttackDown
.4byte BattleScript_EffectDefenseDown
.4byte BattleScript_EffectSpeedDown
.4byte BattleScript_EffectSpecialAttackDown
.4byte BattleScript_EffectSpecialDefenseDown
.4byte BattleScript_EffectAccuracyDown
.4byte BattleScript_EffectEvasionDown
.4byte BattleScript_EffectHaze
.4byte BattleScript_EffectBide
.4byte BattleScript_EffectRampage
.4byte BattleScript_EffectRoar
.4byte BattleScript_EffectMultiHit
.4byte BattleScript_EffectConversion
.4byte BattleScript_EffectFlinchHit
.4byte BattleScript_EffectRestoreHp
.4byte BattleScript_EffectToxic
.4byte BattleScript_EffectPayDay
.4byte BattleScript_EffectLightScreen
.4byte BattleScript_EffectTriAttack
.4byte BattleScript_EffectRest
.4byte BattleScript_EffectOHKO
.4byte BattleScript_EffectFusionCombo
.4byte BattleScript_EffectSuperFang
.4byte BattleScript_EffectDragonRage
.4byte BattleScript_EffectTrap
.4byte BattleScript_EffectHealBlock
.4byte BattleScript_EffectDoubleHit
.4byte BattleScript_EffectRecoilIfMiss
.4byte BattleScript_EffectMist
.4byte BattleScript_EffectFocusEnergy
.4byte BattleScript_EffectRecoil
.4byte BattleScript_EffectConfuse
.4byte BattleScript_EffectAttackUp2
.4byte BattleScript_EffectDefenseUp2
.4byte BattleScript_EffectSpeedUp2
.4byte BattleScript_EffectSpecialAttackUp2
.4byte BattleScript_EffectSpecialDefenseUp2
.4byte BattleScript_EffectAccuracyUp2
.4byte BattleScript_EffectEvasionUp2
.4byte BattleScript_EffectTransform
.4byte BattleScript_EffectAttackDown2
.4byte BattleScript_EffectDefenseDown2
.4byte BattleScript_EffectSpeedDown2
.4byte BattleScript_EffectSpecialAttackDown2
.4byte BattleScript_EffectSpecialDefenseDown2
.4byte BattleScript_EffectAccuracyDown2
.4byte BattleScript_EffectEvasionDown2
.4byte BattleScript_EffectReflect
.4byte BattleScript_EffectPoison
.4byte BattleScript_EffectParalyze
.4byte BattleScript_EffectAttackDownHit
.4byte BattleScript_EffectDefenseDownHit
.4byte BattleScript_EffectSpeedDownHit
.4byte BattleScript_EffectSpecialAttackDownHit
.4byte BattleScript_EffectSpecialDefenseDownHit
.4byte BattleScript_EffectAccuracyDownHit
.4byte BattleScript_EffectEvasionDownHit
.4byte BattleScript_EffectTwoTurnsAttack
.4byte BattleScript_EffectConfuseHit
.4byte BattleScript_EffectTwineedle
.4byte BattleScript_EffectVitalThrow
.4byte BattleScript_EffectSubstitute
.4byte BattleScript_EffectRecharge
.4byte BattleScript_EffectRage
.4byte BattleScript_EffectMimic
.4byte BattleScript_EffectMetronome
.4byte BattleScript_EffectLeechSeed
.4byte BattleScript_EffectDoNothing
.4byte BattleScript_EffectDisable
.4byte BattleScript_EffectLevelDamage
.4byte BattleScript_EffectPsywave
.4byte BattleScript_EffectCounter
.4byte BattleScript_EffectEncore
.4byte BattleScript_EffectPainSplit
.4byte BattleScript_EffectSnore
.4byte BattleScript_EffectConversion2
.4byte BattleScript_EffectLockOn
.4byte BattleScript_EffectSketch
.4byte BattleScript_EffectHammerArm
.4byte BattleScript_EffectSleepTalk
.4byte BattleScript_EffectDestinyBond
.4byte BattleScript_EffectFlail
.4byte BattleScript_EffectSpite
.4byte BattleScript_EffectFalseSwipe
.4byte BattleScript_EffectHealBell
.4byte BattleScript_EffectAlwaysCrit
.4byte BattleScript_EffectTripleKick
.4byte BattleScript_EffectThief
.4byte BattleScript_EffectMeanLook
.4byte BattleScript_EffectNightmare
.4byte BattleScript_EffectMinimize
.4byte BattleScript_EffectCurse
.4byte BattleScript_EffectHealingWish
.4byte BattleScript_EffectProtect
.4byte BattleScript_EffectSpikes
.4byte BattleScript_EffectForesight
.4byte BattleScript_EffectPerishSong
.4byte BattleScript_EffectSandstorm
.4byte BattleScript_EffectEndure
.4byte BattleScript_EffectRollout
.4byte BattleScript_EffectSwagger
.4byte BattleScript_EffectFuryCutter
.4byte BattleScript_EffectAttract
.4byte BattleScript_EffectReturn
.4byte BattleScript_EffectPresent
.4byte BattleScript_EffectFrustration
.4byte BattleScript_EffectSafeguard
.4byte BattleScript_EffectThawHit
.4byte BattleScript_EffectMagnitude
.4byte BattleScript_EffectBatonPass
.4byte BattleScript_EffectPursuit
.4byte BattleScript_EffectRapidSpin
.4byte BattleScript_EffectSonicboom
.4byte BattleScript_EffectCaptivate
.4byte BattleScript_EffectMorningSun
.4byte BattleScript_EffectSynthesis
.4byte BattleScript_EffectMoonlight
.4byte BattleScript_EffectHiddenPower
.4byte BattleScript_EffectRainDance
.4byte BattleScript_EffectSunnyDay
.4byte BattleScript_EffectDefenseUpHit
.4byte BattleScript_EffectAttackUpHit
.4byte BattleScript_EffectAllStatsUpHit
.4byte BattleScript_EffectFellStinger
.4byte BattleScript_EffectBellyDrum
.4byte BattleScript_EffectPsychUp
.4byte BattleScript_EffectMirrorCoat
.4byte BattleScript_EffectSkullBash
.4byte BattleScript_EffectTwister
.4byte BattleScript_EffectEarthquake
.4byte BattleScript_EffectFutureSight
.4byte BattleScript_EffectGust
.4byte BattleScript_EffectStomp
.4byte BattleScript_EffectSolarbeam
.4byte BattleScript_EffectThunder
.4byte BattleScript_EffectTeleport
.4byte BattleScript_EffectBeatUp
.4byte BattleScript_EffectSemiInvulnerable
.4byte BattleScript_EffectDefenseCurl
.4byte BattleScript_EffectSoftboiled
.4byte BattleScript_EffectFakeOut
.4byte BattleScript_EffectUproar
.4byte BattleScript_EffectStockpile
.4byte BattleScript_EffectSpitUp
.4byte BattleScript_EffectSwallow
.4byte BattleScript_EffectWorrySeed
.4byte BattleScript_EffectHail
.4byte BattleScript_EffectTorment
.4byte BattleScript_EffectFlatter
.4byte BattleScript_EffectWillOWisp
.4byte BattleScript_EffectMemento
.4byte BattleScript_EffectFacade
.4byte BattleScript_EffectFocusPunch
.4byte BattleScript_EffectSmellingsalt
.4byte BattleScript_EffectFollowMe
.4byte BattleScript_EffectNaturePower
.4byte BattleScript_EffectCharge
.4byte BattleScript_EffectTaunt
.4byte BattleScript_EffectHelpingHand
.4byte BattleScript_EffectTrick
.4byte BattleScript_EffectRolePlay
.4byte BattleScript_EffectWish
.4byte BattleScript_EffectAssist
.4byte BattleScript_EffectIngrain
.4byte BattleScript_EffectSuperpower
.4byte BattleScript_EffectMagicCoat
.4byte BattleScript_EffectRecycle
.4byte BattleScript_EffectRevenge
.4byte BattleScript_EffectBrickBreak
.4byte BattleScript_EffectYawn
.4byte BattleScript_EffectKnockOff
.4byte BattleScript_EffectEndeavor
.4byte BattleScript_EffectEruption
.4byte BattleScript_EffectSkillSwap
.4byte BattleScript_EffectImprison
.4byte BattleScript_EffectRefresh
.4byte BattleScript_EffectGrudge
.4byte BattleScript_EffectSnatch
.4byte BattleScript_EffectLowKick
.4byte BattleScript_EffectSecretPower
.4byte BattleScript_EffectDoubleEdge
.4byte BattleScript_EffectTeeterDance
.4byte BattleScript_EffectHitEscape
.4byte BattleScript_EffectMudSport
.4byte BattleScript_EffectPoisonFang
.4byte BattleScript_EffectWeatherBall
.4byte BattleScript_EffectOverheat
.4byte BattleScript_EffectTickle
.4byte BattleScript_EffectCosmicPower
.4byte BattleScript_EffectSkyUppercut
.4byte BattleScript_EffectBulkUp
.4byte BattleScript_EffectPlaceholder
.4byte BattleScript_EffectWaterSport
.4byte BattleScript_EffectCalmMind
.4byte BattleScript_EffectDragonDance
.4byte BattleScript_EffectCamouflage
.4byte BattleScript_EffectPledge
.4byte BattleScript_EffectFling
.4byte BattleScript_EffectNaturalGift
.4byte BattleScript_EffectWakeUpSlap
.4byte BattleScript_EffectWringOut
.4byte BattleScript_EffectHex
.4byte BattleScript_EffectAssurance
.4byte BattleScript_EffectTrump_card
.4byte BattleScript_EffectAcrobatics
.4byte BattleScript_EffectHeatCrash
.4byte BattleScript_EffectPunishment
.4byte BattleScript_EffectStoredPower
.4byte BattleScript_EffectElectroBall
.4byte BattleScript_EffectGyroBall
.4byte BattleScript_EffectEchoedVoice
.4byte BattleScript_EffectPayback
.4byte BattleScript_EffectRound
.4byte BattleScript_EffectBrine
.4byte BattleScript_EffectVenoshock
.4byte BattleScript_EffectRetalitate
.4byte BattleScript_EffectBulldoze
.4byte BattleScript_EffectFoulPlay
.4byte BattleScript_EffectPsyshock
.4byte BattleScript_EffectRoost
.4byte BattleScript_EffectGravity
.4byte BattleScript_EffectMircleEye
.4byte BattleScript_EffectTailwind
.4byte BattleScript_EffectEmbargo
.4byte BattleScript_EffectAquaRing
.4byte BattleScript_EffectTrickRoom
.4byte BattleScript_EffectWonderRoom
.4byte BattleScript_EffectMagicRoom
.4byte BattleScript_EffectMagnetRise
.4byte BattleScript_EffectToxicSpikes
.4byte BattleScript_EffectGastroAcid
.4byte BattleScript_EffectStealthRock
.4byte BattleScript_EffectTelekinesis
.4byte BattleScript_EffectPowerSwap
.4byte BattleScript_EffectGuardSwap
.4byte BattleScript_EffectHeartSwap
.4byte BattleScript_EffectPowerSplit
.4byte BattleScript_EffectGuardSplit
.4byte BattleScript_EffectStickyWeb
.4byte BattleScript_EffectMetalBurst
.4byte BattleScript_EffectLuckyChant
.4byte BattleScript_EffectSuckerPunch
.4byte BattleScript_EffectSpecialDefenseDownHit2
.4byte BattleScript_EffectSimpleBeam
.4byte BattleScript_EffectEntrainment
.4byte BattleScript_EffectHealPulse
.4byte BattleScript_EffectQuash
.4byte BattleScript_EffectIonDeluge
.4byte BattleScript_EffectFreezeDry
.4byte BattleScript_EffectTopsyTurvy
.4byte BattleScript_EffectMistyTerrain
.4byte BattleScript_EffectGrassyTerrain
.4byte BattleScript_EffectElectricTerrain
.4byte BattleScript_EffectPsychicTerrain
.4byte BattleScript_EffectAttackAccUp
.4byte BattleScript_EffectAttackSpAttackUp
.4byte BattleScript_EffectHurricane
.4byte BattleScript_EffectTwoTypedMove
.4byte BattleScript_EffectMeFirst
.4byte BattleScript_EffectSpeedUpHit
.4byte BattleScript_EffectQuiverDance
.4byte BattleScript_EffectCoil
.4byte BattleScript_EffectElectrify
.4byte BattleScript_EffectScald
.4byte BattleScript_EffectReflectType
.4byte BattleScript_EffectSoak
.4byte BattleScript_EffectGrowth
.4byte BattleScript_EffectCloseCombat
.4byte BattleScript_EffectLastResort
.4byte BattleScript_EffectRecoil33WithStatus
.4byte BattleScript_EffectFlinchWithStatus
.4byte BattleScript_EffectRecoil50
.4byte BattleScript_EffectShellSmash
.4byte BattleScript_EffectShiftGear
.4byte BattleScript_EffectDefenseUp3
.4byte BattleScript_EffectNobleRoar
.4byte BattleScript_EffectVenomDrench
.4byte BattleScript_EffectToxicThread
.4byte BattleScript_EffectClearSmog
.4byte BattleScript_EffectHitSwitchTarget
.4byte BattleScript_EffectFinalGambit
.4byte BattleScript_EffectTechnoBlast
.4byte BattleScript_EffectJudgment
.4byte BattleScript_EffectAutonomize
.4byte BattleScript_EffectCopycat
.4byte BattleScript_EffectDefog
.4byte BattleScript_EffectHitEnemyHealAlly
.4byte BattleScript_EffectSmackDown
.4byte BattleScript_EffectSynchronoise
.4byte BattleScript_EffectPsychoShift
.4byte BattleScript_EffectPowerTrick
.4byte BattleScript_EffectFlameBurst
.4byte BattleScript_EffectAfterYou
.4byte BattleScript_EffectBestow
.4byte BattleScript_EffectRototiller
.4byte BattleScript_EffectFlowerShield
.4byte BattleScript_EffectHitPreventEscape
.4byte BattleScript_EffectSpeedSwap
.4byte BattleScript_EffectDefenseUp2Hit
.4byte BattleScript_EffectRevelationDance
.4byte BattleScript_EffectAuroraVeil
.4byte BattleScript_EffectThirdType
.4byte BattleScript_EffectFeint
.4byte BattleScript_EffectSparklingAria
.4byte BattleScript_EffectAcupressure
.4byte BattleScript_EffectAromaticMist
.4byte BattleScript_EffectPowder
.4byte BattleScript_EffectSpAtkUpHit
.4byte BattleScript_EffectBelch
.4byte BattleScript_EffectPartingShot
.4byte BattleScript_EffectSpectralThief
.4byte BattleScript_EffectVCreate
.4byte BattleScript_EffectMatBlock
.4byte BattleScript_EffectStompingTantrum
.4byte BattleScript_EffectCoreEnforcer
.4byte BattleScript_EffectInstruct
.4byte BattleScript_EffectThroatChop
.4byte BattleScript_EffectLaserFocus
.4byte BattleScript_EffectMagneticFlux
.4byte BattleScript_EffectGearUp
BattleScript_EffectCoreEnforcer:
setmoveeffect MOVE_EFFECT_CORE_ENFORCER | MOVE_EFFECT_CERTAIN
goto BattleScript_EffectHit
BattleScript_MoveEffectCoreEnforcer::
setgastroacid BattleScript_CoreEnforcerRet
printstring STRINGID_PKMNSABILITYSUPPRESSED
waitmessage 0x40
BattleScript_CoreEnforcerRet:
return
BattleScript_EffectLaserFocus:
attackcanceler
attackstring
ppreduce
setuserstatus3 STATUS3_LASER_FOCUS BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_LASERFOCUS
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectVCreate:
setmoveeffect MOVE_EFFECT_V_CREATE | MOVE_EFFECT_AFFECTS_USER
goto BattleScript_EffectHit
BattleScript_VCreateStatLoss::
jumpifstat BS_ATTACKER, CMP_GREATER_THAN, STAT_DEF, 0x0, BattleScript_VCreateStatAnim
jumpifstat BS_ATTACKER, CMP_GREATER_THAN, STAT_SPDEF, 0x0, BattleScript_VCreateStatAnim
jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_SPEED, 0x0, BattleScript_VCreateStatLossRet
BattleScript_VCreateStatAnim:
setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_ATTACKER, BIT_DEF | BIT_SPDEF | BIT_SPEED, ATK48_STAT_NEGATIVE | ATK48_DONT_CHECK_LOWER
setstatchanger STAT_DEF, 1, TRUE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_NOT_PROTECT_AFFECTED | MOVE_EFFECT_CERTAIN, BattleScript_VCreateTrySpDef
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_VCreateTrySpDef
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_VCreateTrySpDef:
setstatchanger STAT_SPDEF, 1, TRUE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_NOT_PROTECT_AFFECTED | MOVE_EFFECT_CERTAIN, BattleScript_VCreateTrySpeed
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_VCreateTrySpeed
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_VCreateTrySpeed:
setstatchanger STAT_SPEED, 1, TRUE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_NOT_PROTECT_AFFECTED | MOVE_EFFECT_CERTAIN, BattleScript_VCreateStatLossRet
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_VCreateStatLossRet
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_VCreateStatLossRet:
return
BattleScript_SpectralThiefSteal::
printstring STRINGID_SPECTRALTHIEFSTEAL
waitmessage 0x40
setbyte sB_ANIM_ARG2, 0
playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
spectralthiefprintstats
return
BattleScript_EffectSpectralThief:
setmoveeffect MOVE_EFFECT_SPECTRAL_THIEF
goto BattleScript_EffectHit
BattleScript_EffectPartingShot::
attackcanceler
attackstring
ppreduce
jumpifstat BS_TARGET, CMP_GREATER_THAN, STAT_ATK, 0x0, BattleScript_EffectPartingShotTryAtk
jumpifstat BS_TARGET, CMP_EQUAL, STAT_SPATK, 0x0, BattleScript_CantLowerMultipleStats
BattleScript_EffectPartingShotTryAtk:
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackanimation
waitanimation
setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_TARGET, BIT_ATK | BIT_SPATK, ATK48_STAT_NEGATIVE | ATK48_ONLY_MULTIPLE
playstatchangeanimation BS_TARGET, BIT_ATK, ATK48_STAT_NEGATIVE
setstatchanger STAT_ATK, 1, TRUE
statbuffchange STAT_CHANGE_BS_PTR, BattleScript_EffectPartingShotTrySpAtk
printfromtable gStatDownStringIds
waitmessage 0x40
BattleScript_EffectPartingShotTrySpAtk:
playstatchangeanimation BS_TARGET, BIT_SPATK, ATK48_STAT_NEGATIVE
setstatchanger STAT_SPATK, 1, TRUE
statbuffchange STAT_CHANGE_BS_PTR, BattleScript_EffectPartingShotSwitch
printfromtable gStatDownStringIds
waitmessage 0x40
BattleScript_EffectPartingShotSwitch:
moveendall
jumpifcantswitch ATK4F_DONT_CHECK_STATUSES | BS_ATTACKER, BattleScript_PartingShotEnd
openpartyscreen 0x1, BattleScript_PartingShotEnd
switchoutabilities BS_ATTACKER
waitstate
switchhandleorder BS_ATTACKER, 0x2
returntoball BS_ATTACKER
getswitchedmondata BS_ATTACKER
switchindataupdate BS_ATTACKER
hpthresholds BS_ATTACKER
printstring STRINGID_SWITCHINMON
switchinanim BS_ATTACKER, TRUE
waitstate
switchineffects BS_ATTACKER
BattleScript_PartingShotEnd:
end
BattleScript_EffectSpAtkUpHit:
setmoveeffect MOVE_EFFECT_SP_ATK_PLUS_1 | MOVE_EFFECT_AFFECTS_USER
goto BattleScript_EffectHit
BattleScript_EffectPowder:
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, NO_ACC_CALC_CHECK_LOCK_ON
attackstring
ppreduce
jumpifstatus2 BS_TARGET, STATUS2_POWDER, BattleScript_ButItFailed
setpowder BS_TARGET
attackanimation
waitanimation
printstring STRINGID_COVEREDINPOWDER
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectAromaticMist:
attackcanceler
attackstring
ppreduce
jumpifbyteequal gBattlerTarget, gBattlerAttacker, BattleScript_ButItFailed
jumpiftargetally BattleScript_EffectAromaticMistWorks
goto BattleScript_ButItFailed
BattleScript_EffectAromaticMistWorks:
setstatchanger STAT_SPDEF, 1, FALSE
statbuffchange STAT_CHANGE_BS_PTR, BattleScript_EffectAromaticMistEnd
jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_AromaticMistAnim
pause 0x10
printstring STRINGID_TARGETSTATWONTGOHIGHER
waitmessage 0x40
goto BattleScript_EffectAromaticMistEnd
BattleScript_AromaticMistAnim:
attackanimation
waitanimation
setgraphicalstatchangevalues
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_EffectAromaticMistEnd:
goto BattleScript_MoveEnd
BattleScript_EffectMagneticFlux::
attackcanceler
attackstring
ppreduce
setbyte gBattleCommunication, 0x0
BattleScript_EffectMagneticFluxStart:
jumpifability BS_TARGET, ABILITY_MINUS, BattleScript_EffectMagneticFluxCheckStats
jumpifability BS_TARGET, ABILITY_PLUS, BattleScript_EffectMagneticFluxCheckStats
goto BattleScript_EffectMagneticFluxLoop
BattleScript_EffectMagneticFluxCheckStats:
jumpifstat BS_TARGET, CMP_LESS_THAN, STAT_DEF, 0xC, BattleScript_EffectMagneticFluxTryDef
jumpifstat BS_TARGET, CMP_EQUAL, STAT_SPDEF, 0xC, BattleScript_EffectMagneticFluxLoop
BattleScript_EffectMagneticFluxTryDef:
jumpifbyte CMP_NOT_EQUAL, gBattleCommunication, 0x0, BattleScript_EffectMagneticFluxSkipAnim
attackanimation
waitanimation
BattleScript_EffectMagneticFluxSkipAnim:
setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_TARGET, BIT_DEF | BIT_SPDEF, 0x0
setstatchanger STAT_DEF, 1, FALSE
statbuffchange STAT_CHANGE_BS_PTR, BattleScript_EffectMagneticFluxTrySpDef
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_EffectMagneticFluxTrySpDef
addbyte gBattleCommunication, 0x1
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_EffectMagneticFluxTrySpDef:
setstatchanger STAT_SPDEF, 1, FALSE
statbuffchange STAT_CHANGE_BS_PTR, BattleScript_EffectMagneticFluxLoop
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_EffectMagneticFluxLoop
addbyte gBattleCommunication, 0x1
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_EffectMagneticFluxLoop:
jumpifbytenotequal gBattlerTarget, gBattlerAttacker, BattleScript_EffectMagneticFluxEnd
setallytonexttarget BattleScript_EffectMagneticFluxStart
BattleScript_EffectMagneticFluxEnd:
jumpifbyte CMP_NOT_EQUAL, gBattleCommunication, 0x0, BattleScript_MoveEnd
goto BattleScript_ButItFailed
BattleScript_EffectGearUp::
attackcanceler
attackstring
ppreduce
setbyte gBattleCommunication, 0x0
BattleScript_EffectGearUpStart:
jumpifability BS_TARGET, ABILITY_MINUS, BattleScript_EffectGearUpCheckStats
jumpifability BS_TARGET, ABILITY_PLUS, BattleScript_EffectGearUpCheckStats
goto BattleScript_EffectGearUpLoop
BattleScript_EffectGearUpCheckStats:
jumpifstat BS_TARGET, CMP_LESS_THAN, STAT_ATK, 0xC, BattleScript_EffectGearUpTryAtk
jumpifstat BS_TARGET, CMP_EQUAL, STAT_SPATK, 0xC, BattleScript_EffectGearUpLoop
BattleScript_EffectGearUpTryAtk:
jumpifbyte CMP_NOT_EQUAL, gBattleCommunication, 0x0, BattleScript_EffectGearUpSkipAnim
attackanimation
waitanimation
BattleScript_EffectGearUpSkipAnim:
setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_TARGET, BIT_ATK | BIT_SPATK, 0x0
setstatchanger STAT_ATK, 1, FALSE
statbuffchange STAT_CHANGE_BS_PTR, BattleScript_EffectGearUpTrySpAtk
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_EffectGearUpTrySpAtk
addbyte gBattleCommunication, 0x1
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_EffectGearUpTrySpAtk:
setstatchanger STAT_SPATK, 1, FALSE
statbuffchange STAT_CHANGE_BS_PTR, BattleScript_EffectGearUpLoop
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_EffectGearUpLoop
addbyte gBattleCommunication, 0x1
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_EffectGearUpLoop:
jumpifbytenotequal gBattlerTarget, gBattlerAttacker, BattleScript_EffectGearUpEnd
setallytonexttarget BattleScript_EffectGearUpStart
BattleScript_EffectGearUpEnd:
jumpifbyte CMP_NOT_EQUAL, gBattleCommunication, 0x0, BattleScript_MoveEnd
goto BattleScript_ButItFailed
BattleScript_EffectAcupressure:
attackcanceler
jumpifbyteequal gBattlerTarget, gBattlerAttacker, BattleScript_EffectAcupressureTry
jumpifstatus2 BS_TARGET, STATUS2_SUBSTITUTE, BattleScript_PrintMoveMissed
BattleScript_EffectAcupressureTry:
attackstring
ppreduce
tryaccupressure BS_TARGET, BattleScript_ButItFailed
setgraphicalstatchangevalues
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
statbuffchange MOVE_EFFECT_CERTAIN, BattleScript_MoveEnd
printstring STRINGID_PKMNSSTATCHANGED2
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_MoveEffectFeint::
printstring STRINGID_FELLFORFEINT
waitmessage 0x40
return
BattleScript_EffectFeint:
setmoveeffect MOVE_EFFECT_FEINT
goto BattleScript_EffectHit
BattleScript_EffectThirdType:
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
trysetthirdtype BS_TARGET, BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_THIRDTYPEADDED
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectDefenseUp2Hit:
setmoveeffect MOVE_EFFECT_DEF_PLUS_2 | MOVE_EFFECT_AFFECTS_USER
goto BattleScript_EffectHit
BattleScript_EffectFlowerShield:
attackcanceler
attackstring
ppreduce
selectfirstvalidtarget
BattleScript_FlowerShieldIsAnyGrass:
jumpiftype BS_TARGET, TYPE_GRASS, BattleScript_FlowerShieldLoopStart
jumpifnexttargetvalid BattleScript_FlowerShieldIsAnyGrass
goto BattleScript_ButItFailed
BattleScript_FlowerShieldLoopStart:
selectfirstvalidtarget
BattleScript_FlowerShieldLoop:
movevaluescleanup
jumpiftype BS_TARGET, TYPE_GRASS, BattleScript_FlowerShieldLoop2
goto BattleScript_FlowerShieldMoveTargetEnd
BattleScript_FlowerShieldLoop2:
setstatchanger STAT_DEF, 1, FALSE
statbuffchange STAT_CHANGE_BS_PTR, BattleScript_FlowerShieldMoveTargetEnd
jumpifbyte CMP_LESS_THAN, cMULTISTRING_CHOOSER, 0x2, BattleScript_FlowerShieldDoAnim
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x3, BattleScript_FlowerShieldMoveTargetEnd
pause 0x15
goto BattleScript_FlowerShieldString
BattleScript_FlowerShieldDoAnim:
attackanimation
waitanimation
setgraphicalstatchangevalues
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
BattleScript_FlowerShieldString:
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_FlowerShieldMoveTargetEnd:
moveendto ATK49_NEXT_TARGET
jumpifnexttargetvalid BattleScript_FlowerShieldLoop
end
BattleScript_EffectRototiller:
attackcanceler
attackstring
ppreduce
selectfirstvalidtarget
BattleScript_RototillerLoop:
movevaluescleanup
jumpifnotgrounded BS_TARGET, BattleScript_RototillerNoEffect
jumpiftype BS_TARGET, TYPE_GRASS, BattleScript_RototillerLoop2
BattleScript_RototillerNoEffect:
pause 0x20
printstring STRINGID_NOEFFECTONTARGET
waitmessage 0x40
goto BattleScript_RototillerMoveTargetEnd
BattleScript_RototillerLoop2:
jumpifstat BS_TARGET, CMP_LESS_THAN, STAT_ATK, 0xC, BattleScript_RototillerDoMoveAnim
jumpifstat BS_TARGET, CMP_EQUAL, STAT_SPATK, 0xC, BattleScript_RototillerCantRaiseMultipleStats
BattleScript_RototillerDoMoveAnim::
attackanimation
waitanimation
setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_TARGET, BIT_ATK | BIT_SPATK, 0x0
setstatchanger STAT_ATK, 1, FALSE
statbuffchange STAT_CHANGE_BS_PTR, BattleScript_RototillerTrySpAtk
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_RototillerTrySpAtk
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_RototillerTrySpAtk::
setstatchanger STAT_SPATK, 1, FALSE
statbuffchange STAT_CHANGE_BS_PTR, BattleScript_RototillerMoveTargetEnd
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_RototillerMoveTargetEnd
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_RototillerMoveTargetEnd:
moveendto ATK49_NEXT_TARGET
jumpifnexttargetvalid BattleScript_RototillerLoop
end
BattleScript_RototillerCantRaiseMultipleStats:
printstring STRINGID_STATSWONTINCREASE2
waitmessage 0x40
goto BattleScript_RototillerMoveTargetEnd
BattleScript_EffectBestow:
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, NO_ACC_CALC_CHECK_LOCK_ON
attackstring
ppreduce
jumpifsubstituteblocks BattleScript_ButItFailed
trybestow BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_BESTOWITEMGIVING
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectAfterYou:
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
tryafteryou BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_KINDOFFER
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectFlameBurst:
setmoveeffect MOVE_EFFECT_FLAME_BURST | MOVE_EFFECT_AFFECTS_USER
goto BattleScript_EffectHit
BattleScript_MoveEffectFlameBurst::
printstring STRINGID_BURSTINGFLAMESHIT
waitmessage 0x40
healthbarupdate BS_SCRIPTING
datahpupdate BS_SCRIPTING
tryfaintmon BS_SCRIPTING, FALSE, NULL
return
BattleScript_EffectPowerTrick:
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
powertrick BS_ATTACKER
attackanimation
waitanimation
printstring STRINGID_PKMNSWITCHEDATKANDDEF
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectPsychoShift:
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
jumpifstatus BS_ATTACKER, STATUS1_ANY, BattleScript_EffectPsychoShiftCanWork
goto BattleScript_ButItFailed
BattleScript_EffectPsychoShiftCanWork:
jumpifstatus BS_TARGET, STATUS1_ANY, BattleScript_ButItFailed
jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, BattleScript_SafeguardProtected
trypsychoshift BattleScript_MoveEnd
attackanimation
waitanimation
printfromtable gStatusConditionsStringIds
waitmessage 0x40
statusanimation BS_TARGET
updatestatusicon BS_TARGET
curestatus BS_ATTACKER
printstring STRINGID_PKMNSTATUSNORMAL
waitmessage 0x40
updatestatusicon BS_ATTACKER
goto BattleScript_MoveEnd
BattleScript_EffectSynchronoise:
attackcanceler
attackstring
ppreduce
selectfirstvalidtarget
BattleScript_SynchronoiseLoop:
movevaluescleanup
jumpifcantusesynchronoise BattleScript_SynchronoiseNoEffect
accuracycheck BattleScript_SynchronoiseMissed, ACC_CURR_MOVE
critcalc
damagecalc
adjustdamage
attackanimation
waitanimation
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
printstring STRINGID_EMPTYSTRING3
waitmessage 0x1
tryfaintmon BS_TARGET, FALSE, NULL
BattleScript_SynchronoiseMoveTargetEnd:
moveendto ATK49_NEXT_TARGET
jumpifnexttargetvalid BattleScript_SynchronoiseLoop
end
BattleScript_SynchronoiseMissed:
pause 0x20
resultmessage
waitmessage 0x40
goto BattleScript_SynchronoiseMoveTargetEnd
BattleScript_SynchronoiseNoEffect:
pause 0x20
printstring STRINGID_NOEFFECTONTARGET
waitmessage 0x40
goto BattleScript_SynchronoiseMoveTargetEnd
BattleScript_EffectSmackDown:
setmoveeffect MOVE_EFFECT_SMACK_DOWN
goto BattleScript_EffectHit
BattleScript_MoveEffectSmackDown::
printstring STRINGID_FELLSTRAIGHTDOWN
waitmessage 0x40
return
BattleScript_EffectHitEnemyHealAlly:
jumpiftargetally BattleScript_EffectHealPulse
goto BattleScript_EffectHit
BattleScript_EffectDefog:
setstatchanger STAT_EVASION, 1, TRUE
attackcanceler
jumpifsubstituteblocks BattleScript_DefogIfCanClearHazards
jumpifstat BS_TARGET, CMP_NOT_EQUAL, STAT_EVASION, 0x0, BattleScript_DefogWorks
BattleScript_DefogIfCanClearHazards:
defogclear BS_ATTACKER, FALSE, BattleScript_ButItFailedAtkStringPpReduce
BattleScript_DefogWorks:
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
statbuffchange STAT_CHANGE_BS_PTR, BattleScript_DefogTryHazardsWithAnim
jumpifbyte CMP_LESS_THAN, cMULTISTRING_CHOOSER, 0x2, BattleScript_DefogDoAnim
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x3, BattleScript_DefogTryHazardsWithAnim
pause 0x20
goto BattleScript_DefogPrintString
BattleScript_DefogDoAnim::
attackanimation
waitanimation
setgraphicalstatchangevalues
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
BattleScript_DefogPrintString::
printfromtable gStatDownStringIds
waitmessage 0x40
BattleScript_DefogTryHazards::
copybyte gEffectBattler, gBattlerAttacker
defogclear BS_ATTACKER, TRUE, NULL
copybyte gBattlerAttacker, gEffectBattler
goto BattleScript_MoveEnd
BattleScript_DefogTryHazardsWithAnim:
attackanimation
waitanimation
goto BattleScript_DefogTryHazards
BattleScript_EffectCopycat:
attackcanceler
attackstring
pause 0x5
trycopycat BattleScript_CopycatFail
attackanimation
waitanimation
jumptocalledmove TRUE
BattleScript_CopycatFail:
ppreduce
goto BattleScript_ButItFailed
BattleScript_EffectInstruct:
attackcanceler
attackstring
ppreduce
pause 0x5
tryinstruct BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_USEDINSTRUCTEDMOVE
waitmessage 0x40
setbyte sB_ANIM_TURN, 0x0
setbyte sB_ANIM_TARGETS_HIT, 0x0
jumptocalledmove TRUE
BattleScript_EffectAutonomize:
setstatchanger STAT_SPEED, 2, FALSE
attackcanceler
attackstring
ppreduce
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_AutonomizeWeightLoss
jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_AutonomizeAttackAnim
pause 0x20
goto BattleScript_AutonomizePrintString
BattleScript_AutonomizeAttackAnim::
attackanimation
waitanimation
BattleScript_AutonomizeDoAnim::
setgraphicalstatchangevalues
playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
BattleScript_AutonomizePrintString::
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_AutonomizeWeightLoss::
jumpifmovehadnoeffect BattleScript_MoveEnd
tryautonomize BS_ATTACKER, BattleScript_MoveEnd
printstring STRINGID_BECAMENIMBLE
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectFinalGambit:
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
critcalc
typecalc
bichalfword gMoveResultFlags, MOVE_RESULT_SUPER_EFFECTIVE | MOVE_RESULT_NOT_VERY_EFFECTIVE
dmgtocurrattackerhp
adjustdamage
attackanimation
waitanimation
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
seteffectwithchance
tryfaintmon BS_TARGET, FALSE, NULL
jumpifmovehadnoeffect BattleScript_MoveEnd
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
tryfaintmon BS_ATTACKER, FALSE, NULL
goto BattleScript_MoveEnd
BattleScript_EffectHitSwitchTarget:
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
critcalc
damagecalc
adjustdamage
attackanimation
waitanimation
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
tryfaintmon BS_TARGET, FALSE, NULL
jumpifability BS_TARGET, ABILITY_SUCTION_CUPS, BattleScript_AbilityPreventsPhasingOut
jumpifstatus3 BS_TARGET, STATUS3_ROOTED, BattleScript_PrintMonIsRooted
tryhitswitchtarget BattleScript_EffectHitSwitchTargetMoveEnd
BattleScript_EffectHitSwitchTargetMoveEnd:
moveendall
end
BattleScript_EffectClearSmog:
setmoveeffect MOVE_EFFECT_CLEAR_SMOG
goto BattleScript_EffectHit
BattleScript_EffectToxicThread:
setstatchanger STAT_SPEED, 2, TRUE
attackcanceler
jumpifsubstituteblocks BattleScript_ButItFailedAtkStringPpReduce
jumpifstat BS_TARGET, CMP_NOT_EQUAL, STAT_SPEED, 0x0, BattleScript_ToxicThreadWorks
jumpifstatus BS_TARGET, STATUS1_PSN_ANY, BattleScript_ButItFailedAtkStringPpReduce
BattleScript_ToxicThreadWorks:
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
statbuffchange STAT_CHANGE_BS_PTR, BattleScript_ToxicThreadTryPsn
jumpifbyte CMP_LESS_THAN, cMULTISTRING_CHOOSER, 0x2, BattleScript_ToxicThreadDoAnim
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x3, BattleScript_ToxicThreadTryPsn
pause 0x20
goto BattleScript_ToxicThreadPrintString
BattleScript_ToxicThreadDoAnim::
attackanimation
waitanimation
setgraphicalstatchangevalues
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
BattleScript_ToxicThreadPrintString::
printfromtable gStatDownStringIds
waitmessage 0x40
BattleScript_ToxicThreadTryPsn::
setmoveeffect MOVE_EFFECT_POISON
seteffectprimary
goto BattleScript_MoveEnd
BattleScript_EffectVenomDrench:
attackcanceler
attackstring
ppreduce
jumpifstatus BS_TARGET, STATUS1_PSN_ANY, BattleScript_EffectVenomDrenchCanBeUsed
goto BattleScript_ButItFailed
BattleScript_EffectVenomDrenchCanBeUsed:
jumpifstat BS_TARGET, CMP_GREATER_THAN, STAT_ATK, 0x0, BattleScript_VenomDrenchDoMoveAnim
jumpifstat BS_TARGET, CMP_GREATER_THAN, STAT_SPATK, 0x0, BattleScript_VenomDrenchDoMoveAnim
jumpifstat BS_TARGET, CMP_EQUAL, STAT_SPEED, 0x0, BattleScript_CantLowerMultipleStats
BattleScript_VenomDrenchDoMoveAnim::
accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE
attackanimation
waitanimation
setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_TARGET, BIT_ATK | BIT_SPATK | BIT_SPEED, ATK48_STAT_NEGATIVE | ATK48_ONLY_MULTIPLE
playstatchangeanimation BS_TARGET, BIT_ATK, ATK48_STAT_NEGATIVE
setstatchanger STAT_ATK, 1, TRUE
statbuffchange STAT_CHANGE_BS_PTR, BattleScript_VenomDrenchTryLowerSpAtk
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_VenomDrenchTryLowerSpAtk
printfromtable gStatDownStringIds
waitmessage 0x40
BattleScript_VenomDrenchTryLowerSpAtk::
playstatchangeanimation BS_TARGET, BIT_SPATK, ATK48_STAT_NEGATIVE
setstatchanger STAT_SPATK, 1, TRUE
statbuffchange STAT_CHANGE_BS_PTR, BattleScript_VenomDrenchTryLowerSpeed
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_VenomDrenchTryLowerSpeed
printfromtable gStatDownStringIds
waitmessage 0x40
BattleScript_VenomDrenchTryLowerSpeed::
playstatchangeanimation BS_TARGET, BIT_SPEED, ATK48_STAT_NEGATIVE
setstatchanger STAT_SPEED, 1, TRUE
statbuffchange STAT_CHANGE_BS_PTR, BattleScript_VenomDrenchEnd
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_VenomDrenchEnd
printfromtable gStatDownStringIds
waitmessage 0x40
BattleScript_VenomDrenchEnd::
goto BattleScript_MoveEnd
BattleScript_EffectNobleRoar:
attackcanceler
attackstring
ppreduce
jumpifstat BS_TARGET, CMP_GREATER_THAN, STAT_ATK, 0x0, BattleScript_NobleRoarDoMoveAnim
jumpifstat BS_TARGET, CMP_EQUAL, STAT_SPATK, 0x0, BattleScript_CantLowerMultipleStats
BattleScript_NobleRoarDoMoveAnim::
accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE
attackanimation
waitanimation
setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_TARGET, BIT_ATK | BIT_SPATK, ATK48_STAT_NEGATIVE | ATK48_ONLY_MULTIPLE
playstatchangeanimation BS_TARGET, BIT_ATK, ATK48_STAT_NEGATIVE
setstatchanger STAT_ATK, 1, TRUE
statbuffchange STAT_CHANGE_BS_PTR, BattleScript_NobleRoarTryLowerSpAtk
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_NobleRoarTryLowerSpAtk
printfromtable gStatDownStringIds
waitmessage 0x40
BattleScript_NobleRoarTryLowerSpAtk::
playstatchangeanimation BS_TARGET, BIT_SPATK, ATK48_STAT_NEGATIVE
setstatchanger STAT_SPATK, 1, TRUE
statbuffchange STAT_CHANGE_BS_PTR, BattleScript_NobleRoarEnd
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_NobleRoarEnd
printfromtable gStatDownStringIds
waitmessage 0x40
BattleScript_NobleRoarEnd::
goto BattleScript_MoveEnd
BattleScript_EffectShellSmash:
attackcanceler
attackstring
ppreduce
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_ATK, 0xC, BattleScript_ShellSmashTryDef
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_SPATK, 0xC, BattleScript_ShellSmashTryDef
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_SPEED, 0xC, BattleScript_ShellSmashTryDef
jumpifstat BS_ATTACKER, CMP_GREATER_THAN, STAT_DEF, 0, BattleScript_ShellSmashTryDef
jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_SPDEF, 0, BattleScript_ButItFailed
BattleScript_ShellSmashTryDef::
attackanimation
waitanimation
setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_ATTACKER, BIT_DEF | BIT_SPDEF, ATK48_STAT_NEGATIVE | ATK48_DONT_CHECK_LOWER
setstatchanger STAT_DEF, 1, TRUE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_ShellSmashTrySpDef
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_ShellSmashTrySpDef
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_ShellSmashTrySpDef:
setstatchanger STAT_SPDEF, 1, TRUE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_ShellSmashTryAttack
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_ShellSmashTryAttack
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_ShellSmashTryAttack:
setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_ATTACKER, BIT_SPATK | BIT_ATK | BIT_SPEED, ATK48_STAT_BY_TWO
setstatchanger STAT_ATK, 2, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_ShellSmashTrySpAtk
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_ShellSmashTrySpAtk
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_ShellSmashTrySpAtk:
setstatchanger STAT_SPATK, 2, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_ShellSmashTrySpeed
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_ShellSmashTrySpeed
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_ShellSmashTrySpeed:
setstatchanger STAT_SPEED, 2, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_ShellSmashEnd
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_ShellSmashEnd
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_ShellSmashEnd:
goto BattleScript_MoveEnd
BattleScript_EffectLastResort:
attackcanceler
attackstring
ppreduce
jumpifcantuselastresort BS_ATTACKER, BattleScript_ButItFailed
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
goto BattleScript_HitFromCritCalc
BattleScript_EffectGrowth:
attackcanceler
attackstring
ppreduce
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_ATK, 0xC, BattleScript_GrowthDoMoveAnim
jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_SPATK, 0xC, BattleScript_CantRaiseMultipleStats
BattleScript_GrowthDoMoveAnim::
attackanimation
waitanimation
setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_SPATK, 0x0
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_SUN_ANY, BattleScript_GrowthAtk2
setstatchanger STAT_ATK, 1, FALSE
goto BattleScript_GrowthAtk
BattleScript_GrowthAtk2:
setstatchanger STAT_ATK, 2, FALSE
BattleScript_GrowthAtk:
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_GrowthTrySpAtk
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_GrowthTrySpAtk
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_GrowthTrySpAtk::
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_SUN_ANY, BattleScript_GrowthSpAtk2
setstatchanger STAT_SPATK, 1, FALSE
goto BattleScript_GrowthSpAtk
BattleScript_GrowthSpAtk2:
setstatchanger STAT_SPATK, 2, FALSE
BattleScript_GrowthSpAtk:
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_GrowthEnd
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_GrowthEnd
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_GrowthEnd:
goto BattleScript_MoveEnd
BattleScript_EffectSoak:
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
jumpifability BS_TARGET, ABILITY_MULTITYPE, BattleScript_ButItFailed
jumpifability BS_TARGET, ABILITY_RKS_SYSTEM, BattleScript_ButItFailed
jumpifsubstituteblocks BattleScript_ButItFailed
attackanimation
waitanimation
trysoak BattleScript_ButItFailed
printstring STRINGID_TRANSFORMEDINTOWATERTYPE
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectReflectType:
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
tryreflecttype BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_REFLECTTARGETSTYPE
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectElectrify:
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
tryelectrify BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_TARGETELECTRIFIED
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectShiftGear:
attackcanceler
attackstring
ppreduce
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_SPEED, 0xC, BattleScript_ShiftGearDoMoveAnim
jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_ATK, 0xC, BattleScript_CantRaiseMultipleStats
BattleScript_ShiftGearDoMoveAnim:
attackanimation
waitanimation
setbyte sSTAT_ANIM_PLAYED, FALSE
jumpifstat BS_ATTACKER, CMP_GREATER_THAN, STAT_SPEED, 0xA, BattleScript_ShiftGearSpeedBy1
playstatchangeanimation BS_ATTACKER, BIT_SPEED | BIT_ATK, ATK48_STAT_BY_TWO
setstatchanger STAT_SPEED, 2, FALSE
goto BattleScript_ShiftGearDoSpeed
BattleScript_ShiftGearSpeedBy1:
playstatchangeanimation BS_ATTACKER, BIT_SPEED | BIT_ATK, 0x0
setstatchanger STAT_SPEED, 1, FALSE
BattleScript_ShiftGearDoSpeed:
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_ShiftGearTryAtk
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_ShiftGearTryAtk
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_ShiftGearTryAtk:
setstatchanger STAT_ATK, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_ShiftGearEnd
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_ShiftGearEnd
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_ShiftGearEnd:
goto BattleScript_MoveEnd
BattleScript_EffectCoil:
attackcanceler
attackstring
ppreduce
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_ATK, 0xC, BattleScript_CoilDoMoveAnim
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_DEF, 0xC, BattleScript_CoilDoMoveAnim
jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_ACC, 0xC, BattleScript_CantRaiseMultipleStats
BattleScript_CoilDoMoveAnim:
attackanimation
waitanimation
setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_DEF | BIT_ACC, 0x0
setstatchanger STAT_ATK, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_CoilTryDef
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_CoilTryDef
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_CoilTryDef:
setstatchanger STAT_DEF, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_CoilTryAcc
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_CoilTryAcc
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_CoilTryAcc:
setstatchanger STAT_ACC, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_CoilEnd
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_CoilEnd
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_CoilEnd:
goto BattleScript_MoveEnd
BattleScript_EffectQuiverDance:
attackcanceler
attackstring
ppreduce
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_SPATK, 0xC, BattleScript_QuiverDanceDoMoveAnim
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_SPDEF, 0xC, BattleScript_QuiverDanceDoMoveAnim
jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_SPEED, 0xC, BattleScript_CantRaiseMultipleStats
BattleScript_QuiverDanceDoMoveAnim::
attackanimation
waitanimation
setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_ATTACKER, BIT_SPATK | BIT_SPDEF | BIT_SPEED, 0x0
setstatchanger STAT_SPATK, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_QuiverDanceTrySpDef
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_QuiverDanceTrySpDef
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_QuiverDanceTrySpDef::
setstatchanger STAT_SPDEF, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_QuiverDanceTrySpeed
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_QuiverDanceTrySpeed
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_QuiverDanceTrySpeed::
setstatchanger STAT_SPEED, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_QuiverDanceEnd
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_QuiverDanceEnd
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_QuiverDanceEnd::
goto BattleScript_MoveEnd
BattleScript_EffectSpeedUpHit:
setmoveeffect MOVE_EFFECT_SPD_PLUS_1 | MOVE_EFFECT_AFFECTS_USER
goto BattleScript_EffectHit
BattleScript_EffectMeFirst:
attackcanceler
attackstring
trymefirst BattleScript_ButItFailedPpReduce
attackanimation
waitanimation
setbyte sB_ANIM_TURN, 0x0
setbyte sB_ANIM_TARGETS_HIT, 0x0
jumptocalledmove TRUE
BattleScript_EffectAttackSpAttackUp:
attackcanceler
attackstring
ppreduce
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_ATK, 0xC, BattleScript_AttackSpAttackUpDoMoveAnim
jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_SPATK, 0xC, BattleScript_CantRaiseMultipleStats
BattleScript_AttackSpAttackUpDoMoveAnim::
attackanimation
waitanimation
setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_SPATK, 0x0
setstatchanger STAT_ATK, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_AttackSpAttackUpTrySpAtk
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_AttackSpAttackUpTrySpAtk
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_AttackSpAttackUpTrySpAtk::
setstatchanger STAT_SPATK, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_AttackSpAttackUpEnd
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_AttackSpAttackUpEnd
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_AttackSpAttackUpEnd:
goto BattleScript_MoveEnd
BattleScript_EffectAttackAccUp:
attackcanceler
attackstring
ppreduce
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_ATK, 0xC, BattleScript_AttackAccUpDoMoveAnim
jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_ACC, 0xC, BattleScript_CantRaiseMultipleStats
BattleScript_AttackAccUpDoMoveAnim::
attackanimation
waitanimation
setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_ATTACKER, BIT_SPATK | BIT_SPDEF, 0x0
setstatchanger STAT_ATK, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_AttackAccUpTrySpDef
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_AttackAccUpTrySpDef
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_AttackAccUpTrySpDef::
setstatchanger STAT_ACC, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_AttackAccUpEnd
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_AttackAccUpEnd
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_AttackAccUpEnd:
goto BattleScript_MoveEnd
BattleScript_EffectMistyTerrain:
BattleScript_EffectGrassyTerrain:
BattleScript_EffectElectricTerrain:
BattleScript_EffectPsychicTerrain:
attackcanceler
attackstring
ppreduce
setterrain BattleScript_ButItFailed
attackanimation
waitanimation
printfromtable gTerrainStringIds
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectTopsyTurvy:
attackcanceler
attackstring
ppreduce
accuracycheck BattleScript_ButItFailed, NO_ACC_CALC_CHECK_LOCK_ON
jumpifstat BS_TARGET, CMP_NOT_EQUAL, STAT_ATK, 6, BattleScript_EffectTopsyTurvyWorks
jumpifstat BS_TARGET, CMP_NOT_EQUAL, STAT_DEF, 6, BattleScript_EffectTopsyTurvyWorks
jumpifstat BS_TARGET, CMP_NOT_EQUAL, STAT_SPATK, 6, BattleScript_EffectTopsyTurvyWorks
jumpifstat BS_TARGET, CMP_NOT_EQUAL, STAT_SPDEF, 6, BattleScript_EffectTopsyTurvyWorks
jumpifstat BS_TARGET, CMP_NOT_EQUAL, STAT_SPEED, 6, BattleScript_EffectTopsyTurvyWorks
jumpifstat BS_TARGET, CMP_NOT_EQUAL, STAT_ACC, 6, BattleScript_EffectTopsyTurvyWorks
jumpifstat BS_TARGET, CMP_EQUAL, STAT_EVASION, 6, BattleScript_ButItFailed
BattleScript_EffectTopsyTurvyWorks:
attackanimation
waitanimation
invertstatstages BS_TARGET
printstring STRINGID_TOPSYTURVYSWITCHEDSTATS
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectIonDeluge:
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
orword gFieldStatuses, STATUS_FIELD_ION_DELUGE
attackanimation
waitanimation
printstring STRINGID_IONDELUGEON
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectQuash:
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
tryquash BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_QUASHSUCCESS
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectHealPulse:
attackcanceler
attackstring
ppreduce
accuracycheck BattleScript_ButItFailed, NO_ACC_CALC_CHECK_LOCK_ON
jumpifsubstituteblocks BattleScript_ButItFailed
tryhealpulse BS_TARGET, BattleScript_AlreadyAtFullHp
attackanimation
waitanimation
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
printstring STRINGID_PKMNREGAINEDHEALTH
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectEntrainment:
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
tryentrainment BattleScript_ButItFailed
attackanimation
waitanimation
setlastusedability BS_TARGET
printstring STRINGID_PKMNACQUIREDABILITY
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectSimpleBeam:
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
setabilitysimple BS_TARGET, BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_PKMNACQUIREDSIMPLE
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectSuckerPunch:
attackcanceler
suckerpunchcheck BattleScript_ButItFailedAtkStringPpReduce
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
goto BattleScript_HitFromAtkString
BattleScript_EffectLuckyChant:
attackcanceler
attackstring
ppreduce
setluckychant BS_ATTACKER, BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_SHIELDEDFROMCRITICALHITS
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectMetalBurst:
attackcanceler
metalburstdamagecalculator BattleScript_ButItFailedAtkStringPpReduce
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
typecalc
bichalfword gMoveResultFlags, MOVE_RESULT_NOT_VERY_EFFECTIVE | MOVE_RESULT_SUPER_EFFECTIVE
adjustdamage
goto BattleScript_HitFromAtkAnimation
BattleScript_EffectHealingWish:
attackcanceler
attackstring
ppreduce
attackanimation
waitanimation
instanthpdrop BS_ATTACKER
setatkhptozero
tryfaintmon BS_ATTACKER, FALSE, NULL
jumpifcantswitch ATK4F_DONT_CHECK_STATUSES | BS_ATTACKER, BattleScript_EffectHealingWishEnd
openpartyscreen 0x1, BattleScript_EffectHealingWishEnd
switchoutabilities BS_ATTACKER
waitstate
switchhandleorder BS_ATTACKER, 0x2
returnatktoball
getswitchedmondata BS_ATTACKER
switchindataupdate BS_ATTACKER
hpthresholds BS_ATTACKER
printstring STRINGID_SWITCHINMON
switchinanim BS_ATTACKER, TRUE
waitstate
setbyte cMULTISTRING_CHOOSER 0
jumpifnotchosenmove MOVE_LUNAR_DANCE BattleScript_EffectHealingWishNewMon
setbyte cMULTISTRING_CHOOSER 1
restorepp BS_ATTACKER
BattleScript_EffectHealingWishNewMon:
printfromtable gHealingWishStringIds
waitmessage 0x40
playanimation BS_ATTACKER, B_ANIM_WISH_HEAL, NULL
waitanimation
dmgtomaxattackerhp
manipulatedamage ATK80_DMG_CHANGE_SIGN
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
clearstatus BS_ATTACKER
waitstate
updatestatusicon BS_ATTACKER
waitstate
printstring STRINGID_HEALINGWISHHEALED
waitmessage 0x40
switchineffects BS_ATTACKER
BattleScript_EffectHealingWishEnd:
moveendall
end
BattleScript_EffectWorrySeed:
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
tryworryseed BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_PKMNACQUIREDABILITY
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectPowerSplit:
attackcanceler
attackstring
ppreduce
accuracycheck BattleScript_ButItFailed, NO_ACC_CALC_CHECK_LOCK_ON
averagestats STAT_ATK
averagestats STAT_SPATK
attackanimation
waitanimation
printstring STRINGID_SHAREDITSPOWER
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectGuardSplit:
attackcanceler
attackstring
ppreduce
accuracycheck BattleScript_ButItFailed, NO_ACC_CALC_CHECK_LOCK_ON
averagestats STAT_DEF
averagestats STAT_SPDEF
attackanimation
waitanimation
printstring STRINGID_SHAREDITSGUARD
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectHeartSwap:
attackcanceler
attackstring
ppreduce
accuracycheck BattleScript_ButItFailed, NO_ACC_CALC_CHECK_LOCK_ON
swapstatstages STAT_ATK
swapstatstages STAT_DEF
swapstatstages STAT_SPEED
swapstatstages STAT_SPATK
swapstatstages STAT_SPDEF
swapstatstages STAT_EVASION
swapstatstages STAT_ACC
attackanimation
waitanimation
printstring STRINGID_PKMNSWITCHEDSTATCHANGES
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectPowerSwap:
attackcanceler
attackstring
ppreduce
accuracycheck BattleScript_ButItFailed, NO_ACC_CALC_CHECK_LOCK_ON
swapstatstages STAT_ATK
swapstatstages STAT_SPATK
attackanimation
waitanimation
printstring STRINGID_PKMNSWITCHEDSTATCHANGES
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectGuardSwap:
attackcanceler
attackstring
ppreduce
accuracycheck BattleScript_ButItFailed, NO_ACC_CALC_CHECK_LOCK_ON
swapstatstages STAT_DEF
swapstatstages STAT_SPDEF
attackanimation
waitanimation
printstring STRINGID_PKMNSWITCHEDSTATCHANGES
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectSpeedSwap:
attackcanceler
attackstring
ppreduce
accuracycheck BattleScript_ButItFailed, NO_ACC_CALC_CHECK_LOCK_ON
swapstatstages STAT_SPEED
attackanimation
waitanimation
printstring STRINGID_PKMNSWITCHEDSTATCHANGES
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectTelekinesis:
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, NO_ACC_CALC_CHECK_LOCK_ON
attackstring
ppreduce
settelekinesis BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_PKMNIDENTIFIED
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectStealthRock:
attackcanceler
attackstring
ppreduce
setstealthrock BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_POINTEDSTONESFLOAT
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectStickyWeb:
attackcanceler
attackstring
ppreduce
setstickyweb BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_STICKYWEBUSED
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectGastroAcid:
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
setgastroacid BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_PKMNSABILITYSUPPRESSED
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectToxicSpikes:
attackcanceler
attackstring
ppreduce
settoxicspikes BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_POISONSPIKESSCATTERED
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectMagnetRise:
attackcanceler
attackstring
ppreduce
setuserstatus3 STATUS3_MAGNET_RISE BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_PKMNLEVITATEDONELECTROMAGNETISM
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectTrickRoom:
BattleScript_EffectWonderRoom:
BattleScript_EffectMagicRoom:
attackcanceler
attackstring
ppreduce
setroom
attackanimation
waitanimation
printfromtable gRoomsStringIds
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectAquaRing:
attackcanceler
attackstring
ppreduce
setuserstatus3 STATUS3_AQUA_RING BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_PKMNSURROUNDEDWITHVEILOFWATER
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectEmbargo:
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
setembargo BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_PKMNCANTUSEITEMSANYMORE
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectTailwind:
attackcanceler
attackstring
ppreduce
settailwind BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_TAILWINDBLEW
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectMircleEye:
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
setmiracleeye BattleScript_ButItFailed
goto BattleScript_IdentifiedFoe
BattleScript_EffectGravity:
attackcanceler
attackstring
ppreduce
setgravity BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_GRAVITYINTENSIFIED
waitmessage 0x40
selectfirstvalidtarget
BattleScript_GravityLoop:
movevaluescleanup
jumpifstatus3 BS_TARGET, STATUS3_ON_AIR | STATUS3_MAGNET_RISE | STATUS3_TELEKINESIS, BattleScript_GravityLoopDrop
goto BattleScript_GravityLoopEnd
BattleScript_GravityLoopDrop:
bringdownairbornebattler BS_TARGET
printstring STRINGID_GRAVITYGROUNDING
waitmessage 0x40
BattleScript_GravityLoopEnd:
moveendto ATK49_NEXT_TARGET
jumpifnexttargetvalid BattleScript_GravityLoop
end
BattleScript_EffectRoost:
attackcanceler
attackstring
ppreduce
tryhealhalfhealth BattleScript_AlreadyAtFullHp, BS_TARGET
setroost
goto BattleScript_PresentHealTarget
BattleScript_EffectCaptivate:
setstatchanger STAT_SPATK, 2, TRUE
attackcanceler
jumpifsubstituteblocks BattleScript_ButItFailedAtkStringPpReduce
jumpifoppositegenders BattleScript_CaptivateCheckAcc
goto BattleScript_ButItFailedAtkStringPpReduce
BattleScript_CaptivateCheckAcc:
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
goto BattleScript_StatDownFromAttackString
BattleScript_EffectHealBlock:
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
jumpifability BS_TARGET_SIDE, ABILITY_AROMA_VEIL, BattleScript_AromaVeilProtects
sethealblock BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_PKMNPREVENTEDFROMHEALING
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectThroatChop:
jumpifsubstituteblocks BattleScript_EffectHit
setmoveeffect MOVE_EFFECT_THROAT_CHOP | MOVE_EFFECT_CERTAIN
goto BattleScript_EffectHit
BattleScript_EffectHitEscape:
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
critcalc
damagecalc
adjustdamage
attackanimation
waitanimation
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
jumpifmovehadnoeffect BattleScript_MoveEnd
seteffectwithchance
tryfaintmon BS_TARGET, FALSE, NULL
moveendall
jumpifbattleend BattleScript_HitEscapeEnd
jumpifbyte CMP_NOT_EQUAL gBattleOutcome 0, BattleScript_HitEscapeEnd
jumpifcantswitch ATK4F_DONT_CHECK_STATUSES | BS_ATTACKER, BattleScript_HitEscapeEnd
openpartyscreen 0x1, BattleScript_HitEscapeEnd
switchoutabilities BS_ATTACKER
waitstate
switchhandleorder BS_ATTACKER, 0x2
returntoball BS_ATTACKER
getswitchedmondata BS_ATTACKER
switchindataupdate BS_ATTACKER
hpthresholds BS_ATTACKER
printstring STRINGID_SWITCHINMON
switchinanim BS_ATTACKER, TRUE
waitstate
switchineffects BS_ATTACKER
BattleScript_HitEscapeEnd:
end
BattleScript_EffectPlaceholder:
attackcanceler
attackstring
ppreduce
pause 0x5
printstring STRINGID_NOTDONEYET
goto BattleScript_MoveEnd
BattleScript_EffectStompingTantrum:
BattleScript_EffectEvasionDownHit:
BattleScript_EffectVitalThrow:
BattleScript_EffectFalseSwipe:
BattleScript_EffectAlwaysCrit:
BattleScript_EffectPursuit:
BattleScript_EffectFellStinger:
BattleScript_EffectHit::
BattleScript_EffectLowKick:
BattleScript_EffectFlail:
BattleScript_EffectFacade:
BattleScript_EffectRevenge:
BattleScript_EffectReturn:
BattleScript_EffectFrustration:
BattleScript_EffectEruption:
BattleScript_EffectPledge:
BattleScript_EffectFling:
BattleScript_EffectNaturalGift:
BattleScript_EffectWringOut:
BattleScript_EffectHex:
BattleScript_EffectAssurance:
BattleScript_EffectTrump_card:
BattleScript_EffectAcrobatics:
BattleScript_EffectHeatCrash:
BattleScript_EffectPunishment:
BattleScript_EffectStoredPower:
BattleScript_EffectElectroBall:
BattleScript_EffectGyroBall:
BattleScript_EffectEchoedVoice:
BattleScript_EffectPayback:
BattleScript_EffectRound:
BattleScript_EffectBrine:
BattleScript_EffectVenoshock:
BattleScript_EffectRetalitate:
BattleScript_EffectFoulPlay:
BattleScript_EffectPsyshock:
BattleScript_EffectWeatherBall:
BattleScript_EffectHiddenPower:
BattleScript_EffectTwoTypedMove:
BattleScript_EffectTechnoBlast:
BattleScript_EffectJudgment:
BattleScript_EffectFusionCombo:
BattleScript_EffectRevelationDance:
BattleScript_EffectBelch:
jumpifnotmove MOVE_SURF, BattleScript_HitFromAtkCanceler
jumpifnostatus3 BS_TARGET, STATUS3_UNDERWATER, BattleScript_HitFromAtkCanceler
orword gHitMarker, HITMARKER_IGNORE_UNDERWATER
BattleScript_HitFromAtkCanceler::
attackcanceler
BattleScript_HitFromAccCheck::
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
BattleScript_HitFromAtkString::
attackstring
ppreduce
BattleScript_HitFromCritCalc::
critcalc
damagecalc
adjustdamage
BattleScript_HitFromAtkAnimation::
attackanimation
waitanimation
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
seteffectwithchance
tryfaintmon BS_TARGET, FALSE, NULL
BattleScript_MoveEnd::
moveendall
end
BattleScript_MakeMoveMissed::
orhalfword gMoveResultFlags, MOVE_RESULT_MISSED
BattleScript_PrintMoveMissed::
attackstring
ppreduce
BattleScript_MoveMissedPause::
pause 0x20
BattleScript_MoveMissed::
effectivenesssound
resultmessage
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectSleep::
attackcanceler
attackstring
ppreduce
jumpifsubstituteblocks BattleScript_ButItFailed
jumpifstatus BS_TARGET, STATUS1_SLEEP, BattleScript_AlreadyAsleep
jumpifcantmakeasleep BattleScript_CantMakeAsleep
jumpifflowerveil BattleScript_FlowerVeilProtects
jumpifability BS_TARGET_SIDE, ABILITY_SWEET_VEIL, BattleScript_SweetVeilProtects
jumpifstatus BS_TARGET, STATUS1_ANY, BattleScript_ButItFailed
accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE
jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, BattleScript_SafeguardProtected
attackanimation
waitanimation
setmoveeffect MOVE_EFFECT_SLEEP
seteffectprimary
goto BattleScript_MoveEnd
BattleScript_FlowerVeilProtectsRet::
pause 0x20
call BattleScript_AbilityPopUp
printstring STRINGID_FLOWERVEILPROTECTED
waitmessage 0x40
return
BattleScript_FlowerVeilProtects:
call BattleScript_FlowerVeilProtectsRet
orhalfword gMoveResultFlags, MOVE_RESULT_FAILED
goto BattleScript_MoveEnd
BattleScript_SweetVeilProtectsRet::
pause 0x20
call BattleScript_AbilityPopUp
printstring STRINGID_FLOWERVEILPROTECTED
waitmessage 0x40
return
BattleScript_SweetVeilProtects:
call BattleScript_SweetVeilProtectsRet
orhalfword gMoveResultFlags, MOVE_RESULT_FAILED
goto BattleScript_MoveEnd
BattleScript_AromaVeilProtectsRet::
pause 0x20
call BattleScript_AbilityPopUp
printstring STRINGID_AROMAVEILPROTECTED
waitmessage 0x40
return
BattleScript_AromaVeilProtects:
call BattleScript_AromaVeilProtectsRet
orhalfword gMoveResultFlags, MOVE_RESULT_FAILED
goto BattleScript_MoveEnd
BattleScript_AlreadyAsleep::
setalreadystatusedmoveattempt BS_ATTACKER
pause 0x20
printstring STRINGID_PKMNALREADYASLEEP
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_WasntAffected::
pause 0x20
printstring STRINGID_PKMNWASNTAFFECTED
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_CantMakeAsleep::
pause 0x20
printfromtable gUproarAwakeStringIds
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectPoisonHit:
setmoveeffect MOVE_EFFECT_POISON
goto BattleScript_EffectHit
BattleScript_EffectAbsorb::
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
critcalc
damagecalc
adjustdamage
attackanimation
waitanimation
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
setdrainedhp
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
jumpifability BS_TARGET, ABILITY_LIQUID_OOZE, BattleScript_AbsorbLiquidOoze
setbyte cMULTISTRING_CHOOSER, 0x0
goto BattleScript_AbsorbUpdateHp
BattleScript_AbsorbLiquidOoze::
manipulatedamage ATK80_DMG_CHANGE_SIGN
setbyte cMULTISTRING_CHOOSER, 0x1
BattleScript_AbsorbUpdateHp::
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
jumpifmovehadnoeffect BattleScript_AbsorbTryFainting
printfromtable gLeechSeedDrainStringIds
waitmessage 0x40
BattleScript_AbsorbTryFainting::
tryfaintmon BS_ATTACKER, FALSE, NULL
tryfaintmon BS_TARGET, FALSE, NULL
goto BattleScript_MoveEnd
BattleScript_EffectBurnHit::
BattleScript_EffectBlazeKick::
BattleScript_EffectScald:
setmoveeffect MOVE_EFFECT_BURN
goto BattleScript_EffectHit
BattleScript_EffectFreezeDry:
BattleScript_EffectFreezeHit::
setmoveeffect MOVE_EFFECT_FREEZE
goto BattleScript_EffectHit
BattleScript_EffectParalyzeHit::
setmoveeffect MOVE_EFFECT_PARALYSIS
goto BattleScript_EffectHit
BattleScript_EffectExplosion::
attackcanceler
attackstring
ppreduce
faintifabilitynotdamp
setatkhptozero
waitstate
jumpifbyte CMP_NO_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_MISSED, BattleScript_ExplosionDoAnimStartLoop
call BattleScript_PreserveMissedBitDoMoveAnim
goto BattleScript_ExplosionLoop
BattleScript_ExplosionDoAnimStartLoop:
attackanimation
waitanimation
BattleScript_ExplosionLoop:
movevaluescleanup
critcalc
damagecalc
adjustdamage
accuracycheck BattleScript_ExplosionMissed, ACC_CURR_MOVE
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
tryfaintmon BS_TARGET, FALSE, NULL
moveendto ATK49_NEXT_TARGET
jumpifnexttargetvalid BattleScript_ExplosionLoop
tryfaintmon BS_ATTACKER, FALSE, NULL
end
BattleScript_ExplosionMissed:
effectivenesssound
resultmessage
waitmessage 0x40
moveendto ATK49_NEXT_TARGET
jumpifnexttargetvalid BattleScript_ExplosionLoop
tryfaintmon BS_ATTACKER, FALSE, NULL
end
BattleScript_PreserveMissedBitDoMoveAnim:
bichalfword gMoveResultFlags, MOVE_RESULT_MISSED
attackanimation
waitanimation
orhalfword gMoveResultFlags, MOVE_RESULT_MISSED
return
BattleScript_EffectDreamEater::
attackcanceler
jumpifsubstituteblocks BattleScript_DreamEaterNoEffect
jumpifstatus BS_TARGET, STATUS1_SLEEP, BattleScript_DreamEaterWorked
BattleScript_DreamEaterNoEffect:
attackstring
ppreduce
waitmessage 0x40
goto BattleScript_WasntAffected
BattleScript_DreamEaterWorked:
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
critcalc
damagecalc
adjustdamage
attackanimation
waitanimation
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
setdrainedhp
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
jumpifmovehadnoeffect BattleScript_DreamEaterTryFaintEnd
printstring STRINGID_PKMNDREAMEATEN
waitmessage 0x40
BattleScript_DreamEaterTryFaintEnd:
tryfaintmon BS_TARGET, FALSE, NULL
goto BattleScript_MoveEnd
BattleScript_EffectMirrorMove::
attackcanceler
attackstring
pause 0x40
trymirrormove
ppreduce
orhalfword gMoveResultFlags, MOVE_RESULT_FAILED
printstring STRINGID_MIRRORMOVEFAILED
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectAttackUp::
setstatchanger STAT_ATK, 1, FALSE
goto BattleScript_EffectStatUp
BattleScript_EffectDefenseUp::
setstatchanger STAT_DEF, 1, FALSE
goto BattleScript_EffectStatUp
BattleScript_EffectSpecialAttackUp::
setstatchanger STAT_SPATK, 1, FALSE
goto BattleScript_EffectStatUp
BattleScript_EffectSpeedUp:
setstatchanger STAT_SPEED, 1, FALSE
goto BattleScript_EffectStatUp
BattleScript_EffectSpecialDefenseUp:
setstatchanger STAT_SPDEF, 1, FALSE
goto BattleScript_EffectStatUp
BattleScript_EffectAccuracyUp:
setstatchanger STAT_ACC, 1, FALSE
goto BattleScript_EffectStatUp
BattleScript_EffectEvasionUp::
setstatchanger STAT_EVASION, 1, FALSE
BattleScript_EffectStatUp::
attackcanceler
BattleScript_EffectStatUpAfterAtkCanceler::
attackstring
ppreduce
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_StatUpEnd
jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_StatUpAttackAnim
pause 0x20
goto BattleScript_StatUpPrintString
BattleScript_StatUpAttackAnim::
attackanimation
waitanimation
BattleScript_StatUpDoAnim::
setgraphicalstatchangevalues
playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
BattleScript_StatUpPrintString::
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_StatUpEnd::
goto BattleScript_MoveEnd
BattleScript_StatUp::
playanimation BS_EFFECT_BATTLER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
BattleScript_StatUpMsg::
printfromtable gStatUpStringIds
waitmessage 0x40
return
BattleScript_EffectAttackDown:
setstatchanger STAT_ATK, 1, TRUE
goto BattleScript_EffectStatDown
BattleScript_EffectDefenseDown:
setstatchanger STAT_DEF, 1, TRUE
goto BattleScript_EffectStatDown
BattleScript_EffectSpeedDown:
setstatchanger STAT_SPEED, 1, TRUE
goto BattleScript_EffectStatDown
BattleScript_EffectAccuracyDown:
setstatchanger STAT_ACC, 1, TRUE
goto BattleScript_EffectStatDown
BattleScript_EffectSpecialAttackDown:
setstatchanger STAT_SPATK, 1, TRUE
goto BattleScript_EffectStatDown
BattleScript_EffectSpecialDefenseDown:
setstatchanger STAT_SPDEF, 1, TRUE
goto BattleScript_EffectStatDown
BattleScript_EffectEvasionDown:
setstatchanger STAT_EVASION, 1, TRUE
BattleScript_EffectStatDown:
attackcanceler
jumpifsubstituteblocks BattleScript_ButItFailedAtkStringPpReduce
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
BattleScript_StatDownFromAttackString:
attackstring
ppreduce
statbuffchange STAT_CHANGE_BS_PTR, BattleScript_StatDownEnd
jumpifbyte CMP_LESS_THAN, cMULTISTRING_CHOOSER, 0x2, BattleScript_StatDownDoAnim
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x3, BattleScript_StatDownEnd
pause 0x20
goto BattleScript_StatDownPrintString
BattleScript_StatDownDoAnim::
attackanimation
waitanimation
setgraphicalstatchangevalues
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
BattleScript_StatDownPrintString::
printfromtable gStatDownStringIds
waitmessage 0x40
BattleScript_StatDownEnd::
goto BattleScript_MoveEnd
BattleScript_StatDown::
playanimation BS_EFFECT_BATTLER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
printfromtable gStatDownStringIds
waitmessage 0x40
return
BattleScript_EffectHaze::
attackcanceler
attackstring
ppreduce
attackanimation
waitanimation
normalisebuffs
printstring STRINGID_STATCHANGESGONE
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectBide::
attackcanceler
attackstring
ppreduce
attackanimation
waitanimation
orword gHitMarker, HITMARKER_CHARGING
setbide
goto BattleScript_MoveEnd
BattleScript_EffectRampage::
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
jumpifstatus2 BS_ATTACKER, STATUS2_MULTIPLETURNS, BattleScript_EffectRampage2
ppreduce
BattleScript_EffectRampage2:
confuseifrepeatingattackends
goto BattleScript_HitFromCritCalc
BattleScript_EffectRoar::
attackcanceler
attackstring
ppreduce
jumpifroarfails BattleScript_ButItFailed
jumpifability BS_TARGET, ABILITY_SUCTION_CUPS, BattleScript_AbilityPreventsPhasingOut
jumpifstatus3 BS_TARGET, STATUS3_ROOTED, BattleScript_PrintMonIsRooted
accuracycheck BattleScript_ButItFailed, NO_ACC_CALC_CHECK_LOCK_ON
accuracycheck BattleScript_MoveMissedPause, ACC_CURR_MOVE
jumpifbattletype BATTLE_TYPE_ARENA, BattleScript_ButItFailed
BattleScript_ForceRandomSwitch::
forcerandomswitch BattleScript_ButItFailed
BattleScript_EffectMultiHit::
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
setmultihitcounter 0x0
initmultihitstring
sethword sMULTIHIT_EFFECT, 0x0
BattleScript_MultiHitLoop::
jumpifhasnohp BS_ATTACKER, BattleScript_MultiHitEnd
jumpifhasnohp BS_TARGET, BattleScript_MultiHitPrintStrings
jumpifhalfword CMP_EQUAL, gChosenMove, MOVE_SLEEP_TALK, BattleScript_DoMultiHit
jumpifstatus BS_ATTACKER, STATUS1_SLEEP, BattleScript_MultiHitPrintStrings
BattleScript_DoMultiHit::
movevaluescleanup
copyhword sMOVE_EFFECT, sMULTIHIT_EFFECT
critcalc
damagecalc
jumpifmovehadnoeffect BattleScript_MultiHitNoMoreHits
adjustdamage
attackanimation
waitanimation
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage 0x40
multihitresultmessage
printstring STRINGID_EMPTYSTRING3
waitmessage 0x1
addbyte sMULTIHIT_STRING + 4, 0x1
moveendto ATK49_NEXT_TARGET
jumpifbyte CMP_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_FOE_ENDURED, BattleScript_MultiHitPrintStrings
decrementmultihit BattleScript_MultiHitLoop
goto BattleScript_MultiHitPrintStrings
BattleScript_MultiHitNoMoreHits::
pause 0x20
BattleScript_MultiHitPrintStrings::
resultmessage
waitmessage 0x40
jumpifmovehadnoeffect BattleScript_MultiHitEnd
copyarray gBattleTextBuff1, sMULTIHIT_STRING, 0x6
printstring STRINGID_HITXTIMES
waitmessage 0x40
BattleScript_MultiHitEnd::
seteffectwithchance
tryfaintmon BS_TARGET, FALSE, NULL
moveendcase ATK49_SYNCHRONIZE_TARGET
moveendfrom ATK49_STATUS_IMMUNITY_ABILITIES
end
BattleScript_EffectConversion::
attackcanceler
attackstring
ppreduce
tryconversiontypechange BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_PKMNCHANGEDTYPE
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectFlinchHit::
setmoveeffect MOVE_EFFECT_FLINCH
goto BattleScript_EffectHit
BattleScript_EffectFlinchWithStatus:
setmoveeffect MOVE_EFFECT_FLINCH
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
critcalc
damagecalc
adjustdamage
attackanimation
waitanimation
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
seteffectwithchance
argumentstatuseffect
tryfaintmon BS_TARGET, FALSE, NULL
goto BattleScript_MoveEnd
BattleScript_EffectRestoreHp::
attackcanceler
attackstring
ppreduce
tryhealhalfhealth BattleScript_AlreadyAtFullHp, BS_ATTACKER
attackanimation
waitanimation
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
printstring STRINGID_PKMNREGAINEDHEALTH
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectToxic::
attackcanceler
attackstring
ppreduce
jumpifability BS_TARGET, ABILITY_IMMUNITY, BattleScript_ImmunityProtected
jumpifflowerveil BattleScript_FlowerVeilProtects
jumpifsubstituteblocks BattleScript_ButItFailed
jumpifstatus BS_TARGET, STATUS1_POISON, BattleScript_AlreadyPoisoned
jumpifstatus BS_TARGET, STATUS1_TOXIC_POISON, BattleScript_AlreadyPoisoned
jumpifstatus BS_TARGET, STATUS1_ANY, BattleScript_ButItFailed
jumpiftype BS_TARGET, TYPE_POISON, BattleScript_NotAffected
jumpiftype BS_TARGET, TYPE_STEEL, BattleScript_NotAffected
accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE
jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, BattleScript_SafeguardProtected
attackanimation
waitanimation
setmoveeffect MOVE_EFFECT_TOXIC
seteffectprimary
resultmessage
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_AlreadyPoisoned::
setalreadystatusedmoveattempt BS_ATTACKER
pause 0x40
printstring STRINGID_PKMNALREADYPOISONED
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_ImmunityProtected::
copybyte gEffectBattler, gBattlerTarget
setbyte cMULTISTRING_CHOOSER, 0x0
call BattleScript_PSNPrevention
goto BattleScript_MoveEnd
BattleScript_EffectPayDay::
setmoveeffect MOVE_EFFECT_PAYDAY
goto BattleScript_EffectHit
BattleScript_EffectAuroraVeil:
attackcanceler
attackstring
ppreduce
setauroraveil BS_ATTACKER
goto BattleScript_PrintReflectLightScreenSafeguardString
BattleScript_EffectLightScreen::
attackcanceler
attackstring
ppreduce
setlightscreen
goto BattleScript_PrintReflectLightScreenSafeguardString
BattleScript_EffectTriAttack::
setmoveeffect MOVE_EFFECT_TRI_ATTACK
goto BattleScript_EffectHit
BattleScript_EffectRest::
attackcanceler
attackstring
ppreduce
jumpifstatus BS_ATTACKER, STATUS1_SLEEP, BattleScript_RestIsAlreadyAsleep
jumpifcantmakeasleep BattleScript_RestCantSleep
trysetrest BattleScript_AlreadyAtFullHp
pause 0x20
printfromtable gRestUsedStringIds
waitmessage 0x40
updatestatusicon BS_ATTACKER
waitstate
goto BattleScript_PresentHealTarget
BattleScript_RestCantSleep::
pause 0x40
printfromtable gUproarAwakeStringIds
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_RestIsAlreadyAsleep::
setalreadystatusedmoveattempt BS_ATTACKER
pause 0x20
printstring STRINGID_PKMNALREADYASLEEP2
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectOHKO::
attackcanceler
attackstring
ppreduce
accuracycheck BattleScript_ButItFailed, NO_ACC_CALC_CHECK_LOCK_ON
typecalc
jumpifmovehadnoeffect BattleScript_HitFromAtkAnimation
tryKO BattleScript_KOFail
trysetdestinybondtohappen
goto BattleScript_HitFromAtkAnimation
BattleScript_KOFail::
pause 0x40
printfromtable gKOFailedStringIds
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_TwoTurnMovesSecondTurn::
attackcanceler
setmoveeffect MOVE_EFFECT_CHARGING
setbyte sB_ANIM_TURN, 0x1
clearstatusfromeffect BS_ATTACKER
orword gHitMarker, HITMARKER_NO_PPDEDUCT
argumenttomoveeffect
goto BattleScript_HitFromAccCheck
BattleScriptFirstChargingTurn::
attackcanceler
printstring STRINGID_EMPTYSTRING3
ppreduce
attackanimation
waitanimation
orword gHitMarker, HITMARKER_CHARGING
setmoveeffect MOVE_EFFECT_CHARGING | MOVE_EFFECT_AFFECTS_USER
seteffectprimary
copybyte cMULTISTRING_CHOOSER, sTWOTURN_STRINGID
printfromtable gFirstTurnOfTwoStringIds
waitmessage 0x40
return
BattleScript_EffectSuperFang::
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
typecalc
bichalfword gMoveResultFlags, MOVE_RESULT_SUPER_EFFECTIVE | MOVE_RESULT_NOT_VERY_EFFECTIVE
damagetohalftargethp
goto BattleScript_HitFromAtkAnimation
BattleScript_EffectDragonRage::
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
typecalc
bichalfword gMoveResultFlags, MOVE_RESULT_SUPER_EFFECTIVE | MOVE_RESULT_NOT_VERY_EFFECTIVE
setword gBattleMoveDamage, 40
adjustdamage
goto BattleScript_HitFromAtkAnimation
BattleScript_EffectTrap::
jumpifnotmove MOVE_WHIRLPOOL, BattleScript_DoWrapEffect
jumpifnostatus3 BS_TARGET, STATUS3_UNDERWATER, BattleScript_DoWrapEffect
orword gHitMarker, HITMARKER_IGNORE_UNDERWATER
BattleScript_DoWrapEffect::
setmoveeffect MOVE_EFFECT_WRAP
goto BattleScript_EffectHit
BattleScript_EffectDoubleHit::
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
setmultihitcounter 0x2
initmultihitstring
sethword sMULTIHIT_EFFECT, 0x0
goto BattleScript_MultiHitLoop
BattleScript_EffectRecoilIfMiss::
attackcanceler
accuracycheck BattleScript_MoveMissedDoDamage, ACC_CURR_MOVE
goto BattleScript_HitFromAtkString
BattleScript_MoveMissedDoDamage::
attackstring
ppreduce
pause 0x40
resultmessage
waitmessage 0x40
jumpifbyte CMP_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_DOESNT_AFFECT_FOE, BattleScript_MoveEnd
printstring STRINGID_PKMNCRASHED
waitmessage 0x40
damagecalc
typecalc
adjustdamage
manipulatedamage ATK80_DMG_HALF_BY_TWO_NOT_MORE_THAN_HALF_MAX_HP
bichalfword gMoveResultFlags, MOVE_RESULT_MISSED
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
tryfaintmon BS_ATTACKER, FALSE, NULL
orhalfword gMoveResultFlags, MOVE_RESULT_MISSED
goto BattleScript_MoveEnd
BattleScript_EffectMist::
attackcanceler
attackstring
ppreduce
setmist
attackanimation
waitanimation
printfromtable gMistUsedStringIds
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectFocusEnergy:
attackcanceler
attackstring
ppreduce
jumpifstatus2 BS_ATTACKER, STATUS2_FOCUS_ENERGY, BattleScript_ButItFailed
setfocusenergy
attackanimation
waitanimation
printfromtable gFocusEnergyUsedStringIds
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectRecoil:
setmoveeffect MOVE_EFFECT_RECOIL_25 | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN
jumpifnotmove MOVE_STRUGGLE, BattleScript_EffectHit
incrementgamestat GAME_STAT_USED_STRUGGLE
goto BattleScript_EffectHit
BattleScript_EffectConfuse:
attackcanceler
attackstring
ppreduce
jumpifability BS_TARGET, ABILITY_OWN_TEMPO, BattleScript_OwnTempoPrevents
jumpifsubstituteblocks BattleScript_ButItFailed
jumpifstatus2 BS_TARGET, STATUS2_CONFUSION, BattleScript_AlreadyConfused
accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE
jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, BattleScript_SafeguardProtected
attackanimation
waitanimation
setmoveeffect MOVE_EFFECT_CONFUSION
seteffectprimary
resultmessage
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_AlreadyConfused::
setalreadystatusedmoveattempt BS_ATTACKER
pause 0x20
printstring STRINGID_PKMNALREADYCONFUSED
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectAttackUp2::
setstatchanger STAT_ATK, 2, FALSE
goto BattleScript_EffectStatUp
BattleScript_EffectDefenseUp2::
setstatchanger STAT_DEF, 2, FALSE
goto BattleScript_EffectStatUp
BattleScript_EffectDefenseUp3:
setstatchanger STAT_DEF, 3, FALSE
goto BattleScript_EffectStatUp
BattleScript_EffectSpeedUp2::
setstatchanger STAT_SPEED, 2, FALSE
goto BattleScript_EffectStatUp
BattleScript_EffectSpecialAttackUp2::
setstatchanger STAT_SPATK, 2, FALSE
goto BattleScript_EffectStatUp
BattleScript_EffectSpecialAttackUp3::
setstatchanger STAT_SPATK, 3, FALSE
goto BattleScript_EffectStatUp
BattleScript_EffectSpecialDefenseUp2::
setstatchanger STAT_SPDEF, 2, FALSE
goto BattleScript_EffectStatUp
BattleScript_EffectAccuracyUp2:
setstatchanger STAT_ACC, 2, FALSE
goto BattleScript_EffectStatUp
BattleScript_EffectEvasionUp2:
setstatchanger STAT_EVASION, 2, FALSE
goto BattleScript_EffectStatUp
BattleScript_EffectTransform::
attackcanceler
attackstring
ppreduce
transformdataexecution
attackanimation
waitanimation
printfromtable gTransformUsedStringIds
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectAttackDown2:
setstatchanger STAT_ATK, 2, TRUE
goto BattleScript_EffectStatDown
BattleScript_EffectDefenseDown2:
setstatchanger STAT_DEF, 2, TRUE
goto BattleScript_EffectStatDown
BattleScript_EffectSpeedDown2:
setstatchanger STAT_SPEED, 2, TRUE
goto BattleScript_EffectStatDown
BattleScript_EffectSpecialDefenseDown2:
setstatchanger STAT_SPDEF, 2, TRUE
goto BattleScript_EffectStatDown
BattleScript_EffectSpecialAttackDown2:
setstatchanger STAT_SPATK, 2, TRUE
goto BattleScript_EffectStatDown
BattleScript_EffectAccuracyDown2:
setstatchanger STAT_ACC, 2, TRUE
goto BattleScript_EffectStatDown
BattleScript_EffectEvasionDown2:
setstatchanger STAT_EVASION, 2, TRUE
goto BattleScript_EffectStatDown
BattleScript_EffectReflect::
attackcanceler
attackstring
ppreduce
setreflect
BattleScript_PrintReflectLightScreenSafeguardString::
attackanimation
waitanimation
printfromtable gReflectLightScreenSafeguardStringIds
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectPoison::
attackcanceler
attackstring
ppreduce
jumpifability BS_TARGET, ABILITY_IMMUNITY, BattleScript_ImmunityProtected
jumpifflowerveil BattleScript_FlowerVeilProtects
jumpifsubstituteblocks BattleScript_ButItFailed
jumpifstatus BS_TARGET, STATUS1_POISON, BattleScript_AlreadyPoisoned
jumpifstatus BS_TARGET, STATUS1_TOXIC_POISON, BattleScript_AlreadyPoisoned
jumpiftype BS_TARGET, TYPE_POISON, BattleScript_NotAffected
jumpiftype BS_TARGET, TYPE_STEEL, BattleScript_NotAffected
jumpifstatus BS_TARGET, STATUS1_ANY, BattleScript_ButItFailed
accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE
jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, BattleScript_SafeguardProtected
attackanimation
waitanimation
setmoveeffect MOVE_EFFECT_POISON
seteffectprimary
resultmessage
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectParalyze:
attackcanceler
attackstring
ppreduce
jumpifability BS_TARGET, ABILITY_LIMBER, BattleScript_LimberProtected
jumpifflowerveil BattleScript_FlowerVeilProtects
jumpifsubstituteblocks BattleScript_ButItFailed
typecalc
jumpifmovehadnoeffect BattleScript_ButItFailed
jumpifstatus BS_TARGET, STATUS1_PARALYSIS, BattleScript_AlreadyParalyzed
jumpiftype BS_TARGET, TYPE_ELECTRIC, BattleScript_NotAffected
jumpifstatus BS_TARGET, STATUS1_ANY, BattleScript_ButItFailed
accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE
jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, BattleScript_SafeguardProtected
bichalfword gMoveResultFlags, MOVE_RESULT_SUPER_EFFECTIVE | MOVE_RESULT_NOT_VERY_EFFECTIVE
attackanimation
waitanimation
setmoveeffect MOVE_EFFECT_PARALYSIS
seteffectprimary
resultmessage
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_AlreadyParalyzed:
setalreadystatusedmoveattempt BS_ATTACKER
pause 0x20
printstring STRINGID_PKMNISALREADYPARALYZED
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_LimberProtected::
copybyte gEffectBattler, gBattlerTarget
setbyte cMULTISTRING_CHOOSER, 0x0
call BattleScript_PRLZPrevention
goto BattleScript_MoveEnd
BattleScript_EffectAttackDownHit::
setmoveeffect MOVE_EFFECT_ATK_MINUS_1
goto BattleScript_EffectHit
BattleScript_EffectDefenseDownHit::
setmoveeffect MOVE_EFFECT_DEF_MINUS_1
goto BattleScript_EffectHit
BattleScript_EffectSpeedDownHit::
setmoveeffect MOVE_EFFECT_SPD_MINUS_1
goto BattleScript_EffectHit
BattleScript_EffectSpecialAttackDownHit::
setmoveeffect MOVE_EFFECT_SP_ATK_MINUS_1
goto BattleScript_EffectHit
BattleScript_EffectSpecialDefenseDownHit::
setmoveeffect MOVE_EFFECT_SP_DEF_MINUS_1
goto BattleScript_EffectHit
BattleScript_EffectSpecialDefenseDownHit2::
setmoveeffect MOVE_EFFECT_SP_DEF_MINUS_2
goto BattleScript_EffectHit
BattleScript_EffectAccuracyDownHit::
setmoveeffect MOVE_EFFECT_ACC_MINUS_1
goto BattleScript_EffectHit
BattleScript_EffectTwoTurnsAttack::
jumpifstatus2 BS_ATTACKER, STATUS2_MULTIPLETURNS, BattleScript_TwoTurnMovesSecondTurn
jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_NO_ATTACKSTRING, BattleScript_TwoTurnMovesSecondTurn
jumpifmove MOVE_SKY_ATTACK, BattleScript_EffectTwoTurnsAttackSkyAttack
jumpifmove MOVE_RAZOR_WIND, BattleScript_EffectTwoTurnsAttackRazorWind
jumpifmove MOVE_ICE_BURN, BattleScript_EffectTwoTurnsAttackIceBurn
jumpifmove MOVE_FREEZE_SHOCK, BattleScript_EffectTwoTurnsAttackFreezeShock
setbyte sTWOTURN_STRINGID, 0x0
BattleScript_EffectTwoTurnsAttackContinue:
call BattleScriptFirstChargingTurn
goto BattleScript_MoveEnd
BattleScript_EffectTwoTurnsAttackSkyAttack:
setbyte sTWOTURN_STRINGID, 0x3
goto BattleScript_EffectTwoTurnsAttackContinue
BattleScript_EffectTwoTurnsAttackRazorWind:
setbyte sTWOTURN_STRINGID, 0x0
goto BattleScript_EffectTwoTurnsAttackContinue
BattleScript_EffectTwoTurnsAttackIceBurn:
setbyte sTWOTURN_STRINGID, 0x0
goto BattleScript_EffectTwoTurnsAttackContinue
BattleScript_EffectTwoTurnsAttackFreezeShock:
setbyte sTWOTURN_STRINGID, 0x0
goto BattleScript_EffectTwoTurnsAttackContinue
BattleScript_EffectConfuseHit::
setmoveeffect MOVE_EFFECT_CONFUSION
goto BattleScript_EffectHit
BattleScript_EffectTwineedle::
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
sethword sMULTIHIT_EFFECT, MOVE_EFFECT_POISON
attackstring
ppreduce
setmultihitcounter 0x2
initmultihitstring
goto BattleScript_MultiHitLoop
BattleScript_EffectSubstitute::
attackcanceler
ppreduce
attackstring
waitstate
jumpifstatus2 BS_ATTACKER, STATUS2_SUBSTITUTE, BattleScript_AlreadyHasSubstitute
setsubstitute
jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, 0x1, BattleScript_SubstituteAnim
pause 0x20
goto BattleScript_SubstituteString
BattleScript_SubstituteAnim::
attackanimation
waitanimation
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
BattleScript_SubstituteString::
printfromtable gSubsituteUsedStringIds
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_AlreadyHasSubstitute::
setalreadystatusedmoveattempt BS_ATTACKER
pause 0x20
printstring STRINGID_PKMNHASSUBSTITUTE
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectRecharge::
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
setmoveeffect MOVE_EFFECT_RECHARGE | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN
goto BattleScript_HitFromAtkString
BattleScript_MoveUsedMustRecharge::
printstring STRINGID_PKMNMUSTRECHARGE
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectRage::
attackcanceler
accuracycheck BattleScript_RageMiss, ACC_CURR_MOVE
setmoveeffect MOVE_EFFECT_RAGE
seteffectprimary
setmoveeffect 0
goto BattleScript_HitFromAtkString
BattleScript_RageMiss::
setmoveeffect MOVE_EFFECT_RAGE
clearstatusfromeffect BS_ATTACKER
goto BattleScript_PrintMoveMissed
BattleScript_EffectMimic::
attackcanceler
attackstring
ppreduce
jumpifsubstituteblocks BattleScript_ButItFailed
accuracycheck BattleScript_ButItFailed, NO_ACC_CALC_CHECK_LOCK_ON
mimicattackcopy BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_PKMNLEARNEDMOVE2
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectMetronome::
attackcanceler
attackstring
pause 0x20
attackanimation
waitanimation
setbyte sB_ANIM_TURN, 0x0
setbyte sB_ANIM_TARGETS_HIT, 0x0
metronome
BattleScript_EffectLeechSeed::
attackcanceler
attackstring
pause 0x20
ppreduce
jumpifsubstituteblocks BattleScript_ButItFailed
accuracycheck BattleScript_DoLeechSeed, ACC_CURR_MOVE
BattleScript_DoLeechSeed::
setseeded
attackanimation
waitanimation
printfromtable gLeechSeedStringIds
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectDoNothing::
attackcanceler
attackstring
ppreduce
jumpifmove MOVE_HOLD_HANDS, BattleScript_EffectHoldHands
attackanimation
waitanimation
jumpifmove MOVE_CELEBRATE, BattleScript_EffectCelebrate
jumpifmove MOVE_HAPPY_HOUR, BattleScript_EffectHappyHour
incrementgamestat GAME_STAT_USED_SPLASH
printstring STRINGID_BUTNOTHINGHAPPENED
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectHoldHands:
jumpifsideaffecting BS_TARGET, SIDE_STATUS_CRAFTY_SHIELD, BattleScript_ButItFailed
jumpifbyteequal gBattlerTarget, gBattlerAttacker, BattleScript_ButItFailed
attackanimation
waitanimation
goto BattleScript_MoveEnd
BattleScript_EffectCelebrate:
printstring STRINGID_CELEBRATEMESSAGE
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectHappyHour:
setmoveeffect MOVE_EFFECT_HAPPY_HOUR
seteffectprimary
goto BattleScript_MoveEnd
BattleScript_EffectDisable::
attackcanceler
attackstring
ppreduce
jumpifability BS_TARGET_SIDE, ABILITY_AROMA_VEIL, BattleScript_AromaVeilProtects
accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE
disablelastusedattack BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_PKMNMOVEWASDISABLED
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectLevelDamage::
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
typecalc
bichalfword gMoveResultFlags, MOVE_RESULT_SUPER_EFFECTIVE | MOVE_RESULT_NOT_VERY_EFFECTIVE
dmgtolevel
adjustdamage
goto BattleScript_HitFromAtkAnimation
BattleScript_EffectPsywave::
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
typecalc
bichalfword gMoveResultFlags, MOVE_RESULT_SUPER_EFFECTIVE | MOVE_RESULT_NOT_VERY_EFFECTIVE
psywavedamageeffect
adjustdamage
goto BattleScript_HitFromAtkAnimation
BattleScript_EffectCounter::
attackcanceler
counterdamagecalculator BattleScript_ButItFailedAtkStringPpReduce
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
typecalc
bichalfword gMoveResultFlags, MOVE_RESULT_NOT_VERY_EFFECTIVE | MOVE_RESULT_SUPER_EFFECTIVE
adjustdamage
goto BattleScript_HitFromAtkAnimation
BattleScript_EffectEncore::
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
jumpifability BS_TARGET_SIDE, ABILITY_AROMA_VEIL, BattleScript_AromaVeilProtects
trysetencore BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_PKMNGOTENCORE
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectPainSplit::
attackcanceler
attackstring
ppreduce
accuracycheck BattleScript_ButItFailed, NO_ACC_CALC_CHECK_LOCK_ON
painsplitdmgcalc BattleScript_ButItFailed
attackanimation
waitanimation
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
copyword gBattleMoveDamage, sPAINSPLIT_HP
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
printstring STRINGID_SHAREDPAIN
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectSnore::
attackcanceler
jumpifstatus BS_ATTACKER, STATUS1_SLEEP, BattleScript_SnoreIsAsleep
attackstring
ppreduce
goto BattleScript_ButItFailed
BattleScript_SnoreIsAsleep::
jumpifhalfword CMP_EQUAL, gChosenMove, MOVE_SLEEP_TALK, BattleScript_DoSnore
printstring STRINGID_PKMNFASTASLEEP
waitmessage 0x40
statusanimation BS_ATTACKER
BattleScript_DoSnore::
attackstring
ppreduce
accuracycheck BattleScript_MoveMissedPause, ACC_CURR_MOVE
setmoveeffect MOVE_EFFECT_FLINCH
goto BattleScript_HitFromCritCalc
BattleScript_EffectConversion2::
attackcanceler
attackstring
ppreduce
settypetorandomresistance BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_PKMNCHANGEDTYPE
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectLockOn::
attackcanceler
attackstring
ppreduce
jumpifsubstituteblocks BattleScript_ButItFailed
accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE
setalwayshitflag
attackanimation
waitanimation
printstring STRINGID_PKMNTOOKAIM
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectSketch::
attackcanceler
attackstring
ppreduce
copymovepermanently BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_PKMNSKETCHEDMOVE
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectSleepTalk::
attackcanceler
jumpifstatus BS_ATTACKER, STATUS1_SLEEP, BattleScript_SleepTalkIsAsleep
attackstring
ppreduce
goto BattleScript_ButItFailed
BattleScript_SleepTalkIsAsleep::
printstring STRINGID_PKMNFASTASLEEP
waitmessage 0x40
statusanimation BS_ATTACKER
attackstring
ppreduce
orword gHitMarker, HITMARKER_NO_PPDEDUCT
trychoosesleeptalkmove BattleScript_SleepTalkUsingMove
pause 0x40
goto BattleScript_ButItFailed
BattleScript_SleepTalkUsingMove::
attackanimation
waitanimation
setbyte sB_ANIM_TURN, 0x0
setbyte sB_ANIM_TARGETS_HIT, 0x0
jumptocalledmove TRUE
BattleScript_EffectDestinyBond::
attackcanceler
attackstring
ppreduce
setdestinybond
attackanimation
waitanimation
printstring STRINGID_PKMNTRYINGTOTAKEFOE
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectSpite::
attackcanceler
attackstring
ppreduce
accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE
tryspiteppreduce BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_PKMNREDUCEDPP
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectHealBell::
attackcanceler
attackstring
ppreduce
healpartystatus
waitstate
attackanimation
waitanimation
printfromtable gPartyStatusHealStringIds
waitmessage 0x40
jumpifnotmove MOVE_HEAL_BELL, BattleScript_PartyHealEnd
jumpifbyte CMP_NO_COMMON_BITS, cMULTISTRING_CHOOSER, 0x1, BattleScript_CheckHealBellMon2Unaffected
printstring STRINGID_PKMNSXBLOCKSY
waitmessage 0x40
BattleScript_CheckHealBellMon2Unaffected::
jumpifbyte CMP_NO_COMMON_BITS, cMULTISTRING_CHOOSER, 0x2, BattleScript_PartyHealEnd
printstring STRINGID_PKMNSXBLOCKSY2
waitmessage 0x40
BattleScript_PartyHealEnd::
updatestatusicon BS_ATTACKER_WITH_PARTNER
waitstate
goto BattleScript_MoveEnd
BattleScript_EffectTripleKick::
attackcanceler
attackstring
ppreduce
sethword sTRIPLE_KICK_POWER, 0x0
initmultihitstring
setmultihit 0x3
BattleScript_TripleKickLoop::
jumpifhasnohp BS_ATTACKER, BattleScript_TripleKickEnd
jumpifhasnohp BS_TARGET, BattleScript_TripleKickNoMoreHits
jumpifhalfword CMP_EQUAL, gChosenMove, MOVE_SLEEP_TALK, BattleScript_DoTripleKickAttack
jumpifstatus BS_ATTACKER, STATUS1_SLEEP, BattleScript_TripleKickNoMoreHits
BattleScript_DoTripleKickAttack::
accuracycheck BattleScript_TripleKickNoMoreHits, ACC_CURR_MOVE
movevaluescleanup
addbyte sTRIPLE_KICK_POWER, 10
addbyte sMULTIHIT_STRING + 4, 0x1
critcalc
damagecalc
adjustdamage
jumpifmovehadnoeffect BattleScript_TripleKickNoMoreHits
attackanimation
waitanimation
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage 0x40
printstring STRINGID_EMPTYSTRING3
waitmessage 0x1
moveendto ATK49_NEXT_TARGET
jumpifbyte CMP_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_FOE_ENDURED, BattleScript_TripleKickPrintStrings
decrementmultihit BattleScript_TripleKickLoop
goto BattleScript_TripleKickPrintStrings
BattleScript_TripleKickNoMoreHits::
pause 0x20
jumpifbyte CMP_EQUAL, sMULTIHIT_STRING + 4, 0x0, BattleScript_TripleKickPrintStrings
bichalfword gMoveResultFlags, MOVE_RESULT_MISSED
BattleScript_TripleKickPrintStrings::
resultmessage
waitmessage 0x40
jumpifbyte CMP_EQUAL, sMULTIHIT_STRING + 4, 0x0, BattleScript_TripleKickEnd
jumpifbyte CMP_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_DOESNT_AFFECT_FOE, BattleScript_TripleKickEnd
copyarray gBattleTextBuff1, sMULTIHIT_STRING, 0x6
printstring STRINGID_HITXTIMES
waitmessage 0x40
BattleScript_TripleKickEnd::
seteffectwithchance
tryfaintmon BS_TARGET, FALSE, NULL
moveendfrom ATK49_UPDATE_LAST_MOVES
end
BattleScript_EffectThief::
setmoveeffect MOVE_EFFECT_STEAL_ITEM
goto BattleScript_EffectHit
BattleScript_EffectHitPreventEscape:
setmoveeffect MOVE_EFFECT_PREVENT_ESCAPE
goto BattleScript_EffectHit
BattleScript_EffectMeanLook::
attackcanceler
attackstring
ppreduce
accuracycheck BattleScript_ButItFailed, NO_ACC_CALC_CHECK_LOCK_ON
jumpifstatus2 BS_TARGET, STATUS2_ESCAPE_PREVENTION, BattleScript_ButItFailed
jumpifsubstituteblocks BattleScript_ButItFailed
attackanimation
waitanimation
setmoveeffect MOVE_EFFECT_PREVENT_ESCAPE
seteffectprimary
printstring STRINGID_TARGETCANTESCAPENOW
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectNightmare::
attackcanceler
attackstring
ppreduce
jumpifsubstituteblocks BattleScript_ButItFailed
jumpifstatus2 BS_TARGET, STATUS2_NIGHTMARE, BattleScript_ButItFailed
jumpifstatus BS_TARGET, STATUS1_SLEEP, BattleScript_NightmareWorked
goto BattleScript_ButItFailed
BattleScript_NightmareWorked::
attackanimation
waitanimation
setmoveeffect MOVE_EFFECT_NIGHTMARE
seteffectprimary
printstring STRINGID_PKMNFELLINTONIGHTMARE
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectMinimize::
attackcanceler
setminimize
setstatchanger STAT_EVASION, 1, FALSE
goto BattleScript_EffectStatUpAfterAtkCanceler
BattleScript_EffectCurse::
jumpiftype BS_ATTACKER, TYPE_GHOST, BattleScript_GhostCurse
attackcanceler
attackstring
ppreduce
jumpifstat BS_ATTACKER, CMP_GREATER_THAN, STAT_SPEED, 0x0, BattleScript_CurseTrySpeed
jumpifstat BS_ATTACKER, CMP_NOT_EQUAL, STAT_ATK, 0xC, BattleScript_CurseTrySpeed
jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_DEF, 0xC, BattleScript_ButItFailed
BattleScript_CurseTrySpeed::
copybyte gBattlerTarget, gBattlerAttacker
setbyte sB_ANIM_TURN, 0x1
attackanimation
waitanimation
setstatchanger STAT_SPEED, 1, TRUE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_CurseTryAttack
printfromtable gStatDownStringIds
waitmessage 0x40
BattleScript_CurseTryAttack::
setstatchanger STAT_ATK, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_CurseTryDefence
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_CurseTryDefence::
setstatchanger STAT_DEF, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_CurseEnd
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_CurseEnd::
goto BattleScript_MoveEnd
BattleScript_GhostCurse::
jumpifbytenotequal gBattlerAttacker, gBattlerTarget, BattleScript_DoGhostCurse
getmovetarget BS_ATTACKER
BattleScript_DoGhostCurse::
attackcanceler
attackstring
ppreduce
accuracycheck BattleScript_ButItFailed, NO_ACC_CALC_CHECK_LOCK_ON
cursetarget BattleScript_ButItFailed
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
setbyte sB_ANIM_TURN, 0x0
attackanimation
waitanimation
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
printstring STRINGID_PKMNLAIDCURSE
waitmessage 0x40
tryfaintmon BS_ATTACKER, FALSE, NULL
goto BattleScript_MoveEnd
BattleScript_EffectMatBlock::
attackcanceler
jumpifnotfirstturn BattleScript_ButItFailedAtkStringPpReduce
goto BattleScript_ProtectLikeAtkString
BattleScript_EffectProtect::
BattleScript_EffectEndure::
attackcanceler
BattleScript_ProtectLikeAtkString:
attackstring
ppreduce
setprotectlike
attackanimation
waitanimation
printfromtable gProtectLikeUsedStringIds
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectSpikes::
attackcanceler
trysetspikes BattleScript_ButItFailedAtkStringPpReduce
attackstring
ppreduce
attackanimation
waitanimation
printstring STRINGID_SPIKESSCATTERED
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectForesight:
attackcanceler
attackstring
ppreduce
accuracycheck BattleScript_ButItFailed, NO_ACC_CALC_CHECK_LOCK_ON
jumpifstatus2 BS_TARGET, STATUS2_FORESIGHT, BattleScript_ButItFailed
setforesight
BattleScript_IdentifiedFoe:
attackanimation
waitanimation
printstring STRINGID_PKMNIDENTIFIED
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectPerishSong::
attackcanceler
attackstring
ppreduce
trysetperishsong BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_FAINTINTHREE
waitmessage 0x40
setbyte sBATTLER, 0x0
BattleScript_PerishSongLoop::
jumpifability BS_SCRIPTING, ABILITY_SOUNDPROOF, BattleScript_PerishSongNotAffected
BattleScript_PerishSongLoopIncrement::
addbyte sBATTLER, 0x1
jumpifbytenotequal sBATTLER, gBattlersCount, BattleScript_PerishSongLoop
goto BattleScript_MoveEnd
BattleScript_PerishSongNotAffected::
printstring STRINGID_PKMNSXBLOCKSY2
waitmessage 0x40
goto BattleScript_PerishSongLoopIncrement
BattleScript_EffectSandstorm::
attackcanceler
attackstring
ppreduce
setsandstorm
goto BattleScript_MoveWeatherChange
BattleScript_EffectRollout::
attackcanceler
attackstring
jumpifstatus2 BS_ATTACKER, STATUS2_MULTIPLETURNS, BattleScript_RolloutCheckAccuracy
ppreduce
BattleScript_RolloutCheckAccuracy::
accuracycheck BattleScript_RolloutHit, ACC_CURR_MOVE
BattleScript_RolloutHit::
typecalc
handlerollout
goto BattleScript_HitFromCritCalc
BattleScript_EffectSwagger::
attackcanceler
jumpifsubstituteblocks BattleScript_MakeMoveMissed
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
jumpifconfusedandstatmaxed STAT_ATK, BattleScript_ButItFailed
attackanimation
waitanimation
setstatchanger STAT_ATK, 2, FALSE
statbuffchange STAT_CHANGE_BS_PTR, BattleScript_SwaggerTryConfuse
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_SwaggerTryConfuse
setgraphicalstatchangevalues
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_SwaggerTryConfuse:
jumpifability BS_TARGET, ABILITY_OWN_TEMPO, BattleScript_OwnTempoPrevents
jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, BattleScript_SafeguardProtected
setmoveeffect MOVE_EFFECT_CONFUSION
seteffectprimary
goto BattleScript_MoveEnd
BattleScript_EffectFuryCutter:
attackcanceler
attackstring
ppreduce
accuracycheck BattleScript_FuryCutterHit, ACC_CURR_MOVE
BattleScript_FuryCutterHit:
handlefurycutter
critcalc
damagecalc
jumpifmovehadnoeffect BattleScript_FuryCutterHit
adjustdamage
goto BattleScript_HitFromAtkAnimation
BattleScript_EffectAttract::
attackcanceler
attackstring
ppreduce
accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE
jumpifability BS_TARGET_SIDE, ABILITY_AROMA_VEIL, BattleScript_AromaVeilProtects
tryinfatuating BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_PKMNFELLINLOVE
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectPresent::
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
typecalc
presentdamagecalculation
BattleScript_EffectSafeguard::
attackcanceler
attackstring
ppreduce
setsafeguard
goto BattleScript_PrintReflectLightScreenSafeguardString
BattleScript_EffectThawHit::
setmoveeffect MOVE_EFFECT_BURN
goto BattleScript_EffectHit
BattleScript_EffectMagnitude::
attackcanceler
attackstring
ppreduce
selectfirstvalidtarget
magnitudedamagecalculation
pause 0x20
printstring STRINGID_MAGNITUDESTRENGTH
waitmessage 0x40
goto BattleScript_HitsAllWithUndergroundBonusLoop
BattleScript_EffectBatonPass::
attackcanceler
attackstring
ppreduce
jumpifbattletype BATTLE_TYPE_ARENA, BattleScript_ButItFailed
jumpifcantswitch ATK4F_DONT_CHECK_STATUSES | BS_ATTACKER, BattleScript_ButItFailed
attackanimation
waitanimation
openpartyscreen BS_ATTACKER, BattleScript_ButItFailed
switchoutabilities BS_ATTACKER
waitstate
switchhandleorder BS_ATTACKER, 0x2
returntoball BS_ATTACKER
getswitchedmondata BS_ATTACKER
switchindataupdate BS_ATTACKER
hpthresholds BS_ATTACKER
printstring STRINGID_SWITCHINMON
switchinanim BS_ATTACKER, TRUE
waitstate
switchineffects BS_ATTACKER
goto BattleScript_MoveEnd
BattleScript_EffectRapidSpin::
setmoveeffect MOVE_EFFECT_RAPIDSPIN | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN
goto BattleScript_EffectHit
BattleScript_EffectSonicboom::
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
typecalc
bichalfword gMoveResultFlags, MOVE_RESULT_SUPER_EFFECTIVE | MOVE_RESULT_NOT_VERY_EFFECTIVE
setword gBattleMoveDamage, 20
adjustdamage
goto BattleScript_HitFromAtkAnimation
BattleScript_EffectMorningSun::
BattleScript_EffectSynthesis::
BattleScript_EffectMoonlight::
attackcanceler
attackstring
ppreduce
recoverbasedonsunlight BattleScript_AlreadyAtFullHp
goto BattleScript_PresentHealTarget
BattleScript_EffectRainDance::
attackcanceler
attackstring
ppreduce
setrain
BattleScript_MoveWeatherChange::
attackanimation
waitanimation
printfromtable gMoveWeatherChangeStringIds
waitmessage 0x40
call BattleScript_WeatherFormChanges
goto BattleScript_MoveEnd
BattleScript_EffectSunnyDay::
attackcanceler
attackstring
ppreduce
setsunny
goto BattleScript_MoveWeatherChange
BattleScript_EffectDefenseUpHit::
setmoveeffect MOVE_EFFECT_DEF_PLUS_1 | MOVE_EFFECT_AFFECTS_USER
goto BattleScript_EffectHit
BattleScript_EffectAttackUpHit::
setmoveeffect MOVE_EFFECT_ATK_PLUS_1 | MOVE_EFFECT_AFFECTS_USER
goto BattleScript_EffectHit
BattleScript_EffectAllStatsUpHit::
setmoveeffect MOVE_EFFECT_ALL_STATS_UP | MOVE_EFFECT_AFFECTS_USER
goto BattleScript_EffectHit
BattleScript_EffectBellyDrum::
attackcanceler
attackstring
ppreduce
maxattackhalvehp BattleScript_ButItFailed
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
attackanimation
waitanimation
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
printstring STRINGID_PKMNCUTHPMAXEDATTACK
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectPsychUp::
attackcanceler
attackstring
ppreduce
copyfoestats BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_PKMNCOPIEDSTATCHANGES
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectMirrorCoat::
attackcanceler
mirrorcoatdamagecalculator BattleScript_ButItFailedAtkStringPpReduce
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
typecalc
bichalfword gMoveResultFlags, MOVE_RESULT_NOT_VERY_EFFECTIVE | MOVE_RESULT_SUPER_EFFECTIVE
adjustdamage
goto BattleScript_HitFromAtkAnimation
BattleScript_EffectSkullBash::
jumpifstatus2 BS_ATTACKER, STATUS2_MULTIPLETURNS, BattleScript_TwoTurnMovesSecondTurn
jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_NO_ATTACKSTRING, BattleScript_TwoTurnMovesSecondTurn
setbyte sTWOTURN_STRINGID, 0x2
call BattleScriptFirstChargingTurn
setstatchanger STAT_DEF, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_SkullBashEnd
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_SkullBashEnd
setgraphicalstatchangevalues
playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_SkullBashEnd::
goto BattleScript_MoveEnd
BattleScript_EffectTwister:
jumpifnostatus3 BS_TARGET, STATUS3_ON_AIR, BattleScript_FlinchEffect
orword gHitMarker, HITMARKER_IGNORE_ON_AIR
BattleScript_FlinchEffect:
BattleScript_EffectStomp:
setmoveeffect MOVE_EFFECT_FLINCH
goto BattleScript_EffectHit
BattleScript_EffectBulldoze:
setmoveeffect MOVE_EFFECT_SPD_MINUS_1
BattleScript_EffectEarthquake:
attackcanceler
attackstring
ppreduce
selectfirstvalidtarget
BattleScript_HitsAllWithUndergroundBonusLoop::
movevaluescleanup
copyhword sMOVE_EFFECT, sSAVED_MOVE_EFFECT
jumpifnostatus3 BS_TARGET, STATUS3_UNDERGROUND, BattleScript_HitsAllNoUndergroundBonus
orword gHitMarker, HITMARKER_IGNORE_UNDERGROUND
goto BattleScript_DoHitAllWithUndergroundBonus
BattleScript_HitsAllNoUndergroundBonus::
bicword gHitMarker, HITMARKER_IGNORE_UNDERGROUND
BattleScript_DoHitAllWithUndergroundBonus::
accuracycheck BattleScript_HitAllWithUndergroundBonusMissed, ACC_CURR_MOVE
critcalc
damagecalc
adjustdamage
attackanimation
waitanimation
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
seteffectwithchance
printstring STRINGID_EMPTYSTRING3
waitmessage 0x1
tryfaintmon BS_TARGET, FALSE, NULL
moveendto ATK49_NEXT_TARGET
jumpifnexttargetvalid BattleScript_HitsAllWithUndergroundBonusLoop
end
BattleScript_HitAllWithUndergroundBonusMissed::
pause 0x20
typecalc
effectivenesssound
resultmessage
waitmessage 0x40
moveendto ATK49_NEXT_TARGET
jumpifnexttargetvalid BattleScript_HitsAllWithUndergroundBonusLoop
end
BattleScript_EffectFutureSight::
attackcanceler
attackstring
ppreduce
trysetfutureattack BattleScript_ButItFailed
attackanimation
waitanimation
printfromtable gFutureMoveUsedStringIds
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectGust::
jumpifnostatus3 BS_TARGET, STATUS3_ON_AIR, BattleScript_EffectHit
orword gHitMarker, HITMARKER_IGNORE_ON_AIR
goto BattleScript_EffectHit
BattleScript_EffectSolarbeam::
jumpifabilitypresent ABILITY_CLOUD_NINE, BattleScript_SolarbeamDecideTurn
jumpifabilitypresent ABILITY_AIR_LOCK, BattleScript_SolarbeamDecideTurn
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_SUN_TEMPORARY | WEATHER_SUN_PERMANENT, BattleScript_SolarbeamOnFirstTurn
BattleScript_SolarbeamDecideTurn::
jumpifstatus2 BS_ATTACKER, STATUS2_MULTIPLETURNS, BattleScript_TwoTurnMovesSecondTurn
jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_NO_ATTACKSTRING, BattleScript_TwoTurnMovesSecondTurn
setbyte sTWOTURN_STRINGID, 0x1
call BattleScriptFirstChargingTurn
goto BattleScript_MoveEnd
BattleScript_SolarbeamOnFirstTurn::
orword gHitMarker, HITMARKER_CHARGING
setmoveeffect MOVE_EFFECT_CHARGING | MOVE_EFFECT_AFFECTS_USER
seteffectprimary
ppreduce
goto BattleScript_TwoTurnMovesSecondTurn
BattleScript_EffectThunder:
setmoveeffect MOVE_EFFECT_PARALYSIS
orword gHitMarker, HITMARKER_IGNORE_ON_AIR
goto BattleScript_EffectHit
BattleScript_EffectHurricane:
setmoveeffect MOVE_EFFECT_CONFUSION
orword gHitMarker, HITMARKER_IGNORE_ON_AIR
goto BattleScript_EffectHit
BattleScript_EffectTeleport:
attackcanceler
attackstring
ppreduce
jumpifbattletype BATTLE_TYPE_TRAINER, BattleScript_ButItFailed
getifcantrunfrombattle BS_ATTACKER
jumpifbyte CMP_EQUAL, gBattleCommunication, 0x1, BattleScript_ButItFailed
jumpifbyte CMP_EQUAL, gBattleCommunication, 0x2, BattleScript_PrintAbilityMadeIneffective
attackanimation
waitanimation
printstring STRINGID_PKMNFLEDFROMBATTLE
waitmessage 0x40
setoutcomeonteleport BS_ATTACKER
goto BattleScript_MoveEnd
BattleScript_EffectBeatUp::
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
pause 0x20
ppreduce
setbyte gBattleCommunication, 0x0
BattleScript_BeatUpLoop::
movevaluescleanup
trydobeatup BattleScript_BeatUpEnd, BattleScript_ButItFailed
printstring STRINGID_PKMNATTACK
critcalc
jumpifbyte CMP_NOT_EQUAL, gIsCriticalHit, TRUE, BattleScript_BeatUpAttack
manipulatedamage ATK80_DMG_DOUBLED
BattleScript_BeatUpAttack::
adjustdamage
attackanimation
waitanimation
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
tryfaintmon BS_TARGET, FALSE, NULL
moveendto ATK49_NEXT_TARGET
goto BattleScript_BeatUpLoop
BattleScript_BeatUpEnd::
end
BattleScript_EffectSemiInvulnerable::
jumpifstatus2 BS_ATTACKER, STATUS2_MULTIPLETURNS, BattleScript_SecondTurnSemiInvulnerable
jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_NO_ATTACKSTRING, BattleScript_SecondTurnSemiInvulnerable
jumpifmove MOVE_FLY, BattleScript_FirstTurnFly
jumpifmove MOVE_DIVE, BattleScript_FirstTurnDive
jumpifmove MOVE_BOUNCE, BattleScript_FirstTurnBounce
jumpifmove MOVE_PHANTOM_FORCE, BattleScript_FirstTurnPhantomForce
jumpifmove MOVE_SHADOW_FORCE, BattleScript_FirstTurnPhantomForce
setbyte sTWOTURN_STRINGID, 0x5
goto BattleScript_FirstTurnSemiInvulnerable
BattleScript_FirstTurnBounce::
setbyte sTWOTURN_STRINGID, 0x7
goto BattleScript_FirstTurnSemiInvulnerable
BattleScript_FirstTurnDive::
setbyte sTWOTURN_STRINGID, 0x6
goto BattleScript_FirstTurnSemiInvulnerable
BattleScript_FirstTurnPhantomForce:
setbyte sTWOTURN_STRINGID, 0x8
goto BattleScript_FirstTurnSemiInvulnerable
BattleScript_FirstTurnFly::
setbyte sTWOTURN_STRINGID, 0x4
BattleScript_FirstTurnSemiInvulnerable::
call BattleScriptFirstChargingTurn
setsemiinvulnerablebit
goto BattleScript_MoveEnd
BattleScript_SecondTurnSemiInvulnerable::
attackcanceler
setmoveeffect MOVE_EFFECT_CHARGING
setbyte sB_ANIM_TURN, 0x1
clearstatusfromeffect BS_ATTACKER
orword gHitMarker, HITMARKER_NO_PPDEDUCT
argumenttomoveeffect
BattleScript_SemiInvulnerableTryHit::
accuracycheck BattleScript_SemiInvulnerableMiss, ACC_CURR_MOVE
clearsemiinvulnerablebit
goto BattleScript_HitFromAtkString
BattleScript_SemiInvulnerableMiss::
clearsemiinvulnerablebit
goto BattleScript_PrintMoveMissed
BattleScript_EffectDefenseCurl::
attackcanceler
attackstring
ppreduce
setdefensecurlbit
setstatchanger STAT_DEF, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_DefenseCurlDoStatUpAnim
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_StatUpPrintString
attackanimation
waitanimation
BattleScript_DefenseCurlDoStatUpAnim::
goto BattleScript_StatUpDoAnim
BattleScript_EffectSoftboiled::
attackcanceler
attackstring
ppreduce
tryhealhalfhealth BattleScript_AlreadyAtFullHp, BS_TARGET
BattleScript_PresentHealTarget::
attackanimation
waitanimation
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
printstring STRINGID_PKMNREGAINEDHEALTH
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_AlreadyAtFullHp::
pause 0x20
printstring STRINGID_PKMNHPFULL
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectFakeOut::
attackcanceler
jumpifnotfirstturn BattleScript_ButItFailedAtkStringPpReduce
setmoveeffect MOVE_EFFECT_FLINCH
goto BattleScript_EffectHit
BattleScript_ButItFailedAtkStringPpReduce::
attackstring
BattleScript_ButItFailedPpReduce::
ppreduce
BattleScript_ButItFailed::
pause 0x20
orhalfword gMoveResultFlags, MOVE_RESULT_FAILED
resultmessage
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_NotAffected::
pause 0x20
orhalfword gMoveResultFlags, MOVE_RESULT_DOESNT_AFFECT_FOE
resultmessage
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectUproar::
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
setmoveeffect MOVE_EFFECT_UPROAR | MOVE_EFFECT_AFFECTS_USER
attackstring
jumpifstatus2 BS_ATTACKER, STATUS2_MULTIPLETURNS, BattleScript_UproarHit
ppreduce
BattleScript_UproarHit::
goto BattleScript_HitFromCritCalc
BattleScript_EffectStockpile::
attackcanceler
attackstring
ppreduce
stockpile
attackanimation
waitanimation
printfromtable gStockpileUsedStringIds
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectSpitUp::
attackcanceler
jumpifbyte CMP_EQUAL, gBattleCommunication + 6, 0x1, BattleScript_82D9FA2
attackstring
ppreduce
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
stockpiletobasedamage BattleScript_SpitUpFail
typecalc
adjustdamage
goto BattleScript_HitFromAtkAnimation
BattleScript_SpitUpFail::
pause 0x20
printstring STRINGID_FAILEDTOSPITUP
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_82D9FA2::
attackstring
ppreduce
pause 0x40
stockpiletobasedamage BattleScript_SpitUpFail
resultmessage
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectSwallow::
attackcanceler
attackstring
ppreduce
stockpiletohpheal BattleScript_SwallowFail
goto BattleScript_PresentHealTarget
BattleScript_SwallowFail::
pause 0x20
printfromtable gSwallowFailStringIds
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectHail::
attackcanceler
attackstring
ppreduce
sethail
goto BattleScript_MoveWeatherChange
BattleScript_EffectTorment::
attackcanceler
attackstring
ppreduce
accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE
jumpifability BS_TARGET_SIDE, ABILITY_AROMA_VEIL, BattleScript_AromaVeilProtects
settorment BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_PKMNSUBJECTEDTOTORMENT
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectFlatter::
attackcanceler
jumpifsubstituteblocks BattleScript_MakeMoveMissed
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
jumpifconfusedandstatmaxed STAT_SPATK, BattleScript_ButItFailed
attackanimation
waitanimation
setstatchanger STAT_SPATK, 1, FALSE
statbuffchange STAT_CHANGE_BS_PTR, BattleScript_FlatterTryConfuse
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_FlatterTryConfuse
setgraphicalstatchangevalues
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_FlatterTryConfuse::
jumpifability BS_TARGET, ABILITY_OWN_TEMPO, BattleScript_OwnTempoPrevents
jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, BattleScript_SafeguardProtected
setmoveeffect MOVE_EFFECT_CONFUSION
seteffectprimary
goto BattleScript_MoveEnd
BattleScript_EffectWillOWisp::
attackcanceler
attackstring
ppreduce
jumpifsubstituteblocks BattleScript_ButItFailed
jumpifstatus BS_TARGET, STATUS1_BURN, BattleScript_AlreadyBurned
jumpiftype BS_TARGET, TYPE_FIRE, BattleScript_NotAffected
jumpifability BS_TARGET, ABILITY_WATER_VEIL, BattleScript_WaterVeilPrevents
jumpifflowerveil BattleScript_FlowerVeilProtects
jumpifstatus BS_TARGET, STATUS1_ANY, BattleScript_ButItFailed
accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE
jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, BattleScript_SafeguardProtected
attackanimation
waitanimation
setmoveeffect MOVE_EFFECT_BURN
seteffectprimary
goto BattleScript_MoveEnd
BattleScript_WaterVeilPrevents::
copybyte gEffectBattler, gBattlerTarget
setbyte cMULTISTRING_CHOOSER, 0x0
call BattleScript_BRNPrevention
goto BattleScript_MoveEnd
BattleScript_AlreadyBurned::
setalreadystatusedmoveattempt BS_ATTACKER
pause 0x20
printstring STRINGID_PKMNALREADYHASBURN
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectMemento::
attackcanceler
jumpifbyte CMP_EQUAL, gBattleCommunication + 6, 0x1, BattleScript_82DA153
attackstring
ppreduce
jumpifattackandspecialattackcannotfall BattleScript_ButItFailed
setatkhptozero
attackanimation
waitanimation
jumpifsubstituteblocks BattleScript_EffectMementoPrintNoEffect
setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_TARGET, BIT_ATK | BIT_SPATK, ATK48_STAT_NEGATIVE | ATK48_STAT_BY_TWO | ATK48_ONLY_MULTIPLE
playstatchangeanimation BS_TARGET, BIT_ATK, ATK48_STAT_NEGATIVE | ATK48_STAT_BY_TWO
setstatchanger STAT_ATK, 2, TRUE
statbuffchange STAT_CHANGE_BS_PTR, BattleScript_EffectMementoTrySpAtk
jumpifbyte CMP_GREATER_THAN, cMULTISTRING_CHOOSER, 0x1, BattleScript_EffectMementoTrySpAtk
printfromtable gStatDownStringIds
waitmessage 0x40
BattleScript_EffectMementoTrySpAtk:
playstatchangeanimation BS_TARGET, BIT_SPATK, ATK48_STAT_NEGATIVE | ATK48_STAT_BY_TWO
setstatchanger STAT_SPATK, 2, TRUE
statbuffchange STAT_CHANGE_BS_PTR, BattleScript_EffectMementoTryFaint
jumpifbyte CMP_GREATER_THAN, cMULTISTRING_CHOOSER, 0x1, BattleScript_EffectMementoTryFaint
printfromtable gStatDownStringIds
waitmessage 0x40
BattleScript_EffectMementoTryFaint:
tryfaintmon BS_ATTACKER, FALSE, NULL
goto BattleScript_MoveEnd
BattleScript_EffectMementoPrintNoEffect:
printstring STRINGID_BUTNOEFFECT
waitmessage 0x40
goto BattleScript_EffectMementoTryFaint
BattleScript_82DA153:
attackstring
ppreduce
jumpifattackandspecialattackcannotfall BattleScript_82DA15A
BattleScript_82DA15A:
setatkhptozero
pause 0x40
effectivenesssound
resultmessage
waitmessage 0x40
tryfaintmon BS_ATTACKER, FALSE, NULL
goto BattleScript_MoveEnd
BattleScript_EffectFocusPunch::
attackcanceler
jumpifnodamage BattleScript_HitFromAccCheck
ppreduce
printstring STRINGID_PKMNLOSTFOCUS
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectSmellingsalt:
BattleScript_EffectWakeUpSlap:
BattleScript_EffectSparklingAria:
jumpifsubstituteblocks BattleScript_EffectHit
setmoveeffect MOVE_EFFECT_REMOVE_STATUS | MOVE_EFFECT_CERTAIN
goto BattleScript_EffectHit
BattleScript_EffectFollowMe::
attackcanceler
attackstring
ppreduce
setforcedtarget
attackanimation
waitanimation
printstring STRINGID_PKMNCENTERATTENTION
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectNaturePower::
attackcanceler
attackstring
pause 0x20
callterrainattack
printstring STRINGID_NATUREPOWERTURNEDINTO
waitmessage 0x40
return
BattleScript_EffectCharge::
attackcanceler
attackstring
ppreduce
setcharge
attackanimation
waitanimation
printstring STRINGID_PKMNCHARGINGPOWER
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectTaunt::
attackcanceler
attackstring
ppreduce
jumpifability BS_TARGET_SIDE, ABILITY_AROMA_VEIL, BattleScript_AromaVeilProtects
accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE
settaunt BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_PKMNFELLFORTAUNT
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectHelpingHand::
attackcanceler
attackstring
ppreduce
trysethelpinghand BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_PKMNREADYTOHELP
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectTrick::
attackcanceler
attackstring
ppreduce
jumpifsubstituteblocks BattleScript_ButItFailed
accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE
tryswapitems BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_PKMNSWITCHEDITEMS
waitmessage 0x40
printfromtable gItemSwapStringIds
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectRolePlay::
attackcanceler
attackstring
ppreduce
accuracycheck BattleScript_ButItFailed, NO_ACC_CALC_CHECK_LOCK_ON
trycopyability BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_PKMNCOPIEDFOE
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectWish::
attackcanceler
attackstring
ppreduce
trywish 0x0, BattleScript_ButItFailed
attackanimation
waitanimation
goto BattleScript_MoveEnd
BattleScript_EffectAssist:
attackcanceler
attackstring
assistattackselect BattleScript_ButItFailedPpReduce
attackanimation
waitanimation
setbyte sB_ANIM_TURN, 0x0
setbyte sB_ANIM_TARGETS_HIT, 0x0
jumptocalledmove TRUE
BattleScript_EffectIngrain:
attackcanceler
attackstring
ppreduce
setuserstatus3 STATUS3_ROOTED BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_PKMNPLANTEDROOTS
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectSuperpower:
setmoveeffect MOVE_EFFECT_ATK_DEF_DOWN | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN
goto BattleScript_EffectHit
BattleScript_EffectCloseCombat:
setmoveeffect MOVE_EFFECT_DEF_SPDEF_DOWN | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN
goto BattleScript_EffectHit
BattleScript_EffectMagicCoat:
attackcanceler
trysetmagiccoat BattleScript_ButItFailedAtkStringPpReduce
attackstring
ppreduce
attackanimation
waitanimation
printstring STRINGID_PKMNSHROUDEDITSELF
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectRecycle::
attackcanceler
attackstring
ppreduce
tryrecycleitem BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_XFOUNDONEY
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectBrickBreak::
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
removelightscreenreflect
critcalc
damagecalc
adjustdamage
jumpifbyte CMP_EQUAL, sB_ANIM_TURN, 0x0, BattleScript_BrickBreakAnim
bichalfword gMoveResultFlags, MOVE_RESULT_MISSED | MOVE_RESULT_DOESNT_AFFECT_FOE
BattleScript_BrickBreakAnim::
attackanimation
waitanimation
jumpifbyte CMP_LESS_THAN, sB_ANIM_TURN, 0x2, BattleScript_BrickBreakDoHit
printstring STRINGID_THEWALLSHATTERED
waitmessage 0x40
BattleScript_BrickBreakDoHit::
typecalc
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
seteffectwithchance
tryfaintmon BS_TARGET, FALSE, NULL
goto BattleScript_MoveEnd
BattleScript_EffectYawn::
attackcanceler
attackstring
ppreduce
jumpifability BS_TARGET, ABILITY_VITAL_SPIRIT, BattleScript_PrintBankAbilityMadeIneffective
jumpifability BS_TARGET, ABILITY_INSOMNIA, BattleScript_PrintBankAbilityMadeIneffective
jumpifflowerveil BattleScript_FlowerVeilProtects
jumpifsubstituteblocks BattleScript_ButItFailed
jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, BattleScript_SafeguardProtected
accuracycheck BattleScript_ButItFailed, NO_ACC_CALC_CHECK_LOCK_ON
jumpifcantmakeasleep BattleScript_ButItFailed
setyawn BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_PKMNWASMADEDROWSY
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_PrintBankAbilityMadeIneffective::
copybyte sBATTLER, gBattlerAbility
BattleScript_PrintAbilityMadeIneffective::
pause 0x20
printstring STRINGID_PKMNSXMADEITINEFFECTIVE
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectKnockOff::
setmoveeffect MOVE_EFFECT_KNOCK_OFF
goto BattleScript_EffectHit
BattleScript_EffectEndeavor::
attackcanceler
attackstring
ppreduce
setdamagetohealthdifference BattleScript_ButItFailed
copyword gHpDealt, gBattleMoveDamage
accuracycheck BattleScript_MoveMissedPause, ACC_CURR_MOVE
typecalc
jumpifmovehadnoeffect BattleScript_HitFromAtkAnimation
bichalfword gMoveResultFlags, MOVE_RESULT_SUPER_EFFECTIVE | MOVE_RESULT_NOT_VERY_EFFECTIVE
copyword gBattleMoveDamage, gHpDealt
adjustdamage
goto BattleScript_HitFromAtkAnimation
BattleScript_EffectSkillSwap:
attackcanceler
attackstring
ppreduce
accuracycheck BattleScript_ButItFailed, NO_ACC_CALC_CHECK_LOCK_ON
tryswapabilities BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_PKMNSWAPPEDABILITIES
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectImprison::
attackcanceler
attackstring
ppreduce
tryimprison BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_PKMNSEALEDOPPONENTMOVE
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectRefresh:
attackcanceler
attackstring
ppreduce
cureifburnedparalysedorpoisoned BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_PKMNSTATUSNORMAL
waitmessage 0x40
updatestatusicon BS_ATTACKER
goto BattleScript_MoveEnd
BattleScript_EffectGrudge:
attackcanceler
attackstring
ppreduce
setuserstatus3 STATUS3_GRUDGE BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_PKMNWANTSGRUDGE
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectSnatch:
attackcanceler
trysetsnatch BattleScript_ButItFailedAtkStringPpReduce
attackstring
ppreduce
attackanimation
waitanimation
pause 0x20
printstring STRINGID_PKMNWAITSFORTARGET
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectSecretPower::
getsecretpowereffect
goto BattleScript_EffectHit
BattleScript_EffectDoubleEdge::
setmoveeffect MOVE_EFFECT_RECOIL_33 | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN
goto BattleScript_EffectHit
BattleScript_EffectRecoil33WithStatus:
setmoveeffect MOVE_EFFECT_RECOIL_33_STATUS | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN
goto BattleScript_EffectHit
BattleScript_EffectRecoil50:
setmoveeffect MOVE_EFFECT_RECOIL_50 | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN
goto BattleScript_EffectHit
BattleScript_EffectTeeterDance::
attackcanceler
attackstring
ppreduce
setbyte gBattlerTarget, 0x0
BattleScript_TeeterDanceLoop::
movevaluescleanup
setmoveeffect MOVE_EFFECT_CONFUSION
jumpifbyteequal gBattlerAttacker, gBattlerTarget, BattleScript_TeeterDanceLoopIncrement
jumpifability BS_TARGET, ABILITY_OWN_TEMPO, BattleScript_TeeterDanceOwnTempoPrevents
jumpifsubstituteblocks BattleScript_TeeterDanceSubstitutePrevents
jumpifstatus2 BS_TARGET, STATUS2_CONFUSION, BattleScript_TeeterDanceAlreadyConfused
jumpifhasnohp BS_TARGET, BattleScript_TeeterDanceLoopIncrement
accuracycheck BattleScript_TeeterDanceMissed, ACC_CURR_MOVE
jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, BattleScript_TeeterDanceSafeguardProtected
attackanimation
waitanimation
seteffectprimary
resultmessage
waitmessage 0x40
BattleScript_TeeterDanceDoMoveEndIncrement::
moveendto ATK49_NEXT_TARGET
BattleScript_TeeterDanceLoopIncrement::
addbyte gBattlerTarget, 0x1
jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_TeeterDanceLoop
end
BattleScript_TeeterDanceOwnTempoPrevents::
pause 0x20
printstring STRINGID_PKMNPREVENTSCONFUSIONWITH
waitmessage 0x40
goto BattleScript_TeeterDanceDoMoveEndIncrement
BattleScript_TeeterDanceSafeguardProtected::
pause 0x20
printstring STRINGID_PKMNUSEDSAFEGUARD
waitmessage 0x40
goto BattleScript_TeeterDanceDoMoveEndIncrement
BattleScript_TeeterDanceSubstitutePrevents::
pause 0x20
printstring STRINGID_BUTITFAILED
waitmessage 0x40
goto BattleScript_TeeterDanceDoMoveEndIncrement
BattleScript_TeeterDanceAlreadyConfused::
setalreadystatusedmoveattempt BS_ATTACKER
pause 0x20
printstring STRINGID_PKMNALREADYCONFUSED
waitmessage 0x40
goto BattleScript_TeeterDanceDoMoveEndIncrement
BattleScript_TeeterDanceMissed::
resultmessage
waitmessage 0x40
goto BattleScript_TeeterDanceDoMoveEndIncrement
BattleScript_EffectMudSport::
BattleScript_EffectWaterSport::
attackcanceler
attackstring
ppreduce
settypebasedhalvers BattleScript_ButItFailed
attackanimation
waitanimation
printfromtable gSportsUsedStringIds
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectPoisonFang::
setmoveeffect MOVE_EFFECT_TOXIC
goto BattleScript_EffectHit
BattleScript_EffectOverheat::
setmoveeffect MOVE_EFFECT_SP_ATK_TWO_DOWN | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN
goto BattleScript_EffectHit
BattleScript_EffectHammerArm::
setmoveeffect MOVE_EFFECT_SPD_MINUS_1 | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN
goto BattleScript_EffectHit
BattleScript_EffectTickle::
attackcanceler
attackstring
ppreduce
jumpifstat BS_TARGET, CMP_GREATER_THAN, STAT_ATK, 0x0, BattleScript_TickleDoMoveAnim
jumpifstat BS_TARGET, CMP_EQUAL, STAT_DEF, 0x0, BattleScript_CantLowerMultipleStats
BattleScript_TickleDoMoveAnim::
accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE
attackanimation
waitanimation
setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_TARGET, BIT_ATK | BIT_DEF, ATK48_STAT_NEGATIVE | ATK48_ONLY_MULTIPLE
playstatchangeanimation BS_TARGET, BIT_ATK, ATK48_STAT_NEGATIVE
setstatchanger STAT_ATK, 1, TRUE
statbuffchange STAT_CHANGE_BS_PTR, BattleScript_TickleTryLowerDef
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_TickleTryLowerDef
printfromtable gStatDownStringIds
waitmessage 0x40
BattleScript_TickleTryLowerDef::
playstatchangeanimation BS_TARGET, BIT_DEF, ATK48_STAT_NEGATIVE
setstatchanger STAT_DEF, 1, TRUE
statbuffchange STAT_CHANGE_BS_PTR, BattleScript_TickleEnd
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_TickleEnd
printfromtable gStatDownStringIds
waitmessage 0x40
BattleScript_TickleEnd::
goto BattleScript_MoveEnd
BattleScript_CantLowerMultipleStats::
pause 0x20
orhalfword gMoveResultFlags, MOVE_RESULT_FAILED
printstring STRINGID_STATSWONTDECREASE2
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectCosmicPower::
attackcanceler
attackstring
ppreduce
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_DEF, 0xC, BattleScript_CosmicPowerDoMoveAnim
jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_SPDEF, 0xC, BattleScript_CantRaiseMultipleStats
BattleScript_CosmicPowerDoMoveAnim::
attackanimation
waitanimation
setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_ATTACKER, BIT_DEF | BIT_SPDEF, 0x0
setstatchanger STAT_DEF, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_CosmicPowerTrySpDef
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_CosmicPowerTrySpDef
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_CosmicPowerTrySpDef::
setstatchanger STAT_SPDEF, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_CosmicPowerEnd
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_CosmicPowerEnd
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_CosmicPowerEnd::
goto BattleScript_MoveEnd
BattleScript_EffectSkyUppercut::
orword gHitMarker, HITMARKER_IGNORE_ON_AIR
goto BattleScript_EffectHit
BattleScript_EffectBulkUp::
attackcanceler
attackstring
ppreduce
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_ATK, 0xC, BattleScript_BulkUpDoMoveAnim
jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_DEF, 0xC, BattleScript_CantRaiseMultipleStats
BattleScript_BulkUpDoMoveAnim::
attackanimation
waitanimation
setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_DEF, 0x0
setstatchanger STAT_ATK, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_BulkUpTryDef
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_BulkUpTryDef
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_BulkUpTryDef::
setstatchanger STAT_DEF, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_BulkUpEnd
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_BulkUpEnd
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_BulkUpEnd::
goto BattleScript_MoveEnd
BattleScript_EffectCalmMind::
attackcanceler
attackstring
ppreduce
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_SPATK, 0xC, BattleScript_CalmMindDoMoveAnim
jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_SPDEF, 0xC, BattleScript_CantRaiseMultipleStats
BattleScript_CalmMindDoMoveAnim::
attackanimation
waitanimation
setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_ATTACKER, BIT_SPATK | BIT_SPDEF, 0x0
setstatchanger STAT_SPATK, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_CalmMindTrySpDef
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_CalmMindTrySpDef
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_CalmMindTrySpDef::
setstatchanger STAT_SPDEF, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_CalmMindEnd
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_CalmMindEnd
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_CalmMindEnd::
goto BattleScript_MoveEnd
BattleScript_CantRaiseMultipleStats::
pause 0x20
orhalfword gMoveResultFlags, MOVE_RESULT_FAILED
printstring STRINGID_STATSWONTINCREASE2
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectDragonDance::
attackcanceler
attackstring
ppreduce
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_ATK, 0xC, BattleScript_DragonDanceDoMoveAnim
jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_SPEED, 0xC, BattleScript_CantRaiseMultipleStats
BattleScript_DragonDanceDoMoveAnim::
attackanimation
waitanimation
setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_SPEED, 0x0
setstatchanger STAT_ATK, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_DragonDanceTrySpeed
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_DragonDanceTrySpeed
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_DragonDanceTrySpeed::
setstatchanger STAT_SPEED, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_DragonDanceEnd
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_DragonDanceEnd
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_DragonDanceEnd::
goto BattleScript_MoveEnd
BattleScript_EffectCamouflage::
attackcanceler
attackstring
ppreduce
settypetoterrain BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_PKMNCHANGEDTYPE
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_FaintAttacker::
playfaintcry BS_ATTACKER
pause 0x40
dofaintanimation BS_ATTACKER
cleareffectsonfaint BS_ATTACKER
printstring STRINGID_ATTACKERFAINTED
trytrainerslidefirstdownmsg BS_ATTACKER
return
BattleScript_FaintTarget::
playfaintcry BS_TARGET
pause 0x40
dofaintanimation BS_TARGET
cleareffectsonfaint BS_TARGET
printstring STRINGID_TARGETFAINTED
tryactivatemoxie BS_ATTACKER
tryactivatefellstinger BS_ATTACKER
trytrainerslidefirstdownmsg BS_TARGET
return
BattleScript_GiveExp::
setbyte sGIVEEXP_STATE, 0x0
getexp BS_TARGET
end2
BattleScript_HandleFaintedMon::
atk24 BattleScript_82DA8F6
jumpifbyte CMP_NOT_EQUAL, gBattleOutcome, 0, BattleScript_FaintedMonEnd
jumpifbattletype BATTLE_TYPE_TRAINER | BATTLE_TYPE_DOUBLE, BattleScript_FaintedMonTryChooseAnother
jumpifword CMP_NO_COMMON_BITS, gHitMarker, HITMARKER_x400000, BattleScript_FaintedMonTryChooseAnother
printstring STRINGID_USENEXTPKMN
setbyte gBattleCommunication, 0x0
yesnobox
jumpifbyte CMP_EQUAL, gBattleCommunication + 1, 0x0, BattleScript_FaintedMonTryChooseAnother
jumpifplayerran BattleScript_FaintedMonEnd
printstring STRINGID_CANTESCAPE2
BattleScript_FaintedMonTryChooseAnother::
openpartyscreen 0x3, BattleScript_FaintedMonEnd
switchhandleorder BS_FAINTED, 0x2
jumpifnotbattletype BATTLE_TYPE_TRAINER, BattleScript_FaintedMonChooseAnother
jumpifbattletype BATTLE_TYPE_LINK, BattleScript_FaintedMonChooseAnother
jumpifbattletype BATTLE_TYPE_x2000000, BattleScript_FaintedMonChooseAnother
jumpifbattletype BATTLE_TYPE_FRONTIER, BattleScript_FaintedMonChooseAnother
jumpifbattletype BATTLE_TYPE_DOUBLE, BattleScript_FaintedMonChooseAnother
jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_x400000, BattleScript_FaintedMonChooseAnother
jumpifbyte CMP_EQUAL, sBATTLE_STYLE, 0x1, BattleScript_FaintedMonChooseAnother
jumpifcantswitch 11, BattleScript_FaintedMonChooseAnother
printstring STRINGID_ENEMYABOUTTOSWITCHPKMN
setbyte gBattleCommunication, 0x0
yesnobox
jumpifbyte CMP_EQUAL, gBattleCommunication + 1, 0x1, BattleScript_FaintedMonChooseAnother
setatktoplayer0
openpartyscreen 0x81, BattleScript_FaintedMonChooseAnother
switchhandleorder BS_ATTACKER, 0x2
jumpifbyte CMP_EQUAL, gBattleCommunication, 0x6, BattleScript_FaintedMonChooseAnother
atknameinbuff1
resetintrimidatetracebits BS_ATTACKER
hpthresholds2 BS_ATTACKER
printstring STRINGID_RETURNMON
switchoutabilities BS_ATTACKER
waitstate
returnatktoball
waitstate
drawpartystatussummary BS_ATTACKER
getswitchedmondata BS_ATTACKER
switchindataupdate BS_ATTACKER
hpthresholds BS_ATTACKER
printstring STRINGID_SWITCHINMON
hidepartystatussummary BS_ATTACKER
switchinanim BS_ATTACKER, 0x0
waitstate
switchineffects BS_ATTACKER
resetsentmonsvalue
BattleScript_FaintedMonChooseAnother::
drawpartystatussummary BS_FAINTED
getswitchedmondata BS_FAINTED
switchindataupdate BS_FAINTED
hpthresholds BS_FAINTED
printstring STRINGID_SWITCHINMON
hidepartystatussummary BS_FAINTED
switchinanim BS_FAINTED, FALSE
waitstate
various7 BS_ATTACKER
trytrainerslidelastonmsg BS_FAINTED
switchineffects BS_FAINTED
jumpifbattletype BATTLE_TYPE_DOUBLE, BattleScript_FaintedMonEnd
cancelallactions
BattleScript_FaintedMonEnd::
end2
BattleScript_82DA8F6::
openpartyscreen 0x5, BattleScript_82DA8FC
BattleScript_82DA8FC::
switchhandleorder BS_FAINTED, 0x0
openpartyscreen 0x6, BattleScript_82DA92C
switchhandleorder BS_FAINTED, 0x0
BattleScript_82DA908::
switchhandleorder BS_FAINTED, 0x3
drawpartystatussummary BS_FAINTED
getswitchedmondata BS_FAINTED
switchindataupdate BS_FAINTED
hpthresholds BS_FAINTED
printstring STRINGID_SWITCHINMON
hidepartystatussummary BS_FAINTED
switchinanim BS_FAINTED, FALSE
waitstate
switchineffects 5
jumpifbytenotequal gBattlerFainted, gBattlersCount, BattleScript_82DA908
BattleScript_82DA92C::
end2
BattleScript_LocalTrainerBattleWon::
jumpifbattletype BATTLE_TYPE_TWO_OPPONENTS, BattleScript_LocalTwoTrainersDefeated
printstring STRINGID_PLAYERDEFEATEDTRAINER1
goto BattleScript_LocalBattleWonLoseTexts
BattleScript_LocalTwoTrainersDefeated::
printstring STRINGID_TWOENEMIESDEFEATED
BattleScript_LocalBattleWonLoseTexts::
trainerslidein BS_ATTACKER
waitstate
printstring STRINGID_TRAINER1LOSETEXT
jumpifnotbattletype BATTLE_TYPE_TWO_OPPONENTS, BattleScript_LocalBattleWonReward
trainerslideout B_POSITION_OPPONENT_LEFT
waitstate
trainerslidein BS_FAINTED
waitstate
printstring STRINGID_TRAINER2LOSETEXT
BattleScript_LocalBattleWonReward::
getmoneyreward
printstring STRINGID_PLAYERGOTMONEY
waitmessage 0x40
BattleScript_PayDayMoneyAndPickUpItems::
givepaydaymoney
pickup
end2
BattleScript_LocalBattleLost::
jumpifbattletype BATTLE_TYPE_DOME, BattleScript_CheckDomeDrew
jumpifbattletype BATTLE_TYPE_FRONTIER, BattleScript_LocalBattleLostPrintTrainersWinText
jumpifbattletype BATTLE_TYPE_TRAINER_HILL, BattleScript_LocalBattleLostPrintTrainersWinText
jumpifbattletype BATTLE_TYPE_EREADER_TRAINER, BattleScript_LocalBattleLostEnd
jumpifhalfword CMP_EQUAL, gTrainerBattleOpponent_A, 0x400, BattleScript_LocalBattleLostEnd
BattleScript_LocalBattleLostPrintWhiteOut::
printstring STRINGID_PLAYERWHITEOUT
waitmessage 0x40
printstring STRINGID_PLAYERWHITEOUT2
waitmessage 0x40
BattleScript_LocalBattleLostEnd::
end2
BattleScript_CheckDomeDrew::
jumpifbyte CMP_EQUAL, gBattleOutcome, B_OUTCOME_DREW, BattleScript_LocalBattleLostEnd_
BattleScript_LocalBattleLostPrintTrainersWinText::
jumpifnotbattletype BATTLE_TYPE_TRAINER, BattleScript_LocalBattleLostPrintWhiteOut
returnopponentmon1toball BS_ATTACKER
waitstate
returnopponentmon2toball BS_ATTACKER
waitstate
trainerslidein BS_ATTACKER
waitstate
printstring STRINGID_TRAINER1WINTEXT
jumpifbattletype BATTLE_TYPE_x800000, BattleScript_LocalBattleLostDoTrainer2WinText
jumpifnotbattletype BATTLE_TYPE_TWO_OPPONENTS, BattleScript_LocalBattleLostEnd_
BattleScript_LocalBattleLostDoTrainer2WinText::
trainerslideout B_POSITION_OPPONENT_LEFT
waitstate
trainerslidein BS_FAINTED
waitstate
printstring STRINGID_TRAINER2WINTEXT
BattleScript_LocalBattleLostEnd_::
end2
BattleScript_82DAA0B::
returnopponentmon1toball BS_ATTACKER
waitstate
returnopponentmon2toball BS_ATTACKER
waitstate
trainerslidein BS_ATTACKER
waitstate
printstring STRINGID_TRAINER1WINTEXT
trainerslideout B_POSITION_OPPONENT_LEFT
waitstate
trainerslidein BS_FAINTED
waitstate
printstring STRINGID_TRAINER2WINTEXT
jumpifbattletype BATTLE_TYPE_RECORDED, BattleScript_82DAA31
atk57
BattleScript_82DAA31::
waitmessage 0x40
end2
BattleScript_LinkBattleWonOrLost::
jumpifbattletype BATTLE_TYPE_BATTLE_TOWER, BattleScript_82DAA5C
printstring STRINGID_BATTLEEND
waitmessage 0x40
jumpifbattletype BATTLE_TYPE_RECORDED, BattleScript_LinkBattleWonOrLostWaitEnd
atk57
BattleScript_LinkBattleWonOrLostWaitEnd::
waitmessage 0x40
end2
BattleScript_82DAA5C::
playtrainerdefeatbgm BS_ATTACKER
printstring STRINGID_BATTLEEND
waitmessage 0x40
trainerslidein BS_ATTACKER
waitstate
printstring STRINGID_TRAINER1LOSETEXT
trainerslideout B_POSITION_OPPONENT_LEFT
waitstate
trainerslidein BS_FAINTED
waitstate
printstring STRINGID_TRAINER2LOSETEXT
jumpifbattletype BATTLE_TYPE_RECORDED, BattleScript_82DAA83
atk57
BattleScript_82DAA83::
waitmessage 0x40
end2
BattleScript_FrontierTrainerBattleWon::
jumpifnotbattletype BATTLE_TYPE_TRAINER, BattleScript_PayDayMoneyAndPickUpItems
jumpifbattletype BATTLE_TYPE_TWO_OPPONENTS, BattleScript_FrontierTrainerBattleWon_TwoDefeated
printstring STRINGID_PLAYERDEFEATEDTRAINER1
goto BattleScript_FrontierTrainerBattleWon_LoseTexts
BattleScript_FrontierTrainerBattleWon_TwoDefeated:
printstring STRINGID_TWOENEMIESDEFEATED
BattleScript_FrontierTrainerBattleWon_LoseTexts:
trainerslidein BS_ATTACKER
waitstate
printstring STRINGID_TRAINER1LOSETEXT
jumpifnotbattletype BATTLE_TYPE_TWO_OPPONENTS, BattleScript_82DAACB
trainerslideout B_POSITION_OPPONENT_LEFT
waitstate
trainerslidein BS_FAINTED
waitstate
printstring STRINGID_TRAINER2LOSETEXT
BattleScript_82DAACB:
jumpifnotbattletype BATTLE_TYPE_PYRAMID, BattleScript_FrontierTrainerBattleWon_End
pickup
BattleScript_FrontierTrainerBattleWon_End:
end2
BattleScript_SmokeBallEscape::
playanimation BS_ATTACKER, B_ANIM_SMOKEBALL_ESCAPE, NULL
printstring STRINGID_PKMNFLEDUSINGITS
waitmessage 0x40
end2
BattleScript_RanAwayUsingMonAbility::
printstring STRINGID_PKMNFLEDUSING
waitmessage 0x40
end2
BattleScript_GotAwaySafely::
printstring STRINGID_GOTAWAYSAFELY
waitmessage 0x40
end2
BattleScript_WildMonFled::
printstring STRINGID_WILDPKMNFLED
waitmessage 0x40
end2
BattleScript_PrintCantRunFromTrainer::
printstring STRINGID_NORUNNINGFROMTRAINERS
end2
BattleScript_PrintFailedToRunString::
printfromtable gNoEscapeStringIds
waitmessage 0x40
end2
BattleScript_PrintCantEscapeFromBattle::
printselectionstringfromtable gNoEscapeStringIds
endselectionscript
BattleScript_PrintFullBox::
printselectionstring STRINGID_BOXISFULL
endselectionscript
BattleScript_ActionSwitch::
hpthresholds2 BS_ATTACKER
printstring STRINGID_RETURNMON
jumpifbattletype BATTLE_TYPE_DOUBLE, BattleScript_PursuitSwitchDmgSetMultihit
setmultihit 0x1
goto BattleScript_PursuitSwitchDmgLoop
BattleScript_PursuitSwitchDmgSetMultihit::
setmultihit 0x2
BattleScript_PursuitSwitchDmgLoop::
jumpifnopursuitswitchdmg BattleScript_DoSwitchOut
swapattackerwithtarget
trysetdestinybondtohappen
call BattleScript_PursuitDmgOnSwitchOut
swapattackerwithtarget
BattleScript_DoSwitchOut::
decrementmultihit BattleScript_PursuitSwitchDmgLoop
switchoutabilities BS_ATTACKER
waitstate
returnatktoball
waitstate
drawpartystatussummary BS_ATTACKER
switchhandleorder BS_ATTACKER, 0x1
getswitchedmondata BS_ATTACKER
switchindataupdate BS_ATTACKER
hpthresholds BS_ATTACKER
printstring STRINGID_SWITCHINMON
hidepartystatussummary BS_ATTACKER
switchinanim BS_ATTACKER, FALSE
waitstate
switchineffects BS_ATTACKER
moveendcase ATK49_STATUS_IMMUNITY_ABILITIES
moveendcase ATK49_MIRROR_MOVE
end2
BattleScript_PursuitDmgOnSwitchOut::
pause 0x20
attackstring
ppreduce
critcalc
damagecalc
adjustdamage
attackanimation
waitanimation
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
tryfaintmon BS_TARGET, FALSE, NULL
moveendfromto ATK49_MOVE_END_ABILITIES, ATK49_CHOICE_MOVE
various4 BS_TARGET
jumpifbyte CMP_EQUAL, gBattleCommunication, 0x0, BattleScript_PursuitDmgOnSwitchOutRet
setbyte sGIVEEXP_STATE, 0x0
getexp BS_TARGET
BattleScript_PursuitDmgOnSwitchOutRet:
return
BattleScript_Pausex20::
pause 0x20
return
BattleScript_LevelUp::
fanfare MUS_FANFA1
printstring STRINGID_PKMNGREWTOLV
setbyte sLVLBOX_STATE, 0x0
drawlvlupbox
handlelearnnewmove BattleScript_LearnedNewMove, BattleScript_LearnMoveReturn, TRUE
goto BattleScript_AskToLearnMove
BattleScript_TryLearnMoveLoop::
handlelearnnewmove BattleScript_LearnedNewMove, BattleScript_LearnMoveReturn, FALSE
BattleScript_AskToLearnMove::
buffermovetolearn
printstring STRINGID_TRYTOLEARNMOVE1
printstring STRINGID_TRYTOLEARNMOVE2
printstring STRINGID_TRYTOLEARNMOVE3
waitstate
setbyte sLEARNMOVE_STATE, 0x0
yesnoboxlearnmove BattleScript_ForgotAndLearnedNewMove
printstring STRINGID_STOPLEARNINGMOVE
waitstate
setbyte sLEARNMOVE_STATE, 0x0
yesnoboxstoplearningmove BattleScript_AskToLearnMove
printstring STRINGID_DIDNOTLEARNMOVE
goto BattleScript_TryLearnMoveLoop
BattleScript_ForgotAndLearnedNewMove::
printstring STRINGID_123POOF
printstring STRINGID_PKMNFORGOTMOVE
printstring STRINGID_ANDELLIPSIS
BattleScript_LearnedNewMove::
buffermovetolearn
fanfare MUS_FANFA1
printstring STRINGID_PKMNLEARNEDMOVE
waitmessage 0x40
updatechoicemoveonlvlup BS_ATTACKER
goto BattleScript_TryLearnMoveLoop
BattleScript_LearnMoveReturn::
return
BattleScript_RainContinuesOrEnds::
printfromtable gRainContinuesStringIds
waitmessage 0x40
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_RainContinuesOrEndsEnd
playanimation BS_ATTACKER, B_ANIM_RAIN_CONTINUES, NULL
BattleScript_RainContinuesOrEndsEnd::
end2
BattleScript_DamagingWeatherContinues::
printfromtable gSandStormHailContinuesStringIds
waitmessage 0x40
playanimation2 BS_ATTACKER, sB_ANIM_ARG1, NULL
setbyte gBattleCommunication, 0x0
BattleScript_DamagingWeatherLoop::
copyarraywithindex gBattlerAttacker, gBattlerByTurnOrder, gBattleCommunication, 0x1
weatherdamage
jumpifword CMP_EQUAL, gBattleMoveDamage, 0x0, BattleScript_DamagingWeatherLoopIncrement
jumpifword CMP_COMMON_BITS gBattleMoveDamage, 1 << 31, BattleScript_DamagingWeatherHeal
printfromtable gSandStormHailDmgStringIds
waitmessage 0x40
effectivenesssound
hitanimation BS_ATTACKER
goto BattleScript_DamagingWeatherHpChange
BattleScript_DamagingWeatherHeal:
printstring STRINGID_ICEBODYHPGAIN
waitmessage 0x40
BattleScript_DamagingWeatherHpChange:
orword gHitMarker, HITMARKER_x20 | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000 | HITMARKER_GRUDGE
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
tryfaintmon BS_ATTACKER, FALSE, NULL
atk24 BattleScript_DamagingWeatherLoopIncrement
BattleScript_DamagingWeatherLoopIncrement::
jumpifbyte CMP_NOT_EQUAL, gBattleOutcome, 0, BattleScript_DamagingWeatherContinuesEnd
addbyte gBattleCommunication, 0x1
jumpifbytenotequal gBattleCommunication, gBattlersCount, BattleScript_DamagingWeatherLoop
BattleScript_DamagingWeatherContinuesEnd::
bicword gHitMarker, HITMARKER_x20 | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000 | HITMARKER_GRUDGE
end2
BattleScript_SandStormHailEnds::
printfromtable gSandStormHailEndStringIds
waitmessage 0x40
end2
BattleScript_SunlightContinues::
printstring STRINGID_SUNLIGHTSTRONG
waitmessage 0x40
playanimation BS_ATTACKER, B_ANIM_SUN_CONTINUES, NULL
end2
BattleScript_SunlightFaded::
printstring STRINGID_SUNLIGHTFADED
waitmessage 0x40
end2
BattleScript_OverworldWeatherStarts::
printfromtable gWeatherContinuesStringIds
waitmessage 0x40
playanimation2 BS_ATTACKER, sB_ANIM_ARG1, NULL
end3
BattleScript_SideStatusWoreOff::
printstring STRINGID_PKMNSXWOREOFF
waitmessage 0x40
end2
BattleScript_SideStatusWoreOffReturn::
printstring STRINGID_PKMNSXWOREOFF
waitmessage 0x40
return
BattleScript_LuckyChantEnds::
printstring STRINGID_LUCKYCHANTENDS
waitmessage 0x40
end2
BattleScript_TailwindEnds::
printstring STRINGID_TAILWINDENDS
waitmessage 0x40
end2
BattleScript_TrickRoomEnds::
printstring STRINGID_TRICKROOMENDS
waitmessage 0x40
end2
BattleScript_WonderRoomEnds::
printstring STRINGID_WONDERROOMENDS
waitmessage 0x40
end2
BattleScript_MagicRoomEnds::
printstring STRINGID_MAGICROOMENDS
waitmessage 0x40
end2
BattleScript_ElectricTerrainEnds::
printstring STRINGID_ELECTRICTERRAINENDS
waitmessage 0x40
end2
BattleScript_MistyTerrainEnds::
printstring STRINGID_MISTYTERRAINENDS
waitmessage 0x40
end2
BattleScript_GrassyTerrainEnds::
printstring STRINGID_GRASSYTERRAINENDS
waitmessage 0x40
end2
BattleScript_PsychicTerrainEnds::
printstring STRINGID_PSYCHICTERRAINENDS
waitmessage 0x40
end2
BattleScript_MudSportEnds::
printstring STRINGID_MUDSPORTENDS
waitmessage 0x40
end2
BattleScript_WaterSportEnds::
printstring STRINGID_WATERSPORTENDS
waitmessage 0x40
end2
BattleScript_GravityEnds::
printstring STRINGID_GRAVITYENDS
waitmessage 0x40
end2
BattleScript_SafeguardProtected::
pause 0x20
printstring STRINGID_PKMNUSEDSAFEGUARD
waitmessage 0x40
end2
BattleScript_SafeguardEnds::
pause 0x20
printstring STRINGID_PKMNSAFEGUARDEXPIRED
waitmessage 0x40
end2
BattleScript_LeechSeedTurnDrain::
playanimation BS_ATTACKER, B_ANIM_LEECH_SEED_DRAIN, sB_ANIM_ARG1
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
copyword gBattleMoveDamage, gHpDealt
jumpifability BS_ATTACKER, ABILITY_LIQUID_OOZE, BattleScript_LeechSeedTurnPrintLiquidOoze
manipulatedamage ATK80_DMG_CHANGE_SIGN
setbyte cMULTISTRING_CHOOSER, 0x3
goto BattleScript_LeechSeedTurnPrintAndUpdateHp
BattleScript_LeechSeedTurnPrintLiquidOoze::
setbyte cMULTISTRING_CHOOSER, 0x4
BattleScript_LeechSeedTurnPrintAndUpdateHp::
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
printfromtable gLeechSeedStringIds
waitmessage 0x40
tryfaintmon BS_ATTACKER, FALSE, NULL
tryfaintmon BS_TARGET, FALSE, NULL
end2
BattleScript_BideStoringEnergy::
printstring STRINGID_PKMNSTORINGENERGY
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_BideAttack::
attackcanceler
setmoveeffect MOVE_EFFECT_CHARGING
clearstatusfromeffect BS_ATTACKER
printstring STRINGID_PKMNUNLEASHEDENERGY
waitmessage 0x40
accuracycheck BattleScript_MoveMissed, ACC_CURR_MOVE
typecalc
bichalfword gMoveResultFlags, MOVE_RESULT_SUPER_EFFECTIVE | MOVE_RESULT_NOT_VERY_EFFECTIVE
copyword gBattleMoveDamage, sBIDE_DMG
adjustdamage
setbyte sB_ANIM_TURN, 0x1
attackanimation
waitanimation
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
resultmessage
waitmessage 0x40
tryfaintmon BS_TARGET, FALSE, NULL
goto BattleScript_MoveEnd
BattleScript_BideNoEnergyToAttack::
attackcanceler
setmoveeffect MOVE_EFFECT_CHARGING
clearstatusfromeffect BS_ATTACKER
printstring STRINGID_PKMNUNLEASHEDENERGY
waitmessage 0x40
goto BattleScript_ButItFailed
BattleScript_RoarSuccessSwitch::
call BattleScript_RoarSuccessRet
getswitchedmondata BS_TARGET
switchindataupdate BS_TARGET
switchinanim BS_TARGET, FALSE
waitstate
printstring STRINGID_PKMNWASDRAGGEDOUT
switchineffects BS_TARGET
goto BattleScript_MoveEnd
BattleScript_RoarSuccessEndBattle::
call BattleScript_RoarSuccessRet
setoutcomeonteleport BS_ATTACKER
finishaction
BattleScript_RoarSuccessRet:
attackanimation
waitanimation
switchoutabilities BS_TARGET
returntoball BS_TARGET
waitstate
return
BattleScript_MistProtected::
pause 0x20
printstring STRINGID_PKMNPROTECTEDBYMIST
waitmessage 0x40
return
BattleScript_RageIsBuilding::
printstring STRINGID_PKMNRAGEBUILDING
waitmessage 0x40
return
BattleScript_MoveUsedIsDisabled::
printstring STRINGID_PKMNMOVEISDISABLED
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_SelectingDisabledMove::
printselectionstring STRINGID_PKMNMOVEISDISABLED
endselectionscript
BattleScript_DisabledNoMore::
printstring STRINGID_PKMNMOVEDISABLEDNOMORE
waitmessage 0x40
end2
BattleScript_SelectingDisabledMoveInPalace::
printstring STRINGID_PKMNMOVEISDISABLED
BattleScript_SelectingUnusableMoveInPalace::
moveendto ATK49_NEXT_TARGET
end
BattleScript_EncoredNoMore::
printstring STRINGID_PKMNENCOREENDED
waitmessage 0x40
end2
BattleScript_DestinyBondTakesLife::
printstring STRINGID_PKMNTOOKFOE
waitmessage 0x40
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
tryfaintmon BS_ATTACKER, FALSE, NULL
return
BattleScript_DmgHazardsOnAttacker::
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
call BattleScript_PrintHurtByDmgHazards
tryfaintmon BS_ATTACKER, FALSE, NULL
tryfaintmon BS_ATTACKER, TRUE, BattleScript_DmgHazardsOnAttackerFainted
return
BattleScript_DmgHazardsOnAttackerFainted::
setbyte sGIVEEXP_STATE, 0x0
getexp BS_ATTACKER
moveendall
goto BattleScript_HandleFaintedMon
BattleScript_DmgHazardsOnTarget::
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
call BattleScript_PrintHurtByDmgHazards
tryfaintmon BS_TARGET, FALSE, NULL
tryfaintmon BS_TARGET, TRUE, BattleScript_DmgHazardsOnTargetFainted
return
BattleScript_DmgHazardsOnTargetFainted::
setbyte sGIVEEXP_STATE, 0x0
getexp BS_TARGET
moveendall
goto BattleScript_HandleFaintedMon
BattleScript_DmgHazardsOnFaintedBattler::
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
healthbarupdate BS_FAINTED
datahpupdate BS_FAINTED
call BattleScript_PrintHurtByDmgHazards
tryfaintmon BS_FAINTED, FALSE, NULL
tryfaintmon BS_FAINTED, TRUE, BattleScript_DmgHazardsOnFaintedBattlerFainted
return
BattleScript_DmgHazardsOnFaintedBattlerFainted::
setbyte sGIVEEXP_STATE, 0x0
getexp BS_FAINTED
moveendall
goto BattleScript_HandleFaintedMon
BattleScript_PrintHurtByDmgHazards::
printfromtable gDmgHazardsStringIds
waitmessage 0x40
return
BattleScript_ToxicSpikesAbsorbed::
printstring STRINGID_TOXICSPIKESABSORBED
waitmessage 0x40
return
BattleScript_ToxicSpikesPoisoned::
printstring STRINGID_TOXICSPIKESPOISONED
waitmessage 0x40
statusanimation BS_SCRIPTING
updatestatusicon BS_SCRIPTING
waitstate
return
BattleScript_StickyWebOnSwitchIn::
savetarget
copybyte gBattlerTarget sBATTLER
printstring STRINGID_STICKYWEBSWITCHIN
waitmessage 0x40
statbuffchange STAT_CHANGE_BS_PTR, BattleScript_StickyWebOnSwitchInEnd
jumpifbyte CMP_LESS_THAN, cMULTISTRING_CHOOSER, 0x2, BattleScript_StickyWebOnSwitchInStatAnim
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x3, BattleScript_StickyWebOnSwitchInEnd
pause 0x20
goto BattleScript_StickyWebOnSwitchInPrintStatMsg
BattleScript_StickyWebOnSwitchInStatAnim:
setgraphicalstatchangevalues
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
BattleScript_StickyWebOnSwitchInPrintStatMsg:
printfromtable gStatDownStringIds
waitmessage 0x40
BattleScript_StickyWebOnSwitchInEnd:
restoretarget
return
BattleScript_PerishSongTakesLife::
printstring STRINGID_PKMNPERISHCOUNTFELL
waitmessage 0x40
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
tryfaintmon BS_ATTACKER, FALSE, NULL
end2
BattleScript_PerishSongCountGoesDown::
printstring STRINGID_PKMNPERISHCOUNTFELL
waitmessage 0x40
end2
BattleScript_AllStatsUp::
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_ATK, 0xC, BattleScript_AllStatsUpAtk
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_DEF, 0xC, BattleScript_AllStatsUpAtk
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_SPEED, 0xC, BattleScript_AllStatsUpAtk
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_SPATK, 0xC, BattleScript_AllStatsUpAtk
jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_SPDEF, 0xC, BattleScript_AllStatsUpRet
BattleScript_AllStatsUpAtk::
setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_DEF | BIT_SPEED | BIT_SPATK | BIT_SPDEF, 0x0
setstatchanger STAT_ATK, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_AllStatsUpDef
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_AllStatsUpDef::
setstatchanger STAT_DEF, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_AllStatsUpSpeed
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_AllStatsUpSpeed::
setstatchanger STAT_SPEED, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_AllStatsUpSpAtk
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_AllStatsUpSpAtk::
setstatchanger STAT_SPATK, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_AllStatsUpSpDef
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_AllStatsUpSpDef::
setstatchanger STAT_SPDEF, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_AllStatsUpRet
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_AllStatsUpRet::
return
BattleScript_RapidSpinAway::
rapidspinfree
return
BattleScript_WrapFree::
printstring STRINGID_PKMNGOTFREE
waitmessage 0x40
copybyte gBattlerTarget, sBATTLER
return
BattleScript_LeechSeedFree::
printstring STRINGID_PKMNSHEDLEECHSEED
waitmessage 0x40
return
BattleScript_SpikesFree::
printstring STRINGID_PKMNBLEWAWAYSPIKES
waitmessage 0x40
return
BattleScript_ToxicSpikesFree::
printstring STRINGID_PKMNBLEWAWAYTOXICSPIKES
waitmessage 0x40
return
BattleScript_StickyWebFree::
printstring STRINGID_PKMNBLEWAWAYSTICKYWEB
waitmessage 0x40
return
BattleScript_StealthRockFree::
printstring STRINGID_PKMNBLEWAWAYSTEALTHROCK
waitmessage 0x40
return
BattleScript_MonTookFutureAttack::
printstring STRINGID_PKMNTOOKATTACK
waitmessage 0x40
jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, 0x0, BattleScript_CheckDoomDesireMiss
accuracycheck BattleScript_FutureAttackMiss, MOVE_FUTURE_SIGHT
goto BattleScript_FutureAttackAnimate
BattleScript_CheckDoomDesireMiss::
accuracycheck BattleScript_FutureAttackMiss, MOVE_DOOM_DESIRE
BattleScript_FutureAttackAnimate::
critcalc
damagecalc
adjustdamage
jumpifmovehadnoeffect BattleScript_DoFutureAttackResult
jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, 0x0, BattleScript_FutureHitAnimDoomDesire
playanimation BS_ATTACKER, B_ANIM_FUTURE_SIGHT_HIT, NULL
goto BattleScript_DoFutureAttackHit
BattleScript_FutureHitAnimDoomDesire::
playanimation BS_ATTACKER, B_ANIM_DOOM_DESIRE_HIT, NULL
BattleScript_DoFutureAttackHit::
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage 0x40
BattleScript_DoFutureAttackResult:
resultmessage
waitmessage 0x40
tryfaintmon BS_TARGET, FALSE, NULL
atk24 BattleScript_FutureAttackEnd
BattleScript_FutureAttackEnd::
moveendcase ATK49_RAGE
moveendfromto ATK49_ITEM_EFFECTS_ALL, ATK49_UPDATE_LAST_MOVES
sethword gMoveResultFlags, 0
end2
BattleScript_FutureAttackMiss::
pause 0x20
sethword gMoveResultFlags, MOVE_RESULT_FAILED
resultmessage
waitmessage 0x40
sethword gMoveResultFlags, 0
end2
BattleScript_NoMovesLeft::
printselectionstring STRINGID_PKMNHASNOMOVESLEFT
endselectionscript
BattleScript_SelectingMoveWithNoPP::
printselectionstring STRINGID_NOPPLEFT
endselectionscript
BattleScript_NoPPForMove::
attackstring
pause 0x20
printstring STRINGID_BUTNOPPLEFT
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_SelectingTormentedMove::
printselectionstring STRINGID_PKMNCANTUSEMOVETORMENT
endselectionscript
BattleScript_MoveUsedIsTormented::
printstring STRINGID_PKMNCANTUSEMOVETORMENT
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_SelectingTormentedMoveInPalace::
printstring STRINGID_PKMNCANTUSEMOVETORMENT
goto BattleScript_SelectingUnusableMoveInPalace
BattleScript_SelectingNotAllowedMoveTaunt::
printselectionstring STRINGID_PKMNCANTUSEMOVETAUNT
endselectionscript
BattleScript_MoveUsedIsTaunted::
printstring STRINGID_PKMNCANTUSEMOVETAUNT
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_SelectingNotAllowedMoveTauntInPalace::
printstring STRINGID_PKMNCANTUSEMOVETAUNT
goto BattleScript_SelectingUnusableMoveInPalace
BattleScript_SelectingNotAllowedMoveThroatChop::
printselectionstring STRINGID_PKMNCANTUSEMOVETHROATCHOP
endselectionscript
BattleScript_MoveUsedIsThroatChopPrevented::
printstring STRINGID_PKMNCANTUSEMOVETHROATCHOP
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_SelectingNotAllowedMoveThroatChopInPalace::
printstring STRINGID_PKMNCANTUSEMOVETHROATCHOP
goto BattleScript_SelectingUnusableMoveInPalace
BattleScript_ThroatChopEndTurn::
printstring STRINGID_THROATCHOPENDS
waitmessage 0x40
end2
BattleScript_SelectingNotAllowedMoveGravity::
printselectionstring STRINGID_GRAVITYPREVENTSUSAGE
endselectionscript
BattleScript_SelectingNotAllowedBelch::
printselectionstring STRINGID_BELCHCANTSELECT
endselectionscript
BattleScript_SelectingNotAllowedBelchInPalace::
printstring STRINGID_BELCHCANTSELECT
goto BattleScript_SelectingUnusableMoveInPalace
BattleScript_MoveUsedGravityPrevents::
printstring STRINGID_GRAVITYPREVENTSUSAGE
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_SelectingNotAllowedMoveGravityInPalace::
printstring STRINGID_GRAVITYPREVENTSUSAGE
goto BattleScript_SelectingUnusableMoveInPalace
BattleScript_SelectingNotAllowedMoveHealBlock::
printselectionstring STRINGID_HEALBLOCKPREVENTSUSAGE
endselectionscript
BattleScript_MoveUsedHealBlockPrevents::
printstring STRINGID_HEALBLOCKPREVENTSUSAGE
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_SelectingNotAllowedMoveHealBlockInPalace::
printstring STRINGID_HEALBLOCKPREVENTSUSAGE
goto BattleScript_SelectingUnusableMoveInPalace
BattleScript_WishComesTrue::
trywish 0x1, BattleScript_WishButFullHp
playanimation BS_TARGET, B_ANIM_WISH_HEAL, NULL
printstring STRINGID_PKMNWISHCAMETRUE
waitmessage 0x40
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
printstring STRINGID_PKMNREGAINEDHEALTH
waitmessage 0x40
end2
BattleScript_WishButFullHp::
printstring STRINGID_PKMNWISHCAMETRUE
waitmessage 0x40
pause 0x20
printstring STRINGID_PKMNHPFULL
waitmessage 0x40
end2
BattleScript_IngrainTurnHeal::
playanimation BS_ATTACKER, B_ANIM_INGRAIN_HEAL, NULL
printstring STRINGID_PKMNABSORBEDNUTRIENTS
BattleScript_TurnHeal:
waitmessage 0x40
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
end2
BattleScript_AquaRingHeal::
playanimation BS_ATTACKER, B_ANIM_INGRAIN_HEAL, NULL
printstring STRINGID_AQUARINGHEAL
goto BattleScript_TurnHeal
BattleScript_PrintMonIsRooted::
pause 0x20
printstring STRINGID_PKMNANCHOREDITSELF
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_AtkDefDown::
setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_ATTACKER, BIT_DEF | BIT_ATK, ATK48_DONT_CHECK_LOWER | ATK48_STAT_NEGATIVE | ATK48_ONLY_MULTIPLE
playstatchangeanimation BS_ATTACKER, BIT_ATK, ATK48_DONT_CHECK_LOWER | ATK48_STAT_NEGATIVE
setstatchanger STAT_ATK, 1, TRUE
statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN | STAT_CHANGE_BS_PTR, BattleScript_AtkDefDownTryDef
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_AtkDefDownTryDef
printfromtable gStatDownStringIds
waitmessage 0x40
BattleScript_AtkDefDownTryDef:
playstatchangeanimation BS_ATTACKER, BIT_DEF, ATK48_DONT_CHECK_LOWER | ATK48_STAT_NEGATIVE
setstatchanger STAT_DEF, 1, TRUE
statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN | STAT_CHANGE_BS_PTR, BattleScript_AtkDefDownRet
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_AtkDefDownRet
printfromtable gStatDownStringIds
waitmessage 0x40
BattleScript_AtkDefDownRet:
return
BattleScript_DefSpDefDown::
setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_ATTACKER, BIT_DEF | BIT_SPDEF, ATK48_DONT_CHECK_LOWER | ATK48_STAT_NEGATIVE | ATK48_ONLY_MULTIPLE
playstatchangeanimation BS_ATTACKER, BIT_DEF, ATK48_DONT_CHECK_LOWER | ATK48_STAT_NEGATIVE
setstatchanger STAT_DEF, 1, TRUE
statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN | STAT_CHANGE_BS_PTR, BattleScript_DefSpDefDownTrySpDef
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_DefSpDefDownTrySpDef
printfromtable gStatDownStringIds
waitmessage 0x40
BattleScript_DefSpDefDownTrySpDef::
playstatchangeanimation BS_ATTACKER, BIT_SPDEF, ATK48_DONT_CHECK_LOWER | ATK48_STAT_NEGATIVE
setstatchanger STAT_SPDEF, 1, TRUE
statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN | STAT_CHANGE_BS_PTR, BattleScript_DefSpDefDownRet
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_DefSpDefDownRet
printfromtable gStatDownStringIds
waitmessage 0x40
BattleScript_DefSpDefDownRet::
return
BattleScript_KnockedOff::
playanimation BS_TARGET, B_ANIM_ITEM_KNOCKOFF, NULL
printstring STRINGID_PKMNKNOCKEDOFF
waitmessage 0x40
return
BattleScript_MoveUsedIsImprisoned::
printstring STRINGID_PKMNCANTUSEMOVESEALED
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_SelectingImprisonedMove::
printselectionstring STRINGID_PKMNCANTUSEMOVESEALED
endselectionscript
BattleScript_SelectingImprisonedMoveInPalace::
printstring STRINGID_PKMNCANTUSEMOVESEALED
goto BattleScript_SelectingUnusableMoveInPalace
BattleScript_GrudgeTakesPp::
printstring STRINGID_PKMNLOSTPPGRUDGE
waitmessage 0x40
return
BattleScript_MagicCoatBounce::
attackstring
ppreduce
pause 0x20
printfromtable gMagicCoatBounceStringIds
waitmessage 0x40
orword gHitMarker, HITMARKER_ATTACKSTRING_PRINTED | HITMARKER_NO_PPDEDUCT | HITMARKER_x800000
setmagiccoattarget BS_ATTACKER
return
BattleScript_SnatchedMove::
attackstring
ppreduce
snatchsetbattlers
playanimation BS_TARGET, B_ANIM_SNATCH_MOVE, NULL
printstring STRINGID_PKMNSNATCHEDMOVE
waitmessage 0x40
orword gHitMarker, HITMARKER_ATTACKSTRING_PRINTED | HITMARKER_NO_PPDEDUCT | HITMARKER_x800000
swapattackerwithtarget
return
BattleScript_EnduredMsg::
printstring STRINGID_PKMNENDUREDHIT
waitmessage 0x40
return
BattleScript_SturdiedMsg::
copybyte gBattlerAbility, gBattlerTarget
pause 0x10
call BattleScript_AbilityPopUp
printstring STRINGID_ENDUREDSTURDY
waitmessage 0x40
return
BattleScript_OneHitKOMsg::
printstring STRINGID_ONEHITKO
waitmessage 0x40
return
BattleScript_SAtkDown2::
setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_ATTACKER, BIT_SPATK, ATK48_DONT_CHECK_LOWER | ATK48_STAT_NEGATIVE | ATK48_STAT_BY_TWO
setstatchanger STAT_SPATK, 2, TRUE
statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN | STAT_CHANGE_BS_PTR, BattleScript_SAtkDown2End
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_SAtkDown2End
printfromtable gStatDownStringIds
waitmessage 0x40
BattleScript_SAtkDown2End::
return
BattleScript_MoveEffectClearSmog::
printstring STRINGID_RESETSTARGETSSTATLEVELS
waitmessage 0x40
return
BattleScript_FocusPunchSetUp::
printstring STRINGID_EMPTYSTRING3
waitmessage 0x1
playanimation BS_ATTACKER, B_ANIM_FOCUS_PUNCH_SETUP, NULL
printstring STRINGID_PKMNTIGHTENINGFOCUS
waitmessage 0x40
end2
BattleScript_MegaEvolution::
printstring STRINGID_MEGAEVOREACTING
waitmessage 0x40
handlemegaevo BS_ATTACKER
playanimation BS_ATTACKER, B_ANIM_MEGA_EVOLUTION, NULL
waitanimation
printstring STRINGID_MEGAEVOEVOLVED
waitmessage 0x40
end2
BattleScript_MoveUsedIsAsleep::
printstring STRINGID_PKMNFASTASLEEP
waitmessage 0x40
statusanimation BS_ATTACKER
goto BattleScript_MoveEnd
BattleScript_MoveUsedWokeUp::
bicword gHitMarker, HITMARKER_x10
printfromtable gWokeUpStringIds
waitmessage 0x40
updatestatusicon BS_ATTACKER
return
BattleScript_MonWokeUpInUproar::
printstring STRINGID_PKMNWOKEUPINUPROAR
waitmessage 0x40
updatestatusicon BS_ATTACKER
end2
BattleScript_PoisonTurnDmg::
printstring STRINGID_PKMNHURTBYPOISON
waitmessage 0x40
BattleScript_DoStatusTurnDmg::
statusanimation BS_ATTACKER
BattleScript_DoTurnDmg::
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
tryfaintmon BS_ATTACKER, FALSE, NULL
atk24 BattleScript_DoTurnDmgEnd
BattleScript_DoTurnDmgEnd::
end2
BattleScript_PoisonHealActivates::
printstring STRINGID_POISONHEALHPUP
waitmessage 0x40
recordability BS_ATTACKER
statusanimation BS_ATTACKER
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
end2
BattleScript_BurnTurnDmg::
printstring STRINGID_PKMNHURTBYBURN
waitmessage 0x40
goto BattleScript_DoStatusTurnDmg
BattleScript_MoveUsedIsFrozen::
printstring STRINGID_PKMNISFROZEN
waitmessage 0x40
statusanimation BS_ATTACKER
goto BattleScript_MoveEnd
BattleScript_MoveUsedUnfroze::
printfromtable gGotDefrostedStringIds
waitmessage 0x40
updatestatusicon BS_ATTACKER
return
BattleScript_DefrostedViaFireMove::
printstring STRINGID_PKMNWASDEFROSTED
waitmessage 0x40
updatestatusicon BS_TARGET
return
BattleScript_MoveUsedIsParalyzed::
printstring STRINGID_PKMNISPARALYZED
waitmessage 0x40
statusanimation BS_ATTACKER
cancelmultiturnmoves BS_ATTACKER
goto BattleScript_MoveEnd
BattleScript_PowderMoveNoEffect::
attackstring
ppreduce
pause 0x20
jumpiftype BS_TARGET, TYPE_GRASS, BattleScript_PowderMoveNoEffectPrint
jumpifability BS_TARGET, ABILITY_OVERCOAT, BattleScript_PowderMoveNoEffectOvercoat
printstring STRINGID_SAFETYGOOGLESPROTECTED
goto BattleScript_PowderMoveNoEffectWaitMsg
BattleScript_PowderMoveNoEffectOvercoat:
call BattleScript_AbilityPopUp
BattleScript_PowderMoveNoEffectPrint:
printstring STRINGID_ITDOESNTAFFECT
BattleScript_PowderMoveNoEffectWaitMsg:
waitmessage 0x40
cancelmultiturnmoves BS_ATTACKER
sethword gMoveResultFlags, MOVE_RESULT_FAILED
goto BattleScript_MoveEnd
BattleScript_MoveUsedFlinched::
printstring STRINGID_PKMNFLINCHED
waitmessage 0x40
jumpifability BS_ATTACKER ABILITY_STEADFAST BattleScript_TryActivateSteadFast
BattleScript_MoveUsedFlinchedEnd:
goto BattleScript_MoveEnd
BattleScript_TryActivateSteadFast:
setstatchanger STAT_SPEED, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_MoveUsedFlinchedEnd
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_MoveUsedFlinchedEnd
setgraphicalstatchangevalues
playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
setbyte gBattleCommunication STAT_SPEED
stattextbuffer BS_ATTACKER
printstring STRINGID_TARGETABILITYSTATRAISE
waitmessage 0x40
goto BattleScript_MoveUsedFlinchedEnd
BattleScript_PrintUproarOverTurns::
printfromtable gUproarOverTurnStringIds
waitmessage 0x40
end2
BattleScript_ThrashConfuses::
chosenstatus2animation BS_ATTACKER, STATUS2_CONFUSION
printstring STRINGID_PKMNFATIGUECONFUSION
waitmessage 0x40
end2
BattleScript_MoveUsedIsConfused::
printstring STRINGID_PKMNISCONFUSED
waitmessage 0x40
status2animation BS_ATTACKER, STATUS2_CONFUSION
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x0, BattleScript_MoveUsedIsConfusedRet
BattleScript_DoSelfConfusionDmg::
cancelmultiturnmoves BS_ATTACKER
adjustdamage
printstring STRINGID_ITHURTCONFUSION
waitmessage 0x40
effectivenesssound
hitanimation BS_ATTACKER
waitstate
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
resultmessage
waitmessage 0x40
tryfaintmon BS_ATTACKER, FALSE, NULL
goto BattleScript_MoveEnd
BattleScript_MoveUsedIsConfusedRet::
return
BattleScript_MoveUsedPowder::
bicword gHitMarker, HITMARKER_NO_ATTACKSTRING | HITMARKER_ATTACKSTRING_PRINTED
attackstring
ppreduce
pause 0x20
cancelmultiturnmoves BS_ATTACKER
status2animation BS_ATTACKER, STATUS2_POWDER
waitanimation
effectivenesssound
hitanimation BS_ATTACKER
waitstate
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
printstring STRINGID_POWDEREXPLODES
waitmessage 0x40
tryfaintmon BS_ATTACKER, FALSE, NULL
goto BattleScript_MoveEnd
BattleScript_MoveUsedIsConfusedNoMore::
printstring STRINGID_PKMNHEALEDCONFUSION
waitmessage 0x40
return
BattleScript_PrintPayDayMoneyString::
printstring STRINGID_PKMNPICKEDUPITEM
waitmessage 0x40
return
BattleScript_WrapTurnDmg::
playanimation BS_ATTACKER, B_ANIM_TURN_TRAP, sB_ANIM_ARG1
printstring STRINGID_PKMNHURTBY
waitmessage 0x40
goto BattleScript_DoTurnDmg
BattleScript_WrapEnds::
printstring STRINGID_PKMNFREEDFROM
waitmessage 0x40
end2
BattleScript_MoveUsedIsInLove::
printstring STRINGID_PKMNINLOVE
waitmessage 0x40
status2animation BS_ATTACKER, STATUS2_INFATUATION
return
BattleScript_MoveUsedIsInLoveCantAttack::
printstring STRINGID_PKMNIMMOBILIZEDBYLOVE
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_NightmareTurnDmg::
printstring STRINGID_PKMNLOCKEDINNIGHTMARE
waitmessage 0x40
status2animation BS_ATTACKER, STATUS2_NIGHTMARE
goto BattleScript_DoTurnDmg
BattleScript_CurseTurnDmg::
printstring STRINGID_PKMNAFFLICTEDBYCURSE
waitmessage 0x40
status2animation BS_ATTACKER, STATUS2_CURSED
goto BattleScript_DoTurnDmg
BattleScript_TargetPRLZHeal::
printstring STRINGID_PKMNHEALEDPARALYSIS
waitmessage 0x40
updatestatusicon BS_TARGET
return
BattleScript_MoveEffectSleep::
statusanimation BS_EFFECT_BATTLER
printfromtable gFellAsleepStringIds
waitmessage 0x40
BattleScript_UpdateEffectStatusIconRet::
updatestatusicon BS_EFFECT_BATTLER
waitstate
return
BattleScript_YawnMakesAsleep::
statusanimation BS_EFFECT_BATTLER
printstring STRINGID_PKMNFELLASLEEP
waitmessage 0x40
updatestatusicon BS_EFFECT_BATTLER
waitstate
makevisible BS_EFFECT_BATTLER
end2
BattleScript_EmbargoEndTurn::
printstring STRINGID_EMBARGOENDS
waitmessage 0x40
end2
BattleScript_TelekinesisEndTurn::
printstring STRINGID_TELEKINESISENDS
waitmessage 0x40
end2
BattleScript_BufferEndTurn::
printstring STRINGID_BUFFERENDS
waitmessage 0x40
end2
BattleScript_MoveEffectPoison::
statusanimation BS_EFFECT_BATTLER
printfromtable gGotPoisonedStringIds
waitmessage 0x40
goto BattleScript_UpdateEffectStatusIconRet
BattleScript_MoveEffectBurn::
statusanimation BS_EFFECT_BATTLER
printfromtable gGotBurnedStringIds
waitmessage 0x40
goto BattleScript_UpdateEffectStatusIconRet
BattleScript_MoveEffectFreeze::
statusanimation BS_EFFECT_BATTLER
printfromtable gGotFrozenStringIds
waitmessage 0x40
goto BattleScript_UpdateEffectStatusIconRet
BattleScript_MoveEffectParalysis::
statusanimation BS_EFFECT_BATTLER
printfromtable gGotParalyzedStringIds
waitmessage 0x40
goto BattleScript_UpdateEffectStatusIconRet
BattleScript_MoveEffectUproar::
printstring STRINGID_PKMNCAUSEDUPROAR
waitmessage 0x40
return
BattleScript_MoveEffectToxic::
statusanimation BS_EFFECT_BATTLER
printstring STRINGID_PKMNBADLYPOISONED
waitmessage 0x40
goto BattleScript_UpdateEffectStatusIconRet
BattleScript_MoveEffectPayDay::
printstring STRINGID_COINSSCATTERED
waitmessage 0x40
return
BattleScript_MoveEffectWrap::
printfromtable gWrappedStringIds
waitmessage 0x40
return
BattleScript_MoveEffectConfusion::
chosenstatus2animation BS_EFFECT_BATTLER, STATUS2_CONFUSION
printstring STRINGID_PKMNWASCONFUSED
waitmessage 0x40
return
BattleScript_MoveEffectRecoilWithStatus::
argumentstatuseffect
copyword gBattleMoveDamage, sSAVED_DMG
BattleScript_MoveEffectRecoil::
jumpifmove MOVE_STRUGGLE, BattleScript_DoRecoil
jumpifability BS_ATTACKER, ABILITY_ROCK_HEAD, BattleScript_RecoilEnd
BattleScript_DoRecoil::
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
printstring STRINGID_PKMNHITWITHRECOIL
waitmessage 0x40
tryfaintmon BS_ATTACKER, FALSE, NULL
BattleScript_RecoilEnd::
return
BattleScript_EffectWithChance::
seteffectwithchance
return
BattleScript_ItemSteal::
playanimation BS_TARGET, B_ANIM_ITEM_STEAL, NULL
printstring STRINGID_PKMNSTOLEITEM
waitmessage 0x40
return
BattleScript_DrizzleActivates::
pause 0x20
call BattleScript_AbilityPopUp
printstring STRINGID_PKMNMADEITRAIN
waitstate
playanimation BS_BATTLER_0, B_ANIM_RAIN_CONTINUES, NULL
call BattleScript_WeatherFormChanges
end3
BattleScript_DefiantActivates::
pause 0x20
call BattleScript_AbilityPopUp
statbuffchange 0, NULL
setgraphicalstatchangevalues
playanimation BS_ABILITY_BATTLER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
printstring STRINGID_PKMNSSTATCHANGED2
waitmessage 0x40
return
BattleScript_AbilityPopUp:
showabilitypopup BS_ABILITY_BATTLER
recordability BS_ABILITY_BATTLER
pause 0x10
return
BattleScript_SpeedBoostActivates::
call BattleScript_AbilityPopUp
playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
printstring STRINGID_PKMNRAISEDSPEED
waitmessage 0x40
end3
BattleScript_TraceActivates::
pause 0x20
call BattleScript_AbilityPopUp
printstring STRINGID_PKMNTRACED
waitmessage 0x40
switchinabilities BS_ATTACKER
end3
BattleScript_RainDishActivates::
call BattleScript_AbilityPopUp
printstring STRINGID_PKMNSXRESTOREDHPALITTLE2
waitmessage 0x40
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
end3
BattleScript_HarvestActivates::
pause 0x5
call BattleScript_AbilityPopUp
printstring STRINGID_HARVESTBERRY
waitmessage 0x40
end3
BattleScript_SolarPowerActivates::
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
call BattleScript_AbilityPopUp
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
printstring STRINGID_SOLARPOWERHPDROP
waitmessage 0x40
tryfaintmon BS_ATTACKER, FALSE, NULL
end3
BattleScript_SandstreamActivates::
pause 0x20
call BattleScript_AbilityPopUp
printstring STRINGID_PKMNSXWHIPPEDUPSANDSTORM
waitstate
playanimation BS_BATTLER_0, B_ANIM_SANDSTORM_CONTINUES, NULL
call BattleScript_WeatherFormChanges
end3
BattleScript_ShedSkinActivates::
call BattleScript_AbilityPopUp
printstring STRINGID_PKMNSXCUREDYPROBLEM
waitmessage 0x40
updatestatusicon BS_ATTACKER
end3
BattleScript_WeatherFormChanges::
setbyte sBATTLER, 0x0
BattleScript_WeatherFormChangesLoop::
trycastformdatachange
addbyte sBATTLER, 0x1
jumpifbytenotequal sBATTLER, gBattlersCount, BattleScript_WeatherFormChangesLoop
return
BattleScript_CastformChange::
call BattleScript_82DB4AF
end3
BattleScript_82DB4AF::
call BattleScript_AbilityPopUp
docastformchangeanimation
waitstate
printstring STRINGID_PKMNTRANSFORMED
waitmessage 0x40
return
BattleScript_IntimidateActivatesEnd3::
call BattleScript_PauseIntimidateActivates
end3
BattleScript_PauseIntimidateActivates:
pause 0x20
BattleScript_IntimidateActivates::
setbyte gBattlerTarget, 0x0
setstatchanger STAT_ATK, 1, TRUE
call BattleScript_AbilityPopUp
BattleScript_IntimidateActivatesLoop:
trygetintimidatetarget BattleScript_IntimidateActivatesReturn
jumpifstatus2 BS_TARGET, STATUS2_SUBSTITUTE, BattleScript_IntimidateActivatesLoopIncrement
jumpifability BS_TARGET, ABILITY_CLEAR_BODY, BattleScript_IntimidatePrevented
jumpifability BS_TARGET, ABILITY_HYPER_CUTTER, BattleScript_IntimidatePrevented
jumpifability BS_TARGET, ABILITY_WHITE_SMOKE, BattleScript_IntimidatePrevented
statbuffchange STAT_CHANGE_NOT_PROTECT_AFFECTED | STAT_CHANGE_BS_PTR, BattleScript_IntimidateActivatesLoopIncrement
jumpifbyte CMP_GREATER_THAN, cMULTISTRING_CHOOSER, 0x1, BattleScript_IntimidateActivatesLoopIncrement
setgraphicalstatchangevalues
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
printstring STRINGID_PKMNCUTSATTACKWITH
waitmessage 0x40
BattleScript_IntimidateActivatesLoopIncrement:
addbyte gBattlerTarget, 0x1
goto BattleScript_IntimidateActivatesLoop
BattleScript_IntimidateActivatesReturn:
return
BattleScript_IntimidatePrevented:
pause 0x20
printstring STRINGID_PREVENTEDFROMWORKING
waitmessage 0x40
goto BattleScript_IntimidateActivatesLoopIncrement
BattleScript_DroughtActivates::
pause 0x20
call BattleScript_AbilityPopUp
printstring STRINGID_PKMNSXINTENSIFIEDSUN
waitstate
playanimation BS_BATTLER_0, B_ANIM_SUN_CONTINUES, NULL
call BattleScript_WeatherFormChanges
end3
BattleScript_SnowWarningActivates::
pause 0x20
call BattleScript_AbilityPopUp
printstring STRINGID_SNOWWARNINGHAIL
waitstate
playanimation BS_BATTLER_0, B_ANIM_HAIL_CONTINUES, NULL
call BattleScript_WeatherFormChanges
end3
BattleScript_ElectricSurgeActivates::
pause 0x20
call BattleScript_AbilityPopUp
printstring STRINGID_TERRAINBECOMESELECTRIC
waitstate
playanimation BS_SCRIPTING, B_ANIM_TERRAIN_ELECTRIC, NULL
end3
BattleScript_MistySurgeActivates::
pause 0x20
call BattleScript_AbilityPopUp
printstring STRINGID_TERRAINBECOMESMISTY
waitstate
playanimation BS_SCRIPTING, B_ANIM_TERRAIN_MISTY, NULL
end3
BattleScript_GrassySurgeActivates::
pause 0x20
call BattleScript_AbilityPopUp
printstring STRINGID_TERRAINBECOMESGRASSY
waitstate
playanimation BS_SCRIPTING, B_ANIM_TERRAIN_GRASSY, NULL
end3
BattleScript_PsychicSurgeActivates::
pause 0x20
call BattleScript_AbilityPopUp
printstring STRINGID_TERRAINBECOMESPSYCHIC
waitstate
playanimation BS_SCRIPTING, B_ANIM_TERRAIN_PSYCHIC, NULL
end3
BattleScript_BadDreamsActivates::
setbyte gBattlerTarget, 0
call BattleScript_AbilityPopUp
BattleScript_BadDreamsLoop:
trygetbaddreamstarget BattleScript_BadDreamsEnd
dmg_1_8_targethp
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
printstring STRINGID_BADDREAMSDMG
waitmessage 0x40
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
tryfaintmon BS_TARGET, FALSE, NULL
atk24 BattleScript_BadDreamsIncrement
BattleScript_BadDreamsIncrement:
addbyte gBattlerTarget, 1
goto BattleScript_BadDreamsLoop
BattleScript_BadDreamsEnd:
end3
BattleScript_TookAttack::
attackstring
pause 0x20
printstring STRINGID_PKMNSXTOOKATTACK
waitmessage 0x40
orword gHitMarker, HITMARKER_ATTACKSTRING_PRINTED
return
BattleScript_SturdyPreventsOHKO::
pause 0x20
call BattleScript_AbilityPopUp
printstring STRINGID_PKMNPROTECTEDBY
pause 0x40
goto BattleScript_MoveEnd
BattleScript_DampStopsExplosion::
pause 0x20
call BattleScript_AbilityPopUp
printstring STRINGID_PKMNPREVENTSUSAGE
pause 0x40
goto BattleScript_MoveEnd
BattleScript_MoveHPDrain_PPLoss::
ppreduce
BattleScript_MoveHPDrain::
attackstring
pause 0x20
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
printstring STRINGID_PKMNRESTOREDHPUSING
waitmessage 0x40
orhalfword gMoveResultFlags, MOVE_RESULT_DOESNT_AFFECT_FOE
goto BattleScript_MoveEnd
BattleScript_MoveStatDrain_PPLoss::
ppreduce
BattleScript_MoveStatDrain::
attackstring
pause 0x20
setgraphicalstatchangevalues
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
waitanimation
printstring STRINGID_TARGETABILITYSTATRAISE
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_MonMadeMoveUseless_PPLoss::
ppreduce
BattleScript_MonMadeMoveUseless::
attackstring
pause 0x20
call BattleScript_AbilityPopUp
printstring STRINGID_PKMNSXMADEYUSELESS
waitmessage 0x40
orhalfword gMoveResultFlags, MOVE_RESULT_DOESNT_AFFECT_FOE
goto BattleScript_MoveEnd
BattleScript_FlashFireBoost_PPLoss::
ppreduce
BattleScript_FlashFireBoost::
attackstring
pause 0x20
call BattleScript_AbilityPopUp
printfromtable gFlashFireStringIds
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_AbilityPreventsPhasingOut::
pause 0x20
call BattleScript_AbilityPopUp
printstring STRINGID_PKMNANCHORSITSELFWITH
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_AbilityNoStatLoss::
pause 0x20
call BattleScript_AbilityPopUp
printstring STRINGID_PKMNPREVENTSSTATLOSSWITH
waitmessage 0x40
return
BattleScript_BRNPrevention::
pause 0x20
printfromtable gBRNPreventionStringIds
waitmessage 0x40
return
BattleScript_PRLZPrevention::
pause 0x20
printfromtable gPRLZPreventionStringIds
waitmessage 0x40
return
BattleScript_PSNPrevention::
pause 0x20
printfromtable gPSNPreventionStringIds
waitmessage 0x40
return
BattleScript_ObliviousPreventsAttraction::
pause 0x20
call BattleScript_AbilityPopUp
printstring STRINGID_PKMNPREVENTSROMANCEWITH
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_FlinchPrevention::
pause 0x20
call BattleScript_AbilityPopUp
printstring STRINGID_PKMNSXPREVENTSFLINCHING
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_OwnTempoPrevents::
pause 0x20
call BattleScript_AbilityPopUp
printstring STRINGID_PKMNPREVENTSCONFUSIONWITH
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_SoundproofProtected::
attackstring
ppreduce
pause 0x20
call BattleScript_AbilityPopUp
printstring STRINGID_PKMNSXBLOCKSY
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_DazzlingProtected::
attackstring
ppreduce
pause 0x20
call BattleScript_AbilityPopUp
printstring STRINGID_POKEMONCANNOTUSEMOVE
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_MoveUsedPsychicTerrainPrevents::
printstring STRINGID_POKEMONCANNOTUSEMOVE
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_GrassyTerrainLoop::
copyarraywithindex gBattlerAttacker, gBattlerByTurnOrder, gBattleCommunication, 0x1
checkgrassyterrainheal BS_ATTACKER, BattleScript_GrassyTerrainLoopIncrement
printstring STRINGID_GRASSYTERRAINHEALS
waitmessage 0x40
BattleScript_GrassyTerrainHpChange:
orword gHitMarker, HITMARKER_x20 | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
BattleScript_GrassyTerrainLoopIncrement::
addbyte gBattleCommunication, 0x1
jumpifbytenotequal gBattleCommunication, gBattlersCount, BattleScript_GrassyTerrainLoop
BattleScript_GrassyTerrainLoopEnd::
bicword gHitMarker, HITMARKER_x20 | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
jumpifbyte CMP_EQUAL, gFieldTimers + 5, 0x0, BattleScript_GrassyTerrainEnds
end2
BattleScript_AbilityNoSpecificStatLoss::
pause 0x20
call BattleScript_AbilityPopUp
printstring STRINGID_PKMNSXPREVENTSYLOSS
waitmessage 0x40
setbyte cMULTISTRING_CHOOSER, 0x3
return
BattleScript_StickyHoldActivates::
pause 0x20
call BattleScript_AbilityPopUp
printstring STRINGID_PKMNSXMADEYINEFFECTIVE
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_ColorChangeActivates::
call BattleScript_AbilityPopUp
printstring STRINGID_PKMNCHANGEDTYPEWITH
waitmessage 0x40
return
BattleScript_ProteanActivates::
call BattleScript_AbilityPopUp
printstring STRINGID_PKMNCHANGEDTYPE
waitmessage 0x40
return
BattleScript_CursedBodyActivates::
call BattleScript_AbilityPopUp
printstring STRINGID_CUSEDBODYDISABLED
waitmessage 0x40
return
BattleScript_MummyActivates::
call BattleScript_AbilityPopUp
printstring STRINGID_ATTACKERACQUIREDABILITY
waitmessage 0x40
return
BattleScript_AngryPointActivates::
call BattleScript_AbilityPopUp
statbuffchange STAT_CHANGE_NOT_PROTECT_AFFECTED | MOVE_EFFECT_CERTAIN, NULL
setgraphicalstatchangevalues
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
printstring STRINGID_ANGRYPOINTACTIVATES
waitmessage 0x40
return
BattleScript_TargetAbilityStatRaise::
call BattleScript_AbilityPopUp
statbuffchange STAT_CHANGE_NOT_PROTECT_AFFECTED | MOVE_EFFECT_CERTAIN, NULL
setgraphicalstatchangevalues
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
waitanimation
printstring STRINGID_TARGETABILITYSTATRAISE
waitmessage 0x40
return
BattleScript_WeakArmorActivates::
call BattleScript_AbilityPopUp
setstatchanger STAT_DEF, 1, TRUE
statbuffchange STAT_CHANGE_BS_PTR, BattleScript_WeakArmorActivatesSpeed
jumpifbyte CMP_LESS_THAN, cMULTISTRING_CHOOSER, 0x2, BattleScript_WeakArmorDefAnim
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x3, BattleScript_WeakArmorActivatesSpeed
pause 0x10
printfromtable gStatDownStringIds
waitmessage 0x40
goto BattleScript_WeakArmorActivatesSpeed
BattleScript_WeakArmorDefAnim:
setgraphicalstatchangevalues
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
printstring STRINGID_TARGETABILITYSTATLOWER
waitmessage 0x40
BattleScript_WeakArmorActivatesSpeed:
setstatchanger STAT_SPEED, 2, FALSE
statbuffchange STAT_CHANGE_BS_PTR, BattleScript_WeakArmorActivatesEnd
jumpifbyte CMP_LESS_THAN, cMULTISTRING_CHOOSER, 0x2, BattleScript_WeakArmorSpeedAnim
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x3, BattleScript_WeakArmorActivatesEnd
pause 0x10
printstring STRINGID_TARGETSTATWONTGOHIGHER
waitmessage 0x40
goto BattleScript_WeakArmorActivatesEnd
BattleScript_WeakArmorSpeedAnim:
setgraphicalstatchangevalues
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
printstring STRINGID_TARGETABILITYSTATRAISE
waitmessage 0x40
BattleScript_WeakArmorActivatesEnd:
return
BattleScript_AttackerAbilityStatRaise::
setgraphicalstatchangevalues
call BattleScript_AbilityPopUp
playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
waitanimation
printstring STRINGID_ATTACKERABILITYSTATRAISE
waitmessage 0x40
return
BattleScript_FellStingerRaisesStat::
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_FellStingerRaisesAtkEnd
jumpifbyte CMP_GREATER_THAN, cMULTISTRING_CHOOSER, 0x1, BattleScript_FellStingerRaisesAtkEnd
setgraphicalstatchangevalues
playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
printfromtable gStatUpStringIds
waitmessage 0x40
BattleScript_FellStingerRaisesAtkEnd:
return
BattleScript_AttackerAbilityStatRaiseEnd3::
call BattleScript_AttackerAbilityStatRaise
end3
BattleScript_SwitchInAbilityMsg::
printfromtable gSwitchInAbilityStringIds
waitmessage 0x40
end3
BattleScript_ImposterActivates::
transformdataexecution
call BattleScript_AbilityPopUp
playmoveanimation BS_ATTACKER, MOVE_TRANSFORM
waitanimation
printstring STRINGID_IMPOSTERTRANSFORM
waitmessage 0x40
end3
BattleScript_RoughSkinActivates::
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
call BattleScript_AbilityPopUp
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
printstring STRINGID_PKMNHURTSWITH
waitmessage 0x40
tryfaintmon BS_ATTACKER, FALSE, NULL
return
BattleScript_SpikyShieldEffect::
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
bichalfword gMoveResultFlags, MOVE_RESULT_NO_EFFECT
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
printstring STRINGID_PKMNHURTSWITH
waitmessage 0x40
tryfaintmon BS_ATTACKER, FALSE, NULL
return
BattleScript_KingsShieldEffect::
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
bichalfword gMoveResultFlags, MOVE_RESULT_NO_EFFECT
seteffectsecondary
setmoveeffect 0
copybyte sBATTLER, gBattlerTarget
copybyte gBattlerTarget, gBattlerAttacker
copybyte gBattlerAttacker, sBATTLER
return
BattleScript_BanefulBunkerEffect::
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_IGNORE_SAFEGUARD | HITMARKER_x100000
bichalfword gMoveResultFlags, MOVE_RESULT_NO_EFFECT
seteffectsecondary
setmoveeffect 0
return
BattleScript_CuteCharmActivates::
call BattleScript_AbilityPopUp
status2animation BS_ATTACKER, STATUS2_INFATUATION
printstring STRINGID_PKMNSXINFATUATEDY
waitmessage 0x40
return
BattleScript_AbilityStatusEffect::
waitstate
call BattleScript_AbilityPopUp
seteffectsecondary
return
BattleScript_SynchronizeActivates::
waitstate
call BattleScript_AbilityPopUp
seteffectprimary
return
BattleScript_NoItemSteal::
pause 0x20
printstring STRINGID_PKMNSXMADEYINEFFECTIVE
waitmessage 0x40
return
BattleScript_AbilityCuredStatus::
call BattleScript_AbilityPopUp
printstring STRINGID_PKMNSXCUREDITSYPROBLEM
waitmessage 0x40
updatestatusicon BS_SCRIPTING
return
BattleScript_IgnoresWhileAsleep::
printstring STRINGID_PKMNIGNORESASLEEP
waitmessage 0x40
moveendto ATK49_NEXT_TARGET
end
BattleScript_IgnoresAndUsesRandomMove::
printstring STRINGID_PKMNIGNOREDORDERS
waitmessage 0x40
jumptocalledmove FALSE
BattleScript_MoveUsedLoafingAround::
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x0, BattleScript_TruantLoafingAround
jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, 0x4, BattleScript_82DB6C7
setbyte gBattleCommunication, 0x0
various24 BS_ATTACKER
setbyte cMULTISTRING_CHOOSER, 0x4
BattleScript_82DB6C7::
printfromtable gInobedientStringIds
waitmessage 0x40
moveendto ATK49_NEXT_TARGET
end
BattleScript_TruantLoafingAround:
call BattleScript_AbilityPopUp
goto BattleScript_82DB6C7
BattleScript_IgnoresAndFallsAsleep::
printstring STRINGID_PKMNBEGANTONAP
waitmessage 0x40
setmoveeffect MOVE_EFFECT_SLEEP | MOVE_EFFECT_AFFECTS_USER
seteffectprimary
moveendto ATK49_NEXT_TARGET
end
BattleScript_IgnoresAndHitsItself::
printstring STRINGID_PKMNWONTOBEY
waitmessage 0x40
goto BattleScript_DoSelfConfusionDmg
BattleScript_SubstituteFade::
playanimation BS_TARGET, B_ANIM_SUBSTITUTE_FADE, NULL
printstring STRINGID_PKMNSUBSTITUTEFADED
return
BattleScript_BerryCurePrlzEnd2::
call BattleScript_BerryCureParRet
end2
BattleScript_BerryCureParRet::
playanimation BS_SCRIPTING, B_ANIM_ITEM_EFFECT, NULL
printstring STRINGID_PKMNSITEMCUREDPARALYSIS
waitmessage 0x40
updatestatusicon BS_SCRIPTING
removeitem BS_SCRIPTING
return
BattleScript_BerryCurePsnEnd2::
call BattleScript_BerryCurePsnRet
end2
BattleScript_BerryCurePsnRet::
playanimation BS_SCRIPTING, B_ANIM_ITEM_EFFECT, NULL
printstring STRINGID_PKMNSITEMCUREDPOISON
waitmessage 0x40
updatestatusicon BS_SCRIPTING
removeitem BS_SCRIPTING
return
BattleScript_BerryCureBrnEnd2::
call BattleScript_BerryCureBrnRet
end2
BattleScript_BerryCureBrnRet::
playanimation BS_SCRIPTING, B_ANIM_ITEM_EFFECT, NULL
printstring STRINGID_PKMNSITEMHEALEDBURN
waitmessage 0x40
updatestatusicon BS_SCRIPTING
removeitem BS_SCRIPTING
return
BattleScript_BerryCureFrzEnd2::
call BattleScript_BerryCureFrzRet
end2
BattleScript_BerryCureFrzRet::
playanimation BS_SCRIPTING, B_ANIM_ITEM_EFFECT, NULL
printstring STRINGID_PKMNSITEMDEFROSTEDIT
waitmessage 0x40
updatestatusicon BS_SCRIPTING
removeitem BS_SCRIPTING
return
BattleScript_BerryCureSlpEnd2::
call BattleScript_BerryCureSlpRet
end2
BattleScript_BerryCureSlpRet::
playanimation BS_SCRIPTING, B_ANIM_ITEM_EFFECT, NULL
printstring STRINGID_PKMNSITEMWOKEIT
waitmessage 0x40
updatestatusicon BS_SCRIPTING
removeitem BS_SCRIPTING
return
BattleScript_BerryCureConfusionEnd2::
call BattleScript_BerryCureConfusionRet
end2
BattleScript_BerryCureConfusionRet::
playanimation BS_SCRIPTING, B_ANIM_ITEM_EFFECT, NULL
printstring STRINGID_PKMNSITEMSNAPPEDOUT
waitmessage 0x40
removeitem BS_SCRIPTING
return
BattleScript_BerryCureChosenStatusEnd2::
call BattleScript_BerryCureChosenStatusRet
end2
BattleScript_BerryCureChosenStatusRet::
playanimation BS_SCRIPTING, B_ANIM_ITEM_EFFECT, NULL
printfromtable gBerryEffectStringIds
waitmessage 0x40
updatestatusicon BS_SCRIPTING
removeitem BS_SCRIPTING
return
BattleScript_WhiteHerbEnd2::
call BattleScript_WhiteHerbRet
end2
BattleScript_WhiteHerbRet::
playanimation BS_SCRIPTING, B_ANIM_ITEM_EFFECT, NULL
printstring STRINGID_PKMNSITEMRESTOREDSTATUS
waitmessage 0x40
removeitem BS_SCRIPTING
return
BattleScript_ItemHealHP_RemoveItem::
playanimation BS_ATTACKER, B_ANIM_ITEM_EFFECT, NULL
printstring STRINGID_PKMNSITEMRESTOREDHEALTH
waitmessage 0x40
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
removeitem BS_ATTACKER
end2
BattleScript_BerryPPHealEnd2::
playanimation BS_ATTACKER, B_ANIM_ITEM_EFFECT, NULL
printstring STRINGID_PKMNSITEMRESTOREDPP
waitmessage 0x40
removeitem BS_ATTACKER
end2
BattleScript_ItemHealHP_End2::
call BattleScript_ItemHealHP_Ret
end2
BattleScript_ItemHealHP_Ret::
playanimation BS_ATTACKER, B_ANIM_ITEM_EFFECT, NULL
printstring STRINGID_PKMNSITEMRESTOREDHPALITTLE
waitmessage 0x40
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
return
BattleScript_SelectingNotAllowedMoveChoiceItem::
printselectionstring STRINGID_ITEMALLOWSONLYYMOVE
endselectionscript
BattleScript_SelectingNotAllowedMoveAssaultVest::
printselectionstring STRINGID_ASSAULTVESTDOESNTALLOW
endselectionscript
BattleScript_HangedOnMsg::
playanimation BS_TARGET, B_ANIM_HANGED_ON, NULL
printstring STRINGID_PKMNHUNGONWITHX
waitmessage 0x40
return
BattleScript_BerryConfuseHealEnd2::
playanimation BS_ATTACKER, B_ANIM_ITEM_EFFECT, NULL
printstring STRINGID_PKMNSITEMRESTOREDHEALTH
waitmessage 0x40
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
printstring STRINGID_FORXCOMMAYZ
waitmessage 0x40
setmoveeffect MOVE_EFFECT_CONFUSION | MOVE_EFFECT_AFFECTS_USER
seteffectprimary
removeitem BS_ATTACKER
end2
BattleScript_BerryStatRaiseEnd2::
playanimation BS_ATTACKER, B_ANIM_ITEM_EFFECT, NULL
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_82DB85B
BattleScript_82DB85B::
setbyte cMULTISTRING_CHOOSER, 0x4
call BattleScript_StatUp
removeitem BS_ATTACKER
end2
BattleScript_BerryFocusEnergyEnd2::
playanimation BS_ATTACKER, B_ANIM_ITEM_EFFECT, NULL
printstring STRINGID_PKMNUSEDXTOGETPUMPED
waitmessage 0x40
removeitem BS_ATTACKER
end2
BattleScript_ActionSelectionItemsCantBeUsed::
printselectionstring STRINGID_ITEMSCANTBEUSEDNOW
endselectionscript
BattleScript_FlushMessageBox::
printstring STRINGID_EMPTYSTRING3
return
BattleScript_82DB881::
setbyte gBattleCommunication + 1, 0x0
BattleScript_82DB887::
various8 BS_ATTACKER
jumpifbyte CMP_NOT_EQUAL, gBattleCommunication, 0x1, BattleScript_82DB89D
printfromtable gStringIds_85CCF0A
waitmessage 0x40
BattleScript_82DB89D::
addbyte gBattleCommunication + 1, 0x1
jumpifbytenotequal gBattleCommunication + 1, gBattlersCount, BattleScript_82DB887
setbyte gBattleCommunication, 0x0
setbyte gBattleCommunication + 1, 0x0
end2
BattleScript_ArenaTurnBeginning::
waitcry BS_ATTACKER
volumedown
playse SE_HANTEI1
pause 0x8
playse SE_HANTEI1
various14 BS_ATTACKER
arenajudmengtstring 8
arenawaitmessage 8
pause 0x40
various15 BS_ATTACKER
volumeup
end2
BattleScript_82DB8E0:: @ Unused battlescript
playse SE_PINPON
various14 BS_ATTACKER
arenajudmengtstring BS_TARGET
arenawaitmessage BS_TARGET
pause 0x40
various15 BS_ATTACKER
end2
BattleScript_ArenaDoJudgment::
makevisible BS_PLAYER1
waitstate
makevisible BS_OPPONENT1
waitstate
volumedown
playse SE_HANTEI1
pause 0x8
playse SE_HANTEI1
pause 0x40
various14 BS_ATTACKER
arenajudmengtstring 1
arenawaitmessage 1
pause 0x40
setbyte gBattleCommunication, 0x0
arenajudgmentwindow
pause 0x40
arenajudgmentwindow
arenajudmengtstring 2
arenawaitmessage 2
arenajudgmentwindow
arenajudmengtstring 3
arenawaitmessage 3
arenajudgmentwindow
arenajudmengtstring 4
arenawaitmessage 4
arenajudgmentwindow
jumpifbyte CMP_EQUAL, gBattleCommunication + 1, 0x3, BattleScript_ArenaJudgmentPlayerLoses
jumpifbyte CMP_EQUAL, gBattleCommunication + 1, 0x4, BattleScript_ArenaJudgmentDraw
arenajudmengtstring 5
arenawaitmessage 5
arenajudgmentwindow
various15 BS_ATTACKER
printstring STRINGID_DEFEATEDOPPONENTBYREFEREE
waitmessage 0x40
playfaintcry BS_OPPONENT1
waitcry BS_ATTACKER
dofaintanimation BS_OPPONENT1
cleareffectsonfaint BS_OPPONENT1
arenaopponentmonlost
end2
BattleScript_ArenaJudgmentPlayerLoses:
arenajudmengtstring 6
arenawaitmessage 6
arenajudgmentwindow
various15 BS_ATTACKER
printstring STRINGID_LOSTTOOPPONENTBYREFEREE
waitmessage 0x40
playfaintcry BS_PLAYER1
waitcry BS_ATTACKER
dofaintanimation BS_PLAYER1
cleareffectsonfaint BS_PLAYER1
arenaplayermonlost
end2
BattleScript_ArenaJudgmentDraw:
arenajudmengtstring 7
arenawaitmessage 7
arenajudgmentwindow
various15 BS_ATTACKER
printstring STRINGID_TIEDOPPONENTBYREFEREE
waitmessage 0x40
playfaintcry BS_PLAYER1
waitcry BS_ATTACKER
dofaintanimation BS_PLAYER1
cleareffectsonfaint BS_PLAYER1
playfaintcry BS_OPPONENT1
waitcry BS_ATTACKER
dofaintanimation BS_OPPONENT1
cleareffectsonfaint BS_OPPONENT1
arenabothmonlost
end2
BattleScript_AskIfWantsToForfeitMatch::
printselectionstring STRINGID_QUESTIONFORFEITMATCH
forfeityesnobox BS_ATTACKER
endselectionscript
BattleScript_PrintPlayerForfeited::
printstring STRINGID_FORFEITEDMATCH
waitmessage 0x40
end2
BattleScript_PrintPlayerForfeitedLinkBattle::
printstring STRINGID_FORFEITEDMATCH
waitmessage 0x40
atk57
waitmessage 0x40
end2