From 5dd653a89e05708946bf0e994a85f2ceed1510c1 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sat, 23 Mar 2019 16:46:41 +0100 Subject: [PATCH] Use constants in atk89_statbuffchange --- data/battle_scripts_1.s | 62 ++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index b0c753752c..ae0e36be10 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -514,7 +514,7 @@ BattleScript_EffectStatUp:: BattleScript_EffectStatUpAfterAtkCanceler:: attackstring ppreduce - statbuffchange MOVE_EFFECT_AFFECTS_USER | 0x1, BattleScript_StatUpEnd + 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 @@ -560,7 +560,7 @@ BattleScript_EffectStatDown:: accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE attackstring ppreduce - statbuffchange 0x1, BattleScript_StatDownEnd + 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 @@ -1521,17 +1521,17 @@ BattleScript_CurseTrySpeed:: attackanimation waitanimation setstatchanger STAT_SPEED, 1, TRUE - statbuffchange MOVE_EFFECT_AFFECTS_USER | 0x1, BattleScript_CurseTryAttack + 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 | 0x1, BattleScript_CurseTryDefence + 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 | 0x1, BattleScript_CurseEnd + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_CurseEnd printfromtable gStatUpStringIds waitmessage 0x40 BattleScript_CurseEnd:: @@ -1643,7 +1643,7 @@ BattleScript_EffectSwagger:: attackanimation waitanimation setstatchanger STAT_ATK, 2, FALSE - statbuffchange 0x1, BattleScript_SwaggerTryConfuse + 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 @@ -1842,7 +1842,7 @@ BattleScript_EffectSkullBash:: setbyte sTWOTURN_STRINGID, 0x2 call BattleScriptFirstChargingTurn setstatchanger STAT_DEF, 1, FALSE - statbuffchange MOVE_EFFECT_AFFECTS_USER | 0x1, BattleScript_SkullBashEnd + 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 @@ -2048,7 +2048,7 @@ BattleScript_EffectDefenseCurl:: ppreduce setdefensecurlbit setstatchanger STAT_DEF, 1, FALSE - statbuffchange MOVE_EFFECT_AFFECTS_USER | 0x1, BattleScript_DefenseCurlDoStatUpAnim + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_DefenseCurlDoStatUpAnim jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_StatUpPrintString attackanimation waitanimation @@ -2189,7 +2189,7 @@ BattleScript_EffectFlatter:: attackanimation waitanimation setstatchanger STAT_SPATK, 1, FALSE - statbuffchange 0x1, BattleScript_FlatterTryConfuse + 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 @@ -2246,14 +2246,14 @@ BattleScript_EffectMemento:: 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 0x1, BattleScript_EffectMementoTrySpAtk + 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 0x1, BattleScript_EffectMementoTryFaint + statbuffchange STAT_CHANGE_BS_PTR, BattleScript_EffectMementoTryFaint jumpifbyte CMP_GREATER_THAN, cMULTISTRING_CHOOSER, 0x1, BattleScript_EffectMementoTryFaint printfromtable gStatDownStringIds waitmessage 0x40 @@ -2692,14 +2692,14 @@ BattleScript_TickleDoMoveAnim:: 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 0x1, BattleScript_TickleTryLowerDef + 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 0x1, BattleScript_TickleEnd + statbuffchange STAT_CHANGE_BS_PTR, BattleScript_TickleEnd jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_TickleEnd printfromtable gStatDownStringIds waitmessage 0x40 @@ -2725,13 +2725,13 @@ BattleScript_CosmicPowerDoMoveAnim:: setbyte sSTAT_ANIM_PLAYED, FALSE playstatchangeanimation BS_ATTACKER, BIT_DEF | BIT_SPDEF, 0x0 setstatchanger STAT_DEF, 1, FALSE - statbuffchange MOVE_EFFECT_AFFECTS_USER | 0x1, BattleScript_CosmicPowerTrySpDef + 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 | 0x1, BattleScript_CosmicPowerEnd + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_CosmicPowerEnd jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_CosmicPowerEnd printfromtable gStatUpStringIds waitmessage 0x40 @@ -2754,13 +2754,13 @@ BattleScript_BulkUpDoMoveAnim:: setbyte sSTAT_ANIM_PLAYED, FALSE playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_DEF, 0x0 setstatchanger STAT_ATK, 1, FALSE - statbuffchange MOVE_EFFECT_AFFECTS_USER | 0x1, BattleScript_BulkUpTryDef + 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 | 0x1, BattleScript_BulkUpEnd + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_BulkUpEnd jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_BulkUpEnd printfromtable gStatUpStringIds waitmessage 0x40 @@ -2779,13 +2779,13 @@ BattleScript_CalmMindDoMoveAnim:: setbyte sSTAT_ANIM_PLAYED, FALSE playstatchangeanimation BS_ATTACKER, BIT_SPATK | BIT_SPDEF, 0x0 setstatchanger STAT_SPATK, 1, FALSE - statbuffchange MOVE_EFFECT_AFFECTS_USER | 0x1, BattleScript_CalmMindTrySpDef + 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 | 0x1, BattleScript_CalmMindEnd + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_CalmMindEnd jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_CalmMindEnd printfromtable gStatUpStringIds waitmessage 0x40 @@ -2811,13 +2811,13 @@ BattleScript_DragonDanceDoMoveAnim:: setbyte sSTAT_ANIM_PLAYED, FALSE playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_SPEED, 0x0 setstatchanger STAT_ATK, 1, FALSE - statbuffchange MOVE_EFFECT_AFFECTS_USER | 0x1, BattleScript_DragonDanceTrySpeed + 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 | 0x1, BattleScript_DragonDanceEnd + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_DragonDanceEnd jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_DragonDanceEnd printfromtable gStatUpStringIds waitmessage 0x40 @@ -3490,27 +3490,27 @@ 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 | 0x1, BattleScript_AllStatsUpDef + 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 | 0x1, BattleScript_AllStatsUpSpeed + 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 | 0x1, BattleScript_AllStatsUpSpAtk + 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 | 0x1, BattleScript_AllStatsUpSpDef + 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 | 0x1, BattleScript_AllStatsUpRet + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_AllStatsUpRet printfromtable gStatUpStringIds waitmessage 0x40 BattleScript_AllStatsUpRet:: @@ -3659,14 +3659,14 @@ BattleScript_AtkDefDown:: 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 | 0x1, BattleScript_82DB144 + statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN | STAT_CHANGE_BS_PTR, BattleScript_82DB144 jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_82DB144 printfromtable gStatDownStringIds waitmessage 0x40 BattleScript_82DB144:: 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 | 0x1, BattleScript_82DB167 + statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN | STAT_CHANGE_BS_PTR, BattleScript_82DB167 jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_82DB167 printfromtable gStatDownStringIds waitmessage 0x40 @@ -3732,7 +3732,7 @@ 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 | 0x1, BattleScript_SAtkDown2End + 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 @@ -4063,7 +4063,7 @@ BattleScript_IntimidateActivatesLoop: 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 0x21, BattleScript_IntimidateActivatesLoopIncrement + 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 @@ -4444,7 +4444,7 @@ BattleScript_BerryConfuseHealEnd2:: BattleScript_BerryStatRaiseEnd2:: playanimation BS_ATTACKER, B_ANIM_ITEM_EFFECT, NULL - statbuffchange MOVE_EFFECT_AFFECTS_USER | 0x1, BattleScript_82DB85B + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_BS_PTR, BattleScript_82DB85B BattleScript_82DB85B:: setbyte cMULTISTRING_CHOOSER, 0x4 call BattleScript_StatUp