diff --git a/asm/macros/scrcmd.inc b/asm/macros/scrcmd.inc index d5c81502e4..716abc5dff 100644 --- a/asm/macros/scrcmd.inc +++ b/asm/macros/scrcmd.inc @@ -1856,9 +1856,9 @@ .short 346 .endm - .macro ScrCmd_15B badgeNum, destVarID + .macro CheckBadge badgeID, destVarID .short 347 - .short \badgeNum + .short \badgeID .short \destVarID .endm diff --git a/consts/scrcmd.json b/consts/scrcmd.json index df7a81de25..40fbe62e7f 100644 --- a/consts/scrcmd.json +++ b/consts/scrcmd.json @@ -8,6 +8,19 @@ "SAVE_TYPE_FULL_SAVE", "SAVE_TYPE_QUICK_SAVE" ] + }, + "@BadgeID": { + "type": "enum", + "values": [ + "BADGE_ID_COAL", + "BADGE_ID_FOREST", + "BADGE_ID_COBBLE", + "BADGE_ID_FEN", + "BADGE_ID_RELIC", + "BADGE_ID_MINE", + "BADGE_ID_ICICLE", + "BADGE_ID_BEACON" + ] } } } diff --git a/res/field/scripts/scripts_acuity_lakefront.s b/res/field/scripts/scripts_acuity_lakefront.s index 83c605129b..9a596a4b23 100644 --- a/res/field/scripts/scripts_acuity_lakefront.s +++ b/res/field/scripts/scripts_acuity_lakefront.s @@ -24,7 +24,7 @@ _003C: End _004E: - ScrCmd_15B 6, 0x4000 + CheckBadge BADGE_ID_ICICLE, 0x4000 CallIfEq 0x4000, 1, _0079 GoToIfUnset 186, _002A GoToIfSet 186, _003C diff --git a/res/field/scripts/scripts_canalave_city.s b/res/field/scripts/scripts_canalave_city.s index 17d92f409d..832974ea8c 100644 --- a/res/field/scripts/scripts_canalave_city.s +++ b/res/field/scripts/scripts_canalave_city.s @@ -396,7 +396,7 @@ _054D: LockAll FacePlayer GoToIfSet 168, _0586 - ScrCmd_15B 5, 0x800C + CheckBadge BADGE_ID_MINE, 0x800C GoToIfEq 0x800C, 1, _0591 GoTo _057B End diff --git a/res/field/scripts/scripts_canalave_city_gym.s b/res/field/scripts/scripts_canalave_city_gym.s index 7876f88fc8..8883c8371a 100644 --- a/res/field/scripts/scripts_canalave_city_gym.s +++ b/res/field/scripts/scripts_canalave_city_gym.s @@ -16,7 +16,7 @@ _0016: PlayFanfare SEQ_SE_CONFIRM LockAll FacePlayer - ScrCmd_15B 5, 0x800C + CheckBadge BADGE_ID_MINE, 0x800C GoToIfEq 0x800C, 1, _0107 ScrCmd_1CD 9, 35, 0, 0, 0 Message 0 @@ -88,7 +88,7 @@ _0126: PlayFanfare SEQ_SE_CONFIRM LockAll FacePlayer - ScrCmd_15B 5, 0x800C + CheckBadge BADGE_ID_MINE, 0x800C GoToIfEq 0x800C, 1, _014C Message 6 WaitABXPadPress @@ -107,7 +107,7 @@ _014C: _015A: PlayFanfare SEQ_SE_CONFIRM LockAll - ScrCmd_15B 5, 0x800C + CheckBadge BADGE_ID_MINE, 0x800C GoToIfEq 0x800C, 1, _0184 BufferRivalName 0 BufferRivalName 1 diff --git a/res/field/scripts/scripts_eterna_city_gym.s b/res/field/scripts/scripts_eterna_city_gym.s index 971f2ef0b2..74e1e40c2b 100644 --- a/res/field/scripts/scripts_eterna_city_gym.s +++ b/res/field/scripts/scripts_eterna_city_gym.s @@ -19,7 +19,7 @@ _0022: PlayFanfare SEQ_SE_CONFIRM LockAll FacePlayer - ScrCmd_15B 1, 0x800C + CheckBadge BADGE_ID_FOREST, 0x800C GoToIfEq 0x800C, 1, _0048 Message 13 WaitABXPadPress @@ -38,7 +38,7 @@ _0048: _0056: PlayFanfare SEQ_SE_CONFIRM LockAll - ScrCmd_15B 1, 0x800C + CheckBadge BADGE_ID_FOREST, 0x800C GoToIfEq 0x800C, 1, _0080 BufferRivalName 0 BufferRivalName 1 @@ -62,7 +62,7 @@ _0094: PlayFanfare SEQ_SE_CONFIRM LockAll FacePlayer - ScrCmd_15B 1, 0x800C + CheckBadge BADGE_ID_FOREST, 0x800C GoToIfEq 0x800C, 1, _0161 ScrCmd_1CD 9, 67, 0, 0, 0 Message 0 diff --git a/res/field/scripts/scripts_hearthome_city_dp_gym_leader_room.s b/res/field/scripts/scripts_hearthome_city_dp_gym_leader_room.s index 9fd54df94c..5a0c15d5bf 100644 --- a/res/field/scripts/scripts_hearthome_city_dp_gym_leader_room.s +++ b/res/field/scripts/scripts_hearthome_city_dp_gym_leader_room.s @@ -40,7 +40,7 @@ _0086: GoTo _0096 _0096: - ScrCmd_15B 4, 0x800C + CheckBadge BADGE_ID_RELIC, 0x800C GoToIfEq 0x800C, 1, _0173 ScrCmd_1CD 9, 100, 0, 0, 0 Message 0 diff --git a/res/field/scripts/scripts_hearthome_city_gym_entrance_room.s b/res/field/scripts/scripts_hearthome_city_gym_entrance_room.s index 021e999ea1..95756c5987 100644 --- a/res/field/scripts/scripts_hearthome_city_gym_entrance_room.s +++ b/res/field/scripts/scripts_hearthome_city_gym_entrance_room.s @@ -11,7 +11,7 @@ _000E: PlayFanfare SEQ_SE_CONFIRM LockAll FacePlayer - ScrCmd_15B 4, 0x800C + CheckBadge BADGE_ID_RELIC, 0x800C GoToIfEq 0x800C, 1, _006A Message 1 ScrCmd_03E 0x800C @@ -44,7 +44,7 @@ _006A: _0078: PlayFanfare SEQ_SE_CONFIRM LockAll - ScrCmd_15B 4, 0x800C + CheckBadge BADGE_ID_RELIC, 0x800C GoToIfEq 0x800C, 1, _00A2 BufferRivalName 0 BufferRivalName 1 diff --git a/res/field/scripts/scripts_hearthome_city_gym_leader_room.s b/res/field/scripts/scripts_hearthome_city_gym_leader_room.s index 1a3e6cc374..bdaad9c5cc 100644 --- a/res/field/scripts/scripts_hearthome_city_gym_leader_room.s +++ b/res/field/scripts/scripts_hearthome_city_gym_leader_room.s @@ -53,7 +53,7 @@ _00AB: GoTo _00BB _00BB: - ScrCmd_15B 4, 0x800C + CheckBadge BADGE_ID_RELIC, 0x800C GoToIfEq 0x800C, 1, _01A0 ScrCmd_1CD 9, 91, 0, 0, 0 Message 0 diff --git a/res/field/scripts/scripts_iron_island.s b/res/field/scripts/scripts_iron_island.s index 0e89fce09a..e737b03bbd 100644 --- a/res/field/scripts/scripts_iron_island.s +++ b/res/field/scripts/scripts_iron_island.s @@ -97,7 +97,7 @@ _00FC: SetVar 0x8004, 0x1A7 SetVar 0x8005, 1 CallCommonScript 0x7FC - ScrCmd_15B 5, 0x800C + CheckBadge BADGE_ID_MINE, 0x800C GoToIfEq 0x800C, 0, _0140 GoTo _0135 End diff --git a/res/field/scripts/scripts_jubilife_city.s b/res/field/scripts/scripts_jubilife_city.s index 30564abe55..9159bef4c9 100644 --- a/res/field/scripts/scripts_jubilife_city.s +++ b/res/field/scripts/scripts_jubilife_city.s @@ -440,7 +440,7 @@ _058C: PlayFanfare SEQ_SE_CONFIRM LockAll FacePlayer - ScrCmd_15B 0, 0x800C + CheckBadge BADGE_ID_COAL, 0x800C GoToIfEq 0x800C, 1, _05B2 Message 29 WaitABXPadPress diff --git a/res/field/scripts/scripts_oreburgh_city.s b/res/field/scripts/scripts_oreburgh_city.s index 6c909f533e..fb50d79938 100644 --- a/res/field/scripts/scripts_oreburgh_city.s +++ b/res/field/scripts/scripts_oreburgh_city.s @@ -52,7 +52,7 @@ _0090: PlayFanfare SEQ_SE_CONFIRM LockAll FacePlayer - ScrCmd_15B 0, 0x800C + CheckBadge BADGE_ID_COAL, 0x800C GoToIfEq 0x800C, 1, _00C1 GoToIfSet 122, _00CC Message 8 diff --git a/res/field/scripts/scripts_oreburgh_city_gym.s b/res/field/scripts/scripts_oreburgh_city_gym.s index fd378526cd..ff3a2e7c66 100644 --- a/res/field/scripts/scripts_oreburgh_city_gym.s +++ b/res/field/scripts/scripts_oreburgh_city_gym.s @@ -11,7 +11,7 @@ _000E: PlayFanfare SEQ_SE_CONFIRM LockAll FacePlayer - ScrCmd_15B 0, 0x800C + CheckBadge BADGE_ID_COAL, 0x800C GoToIfEq 0x800C, 1, _0103 ScrCmd_1CD 9, 47, 0, 0, 0 Message 0 @@ -82,7 +82,7 @@ _011F: PlayFanfare SEQ_SE_CONFIRM LockAll FacePlayer - ScrCmd_15B 0, 0x800C + CheckBadge BADGE_ID_COAL, 0x800C GoToIfEq 0x800C, 1, _0145 Message 6 WaitABXPadPress @@ -101,7 +101,7 @@ _0145: _0153: PlayFanfare SEQ_SE_CONFIRM LockAll - ScrCmd_15B 0, 0x800C + CheckBadge BADGE_ID_COAL, 0x800C GoToIfEq 0x800C, 1, _017D BufferRivalName 0 BufferRivalName 1 diff --git a/res/field/scripts/scripts_oreburgh_gate_1f.s b/res/field/scripts/scripts_oreburgh_gate_1f.s index 645c057f46..24ffc27f15 100644 --- a/res/field/scripts/scripts_oreburgh_gate_1f.s +++ b/res/field/scripts/scripts_oreburgh_gate_1f.s @@ -15,7 +15,7 @@ _0014: PlayFanfare SEQ_SE_CONFIRM LockAll FacePlayer - ScrCmd_15B 0, 0x800C + CheckBadge BADGE_ID_COAL, 0x800C GoToIfEq 0x800C, 0, _003A Message 2 WaitABXPadPress diff --git a/res/field/scripts/scripts_pastoria_city.s b/res/field/scripts/scripts_pastoria_city.s index 8e064ea059..80403548f8 100644 --- a/res/field/scripts/scripts_pastoria_city.s +++ b/res/field/scripts/scripts_pastoria_city.s @@ -86,7 +86,7 @@ _00FE: PlayFanfare SEQ_SE_CONFIRM LockAll FacePlayer - ScrCmd_15B 3, 0x800C + CheckBadge BADGE_ID_FEN, 0x800C GoToIfEq 0x800C, 1, _0124 Message 33 WaitABXPadPress diff --git a/res/field/scripts/scripts_pastoria_city_gym.s b/res/field/scripts/scripts_pastoria_city_gym.s index 84476b5eb0..49bc62fc82 100644 --- a/res/field/scripts/scripts_pastoria_city_gym.s +++ b/res/field/scripts/scripts_pastoria_city_gym.s @@ -43,7 +43,7 @@ _0076: PlayFanfare SEQ_SE_CONFIRM LockAll FacePlayer - ScrCmd_15B 3, 0x800C + CheckBadge BADGE_ID_FEN, 0x800C GoToIfEq 0x800C, 1, _0155 ScrCmd_1CD 9, 122, 0, 0, 0 Message 0 @@ -110,7 +110,7 @@ _0171: PlayFanfare SEQ_SE_CONFIRM LockAll FacePlayer - ScrCmd_15B 3, 0x800C + CheckBadge BADGE_ID_FEN, 0x800C GoToIfEq 0x800C, 1, _0197 Message 6 WaitABXPadPress @@ -129,7 +129,7 @@ _0197: _01A5: PlayFanfare SEQ_SE_CONFIRM LockAll - ScrCmd_15B 3, 0x800C + CheckBadge BADGE_ID_FEN, 0x800C GoToIfEq 0x800C, 1, _01CF BufferRivalName 0 BufferRivalName 1 diff --git a/res/field/scripts/scripts_route_213.s b/res/field/scripts/scripts_route_213.s index d5e80ad0fa..ebf7e60dbd 100644 --- a/res/field/scripts/scripts_route_213.s +++ b/res/field/scripts/scripts_route_213.s @@ -17,7 +17,7 @@ _0022: End _002F: - ScrCmd_15B 3, 0x4000 + CheckBadge BADGE_ID_FEN, 0x4000 GoToIfEq 0x4000, 1, _0044 End diff --git a/res/field/scripts/scripts_snowpoint_city_gym.s b/res/field/scripts/scripts_snowpoint_city_gym.s index 41bf2c64b2..a7898ec62b 100644 --- a/res/field/scripts/scripts_snowpoint_city_gym.s +++ b/res/field/scripts/scripts_snowpoint_city_gym.s @@ -20,7 +20,7 @@ _0025: PlayFanfare SEQ_SE_CONFIRM LockAll FacePlayer - ScrCmd_15B 6, 0x800C + CheckBadge BADGE_ID_ICICLE, 0x800C GoToIfEq 0x800C, 1, _00F8 ScrCmd_1CD 9, 167, 0, 0, 0 Message 0 @@ -84,7 +84,7 @@ _0114: PlayFanfare SEQ_SE_CONFIRM LockAll FacePlayer - ScrCmd_15B 6, 0x800C + CheckBadge BADGE_ID_ICICLE, 0x800C GoToIfEq 0x800C, 1, _013A Message 6 WaitABXPadPress @@ -103,7 +103,7 @@ _013A: _0148: PlayFanfare SEQ_SE_CONFIRM LockAll - ScrCmd_15B 6, 0x800C + CheckBadge BADGE_ID_ICICLE, 0x800C GoToIfEq 0x800C, 1, _0172 BufferRivalName 0 BufferRivalName 1 diff --git a/res/field/scripts/scripts_snowpoint_city_pokecenter_1f.s b/res/field/scripts/scripts_snowpoint_city_pokecenter_1f.s index d25464baad..515e2fcc80 100644 --- a/res/field/scripts/scripts_snowpoint_city_pokecenter_1f.s +++ b/res/field/scripts/scripts_snowpoint_city_pokecenter_1f.s @@ -51,7 +51,7 @@ _0067: PlayFanfare SEQ_SE_CONFIRM LockAll FacePlayer - ScrCmd_15B 6, 0x800C + CheckBadge BADGE_ID_ICICLE, 0x800C GoToIfEq 0x800C, 1, _00EC ScrCmd_1BD 0x8000 CallIfEq 0x8000, 0, _00C8 diff --git a/res/field/scripts/scripts_solaceon_town.s b/res/field/scripts/scripts_solaceon_town.s index a29a40e0c1..23fc4b9409 100644 --- a/res/field/scripts/scripts_solaceon_town.s +++ b/res/field/scripts/scripts_solaceon_town.s @@ -42,7 +42,7 @@ _0062: PlayFanfare SEQ_SE_CONFIRM LockAll FacePlayer - ScrCmd_15B 4, 0x800C + CheckBadge BADGE_ID_RELIC, 0x800C GoToIfEq 0x800C, 1, _0088 Message 4 WaitABXPadPress diff --git a/res/field/scripts/scripts_sunyshore_city.s b/res/field/scripts/scripts_sunyshore_city.s index 8c1a35d318..4e488d3ab0 100644 --- a/res/field/scripts/scripts_sunyshore_city.s +++ b/res/field/scripts/scripts_sunyshore_city.s @@ -417,7 +417,7 @@ _0530: FacePlayer GoToIfSet 154, _056C Message 8 - ScrCmd_15B 7, 0x800C + CheckBadge BADGE_ID_BEACON, 0x800C GoToIfEq 0x800C, 0, _0561 GoTo _056C End diff --git a/res/field/scripts/scripts_sunyshore_city_gym_room_1.s b/res/field/scripts/scripts_sunyshore_city_gym_room_1.s index ce4094a23e..e6ef72e47c 100644 --- a/res/field/scripts/scripts_sunyshore_city_gym_room_1.s +++ b/res/field/scripts/scripts_sunyshore_city_gym_room_1.s @@ -21,7 +21,7 @@ _0022: PlayFanfare SEQ_SE_CONFIRM LockAll FacePlayer - ScrCmd_15B 7, 0x800C + CheckBadge BADGE_ID_BEACON, 0x800C GoToIfEq 0x800C, 1, _0048 Message 0 WaitABXPadPress @@ -40,7 +40,7 @@ _0048: _0056: PlayFanfare SEQ_SE_CONFIRM LockAll - ScrCmd_15B 7, 0x800C + CheckBadge BADGE_ID_BEACON, 0x800C GoToIfEq 0x800C, 1, _007A Message 2 WaitABXPadPress diff --git a/res/field/scripts/scripts_sunyshore_city_gym_room_3.s b/res/field/scripts/scripts_sunyshore_city_gym_room_3.s index fdcbf11504..cf524c84db 100644 --- a/res/field/scripts/scripts_sunyshore_city_gym_room_3.s +++ b/res/field/scripts/scripts_sunyshore_city_gym_room_3.s @@ -25,7 +25,7 @@ _0027: PlayFanfare SEQ_SE_CONFIRM LockAll FacePlayer - ScrCmd_15B 7, 0x800C + CheckBadge BADGE_ID_BEACON, 0x800C GoToIfEq 0x800C, 1, _0104 ScrCmd_1CD 9, 156, 0, 0, 0 Message 0 diff --git a/res/field/scripts/scripts_sunyshore_city_pokecenter_1f.s b/res/field/scripts/scripts_sunyshore_city_pokecenter_1f.s index 04289def27..bc6969b9bc 100644 --- a/res/field/scripts/scripts_sunyshore_city_pokecenter_1f.s +++ b/res/field/scripts/scripts_sunyshore_city_pokecenter_1f.s @@ -27,7 +27,7 @@ _0031: PlayFanfare SEQ_SE_CONFIRM LockAll FacePlayer - ScrCmd_15B 7, 0x800C + CheckBadge BADGE_ID_BEACON, 0x800C GoToIfEq 0x800C, 1, _0057 Message 1 WaitABXPadPress diff --git a/res/field/scripts/scripts_unk_0211.s b/res/field/scripts/scripts_unk_0211.s index 1bccb248b4..8902df6391 100644 --- a/res/field/scripts/scripts_unk_0211.s +++ b/res/field/scripts/scripts_unk_0211.s @@ -1205,7 +1205,7 @@ _103A: Message 43 Call _10C7 Call _01C1 - ScrCmd_15B 0, 0x800C + CheckBadge BADGE_ID_COAL, 0x800C GoToIfEq 0x800C, 1, _10A2 Message 44 ApplyMovement 0xFF, _02F4 diff --git a/res/field/scripts/scripts_unk_0409.s b/res/field/scripts/scripts_unk_0409.s index b27dcc7376..c2f6788c34 100644 --- a/res/field/scripts/scripts_unk_0409.s +++ b/res/field/scripts/scripts_unk_0409.s @@ -26,7 +26,7 @@ _0042: FacePlayer ScrCmd_09A 0x800C, 15 GoToIfEq 0x800C, 6, _008E - ScrCmd_15B 1, 0x800C + CheckBadge BADGE_ID_FOREST, 0x800C GoToIfEq 0x800C, 0, _008E Message 0 ScrCmd_03E 0x800C @@ -131,7 +131,7 @@ _0223: ScrCmd_09A 0x800C, 249 SetVar 0x8004, 0x800C GoToIfEq 0x800C, 6, _0275 - ScrCmd_15B 0, 0x800C + CheckBadge BADGE_ID_COAL, 0x800C GoToIfEq 0x800C, 0, _0275 Message 3 ScrCmd_03E 0x800C @@ -188,7 +188,7 @@ _0314: GoToIfEq 0x800C, 1, _03BD ScrCmd_09A 0x800C, 70 GoToIfEq 0x800C, 6, _0372 - ScrCmd_15B 5, 0x800C + CheckBadge BADGE_ID_MINE, 0x800C GoToIfEq 0x800C, 0, _0372 Message 6 ScrCmd_03E 0x800C @@ -248,7 +248,7 @@ _040E: LockAll ScrCmd_09A 0x800C, 0x1AF GoToIfEq 0x800C, 6, _0469 - ScrCmd_15B 6, 0x800C + CheckBadge BADGE_ID_ICICLE, 0x800C GoToIfEq 0x800C, 0, _0469 ScrCmd_160 0x800C GoToIfEq 0x800C, 1, _0478 @@ -419,7 +419,7 @@ _0679: LockAll ScrCmd_09A 0x800C, 127 GoToIfEq 0x800C, 6, _06C3 - ScrCmd_15B 7, 0x800C + CheckBadge BADGE_ID_BEACON, 0x800C GoToIfEq 0x800C, 0, _06C3 Message 22 ScrCmd_03E 0x800C diff --git a/res/field/scripts/scripts_veilstone_city.s b/res/field/scripts/scripts_veilstone_city.s index e260b1b44a..65eb7b6b94 100644 --- a/res/field/scripts/scripts_veilstone_city.s +++ b/res/field/scripts/scripts_veilstone_city.s @@ -1173,7 +1173,7 @@ _0D5C: PlayFanfare SEQ_SE_CONFIRM LockAll FacePlayer - ScrCmd_15B 2, 0x800C + CheckBadge BADGE_ID_COBBLE, 0x800C GoToIfEq 0x800C, 1, _0D82 Message 12 WaitABXPadPress @@ -1192,7 +1192,7 @@ _0D8D: PlayFanfare SEQ_SE_CONFIRM LockAll FacePlayer - ScrCmd_15B 2, 0x800C + CheckBadge BADGE_ID_COBBLE, 0x800C GoToIfEq 0x800C, 1, _0DB3 Message 13 WaitABXPadPress diff --git a/res/field/scripts/scripts_veilstone_city_gym.s b/res/field/scripts/scripts_veilstone_city_gym.s index 3c991b1d86..87bf3c7a8f 100644 --- a/res/field/scripts/scripts_veilstone_city_gym.s +++ b/res/field/scripts/scripts_veilstone_city_gym.s @@ -19,7 +19,7 @@ _0022: PlayFanfare SEQ_SE_CONFIRM LockAll FacePlayer - ScrCmd_15B 2, 0x800C + CheckBadge BADGE_ID_COBBLE, 0x800C GoToIfEq 0x800C, 1, _00FF ScrCmd_1CD 9, 133, 0, 0, 0 Message 0 @@ -86,7 +86,7 @@ _011E: PlayFanfare SEQ_SE_CONFIRM LockAll FacePlayer - ScrCmd_15B 2, 0x800C + CheckBadge BADGE_ID_COBBLE, 0x800C GoToIfEq 0x800C, 1, _0144 Message 6 WaitABXPadPress @@ -105,7 +105,7 @@ _0144: _0152: PlayFanfare SEQ_SE_CONFIRM LockAll - ScrCmd_15B 2, 0x800C + CheckBadge BADGE_ID_COBBLE, 0x800C GoToIfEq 0x800C, 1, _017C BufferRivalName 0 BufferRivalName 1