diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 972346799..daaf5eafd 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -13,9 +13,6 @@ .include "constants/constants.inc" .section script_data, "aw", %progbits - -.set WAIT_TIME_LONG, 64 -.set WAIT_TIME_SHORT, 32 .align 2 gBattleScriptsForMoveEffects:: @ 82D86A8 @@ -282,9 +279,9 @@ BattleScript_HitFromAtkAnimation:: healthbarupdate BS_TARGET datahpupdate BS_TARGET critmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG resultmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG seteffectwithchance tryfaintmon BS_TARGET, FALSE, NULL BattleScript_MoveEnd:: @@ -297,11 +294,11 @@ BattleScript_PrintMoveMissed:: attackstring ppreduce BattleScript_MoveMissedPause:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT BattleScript_MoveMissed:: effectivenesssound resultmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectSleep:: @@ -322,21 +319,21 @@ BattleScript_EffectSleep:: BattleScript_AlreadyAsleep:: setalreadystatusedmoveattempt BS_ATTACKER - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNALREADYASLEEP - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_WasntAffected:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNWASNTAFFECTED - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_CantMakeAsleep:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printfromtable gUproarAwakeStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectPoisonHit:: @@ -361,23 +358,23 @@ BattleScript_EffectAbsorb:: healthbarupdate BS_TARGET datahpupdate BS_TARGET critmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG resultmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG negativedamage orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE jumpifability BS_TARGET, ABILITY_LIQUID_OOZE, BattleScript_AbsorbLiquidOoze - setbyte cMULTISTRING_CHOOSER, 0x0 + setbyte cMULTISTRING_CHOOSER, B_MSG_ABSORB goto BattleScript_AbsorbUpdateHp BattleScript_AbsorbLiquidOoze:: manipulatedamage DMG_CHANGE_SIGN - setbyte cMULTISTRING_CHOOSER, 0x1 + setbyte cMULTISTRING_CHOOSER, B_MSG_ABSORB_OOZE BattleScript_AbsorbUpdateHp:: healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER jumpifmovehadnoeffect BattleScript_AbsorbTryFainting - printfromtable gLeechSeedDrainStringIds - waitmessage WAIT_TIME_LONG + printfromtable gAbsorbDrainStringIds + waitmessage B_WAIT_TIME_LONG BattleScript_AbsorbTryFainting:: tryfaintmon BS_ATTACKER, FALSE, NULL tryfaintmon BS_TARGET, FALSE, NULL @@ -422,9 +419,9 @@ BattleScript_ExplosionLoop: healthbarupdate BS_TARGET datahpupdate BS_TARGET critmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG resultmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG tryfaintmon BS_TARGET, FALSE, NULL moveendto MOVEEND_NEXT_TARGET jumpifnexttargetvalid BattleScript_ExplosionLoop @@ -433,7 +430,7 @@ BattleScript_ExplosionLoop: BattleScript_ExplosionMissed: effectivenesssound resultmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG moveendto MOVEEND_NEXT_TARGET jumpifnexttargetvalid BattleScript_ExplosionLoop tryfaintmon BS_ATTACKER, FALSE, NULL @@ -453,7 +450,7 @@ BattleScript_EffectDreamEater:: BattleScript_DreamEaterNoEffect: attackstring ppreduce - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_WasntAffected BattleScript_DreamEaterWorked: accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE @@ -471,16 +468,16 @@ BattleScript_DreamEaterWorked: healthbarupdate BS_TARGET datahpupdate BS_TARGET critmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG resultmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG negativedamage orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER jumpifmovehadnoeffect BattleScript_DreamEaterTryFaintEnd printstring STRINGID_PKMNDREAMEATEN - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_DreamEaterTryFaintEnd: tryfaintmon BS_TARGET, FALSE, NULL goto BattleScript_MoveEnd @@ -488,12 +485,12 @@ BattleScript_DreamEaterTryFaintEnd: BattleScript_EffectMirrorMove:: attackcanceler attackstring - pause WAIT_TIME_LONG + pause B_WAIT_TIME_LONG trymirrormove ppreduce orbyte gMoveResultFlags, MOVE_RESULT_FAILED printstring STRINGID_MIRRORMOVEFAILED - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectAttackUp:: @@ -516,8 +513,8 @@ BattleScript_EffectStatUpAfterAtkCanceler:: attackstring ppreduce statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_StatUpEnd - jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_StatUpAttackAnim - pause WAIT_TIME_SHORT + jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_StatUpAttackAnim + pause B_WAIT_TIME_SHORT goto BattleScript_StatUpPrintString BattleScript_StatUpAttackAnim:: attackanimation @@ -527,14 +524,14 @@ BattleScript_StatUpDoAnim:: playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 BattleScript_StatUpPrintString:: printfromtable gStatUpStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_StatUpEnd:: goto BattleScript_MoveEnd BattleScript_StatUp:: playanimation BS_EFFECT_BATTLER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 printfromtable gStatUpStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG return BattleScript_EffectAttackDown:: @@ -562,9 +559,9 @@ BattleScript_EffectStatDown:: attackstring ppreduce statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_StatDownEnd - jumpifbyte CMP_LESS_THAN, cMULTISTRING_CHOOSER, 0x2, BattleScript_StatDownDoAnim - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x3, BattleScript_StatDownEnd - pause WAIT_TIME_SHORT + jumpifbyte CMP_LESS_THAN, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_StatDownDoAnim + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_FELL_EMPTY, BattleScript_StatDownEnd + pause B_WAIT_TIME_SHORT goto BattleScript_StatDownPrintString BattleScript_StatDownDoAnim:: attackanimation @@ -573,14 +570,14 @@ BattleScript_StatDownDoAnim:: playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 BattleScript_StatDownPrintString:: printfromtable gStatDownStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_StatDownEnd:: goto BattleScript_MoveEnd BattleScript_StatDown:: playanimation BS_EFFECT_BATTLER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 printfromtable gStatDownStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG return BattleScript_EffectHaze:: @@ -591,7 +588,7 @@ BattleScript_EffectHaze:: waitanimation normalisebuffs printstring STRINGID_STATCHANGESGONE - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectBide:: @@ -654,7 +651,7 @@ BattleScript_DoMultiHit:: healthbarupdate BS_TARGET datahpupdate BS_TARGET critmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG printstring STRINGID_EMPTYSTRING3 waitmessage 1 addbyte sMULTIHIT_STRING + 4, 0x1 @@ -663,14 +660,14 @@ BattleScript_DoMultiHit:: decrementmultihit BattleScript_MultiHitLoop goto BattleScript_MultiHitPrintStrings BattleScript_MultiHitNoMoreHits:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT BattleScript_MultiHitPrintStrings:: resultmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG jumpifmovehadnoeffect BattleScript_MultiHitEnd copyarray gBattleTextBuff1, sMULTIHIT_STRING, 0x6 printstring STRINGID_HITXTIMES - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_MultiHitEnd:: seteffectwithchance tryfaintmon BS_TARGET, FALSE, NULL @@ -686,7 +683,7 @@ BattleScript_EffectConversion:: attackanimation waitanimation printstring STRINGID_PKMNCHANGEDTYPE - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectFlinchHit:: @@ -704,7 +701,7 @@ BattleScript_EffectRestoreHp:: healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER printstring STRINGID_PKMNREGAINEDHEALTH - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectToxic:: @@ -725,19 +722,19 @@ BattleScript_EffectToxic:: setmoveeffect MOVE_EFFECT_TOXIC seteffectprimary resultmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_AlreadyPoisoned:: setalreadystatusedmoveattempt BS_ATTACKER - pause WAIT_TIME_LONG + pause B_WAIT_TIME_LONG printstring STRINGID_PKMNALREADYPOISONED - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_ImmunityProtected:: copybyte gEffectBattler, gBattlerTarget - setbyte cMULTISTRING_CHOOSER, 0x0 + setbyte cMULTISTRING_CHOOSER, B_MSG_ABILITY_PREVENTS_MOVE_STATUS call BattleScript_PSNPrevention goto BattleScript_MoveEnd @@ -763,24 +760,24 @@ BattleScript_EffectRest:: jumpifstatus BS_ATTACKER, STATUS1_SLEEP, BattleScript_RestIsAlreadyAsleep jumpifcantmakeasleep BattleScript_RestCantSleep trysetrest BattleScript_AlreadyAtFullHp - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printfromtable gRestUsedStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_ATTACKER waitstate goto BattleScript_PresentHealTarget BattleScript_RestCantSleep:: - pause WAIT_TIME_LONG + pause B_WAIT_TIME_LONG printfromtable gUproarAwakeStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_RestIsAlreadyAsleep:: setalreadystatusedmoveattempt BS_ATTACKER - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNALREADYASLEEP2 - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectOHKO:: @@ -794,15 +791,15 @@ BattleScript_EffectOHKO:: trysetdestinybondtohappen goto BattleScript_HitFromAtkAnimation BattleScript_KOFail:: - pause WAIT_TIME_LONG + pause B_WAIT_TIME_LONG printfromtable gKOFailedStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectRazorWind:: jumpifstatus2 BS_ATTACKER, STATUS2_MULTIPLETURNS, BattleScript_TwoTurnMovesSecondTurn jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_NO_ATTACKSTRING, BattleScript_TwoTurnMovesSecondTurn - setbyte sTWOTURN_STRINGID, 0 + setbyte sTWOTURN_STRINGID, B_MSG_TURN1_RAZOR_WIND call BattleScriptFirstChargingTurn goto BattleScript_MoveEnd @@ -827,7 +824,7 @@ BattleScriptFirstChargingTurn:: seteffectprimary copybyte cMULTISTRING_CHOOSER, sTWOTURN_STRINGID printfromtable gFirstTurnOfTwoStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG return BattleScript_EffectSuperFang:: @@ -877,12 +874,12 @@ BattleScript_EffectRecoilIfMiss:: BattleScript_MoveMissedDoDamage:: attackstring ppreduce - pause WAIT_TIME_LONG + pause B_WAIT_TIME_LONG resultmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG jumpifbyte CMP_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_DOESNT_AFFECT_FOE, BattleScript_MoveEnd printstring STRINGID_PKMNCRASHED - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG damagecalc typecalc adjustnormaldamage @@ -903,7 +900,7 @@ BattleScript_EffectMist:: attackanimation waitanimation printfromtable gMistUsedStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectFocusEnergy:: @@ -915,7 +912,7 @@ BattleScript_EffectFocusEnergy:: attackanimation waitanimation printfromtable gFocusEnergyUsedStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectRecoil:: @@ -938,14 +935,14 @@ BattleScript_EffectConfuse:: setmoveeffect MOVE_EFFECT_CONFUSION seteffectprimary resultmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_AlreadyConfused:: setalreadystatusedmoveattempt BS_ATTACKER - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNALREADYCONFUSED - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectAttackUp2:: @@ -976,7 +973,7 @@ BattleScript_EffectTransform:: attackanimation waitanimation printfromtable gTransformUsedStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectAttackDown2:: @@ -1004,7 +1001,7 @@ BattleScript_PrintReflectLightScreenSafeguardString:: attackanimation waitanimation printfromtable gReflectLightScreenSafeguardStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectPoison:: @@ -1025,7 +1022,7 @@ BattleScript_EffectPoison:: setmoveeffect MOVE_EFFECT_POISON seteffectprimary resultmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectParalyze:: @@ -1045,19 +1042,19 @@ BattleScript_EffectParalyze:: setmoveeffect MOVE_EFFECT_PARALYSIS seteffectprimary resultmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_AlreadyParalyzed:: setalreadystatusedmoveattempt BS_ATTACKER - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNISALREADYPARALYZED - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_LimberProtected:: copybyte gEffectBattler, gBattlerTarget - setbyte cMULTISTRING_CHOOSER, 0x0 + setbyte cMULTISTRING_CHOOSER, B_MSG_ABILITY_PREVENTS_MOVE_STATUS call BattleScript_PRLZPrevention goto BattleScript_MoveEnd @@ -1088,7 +1085,7 @@ BattleScript_EffectAccuracyDownHit:: BattleScript_EffectSkyAttack:: jumpifstatus2 BS_ATTACKER, STATUS2_MULTIPLETURNS, BattleScript_TwoTurnMovesSecondTurn jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_NO_ATTACKSTRING, BattleScript_TwoTurnMovesSecondTurn - setbyte sTWOTURN_STRINGID, 3 + setbyte sTWOTURN_STRINGID, B_MSG_TURN1_SKY_ATTACK call BattleScriptFirstChargingTurn goto BattleScript_MoveEnd @@ -1113,8 +1110,8 @@ BattleScript_EffectSubstitute:: waitstate jumpifstatus2 BS_ATTACKER, STATUS2_SUBSTITUTE, BattleScript_AlreadyHasSubstitute setsubstitute - jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, 0x1, BattleScript_SubstituteAnim - pause WAIT_TIME_SHORT + jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, B_MSG_SUBSTITUTE_FAILED, BattleScript_SubstituteAnim + pause B_WAIT_TIME_SHORT goto BattleScript_SubstituteString BattleScript_SubstituteAnim:: attackanimation @@ -1123,13 +1120,13 @@ BattleScript_SubstituteAnim:: datahpupdate BS_ATTACKER BattleScript_SubstituteString:: printfromtable gSubsituteUsedStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_AlreadyHasSubstitute:: setalreadystatusedmoveattempt BS_ATTACKER - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNHASSUBSTITUTE - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectRecharge:: @@ -1140,7 +1137,7 @@ BattleScript_EffectRecharge:: BattleScript_MoveUsedMustRecharge:: printstring STRINGID_PKMNMUSTRECHARGE - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectRage:: @@ -1165,13 +1162,13 @@ BattleScript_EffectMimic:: attackanimation waitanimation printstring STRINGID_PKMNLEARNEDMOVE2 - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectMetronome:: attackcanceler attackstring - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT attackanimation waitanimation setbyte sB_ANIM_TURN, 0x0 @@ -1181,7 +1178,7 @@ BattleScript_EffectMetronome:: BattleScript_EffectLeechSeed:: attackcanceler attackstring - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT ppreduce jumpifstatus2 BS_TARGET, STATUS2_SUBSTITUTE, BattleScript_ButItFailed accuracycheck BattleScript_DoLeechSeed, ACC_CURR_MOVE @@ -1190,7 +1187,7 @@ BattleScript_DoLeechSeed:: attackanimation waitanimation printfromtable gLeechSeedStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectSplash:: @@ -1201,7 +1198,7 @@ BattleScript_EffectSplash:: waitanimation incrementgamestat GAME_STAT_USED_SPLASH printstring STRINGID_BUTNOTHINGHAPPENED - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectDisable:: @@ -1213,7 +1210,7 @@ BattleScript_EffectDisable:: attackanimation waitanimation printstring STRINGID_PKMNMOVEWASDISABLED - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectLevelDamage:: @@ -1257,7 +1254,7 @@ BattleScript_EffectEncore:: attackanimation waitanimation printstring STRINGID_PKMNGOTENCORE - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectPainSplit:: @@ -1275,7 +1272,7 @@ BattleScript_EffectPainSplit:: healthbarupdate BS_TARGET datahpupdate BS_TARGET printstring STRINGID_SHAREDPAIN - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectSnore:: @@ -1287,7 +1284,7 @@ BattleScript_EffectSnore:: BattleScript_SnoreIsAsleep:: jumpifhalfword CMP_EQUAL, gChosenMove, MOVE_SLEEP_TALK, BattleScript_DoSnore printstring STRINGID_PKMNFASTASLEEP - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG statusanimation BS_ATTACKER BattleScript_DoSnore:: attackstring @@ -1304,7 +1301,7 @@ BattleScript_EffectConversion2:: attackanimation waitanimation printstring STRINGID_PKMNCHANGEDTYPE - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectLockOn:: @@ -1317,7 +1314,7 @@ BattleScript_EffectLockOn:: attackanimation waitanimation printstring STRINGID_PKMNTOOKAIM - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectSketch:: @@ -1329,7 +1326,7 @@ BattleScript_EffectSketch:: attackanimation waitanimation printstring STRINGID_PKMNSKETCHEDMOVE - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectSleepTalk:: @@ -1340,13 +1337,13 @@ BattleScript_EffectSleepTalk:: goto BattleScript_ButItFailed BattleScript_SleepTalkIsAsleep:: printstring STRINGID_PKMNFASTASLEEP - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG statusanimation BS_ATTACKER attackstring ppreduce orword gHitMarker, HITMARKER_NO_PPDEDUCT trychoosesleeptalkmove BattleScript_SleepTalkUsingMove - pause WAIT_TIME_LONG + pause B_WAIT_TIME_LONG goto BattleScript_ButItFailed BattleScript_SleepTalkUsingMove:: attackanimation @@ -1363,7 +1360,7 @@ BattleScript_EffectDestinyBond:: attackanimation waitanimation printstring STRINGID_PKMNTRYINGTOTAKEFOE - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectFlail:: @@ -1379,7 +1376,7 @@ BattleScript_EffectSpite:: attackanimation waitanimation printstring STRINGID_PKMNREDUCEDPP - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectHealBell:: @@ -1391,15 +1388,15 @@ BattleScript_EffectHealBell:: attackanimation waitanimation printfromtable gPartyStatusHealStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG jumpifnotmove MOVE_HEAL_BELL, BattleScript_PartyHealEnd - jumpifbyte CMP_NO_COMMON_BITS, cMULTISTRING_CHOOSER, 0x1, BattleScript_CheckHealBellMon2Unaffected + jumpifbyte CMP_NO_COMMON_BITS, cMULTISTRING_CHOOSER, B_MSG_BELL_SOUNDPROOF_ATTACKER, BattleScript_CheckHealBellMon2Unaffected printstring STRINGID_PKMNSXBLOCKSY - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_CheckHealBellMon2Unaffected:: - jumpifbyte CMP_NO_COMMON_BITS, cMULTISTRING_CHOOSER, 0x2, BattleScript_PartyHealEnd + jumpifbyte CMP_NO_COMMON_BITS, cMULTISTRING_CHOOSER, B_MSG_BELL_SOUNDPROOF_PARTNER, BattleScript_PartyHealEnd printstring STRINGID_PKMNSXBLOCKSY2 - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_PartyHealEnd:: updatestatusicon BS_ATTACKER_WITH_PARTNER waitstate @@ -1436,7 +1433,7 @@ BattleScript_DoTripleKickAttack:: healthbarupdate BS_TARGET datahpupdate BS_TARGET critmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG printstring STRINGID_EMPTYSTRING3 waitmessage 1 moveendto MOVEEND_NEXT_TARGET @@ -1444,17 +1441,17 @@ BattleScript_DoTripleKickAttack:: decrementmultihit BattleScript_TripleKickLoop goto BattleScript_TripleKickPrintStrings BattleScript_TripleKickNoMoreHits:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT jumpifbyte CMP_EQUAL, sMULTIHIT_STRING + 4, 0x0, BattleScript_TripleKickPrintStrings bicbyte gMoveResultFlags, MOVE_RESULT_MISSED BattleScript_TripleKickPrintStrings:: resultmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG 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 WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_TripleKickEnd:: seteffectwithchance tryfaintmon BS_TARGET, FALSE, NULL @@ -1477,7 +1474,7 @@ BattleScript_EffectMeanLook:: setmoveeffect MOVE_EFFECT_PREVENT_ESCAPE seteffectprimary printstring STRINGID_TARGETCANTESCAPENOW - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectNightmare:: @@ -1494,7 +1491,7 @@ BattleScript_NightmareWorked:: setmoveeffect MOVE_EFFECT_NIGHTMARE seteffectprimary printstring STRINGID_PKMNFELLINTONIGHTMARE - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectMinimize:: @@ -1519,17 +1516,17 @@ BattleScript_CurseTrySpeed:: setstatchanger STAT_SPEED, 1, TRUE statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_CurseTryAttack printfromtable gStatDownStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_CurseTryAttack:: setstatchanger STAT_ATK, 1, FALSE - statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_CurseTryDefence + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_CurseTryDefense printfromtable gStatUpStringIds - waitmessage WAIT_TIME_LONG -BattleScript_CurseTryDefence:: + waitmessage B_WAIT_TIME_LONG +BattleScript_CurseTryDefense:: setstatchanger STAT_DEF, 1, FALSE statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_CurseEnd printfromtable gStatUpStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_CurseEnd:: goto BattleScript_MoveEnd BattleScript_GhostCurse:: @@ -1549,7 +1546,7 @@ BattleScript_DoGhostCurse:: healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER printstring STRINGID_PKMNLAIDCURSE - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG tryfaintmon BS_ATTACKER, FALSE, NULL goto BattleScript_MoveEnd @@ -1562,7 +1559,7 @@ BattleScript_EffectEndure:: attackanimation waitanimation printfromtable gProtectLikeUsedStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectSpikes:: @@ -1573,7 +1570,7 @@ BattleScript_EffectSpikes:: attackanimation waitanimation printstring STRINGID_SPIKESSCATTERED - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectForesight:: @@ -1585,7 +1582,7 @@ BattleScript_EffectForesight:: attackanimation waitanimation printstring STRINGID_PKMNIDENTIFIED - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectPerishSong:: @@ -1596,7 +1593,7 @@ BattleScript_EffectPerishSong:: attackanimation waitanimation printstring STRINGID_FAINTINTHREE - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG setbyte sBATTLER, 0x0 BattleScript_PerishSongLoop:: jumpifability BS_SCRIPTING, ABILITY_SOUNDPROOF, BattleScript_PerishSongNotAffected @@ -1607,7 +1604,7 @@ BattleScript_PerishSongLoopIncrement:: BattleScript_PerishSongNotAffected:: printstring STRINGID_PKMNSXBLOCKSY2 - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_PerishSongLoopIncrement BattleScript_EffectSandstorm:: @@ -1640,11 +1637,11 @@ BattleScript_EffectSwagger:: waitanimation setstatchanger STAT_ATK, 2, FALSE statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_SwaggerTryConfuse - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_SwaggerTryConfuse + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_SwaggerTryConfuse setgraphicalstatchangevalues playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 printfromtable gStatUpStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_SwaggerTryConfuse:: jumpifability BS_TARGET, ABILITY_OWN_TEMPO, BattleScript_OwnTempoPrevents jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, BattleScript_SafeguardProtected @@ -1675,7 +1672,7 @@ BattleScript_EffectAttract:: attackanimation waitanimation printstring STRINGID_PKMNFELLINLOVE - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectReturn:: @@ -1710,9 +1707,9 @@ BattleScript_EffectMagnitude:: ppreduce selectfirstvalidtarget magnitudedamagecalculation - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_MAGNITUDESTRENGTH - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_HitsAllWithUndergroundBonusLoop BattleScript_EffectBatonPass:: @@ -1774,7 +1771,7 @@ BattleScript_MoveWeatherChange:: attackanimation waitanimation printfromtable gMoveWeatherChangeStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG call BattleScript_WeatherFormChanges goto BattleScript_MoveEnd @@ -1808,7 +1805,7 @@ BattleScript_EffectBellyDrum:: healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER printstring STRINGID_PKMNCUTHPMAXEDATTACK - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectPsychUp:: @@ -1819,7 +1816,7 @@ BattleScript_EffectPsychUp:: attackanimation waitanimation printstring STRINGID_PKMNCOPIEDSTATCHANGES - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectMirrorCoat:: @@ -1835,15 +1832,15 @@ BattleScript_EffectMirrorCoat:: BattleScript_EffectSkullBash:: jumpifstatus2 BS_ATTACKER, STATUS2_MULTIPLETURNS, BattleScript_TwoTurnMovesSecondTurn jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_NO_ATTACKSTRING, BattleScript_TwoTurnMovesSecondTurn - setbyte sTWOTURN_STRINGID, 2 + setbyte sTWOTURN_STRINGID, B_MSG_TURN1_SKULL_BASH call BattleScriptFirstChargingTurn setstatchanger STAT_DEF, 1, FALSE statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_SkullBashEnd - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_SkullBashEnd + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_SkullBashEnd setgraphicalstatchangevalues playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 printfromtable gStatUpStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_SkullBashEnd:: goto BattleScript_MoveEnd @@ -1883,9 +1880,9 @@ BattleScript_DoHitAllWithUndergroundBonus:: healthbarupdate BS_TARGET datahpupdate BS_TARGET critmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG resultmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG printstring STRINGID_EMPTYSTRING3 waitmessage 1 tryfaintmon BS_TARGET, FALSE, NULL @@ -1893,11 +1890,11 @@ BattleScript_DoHitAllWithUndergroundBonus:: jumpifnexttargetvalid BattleScript_HitsAllWithUndergroundBonusLoop end BattleScript_HitAllWithUndergroundBonusMissed:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT typecalc effectivenesssound resultmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG moveendto MOVEEND_NEXT_TARGET jumpifnexttargetvalid BattleScript_HitsAllWithUndergroundBonusLoop end @@ -1910,7 +1907,7 @@ BattleScript_EffectFutureSight:: attackanimation waitanimation printfromtable gFutureMoveUsedStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectGust:: @@ -1931,7 +1928,7 @@ BattleScript_EffectSolarbeam:: BattleScript_SolarbeamDecideTurn:: jumpifstatus2 BS_ATTACKER, STATUS2_MULTIPLETURNS, BattleScript_TwoTurnMovesSecondTurn jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_NO_ATTACKSTRING, BattleScript_TwoTurnMovesSecondTurn - setbyte sTWOTURN_STRINGID, 1 + setbyte sTWOTURN_STRINGID, B_MSG_TURN1_SOLAR_BEAM call BattleScriptFirstChargingTurn goto BattleScript_MoveEnd BattleScript_SolarbeamOnFirstTurn:: @@ -1957,7 +1954,7 @@ BattleScript_EffectTeleport:: attackanimation waitanimation printstring STRINGID_PKMNFLEDFROMBATTLE - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG setoutcomeonteleport BS_ATTACKER goto BattleScript_MoveEnd @@ -1965,7 +1962,7 @@ BattleScript_EffectBeatUp:: attackcanceler accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE attackstring - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT ppreduce setbyte gBattleCommunication, 0x0 BattleScript_BeatUpLoop:: @@ -1985,9 +1982,9 @@ BattleScript_BeatUpAttack:: healthbarupdate BS_TARGET datahpupdate BS_TARGET critmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG resultmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG tryfaintmon BS_TARGET, FALSE, NULL moveendto MOVEEND_NEXT_TARGET goto BattleScript_BeatUpLoop @@ -2000,19 +1997,19 @@ BattleScript_EffectSemiInvulnerable:: jumpifmove MOVE_FLY, BattleScript_FirstTurnFly jumpifmove MOVE_DIVE, BattleScript_FirstTurnDive jumpifmove MOVE_BOUNCE, BattleScript_FirstTurnBounce - setbyte sTWOTURN_STRINGID, 5 + setbyte sTWOTURN_STRINGID, B_MSG_TURN1_DIG goto BattleScript_FirstTurnSemiInvulnerable BattleScript_FirstTurnBounce:: - setbyte sTWOTURN_STRINGID, 7 + setbyte sTWOTURN_STRINGID, B_MSG_TURN1_BOUNCE goto BattleScript_FirstTurnSemiInvulnerable BattleScript_FirstTurnDive:: - setbyte sTWOTURN_STRINGID, 6 + setbyte sTWOTURN_STRINGID, B_MSG_TURN1_DIVE goto BattleScript_FirstTurnSemiInvulnerable BattleScript_FirstTurnFly:: - setbyte sTWOTURN_STRINGID, 4 + setbyte sTWOTURN_STRINGID, B_MSG_TURN1_FLY BattleScript_FirstTurnSemiInvulnerable:: call BattleScriptFirstChargingTurn setsemiinvulnerablebit @@ -2042,7 +2039,7 @@ BattleScript_EffectDefenseCurl:: setdefensecurlbit setstatchanger STAT_DEF, 1, FALSE statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_DefenseCurlDoStatUpAnim - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_StatUpPrintString + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_StatUpPrintString attackanimation waitanimation BattleScript_DefenseCurlDoStatUpAnim:: @@ -2060,13 +2057,13 @@ BattleScript_PresentHealTarget:: healthbarupdate BS_TARGET datahpupdate BS_TARGET printstring STRINGID_PKMNREGAINEDHEALTH - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_AlreadyAtFullHp:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNHPFULL - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectFakeOut:: @@ -2080,17 +2077,17 @@ BattleScript_ButItFailedAtkStringPpReduce:: BattleScript_ButItFailedPpReduce:: ppreduce BattleScript_ButItFailed:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT orbyte gMoveResultFlags, MOVE_RESULT_FAILED resultmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_NotAffected:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT orbyte gMoveResultFlags, MOVE_RESULT_DOESNT_AFFECT_FOE resultmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectUproar:: @@ -2112,7 +2109,7 @@ BattleScript_EffectStockpile:: attackanimation waitanimation printfromtable gStockpileUsedStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectSpitUp:: @@ -2126,18 +2123,18 @@ BattleScript_EffectSpitUp:: adjustsetdamage goto BattleScript_HitFromAtkAnimation BattleScript_SpitUpFail:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_FAILEDTOSPITUP - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_SpitUpFailProtect:: attackstring ppreduce - pause WAIT_TIME_LONG + pause B_WAIT_TIME_LONG stockpiletobasedamage BattleScript_SpitUpFail resultmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectSwallow:: @@ -2148,9 +2145,9 @@ BattleScript_EffectSwallow:: goto BattleScript_PresentHealTarget BattleScript_SwallowFail:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printfromtable gSwallowFailStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectHail:: @@ -2169,7 +2166,7 @@ BattleScript_EffectTorment:: attackanimation waitanimation printstring STRINGID_PKMNSUBJECTEDTOTORMENT - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectFlatter:: @@ -2183,11 +2180,11 @@ BattleScript_EffectFlatter:: waitanimation setstatchanger STAT_SPATK, 1, FALSE statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_FlatterTryConfuse - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_FlatterTryConfuse + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_FlatterTryConfuse setgraphicalstatchangevalues playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 printfromtable gStatUpStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_FlatterTryConfuse:: jumpifability BS_TARGET, ABILITY_OWN_TEMPO, BattleScript_OwnTempoPrevents jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, BattleScript_SafeguardProtected @@ -2214,15 +2211,15 @@ BattleScript_EffectWillOWisp:: BattleScript_WaterVeilPrevents:: copybyte gEffectBattler, gBattlerTarget - setbyte cMULTISTRING_CHOOSER, 0x0 + setbyte cMULTISTRING_CHOOSER, B_MSG_ABILITY_PREVENTS_MOVE_STATUS call BattleScript_BRNPrevention goto BattleScript_MoveEnd BattleScript_AlreadyBurned:: setalreadystatusedmoveattempt BS_ATTACKER - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNALREADYHASBURN - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectMemento:: @@ -2240,22 +2237,24 @@ BattleScript_EffectMemento:: playstatchangeanimation BS_TARGET, BIT_ATK, STAT_CHANGE_NEGATIVE | STAT_CHANGE_BY_TWO setstatchanger STAT_ATK, 2, TRUE statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_EffectMementoTrySpAtk - jumpifbyte CMP_GREATER_THAN, cMULTISTRING_CHOOSER, 0x1, BattleScript_EffectMementoTrySpAtk + @ Greater than STAT_FELL is checking if the stat cannot decrease + jumpifbyte CMP_GREATER_THAN, cMULTISTRING_CHOOSER, B_MSG_DEFENDER_STAT_FELL, BattleScript_EffectMementoTrySpAtk printfromtable gStatDownStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_EffectMementoTrySpAtk: playstatchangeanimation BS_TARGET, BIT_SPATK, STAT_CHANGE_NEGATIVE | STAT_CHANGE_BY_TWO setstatchanger STAT_SPATK, 2, TRUE statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_EffectMementoTryFaint - jumpifbyte CMP_GREATER_THAN, cMULTISTRING_CHOOSER, 0x1, BattleScript_EffectMementoTryFaint + @ Greater than STAT_FELL is checking if the stat cannot decrease + jumpifbyte CMP_GREATER_THAN, cMULTISTRING_CHOOSER, B_MSG_DEFENDER_STAT_FELL, BattleScript_EffectMementoTryFaint printfromtable gStatDownStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_EffectMementoTryFaint: tryfaintmon BS_ATTACKER, FALSE, NULL goto BattleScript_MoveEnd BattleScript_EffectMementoPrintNoEffect: printstring STRINGID_BUTNOEFFECT - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_EffectMementoTryFaint BattleScript_MementoFailProtect: attackstring @@ -2263,10 +2262,10 @@ BattleScript_MementoFailProtect: jumpifattackandspecialattackcannotfall BattleScript_MementoFailEnd BattleScript_MementoFailEnd: setatkhptozero - pause WAIT_TIME_LONG + pause B_WAIT_TIME_LONG effectivenesssound resultmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG tryfaintmon BS_ATTACKER, FALSE, NULL goto BattleScript_MoveEnd @@ -2283,7 +2282,7 @@ BattleScript_EffectFocusPunch:: jumpifnodamage BattleScript_HitFromAccCheck ppreduce printstring STRINGID_PKMNLOSTFOCUS - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectSmellingsalt:: @@ -2303,16 +2302,16 @@ BattleScript_EffectFollowMe:: attackanimation waitanimation printstring STRINGID_PKMNCENTERATTENTION - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectNaturePower:: attackcanceler attackstring - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT callterrainattack printstring STRINGID_NATUREPOWERTURNEDINTO - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG return BattleScript_EffectCharge:: @@ -2323,7 +2322,7 @@ BattleScript_EffectCharge:: attackanimation waitanimation printstring STRINGID_PKMNCHARGINGPOWER - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectTaunt:: @@ -2335,7 +2334,7 @@ BattleScript_EffectTaunt:: attackanimation waitanimation printstring STRINGID_PKMNFELLFORTAUNT - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectHelpingHand:: @@ -2346,7 +2345,7 @@ BattleScript_EffectHelpingHand:: attackanimation waitanimation printstring STRINGID_PKMNREADYTOHELP - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectTrick:: @@ -2359,9 +2358,9 @@ BattleScript_EffectTrick:: attackanimation waitanimation printstring STRINGID_PKMNSWITCHEDITEMS - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG printfromtable gItemSwapStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectRolePlay:: @@ -2373,7 +2372,7 @@ BattleScript_EffectRolePlay:: attackanimation waitanimation printstring STRINGID_PKMNCOPIEDFOE - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectWish:: @@ -2403,7 +2402,7 @@ BattleScript_EffectIngrain:: attackanimation waitanimation printstring STRINGID_PKMNPLANTEDROOTS - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectSuperpower:: @@ -2418,7 +2417,7 @@ BattleScript_EffectMagicCoat:: attackanimation waitanimation printstring STRINGID_PKMNSHROUDEDITSELF - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectRecycle:: @@ -2429,7 +2428,7 @@ BattleScript_EffectRecycle:: attackanimation waitanimation printstring STRINGID_XFOUNDONEY - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectRevenge:: @@ -2453,7 +2452,7 @@ BattleScript_BrickBreakAnim:: waitanimation jumpifbyte CMP_LESS_THAN, sB_ANIM_TURN, 0x2, BattleScript_BrickBreakDoHit printstring STRINGID_THEWALLSHATTERED - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_BrickBreakDoHit:: typecalc2 effectivenesssound @@ -2462,9 +2461,9 @@ BattleScript_BrickBreakDoHit:: healthbarupdate BS_TARGET datahpupdate BS_TARGET critmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG resultmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG seteffectwithchance tryfaintmon BS_TARGET, FALSE, NULL goto BattleScript_MoveEnd @@ -2483,14 +2482,14 @@ BattleScript_EffectYawn:: attackanimation waitanimation printstring STRINGID_PKMNWASMADEDROWSY - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_PrintBankAbilityMadeIneffective:: copybyte sBATTLER, sBATTLER_WITH_ABILITY BattleScript_PrintAbilityMadeIneffective:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNSXMADEITINEFFECTIVE - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectKnockOff:: @@ -2524,7 +2523,7 @@ BattleScript_EffectSkillSwap:: attackanimation waitanimation printstring STRINGID_PKMNSWAPPEDABILITIES - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectImprison:: @@ -2535,7 +2534,7 @@ BattleScript_EffectImprison:: attackanimation waitanimation printstring STRINGID_PKMNSEALEDOPPONENTMOVE - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectRefresh:: @@ -2546,7 +2545,7 @@ BattleScript_EffectRefresh:: attackanimation waitanimation printstring STRINGID_PKMNSTATUSNORMAL - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_ATTACKER goto BattleScript_MoveEnd @@ -2558,7 +2557,7 @@ BattleScript_EffectGrudge:: attackanimation waitanimation printstring STRINGID_PKMNWANTSGRUDGE - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectSnatch:: @@ -2568,9 +2567,9 @@ BattleScript_EffectSnatch:: ppreduce attackanimation waitanimation - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNWAITSFORTARGET - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectLowKick:: @@ -2608,7 +2607,7 @@ BattleScript_TeeterDanceLoop:: waitanimation seteffectprimary resultmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_TeeterDanceDoMoveEndIncrement:: moveendto MOVEEND_NEXT_TARGET BattleScript_TeeterDanceLoopIncrement:: @@ -2617,33 +2616,33 @@ BattleScript_TeeterDanceLoopIncrement:: end BattleScript_TeeterDanceOwnTempoPrevents:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNPREVENTSCONFUSIONWITH - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_TeeterDanceDoMoveEndIncrement BattleScript_TeeterDanceSafeguardProtected:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNUSEDSAFEGUARD - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_TeeterDanceDoMoveEndIncrement BattleScript_TeeterDanceSubstitutePrevents:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_BUTITFAILED - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_TeeterDanceDoMoveEndIncrement BattleScript_TeeterDanceAlreadyConfused:: setalreadystatusedmoveattempt BS_ATTACKER - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNALREADYCONFUSED - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_TeeterDanceDoMoveEndIncrement BattleScript_TeeterDanceMissed:: resultmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_TeeterDanceDoMoveEndIncrement BattleScript_EffectMudSport:: @@ -2655,7 +2654,7 @@ BattleScript_EffectWaterSport:: attackanimation waitanimation printfromtable gSportsUsedStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectPoisonFang:: @@ -2685,24 +2684,24 @@ BattleScript_TickleDoMoveAnim:: playstatchangeanimation BS_TARGET, BIT_ATK, STAT_CHANGE_NEGATIVE setstatchanger STAT_ATK, 1, TRUE statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_TickleTryLowerDef - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_TickleTryLowerDef + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_TickleTryLowerDef printfromtable gStatDownStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_TickleTryLowerDef:: playstatchangeanimation BS_TARGET, BIT_DEF, STAT_CHANGE_NEGATIVE setstatchanger STAT_DEF, 1, TRUE statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_TickleEnd - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_TickleEnd + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_TickleEnd printfromtable gStatDownStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_TickleEnd:: goto BattleScript_MoveEnd BattleScript_CantLowerMultipleStats:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT orbyte gMoveResultFlags, MOVE_RESULT_FAILED printstring STRINGID_STATSWONTDECREASE2 - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectCosmicPower:: @@ -2718,15 +2717,15 @@ BattleScript_CosmicPowerDoMoveAnim:: playstatchangeanimation BS_ATTACKER, BIT_DEF | BIT_SPDEF, 0x0 setstatchanger STAT_DEF, 1, FALSE statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_CosmicPowerTrySpDef - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_CosmicPowerTrySpDef + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_CosmicPowerTrySpDef printfromtable gStatUpStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_CosmicPowerTrySpDef:: setstatchanger STAT_SPDEF, 1, FALSE statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_CosmicPowerEnd - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_CosmicPowerEnd + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_CosmicPowerEnd printfromtable gStatUpStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_CosmicPowerEnd:: goto BattleScript_MoveEnd @@ -2747,15 +2746,15 @@ BattleScript_BulkUpDoMoveAnim:: playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_DEF, 0x0 setstatchanger STAT_ATK, 1, FALSE statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_BulkUpTryDef - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_BulkUpTryDef + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_BulkUpTryDef printfromtable gStatUpStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_BulkUpTryDef:: setstatchanger STAT_DEF, 1, FALSE statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_BulkUpEnd - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_BulkUpEnd + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_BulkUpEnd printfromtable gStatUpStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_BulkUpEnd:: goto BattleScript_MoveEnd @@ -2772,23 +2771,23 @@ BattleScript_CalmMindDoMoveAnim:: playstatchangeanimation BS_ATTACKER, BIT_SPATK | BIT_SPDEF, 0x0 setstatchanger STAT_SPATK, 1, FALSE statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_CalmMindTrySpDef - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_CalmMindTrySpDef + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_CalmMindTrySpDef printfromtable gStatUpStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_CalmMindTrySpDef:: setstatchanger STAT_SPDEF, 1, FALSE statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_CalmMindEnd - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_CalmMindEnd + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_CalmMindEnd printfromtable gStatUpStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_CalmMindEnd:: goto BattleScript_MoveEnd BattleScript_CantRaiseMultipleStats:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT orbyte gMoveResultFlags, MOVE_RESULT_FAILED printstring STRINGID_STATSWONTINCREASE2 - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectDragonDance:: @@ -2804,15 +2803,15 @@ BattleScript_DragonDanceDoMoveAnim:: playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_SPEED, 0x0 setstatchanger STAT_ATK, 1, FALSE statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_DragonDanceTrySpeed - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_DragonDanceTrySpeed + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_DragonDanceTrySpeed printfromtable gStatUpStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_DragonDanceTrySpeed:: setstatchanger STAT_SPEED, 1, FALSE statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_DragonDanceEnd - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_DragonDanceEnd + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_DragonDanceEnd printfromtable gStatUpStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_DragonDanceEnd:: goto BattleScript_MoveEnd @@ -2824,12 +2823,12 @@ BattleScript_EffectCamouflage:: attackanimation waitanimation printstring STRINGID_PKMNCHANGEDTYPE - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_FaintAttacker:: playfaintcry BS_ATTACKER - pause WAIT_TIME_LONG + pause B_WAIT_TIME_LONG dofaintanimation BS_ATTACKER cleareffectsonfaint BS_ATTACKER printstring STRINGID_ATTACKERFAINTED @@ -2837,7 +2836,7 @@ BattleScript_FaintAttacker:: BattleScript_FaintTarget:: playfaintcry BS_TARGET - pause WAIT_TIME_LONG + pause B_WAIT_TIME_LONG dofaintanimation BS_TARGET cleareffectsonfaint BS_TARGET printstring STRINGID_TARGETFAINTED @@ -2952,7 +2951,7 @@ BattleScript_LocalBattleWonLoseTexts:: BattleScript_LocalBattleWonReward:: getmoneyreward printstring STRINGID_PLAYERGOTMONEY - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_PayDayMoneyAndPickUpItems:: givepaydaymoney pickup @@ -2966,9 +2965,9 @@ BattleScript_LocalBattleLost:: jumpifhalfword CMP_EQUAL, gTrainerBattleOpponent_A, TRAINER_SECRET_BASE, BattleScript_LocalBattleLostEnd BattleScript_LocalBattleLostPrintWhiteOut:: printstring STRINGID_PLAYERWHITEOUT - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG printstring STRINGID_PLAYERWHITEOUT2 - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_LocalBattleLostEnd:: end2 BattleScript_CheckDomeDrew:: @@ -3009,23 +3008,23 @@ BattleScript_FrontierLinkBattleLost:: jumpifbattletype BATTLE_TYPE_RECORDED, BattleScript_FrontierLinkBattleLostEnd endlinkbattle BattleScript_FrontierLinkBattleLostEnd:: - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG end2 BattleScript_LinkBattleWonOrLost:: jumpifbattletype BATTLE_TYPE_BATTLE_TOWER, BattleScript_TowerLinkBattleWon printstring STRINGID_BATTLEEND - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG jumpifbattletype BATTLE_TYPE_RECORDED, BattleScript_LinkBattleWonOrLostWaitEnd endlinkbattle BattleScript_LinkBattleWonOrLostWaitEnd:: - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG end2 BattleScript_TowerLinkBattleWon:: playtrainerdefeatbgm BS_ATTACKER printstring STRINGID_BATTLEEND - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG trainerslidein BS_ATTACKER waitstate printstring STRINGID_TRAINER1LOSETEXT @@ -3037,7 +3036,7 @@ BattleScript_TowerLinkBattleWon:: jumpifbattletype BATTLE_TYPE_RECORDED, BattleScript_TowerLinkBattleWonEnd endlinkbattle BattleScript_TowerLinkBattleWonEnd:: - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG end2 BattleScript_FrontierTrainerBattleWon:: @@ -3066,22 +3065,22 @@ BattleScript_FrontierTrainerBattleWon_End: BattleScript_SmokeBallEscape:: playanimation BS_ATTACKER, B_ANIM_SMOKEBALL_ESCAPE, NULL printstring STRINGID_PKMNFLEDUSINGITS - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG end2 BattleScript_RanAwayUsingMonAbility:: printstring STRINGID_PKMNFLEDUSING - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG end2 BattleScript_GotAwaySafely:: printstring STRINGID_GOTAWAYSAFELY - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG end2 BattleScript_WildMonFled:: printstring STRINGID_WILDPKMNFLED - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG end2 BattleScript_PrintCantRunFromTrainer:: @@ -3090,7 +3089,7 @@ BattleScript_PrintCantRunFromTrainer:: BattleScript_PrintFailedToRunString:: printfromtable gNoEscapeStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG end2 BattleScript_PrintCantEscapeFromBattle:: @@ -3137,7 +3136,7 @@ BattleScript_DoSwitchOut:: end2 BattleScript_PursuitDmgOnSwitchOut:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT attackstring ppreduce critcalc @@ -3152,9 +3151,9 @@ BattleScript_PursuitDmgOnSwitchOut:: healthbarupdate BS_TARGET datahpupdate BS_TARGET critmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG resultmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG tryfaintmon BS_TARGET, FALSE, NULL moveendfromto MOVEEND_ON_DAMAGE_ABILITIES, MOVEEND_CHOICE_MOVE getbattlerfainted BS_TARGET @@ -3165,7 +3164,7 @@ BattleScript_PursuitDmgOnSwitchOutRet: return BattleScript_Pausex20:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT return BattleScript_LevelUp:: @@ -3199,7 +3198,7 @@ BattleScript_LearnedNewMove:: buffermovetolearn fanfare MUS_LEVEL_UP printstring STRINGID_PKMNLEARNEDMOVE - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG updatechoicemoveonlvlup BS_ATTACKER goto BattleScript_TryLearnMoveLoop BattleScript_LearnMoveReturn:: @@ -3207,15 +3206,15 @@ BattleScript_LearnMoveReturn:: BattleScript_RainContinuesOrEnds:: printfromtable gRainContinuesStringIds - waitmessage WAIT_TIME_LONG - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_RainContinuesOrEndsEnd + waitmessage B_WAIT_TIME_LONG + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_RAIN_STOPPED, BattleScript_RainContinuesOrEndsEnd playanimation BS_ATTACKER, B_ANIM_RAIN_CONTINUES, NULL BattleScript_RainContinuesOrEndsEnd:: end2 BattleScript_DamagingWeatherContinues:: printfromtable gSandStormHailContinuesStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG playanimation2 BS_ATTACKER, sB_ANIM_ARG1, NULL setbyte gBattleCommunication, 0x0 BattleScript_DamagingWeatherLoop:: @@ -3223,7 +3222,7 @@ BattleScript_DamagingWeatherLoop:: weatherdamage jumpifword CMP_EQUAL, gBattleMoveDamage, 0x0, BattleScript_DamagingWeatherLoopIncrement printfromtable gSandStormHailDmgStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG orword gHitMarker, HITMARKER_x20 | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000 | HITMARKER_GRUDGE effectivenesssound hitanimation BS_ATTACKER @@ -3241,41 +3240,41 @@ BattleScript_DamagingWeatherContinuesEnd:: BattleScript_SandStormHailEnds:: printfromtable gSandStormHailEndStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG end2 BattleScript_SunlightContinues:: printstring STRINGID_SUNLIGHTSTRONG - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG playanimation BS_ATTACKER, B_ANIM_SUN_CONTINUES, NULL end2 BattleScript_SunlightFaded:: printstring STRINGID_SUNLIGHTFADED - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG end2 BattleScript_OverworldWeatherStarts:: printfromtable gWeatherStartsStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG playanimation2 BS_ATTACKER, sB_ANIM_ARG1, NULL end3 BattleScript_SideStatusWoreOff:: printstring STRINGID_PKMNSXWOREOFF - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG end2 BattleScript_SafeguardProtected:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNUSEDSAFEGUARD - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG end2 BattleScript_SafeguardEnds:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNSAFEGUARDEXPIRED - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG end2 BattleScript_LeechSeedTurnDrain:: @@ -3286,23 +3285,23 @@ BattleScript_LeechSeedTurnDrain:: copyword gBattleMoveDamage, gHpDealt jumpifability BS_ATTACKER, ABILITY_LIQUID_OOZE, BattleScript_LeechSeedTurnPrintLiquidOoze manipulatedamage DMG_CHANGE_SIGN - setbyte cMULTISTRING_CHOOSER, 0x3 + setbyte cMULTISTRING_CHOOSER, B_MSG_LEECH_SEED_DRAIN goto BattleScript_LeechSeedTurnPrintAndUpdateHp BattleScript_LeechSeedTurnPrintLiquidOoze:: - setbyte cMULTISTRING_CHOOSER, 0x4 + setbyte cMULTISTRING_CHOOSER, B_MSG_LEECH_SEED_OOZE BattleScript_LeechSeedTurnPrintAndUpdateHp:: orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000 healthbarupdate BS_TARGET datahpupdate BS_TARGET printfromtable gLeechSeedStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG tryfaintmon BS_ATTACKER, FALSE, NULL tryfaintmon BS_TARGET, FALSE, NULL end2 BattleScript_BideStoringEnergy:: printstring STRINGID_PKMNSTORINGENERGY - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_BideAttack:: @@ -3310,7 +3309,7 @@ BattleScript_BideAttack:: setmoveeffect MOVE_EFFECT_CHARGING clearstatusfromeffect BS_ATTACKER printstring STRINGID_PKMNUNLEASHEDENERGY - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG accuracycheck BattleScript_MoveMissed, ACC_CURR_MOVE typecalc bicbyte gMoveResultFlags, MOVE_RESULT_SUPER_EFFECTIVE | MOVE_RESULT_NOT_VERY_EFFECTIVE @@ -3325,7 +3324,7 @@ BattleScript_BideAttack:: healthbarupdate BS_TARGET datahpupdate BS_TARGET resultmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG tryfaintmon BS_TARGET, FALSE, NULL goto BattleScript_MoveEnd @@ -3334,7 +3333,7 @@ BattleScript_BideNoEnergyToAttack:: setmoveeffect MOVE_EFFECT_CHARGING clearstatusfromeffect BS_ATTACKER printstring STRINGID_PKMNUNLEASHEDENERGY - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_ButItFailed BattleScript_SuccessForceOut:: @@ -3357,19 +3356,19 @@ BattleScript_TrainerBattleForceOut:: goto BattleScript_MoveEnd BattleScript_MistProtected:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNPROTECTEDBYMIST - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG return BattleScript_RageIsBuilding:: printstring STRINGID_PKMNRAGEBUILDING - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG return BattleScript_MoveUsedIsDisabled:: printstring STRINGID_PKMNMOVEISDISABLED - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_SelectingDisabledMove:: @@ -3378,7 +3377,7 @@ BattleScript_SelectingDisabledMove:: BattleScript_DisabledNoMore:: printstring STRINGID_PKMNMOVEDISABLEDNOMORE - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG end2 BattleScript_SelectingDisabledMoveInPalace:: @@ -3389,12 +3388,12 @@ BattleScript_SelectingUnusableMoveInPalace:: BattleScript_EncoredNoMore:: printstring STRINGID_PKMNENCOREENDED - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG end2 BattleScript_DestinyBondTakesLife:: printstring STRINGID_PKMNTOOKFOE - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000 healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER @@ -3448,12 +3447,12 @@ BattleScript_SpikesOnFaintedBattlerFainted:: BattleScript_PrintHurtBySpikes:: printstring STRINGID_PKMNHURTBYSPIKES - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG return BattleScript_PerishSongTakesLife:: printstring STRINGID_PKMNPERISHCOUNTFELL - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000 healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER @@ -3462,7 +3461,7 @@ BattleScript_PerishSongTakesLife:: BattleScript_PerishSongCountGoesDown:: printstring STRINGID_PKMNPERISHCOUNTFELL - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG end2 BattleScript_AllStatsUp:: @@ -3477,27 +3476,27 @@ BattleScript_AllStatsUpAtk:: setstatchanger STAT_ATK, 1, FALSE statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_AllStatsUpDef printfromtable gStatUpStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_AllStatsUpDef:: setstatchanger STAT_DEF, 1, FALSE statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_AllStatsUpSpeed printfromtable gStatUpStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_AllStatsUpSpeed:: setstatchanger STAT_SPEED, 1, FALSE statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_AllStatsUpSpAtk printfromtable gStatUpStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_AllStatsUpSpAtk:: setstatchanger STAT_SPATK, 1, FALSE statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_AllStatsUpSpDef printfromtable gStatUpStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_AllStatsUpSpDef:: setstatchanger STAT_SPDEF, 1, FALSE statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_AllStatsUpRet printfromtable gStatUpStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_AllStatsUpRet:: return @@ -3507,31 +3506,31 @@ BattleScript_RapidSpinAway:: BattleScript_WrapFree:: printstring STRINGID_PKMNGOTFREE - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG copybyte gBattlerTarget, sBATTLER return BattleScript_LeechSeedFree:: printstring STRINGID_PKMNSHEDLEECHSEED - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG return BattleScript_SpikesFree:: printstring STRINGID_PKMNBLEWAWAYSPIKES - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG return BattleScript_MonTookFutureAttack:: printstring STRINGID_PKMNTOOKATTACK - waitmessage WAIT_TIME_LONG - jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, 0x0, BattleScript_CheckDoomDesireMiss + waitmessage B_WAIT_TIME_LONG + jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, B_MSG_FUTURE_SIGHT, BattleScript_CheckDoomDesireMiss accuracycheck BattleScript_FutureAttackMiss, MOVE_FUTURE_SIGHT goto BattleScript_FutureAttackAnimate BattleScript_CheckDoomDesireMiss:: accuracycheck BattleScript_FutureAttackMiss, MOVE_DOOM_DESIRE BattleScript_FutureAttackAnimate:: adjustnormaldamage2 - jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, 0x0, BattleScript_FutureHitAnimDoomDesire + jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, B_MSG_FUTURE_SIGHT, BattleScript_FutureHitAnimDoomDesire playanimation BS_ATTACKER, B_ANIM_FUTURE_SIGHT_HIT, NULL goto BattleScript_DoFutureAttackHit BattleScript_FutureHitAnimDoomDesire:: @@ -3543,7 +3542,7 @@ BattleScript_DoFutureAttackHit:: healthbarupdate BS_TARGET datahpupdate BS_TARGET resultmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG tryfaintmon BS_TARGET, FALSE, NULL atk24 BattleScript_FutureAttackEnd BattleScript_FutureAttackEnd:: @@ -3553,11 +3552,11 @@ BattleScript_FutureAttackEnd:: end2 BattleScript_FutureAttackMiss:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT setbyte gMoveResultFlags, 0 orbyte gMoveResultFlags, MOVE_RESULT_FAILED resultmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG setbyte gMoveResultFlags, 0 end2 @@ -3571,9 +3570,9 @@ BattleScript_SelectingMoveWithNoPP:: BattleScript_NoPPForMove:: attackstring - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_BUTNOPPLEFT - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_SelectingTormentedMove:: @@ -3582,7 +3581,7 @@ BattleScript_SelectingTormentedMove:: BattleScript_MoveUsedIsTormented:: printstring STRINGID_PKMNCANTUSEMOVETORMENT - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_SelectingTormentedMoveInPalace:: @@ -3595,7 +3594,7 @@ BattleScript_SelectingNotAllowedMoveTaunt:: BattleScript_MoveUsedIsTaunted:: printstring STRINGID_PKMNCANTUSEMOVETAUNT - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_SelectingNotAllowedMoveTauntInPalace:: @@ -3606,35 +3605,35 @@ BattleScript_WishComesTrue:: trywish 0x1, BattleScript_WishButFullHp playanimation BS_TARGET, B_ANIM_WISH_HEAL, NULL printstring STRINGID_PKMNWISHCAMETRUE - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE healthbarupdate BS_TARGET datahpupdate BS_TARGET printstring STRINGID_PKMNREGAINEDHEALTH - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG end2 BattleScript_WishButFullHp:: printstring STRINGID_PKMNWISHCAMETRUE - waitmessage WAIT_TIME_LONG - pause WAIT_TIME_SHORT + waitmessage B_WAIT_TIME_LONG + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNHPFULL - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG end2 BattleScript_IngrainTurnHeal:: playanimation BS_ATTACKER, B_ANIM_INGRAIN_HEAL, NULL printstring STRINGID_PKMNABSORBEDNUTRIENTS - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER end2 BattleScript_PrintMonIsRooted:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNANCHOREDITSELF - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_AtkDefDown:: @@ -3643,28 +3642,28 @@ BattleScript_AtkDefDown:: playstatchangeanimation BS_ATTACKER, BIT_ATK, STAT_CHANGE_CANT_PREVENT | STAT_CHANGE_NEGATIVE setstatchanger STAT_ATK, 1, TRUE statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN | STAT_BUFF_ALLOW_PTR, BattleScript_AtkDefDown_TryDef - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_AtkDefDown_TryDef + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_AtkDefDown_TryDef printfromtable gStatDownStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_AtkDefDown_TryDef:: playstatchangeanimation BS_ATTACKER, BIT_DEF, STAT_CHANGE_CANT_PREVENT | STAT_CHANGE_NEGATIVE setstatchanger STAT_DEF, 1, TRUE statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN | STAT_BUFF_ALLOW_PTR, BattleScript_AtkDefDown_End - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_AtkDefDown_End + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_AtkDefDown_End printfromtable gStatDownStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_AtkDefDown_End:: return BattleScript_KnockedOff:: playanimation BS_TARGET, B_ANIM_ITEM_KNOCKOFF, NULL printstring STRINGID_PKMNKNOCKEDOFF - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG return BattleScript_MoveUsedIsImprisoned:: printstring STRINGID_PKMNCANTUSEMOVESEALED - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_SelectingImprisonedMove:: @@ -3677,15 +3676,15 @@ BattleScript_SelectingImprisonedMoveInPalace:: BattleScript_GrudgeTakesPp:: printstring STRINGID_PKMNLOSTPPGRUDGE - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG return BattleScript_MagicCoatBounce:: attackstring ppreduce - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNMOVEBOUNCED - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG orword gHitMarker, HITMARKER_ATTACKSTRING_PRINTED | HITMARKER_NO_PPDEDUCT | HITMARKER_x800000 setmagiccoattarget BS_ATTACKER return @@ -3696,19 +3695,19 @@ BattleScript_SnatchedMove:: snatchsetbattlers playanimation BS_TARGET, B_ANIM_SNATCH_MOVE, NULL printstring STRINGID_PKMNSNATCHEDMOVE - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG orword gHitMarker, HITMARKER_ATTACKSTRING_PRINTED | HITMARKER_NO_PPDEDUCT | HITMARKER_x800000 swapattackerwithtarget return BattleScript_EnduredMsg:: printstring STRINGID_PKMNENDUREDHIT - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG return BattleScript_OneHitKOMsg:: printstring STRINGID_ONEHITKO - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG return BattleScript_SAtkDown2:: @@ -3716,9 +3715,9 @@ BattleScript_SAtkDown2:: playstatchangeanimation BS_ATTACKER, BIT_SPATK, STAT_CHANGE_CANT_PREVENT | STAT_CHANGE_NEGATIVE | STAT_CHANGE_BY_TWO setstatchanger STAT_SPATK, 2, TRUE 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, B_MSG_STAT_WONT_DECREASE, BattleScript_SAtkDown2End printfromtable gStatDownStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_SAtkDown2End:: return @@ -3727,31 +3726,31 @@ BattleScript_FocusPunchSetUp:: waitmessage 1 playanimation BS_ATTACKER, B_ANIM_FOCUS_PUNCH_SETUP, NULL printstring STRINGID_PKMNTIGHTENINGFOCUS - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG end2 BattleScript_MoveUsedIsAsleep:: printstring STRINGID_PKMNFASTASLEEP - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG statusanimation BS_ATTACKER goto BattleScript_MoveEnd BattleScript_MoveUsedWokeUp:: bicword gHitMarker, HITMARKER_x10 printfromtable gWokeUpStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_ATTACKER return BattleScript_MonWokeUpInUproar:: printstring STRINGID_PKMNWOKEUPINUPROAR - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_ATTACKER end2 BattleScript_PoisonTurnDmg:: printstring STRINGID_PKMNHURTBYPOISON - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_DoStatusTurnDmg:: statusanimation BS_ATTACKER BattleScript_DoTurnDmg:: @@ -3765,60 +3764,60 @@ BattleScript_DoTurnDmgEnd:: BattleScript_BurnTurnDmg:: printstring STRINGID_PKMNHURTBYBURN - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_DoStatusTurnDmg BattleScript_MoveUsedIsFrozen:: printstring STRINGID_PKMNISFROZEN - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG statusanimation BS_ATTACKER goto BattleScript_MoveEnd BattleScript_MoveUsedUnfroze:: printfromtable gGotDefrostedStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_ATTACKER return BattleScript_DefrostedViaFireMove:: printstring STRINGID_PKMNWASDEFROSTED - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_TARGET return BattleScript_MoveUsedIsParalyzed:: printstring STRINGID_PKMNISPARALYZED - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG statusanimation BS_ATTACKER cancelmultiturnmoves BS_ATTACKER goto BattleScript_MoveEnd BattleScript_MoveUsedFlinched:: printstring STRINGID_PKMNFLINCHED - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_PrintUproarOverTurns:: printfromtable gUproarOverTurnStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG end2 BattleScript_ThrashConfuses:: chosenstatus2animation BS_ATTACKER, STATUS2_CONFUSION printstring STRINGID_PKMNFATIGUECONFUSION - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG end2 BattleScript_MoveUsedIsConfused:: printstring STRINGID_PKMNISCONFUSED - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG status2animation BS_ATTACKER, STATUS2_CONFUSION - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x0, BattleScript_MoveUsedIsConfusedRet + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, FALSE, BattleScript_MoveUsedIsConfusedRet BattleScript_DoSelfConfusionDmg:: cancelmultiturnmoves BS_ATTACKER adjustnormaldamage2 printstring STRINGID_ITHURTCONFUSION - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG effectivenesssound hitanimation BS_ATTACKER waitstate @@ -3826,7 +3825,7 @@ BattleScript_DoSelfConfusionDmg:: healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER resultmessage - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG tryfaintmon BS_ATTACKER, FALSE, NULL goto BattleScript_MoveEnd BattleScript_MoveUsedIsConfusedRet:: @@ -3834,58 +3833,58 @@ BattleScript_MoveUsedIsConfusedRet:: BattleScript_MoveUsedIsConfusedNoMore:: printstring STRINGID_PKMNHEALEDCONFUSION - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG return BattleScript_PrintPayDayMoneyString:: printstring STRINGID_PLAYERPICKEDUPMONEY - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG return BattleScript_WrapTurnDmg:: playanimation BS_ATTACKER, B_ANIM_TURN_TRAP, sB_ANIM_ARG1 printstring STRINGID_PKMNHURTBY - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_DoTurnDmg BattleScript_WrapEnds:: printstring STRINGID_PKMNFREEDFROM - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG end2 BattleScript_MoveUsedIsInLove:: printstring STRINGID_PKMNINLOVE - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG status2animation BS_ATTACKER, STATUS2_INFATUATION return BattleScript_MoveUsedIsInLoveCantAttack:: printstring STRINGID_PKMNIMMOBILIZEDBYLOVE - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_NightmareTurnDmg:: printstring STRINGID_PKMNLOCKEDINNIGHTMARE - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG status2animation BS_ATTACKER, STATUS2_NIGHTMARE goto BattleScript_DoTurnDmg BattleScript_CurseTurnDmg:: printstring STRINGID_PKMNAFFLICTEDBYCURSE - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG status2animation BS_ATTACKER, STATUS2_CURSED goto BattleScript_DoTurnDmg BattleScript_TargetPRLZHeal:: printstring STRINGID_PKMNHEALEDPARALYSIS - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_TARGET return BattleScript_MoveEffectSleep:: statusanimation BS_EFFECT_BATTLER printfromtable gFellAsleepStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_UpdateEffectStatusIconRet:: updatestatusicon BS_EFFECT_BATTLER waitstate @@ -3894,7 +3893,7 @@ BattleScript_UpdateEffectStatusIconRet:: BattleScript_YawnMakesAsleep:: statusanimation BS_EFFECT_BATTLER printstring STRINGID_PKMNFELLASLEEP - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_EFFECT_BATTLER waitstate makevisible BS_EFFECT_BATTLER @@ -3903,52 +3902,52 @@ BattleScript_YawnMakesAsleep:: BattleScript_MoveEffectPoison:: statusanimation BS_EFFECT_BATTLER printfromtable gGotPoisonedStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_UpdateEffectStatusIconRet BattleScript_MoveEffectBurn:: statusanimation BS_EFFECT_BATTLER printfromtable gGotBurnedStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_UpdateEffectStatusIconRet BattleScript_MoveEffectFreeze:: statusanimation BS_EFFECT_BATTLER printfromtable gGotFrozenStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_UpdateEffectStatusIconRet BattleScript_MoveEffectParalysis:: statusanimation BS_EFFECT_BATTLER printfromtable gGotParalyzedStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_UpdateEffectStatusIconRet BattleScript_MoveEffectUproar:: printstring STRINGID_PKMNCAUSEDUPROAR - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG return BattleScript_MoveEffectToxic:: statusanimation BS_EFFECT_BATTLER printstring STRINGID_PKMNBADLYPOISONED - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_UpdateEffectStatusIconRet BattleScript_MoveEffectPayDay:: printstring STRINGID_COINSSCATTERED - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG return BattleScript_MoveEffectWrap:: printfromtable gWrappedStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG return BattleScript_MoveEffectConfusion:: chosenstatus2animation BS_EFFECT_BATTLER, STATUS2_CONFUSION printstring STRINGID_PKMNWASCONFUSED - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG return BattleScript_MoveEffectRecoil:: @@ -3959,7 +3958,7 @@ BattleScript_DoRecoil:: healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER printstring STRINGID_PKMNHITWITHRECOIL - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG tryfaintmon BS_ATTACKER, FALSE, NULL BattleScript_RecoilEnd:: return @@ -3967,11 +3966,11 @@ BattleScript_RecoilEnd:: BattleScript_ItemSteal:: playanimation BS_TARGET, B_ANIM_ITEM_STEAL, NULL printstring STRINGID_PKMNSTOLEITEM - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG return BattleScript_DrizzleActivates:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNMADEITRAIN waitstate playanimation BS_BATTLER_0, B_ANIM_RAIN_CONTINUES, NULL @@ -3981,25 +3980,25 @@ BattleScript_DrizzleActivates:: BattleScript_SpeedBoostActivates:: playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 printstring STRINGID_PKMNRAISEDSPEED - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG end3 BattleScript_TraceActivates:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNTRACED - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG end3 BattleScript_RainDishActivates:: printstring STRINGID_PKMNSXRESTOREDHPALITTLE2 - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER end3 BattleScript_SandstreamActivates:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNSXWHIPPEDUPSANDSTORM waitstate playanimation BS_BATTLER_0, B_ANIM_SANDSTORM_CONTINUES, NULL @@ -4008,7 +4007,7 @@ BattleScript_SandstreamActivates:: BattleScript_ShedSkinActivates:: printstring STRINGID_PKMNSXCUREDYPROBLEM - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_ATTACKER end3 @@ -4028,7 +4027,7 @@ BattleScript_DoCastformChange:: docastformchangeanimation waitstate printstring STRINGID_PKMNTRANSFORMED - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG return BattleScript_IntimidateActivatesEnd3:: @@ -4036,7 +4035,7 @@ BattleScript_IntimidateActivatesEnd3:: end3 BattleScript_PauseIntimidateActivates: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT BattleScript_IntimidateActivates:: setbyte gBattlerTarget, 0x0 setstatchanger STAT_ATK, 1, TRUE @@ -4047,24 +4046,24 @@ BattleScript_IntimidateActivatesLoop: jumpifability BS_TARGET, ABILITY_HYPER_CUTTER, BattleScript_IntimidatePrevented jumpifability BS_TARGET, ABILITY_WHITE_SMOKE, BattleScript_IntimidatePrevented 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, 1, BattleScript_IntimidateActivatesLoopIncrement setgraphicalstatchangevalues playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 printstring STRINGID_PKMNCUTSATTACKWITH - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_IntimidateActivatesLoopIncrement: addbyte gBattlerTarget, 0x1 goto BattleScript_IntimidateActivatesLoop BattleScript_IntimidateActivatesReturn: return BattleScript_IntimidatePrevented: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_PREVENTEDFROMWORKING - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_IntimidateActivatesLoopIncrement BattleScript_DroughtActivates:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNSXINTENSIFIEDSUN waitstate playanimation BS_BATTLER_0, B_ANIM_SUN_CONTINUES, NULL @@ -4073,34 +4072,34 @@ BattleScript_DroughtActivates:: BattleScript_TookAttack:: attackstring - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNSXTOOKATTACK - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG orword gHitMarker, HITMARKER_ATTACKSTRING_PRINTED return BattleScript_SturdyPreventsOHKO:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNPROTECTEDBY - pause WAIT_TIME_LONG + pause B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_DampStopsExplosion:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNPREVENTSUSAGE - pause WAIT_TIME_LONG + pause B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_MoveHPDrain_PPLoss:: ppreduce BattleScript_MoveHPDrain:: attackstring - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE healthbarupdate BS_TARGET datahpupdate BS_TARGET printstring STRINGID_PKMNRESTOREDHPUSING - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG orbyte gMoveResultFlags, MOVE_RESULT_DOESNT_AFFECT_FOE goto BattleScript_MoveEnd @@ -4108,9 +4107,9 @@ BattleScript_MonMadeMoveUseless_PPLoss:: ppreduce BattleScript_MonMadeMoveUseless:: attackstring - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNSXMADEYUSELESS - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG orbyte gMoveResultFlags, MOVE_RESULT_DOESNT_AFFECT_FOE goto BattleScript_MoveEnd @@ -4118,83 +4117,83 @@ BattleScript_FlashFireBoost_PPLoss:: ppreduce BattleScript_FlashFireBoost:: attackstring - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printfromtable gFlashFireStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_AbilityPreventsPhasingOut:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNANCHORSITSELFWITH - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_AbilityNoStatLoss:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNPREVENTSSTATLOSSWITH - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG return BattleScript_BRNPrevention:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printfromtable gBRNPreventionStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG return BattleScript_PRLZPrevention:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printfromtable gPRLZPreventionStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG return BattleScript_PSNPrevention:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printfromtable gPSNPreventionStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG return BattleScript_ObliviousPreventsAttraction:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNPREVENTSROMANCEWITH - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_FlinchPrevention:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNSXPREVENTSFLINCHING - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_OwnTempoPrevents:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNPREVENTSCONFUSIONWITH - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_SoundproofProtected:: attackstring ppreduce - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNSXBLOCKSY - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_AbilityNoSpecificStatLoss:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNSXPREVENTSYLOSS - waitmessage WAIT_TIME_LONG - setbyte cMULTISTRING_CHOOSER, 0x3 + waitmessage B_WAIT_TIME_LONG + setbyte cMULTISTRING_CHOOSER, B_MSG_STAT_FELL_EMPTY return BattleScript_StickyHoldActivates:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNSXMADEYINEFFECTIVE - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_ColorChangeActivates:: printstring STRINGID_PKMNCHANGEDTYPEWITH - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG return BattleScript_RoughSkinActivates:: @@ -4202,14 +4201,14 @@ BattleScript_RoughSkinActivates:: healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER printstring STRINGID_PKMNHURTSWITH - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG tryfaintmon BS_ATTACKER, FALSE, NULL return BattleScript_CuteCharmActivates:: status2animation BS_ATTACKER, STATUS2_INFATUATION printstring STRINGID_PKMNSXINFATUATEDY - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG return BattleScript_ApplySecondaryEffect:: @@ -4223,42 +4222,42 @@ BattleScript_SynchronizeActivates:: return BattleScript_NoItemSteal:: - pause WAIT_TIME_SHORT + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNSXMADEYINEFFECTIVE - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG return BattleScript_AbilityCuredStatus:: printstring STRINGID_PKMNSXCUREDITSYPROBLEM - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_SCRIPTING return BattleScript_IgnoresWhileAsleep:: printstring STRINGID_PKMNIGNORESASLEEP - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG moveendto MOVEEND_NEXT_TARGET end BattleScript_IgnoresAndUsesRandomMove:: printstring STRINGID_PKMNIGNOREDORDERS - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG jumptocalledmove FALSE BattleScript_MoveUsedLoafingAround:: - jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, 0x4, BattleScript_82DB6C7 - setbyte gBattleCommunication, 0x0 + jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, B_MSG_INCAPABLE_OF_POWER, BattleScript_MoveUsedLoafingAroundMsg + setbyte gBattleCommunication, 0 various24 BS_ATTACKER - setbyte cMULTISTRING_CHOOSER, 0x4 -BattleScript_82DB6C7:: + setbyte cMULTISTRING_CHOOSER, B_MSG_INCAPABLE_OF_POWER +BattleScript_MoveUsedLoafingAroundMsg:: printfromtable gInobedientStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG moveendto MOVEEND_NEXT_TARGET end BattleScript_IgnoresAndFallsAsleep:: printstring STRINGID_PKMNBEGANTONAP - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG setmoveeffect MOVE_EFFECT_SLEEP | MOVE_EFFECT_AFFECTS_USER seteffectprimary moveendto MOVEEND_NEXT_TARGET @@ -4266,7 +4265,7 @@ BattleScript_IgnoresAndFallsAsleep:: BattleScript_IgnoresAndHitsItself:: printstring STRINGID_PKMNWONTOBEY - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG goto BattleScript_DoSelfConfusionDmg BattleScript_SubstituteFade:: @@ -4281,7 +4280,7 @@ BattleScript_BerryCurePrlzEnd2:: BattleScript_BerryCureParRet:: playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL printstring STRINGID_PKMNSITEMCUREDPARALYSIS - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_SCRIPTING removeitem BS_SCRIPTING return @@ -4293,7 +4292,7 @@ BattleScript_BerryCurePsnEnd2:: BattleScript_BerryCurePsnRet:: playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL printstring STRINGID_PKMNSITEMCUREDPOISON - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_SCRIPTING removeitem BS_SCRIPTING return @@ -4305,7 +4304,7 @@ BattleScript_BerryCureBrnEnd2:: BattleScript_BerryCureBrnRet:: playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL printstring STRINGID_PKMNSITEMHEALEDBURN - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_SCRIPTING removeitem BS_SCRIPTING return @@ -4317,7 +4316,7 @@ BattleScript_BerryCureFrzEnd2:: BattleScript_BerryCureFrzRet:: playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL printstring STRINGID_PKMNSITEMDEFROSTEDIT - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_SCRIPTING removeitem BS_SCRIPTING return @@ -4329,7 +4328,7 @@ BattleScript_BerryCureSlpEnd2:: BattleScript_BerryCureSlpRet:: playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL printstring STRINGID_PKMNSITEMWOKEIT - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_SCRIPTING removeitem BS_SCRIPTING return @@ -4341,7 +4340,7 @@ BattleScript_BerryCureConfusionEnd2:: BattleScript_BerryCureConfusionRet:: playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL printstring STRINGID_PKMNSITEMSNAPPEDOUT - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG removeitem BS_SCRIPTING return @@ -4352,7 +4351,7 @@ BattleScript_BerryCureChosenStatusEnd2:: BattleScript_BerryCureChosenStatusRet:: playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL printfromtable gBerryEffectStringIds - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_SCRIPTING removeitem BS_SCRIPTING return @@ -4364,14 +4363,14 @@ BattleScript_WhiteHerbEnd2:: BattleScript_WhiteHerbRet:: playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL printstring STRINGID_PKMNSITEMRESTOREDSTATUS - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG removeitem BS_SCRIPTING return BattleScript_ItemHealHP_RemoveItem:: playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT, NULL printstring STRINGID_PKMNSITEMRESTOREDHEALTH - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER @@ -4381,7 +4380,7 @@ BattleScript_ItemHealHP_RemoveItem:: BattleScript_BerryPPHealEnd2:: playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT, NULL printstring STRINGID_PKMNSITEMRESTOREDPP - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG removeitem BS_ATTACKER end2 @@ -4392,7 +4391,7 @@ BattleScript_ItemHealHP_End2:: BattleScript_ItemHealHP_Ret:: playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT, NULL printstring STRINGID_PKMNSITEMRESTOREDHPALITTLE - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER @@ -4405,18 +4404,18 @@ BattleScript_SelectingNotAllowedMoveChoiceItem:: BattleScript_FocusBandActivates:: playanimation BS_TARGET, B_ANIM_FOCUS_BAND, NULL printstring STRINGID_PKMNHUNGONWITHX - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG return BattleScript_BerryConfuseHealEnd2:: playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT, NULL printstring STRINGID_PKMNSITEMRESTOREDHEALTH - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER printstring STRINGID_FORXCOMMAYZ - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG setmoveeffect MOVE_EFFECT_CONFUSION | MOVE_EFFECT_AFFECTS_USER seteffectprimary removeitem BS_ATTACKER @@ -4424,9 +4423,9 @@ BattleScript_BerryConfuseHealEnd2:: BattleScript_BerryStatRaiseEnd2:: playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT, NULL - statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_82DB85B -BattleScript_82DB85B:: - setbyte cMULTISTRING_CHOOSER, 0x4 + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_BerryStatRaiseDoStatUp +BattleScript_BerryStatRaiseDoStatUp:: + setbyte cMULTISTRING_CHOOSER, B_MSG_STAT_ROSE_ITEM call BattleScript_StatUp removeitem BS_ATTACKER end2 @@ -4434,7 +4433,7 @@ BattleScript_82DB85B:: BattleScript_BerryFocusEnergyEnd2:: playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT, NULL printstring STRINGID_PKMNUSEDXTOGETPUMPED - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG removeitem BS_ATTACKER end2 @@ -4452,7 +4451,7 @@ BattleScript_PalaceTryBattlerFlavorText:: palaceflavortext BS_ATTACKER @ BS_ATTACKER here overwritten by gBattleCommunication + 1 jumpifbyte CMP_NOT_EQUAL, gBattleCommunication, TRUE, BattleScript_PalaceEndFlavorText printfromtable gBattlePalaceFlavorTextTable - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG BattleScript_PalaceEndFlavorText:: addbyte gBattleCommunication + 1, 1 jumpifbytenotequal gBattleCommunication + 1, gBattlersCount, BattleScript_PalaceTryBattlerFlavorText @@ -4469,7 +4468,7 @@ BattleScript_ArenaTurnBeginning:: various14 BS_ATTACKER arenajudmengtstring 8 arenawaitmessage 8 - pause WAIT_TIME_LONG + pause B_WAIT_TIME_LONG various15 BS_ATTACKER volumeup end2 @@ -4479,7 +4478,7 @@ BattleScript_82DB8E0:: @ Unused battlescript various14 BS_ATTACKER arenajudmengtstring BS_TARGET arenawaitmessage BS_TARGET - pause WAIT_TIME_LONG + pause B_WAIT_TIME_LONG various15 BS_ATTACKER end2 @@ -4492,14 +4491,14 @@ BattleScript_ArenaDoJudgment:: playse SE_ARENA_TIMEUP1 pause 8 playse SE_ARENA_TIMEUP1 - pause WAIT_TIME_LONG + pause B_WAIT_TIME_LONG various14 BS_ATTACKER arenajudmengtstring 1 arenawaitmessage 1 - pause WAIT_TIME_LONG + pause B_WAIT_TIME_LONG setbyte gBattleCommunication, 0x0 arenajudgmentwindow - pause WAIT_TIME_LONG + pause B_WAIT_TIME_LONG arenajudgmentwindow arenajudmengtstring 2 arenawaitmessage 2 @@ -4517,7 +4516,7 @@ BattleScript_ArenaDoJudgment:: arenajudgmentwindow various15 BS_ATTACKER printstring STRINGID_DEFEATEDOPPONENTBYREFEREE - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG playfaintcry BS_OPPONENT1 waitcry BS_ATTACKER dofaintanimation BS_OPPONENT1 @@ -4531,7 +4530,7 @@ BattleScript_ArenaJudgmentPlayerLoses: arenajudgmentwindow various15 BS_ATTACKER printstring STRINGID_LOSTTOOPPONENTBYREFEREE - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG playfaintcry BS_PLAYER1 waitcry BS_ATTACKER dofaintanimation BS_PLAYER1 @@ -4545,7 +4544,7 @@ BattleScript_ArenaJudgmentDraw: arenajudgmentwindow various15 BS_ATTACKER printstring STRINGID_TIEDOPPONENTBYREFEREE - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG playfaintcry BS_PLAYER1 waitcry BS_ATTACKER dofaintanimation BS_PLAYER1 @@ -4564,12 +4563,12 @@ BattleScript_AskIfWantsToForfeitMatch:: BattleScript_PrintPlayerForfeited:: printstring STRINGID_FORFEITEDMATCH - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG end2 BattleScript_PrintPlayerForfeitedLinkBattle:: printstring STRINGID_FORFEITEDMATCH - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG endlinkbattle - waitmessage WAIT_TIME_LONG + waitmessage B_WAIT_TIME_LONG end2 diff --git a/data/battle_scripts_2.s b/data/battle_scripts_2.s index caa6cddac..4b8ca0d87 100644 --- a/data/battle_scripts_2.s +++ b/data/battle_scripts_2.s @@ -69,16 +69,16 @@ BattleScript_PrintCaughtMonInfo:: trysetcaughtmondexflags BattleScript_TryNicknameCaughtMon printstring STRINGID_PKMNDATAADDEDTODEX waitstate - setbyte gBattleCommunication, 0x0 + setbyte gBattleCommunication, 0 displaydexinfo BattleScript_TryNicknameCaughtMon:: printstring STRINGID_GIVENICKNAMECAPTURED waitstate - setbyte gBattleCommunication, 0x0 + setbyte gBattleCommunication, 0 trygivecaughtmonnick BattleScript_GiveCaughtMonEnd givecaughtmon printfromtable gCaughtMonStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_SuccessBallThrowEnd BattleScript_GiveCaughtMonEnd:: givecaughtmon @@ -93,21 +93,21 @@ BattleScript_WallyBallThrow:: BattleScript_ShakeBallThrow:: printfromtable gBallEscapeStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG jumpifword CMP_NO_COMMON_BITS, gBattleTypeFlags, BATTLE_TYPE_SAFARI, BattleScript_ShakeBallThrowEnd jumpifbyte CMP_NOT_EQUAL, gNumSafariBalls, 0x0, BattleScript_ShakeBallThrowEnd printstring STRINGID_OUTOFSAFARIBALLS - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG setbyte gBattleOutcome, B_OUTCOME_NO_SAFARI_BALLS BattleScript_ShakeBallThrowEnd:: finishaction BattleScript_TrainerBallBlock:: - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG printstring STRINGID_TRAINERBLOCKEDBALL - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG printstring STRINGID_DONTBEATHIEF - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG finishaction BattleScript_PlayerUsesItem:: @@ -117,16 +117,16 @@ BattleScript_PlayerUsesItem:: BattleScript_OpponentUsesHealItem:: printstring STRINGID_EMPTYSTRING3 - pause 0x30 + pause B_WAIT_TIME_MED playse SE_USE_ITEM printstring STRINGID_TRAINER1USEDITEM - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG useitemonopponent orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER printstring STRINGID_PKMNSITEMRESTOREDHEALTH - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_ATTACKER setbyte sMOVEEND_STATE, 0xF moveend 0x1, 0x0 @@ -134,13 +134,13 @@ BattleScript_OpponentUsesHealItem:: BattleScript_OpponentUsesStatusCureItem:: printstring STRINGID_EMPTYSTRING3 - pause 0x30 + pause B_WAIT_TIME_MED playse SE_USE_ITEM printstring STRINGID_TRAINER1USEDITEM - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG useitemonopponent printfromtable gTrainerItemCuredStatusStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_ATTACKER setbyte sMOVEEND_STATE, 0xF moveend 0x1, 0x0 @@ -148,26 +148,26 @@ BattleScript_OpponentUsesStatusCureItem:: BattleScript_OpponentUsesXItem:: printstring STRINGID_EMPTYSTRING3 - pause 0x30 + pause B_WAIT_TIME_MED playse SE_USE_ITEM printstring STRINGID_TRAINER1USEDITEM - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG useitemonopponent printfromtable gStatUpStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG setbyte sMOVEEND_STATE, 0xF moveend 0x1, 0x0 finishaction BattleScript_OpponentUsesGuardSpecs:: printstring STRINGID_EMPTYSTRING3 - pause 0x30 + pause B_WAIT_TIME_MED playse SE_USE_ITEM printstring STRINGID_TRAINER1USEDITEM - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG useitemonopponent printfromtable gMistUsedStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG setbyte sMOVEEND_STATE, 0xF moveend 0x1, 0x0 finishaction @@ -179,29 +179,29 @@ BattleScript_RunByUsingItem:: BattleScript_ActionWatchesCarefully: printstring STRINGID_PKMNWATCHINGCAREFULLY - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG end2 BattleScript_ActionGetNear: printfromtable gSafariGetNearStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG end2 BattleScript_ActionThrowPokeblock: printstring STRINGID_THREWPOKEBLOCKATPKMN - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG playanimation BS_ATTACKER, B_ANIM_POKEBLOCK_THROW, NULL printfromtable gSafariPokeblockResultStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG end2 BattleScript_ActionWallyThrow: printstring STRINGID_RETURNMON - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG returnatktoball waitstate trainerslidein BS_TARGET waitstate printstring STRINGID_YOUTHROWABALLNOWRIGHT - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG end2 diff --git a/include/battle.h b/include/battle.h index 954d33b07..14ecfbdd3 100644 --- a/include/battle.h +++ b/include/battle.h @@ -40,16 +40,17 @@ #define MAX_TRAINER_ITEMS 4 // array entries for battle communication -#define MULTIUSE_STATE 0x0 -#define CURSOR_POSITION 0x1 -#define TASK_ID 0x1 // task Id and cursor position share the same field -#define SPRITES_INIT_STATE1 0x1 // shares the Id as well -#define SPRITES_INIT_STATE2 0x2 -#define MOVE_EFFECT_BYTE 0x3 -#define ACTIONS_CONFIRMED_COUNT 0x4 -#define MULTISTRING_CHOOSER 0x5 -#define MSG_DISPLAY 0x7 -#define BATTLE_COMMUNICATION_ENTRIES_COUNT 0x8 +#define MULTIUSE_STATE 0 +#define CURSOR_POSITION 1 +#define TASK_ID 1 // task Id and cursor position share the same field +#define SPRITES_INIT_STATE1 1 // shares the Id as well +#define SPRITES_INIT_STATE2 2 +#define MOVE_EFFECT_BYTE 3 +#define ACTIONS_CONFIRMED_COUNT 4 +#define MULTISTRING_CHOOSER 5 +#define MISS_TYPE 6 +#define MSG_DISPLAY 7 +#define BATTLE_COMMUNICATION_ENTRIES_COUNT 8 #define MOVE_TARGET_SELECTED 0x0 #define MOVE_TARGET_DEPENDS 0x1 diff --git a/include/battle_ai_switch_items.h b/include/battle_ai_switch_items.h index 0a230e7f6..db390346d 100644 --- a/include/battle_ai_switch_items.h +++ b/include/battle_ai_switch_items.h @@ -11,6 +11,26 @@ enum AI_ITEM_NOT_RECOGNIZABLE }; +enum { + AI_HEAL_CONFUSION, + AI_HEAL_PARALYSIS, + AI_HEAL_FREEZE, + AI_HEAL_BURN, + AI_HEAL_POISON, + AI_HEAL_SLEEP, +}; + +enum { + AI_X_ATTACK, + AI_X_DEFEND, + AI_X_SPEED, + AI_X_SPATK, + AI_X_SPDEF, // Unused + AI_X_ACCURACY, + AI_X_EVASION, // Unused + AI_DIRE_HIT, +}; + void AI_TrySwitchOrUseItem(void); u8 GetMostSuitableMonToSwitchInto(void); diff --git a/include/battle_message.h b/include/battle_message.h index 011a1cb0c..da3009d63 100644 --- a/include/battle_message.h +++ b/include/battle_message.h @@ -223,7 +223,6 @@ extern const u8* const gBattleStringsTable[]; extern const u8* const gStatNamesTable[]; extern const u8* const gPokeblockWasTooXStringTable[]; extern const u8* const gRefereeStringsTable[]; -extern const u8* const gStatNamesTable2[]; extern const u8 *const gRoundsStringTable[]; extern const u8 gText_PkmnIsEvolving[]; @@ -269,7 +268,7 @@ extern const u8 gText_Win[]; extern const u8 gText_Loss[]; extern const u8 gText_Draw[]; extern const u8 gText_StatRose[]; -extern const u8 gText_PkmnsStatChanged2[]; +extern const u8 gText_DefendersStatRose[]; extern const u8 gText_PkmnGettingPumped[]; extern const u8 gText_PkmnShroudedInMist[]; extern const u8 gText_PkmnsXPreventsSwitching[]; diff --git a/include/constants/battle.h b/include/constants/battle.h index e6ebc85e4..3dbd83255 100644 --- a/include/constants/battle.h +++ b/include/constants/battle.h @@ -302,4 +302,8 @@ #define BATTLE_TERRAIN_BUILDING 8 #define BATTLE_TERRAIN_PLAIN 9 +#define B_WAIT_TIME_LONG 64 +#define B_WAIT_TIME_MED 48 +#define B_WAIT_TIME_SHORT 32 + #endif // GUARD_CONSTANTS_BATTLE_H diff --git a/include/constants/battle_string_ids.h b/include/constants/battle_string_ids.h index f5b036b5d..f1c589fee 100644 --- a/include/constants/battle_string_ids.h +++ b/include/constants/battle_string_ids.h @@ -214,10 +214,10 @@ #define STRINGID_STATROSE 210 #define STRINGID_STATHARSHLY 211 #define STRINGID_STATFELL 212 -#define STRINGID_PKMNSSTATCHANGED 213 -#define STRINGID_PKMNSSTATCHANGED2 214 -#define STRINGID_PKMNSSTATCHANGED3 215 -#define STRINGID_PKMNSSTATCHANGED4 216 +#define STRINGID_ATTACKERSSTATROSE 213 +#define STRINGID_DEFENDERSSTATROSE 214 +#define STRINGID_ATTACKERSSTATFELL 215 +#define STRINGID_DEFENDERSSTATFELL 216 #define STRINGID_CRITICALHIT 217 #define STRINGID_ONEHITKO 218 #define STRINGID_123POOF 219 @@ -326,7 +326,7 @@ #define STRINGID_SOOTHINGAROMA 322 #define STRINGID_ITEMSCANTBEUSEDNOW 323 #define STRINGID_FORXCOMMAYZ 324 -#define STRINGID_USINGXTHEYOFZN 325 +#define STRINGID_USINGITEMSTATOFPKMNROSE 325 #define STRINGID_PKMNUSEDXTOGETPUMPED 326 #define STRINGID_PKMNSXMADEYUSELESS 327 #define STRINGID_PKMNTRAPPEDBYSANDTOMB 328 @@ -383,11 +383,207 @@ #define STRINGID_TRAINER1WINTEXT 379 #define STRINGID_TRAINER2WINTEXT 380 -// Indexes into gMissStringIds + +// The below IDs are all indexes into battle message tables, +// used to determine which of a set of messages to print. +// They are assigned to the MULTISTRING_CHOOSER byte of gBattleCommunication +// and read when e.g. the command printfromtable is used. + +// gStatUpStringIds +#define B_MSG_ATTACKER_STAT_ROSE 0 +#define B_MSG_DEFENDER_STAT_ROSE 1 +#define B_MSG_STAT_WONT_INCREASE 2 +#define B_MSG_STAT_ROSE_EMPTY 3 +#define B_MSG_STAT_ROSE_ITEM 4 +#define B_MSG_USED_DIRE_HIT 5 + +// gStatDownStringIds +#define B_MSG_ATTACKER_STAT_FELL 0 +#define B_MSG_DEFENDER_STAT_FELL 1 +#define B_MSG_STAT_WONT_DECREASE 2 +#define B_MSG_STAT_FELL_EMPTY 3 + +// gMissStringIds #define B_MSG_MISSED 0 #define B_MSG_PROTECTED 1 #define B_MSG_AVOIDED_ATK 2 #define B_MSG_AVOIDED_DMG 3 #define B_MSG_GROUND_MISS 4 +// gAbsorbDrainStringIds +#define B_MSG_ABSORB 0 +#define B_MSG_ABSORB_OOZE 1 + +// gLeechSeedStringIds +#define B_MSG_LEECH_SEED_SET 0 +#define B_MSG_LEECH_SEED_MISS 1 +#define B_MSG_LEECH_SEED_FAIL 2 +#define B_MSG_LEECH_SEED_DRAIN 3 +#define B_MSG_LEECH_SEED_OOZE 4 + +// gBattlePalaceFlavorTextTable +#define B_MSG_GLINT_IN_EYE 0 +#define B_MSG_GETTING_IN_POS 1 +#define B_MSG_GROWL_DEEPLY 2 +#define B_MSG_EAGER_FOR_MORE 3 + +// gFirstTurnOfTwoStringIds +#define B_MSG_TURN1_RAZOR_WIND 0 +#define B_MSG_TURN1_SOLAR_BEAM 1 +#define B_MSG_TURN1_SKULL_BASH 2 +#define B_MSG_TURN1_SKY_ATTACK 3 +#define B_MSG_TURN1_FLY 4 +#define B_MSG_TURN1_DIG 5 +#define B_MSG_TURN1_DIVE 6 +#define B_MSG_TURN1_BOUNCE 7 + +// gMoveWeatherChangeStringIds +#define B_MSG_STARTED_RAIN 0 +#define B_MSG_STARTED_DOWNPOUR 1 +#define B_MSG_WEATHER_FAILED 2 +#define B_MSG_STARTED_SANDSTORM 3 +#define B_MSG_STARTED_SUNLIGHT 4 +#define B_MSG_STARTED_HAIL 5 + +// gRainContinuesStringIds +#define B_MSG_RAIN_CONTINUES 0 +#define B_MSG_DOWNPOUR_CONTINUES 1 +#define B_MSG_RAIN_STOPPED 2 + +// gSandStormHailContinuesStringIds / gSandStormHailDmgStringIds/ gSandStormHailEndStringIds +#define B_MSG_SANDSTORM 0 +#define B_MSG_HAIL 1 + +// gReflectLightScreenSafeguardStringIds +#define B_MSG_SIDE_STATUS_FAILED 0 +#define B_MSG_SET_REFLECT_SINGLE 1 +#define B_MSG_SET_REFLECT_DOUBLE 2 +#define B_MSG_SET_LIGHTSCREEN_SINGLE 3 +#define B_MSG_SET_LIGHTSCREEN_DOUBLE 4 +#define B_MSG_SET_SAFEGUARD 5 + +// gProtectLikeUsedStringIds +#define B_MSG_PROTECTED_ITSELF 0 +#define B_MSG_BRACED_ITSELF 1 +#define B_MSG_PROTECT_FAILED 2 + +// gRestUsedStringIds +#define B_MSG_REST 0 +#define B_MSG_REST_STATUSED 1 + +// gWokeUpStringIds +#define B_MSG_WOKE_UP 0 +#define B_MSG_WOKE_UP_UPROAR 1 + +// gUproarAwakeStringIds +#define B_MSG_CANT_SLEEP_UPROAR 0 +#define B_MSG_UPROAR_KEPT_AWAKE 1 +#define B_MSG_STAYED_AWAKE_USING 2 + +// gUproarOverTurnStringIds +#define B_MSG_UPROAR_CONTINUES 0 +#define B_MSG_UPROAR_ENDS 1 + +// gStockpileUsedStringIds +#define B_MSG_STOCKPILED 0 +#define B_MSG_CANT_STOCKPILE 1 + +// gSwallowFailStringIds +#define B_MSG_SWALLOW_FAILED 0 +#define B_MSG_SWALLOW_FULL_HP 1 + +// gKOFailedStringIds +#define B_MSG_KO_MISS 0 +#define B_MSG_KO_UNAFFECTED 1 + +// gMistUsedStringIds +#define B_MSG_SET_MIST 0 +#define B_MSG_MIST_FAILED 1 + +// gFocusEnergyUsedStringIds +#define B_MSG_GETTING_PUMPED 0 +#define B_MSG_FOCUS_ENERGY_FAILED 1 + +// gTransformUsedStringIds +#define B_MSG_TRANSFORMED 0 +#define B_MSG_TRANSFORM_FAILED 1 + +// gSubsituteUsedStringIds +#define B_MSG_SET_SUBSTITUTE 0 +#define B_MSG_SUBSTITUTE_FAILED 1 + +// gPartyStatusHealStringIds +#define B_MSG_BELL 0 +#define B_MSG_BELL_SOUNDPROOF_ATTACKER 1 +#define B_MSG_BELL_SOUNDPROOF_PARTNER 2 +#define B_MSG_BELL_BOTH_SOUNDPROOF 3 +#define B_MSG_SOOTHING_AROMA 4 + +// gFutureMoveUsedStringIds +#define B_MSG_FUTURE_SIGHT 0 +#define B_MSG_DOOM_DESIRE 1 + +// gItemSwapStringIds +#define B_MSG_ITEM_SWAP_TAKEN 0 +#define B_MSG_ITEM_SWAP_GIVEN 1 +#define B_MSG_ITEM_SWAP_BOTH 2 + +// gSportsUsedStringIds +#define B_MSG_WEAKEN_ELECTRIC 0 +#define B_MSG_WEAKEN_FIRE 1 + +// gCaughtMonStringIds +#define B_MSG_SENT_SOMEONES_PC 0 +#define B_MSG_SENT_LANETTES_PC 1 +#define B_MSG_SOMEONES_BOX_FULL 2 +#define B_MSG_LANETTES_BOX_FULL 3 + +// gInobedientStringIds +#define B_MSG_LOAFING 0 +#define B_MSG_WONT_OBEY 1 +#define B_MSG_TURNED_AWAY 2 +#define B_MSG_PRETEND_NOT_NOTICE 3 +#define B_MSG_INCAPABLE_OF_POWER 4 +// For randomly selecting a disobey string +// Skips the one used for Battle Palace +#define NUM_LOAF_STRINGS 4 + +// gSafariGetNearStringIds +#define B_MSG_CREPT_CLOSER 0 +#define B_MSG_CANT_GET_CLOSER 1 + +// gSafariPokeblockResultStringIds +#define B_MSG_MON_CURIOUS 0 +#define B_MSG_MON_ENTHRALLED 1 +#define B_MSG_MON_IGNORED 2 + +// gFlashFireStringIds +#define B_MSG_FLASH_FIRE_BOOST 0 +#define B_MSG_FLASH_FIRE_NO_BOOST 1 + +// gBerryEffectStringIds +#define B_MSG_CURED_PROBLEM 0 +#define B_MSG_NORMALIZED_STATUS 1 + +// gNoEscapeStringIds +#define B_MSG_CANT_ESCAPE 0 +#define B_MSG_DONT_LEAVE_BIRCH 1 +#define B_MSG_PREVENTS_ESCAPE 2 +#define B_MSG_CANT_ESCAPE_2 3 +#define B_MSG_ATTACKER_CANT_ESCAPE 4 + +// gGotPoisonedStringIds / gGotParalyzedStringIds / gFellAsleepStringIds +// gGotBurnedStringIds / gGotFrozenStringIds / gAttractUsedStringIds +#define B_MSG_STATUSED 0 +#define B_MSG_STATUSED_BY_ABILITY 1 + +// gBRNPreventionStringIds / gPRLZPreventionStringIds / gPSNPreventionStringIds +#define B_MSG_ABILITY_PREVENTS_MOVE_STATUS 0 +#define B_MSG_ABILITY_PREVENTS_ABILITY_STATUS 1 +#define B_MSG_STATUS_HAD_NO_EFFECT 2 + +// gGotDefrostedStringIds +#define B_MSG_DEFROSTED 0 +#define B_MSG_DEFROSTED_BY_MOVE 1 + #endif // GUARD_CONSTANTS_BATTLE_STRING_IDS_H diff --git a/src/battle_ai_switch_items.c b/src/battle_ai_switch_items.c index 263c1e7cc..e92630808 100644 --- a/src/battle_ai_switch_items.c +++ b/src/battle_ai_switch_items.c @@ -863,32 +863,33 @@ static bool8 ShouldUseItem(void) *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) = 0; if (itemEffects[3] & ITEM3_SLEEP && gBattleMons[gActiveBattler].status1 & STATUS1_SLEEP) { - *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x20; + *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_HEAL_SLEEP); shouldUse = TRUE; } - if (itemEffects[3] & ITEM3_POISON && (gBattleMons[gActiveBattler].status1 & STATUS1_POISON || gBattleMons[gActiveBattler].status1 & STATUS1_TOXIC_POISON)) + if (itemEffects[3] & ITEM3_POISON && (gBattleMons[gActiveBattler].status1 & STATUS1_POISON + || gBattleMons[gActiveBattler].status1 & STATUS1_TOXIC_POISON)) { - *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x10; + *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_HEAL_POISON); shouldUse = TRUE; } if (itemEffects[3] & ITEM3_BURN && gBattleMons[gActiveBattler].status1 & STATUS1_BURN) { - *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x8; + *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_HEAL_BURN); shouldUse = TRUE; } if (itemEffects[3] & ITEM3_FREEZE && gBattleMons[gActiveBattler].status1 & STATUS1_FREEZE) { - *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x4; + *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_HEAL_FREEZE); shouldUse = TRUE; } if (itemEffects[3] & ITEM3_PARALYSIS && gBattleMons[gActiveBattler].status1 & STATUS1_PARALYSIS) { - *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x2; + *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_HEAL_PARALYSIS); shouldUse = TRUE; } if (itemEffects[3] & ITEM3_CONFUSION && gBattleMons[gActiveBattler].status2 & STATUS2_CONFUSION) { - *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x1; + *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_HEAL_CONFUSION); shouldUse = TRUE; } break; @@ -897,17 +898,17 @@ static bool8 ShouldUseItem(void) if (gDisableStructs[gActiveBattler].isFirstTurn == 0) break; if (itemEffects[0] & ITEM0_X_ATTACK) - *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x1; + *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_X_ATTACK); if (itemEffects[1] & ITEM1_X_DEFEND) - *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x2; + *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_X_DEFEND); if (itemEffects[1] & ITEM1_X_SPEED) - *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x4; + *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_X_SPEED); if (itemEffects[2] & ITEM2_X_SPATK) - *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x8; + *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_X_SPATK); if (itemEffects[2] & ITEM2_X_ACCURACY) - *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x20; + *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_X_ACCURACY); if (itemEffects[0] & ITEM0_DIRE_HIT) - *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x80; + *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_DIRE_HIT); shouldUse = TRUE; break; case AI_ITEM_GUARD_SPECS: diff --git a/src/battle_main.c b/src/battle_main.c index 9bb2268a6..8a85c27f5 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -3959,7 +3959,7 @@ u8 IsRunningFromBattleImpossible(void) { gBattleScripting.battler = i; gLastUsedAbility = gBattleMons[i].ability; - gBattleCommunication[MULTISTRING_CHOOSER] = 2; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_PREVENTS_ESCAPE; return 2; } if (side != GetBattlerSide(i) @@ -3969,7 +3969,7 @@ u8 IsRunningFromBattleImpossible(void) { gBattleScripting.battler = i; gLastUsedAbility = gBattleMons[i].ability; - gBattleCommunication[MULTISTRING_CHOOSER] = 2; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_PREVENTS_ESCAPE; return 2; } } @@ -3978,18 +3978,18 @@ u8 IsRunningFromBattleImpossible(void) { gBattleScripting.battler = i - 1; gLastUsedAbility = gBattleMons[i - 1].ability; - gBattleCommunication[MULTISTRING_CHOOSER] = 2; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_PREVENTS_ESCAPE; return 2; } if ((gBattleMons[gActiveBattler].status2 & (STATUS2_ESCAPE_PREVENTION | STATUS2_WRAPPED)) || (gStatuses3[gActiveBattler] & STATUS3_ROOTED)) { - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_CANT_ESCAPE; return 1; } if (gBattleTypeFlags & BATTLE_TYPE_FIRST_BATTLE) { - gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_DONT_LEAVE_BIRCH; return 1; } return 0; diff --git a/src/battle_message.c b/src/battle_message.c index 5f088dded..4f219c063 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -305,11 +305,11 @@ static const u8 sText_StatSharply[] = _("sharply "); const u8 gText_StatRose[] = _("rose!"); static const u8 sText_StatHarshly[] = _("harshly "); static const u8 sText_StatFell[] = _("fell!"); -static const u8 sText_PkmnsStatChanged[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_BUFF1}\n{B_BUFF2}"); -const u8 gText_PkmnsStatChanged2[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_BUFF1}\n{B_BUFF2}"); -static const u8 sText_UsingXTheYOfZN[] = _("Using {B_LAST_ITEM}, the {B_BUFF1}\nof {B_SCR_ACTIVE_NAME_WITH_PREFIX} {B_BUFF2}"); -static const u8 sText_PkmnsStatChanged3[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_BUFF1}\n{B_BUFF2}"); -static const u8 sText_PkmnsStatChanged4[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_BUFF1}\n{B_BUFF2}"); +static const u8 sText_AttackersStatRose[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_BUFF1}\n{B_BUFF2}"); +const u8 gText_DefendersStatRose[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_BUFF1}\n{B_BUFF2}"); +static const u8 sText_UsingItemTheStatOfPkmnRose[] = _("Using {B_LAST_ITEM}, the {B_BUFF1}\nof {B_SCR_ACTIVE_NAME_WITH_PREFIX} {B_BUFF2}"); +static const u8 sText_AttackersStatFell[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_BUFF1}\n{B_BUFF2}"); +static const u8 sText_DefendersStatFell[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_BUFF1}\n{B_BUFF2}"); static const u8 sText_StatsWontIncrease2[] = _("{B_ATK_NAME_WITH_PREFIX}'s stats won't\ngo any higher!"); static const u8 sText_StatsWontDecrease2[] = _("{B_DEF_NAME_WITH_PREFIX}'s stats won't\ngo any lower!"); static const u8 sText_CriticalHit[] = _("A critical hit!"); @@ -721,10 +721,10 @@ const u8 * const gBattleStringsTable[BATTLESTRINGS_COUNT] = [STRINGID_STATROSE - 12] = gText_StatRose, [STRINGID_STATHARSHLY - 12] = sText_StatHarshly, [STRINGID_STATFELL - 12] = sText_StatFell, - [STRINGID_PKMNSSTATCHANGED - 12] = sText_PkmnsStatChanged, - [STRINGID_PKMNSSTATCHANGED2 - 12] = gText_PkmnsStatChanged2, - [STRINGID_PKMNSSTATCHANGED3 - 12] = sText_PkmnsStatChanged3, - [STRINGID_PKMNSSTATCHANGED4 - 12] = sText_PkmnsStatChanged4, + [STRINGID_ATTACKERSSTATROSE - 12] = sText_AttackersStatRose, + [STRINGID_DEFENDERSSTATROSE - 12] = gText_DefendersStatRose, + [STRINGID_ATTACKERSSTATFELL - 12] = sText_AttackersStatFell, + [STRINGID_DEFENDERSSTATFELL - 12] = sText_DefendersStatFell, [STRINGID_CRITICALHIT - 12] = sText_CriticalHit, [STRINGID_ONEHITKO - 12] = sText_OneHitKO, [STRINGID_123POOF - 12] = sText_123Poof, @@ -833,7 +833,7 @@ const u8 * const gBattleStringsTable[BATTLESTRINGS_COUNT] = [STRINGID_SOOTHINGAROMA - 12] = sText_SoothingAroma, [STRINGID_ITEMSCANTBEUSEDNOW - 12] = sText_ItemsCantBeUsedNow, [STRINGID_FORXCOMMAYZ - 12] = sText_ForXCommaYZ, - [STRINGID_USINGXTHEYOFZN - 12] = sText_UsingXTheYOfZN, + [STRINGID_USINGITEMSTATOFPKMNROSE - 12] = sText_UsingItemTheStatOfPkmnRose, [STRINGID_PKMNUSEDXTOGETPUMPED - 12] = sText_PkmnUsedXToGetPumped, [STRINGID_PKMNSXMADEYUSELESS - 12] = sText_PkmnsXMadeYUseless, [STRINGID_PKMNTRAPPEDBYSANDTOMB - 12] = sText_PkmnTrappedBySandTomb, @@ -902,105 +902,140 @@ const u16 gMissStringIds[] = const u16 gNoEscapeStringIds[] = { - STRINGID_CANTESCAPE, STRINGID_DONTLEAVEBIRCH, STRINGID_PREVENTSESCAPE, - STRINGID_CANTESCAPE2, STRINGID_ATTACKERCANTESCAPE + [B_MSG_CANT_ESCAPE] = STRINGID_CANTESCAPE, + [B_MSG_DONT_LEAVE_BIRCH] = STRINGID_DONTLEAVEBIRCH, + [B_MSG_PREVENTS_ESCAPE] = STRINGID_PREVENTSESCAPE, + [B_MSG_CANT_ESCAPE_2] = STRINGID_CANTESCAPE2, + [B_MSG_ATTACKER_CANT_ESCAPE] = STRINGID_ATTACKERCANTESCAPE }; const u16 gMoveWeatherChangeStringIds[] = { - STRINGID_STARTEDTORAIN, STRINGID_DOWNPOURSTARTED, STRINGID_BUTITFAILED, - STRINGID_SANDSTORMBREWED, STRINGID_SUNLIGHTGOTBRIGHT, STRINGID_STARTEDHAIL + [B_MSG_STARTED_RAIN] = STRINGID_STARTEDTORAIN, + [B_MSG_STARTED_DOWNPOUR] = STRINGID_DOWNPOURSTARTED, // Unused + [B_MSG_WEATHER_FAILED] = STRINGID_BUTITFAILED, + [B_MSG_STARTED_SANDSTORM] = STRINGID_SANDSTORMBREWED, + [B_MSG_STARTED_SUNLIGHT] = STRINGID_SUNLIGHTGOTBRIGHT, + [B_MSG_STARTED_HAIL] = STRINGID_STARTEDHAIL, }; const u16 gSandStormHailContinuesStringIds[] = { - STRINGID_SANDSTORMRAGES, STRINGID_HAILCONTINUES + [B_MSG_SANDSTORM] = STRINGID_SANDSTORMRAGES, + [B_MSG_HAIL] = STRINGID_HAILCONTINUES }; const u16 gSandStormHailDmgStringIds[] = { - STRINGID_PKMNBUFFETEDBYSANDSTORM, STRINGID_PKMNPELTEDBYHAIL + [B_MSG_SANDSTORM] = STRINGID_PKMNBUFFETEDBYSANDSTORM, + [B_MSG_HAIL] = STRINGID_PKMNPELTEDBYHAIL }; const u16 gSandStormHailEndStringIds[] = { - STRINGID_SANDSTORMSUBSIDED, STRINGID_HAILSTOPPED + [B_MSG_SANDSTORM] = STRINGID_SANDSTORMSUBSIDED, + [B_MSG_HAIL] = STRINGID_HAILSTOPPED }; const u16 gRainContinuesStringIds[] = { - STRINGID_RAINCONTINUES, STRINGID_DOWNPOURCONTINUES, STRINGID_RAINSTOPPED + [B_MSG_RAIN_CONTINUES] = STRINGID_RAINCONTINUES, + [B_MSG_DOWNPOUR_CONTINUES] = STRINGID_DOWNPOURCONTINUES, + [B_MSG_RAIN_STOPPED] = STRINGID_RAINSTOPPED }; const u16 gProtectLikeUsedStringIds[] = { - STRINGID_PKMNPROTECTEDITSELF2, STRINGID_PKMNBRACEDITSELF, STRINGID_BUTITFAILED + [B_MSG_PROTECTED_ITSELF] = STRINGID_PKMNPROTECTEDITSELF2, + [B_MSG_BRACED_ITSELF] = STRINGID_PKMNBRACEDITSELF, + [B_MSG_PROTECT_FAILED] = STRINGID_BUTITFAILED, }; const u16 gReflectLightScreenSafeguardStringIds[] = { - STRINGID_BUTITFAILED, STRINGID_PKMNRAISEDDEF, STRINGID_PKMNRAISEDDEFALITTLE, - STRINGID_PKMNRAISEDSPDEF, STRINGID_PKMNRAISEDSPDEFALITTLE, STRINGID_PKMNCOVEREDBYVEIL + [B_MSG_SIDE_STATUS_FAILED] = STRINGID_BUTITFAILED, + [B_MSG_SET_REFLECT_SINGLE] = STRINGID_PKMNRAISEDDEF, + [B_MSG_SET_REFLECT_DOUBLE] = STRINGID_PKMNRAISEDDEFALITTLE, + [B_MSG_SET_LIGHTSCREEN_SINGLE] = STRINGID_PKMNRAISEDSPDEF, + [B_MSG_SET_LIGHTSCREEN_DOUBLE] = STRINGID_PKMNRAISEDSPDEFALITTLE, + [B_MSG_SET_SAFEGUARD] = STRINGID_PKMNCOVEREDBYVEIL, }; const u16 gLeechSeedStringIds[] = { - STRINGID_PKMNSEEDED, STRINGID_PKMNEVADEDATTACK, - STRINGID_ITDOESNTAFFECT, STRINGID_PKMNSAPPEDBYLEECHSEED, STRINGID_ITSUCKEDLIQUIDOOZE, + [B_MSG_LEECH_SEED_SET] = STRINGID_PKMNSEEDED, + [B_MSG_LEECH_SEED_MISS] = STRINGID_PKMNEVADEDATTACK, + [B_MSG_LEECH_SEED_FAIL] = STRINGID_ITDOESNTAFFECT, + [B_MSG_LEECH_SEED_DRAIN] = STRINGID_PKMNSAPPEDBYLEECHSEED, + [B_MSG_LEECH_SEED_OOZE] = STRINGID_ITSUCKEDLIQUIDOOZE, }; const u16 gRestUsedStringIds[] = { - STRINGID_PKMNWENTTOSLEEP, STRINGID_PKMNSLEPTHEALTHY + [B_MSG_REST] = STRINGID_PKMNWENTTOSLEEP, + [B_MSG_REST_STATUSED] = STRINGID_PKMNSLEPTHEALTHY }; const u16 gUproarOverTurnStringIds[] = { - STRINGID_PKMNMAKINGUPROAR, STRINGID_PKMNCALMEDDOWN + [B_MSG_UPROAR_CONTINUES] = STRINGID_PKMNMAKINGUPROAR, + [B_MSG_UPROAR_ENDS] = STRINGID_PKMNCALMEDDOWN }; const u16 gStockpileUsedStringIds[] = { - STRINGID_PKMNSTOCKPILED, STRINGID_PKMNCANTSTOCKPILE, + [B_MSG_STOCKPILED] = STRINGID_PKMNSTOCKPILED, + [B_MSG_CANT_STOCKPILE] = STRINGID_PKMNCANTSTOCKPILE, }; const u16 gWokeUpStringIds[] = { - STRINGID_PKMNWOKEUP, STRINGID_PKMNWOKEUPINUPROAR + [B_MSG_WOKE_UP] = STRINGID_PKMNWOKEUP, + [B_MSG_WOKE_UP_UPROAR] = STRINGID_PKMNWOKEUPINUPROAR }; const u16 gSwallowFailStringIds[] = { - STRINGID_FAILEDTOSWALLOW, STRINGID_PKMNHPFULL + [B_MSG_SWALLOW_FAILED] = STRINGID_FAILEDTOSWALLOW, + [B_MSG_SWALLOW_FULL_HP] = STRINGID_PKMNHPFULL }; const u16 gUproarAwakeStringIds[] = { - STRINGID_PKMNCANTSLEEPINUPROAR2, STRINGID_UPROARKEPTPKMNAWAKE, STRINGID_PKMNSTAYEDAWAKEUSING + [B_MSG_CANT_SLEEP_UPROAR] = STRINGID_PKMNCANTSLEEPINUPROAR2, + [B_MSG_UPROAR_KEPT_AWAKE] = STRINGID_UPROARKEPTPKMNAWAKE, + [B_MSG_STAYED_AWAKE_USING] = STRINGID_PKMNSTAYEDAWAKEUSING, }; const u16 gStatUpStringIds[] = { - STRINGID_PKMNSSTATCHANGED, STRINGID_PKMNSSTATCHANGED2, STRINGID_STATSWONTINCREASE, - STRINGID_EMPTYSTRING3, STRINGID_USINGXTHEYOFZN, STRINGID_PKMNUSEDXTOGETPUMPED + [B_MSG_ATTACKER_STAT_ROSE] = STRINGID_ATTACKERSSTATROSE, + [B_MSG_DEFENDER_STAT_ROSE] = STRINGID_DEFENDERSSTATROSE, + [B_MSG_STAT_WONT_INCREASE] = STRINGID_STATSWONTINCREASE, + [B_MSG_STAT_ROSE_EMPTY] = STRINGID_EMPTYSTRING3, + [B_MSG_STAT_ROSE_ITEM] = STRINGID_USINGITEMSTATOFPKMNROSE, + [B_MSG_USED_DIRE_HIT] = STRINGID_PKMNUSEDXTOGETPUMPED, }; const u16 gStatDownStringIds[] = { - STRINGID_PKMNSSTATCHANGED3, STRINGID_PKMNSSTATCHANGED4, STRINGID_STATSWONTDECREASE, STRINGID_EMPTYSTRING3 + [B_MSG_ATTACKER_STAT_FELL] = STRINGID_ATTACKERSSTATFELL, + [B_MSG_DEFENDER_STAT_FELL] = STRINGID_DEFENDERSSTATFELL, + [B_MSG_STAT_WONT_DECREASE] = STRINGID_STATSWONTDECREASE, + [B_MSG_STAT_FELL_EMPTY] = STRINGID_EMPTYSTRING3, }; // Index read from sTWOTURN_STRINGID const u16 gFirstTurnOfTwoStringIds[] = { - STRINGID_PKMNWHIPPEDWHIRLWIND, // MOVE_RAZOR_WIND - STRINGID_PKMNTOOKSUNLIGHT, // MOVE_SOLAR_BEAM - STRINGID_PKMNLOWEREDHEAD, // MOVE_SKULL_BASH - STRINGID_PKMNISGLOWING, // MOVE_SKY_ATTACK - STRINGID_PKMNFLEWHIGH, // MOVE_FLY - STRINGID_PKMNDUGHOLE, // MOVE_DIG - STRINGID_PKMNHIDUNDERWATER, // MOVE_DIVE - STRINGID_PKMNSPRANGUP // MOVE_BOUNCE + [B_MSG_TURN1_RAZOR_WIND] = STRINGID_PKMNWHIPPEDWHIRLWIND, + [B_MSG_TURN1_SOLAR_BEAM] = STRINGID_PKMNTOOKSUNLIGHT, + [B_MSG_TURN1_SKULL_BASH] = STRINGID_PKMNLOWEREDHEAD, + [B_MSG_TURN1_SKY_ATTACK] = STRINGID_PKMNISGLOWING, + [B_MSG_TURN1_FLY] = STRINGID_PKMNFLEWHIGH, + [B_MSG_TURN1_DIG] = STRINGID_PKMNDUGHOLE, + [B_MSG_TURN1_DIVE] = STRINGID_PKMNHIDUNDERWATER, + [B_MSG_TURN1_BOUNCE] = STRINGID_PKMNSPRANGUP, }; // Index copied from move's index in gTrappingMoves @@ -1016,89 +1051,109 @@ const u16 gWrappedStringIds[] = const u16 gMistUsedStringIds[] = { - STRINGID_PKMNSHROUDEDINMIST, STRINGID_BUTITFAILED + [B_MSG_SET_MIST] = STRINGID_PKMNSHROUDEDINMIST, + [B_MSG_MIST_FAILED] = STRINGID_BUTITFAILED }; const u16 gFocusEnergyUsedStringIds[] = { - STRINGID_PKMNGETTINGPUMPED, STRINGID_BUTITFAILED + [B_MSG_GETTING_PUMPED] = STRINGID_PKMNGETTINGPUMPED, + [B_MSG_FOCUS_ENERGY_FAILED] = STRINGID_BUTITFAILED }; const u16 gTransformUsedStringIds[] = { - STRINGID_PKMNTRANSFORMEDINTO, STRINGID_BUTITFAILED + [B_MSG_TRANSFORMED] = STRINGID_PKMNTRANSFORMEDINTO, + [B_MSG_TRANSFORM_FAILED] = STRINGID_BUTITFAILED }; const u16 gSubsituteUsedStringIds[] = { - STRINGID_PKMNMADESUBSTITUTE, STRINGID_TOOWEAKFORSUBSTITUTE + [B_MSG_SET_SUBSTITUTE] = STRINGID_PKMNMADESUBSTITUTE, + [B_MSG_SUBSTITUTE_FAILED] = STRINGID_TOOWEAKFORSUBSTITUTE }; const u16 gGotPoisonedStringIds[] = { - STRINGID_PKMNWASPOISONED, STRINGID_PKMNPOISONEDBY + [B_MSG_STATUSED] = STRINGID_PKMNWASPOISONED, + [B_MSG_STATUSED_BY_ABILITY] = STRINGID_PKMNPOISONEDBY }; const u16 gGotParalyzedStringIds[] = { - STRINGID_PKMNWASPARALYZED, STRINGID_PKMNWASPARALYZEDBY + [B_MSG_STATUSED] = STRINGID_PKMNWASPARALYZED, + [B_MSG_STATUSED_BY_ABILITY] = STRINGID_PKMNWASPARALYZEDBY }; const u16 gFellAsleepStringIds[] = { - STRINGID_PKMNFELLASLEEP, STRINGID_PKMNMADESLEEP, + [B_MSG_STATUSED] = STRINGID_PKMNFELLASLEEP, + [B_MSG_STATUSED_BY_ABILITY] = STRINGID_PKMNMADESLEEP, }; const u16 gGotBurnedStringIds[] = { - STRINGID_PKMNWASBURNED, STRINGID_PKMNBURNEDBY + [B_MSG_STATUSED] = STRINGID_PKMNWASBURNED, + [B_MSG_STATUSED_BY_ABILITY] = STRINGID_PKMNBURNEDBY }; const u16 gGotFrozenStringIds[] = { - STRINGID_PKMNWASFROZEN, STRINGID_PKMNFROZENBY + [B_MSG_STATUSED] = STRINGID_PKMNWASFROZEN, + [B_MSG_STATUSED_BY_ABILITY] = STRINGID_PKMNFROZENBY }; const u16 gGotDefrostedStringIds[] = { - STRINGID_PKMNWASDEFROSTED2, STRINGID_PKMNWASDEFROSTEDBY + [B_MSG_DEFROSTED] = STRINGID_PKMNWASDEFROSTED2, + [B_MSG_DEFROSTED_BY_MOVE] = STRINGID_PKMNWASDEFROSTEDBY }; const u16 gKOFailedStringIds[] = { - STRINGID_ATTACKMISSED, STRINGID_PKMNUNAFFECTED + [B_MSG_KO_MISS] = STRINGID_ATTACKMISSED, + [B_MSG_KO_UNAFFECTED] = STRINGID_PKMNUNAFFECTED }; const u16 gAttractUsedStringIds[] = { - STRINGID_PKMNFELLINLOVE, STRINGID_PKMNSXINFATUATEDY + [B_MSG_STATUSED] = STRINGID_PKMNFELLINLOVE, + [B_MSG_STATUSED_BY_ABILITY] = STRINGID_PKMNSXINFATUATEDY }; -const u16 gLeechSeedDrainStringIds[] = +const u16 gAbsorbDrainStringIds[] = { - STRINGID_PKMNENERGYDRAINED, STRINGID_ITSUCKEDLIQUIDOOZE + [B_MSG_ABSORB] = STRINGID_PKMNENERGYDRAINED, + [B_MSG_ABSORB_OOZE] = STRINGID_ITSUCKEDLIQUIDOOZE }; const u16 gSportsUsedStringIds[] = { - STRINGID_ELECTRICITYWEAKENED, STRINGID_FIREWEAKENED + [B_MSG_WEAKEN_ELECTRIC] = STRINGID_ELECTRICITYWEAKENED, + [B_MSG_WEAKEN_FIRE] = STRINGID_FIREWEAKENED }; const u16 gPartyStatusHealStringIds[] = { - STRINGID_BELLCHIMED, STRINGID_BELLCHIMED, STRINGID_BELLCHIMED, STRINGID_BELLCHIMED, - // interesting how there are four instances of the same string - STRINGID_SOOTHINGAROMA + [B_MSG_BELL] = STRINGID_BELLCHIMED, + [B_MSG_BELL_SOUNDPROOF_ATTACKER] = STRINGID_BELLCHIMED, + [B_MSG_BELL_SOUNDPROOF_PARTNER] = STRINGID_BELLCHIMED, + [B_MSG_BELL_BOTH_SOUNDPROOF] = STRINGID_BELLCHIMED, + [B_MSG_SOOTHING_AROMA] = STRINGID_SOOTHINGAROMA }; const u16 gFutureMoveUsedStringIds[] = { - STRINGID_PKMNFORESAWATTACK, STRINGID_PKMNCHOSEXASDESTINY + [B_MSG_FUTURE_SIGHT] = STRINGID_PKMNFORESAWATTACK, + [B_MSG_DOOM_DESIRE] = STRINGID_PKMNCHOSEXASDESTINY }; const u16 gBallEscapeStringIds[] = { - STRINGID_PKMNBROKEFREE, STRINGID_ITAPPEAREDCAUGHT, STRINGID_AARGHALMOSTHADIT, STRINGID_SHOOTSOCLOSE + [BALL_NO_SHAKES] = STRINGID_PKMNBROKEFREE, + [BALL_1_SHAKE] = STRINGID_ITAPPEAREDCAUGHT, + [BALL_2_SHAKES] = STRINGID_AARGHALMOSTHADIT, + [BALL_3_SHAKES_FAIL] = STRINGID_SHOOTSOCLOSE }; // Overworld weathers that don't have an associated battle weather default to "It is raining." @@ -1124,59 +1179,82 @@ const u16 gWeatherStartsStringIds[] = const u16 gInobedientStringIds[] = { - STRINGID_PKMNLOAFING, STRINGID_PKMNWONTOBEY, STRINGID_PKMNTURNEDAWAY, - STRINGID_PKMNPRETENDNOTNOTICE, STRINGID_PKMNINCAPABLEOFPOWER + [B_MSG_LOAFING] = STRINGID_PKMNLOAFING, + [B_MSG_WONT_OBEY] = STRINGID_PKMNWONTOBEY, + [B_MSG_TURNED_AWAY] = STRINGID_PKMNTURNEDAWAY, + [B_MSG_PRETEND_NOT_NOTICE] = STRINGID_PKMNPRETENDNOTNOTICE, + [B_MSG_INCAPABLE_OF_POWER] = STRINGID_PKMNINCAPABLEOFPOWER }; const u16 gSafariGetNearStringIds[] = { - STRINGID_CREPTCLOSER, STRINGID_CANTGETCLOSER + [B_MSG_CREPT_CLOSER] = STRINGID_CREPTCLOSER, + [B_MSG_CANT_GET_CLOSER] = STRINGID_CANTGETCLOSER }; const u16 gSafariPokeblockResultStringIds[] = { - STRINGID_PKMNCURIOUSABOUTX, STRINGID_PKMNENTHRALLEDBYX, STRINGID_PKMNIGNOREDX + [B_MSG_MON_CURIOUS] = STRINGID_PKMNCURIOUSABOUTX, + [B_MSG_MON_ENTHRALLED] = STRINGID_PKMNENTHRALLEDBYX, + [B_MSG_MON_IGNORED] = STRINGID_PKMNIGNOREDX }; const u16 gTrainerItemCuredStatusStringIds[] = { - STRINGID_PKMNSITEMSNAPPEDOUT, STRINGID_PKMNSITEMCUREDPARALYSIS, STRINGID_PKMNSITEMDEFROSTEDIT, - STRINGID_PKMNSITEMHEALEDBURN, STRINGID_PKMNSITEMCUREDPOISON, STRINGID_PKMNSITEMWOKEIT + [AI_HEAL_CONFUSION] = STRINGID_PKMNSITEMSNAPPEDOUT, + [AI_HEAL_PARALYSIS] = STRINGID_PKMNSITEMCUREDPARALYSIS, + [AI_HEAL_FREEZE] = STRINGID_PKMNSITEMDEFROSTEDIT, + [AI_HEAL_BURN] = STRINGID_PKMNSITEMHEALEDBURN, + [AI_HEAL_POISON] = STRINGID_PKMNSITEMCUREDPOISON, + [AI_HEAL_SLEEP] = STRINGID_PKMNSITEMWOKEIT }; const u16 gBerryEffectStringIds[] = { - STRINGID_PKMNSITEMCUREDPROBLEM, STRINGID_PKMNSITEMNORMALIZEDSTATUS + [B_MSG_CURED_PROBLEM] = STRINGID_PKMNSITEMCUREDPROBLEM, + [B_MSG_NORMALIZED_STATUS] = STRINGID_PKMNSITEMNORMALIZEDSTATUS }; const u16 gBRNPreventionStringIds[] = { - STRINGID_PKMNSXPREVENTSBURNS, STRINGID_PKMNSXPREVENTSYSZ, STRINGID_PKMNSXHADNOEFFECTONY + [B_MSG_ABILITY_PREVENTS_MOVE_STATUS] = STRINGID_PKMNSXPREVENTSBURNS, + [B_MSG_ABILITY_PREVENTS_ABILITY_STATUS] = STRINGID_PKMNSXPREVENTSYSZ, + [B_MSG_STATUS_HAD_NO_EFFECT] = STRINGID_PKMNSXHADNOEFFECTONY }; const u16 gPRLZPreventionStringIds[] = { - STRINGID_PKMNPREVENTSPARALYSISWITH, STRINGID_PKMNSXPREVENTSYSZ, STRINGID_PKMNSXHADNOEFFECTONY + [B_MSG_ABILITY_PREVENTS_MOVE_STATUS] = STRINGID_PKMNPREVENTSPARALYSISWITH, + [B_MSG_ABILITY_PREVENTS_ABILITY_STATUS] = STRINGID_PKMNSXPREVENTSYSZ, + [B_MSG_STATUS_HAD_NO_EFFECT] = STRINGID_PKMNSXHADNOEFFECTONY }; const u16 gPSNPreventionStringIds[] = { - STRINGID_PKMNPREVENTSPOISONINGWITH, STRINGID_PKMNSXPREVENTSYSZ, STRINGID_PKMNSXHADNOEFFECTONY + [B_MSG_ABILITY_PREVENTS_MOVE_STATUS] = STRINGID_PKMNPREVENTSPOISONINGWITH, + [B_MSG_ABILITY_PREVENTS_ABILITY_STATUS] = STRINGID_PKMNSXPREVENTSYSZ, + [B_MSG_STATUS_HAD_NO_EFFECT] = STRINGID_PKMNSXHADNOEFFECTONY }; const u16 gItemSwapStringIds[] = { - STRINGID_PKMNOBTAINEDX, STRINGID_PKMNOBTAINEDX2, STRINGID_PKMNOBTAINEDXYOBTAINEDZ + [B_MSG_ITEM_SWAP_TAKEN] = STRINGID_PKMNOBTAINEDX, + [B_MSG_ITEM_SWAP_GIVEN] = STRINGID_PKMNOBTAINEDX2, + [B_MSG_ITEM_SWAP_BOTH] = STRINGID_PKMNOBTAINEDXYOBTAINEDZ }; const u16 gFlashFireStringIds[] = { - STRINGID_PKMNRAISEDFIREPOWERWITH, STRINGID_PKMNSXMADEYINEFFECTIVE + [B_MSG_FLASH_FIRE_BOOST] = STRINGID_PKMNRAISEDFIREPOWERWITH, + [B_MSG_FLASH_FIRE_NO_BOOST] = STRINGID_PKMNSXMADEYINEFFECTIVE }; const u16 gCaughtMonStringIds[] = { - STRINGID_PKMNTRANSFERREDSOMEONESPC, STRINGID_PKMNTRANSFERREDLANETTESPC, STRINGID_PKMNBOXSOMEONESPCFULL, STRINGID_PKMNBOXLANETTESPCFULL, + [B_MSG_SENT_SOMEONES_PC] = STRINGID_PKMNTRANSFERREDSOMEONESPC, + [B_MSG_SENT_LANETTES_PC] = STRINGID_PKMNTRANSFERREDLANETTESPC, + [B_MSG_SOMEONES_BOX_FULL] = STRINGID_PKMNBOXSOMEONESPCFULL, + [B_MSG_LANETTES_BOX_FULL] = STRINGID_PKMNBOXLANETTESPCFULL, }; const u16 gTrappingMoves[] = @@ -1218,7 +1296,8 @@ static const u8 sText_Defense[] = _("DEFENSE"); static const u8 sText_SpAtk[] = _("SP. ATK"); static const u8 sText_SpDef[] = _("SP. DEF"); -const u8 * const gStatNamesTable2[] = +// Unused +static const u8 * const sStatNamesTable2[] = { sText_HP, sText_SpAtk, sText_Attack, sText_SpDef, sText_Defense, sText_Speed @@ -1311,10 +1390,10 @@ static const u8 sText_PkmnEagerForMore[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} is const u16 gBattlePalaceFlavorTextTable[] = { - STRINGID_GLINTAPPEARSINEYE, - STRINGID_PKMNGETTINGINTOPOSITION, - STRINGID_PKMNBEGANGROWLINGDEEPLY, - STRINGID_PKMNEAGERFORMORE + [B_MSG_GLINT_IN_EYE] = STRINGID_GLINTAPPEARSINEYE, + [B_MSG_GETTING_IN_POS] = STRINGID_PKMNGETTINGINTOPOSITION, + [B_MSG_GROWL_DEEPLY] = STRINGID_PKMNBEGANGROWLINGDEEPLY, + [B_MSG_EAGER_FOR_MORE] = STRINGID_PKMNEAGERFORMORE, }; static const u8 sText_RefIfNothingIsDecided[] = _("REFEREE: If nothing is decided in\n3 turns, we will go to judging!"); diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index e0a3693eb..6cd7debda 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -876,34 +876,33 @@ const ALIGNED(4) u8 gBattlePalaceNatureToMoveGroupLikelihood[NUM_NATURES][4] = [NATURE_QUIRKY] = PALACE_STYLE(56, 22, 56, 22) // 22%, 22% }; -// Indices into gBattlePalaceFlavorTextTable static const u8 sBattlePalaceNatureToFlavorTextId[NUM_NATURES] = { - [NATURE_HARDY] = 3, - [NATURE_LONELY] = 0, - [NATURE_BRAVE] = 1, - [NATURE_ADAMANT] = 0, - [NATURE_NAUGHTY] = 0, - [NATURE_BOLD] = 1, - [NATURE_DOCILE] = 3, - [NATURE_RELAXED] = 0, - [NATURE_IMPISH] = 1, - [NATURE_LAX] = 2, - [NATURE_TIMID] = 2, - [NATURE_HASTY] = 0, - [NATURE_SERIOUS] = 3, - [NATURE_JOLLY] = 1, - [NATURE_NAIVE] = 3, - [NATURE_MODEST] = 1, - [NATURE_MILD] = 2, - [NATURE_QUIET] = 3, - [NATURE_BASHFUL] = 3, - [NATURE_RASH] = 2, - [NATURE_CALM] = 1, - [NATURE_GENTLE] = 0, - [NATURE_SASSY] = 2, - [NATURE_CAREFUL] = 2, - [NATURE_QUIRKY] = 3, + [NATURE_HARDY] = B_MSG_EAGER_FOR_MORE, + [NATURE_LONELY] = B_MSG_GLINT_IN_EYE, + [NATURE_BRAVE] = B_MSG_GETTING_IN_POS, + [NATURE_ADAMANT] = B_MSG_GLINT_IN_EYE, + [NATURE_NAUGHTY] = B_MSG_GLINT_IN_EYE, + [NATURE_BOLD] = B_MSG_GETTING_IN_POS, + [NATURE_DOCILE] = B_MSG_EAGER_FOR_MORE, + [NATURE_RELAXED] = B_MSG_GLINT_IN_EYE, + [NATURE_IMPISH] = B_MSG_GETTING_IN_POS, + [NATURE_LAX] = B_MSG_GROWL_DEEPLY, + [NATURE_TIMID] = B_MSG_GROWL_DEEPLY, + [NATURE_HASTY] = B_MSG_GLINT_IN_EYE, + [NATURE_SERIOUS] = B_MSG_EAGER_FOR_MORE, + [NATURE_JOLLY] = B_MSG_GETTING_IN_POS, + [NATURE_NAIVE] = B_MSG_EAGER_FOR_MORE, + [NATURE_MODEST] = B_MSG_GETTING_IN_POS, + [NATURE_MILD] = B_MSG_GROWL_DEEPLY, + [NATURE_QUIET] = B_MSG_EAGER_FOR_MORE, + [NATURE_BASHFUL] = B_MSG_EAGER_FOR_MORE, + [NATURE_RASH] = B_MSG_GROWL_DEEPLY, + [NATURE_CALM] = B_MSG_GETTING_IN_POS, + [NATURE_GENTLE] = B_MSG_GLINT_IN_EYE, + [NATURE_SASSY] = B_MSG_GROWL_DEEPLY, + [NATURE_CAREFUL] = B_MSG_GROWL_DEEPLY, + [NATURE_QUIRKY] = B_MSG_EAGER_FOR_MORE, }; static void Cmd_attackcanceler(void) @@ -991,7 +990,7 @@ static void Cmd_attackcanceler(void) gMoveResultFlags |= MOVE_RESULT_MISSED; gLastLandedMoves[gBattlerTarget] = 0; gLastHitByType[gBattlerTarget] = 0; - gBattleCommunication[6] = B_MSG_PROTECTED; + gBattleCommunication[MISS_TYPE] = B_MSG_PROTECTED; gBattlescriptCurrInstr++; } else @@ -1024,7 +1023,7 @@ static void Cmd_jumpifaffectedbyprotect(void) { gMoveResultFlags |= MOVE_RESULT_MISSED; JumpIfMoveFailed(5, 0); - gBattleCommunication[6] = B_MSG_PROTECTED; + gBattleCommunication[MISS_TYPE] = B_MSG_PROTECTED; } else { @@ -1039,7 +1038,7 @@ bool8 JumpIfMoveAffectedByProtect(u16 move) { gMoveResultFlags |= MOVE_RESULT_MISSED; JumpIfMoveFailed(7, move); - gBattleCommunication[6] = B_MSG_PROTECTED; + gBattleCommunication[MISS_TYPE] = B_MSG_PROTECTED; affected = TRUE; } return affected; @@ -1172,9 +1171,9 @@ static void Cmd_accuracycheck(void) gMoveResultFlags |= MOVE_RESULT_MISSED; if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE && (gBattleMoves[move].target == MOVE_TARGET_BOTH || gBattleMoves[move].target == MOVE_TARGET_FOES_AND_ALLY)) - gBattleCommunication[6] = B_MSG_AVOIDED_ATK; + gBattleCommunication[MISS_TYPE] = B_MSG_AVOIDED_ATK; else - gBattleCommunication[6] = B_MSG_MISSED; + gBattleCommunication[MISS_TYPE] = B_MSG_MISSED; CheckWonderGuardAndLevitate(); } @@ -1370,7 +1369,7 @@ static void Cmd_typecalc(void) gMoveResultFlags |= (MOVE_RESULT_MISSED | MOVE_RESULT_DOESNT_AFFECT_FOE); gLastLandedMoves[gBattlerTarget] = 0; gLastHitByType[gBattlerTarget] = 0; - gBattleCommunication[6] = B_MSG_GROUND_MISS; + gBattleCommunication[MISS_TYPE] = B_MSG_GROUND_MISS; RecordAbilityBattle(gBattlerTarget, gLastUsedAbility); } else @@ -1406,7 +1405,7 @@ static void Cmd_typecalc(void) gMoveResultFlags |= MOVE_RESULT_MISSED; gLastLandedMoves[gBattlerTarget] = 0; gLastHitByType[gBattlerTarget] = 0; - gBattleCommunication[6] = B_MSG_AVOIDED_DMG; + gBattleCommunication[MISS_TYPE] = B_MSG_AVOIDED_DMG; RecordAbilityBattle(gBattlerTarget, gLastUsedAbility); } if (gMoveResultFlags & MOVE_RESULT_DOESNT_AFFECT_FOE) @@ -1429,7 +1428,7 @@ static void CheckWonderGuardAndLevitate(void) if (gBattleMons[gBattlerTarget].ability == ABILITY_LEVITATE && moveType == TYPE_GROUND) { gLastUsedAbility = ABILITY_LEVITATE; - gBattleCommunication[6] = B_MSG_GROUND_MISS; + gBattleCommunication[MISS_TYPE] = B_MSG_GROUND_MISS; RecordAbilityBattle(gBattlerTarget, ABILITY_LEVITATE); return; } @@ -1484,7 +1483,7 @@ static void CheckWonderGuardAndLevitate(void) if (((flags & 2) || !(flags & 1)) && gBattleMoves[gCurrentMove].power) { gLastUsedAbility = ABILITY_WONDER_GUARD; - gBattleCommunication[6] = B_MSG_AVOIDED_DMG; + gBattleCommunication[MISS_TYPE] = B_MSG_AVOIDED_DMG; RecordAbilityBattle(gBattlerTarget, ABILITY_WONDER_GUARD); } } @@ -2019,9 +2018,9 @@ static void Cmd_resultmessage(void) if (gBattleControllerExecFlags) return; - if (gMoveResultFlags & MOVE_RESULT_MISSED && (!(gMoveResultFlags & MOVE_RESULT_DOESNT_AFFECT_FOE) || gBattleCommunication[6] > B_MSG_AVOIDED_ATK)) + if (gMoveResultFlags & MOVE_RESULT_MISSED && (!(gMoveResultFlags & MOVE_RESULT_DOESNT_AFFECT_FOE) || gBattleCommunication[MISS_TYPE] > B_MSG_AVOIDED_ATK)) { - stringId = gMissStringIds[gBattleCommunication[6]]; + stringId = gMissStringIds[gBattleCommunication[MISS_TYPE]]; gBattleCommunication[MSG_DISPLAY] = 1; } else @@ -2273,12 +2272,12 @@ void SetMoveEffect(bool8 primary, u8 certain) if (gHitMarker & HITMARKER_IGNORE_SAFEGUARD) { - gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_ABILITY_PREVENTS_ABILITY_STATUS; gHitMarker &= ~(HITMARKER_IGNORE_SAFEGUARD); } else { - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_ABILITY_PREVENTS_MOVE_STATUS; } RESET_RETURN } @@ -2289,7 +2288,7 @@ void SetMoveEffect(bool8 primary, u8 certain) BattleScriptPush(gBattlescriptCurrInstr + 1); gBattlescriptCurrInstr = BattleScript_PSNPrevention; - gBattleCommunication[MULTISTRING_CHOOSER] = 2; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STATUS_HAD_NO_EFFECT; RESET_RETURN } if (IS_BATTLER_OF_TYPE(gEffectBattler, TYPE_POISON)) @@ -2314,12 +2313,12 @@ void SetMoveEffect(bool8 primary, u8 certain) gBattlescriptCurrInstr = BattleScript_BRNPrevention; if (gHitMarker & HITMARKER_IGNORE_SAFEGUARD) { - gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_ABILITY_PREVENTS_ABILITY_STATUS; gHitMarker &= ~(HITMARKER_IGNORE_SAFEGUARD); } else { - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_ABILITY_PREVENTS_MOVE_STATUS; } RESET_RETURN } @@ -2330,7 +2329,7 @@ void SetMoveEffect(bool8 primary, u8 certain) BattleScriptPush(gBattlescriptCurrInstr + 1); gBattlescriptCurrInstr = BattleScript_BRNPrevention; - gBattleCommunication[MULTISTRING_CHOOSER] = 2; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STATUS_HAD_NO_EFFECT; RESET_RETURN } if (IS_BATTLER_OF_TYPE(gEffectBattler, TYPE_FIRE)) @@ -2370,12 +2369,12 @@ void SetMoveEffect(bool8 primary, u8 certain) if (gHitMarker & HITMARKER_IGNORE_SAFEGUARD) { - gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_ABILITY_PREVENTS_ABILITY_STATUS; gHitMarker &= ~(HITMARKER_IGNORE_SAFEGUARD); } else { - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_ABILITY_PREVENTS_MOVE_STATUS; } RESET_RETURN } @@ -2398,12 +2397,12 @@ void SetMoveEffect(bool8 primary, u8 certain) if (gHitMarker & HITMARKER_IGNORE_SAFEGUARD) { - gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_ABILITY_PREVENTS_ABILITY_STATUS; gHitMarker &= ~(HITMARKER_IGNORE_SAFEGUARD); } else { - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_ABILITY_PREVENTS_MOVE_STATUS; } RESET_RETURN } @@ -2414,7 +2413,7 @@ void SetMoveEffect(bool8 primary, u8 certain) BattleScriptPush(gBattlescriptCurrInstr + 1); gBattlescriptCurrInstr = BattleScript_PSNPrevention; - gBattleCommunication[MULTISTRING_CHOOSER] = 2; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STATUS_HAD_NO_EFFECT; RESET_RETURN } if (gBattleMons[gEffectBattler].status1) @@ -2453,12 +2452,12 @@ void SetMoveEffect(bool8 primary, u8 certain) if (gHitMarker & HITMARKER_IGNORE_SAFEGUARD) { - gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STATUSED_BY_ABILITY; gHitMarker &= ~(HITMARKER_IGNORE_SAFEGUARD); } else { - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STATUSED; } // for synchronize @@ -3579,7 +3578,7 @@ static void MoveValuesCleanUp(void) gBattleScripting.dmgMultiplier = 1; gCritMultiplier = 1; gBattleCommunication[MOVE_EFFECT_BYTE] = 0; - gBattleCommunication[6] = 0; + gBattleCommunication[MISS_TYPE] = 0; gHitMarker &= ~(HITMARKER_DESTINYBOND); gHitMarker &= ~(HITMARKER_SYNCHRONISE_EFFECT); } @@ -4459,7 +4458,7 @@ static void Cmd_typecalc2(void) gLastUsedAbility = gBattleMons[gBattlerTarget].ability; gMoveResultFlags |= (MOVE_RESULT_MISSED | MOVE_RESULT_DOESNT_AFFECT_FOE); gLastLandedMoves[gBattlerTarget] = 0; - gBattleCommunication[6] = B_MSG_GROUND_MISS; + gBattleCommunication[MISS_TYPE] = B_MSG_GROUND_MISS; RecordAbilityBattle(gBattlerTarget, gLastUsedAbility); } else @@ -4534,7 +4533,7 @@ static void Cmd_typecalc2(void) gLastUsedAbility = ABILITY_WONDER_GUARD; gMoveResultFlags |= MOVE_RESULT_MISSED; gLastLandedMoves[gBattlerTarget] = 0; - gBattleCommunication[6] = B_MSG_AVOIDED_DMG; + gBattleCommunication[MISS_TYPE] = B_MSG_AVOIDED_DMG; RecordAbilityBattle(gBattlerTarget, gLastUsedAbility); } if (gMoveResultFlags & MOVE_RESULT_DOESNT_AFFECT_FOE) @@ -6446,19 +6445,19 @@ static void Cmd_setprotectlike(void) // protect and endure if (gBattleMoves[gCurrentMove].effect == EFFECT_PROTECT) { gProtectStructs[gBattlerAttacker].protected = 1; - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_PROTECTED_ITSELF; } if (gBattleMoves[gCurrentMove].effect == EFFECT_ENDURE) { gProtectStructs[gBattlerAttacker].endured = 1; - gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_BRACED_ITSELF; } gDisableStructs[gBattlerAttacker].protectUses++; } else { gDisableStructs[gBattlerAttacker].protectUses = 0; - gBattleCommunication[MULTISTRING_CHOOSER] = 2; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_PROTECT_FAILED; gMoveResultFlags |= MOVE_RESULT_MISSED; } @@ -6611,12 +6610,12 @@ static void Cmd_setrain(void) if (gBattleWeather & WEATHER_RAIN_ANY) { gMoveResultFlags |= MOVE_RESULT_MISSED; - gBattleCommunication[MULTISTRING_CHOOSER] = 2; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WEATHER_FAILED; } else { gBattleWeather = WEATHER_RAIN_TEMPORARY; - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STARTED_RAIN; gWishFutureKnock.weatherDuration = 5; } gBattlescriptCurrInstr++; @@ -6627,7 +6626,7 @@ static void Cmd_setreflect(void) if (gSideStatuses[GET_BATTLER_SIDE(gBattlerAttacker)] & SIDE_STATUS_REFLECT) { gMoveResultFlags |= MOVE_RESULT_MISSED; - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SIDE_STATUS_FAILED; } else { @@ -6636,9 +6635,9 @@ static void Cmd_setreflect(void) gSideTimers[GET_BATTLER_SIDE(gBattlerAttacker)].reflectBattlerId = gBattlerAttacker; if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE && CountAliveMonsInBattle(BATTLE_ALIVE_ATK_SIDE) == 2) - gBattleCommunication[MULTISTRING_CHOOSER] = 2; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SET_REFLECT_DOUBLE; else - gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SET_REFLECT_SINGLE; } gBattlescriptCurrInstr++; } @@ -6648,18 +6647,18 @@ static void Cmd_setseeded(void) if (gMoveResultFlags & MOVE_RESULT_NO_EFFECT || gStatuses3[gBattlerTarget] & STATUS3_LEECHSEED) { gMoveResultFlags |= MOVE_RESULT_MISSED; - gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_LEECH_SEED_MISS; } else if (IS_BATTLER_OF_TYPE(gBattlerTarget, TYPE_GRASS)) { gMoveResultFlags |= MOVE_RESULT_MISSED; - gBattleCommunication[MULTISTRING_CHOOSER] = 2; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_LEECH_SEED_FAIL; } else { gStatuses3[gBattlerTarget] |= gBattlerAttacker; gStatuses3[gBattlerTarget] |= STATUS3_LEECHSEED; - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_LEECH_SEED_SET; } gBattlescriptCurrInstr++; @@ -6700,11 +6699,11 @@ static void Cmd_trysetrest(void) else { if (gBattleMons[gBattlerTarget].status1 & ((u8)(~STATUS1_SLEEP))) - gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_REST_STATUSED; else - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_REST; - gBattleMons[gBattlerTarget].status1 = 3; + gBattleMons[gBattlerTarget].status1 = STATUS1_SLEEP_TURN(3); BtlController_EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBattler].status1); MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr += 5; @@ -6740,9 +6739,9 @@ bool8 UproarWakeUpCheck(u8 battlerId) if (gBattlerTarget == 0xFF) gBattlerTarget = i; else if (gBattlerTarget == i) - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_CANT_SLEEP_UPROAR; else - gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_UPROAR_KEPT_AWAKE; break; } @@ -6765,7 +6764,7 @@ static void Cmd_jumpifcantmakeasleep(void) || gBattleMons[gBattlerTarget].ability == ABILITY_VITAL_SPIRIT) { gLastUsedAbility = gBattleMons[gBattlerTarget].ability; - gBattleCommunication[MULTISTRING_CHOOSER] = 2; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STAYED_AWAKE_USING; gBattlescriptCurrInstr = jumpPtr; RecordAbilityBattle(gBattlerTarget, gLastUsedAbility); } @@ -6780,7 +6779,7 @@ static void Cmd_stockpile(void) if (gDisableStructs[gBattlerAttacker].stockpileCounter == 3) { gMoveResultFlags |= MOVE_RESULT_MISSED; - gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_CANT_STOCKPILE; } else { @@ -6788,7 +6787,7 @@ static void Cmd_stockpile(void) PREPARE_BYTE_NUMBER_BUFFER(gBattleTextBuff1, 1, gDisableStructs[gBattlerAttacker].stockpileCounter) - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STOCKPILED; } gBattlescriptCurrInstr++; } @@ -6802,7 +6801,7 @@ static void Cmd_stockpiletobasedamage(void) } else { - if (gBattleCommunication[6] != B_MSG_PROTECTED) + if (gBattleCommunication[MISS_TYPE] != B_MSG_PROTECTED) { gBattleMoveDamage = CalculateBaseDamage(&gBattleMons[gBattlerAttacker], &gBattleMons[gBattlerTarget], gCurrentMove, gSideStatuses[GET_BATTLER_SIDE(gBattlerTarget)], 0, @@ -6826,14 +6825,14 @@ static void Cmd_stockpiletohpheal(void) if (gDisableStructs[gBattlerAttacker].stockpileCounter == 0) { gBattlescriptCurrInstr = jumpPtr; - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SWALLOW_FAILED; } else if (gBattleMons[gBattlerAttacker].maxHP == gBattleMons[gBattlerAttacker].hp) { gDisableStructs[gBattlerAttacker].stockpileCounter = 0; gBattlescriptCurrInstr = jumpPtr; gBattlerTarget = gBattlerAttacker; - gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SWALLOW_FULL_HP; } else { @@ -6985,9 +6984,9 @@ static u8 ChangeStatBuffs(s8 statValue, u8 statId, u8 flags, const u8 *BS_ptr) gBattleTextBuff2[index] = B_BUFF_EOS; if (gBattleMons[gActiveBattler].statStages[statId] == MIN_STAT_STAGE) - gBattleCommunication[MULTISTRING_CHOOSER] = 2; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STAT_WONT_DECREASE; else - gBattleCommunication[MULTISTRING_CHOOSER] = (gBattlerTarget == gActiveBattler); + gBattleCommunication[MULTISTRING_CHOOSER] = (gBattlerTarget == gActiveBattler); // B_MSG_ATTACKER_STAT_FELL or B_MSG_DEFENDER_STAT_FELL } } @@ -7012,9 +7011,9 @@ static u8 ChangeStatBuffs(s8 statValue, u8 statId, u8 flags, const u8 *BS_ptr) gBattleTextBuff2[index] = B_BUFF_EOS; if (gBattleMons[gActiveBattler].statStages[statId] == MAX_STAT_STAGE) - gBattleCommunication[MULTISTRING_CHOOSER] = 2; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STAT_WONT_INCREASE; else - gBattleCommunication[MULTISTRING_CHOOSER] = (gBattlerTarget == gActiveBattler); + gBattleCommunication[MULTISTRING_CHOOSER] = (gBattlerTarget == gActiveBattler); // B_MSG_ATTACKER_STAT_ROSE or B_MSG_DEFENDER_STAT_ROSE } gBattleMons[gActiveBattler].statStages[statId] += statValue; @@ -7023,10 +7022,10 @@ static u8 ChangeStatBuffs(s8 statValue, u8 statId, u8 flags, const u8 *BS_ptr) if (gBattleMons[gActiveBattler].statStages[statId] > MAX_STAT_STAGE) gBattleMons[gActiveBattler].statStages[statId] = MAX_STAT_STAGE; - if (gBattleCommunication[MULTISTRING_CHOOSER] == 2 && flags & STAT_BUFF_ALLOW_PTR) + if (gBattleCommunication[MULTISTRING_CHOOSER] == B_MSG_STAT_WONT_INCREASE && flags & STAT_BUFF_ALLOW_PTR) gMoveResultFlags |= MOVE_RESULT_MISSED; - if (gBattleCommunication[MULTISTRING_CHOOSER] == 2 && !(flags & STAT_BUFF_ALLOW_PTR)) + if (gBattleCommunication[MULTISTRING_CHOOSER] == B_MSG_STAT_WONT_INCREASE && !(flags & STAT_BUFF_ALLOW_PTR)) return STAT_BUFF_DIDNT_WORK; return STAT_BUFF_WORKED; @@ -7358,7 +7357,7 @@ static void Cmd_setlightscreen(void) if (gSideStatuses[GET_BATTLER_SIDE(gBattlerAttacker)] & SIDE_STATUS_LIGHTSCREEN) { gMoveResultFlags |= MOVE_RESULT_MISSED; - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SIDE_STATUS_FAILED; } else { @@ -7367,9 +7366,9 @@ static void Cmd_setlightscreen(void) gSideTimers[GET_BATTLER_SIDE(gBattlerAttacker)].lightscreenBattlerId = gBattlerAttacker; if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE && CountAliveMonsInBattle(BATTLE_ALIVE_ATK_SIDE) == 2) - gBattleCommunication[MULTISTRING_CHOOSER] = 4; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SET_LIGHTSCREEN_DOUBLE; else - gBattleCommunication[MULTISTRING_CHOOSER] = 3; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SET_LIGHTSCREEN_SINGLE; } gBattlescriptCurrInstr++; @@ -7453,9 +7452,9 @@ static void Cmd_tryKO(void) { gMoveResultFlags |= MOVE_RESULT_MISSED; if (gBattleMons[gBattlerAttacker].level >= gBattleMons[gBattlerTarget].level) - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_KO_MISS; else - gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_KO_UNAFFECTED; gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); } } @@ -7475,12 +7474,12 @@ static void Cmd_setsandstorm(void) if (gBattleWeather & WEATHER_SANDSTORM_ANY) { gMoveResultFlags |= MOVE_RESULT_MISSED; - gBattleCommunication[MULTISTRING_CHOOSER] = 2; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WEATHER_FAILED; } else { gBattleWeather = WEATHER_SANDSTORM_TEMPORARY; - gBattleCommunication[MULTISTRING_CHOOSER] = 3; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STARTED_SANDSTORM; gWishFutureKnock.weatherDuration = 5; } gBattlescriptCurrInstr++; @@ -7621,14 +7620,14 @@ static void Cmd_setmist(void) if (gSideTimers[GET_BATTLER_SIDE(gBattlerAttacker)].mistTimer) { gMoveResultFlags |= MOVE_RESULT_FAILED; - gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_MIST_FAILED; } else { gSideTimers[GET_BATTLER_SIDE(gBattlerAttacker)].mistTimer = 5; gSideTimers[GET_BATTLER_SIDE(gBattlerAttacker)].mistBattlerId = gBattlerAttacker; gSideStatuses[GET_BATTLER_SIDE(gBattlerAttacker)] |= SIDE_STATUS_MIST; - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SET_MIST; } gBattlescriptCurrInstr++; } @@ -7638,12 +7637,12 @@ static void Cmd_setfocusenergy(void) if (gBattleMons[gBattlerAttacker].status2 & STATUS2_FOCUS_ENERGY) { gMoveResultFlags |= MOVE_RESULT_FAILED; - gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_FOCUS_ENERGY_FAILED; } else { gBattleMons[gBattlerAttacker].status2 |= STATUS2_FOCUS_ENERGY; - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_GETTING_PUMPED; } gBattlescriptCurrInstr++; } @@ -7656,7 +7655,7 @@ static void Cmd_transformdataexecution(void) || gStatuses3[gBattlerTarget] & STATUS3_SEMI_INVULNERABLE) { gMoveResultFlags |= MOVE_RESULT_FAILED; - gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_TRANSFORM_FAILED; } else { @@ -7688,7 +7687,7 @@ static void Cmd_transformdataexecution(void) gActiveBattler = gBattlerAttacker; BtlController_EmitResetActionMoveSelection(0, RESET_MOVE_SELECTION); MarkBattlerForControllerExec(gActiveBattler); - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_TRANSFORMED; } } @@ -7701,7 +7700,7 @@ static void Cmd_setsubstitute(void) if (gBattleMons[gBattlerAttacker].hp <= hp) { gBattleMoveDamage = 0; - gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SUBSTITUTE_FAILED; } else { @@ -7712,7 +7711,7 @@ static void Cmd_setsubstitute(void) gBattleMons[gBattlerAttacker].status2 |= STATUS2_SUBSTITUTE; gBattleMons[gBattlerAttacker].status2 &= ~(STATUS2_WRAPPED); gDisableStructs[gBattlerAttacker].substituteHP = gBattleMoveDamage; - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SET_SUBSTITUTE; gHitMarker |= HITMARKER_IGNORE_SUBSTITUTE; } @@ -8250,7 +8249,7 @@ static void Cmd_healpartystatus(void) struct Pokemon *party; s32 i; - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_BELL; if (GetBattlerSide(gBattlerAttacker) == B_SIDE_PLAYER) party = gPlayerParty; @@ -8265,7 +8264,7 @@ static void Cmd_healpartystatus(void) else { RecordAbilityBattle(gBattlerAttacker, gBattleMons[gBattlerAttacker].ability); - gBattleCommunication[MULTISTRING_CHOOSER] |= 1; + gBattleCommunication[MULTISTRING_CHOOSER] |= B_MSG_BELL_SOUNDPROOF_ATTACKER; } gActiveBattler = gBattleScripting.battler = GetBattlerAtPosition(GetBattlerPosition(gBattlerAttacker) ^ BIT_FLANK); @@ -8281,10 +8280,12 @@ static void Cmd_healpartystatus(void) else { RecordAbilityBattle(gActiveBattler, gBattleMons[gActiveBattler].ability); - gBattleCommunication[MULTISTRING_CHOOSER] |= 2; + gBattleCommunication[MULTISTRING_CHOOSER] |= B_MSG_BELL_SOUNDPROOF_PARTNER; } } + // Because the above MULTISTRING_CHOOSER are ORd, if both are set then it will be B_MSG_BELL_BOTH_SOUNDPROOF + for (i = 0; i < PARTY_SIZE; i++) { u16 species = GetMonData(&party[i], MON_DATA_SPECIES2); @@ -8310,7 +8311,7 @@ static void Cmd_healpartystatus(void) } else // Aromatherapy { - gBattleCommunication[MULTISTRING_CHOOSER] = 4; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SOOTHING_AROMA; toHeal = 0x3F; gBattleMons[gBattlerAttacker].status1 = 0; @@ -8514,14 +8515,14 @@ static void Cmd_setsafeguard(void) if (gSideStatuses[GET_BATTLER_SIDE(gBattlerAttacker)] & SIDE_STATUS_SAFEGUARD) { gMoveResultFlags |= MOVE_RESULT_MISSED; - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SIDE_STATUS_FAILED; } else { gSideStatuses[GET_BATTLER_SIDE(gBattlerAttacker)] |= SIDE_STATUS_SAFEGUARD; gSideTimers[GET_BATTLER_SIDE(gBattlerAttacker)].safeguardTimer = 5; gSideTimers[GET_BATTLER_SIDE(gBattlerAttacker)].safeguardBattlerId = gBattlerAttacker; - gBattleCommunication[MULTISTRING_CHOOSER] = 5; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SET_SAFEGUARD; } gBattlescriptCurrInstr++; @@ -8630,12 +8631,12 @@ static void Cmd_setsunny(void) if (gBattleWeather & WEATHER_SUN_ANY) { gMoveResultFlags |= MOVE_RESULT_MISSED; - gBattleCommunication[MULTISTRING_CHOOSER] = 2; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WEATHER_FAILED; } else { gBattleWeather = WEATHER_SUN_TEMPORARY; - gBattleCommunication[MULTISTRING_CHOOSER] = 4; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STARTED_SUNLIGHT; gWishFutureKnock.weatherDuration = 5; } @@ -8806,9 +8807,9 @@ static void Cmd_trysetfutureattack(void) gWishFutureKnock.futureSightDmg[gBattlerTarget] = gWishFutureKnock.futureSightDmg[gBattlerTarget] * 15 / 10; if (gCurrentMove == MOVE_DOOM_DESIRE) - gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_DOOM_DESIRE; else - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_FUTURE_SIGHT; gBattlescriptCurrInstr += 5; } @@ -8912,12 +8913,12 @@ static void Cmd_sethail(void) if (gBattleWeather & WEATHER_HAIL_ANY) { gMoveResultFlags |= MOVE_RESULT_MISSED; - gBattleCommunication[MULTISTRING_CHOOSER] = 2; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WEATHER_FAILED; } else { gBattleWeather = WEATHER_HAIL; - gBattleCommunication[MULTISTRING_CHOOSER] = 5; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STARTED_HAIL; gWishFutureKnock.weatherDuration = 5; } @@ -8928,7 +8929,7 @@ static void Cmd_jumpifattackandspecialattackcannotfall(void) // memento { if (gBattleMons[gBattlerTarget].statStages[STAT_ATK] == MIN_STAT_STAGE && gBattleMons[gBattlerTarget].statStages[STAT_SPATK] == MIN_STAT_STAGE - && gBattleCommunication[6] != B_MSG_PROTECTED) + && gBattleCommunication[MISS_TYPE] != B_MSG_PROTECTED) { gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); } @@ -9113,11 +9114,11 @@ static void Cmd_tryswapitems(void) // trick PREPARE_ITEM_BUFFER(gBattleTextBuff2, oldItemAtk) if (oldItemAtk != 0 && *newItemAtk != 0) - gBattleCommunication[MULTISTRING_CHOOSER] = 2; // attacker's item -> <- target's item + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_ITEM_SWAP_BOTH; // attacker's item -> <- target's item else if (oldItemAtk == 0 && *newItemAtk != 0) - gBattleCommunication[MULTISTRING_CHOOSER] = 0; // nothing -> <- target's item + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_ITEM_SWAP_TAKEN; // nothing -> <- target's item else - gBattleCommunication[MULTISTRING_CHOOSER] = 1; // attacker's item -> <- nothing + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_ITEM_SWAP_GIVEN; // attacker's item -> <- nothing } } } @@ -9605,7 +9606,7 @@ static void Cmd_settypebasedhalvers(void) // water and mud sport if (!(gStatuses3[gBattlerAttacker] & STATUS3_MUDSPORT)) { gStatuses3[gBattlerAttacker] |= STATUS3_MUDSPORT; - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WEAKEN_ELECTRIC; worked = TRUE; } } @@ -9614,7 +9615,7 @@ static void Cmd_settypebasedhalvers(void) // water and mud sport if (!(gStatuses3[gBattlerAttacker] & STATUS3_WATERSPORT)) { gStatuses3[gBattlerAttacker] |= STATUS3_WATERSPORT; - gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WEAKEN_FIRE; worked = TRUE; } } @@ -9883,7 +9884,6 @@ static void Cmd_handleballthrow(void) else // not caught { gBattleCommunication[MULTISTRING_CHOOSER] = shakes; - // Maybe inject SpriteCB_TestBallThrow here gBattlescriptCurrInstr = BattleScript_ShakeBallThrow; } } @@ -9896,7 +9896,7 @@ static void Cmd_givecaughtmon(void) { if (!ShouldShowBoxWasFullMessage()) { - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SENT_SOMEONES_PC; StringCopy(gStringVar1, GetBoxNamePtr(VarGet(VAR_PC_BOX_TO_SEND_MON))); GetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerAttacker ^ BIT_SIDE]], MON_DATA_NICKNAME, gStringVar2); } @@ -9905,9 +9905,10 @@ static void Cmd_givecaughtmon(void) StringCopy(gStringVar1, GetBoxNamePtr(VarGet(VAR_PC_BOX_TO_SEND_MON))); // box the mon was sent to GetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerAttacker ^ BIT_SIDE]], MON_DATA_NICKNAME, gStringVar2); StringCopy(gStringVar3, GetBoxNamePtr(GetPCBoxToSendMon())); //box the mon was going to be sent to - gBattleCommunication[MULTISTRING_CHOOSER] = 2; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SOMEONES_BOX_FULL; } + // Change to B_MSG_SENT_LANETTES_PC or B_MSG_LANETTES_BOX_FULL if (FlagGet(FLAG_SYS_PC_LANETTE)) gBattleCommunication[MULTISTRING_CHOOSER]++; } diff --git a/src/battle_tv.c b/src/battle_tv.c index 8c8ea90ab..a61f5ff29 100644 --- a/src/battle_tv.c +++ b/src/battle_tv.c @@ -666,7 +666,7 @@ void BattleTv_SetDataBasedOnString(u16 stringId) case STRINGID_CRITICALHIT: AddMovePoints(PTS_CRITICAL_HIT, moveSlot, 0, 0); break; - case STRINGID_PKMNSSTATCHANGED: + case STRINGID_ATTACKERSSTATROSE: if (gBattleTextBuff1[2] != 0) { if (*statStringId == STRINGID_STATSHARPLY) @@ -675,7 +675,7 @@ void BattleTv_SetDataBasedOnString(u16 stringId) AddMovePoints(PTS_STAT_INCREASE_1, moveSlot, gBattleTextBuff1[2] - 1, 0); } break; - case STRINGID_PKMNSSTATCHANGED2: + case STRINGID_DEFENDERSSTATROSE: if (gBattleTextBuff1[2] != 0) { if (gBattlerAttacker == gBattlerTarget) @@ -691,11 +691,11 @@ void BattleTv_SetDataBasedOnString(u16 stringId) } } break; - case STRINGID_PKMNSSTATCHANGED3: + case STRINGID_ATTACKERSSTATFELL: if (gBattleTextBuff1[2] != 0) AddMovePoints(PTS_STAT_DECREASE_SELF, moveSlot, gBattleTextBuff1[2] - 1, 0); break; - case STRINGID_PKMNSSTATCHANGED4: + case STRINGID_DEFENDERSSTATFELL: if (gBattleTextBuff1[2] != 0) { if (*statStringId == STRINGID_STATHARSHLY) diff --git a/src/battle_util.c b/src/battle_util.c index c0d897707..6fb307d63 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -49,7 +49,29 @@ extern const u8 *const gBattlescriptsForRunningByItem[]; extern const u8 *const gBattlescriptsForUsingItem[]; extern const u8 *const gBattlescriptsForSafariActions[]; -static const u8 sPkblToEscapeFactor[][3] = {{0, 0, 0}, {3, 5, 0}, {2, 3, 0}, {1, 2, 0}, {1, 1, 0}}; +static const u8 sPkblToEscapeFactor[][3] = { + { + [B_MSG_MON_CURIOUS] = 0, + [B_MSG_MON_ENTHRALLED] = 0, + [B_MSG_MON_IGNORED] = 0 + },{ + [B_MSG_MON_CURIOUS] = 3, + [B_MSG_MON_ENTHRALLED] = 5, + [B_MSG_MON_IGNORED] = 0 + },{ + [B_MSG_MON_CURIOUS] = 2, + [B_MSG_MON_ENTHRALLED] = 3, + [B_MSG_MON_IGNORED] = 0 + },{ + [B_MSG_MON_CURIOUS] = 1, + [B_MSG_MON_ENTHRALLED] = 2, + [B_MSG_MON_IGNORED] = 0 + },{ + [B_MSG_MON_CURIOUS] = 1, + [B_MSG_MON_ENTHRALLED] = 1, + [B_MSG_MON_IGNORED] = 0 + } +}; static const u8 sGoNearCounterToCatchFactor[] = {4, 3, 2, 1}; static const u8 sGoNearCounterToEscapeFactor[] = {4, 4, 4, 4}; @@ -238,10 +260,9 @@ void HandleAction_UseMove(void) } } - // choose battlescript - if (gBattleTypeFlags & BATTLE_TYPE_PALACE - && gProtectStructs[gBattlerAttacker].palaceUnableToUseMove) + if (gBattleTypeFlags & BATTLE_TYPE_PALACE && gProtectStructs[gBattlerAttacker].palaceUnableToUseMove) { + // Battle Palace, select battle script for failure to use move if (gBattleMons[gBattlerAttacker].hp == 0) { gCurrentActionFuncId = B_ACTION_FINISHED; @@ -249,13 +270,13 @@ void HandleAction_UseMove(void) } else if (gPalaceSelectionBattleScripts[gBattlerAttacker] != NULL) { - gBattleCommunication[MULTISTRING_CHOOSER] = 4; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_INCAPABLE_OF_POWER; gBattlescriptCurrInstr = gPalaceSelectionBattleScripts[gBattlerAttacker]; gPalaceSelectionBattleScripts[gBattlerAttacker] = NULL; } else { - gBattleCommunication[MULTISTRING_CHOOSER] = 4; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_INCAPABLE_OF_POWER; gBattlescriptCurrInstr = BattleScript_MoveUsedLoafingAround; } } @@ -318,26 +339,29 @@ void HandleAction_UseItem(void) case AI_ITEM_HEAL_HP: break; case AI_ITEM_CURE_CONDITION: - gBattleCommunication[MULTISTRING_CHOOSER] = 0; - if (*(gBattleStruct->AI_itemFlags + gBattlerAttacker / 2) & 1) + gBattleCommunication[MULTISTRING_CHOOSER] = AI_HEAL_CONFUSION; + if (*(gBattleStruct->AI_itemFlags + gBattlerAttacker / 2) & (1 << AI_HEAL_CONFUSION)) { if (*(gBattleStruct->AI_itemFlags + gBattlerAttacker / 2) & 0x3E) - gBattleCommunication[MULTISTRING_CHOOSER] = 5; + gBattleCommunication[MULTISTRING_CHOOSER] = AI_HEAL_SLEEP; } else { + // Check for other statuses, stopping at first (shouldn't be more than one) while (!(*(gBattleStruct->AI_itemFlags + gBattlerAttacker / 2) & 1)) { *(gBattleStruct->AI_itemFlags + gBattlerAttacker / 2) >>= 1; gBattleCommunication[MULTISTRING_CHOOSER]++; + // MULTISTRING_CHOOSER will be either AI_HEAL_PARALYSIS, AI_HEAL_FREEZE, + // AI_HEAL_BURN, AI_HEAL_POISON, or AI_HEAL_SLEEP } } break; case AI_ITEM_X_STAT: - gBattleCommunication[MULTISTRING_CHOOSER] = 4; - if (*(gBattleStruct->AI_itemFlags + (gBattlerAttacker >> 1)) & 0x80) + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STAT_ROSE_ITEM; + if (*(gBattleStruct->AI_itemFlags + (gBattlerAttacker >> 1)) & (1 << AI_DIRE_HIT)) { - gBattleCommunication[MULTISTRING_CHOOSER] = 5; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_USED_DIRE_HIT; } else { @@ -356,9 +380,9 @@ void HandleAction_UseItem(void) break; case AI_ITEM_GUARD_SPECS: if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) - gBattleCommunication[MULTISTRING_CHOOSER] = 2; + gBattleCommunication[MULTISTRING_CHOOSER] = 2; // Going OOB for gMistUsedStringIds? else - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SET_MIST; break; } @@ -479,7 +503,7 @@ void HandleAction_Run(void) if (!TryRunFromBattle(gBattlerAttacker)) // failed to run away { ClearFuryCutterDestinyBondGrudge(gBattlerAttacker); - gBattleCommunication[MULTISTRING_CHOOSER] = 3; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_CANT_ESCAPE_2; gBattlescriptCurrInstr = BattleScript_PrintFailedToRunString; gCurrentActionFuncId = B_ACTION_EXEC_SCRIPT; } @@ -488,7 +512,7 @@ void HandleAction_Run(void) { if (gBattleMons[gBattlerAttacker].status2 & (STATUS2_WRAPPED | STATUS2_ESCAPE_PREVENTION)) { - gBattleCommunication[MULTISTRING_CHOOSER] = 4; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_ATTACKER_CANT_ESCAPE; gBattlescriptCurrInstr = BattleScript_PrintFailedToRunString; gCurrentActionFuncId = B_ACTION_EXEC_SCRIPT; } @@ -567,11 +591,11 @@ void HandleAction_GoNear(void) if (gBattleStruct->safariGoNearCounter < 3) { gBattleStruct->safariGoNearCounter++; - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_CREPT_CLOSER; } else { - gBattleCommunication[MULTISTRING_CHOOSER] = 1; // Can't get closer. + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_CANT_GET_CLOSER; } gBattlescriptCurrInstr = gBattlescriptsForSafariActions[1]; gCurrentActionFuncId = B_ACTION_EXEC_SCRIPT; @@ -1295,20 +1319,20 @@ u8 DoFieldEndTurnEffects(void) { gBattleWeather &= ~WEATHER_RAIN_TEMPORARY; gBattleWeather &= ~WEATHER_RAIN_DOWNPOUR; - gBattleCommunication[MULTISTRING_CHOOSER] = 2; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_RAIN_STOPPED; } else if (gBattleWeather & WEATHER_RAIN_DOWNPOUR) - gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_DOWNPOUR_CONTINUES; else - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_RAIN_CONTINUES; } else if (gBattleWeather & WEATHER_RAIN_DOWNPOUR) { - gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_DOWNPOUR_CONTINUES; } else { - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_RAIN_CONTINUES; } BattleScriptExecute(BattleScript_RainContinuesOrEnds); @@ -1330,7 +1354,7 @@ u8 DoFieldEndTurnEffects(void) } gBattleScripting.animArg1 = B_ANIM_SANDSTORM_CONTINUES; - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SANDSTORM; BattleScriptExecute(gBattlescriptCurrInstr); effect++; } @@ -1368,7 +1392,7 @@ u8 DoFieldEndTurnEffects(void) } gBattleScripting.animArg1 = B_ANIM_HAIL_CONTINUES; - gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_HAIL; BattleScriptExecute(gBattlescriptCurrInstr); effect++; } @@ -1597,16 +1621,16 @@ u8 DoBattlerEndTurnEffects(void) if (WasUnableToUseMove(gActiveBattler)) { CancelMultiTurnMoves(gActiveBattler); - gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_UPROAR_ENDS; } else if (gBattleMons[gActiveBattler].status2 & STATUS2_UPROAR) { - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_UPROAR_CONTINUES; gBattleMons[gActiveBattler].status2 |= STATUS2_MULTIPLETURNS; } else { - gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_UPROAR_ENDS; CancelMultiTurnMoves(gActiveBattler); } BattleScriptExecute(BattleScript_PrintUproarOverTurns); @@ -1749,9 +1773,9 @@ bool8 HandleWishPerishSongOnTurnEnd(void) && gBattleMons[gActiveBattler].hp != 0) { if (gWishFutureKnock.futureSightMove[gActiveBattler] == MOVE_FUTURE_SIGHT) - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_FUTURE_SIGHT; else - gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_DOOM_DESIRE; PREPARE_MOVE_BUFFER(gBattleTextBuff1, gWishFutureKnock.futureSightMove[gActiveBattler]); @@ -1962,7 +1986,7 @@ u8 AtkCanceller_UnableToUseMove(void) gBattleMons[gBattlerAttacker].status1 &= ~(STATUS1_SLEEP); gBattleMons[gBattlerAttacker].status2 &= ~(STATUS2_NIGHTMARE); BattleScriptPushCursor(); - gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WOKE_UP_UPROAR; gBattlescriptCurrInstr = BattleScript_MoveUsedWokeUp; effect = 2; } @@ -1990,7 +2014,7 @@ u8 AtkCanceller_UnableToUseMove(void) { gBattleMons[gBattlerAttacker].status2 &= ~(STATUS2_NIGHTMARE); BattleScriptPushCursor(); - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WOKE_UP; gBattlescriptCurrInstr = BattleScript_MoveUsedWokeUp; effect = 2; } @@ -2019,7 +2043,7 @@ u8 AtkCanceller_UnableToUseMove(void) gBattleMons[gBattlerAttacker].status1 &= ~(STATUS1_FREEZE); BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_MoveUsedUnfroze; - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_DEFROSTED; } effect = 2; } @@ -2030,7 +2054,7 @@ u8 AtkCanceller_UnableToUseMove(void) { CancelMultiTurnMoves(gBattlerAttacker); gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE; - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_LOAFING; gBattlescriptCurrInstr = BattleScript_MoveUsedLoafingAround; gMoveResultFlags |= MOVE_RESULT_MISSED; effect = 1; @@ -2103,12 +2127,14 @@ u8 AtkCanceller_UnableToUseMove(void) { if (Random() & 1) { - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + // The MULTISTRING_CHOOSER is used here as a bool to signal + // to BattleScript_MoveUsedIsConfused whether or not damage was taken + gBattleCommunication[MULTISTRING_CHOOSER] = FALSE; BattleScriptPushCursor(); } else // confusion dmg { - gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = TRUE; gBattlerTarget = gBattlerAttacker; gBattleMoveDamage = CalculateBaseDamage(&gBattleMons[gBattlerAttacker], &gBattleMons[gBattlerAttacker], MOVE_POUND, 0, 40, 0, gBattlerAttacker, gBattlerAttacker); gProtectStructs[gBattlerAttacker].confusionSelfDmg = 1; @@ -2195,7 +2221,7 @@ u8 AtkCanceller_UnableToUseMove(void) gBattleMons[gBattlerAttacker].status1 &= ~(STATUS1_FREEZE); BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_MoveUsedUnfroze; - gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_DEFROSTED_BY_MOVE; } effect = 2; } @@ -2593,7 +2619,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA if (gBattleMons[battler].statStages[STAT_SPEED] < MAX_STAT_STAGE && gDisableStructs[battler].isFirstTurn != 2) { gBattleMons[battler].statStages[STAT_SPEED]++; - gBattleScripting.animArg1 = 0x11; + gBattleScripting.animArg1 = 14 + STAT_SPEED; gBattleScripting.animArg2 = 0; BattleScriptPushCursorAndCallback(BattleScript_SpeedBoostActivates); gBattleScripting.battler = battler; @@ -2655,7 +2681,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA { if (!(gBattleResources->flags->flags[battler] & RESOURCE_FLAG_FLASH_FIRE)) { - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_FLASH_FIRE_BOOST; if (gProtectStructs[gBattlerAttacker].notFirstStrike) gBattlescriptCurrInstr = BattleScript_FlashFireBoost; else @@ -2666,7 +2692,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA } else { - gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_FLASH_FIRE_NO_BOOST; if (gProtectStructs[gBattlerAttacker].notFirstStrike) gBattlescriptCurrInstr = BattleScript_FlashFireBoost; else @@ -3431,7 +3457,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) gEffectBattler = battlerId; SET_STATCHANGER(STAT_ATK, 1, FALSE); - gBattleScripting.animArg1 = 0xE + STAT_ATK; + gBattleScripting.animArg1 = 14 + STAT_ATK; gBattleScripting.animArg2 = 0; BattleScriptExecute(BattleScript_BerryStatRaiseEnd2); effect = ITEM_STATS_CHANGE; @@ -3445,7 +3471,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) gEffectBattler = battlerId; SET_STATCHANGER(STAT_DEF, 1, FALSE); - gBattleScripting.animArg1 = 0xE + STAT_DEF; + gBattleScripting.animArg1 = 14 + STAT_DEF; gBattleScripting.animArg2 = 0; BattleScriptExecute(BattleScript_BerryStatRaiseEnd2); effect = ITEM_STATS_CHANGE; @@ -3459,7 +3485,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) gEffectBattler = battlerId; SET_STATCHANGER(STAT_SPEED, 1, FALSE); - gBattleScripting.animArg1 = 0xE + STAT_SPEED; + gBattleScripting.animArg1 = 14 + STAT_SPEED; gBattleScripting.animArg2 = 0; BattleScriptExecute(BattleScript_BerryStatRaiseEnd2); effect = ITEM_STATS_CHANGE; @@ -3473,7 +3499,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) gEffectBattler = battlerId; SET_STATCHANGER(STAT_SPATK, 1, FALSE); - gBattleScripting.animArg1 = 0xE + STAT_SPATK; + gBattleScripting.animArg1 = 14 + STAT_SPATK; gBattleScripting.animArg2 = 0; BattleScriptExecute(BattleScript_BerryStatRaiseEnd2); effect = ITEM_STATS_CHANGE; @@ -3487,7 +3513,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) gEffectBattler = battlerId; SET_STATCHANGER(STAT_SPDEF, 1, FALSE); - gBattleScripting.animArg1 = 0xE + STAT_SPDEF; + gBattleScripting.animArg1 = 14 + STAT_SPDEF; gBattleScripting.animArg2 = 0; BattleScriptExecute(BattleScript_BerryStatRaiseEnd2); effect = ITEM_STATS_CHANGE; @@ -3622,9 +3648,9 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) i++; } if (!(i > 1)) - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_CURED_PROBLEM; else - gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_NORMALIZED_STATUS; gBattleMons[battlerId].status1 = 0; gBattleMons[battlerId].status2 &= ~(STATUS2_CONFUSION); BattleScriptExecute(BattleScript_BerryCureChosenStatusEnd2); @@ -3637,7 +3663,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) gBattleMons[battlerId].status2 &= ~(STATUS2_INFATUATION); StringCopy(gBattleTextBuff1, gStatusConditionString_LoveJpn); BattleScriptExecute(BattleScript_BerryCureChosenStatusEnd2); - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_CURED_PROBLEM; effect = ITEM_EFFECT_OTHER; } break; @@ -3740,7 +3766,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) gBattleMons[battlerId].status2 &= ~(STATUS2_INFATUATION); StringCopy(gBattleTextBuff1, gStatusConditionString_LoveJpn); BattleScriptPushCursor(); - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_CURED_PROBLEM; gBattlescriptCurrInstr = BattleScript_BerryCureChosenStatusRet; effect = ITEM_EFFECT_OTHER; } @@ -3776,7 +3802,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) gBattleMons[battlerId].status1 = 0; gBattleMons[battlerId].status2 &= ~(STATUS2_CONFUSION); BattleScriptPushCursor(); - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_CURED_PROBLEM; gBattlescriptCurrInstr = BattleScript_BerryCureChosenStatusRet; effect = ITEM_STATUS_CHANGE; } @@ -4016,7 +4042,9 @@ u8 IsMonDisobedient(void) calc = CheckMoveLimitations(gBattlerAttacker, gBitTable[gCurrMovePos], 0xFF); if (calc == 0xF) // all moves cannot be used { - gBattleCommunication[MULTISTRING_CHOOSER] = Random() & 3; + // Randomly select, then print a disobedient string + // B_MSG_LOAFING, B_MSG_WONT_OBEY, B_MSG_TURNED_AWAY, or B_MSG_PRETEND_NOT_NOTICE + gBattleCommunication[MULTISTRING_CHOOSER] = Random() & (NUM_LOAF_STRINGS - 1); gBattlescriptCurrInstr = BattleScript_MoveUsedLoafingAround; return 1; } @@ -4024,7 +4052,7 @@ u8 IsMonDisobedient(void) { do { - gCurrMovePos = gChosenMovePos = Random() & 3; + gCurrMovePos = gChosenMovePos = Random() & (MAX_MON_MOVES - 1); } while (gBitTable[gCurrMovePos] & calc); gCalledMove = gBattleMons[gBattlerAttacker].moves[gCurrMovePos]; @@ -4065,7 +4093,9 @@ u8 IsMonDisobedient(void) } else { - gBattleCommunication[MULTISTRING_CHOOSER] = Random() & 3; + // Randomly select, then print a disobedient string + // B_MSG_LOAFING, B_MSG_WONT_OBEY, B_MSG_TURNED_AWAY, or B_MSG_PRETEND_NOT_NOTICE + gBattleCommunication[MULTISTRING_CHOOSER] = Random() & (NUM_LOAF_STRINGS - 1); gBattlescriptCurrInstr = BattleScript_MoveUsedLoafingAround; return 1; } diff --git a/src/battle_util2.c b/src/battle_util2.c index 6d51f51e7..def7302d3 100644 --- a/src/battle_util2.c +++ b/src/battle_util2.c @@ -10,6 +10,7 @@ #include "constants/abilities.h" #include "random.h" #include "battle_scripts.h" +#include "constants/battle_string_ids.h" void AllocateBattleResources(void) { @@ -136,7 +137,7 @@ u32 sub_805725C(u8 battlerId) gBattleMons[battlerId].status1 &= ~(STATUS1_SLEEP); gBattleMons[battlerId].status2 &= ~(STATUS2_NIGHTMARE); BattleScriptPushCursor(); - gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WOKE_UP_UPROAR; gBattlescriptCurrInstr = BattleScript_MoveUsedWokeUp; effect = 2; } @@ -163,7 +164,7 @@ u32 sub_805725C(u8 battlerId) { gBattleMons[battlerId].status2 &= ~(STATUS2_NIGHTMARE); BattleScriptPushCursor(); - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WOKE_UP; gBattlescriptCurrInstr = BattleScript_MoveUsedWokeUp; effect = 2; } @@ -183,7 +184,7 @@ u32 sub_805725C(u8 battlerId) gBattleMons[battlerId].status1 &= ~(STATUS1_FREEZE); BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_MoveUsedUnfroze; - gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_DEFROSTED; } effect = 2; } diff --git a/src/pokemon.c b/src/pokemon.c index e28fba1b4..9fe008d56 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -5366,7 +5366,7 @@ static void BufferStatRoseMessage(s32 arg0) gBattlerTarget = gBattlerInMenuId; StringCopy(gBattleTextBuff1, gStatNamesTable[sStatsToRaise[arg0]]); StringCopy(gBattleTextBuff2, gText_StatRose); - BattleStringExpandPlaceholdersToDisplayedString(gText_PkmnsStatChanged2); + BattleStringExpandPlaceholdersToDisplayedString(gText_DefendersStatRose); } u8 *UseStatIncreaseItem(u16 itemId)