Merge pull request #787 from GriffinRichards/rename-tablecmds

Rename table cmds
This commit is contained in:
huderlem 2019-11-04 16:31:27 -06:00 committed by GitHub
commit a4b4ecd470
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 1270 additions and 1269 deletions

View File

@ -391,11 +391,11 @@
.byte 0x47 .byte 0x47
.endm .endm
.macro playstatchangeanimation battler:req, param1:req, param2:req .macro playstatchangeanimation battler:req, stats:req, statchange:req
.byte 0x48 .byte 0x48
.byte \battler .byte \battler
.byte \param1 .byte \stats
.byte \param2 .byte \statchange
.endm .endm
.macro moveend param0:req, param1:req .macro moveend param0:req, param1:req
@ -738,10 +738,10 @@
.byte 0x88 .byte 0x88
.endm .endm
.macro statbuffchange param0:req, param1:req .macro statbuffchange flags:req, jumpptr:req
.byte 0x89 .byte 0x89
.byte \param0 .byte \flags
.4byte \param1 .4byte \jumpptr
.endm .endm
.macro normalisebuffs .macro normalisebuffs

View File

@ -366,7 +366,7 @@ BattleScript_EffectAbsorb::
setbyte cMULTISTRING_CHOOSER, 0x0 setbyte cMULTISTRING_CHOOSER, 0x0
goto BattleScript_AbsorbUpdateHp goto BattleScript_AbsorbUpdateHp
BattleScript_AbsorbLiquidOoze:: BattleScript_AbsorbLiquidOoze::
manipulatedamage ATK80_DMG_CHANGE_SIGN manipulatedamage DMG_CHANGE_SIGN
setbyte cMULTISTRING_CHOOSER, 0x1 setbyte cMULTISTRING_CHOOSER, 0x1
BattleScript_AbsorbUpdateHp:: BattleScript_AbsorbUpdateHp::
healthbarupdate BS_ATTACKER healthbarupdate BS_ATTACKER
@ -422,7 +422,7 @@ BattleScript_ExplosionLoop:
resultmessage resultmessage
waitmessage 0x40 waitmessage 0x40
tryfaintmon BS_TARGET, FALSE, NULL tryfaintmon BS_TARGET, FALSE, NULL
moveendto ATK49_NEXT_TARGET moveendto MOVEEND_NEXT_TARGET
jumpifnexttargetvalid BattleScript_ExplosionLoop jumpifnexttargetvalid BattleScript_ExplosionLoop
tryfaintmon BS_ATTACKER, FALSE, NULL tryfaintmon BS_ATTACKER, FALSE, NULL
end end
@ -430,7 +430,7 @@ BattleScript_ExplosionMissed:
effectivenesssound effectivenesssound
resultmessage resultmessage
waitmessage 0x40 waitmessage 0x40
moveendto ATK49_NEXT_TARGET moveendto MOVEEND_NEXT_TARGET
jumpifnexttargetvalid BattleScript_ExplosionLoop jumpifnexttargetvalid BattleScript_ExplosionLoop
tryfaintmon BS_ATTACKER, FALSE, NULL tryfaintmon BS_ATTACKER, FALSE, NULL
end end
@ -511,7 +511,7 @@ BattleScript_EffectStatUp::
BattleScript_EffectStatUpAfterAtkCanceler:: BattleScript_EffectStatUpAfterAtkCanceler::
attackstring attackstring
ppreduce ppreduce
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_StatUpEnd statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_StatUpEnd
jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_StatUpAttackAnim jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_StatUpAttackAnim
pause 0x20 pause 0x20
goto BattleScript_StatUpPrintString goto BattleScript_StatUpPrintString
@ -557,7 +557,7 @@ BattleScript_EffectStatDown::
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring attackstring
ppreduce ppreduce
statbuffchange STAT_CHANGE_BS_PTR, BattleScript_StatDownEnd statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_StatDownEnd
jumpifbyte CMP_LESS_THAN, cMULTISTRING_CHOOSER, 0x2, BattleScript_StatDownDoAnim jumpifbyte CMP_LESS_THAN, cMULTISTRING_CHOOSER, 0x2, BattleScript_StatDownDoAnim
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x3, BattleScript_StatDownEnd jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x3, BattleScript_StatDownEnd
pause 0x20 pause 0x20
@ -654,7 +654,7 @@ BattleScript_DoMultiHit::
printstring STRINGID_EMPTYSTRING3 printstring STRINGID_EMPTYSTRING3
waitmessage 0x1 waitmessage 0x1
addbyte sMULTIHIT_STRING + 4, 0x1 addbyte sMULTIHIT_STRING + 4, 0x1
moveendto ATK49_NEXT_TARGET moveendto MOVEEND_NEXT_TARGET
jumpifbyte CMP_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_FOE_ENDURED, BattleScript_MultiHitPrintStrings jumpifbyte CMP_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_FOE_ENDURED, BattleScript_MultiHitPrintStrings
decrementmultihit BattleScript_MultiHitLoop decrementmultihit BattleScript_MultiHitLoop
goto BattleScript_MultiHitPrintStrings goto BattleScript_MultiHitPrintStrings
@ -670,8 +670,8 @@ BattleScript_MultiHitPrintStrings::
BattleScript_MultiHitEnd:: BattleScript_MultiHitEnd::
seteffectwithchance seteffectwithchance
tryfaintmon BS_TARGET, FALSE, NULL tryfaintmon BS_TARGET, FALSE, NULL
moveendcase ATK49_SYNCHRONIZE_TARGET moveendcase MOVEEND_SYNCHRONIZE_TARGET
moveendfrom ATK49_STATUS_IMMUNITY_ABILITIES moveendfrom MOVEEND_IMMUNITY_ABILITIES
end end
BattleScript_EffectConversion:: BattleScript_EffectConversion::
@ -882,7 +882,7 @@ BattleScript_MoveMissedDoDamage::
damagecalc damagecalc
typecalc typecalc
adjustnormaldamage adjustnormaldamage
manipulatedamage ATK80_DMG_HALF_BY_TWO_NOT_MORE_THAN_HALF_MAX_HP manipulatedamage DMG_RECOIL_FROM_MISS
bicbyte gMoveResultFlags, MOVE_RESULT_MISSED bicbyte gMoveResultFlags, MOVE_RESULT_MISSED
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
healthbarupdate BS_ATTACKER healthbarupdate BS_ATTACKER
@ -1435,7 +1435,7 @@ BattleScript_DoTripleKickAttack::
waitmessage 0x40 waitmessage 0x40
printstring STRINGID_EMPTYSTRING3 printstring STRINGID_EMPTYSTRING3
waitmessage 0x1 waitmessage 0x1
moveendto ATK49_NEXT_TARGET moveendto MOVEEND_NEXT_TARGET
jumpifbyte CMP_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_FOE_ENDURED, BattleScript_TripleKickPrintStrings jumpifbyte CMP_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_FOE_ENDURED, BattleScript_TripleKickPrintStrings
decrementmultihit BattleScript_TripleKickLoop decrementmultihit BattleScript_TripleKickLoop
goto BattleScript_TripleKickPrintStrings goto BattleScript_TripleKickPrintStrings
@ -1454,7 +1454,7 @@ BattleScript_TripleKickPrintStrings::
BattleScript_TripleKickEnd:: BattleScript_TripleKickEnd::
seteffectwithchance seteffectwithchance
tryfaintmon BS_TARGET, FALSE, NULL tryfaintmon BS_TARGET, FALSE, NULL
moveendfrom ATK49_UPDATE_LAST_MOVES moveendfrom MOVEEND_UPDATE_LAST_MOVES
end end
BattleScript_EffectThief:: BattleScript_EffectThief::
@ -1513,17 +1513,17 @@ BattleScript_CurseTrySpeed::
attackanimation attackanimation
waitanimation waitanimation
setstatchanger STAT_SPEED, 1, TRUE setstatchanger STAT_SPEED, 1, TRUE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_CurseTryAttack statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_CurseTryAttack
printfromtable gStatDownStringIds printfromtable gStatDownStringIds
waitmessage 0x40 waitmessage 0x40
BattleScript_CurseTryAttack:: BattleScript_CurseTryAttack::
setstatchanger STAT_ATK, 1, FALSE setstatchanger STAT_ATK, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_CurseTryDefence statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_CurseTryDefence
printfromtable gStatUpStringIds printfromtable gStatUpStringIds
waitmessage 0x40 waitmessage 0x40
BattleScript_CurseTryDefence:: BattleScript_CurseTryDefence::
setstatchanger STAT_DEF, 1, FALSE setstatchanger STAT_DEF, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_CurseEnd statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_CurseEnd
printfromtable gStatUpStringIds printfromtable gStatUpStringIds
waitmessage 0x40 waitmessage 0x40
BattleScript_CurseEnd:: BattleScript_CurseEnd::
@ -1635,7 +1635,7 @@ BattleScript_EffectSwagger::
attackanimation attackanimation
waitanimation waitanimation
setstatchanger STAT_ATK, 2, FALSE setstatchanger STAT_ATK, 2, FALSE
statbuffchange STAT_CHANGE_BS_PTR, BattleScript_SwaggerTryConfuse statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_SwaggerTryConfuse
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_SwaggerTryConfuse jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_SwaggerTryConfuse
setgraphicalstatchangevalues setgraphicalstatchangevalues
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
@ -1716,7 +1716,7 @@ BattleScript_EffectBatonPass::
attackstring attackstring
ppreduce ppreduce
jumpifbattletype BATTLE_TYPE_ARENA, BattleScript_ButItFailed jumpifbattletype BATTLE_TYPE_ARENA, BattleScript_ButItFailed
jumpifcantswitch ATK4F_DONT_CHECK_STATUSES | BS_ATTACKER, BattleScript_ButItFailed jumpifcantswitch SWITCH_IGNORE_ESCAPE_PREVENTION | BS_ATTACKER, BattleScript_ButItFailed
attackanimation attackanimation
waitanimation waitanimation
openpartyscreen 0x1, BattleScript_ButItFailed openpartyscreen 0x1, BattleScript_ButItFailed
@ -1834,7 +1834,7 @@ BattleScript_EffectSkullBash::
setbyte sTWOTURN_STRINGID, 0x2 setbyte sTWOTURN_STRINGID, 0x2
call BattleScriptFirstChargingTurn call BattleScriptFirstChargingTurn
setstatchanger STAT_DEF, 1, FALSE setstatchanger STAT_DEF, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_SkullBashEnd statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_SkullBashEnd
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_SkullBashEnd jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_SkullBashEnd
setgraphicalstatchangevalues setgraphicalstatchangevalues
playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
@ -1885,7 +1885,7 @@ BattleScript_DoHitAllWithUndergroundBonus::
printstring STRINGID_EMPTYSTRING3 printstring STRINGID_EMPTYSTRING3
waitmessage 0x1 waitmessage 0x1
tryfaintmon BS_TARGET, FALSE, NULL tryfaintmon BS_TARGET, FALSE, NULL
moveendto ATK49_NEXT_TARGET moveendto MOVEEND_NEXT_TARGET
jumpifnexttargetvalid BattleScript_HitsAllWithUndergroundBonusLoop jumpifnexttargetvalid BattleScript_HitsAllWithUndergroundBonusLoop
end end
BattleScript_HitAllWithUndergroundBonusMissed:: BattleScript_HitAllWithUndergroundBonusMissed::
@ -1894,7 +1894,7 @@ BattleScript_HitAllWithUndergroundBonusMissed::
effectivenesssound effectivenesssound
resultmessage resultmessage
waitmessage 0x40 waitmessage 0x40
moveendto ATK49_NEXT_TARGET moveendto MOVEEND_NEXT_TARGET
jumpifnexttargetvalid BattleScript_HitsAllWithUndergroundBonusLoop jumpifnexttargetvalid BattleScript_HitsAllWithUndergroundBonusLoop
end end
@ -1970,7 +1970,7 @@ BattleScript_BeatUpLoop::
printstring STRINGID_PKMNATTACK printstring STRINGID_PKMNATTACK
critcalc critcalc
jumpifbyte CMP_NOT_EQUAL, gCritMultiplier, 0x2, BattleScript_BeatUpAttack jumpifbyte CMP_NOT_EQUAL, gCritMultiplier, 0x2, BattleScript_BeatUpAttack
manipulatedamage ATK80_DMG_DOUBLED manipulatedamage DMG_DOUBLED
BattleScript_BeatUpAttack:: BattleScript_BeatUpAttack::
adjustnormaldamage adjustnormaldamage
attackanimation attackanimation
@ -1985,7 +1985,7 @@ BattleScript_BeatUpAttack::
resultmessage resultmessage
waitmessage 0x40 waitmessage 0x40
tryfaintmon BS_TARGET, FALSE, NULL tryfaintmon BS_TARGET, FALSE, NULL
moveendto ATK49_NEXT_TARGET moveendto MOVEEND_NEXT_TARGET
goto BattleScript_BeatUpLoop goto BattleScript_BeatUpLoop
BattleScript_BeatUpEnd:: BattleScript_BeatUpEnd::
end end
@ -2037,7 +2037,7 @@ BattleScript_EffectDefenseCurl::
ppreduce ppreduce
setdefensecurlbit setdefensecurlbit
setstatchanger STAT_DEF, 1, FALSE setstatchanger STAT_DEF, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_DefenseCurlDoStatUpAnim statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_DefenseCurlDoStatUpAnim
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_StatUpPrintString jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_StatUpPrintString
attackanimation attackanimation
waitanimation waitanimation
@ -2178,7 +2178,7 @@ BattleScript_EffectFlatter::
attackanimation attackanimation
waitanimation waitanimation
setstatchanger STAT_SPATK, 1, FALSE setstatchanger STAT_SPATK, 1, FALSE
statbuffchange STAT_CHANGE_BS_PTR, BattleScript_FlatterTryConfuse statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_FlatterTryConfuse
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_FlatterTryConfuse jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_FlatterTryConfuse
setgraphicalstatchangevalues setgraphicalstatchangevalues
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
@ -2232,17 +2232,17 @@ BattleScript_EffectMemento::
waitanimation waitanimation
jumpifstatus2 BS_TARGET, STATUS2_SUBSTITUTE, BattleScript_EffectMementoPrintNoEffect jumpifstatus2 BS_TARGET, STATUS2_SUBSTITUTE, BattleScript_EffectMementoPrintNoEffect
setbyte sSTAT_ANIM_PLAYED, FALSE 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 | BIT_SPATK, STAT_CHANGE_NEGATIVE | STAT_CHANGE_BY_TWO | STAT_CHANGE_MULTIPLE_STATS
playstatchangeanimation BS_TARGET, BIT_ATK, ATK48_STAT_NEGATIVE | ATK48_STAT_BY_TWO playstatchangeanimation BS_TARGET, BIT_ATK, STAT_CHANGE_NEGATIVE | STAT_CHANGE_BY_TWO
setstatchanger STAT_ATK, 2, TRUE setstatchanger STAT_ATK, 2, TRUE
statbuffchange STAT_CHANGE_BS_PTR, BattleScript_EffectMementoTrySpAtk statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_EffectMementoTrySpAtk
jumpifbyte CMP_GREATER_THAN, cMULTISTRING_CHOOSER, 0x1, BattleScript_EffectMementoTrySpAtk jumpifbyte CMP_GREATER_THAN, cMULTISTRING_CHOOSER, 0x1, BattleScript_EffectMementoTrySpAtk
printfromtable gStatDownStringIds printfromtable gStatDownStringIds
waitmessage 0x40 waitmessage 0x40
BattleScript_EffectMementoTrySpAtk: BattleScript_EffectMementoTrySpAtk:
playstatchangeanimation BS_TARGET, BIT_SPATK, ATK48_STAT_NEGATIVE | ATK48_STAT_BY_TWO playstatchangeanimation BS_TARGET, BIT_SPATK, STAT_CHANGE_NEGATIVE | STAT_CHANGE_BY_TWO
setstatchanger STAT_SPATK, 2, TRUE setstatchanger STAT_SPATK, 2, TRUE
statbuffchange STAT_CHANGE_BS_PTR, BattleScript_EffectMementoTryFaint statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_EffectMementoTryFaint
jumpifbyte CMP_GREATER_THAN, cMULTISTRING_CHOOSER, 0x1, BattleScript_EffectMementoTryFaint jumpifbyte CMP_GREATER_THAN, cMULTISTRING_CHOOSER, 0x1, BattleScript_EffectMementoTryFaint
printfromtable gStatDownStringIds printfromtable gStatDownStringIds
waitmessage 0x40 waitmessage 0x40
@ -2606,7 +2606,7 @@ BattleScript_TeeterDanceLoop::
resultmessage resultmessage
waitmessage 0x40 waitmessage 0x40
BattleScript_TeeterDanceDoMoveEndIncrement:: BattleScript_TeeterDanceDoMoveEndIncrement::
moveendto ATK49_NEXT_TARGET moveendto MOVEEND_NEXT_TARGET
BattleScript_TeeterDanceLoopIncrement:: BattleScript_TeeterDanceLoopIncrement::
addbyte gBattlerTarget, 0x1 addbyte gBattlerTarget, 0x1
jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_TeeterDanceLoop jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_TeeterDanceLoop
@ -2677,17 +2677,17 @@ BattleScript_TickleDoMoveAnim::
attackanimation attackanimation
waitanimation waitanimation
setbyte sSTAT_ANIM_PLAYED, FALSE setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_TARGET, BIT_ATK | BIT_DEF, ATK48_STAT_NEGATIVE | ATK48_ONLY_MULTIPLE playstatchangeanimation BS_TARGET, BIT_ATK | BIT_DEF, STAT_CHANGE_NEGATIVE | STAT_CHANGE_MULTIPLE_STATS
playstatchangeanimation BS_TARGET, BIT_ATK, ATK48_STAT_NEGATIVE playstatchangeanimation BS_TARGET, BIT_ATK, STAT_CHANGE_NEGATIVE
setstatchanger STAT_ATK, 1, TRUE setstatchanger STAT_ATK, 1, TRUE
statbuffchange STAT_CHANGE_BS_PTR, BattleScript_TickleTryLowerDef statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_TickleTryLowerDef
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_TickleTryLowerDef jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_TickleTryLowerDef
printfromtable gStatDownStringIds printfromtable gStatDownStringIds
waitmessage 0x40 waitmessage 0x40
BattleScript_TickleTryLowerDef:: BattleScript_TickleTryLowerDef::
playstatchangeanimation BS_TARGET, BIT_DEF, ATK48_STAT_NEGATIVE playstatchangeanimation BS_TARGET, BIT_DEF, STAT_CHANGE_NEGATIVE
setstatchanger STAT_DEF, 1, TRUE setstatchanger STAT_DEF, 1, TRUE
statbuffchange STAT_CHANGE_BS_PTR, BattleScript_TickleEnd statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_TickleEnd
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_TickleEnd jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_TickleEnd
printfromtable gStatDownStringIds printfromtable gStatDownStringIds
waitmessage 0x40 waitmessage 0x40
@ -2713,13 +2713,13 @@ BattleScript_CosmicPowerDoMoveAnim::
setbyte sSTAT_ANIM_PLAYED, FALSE setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_ATTACKER, BIT_DEF | BIT_SPDEF, 0x0 playstatchangeanimation BS_ATTACKER, BIT_DEF | BIT_SPDEF, 0x0
setstatchanger STAT_DEF, 1, FALSE setstatchanger STAT_DEF, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_CosmicPowerTrySpDef statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_CosmicPowerTrySpDef
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_CosmicPowerTrySpDef jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_CosmicPowerTrySpDef
printfromtable gStatUpStringIds printfromtable gStatUpStringIds
waitmessage 0x40 waitmessage 0x40
BattleScript_CosmicPowerTrySpDef:: BattleScript_CosmicPowerTrySpDef::
setstatchanger STAT_SPDEF, 1, FALSE setstatchanger STAT_SPDEF, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_CosmicPowerEnd statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_CosmicPowerEnd
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_CosmicPowerEnd jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_CosmicPowerEnd
printfromtable gStatUpStringIds printfromtable gStatUpStringIds
waitmessage 0x40 waitmessage 0x40
@ -2742,13 +2742,13 @@ BattleScript_BulkUpDoMoveAnim::
setbyte sSTAT_ANIM_PLAYED, FALSE setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_DEF, 0x0 playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_DEF, 0x0
setstatchanger STAT_ATK, 1, FALSE setstatchanger STAT_ATK, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_BulkUpTryDef statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_BulkUpTryDef
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_BulkUpTryDef jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_BulkUpTryDef
printfromtable gStatUpStringIds printfromtable gStatUpStringIds
waitmessage 0x40 waitmessage 0x40
BattleScript_BulkUpTryDef:: BattleScript_BulkUpTryDef::
setstatchanger STAT_DEF, 1, FALSE setstatchanger STAT_DEF, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_BulkUpEnd statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_BulkUpEnd
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_BulkUpEnd jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_BulkUpEnd
printfromtable gStatUpStringIds printfromtable gStatUpStringIds
waitmessage 0x40 waitmessage 0x40
@ -2767,13 +2767,13 @@ BattleScript_CalmMindDoMoveAnim::
setbyte sSTAT_ANIM_PLAYED, FALSE setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_ATTACKER, BIT_SPATK | BIT_SPDEF, 0x0 playstatchangeanimation BS_ATTACKER, BIT_SPATK | BIT_SPDEF, 0x0
setstatchanger STAT_SPATK, 1, FALSE setstatchanger STAT_SPATK, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_CalmMindTrySpDef statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_CalmMindTrySpDef
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_CalmMindTrySpDef jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_CalmMindTrySpDef
printfromtable gStatUpStringIds printfromtable gStatUpStringIds
waitmessage 0x40 waitmessage 0x40
BattleScript_CalmMindTrySpDef:: BattleScript_CalmMindTrySpDef::
setstatchanger STAT_SPDEF, 1, FALSE setstatchanger STAT_SPDEF, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_CalmMindEnd statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_CalmMindEnd
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_CalmMindEnd jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_CalmMindEnd
printfromtable gStatUpStringIds printfromtable gStatUpStringIds
waitmessage 0x40 waitmessage 0x40
@ -2799,13 +2799,13 @@ BattleScript_DragonDanceDoMoveAnim::
setbyte sSTAT_ANIM_PLAYED, FALSE setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_SPEED, 0x0 playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_SPEED, 0x0
setstatchanger STAT_ATK, 1, FALSE setstatchanger STAT_ATK, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_DragonDanceTrySpeed statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_DragonDanceTrySpeed
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_DragonDanceTrySpeed jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_DragonDanceTrySpeed
printfromtable gStatUpStringIds printfromtable gStatUpStringIds
waitmessage 0x40 waitmessage 0x40
BattleScript_DragonDanceTrySpeed:: BattleScript_DragonDanceTrySpeed::
setstatchanger STAT_SPEED, 1, FALSE setstatchanger STAT_SPEED, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_DragonDanceEnd statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_DragonDanceEnd
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_DragonDanceEnd jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_DragonDanceEnd
printfromtable gStatUpStringIds printfromtable gStatUpStringIds
waitmessage 0x40 waitmessage 0x40
@ -2865,7 +2865,7 @@ BattleScript_FaintedMonTryChooseAnother::
jumpifbattletype BATTLE_TYPE_DOUBLE, BattleScript_FaintedMonChooseAnother jumpifbattletype BATTLE_TYPE_DOUBLE, BattleScript_FaintedMonChooseAnother
jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_x400000, BattleScript_FaintedMonChooseAnother jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_x400000, BattleScript_FaintedMonChooseAnother
jumpifbyte CMP_EQUAL, sBATTLE_STYLE, 0x1, BattleScript_FaintedMonChooseAnother jumpifbyte CMP_EQUAL, sBATTLE_STYLE, 0x1, BattleScript_FaintedMonChooseAnother
jumpifcantswitch 11, BattleScript_FaintedMonChooseAnother jumpifcantswitch BS_PLAYER1, BattleScript_FaintedMonChooseAnother
printstring STRINGID_ENEMYABOUTTOSWITCHPKMN printstring STRINGID_ENEMYABOUTTOSWITCHPKMN
setbyte gBattleCommunication, 0x0 setbyte gBattleCommunication, 0x0
yesnobox yesnobox
@ -3128,8 +3128,8 @@ BattleScript_DoSwitchOut::
switchinanim BS_ATTACKER, FALSE switchinanim BS_ATTACKER, FALSE
waitstate waitstate
switchineffects BS_ATTACKER switchineffects BS_ATTACKER
moveendcase ATK49_STATUS_IMMUNITY_ABILITIES moveendcase MOVEEND_IMMUNITY_ABILITIES
moveendcase ATK49_MIRROR_MOVE moveendcase MOVEEND_MIRROR_MOVE
end2 end2
BattleScript_PursuitDmgOnSwitchOut:: BattleScript_PursuitDmgOnSwitchOut::
@ -3152,7 +3152,7 @@ BattleScript_PursuitDmgOnSwitchOut::
resultmessage resultmessage
waitmessage 0x40 waitmessage 0x40
tryfaintmon BS_TARGET, FALSE, NULL tryfaintmon BS_TARGET, FALSE, NULL
moveendfromto ATK49_MOVE_END_ABILITIES, ATK49_CHOICE_MOVE moveendfromto MOVEEND_ON_DAMAGE_ABILITIES, MOVEEND_CHOICE_MOVE
various4 BS_TARGET various4 BS_TARGET
jumpifbyte CMP_EQUAL, gBattleCommunication, 0x0, BattleScript_PursuitDmgOnSwitchOutRet jumpifbyte CMP_EQUAL, gBattleCommunication, 0x0, BattleScript_PursuitDmgOnSwitchOutRet
setbyte sGIVEEXP_STATE, 0x0 setbyte sGIVEEXP_STATE, 0x0
@ -3281,7 +3281,7 @@ BattleScript_LeechSeedTurnDrain::
datahpupdate BS_ATTACKER datahpupdate BS_ATTACKER
copyword gBattleMoveDamage, gHpDealt copyword gBattleMoveDamage, gHpDealt
jumpifability BS_ATTACKER, ABILITY_LIQUID_OOZE, BattleScript_LeechSeedTurnPrintLiquidOoze jumpifability BS_ATTACKER, ABILITY_LIQUID_OOZE, BattleScript_LeechSeedTurnPrintLiquidOoze
manipulatedamage ATK80_DMG_CHANGE_SIGN manipulatedamage DMG_CHANGE_SIGN
setbyte cMULTISTRING_CHOOSER, 0x3 setbyte cMULTISTRING_CHOOSER, 0x3
goto BattleScript_LeechSeedTurnPrintAndUpdateHp goto BattleScript_LeechSeedTurnPrintAndUpdateHp
BattleScript_LeechSeedTurnPrintLiquidOoze:: BattleScript_LeechSeedTurnPrintLiquidOoze::
@ -3380,7 +3380,7 @@ BattleScript_DisabledNoMore::
BattleScript_SelectingDisabledMoveInPalace:: BattleScript_SelectingDisabledMoveInPalace::
printstring STRINGID_PKMNMOVEISDISABLED printstring STRINGID_PKMNMOVEISDISABLED
BattleScript_SelectingUnusableMoveInPalace:: BattleScript_SelectingUnusableMoveInPalace::
moveendto ATK49_NEXT_TARGET moveendto MOVEEND_NEXT_TARGET
end end
BattleScript_EncoredNoMore:: BattleScript_EncoredNoMore::
@ -3471,27 +3471,27 @@ BattleScript_AllStatsUpAtk::
setbyte sSTAT_ANIM_PLAYED, FALSE setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_DEF | BIT_SPEED | BIT_SPATK | BIT_SPDEF, 0x0 playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_DEF | BIT_SPEED | BIT_SPATK | BIT_SPDEF, 0x0
setstatchanger STAT_ATK, 1, FALSE setstatchanger STAT_ATK, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_AllStatsUpDef statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_AllStatsUpDef
printfromtable gStatUpStringIds printfromtable gStatUpStringIds
waitmessage 0x40 waitmessage 0x40
BattleScript_AllStatsUpDef:: BattleScript_AllStatsUpDef::
setstatchanger STAT_DEF, 1, FALSE setstatchanger STAT_DEF, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_AllStatsUpSpeed statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_AllStatsUpSpeed
printfromtable gStatUpStringIds printfromtable gStatUpStringIds
waitmessage 0x40 waitmessage 0x40
BattleScript_AllStatsUpSpeed:: BattleScript_AllStatsUpSpeed::
setstatchanger STAT_SPEED, 1, FALSE setstatchanger STAT_SPEED, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_AllStatsUpSpAtk statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_AllStatsUpSpAtk
printfromtable gStatUpStringIds printfromtable gStatUpStringIds
waitmessage 0x40 waitmessage 0x40
BattleScript_AllStatsUpSpAtk:: BattleScript_AllStatsUpSpAtk::
setstatchanger STAT_SPATK, 1, FALSE setstatchanger STAT_SPATK, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_AllStatsUpSpDef statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_AllStatsUpSpDef
printfromtable gStatUpStringIds printfromtable gStatUpStringIds
waitmessage 0x40 waitmessage 0x40
BattleScript_AllStatsUpSpDef:: BattleScript_AllStatsUpSpDef::
setstatchanger STAT_SPDEF, 1, FALSE setstatchanger STAT_SPDEF, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_AllStatsUpRet statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_AllStatsUpRet
printfromtable gStatUpStringIds printfromtable gStatUpStringIds
waitmessage 0x40 waitmessage 0x40
BattleScript_AllStatsUpRet:: BattleScript_AllStatsUpRet::
@ -3543,8 +3543,8 @@ BattleScript_DoFutureAttackHit::
tryfaintmon BS_TARGET, FALSE, NULL tryfaintmon BS_TARGET, FALSE, NULL
atk24 BattleScript_FutureAttackEnd atk24 BattleScript_FutureAttackEnd
BattleScript_FutureAttackEnd:: BattleScript_FutureAttackEnd::
moveendcase ATK49_RAGE moveendcase MOVEEND_RAGE
moveendfromto ATK49_ITEM_EFFECTS_ALL, ATK49_UPDATE_LAST_MOVES moveendfromto MOVEEND_ITEM_EFFECTS_ALL, MOVEEND_UPDATE_LAST_MOVES
setbyte gMoveResultFlags, 0 setbyte gMoveResultFlags, 0
end2 end2
@ -3635,17 +3635,17 @@ BattleScript_PrintMonIsRooted::
BattleScript_AtkDefDown:: BattleScript_AtkDefDown::
setbyte sSTAT_ANIM_PLAYED, FALSE 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_DEF | BIT_ATK, STAT_CHANGE_CANT_PREVENT | STAT_CHANGE_NEGATIVE | STAT_CHANGE_MULTIPLE_STATS
playstatchangeanimation BS_ATTACKER, BIT_ATK, ATK48_DONT_CHECK_LOWER | ATK48_STAT_NEGATIVE playstatchangeanimation BS_ATTACKER, BIT_ATK, STAT_CHANGE_CANT_PREVENT | STAT_CHANGE_NEGATIVE
setstatchanger STAT_ATK, 1, TRUE setstatchanger STAT_ATK, 1, TRUE
statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN | STAT_CHANGE_BS_PTR, BattleScript_82DB144 statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN | STAT_BUFF_ALLOW_PTR, BattleScript_82DB144
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_82DB144 jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_82DB144
printfromtable gStatDownStringIds printfromtable gStatDownStringIds
waitmessage 0x40 waitmessage 0x40
BattleScript_82DB144:: BattleScript_82DB144::
playstatchangeanimation BS_ATTACKER, BIT_DEF, ATK48_DONT_CHECK_LOWER | ATK48_STAT_NEGATIVE playstatchangeanimation BS_ATTACKER, BIT_DEF, STAT_CHANGE_CANT_PREVENT | STAT_CHANGE_NEGATIVE
setstatchanger STAT_DEF, 1, TRUE setstatchanger STAT_DEF, 1, TRUE
statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN | STAT_CHANGE_BS_PTR, BattleScript_82DB167 statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN | STAT_BUFF_ALLOW_PTR, BattleScript_82DB167
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_82DB167 jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_82DB167
printfromtable gStatDownStringIds printfromtable gStatDownStringIds
waitmessage 0x40 waitmessage 0x40
@ -3709,9 +3709,9 @@ BattleScript_OneHitKOMsg::
BattleScript_SAtkDown2:: BattleScript_SAtkDown2::
setbyte sSTAT_ANIM_PLAYED, FALSE setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_ATTACKER, BIT_SPATK, ATK48_DONT_CHECK_LOWER | ATK48_STAT_NEGATIVE | ATK48_STAT_BY_TWO playstatchangeanimation BS_ATTACKER, BIT_SPATK, STAT_CHANGE_CANT_PREVENT | STAT_CHANGE_NEGATIVE | STAT_CHANGE_BY_TWO
setstatchanger STAT_SPATK, 2, TRUE setstatchanger STAT_SPATK, 2, TRUE
statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN | STAT_CHANGE_BS_PTR, BattleScript_SAtkDown2End statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN | STAT_BUFF_ALLOW_PTR, BattleScript_SAtkDown2End
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_SAtkDown2End jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_SAtkDown2End
printfromtable gStatDownStringIds printfromtable gStatDownStringIds
waitmessage 0x40 waitmessage 0x40
@ -4042,7 +4042,7 @@ BattleScript_IntimidateActivatesLoop:
jumpifability BS_TARGET, ABILITY_CLEAR_BODY, BattleScript_IntimidatePrevented jumpifability BS_TARGET, ABILITY_CLEAR_BODY, BattleScript_IntimidatePrevented
jumpifability BS_TARGET, ABILITY_HYPER_CUTTER, BattleScript_IntimidatePrevented jumpifability BS_TARGET, ABILITY_HYPER_CUTTER, BattleScript_IntimidatePrevented
jumpifability BS_TARGET, ABILITY_WHITE_SMOKE, BattleScript_IntimidatePrevented jumpifability BS_TARGET, ABILITY_WHITE_SMOKE, BattleScript_IntimidatePrevented
statbuffchange STAT_CHANGE_NOT_PROTECT_AFFECTED | STAT_CHANGE_BS_PTR, BattleScript_IntimidateActivatesLoopIncrement statbuffchange STAT_BUFF_NOT_PROTECT_AFFECTED | STAT_BUFF_ALLOW_PTR, BattleScript_IntimidateActivatesLoopIncrement
jumpifbyte CMP_GREATER_THAN, cMULTISTRING_CHOOSER, 0x1, BattleScript_IntimidateActivatesLoopIncrement jumpifbyte CMP_GREATER_THAN, cMULTISTRING_CHOOSER, 0x1, BattleScript_IntimidateActivatesLoopIncrement
setgraphicalstatchangevalues setgraphicalstatchangevalues
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
@ -4233,7 +4233,7 @@ BattleScript_AbilityCuredStatus::
BattleScript_IgnoresWhileAsleep:: BattleScript_IgnoresWhileAsleep::
printstring STRINGID_PKMNIGNORESASLEEP printstring STRINGID_PKMNIGNORESASLEEP
waitmessage 0x40 waitmessage 0x40
moveendto ATK49_NEXT_TARGET moveendto MOVEEND_NEXT_TARGET
end end
BattleScript_IgnoresAndUsesRandomMove:: BattleScript_IgnoresAndUsesRandomMove::
@ -4249,7 +4249,7 @@ BattleScript_MoveUsedLoafingAround::
BattleScript_82DB6C7:: BattleScript_82DB6C7::
printfromtable gInobedientStringIds printfromtable gInobedientStringIds
waitmessage 0x40 waitmessage 0x40
moveendto ATK49_NEXT_TARGET moveendto MOVEEND_NEXT_TARGET
end end
BattleScript_IgnoresAndFallsAsleep:: BattleScript_IgnoresAndFallsAsleep::
@ -4257,7 +4257,7 @@ BattleScript_IgnoresAndFallsAsleep::
waitmessage 0x40 waitmessage 0x40
setmoveeffect MOVE_EFFECT_SLEEP | MOVE_EFFECT_AFFECTS_USER setmoveeffect MOVE_EFFECT_SLEEP | MOVE_EFFECT_AFFECTS_USER
seteffectprimary seteffectprimary
moveendto ATK49_NEXT_TARGET moveendto MOVEEND_NEXT_TARGET
end end
BattleScript_IgnoresAndHitsItself:: BattleScript_IgnoresAndHitsItself::
@ -4420,7 +4420,7 @@ BattleScript_BerryConfuseHealEnd2::
BattleScript_BerryStatRaiseEnd2:: BattleScript_BerryStatRaiseEnd2::
playanimation BS_ATTACKER, B_ANIM_ITEM_EFFECT, NULL playanimation BS_ATTACKER, B_ANIM_ITEM_EFFECT, NULL
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_82DB85B statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_82DB85B
BattleScript_82DB85B:: BattleScript_82DB85B::
setbyte cMULTISTRING_CHOOSER, 0x4 setbyte cMULTISTRING_CHOOSER, 0x4
call BattleScript_StatUp call BattleScript_StatUp

View File

@ -478,7 +478,7 @@ struct BattleScripting
u8 animArg1; u8 animArg1;
u8 animArg2; u8 animArg2;
u16 tripleKickPower; u16 tripleKickPower;
u8 atk49_state; u8 moveendState;
u8 battlerWithAbility; u8 battlerWithAbility;
u8 multihitMoveEffect; u8 multihitMoveEffect;
u8 battler; u8 battler;
@ -486,9 +486,9 @@ struct BattleScripting
u8 animTargetsHit; u8 animTargetsHit;
u8 statChanger; u8 statChanger;
bool8 statAnimPlayed; bool8 statAnimPlayed;
u8 atk23_state; u8 getexpState;
u8 battleStyle; u8 battleStyle;
u8 atk6C_state; u8 drawlvlupboxState;
u8 learnMoveState; u8 learnMoveState;
u8 field_20; u8 field_20;
u8 reshowMainState; u8 reshowMainState;

View File

@ -12,7 +12,7 @@
#define ABILITYEFFECT_ENDTURN 0x1 #define ABILITYEFFECT_ENDTURN 0x1
#define ABILITYEFFECT_MOVES_BLOCK 0x2 #define ABILITYEFFECT_MOVES_BLOCK 0x2
#define ABILITYEFFECT_ABSORBING 0x3 #define ABILITYEFFECT_ABSORBING 0x3
#define ABILITYEFFECT_MOVE_END 0x4 #define ABILITYEFFECT_ON_DAMAGE 0x4
#define ABILITYEFFECT_IMMUNITY 0x5 #define ABILITYEFFECT_IMMUNITY 0x5
#define ABILITYEFFECT_FORECAST 0x6 #define ABILITYEFFECT_FORECAST 0x6
#define ABILITYEFFECT_SYNCHRONIZE 0x7 #define ABILITYEFFECT_SYNCHRONIZE 0x7

View File

@ -39,16 +39,16 @@
#define BS_EFFECT_BATTLER 2 #define BS_EFFECT_BATTLER 2
#define BS_FAINTED 3 #define BS_FAINTED 3
#define BS_BATTLER_0 7 #define BS_BATTLER_0 7
#define BS_ATTACKER_WITH_PARTNER 4 // for atk98_status_icon_update #define BS_ATTACKER_WITH_PARTNER 4 // for Cmd_updatestatusicon
#define BS_ATTACKER_SIDE 8 // for atk1E_jumpifability #define BS_ATTACKER_SIDE 8 // for Cmd_jumpifability
#define BS_NOT_ATTACKER_SIDE 9 // for atk1E_jumpifability #define BS_NOT_ATTACKER_SIDE 9 // for Cmd_jumpifability
#define BS_SCRIPTING 10 #define BS_SCRIPTING 10
#define BS_PLAYER1 11 #define BS_PLAYER1 11
#define BS_OPPONENT1 12 #define BS_OPPONENT1 12
#define BS_PLAYER2 13 #define BS_PLAYER2 13
#define BS_OPPONENT2 14 #define BS_OPPONENT2 14
// atk 01, accuracy calc // Cmd_accuracycheck
#define NO_ACC_CALC 0xFFFE #define NO_ACC_CALC 0xFFFE
#define NO_ACC_CALC_CHECK_LOCK_ON 0xFFFF #define NO_ACC_CALC_CHECK_LOCK_ON 0xFFFF
#define ACC_CURR_MOVE 0 #define ACC_CURR_MOVE 0
@ -61,7 +61,7 @@
#define CMP_COMMON_BITS 0x4 #define CMP_COMMON_BITS 0x4
#define CMP_NO_COMMON_BITS 0x5 #define CMP_NO_COMMON_BITS 0x5
// atk76, various // Cmd_various
#define VARIOUS_CANCEL_MULTI_TURN_MOVES 0 #define VARIOUS_CANCEL_MULTI_TURN_MOVES 0
#define VARIOUS_SET_MAGIC_COAT_TARGET 1 #define VARIOUS_SET_MAGIC_COAT_TARGET 1
#define VARIOUS_IS_RUNNING_IMPOSSIBLE 2 #define VARIOUS_IS_RUNNING_IMPOSSIBLE 2
@ -84,44 +84,25 @@
#define VARIOUS_SET_TELEPORT_OUTCOME 25 #define VARIOUS_SET_TELEPORT_OUTCOME 25
#define VARIOUS_PLAY_TRAINER_DEFEATED_MUSIC 26 #define VARIOUS_PLAY_TRAINER_DEFEATED_MUSIC 26
// atk80, dmg manipulation // Cmd_manipulatedmg
#define ATK80_DMG_CHANGE_SIGN 0 #define DMG_CHANGE_SIGN 0
#define ATK80_DMG_HALF_BY_TWO_NOT_MORE_THAN_HALF_MAX_HP 1 #define DMG_RECOIL_FROM_MISS 1
#define ATK80_DMG_DOUBLED 2 #define DMG_DOUBLED 2
// atk4F, a flag used for the jumpifcantswitch command // Cmd_jumpifcantswitch
#define ATK4F_DONT_CHECK_STATUSES 0x80 #define SWITCH_IGNORE_ESCAPE_PREVENTION 0x80
// statchange defines // Cmd_statbuffchange
#define STAT_CHANGE_BS_PTR 0x1 #define STAT_BUFF_ALLOW_PTR 0x1 // If set, allow use of jumpptr. Set in every use of statbuffchange
#define STAT_CHANGE_NOT_PROTECT_AFFECTED 0x20 #define STAT_BUFF_NOT_PROTECT_AFFECTED 0x20
// atk48 // stat change flags for Cmd_playstatchangeanimation
#define ATK48_STAT_NEGATIVE 0x1 #define STAT_CHANGE_NEGATIVE 0x1
#define ATK48_STAT_BY_TWO 0x2 #define STAT_CHANGE_BY_TWO 0x2
#define ATK48_ONLY_MULTIPLE 0x4 #define STAT_CHANGE_MULTIPLE_STATS 0x4
#define ATK48_DONT_CHECK_LOWER 0x8 #define STAT_CHANGE_CANT_PREVENT 0x8
// atk49, moveend cases
#define ATK49_RAGE 0
#define ATK49_DEFROST 1
#define ATK49_SYNCHRONIZE_TARGET 2
#define ATK49_MOVE_END_ABILITIES 3
#define ATK49_STATUS_IMMUNITY_ABILITIES 4
#define ATK49_SYNCHRONIZE_ATTACKER 5
#define ATK49_CHOICE_MOVE 6
#define ATK49_CHANGED_ITEMS 7
#define ATK49_ATTACKER_INVISIBLE 8
#define ATK49_ATTACKER_VISIBLE 9
#define ATK49_TARGET_VISIBLE 10
#define ATK49_ITEM_EFFECTS_ALL 11
#define ATK49_KINGSROCK_SHELLBELL 12
#define ATK49_SUBSTITUTE 13
#define ATK49_UPDATE_LAST_MOVES 14
#define ATK49_MIRROR_MOVE 15
#define ATK49_NEXT_TARGET 16
#define ATK49_COUNT 17
// stat flags for Cmd_playstatchangeanimation
#define BIT_HP 0x1 #define BIT_HP 0x1
#define BIT_ATK 0x2 #define BIT_ATK 0x2
#define BIT_DEF 0x4 #define BIT_DEF 0x4
@ -131,4 +112,24 @@
#define BIT_ACC 0x40 #define BIT_ACC 0x40
#define BIT_EVASION 0x80 #define BIT_EVASION 0x80
// cases for Cmd_moveend
#define MOVEEND_RAGE 0
#define MOVEEND_DEFROST 1
#define MOVEEND_SYNCHRONIZE_TARGET 2
#define MOVEEND_ON_DAMAGE_ABILITIES 3
#define MOVEEND_IMMUNITY_ABILITIES 4
#define MOVEEND_SYNCHRONIZE_ATTACKER 5
#define MOVEEND_CHOICE_MOVE 6
#define MOVEEND_CHANGED_ITEMS 7
#define MOVEEND_ATTACKER_INVISIBLE 8
#define MOVEEND_ATTACKER_VISIBLE 9
#define MOVEEND_TARGET_VISIBLE 10
#define MOVEEND_ITEM_EFFECTS_ALL 11
#define MOVEEND_KINGSROCK_SHELLBELL 12
#define MOVEEND_SUBSTITUTE 13
#define MOVEEND_UPDATE_LAST_MOVES 14
#define MOVEEND_MIRROR_MOVE 15
#define MOVEEND_NEXT_TARGET 16
#define MOVEEND_COUNT 17
#endif // GUARD_CONSTANTS_BATTLE_SCRIPT_COMMANDS_H #endif // GUARD_CONSTANTS_BATTLE_SCRIPT_COMMANDS_H

File diff suppressed because it is too large Load Diff

View File

@ -3954,7 +3954,7 @@ static void TryDoEventsBeforeFirstTurn(void)
*(&gBattleStruct->turnEffectsBattlerId) = 0; *(&gBattleStruct->turnEffectsBattlerId) = 0;
*(&gBattleStruct->wishPerishSongState) = 0; *(&gBattleStruct->wishPerishSongState) = 0;
*(&gBattleStruct->wishPerishSongBattlerId) = 0; *(&gBattleStruct->wishPerishSongBattlerId) = 0;
gBattleScripting.atk49_state = 0; gBattleScripting.moveendState = 0;
gBattleStruct->faintedActionsState = 0; gBattleStruct->faintedActionsState = 0;
gBattleStruct->turnCountersTracker = 0; gBattleStruct->turnCountersTracker = 0;
gMoveResultFlags = 0; gMoveResultFlags = 0;
@ -4017,7 +4017,7 @@ void BattleTurnPassed(void)
gHitMarker &= ~(HITMARKER_x100000); gHitMarker &= ~(HITMARKER_x100000);
gBattleScripting.animTurn = 0; gBattleScripting.animTurn = 0;
gBattleScripting.animTargetsHit = 0; gBattleScripting.animTargetsHit = 0;
gBattleScripting.atk49_state = 0; gBattleScripting.moveendState = 0;
gBattleMoveDamage = 0; gBattleMoveDamage = 0;
gMoveResultFlags = 0; gMoveResultFlags = 0;
@ -5885,7 +5885,7 @@ static void HandleAction_ActionFinished(void)
gLastHitByType[gBattlerAttacker] = 0; gLastHitByType[gBattlerAttacker] = 0;
gBattleStruct->dynamicMoveType = 0; gBattleStruct->dynamicMoveType = 0;
gDynamicBasePower = 0; gDynamicBasePower = 0;
gBattleScripting.atk49_state = 0; gBattleScripting.moveendState = 0;
gBattleCommunication[3] = 0; gBattleCommunication[3] = 0;
gBattleCommunication[4] = 0; gBattleCommunication[4] = 0;
gBattleScripting.multihitMoveEffect = 0; gBattleScripting.multihitMoveEffect = 0;

File diff suppressed because it is too large Load Diff

View File

@ -2084,7 +2084,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA
} }
} }
break; break;
case ABILITYEFFECT_MOVE_END: // Think contact abilities. case ABILITYEFFECT_ON_DAMAGE: // Contact abilities and Color Change
switch (gLastUsedAbility) switch (gLastUsedAbility)
{ {
case ABILITY_COLOR_CHANGE: case ABILITY_COLOR_CHANGE: