move some data out of event_scripts, use game stat constants

This commit is contained in:
GriffinR
2019-09-05 14:56:34 -04:00
parent 6b04ea0727
commit 1d703e786b
27 changed files with 1097 additions and 1094 deletions
@@ -304,7 +304,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23EA2A:: @ 823EA2A
setvar VAR_TEMP_0, 255
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F0D0
incrementgamestat 30
incrementgamestat GAME_STAT_ENTERED_BATTLE_TOWER
setvar VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, 1
goto BattleFrontier_BattleTowerLobby_EventScript_23F0F3
end
@@ -384,7 +384,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23EB93:: @ 823EB93
setvar VAR_TEMP_0, 255
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F0D0
incrementgamestat 30
incrementgamestat GAME_STAT_ENTERED_BATTLE_TOWER
setvar VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, 0
goto BattleFrontier_BattleTowerLobby_EventScript_23F0F3
end
@@ -465,7 +465,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23ECFF:: @ 823ECFF
setvar VAR_TEMP_0, 255
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F0D0
incrementgamestat 30
incrementgamestat GAME_STAT_ENTERED_BATTLE_TOWER
setvar VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, 0
goto BattleFrontier_BattleTowerLobby_EventScript_23F0F3
end
@@ -548,7 +548,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23EE68:: @ 823EE68
setvar VAR_TEMP_0, 255
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F0D0
incrementgamestat 30
incrementgamestat GAME_STAT_ENTERED_BATTLE_TOWER
specialvar VAR_RESULT, IsWirelessAdapterConnected
compare VAR_RESULT, 1
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_23F3E8
@@ -994,7 +994,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23F3A6:: @ 823F3A6
return
BattleFrontier_BattleTowerLobby_EventScript_23F3AF:: @ 823F3AF
incrementgamestat 30
incrementgamestat GAME_STAT_ENTERED_BATTLE_TOWER
setvar VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, 0
message BattleFrontier_BattleTowerLobby_Text_24144D
waitmessage
@@ -1057,7 +1057,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23F463:: @ 823F463
return
BattleFrontier_BattleTowerLobby_EventScript_23F496:: @ 823F496
incrementgamestat 30
incrementgamestat GAME_STAT_ENTERED_BATTLE_TOWER
setvar VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, 0
message BattleFrontier_BattleTowerLobby_Text_24144D
waitmessage
+1 -1
View File
@@ -619,7 +619,7 @@ DewfordTown_EventScript_1E9952:: @ 81E9952
end
DewfordTown_EventScript_1E997D:: @ 81E997D
incrementgamestat 2
incrementgamestat GAME_STAT_STARTED_TRENDS
compare VAR_0x8004, 0
goto_if_eq DewfordTown_EventScript_1E999E
msgbox DewfordTown_Text_1EA2AA, MSGBOX_DEFAULT
@@ -5,7 +5,7 @@ EverGrandeCity_ChampionsRoom_MapScripts:: @ 82289EF
.byte 0
EverGrandeCity_ChampionsRoom_OnTransition: @ 82289FF
call Common_EventScript_SetupRivalGender
call Common_EventScript_SetupRivalGfxId
end
EverGrandeCity_ChampionsRoom_MapScript2_228A05: @ 8228A05
+3 -3
View File
@@ -7,8 +7,8 @@ LavaridgeTown_OnTransition: @ 81EA4DE
setflag FLAG_VISITED_LAVARIDGE_TOWN
call_if_set FLAG_FLANNERY_GIVES_BADGE_INFO, LavaridgeTown_EventScript_1EA514
call_if_set FLAG_DEFEATED_EVIL_TEAM_MT_CHIMNEY, LavaridgeTown_EventScript_1EA53F
call Common_EventScript_SetupRivalGender
call Common_EventScript_SetupRivalOnBikeGender
call Common_EventScript_SetupRivalGfxId
call Common_EventScript_SetupRivalOnBikeGfxId
compare VAR_LAVARIDGE_TOWN_STATE, 1
call_if_eq LavaridgeTown_EventScript_1EA518
compare VAR_LAVARIDGE_TOWN_STATE, 1
@@ -216,7 +216,7 @@ LavaridgeTown_EventScript_1EA6FA:: @ 81EA6FA
end
LavaridgeTown_EventScript_1EA70B:: @ 81EA70B
incrementgamestat 49
incrementgamestat GAME_STAT_ENTERED_HOT_SPRINGS
end
LavaridgeTown_EventScript_1EA70E:: @ 81EA70E
+1 -1
View File
@@ -8,7 +8,7 @@ LilycoveCity_OnTransition: @ 81E2B47
setvar VAR_LINK_CONTEST_ROOM_STATE, 0
setflag FLAG_HIDE_LILYCOVE_CONTEST_HALL_REPORTER
call_if_set FLAG_SYS_WEATHER_CTRL, Common_EventScript_SetWeather15
call Common_EventScript_SetupRivalGender
call Common_EventScript_SetupRivalGfxId
end
LilycoveCity_MapScript1_1E2B61: @ 81E2B61
@@ -81,7 +81,7 @@ LilycoveCity_ContestLobby_EventScript_21A2E4:: @ 821A2E4
end
LilycoveCity_ContestLobby_EventScript_21A314:: @ 821A314
incrementgamestat 42
incrementgamestat GAME_STAT_RECEIVED_RIBBONS
special sub_80F8390
applymovement 4, LilycoveCity_ContestLobby_Movement_21A41A
waitmovement 0
@@ -253,7 +253,7 @@ LilycoveCity_ContestLobby_EventScript_21A4B4:: @ 821A4B4
end
LilycoveCity_ContestLobby_EventScript_21A4E4:: @ 821A4E4
incrementgamestat 42
incrementgamestat GAME_STAT_RECEIVED_RIBBONS
setflag FLAG_SYS_RIBBON_GET
special sub_80F8390
applymovement 11, LilycoveCity_ContestLobby_Movement_21A547
@@ -34,7 +34,7 @@ LilycoveCity_DepartmentStore_1F_EventScript_21F69C:: @ 821F69C
waitmovement 0
compare VAR_0x8004, 0
goto_if_eq LilycoveCity_DepartmentStore_1F_EventScript_21F7A1
incrementgamestat 46
incrementgamestat GAME_STAT_WON_POKEMON_LOTTERY
compare VAR_0x8006, 0
call_if_eq LilycoveCity_DepartmentStore_1F_EventScript_21F77B
compare VAR_0x8006, 1
+1 -1
View File
@@ -6,7 +6,7 @@ LittlerootTown_MapScripts:: @ 81E7DCB
LittlerootTown_MapScript1_1E7DDB: @ 81E7DDB
setflag FLAG_VISITED_LITTLEROOT_TOWN
call Common_EventScript_SetupRivalGender
call Common_EventScript_SetupRivalGfxId
compare VAR_LITTLEROOT_INTRO_STATE, 2
call_if_eq LittlerootTown_EventScript_1E7E67
call_if_unset FLAG_RESCUED_BIRCH, LittlerootTown_EventScript_1E7E6F
@@ -5,7 +5,7 @@ LittlerootTown_ProfessorBirchsLab_MapScripts:: @ 81F9C91
.byte 0
LittlerootTown_ProfessorBirchsLab_MapScript1_1F9CA1: @ 81F9CA1
call Common_EventScript_SetupRivalGender
call Common_EventScript_SetupRivalGfxId
call LittlerootTown_ProfessorBirchsLab_EventScript_2720AD
compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 6
goto_if_ge LittlerootTown_ProfessorBirchsLab_EventScript_1F9CF7
+2 -2
View File
@@ -86,7 +86,7 @@ MauvilleCity_BikeShop_EventScript_20ECE5:: @ 820ECE5
end
MauvilleCity_BikeShop_EventScript_20ECEF:: @ 820ECEF
incrementgamestat 4
incrementgamestat GAME_STAT_TRADED_BIKES
msgbox MauvilleCity_BikeShop_Text_20F294, MSGBOX_DEFAULT
takeitem ITEM_ACRO_BIKE, 1
giveitem_std ITEM_MACH_BIKE
@@ -94,7 +94,7 @@ MauvilleCity_BikeShop_EventScript_20ECEF:: @ 820ECEF
end
MauvilleCity_BikeShop_EventScript_20ED10:: @ 820ED10
incrementgamestat 4
incrementgamestat GAME_STAT_TRADED_BIKES
msgbox MauvilleCity_BikeShop_Text_20F263, MSGBOX_DEFAULT
takeitem ITEM_MACH_BIKE, 1
giveitem_std ITEM_ACRO_BIKE
@@ -46,7 +46,7 @@ MtChimney_CableCarStation_EventScript_22AC6C:: @ 822AC6C
waitmovement 0
setvar VAR_0x8004, 1
setvar VAR_CABLE_CAR_STATION_STATE, 2
incrementgamestat 48
incrementgamestat GAME_STAT_RODE_CABLE_CAR
special CableCarWarp
special CableCar
waitstate
+1 -1
View File
@@ -3,7 +3,7 @@ OldaleTown_MapScripts:: @ 81E8EA2
.byte 0
OldaleTown_OnTransition: @ 81E8EA8
call Common_EventScript_SetupRivalGender
call Common_EventScript_SetupRivalGfxId
setflag FLAG_VISITED_OLDALE_TOWN
call_if_unset FLAG_ADVENTURE_STARTED, OldaleTown_EventScript_1E8ED2
call_if_unset FLAG_RECEIVED_POTION_OLDALE, OldaleTown_EventScript_1E8EDE
+1 -1
View File
@@ -4,7 +4,7 @@ Route103_MapScripts:: @ 81EC38E
.byte 0
Route103_OnTransition: @ 81EC399
call Common_EventScript_SetupRivalGender
call Common_EventScript_SetupRivalGfxId
call Route103_EventScript_2720AD
end
+1 -1
View File
@@ -13,7 +13,7 @@ Route104_EventScript_1ECC47:: @ 81ECC47
end
Route104_OnTransition: @ 81ECC4E
call Common_EventScript_SetupRivalGender
call Common_EventScript_SetupRivalGfxId
call Route104_EventScript_1ECC78
call Route104_EventScript_1ECC5E
end
+2 -2
View File
@@ -9,8 +9,8 @@ Route110_MapScript1_1EF279: @ 81EF279
end
Route110_OnTransition: @ 81EF27D
call Common_EventScript_SetupRivalGender
call Common_EventScript_SetupRivalOnBikeGender
call Common_EventScript_SetupRivalGfxId
call Common_EventScript_SetupRivalOnBikeGfxId
compare VAR_CYCLING_CHALLENGE_STATE, 1
call_if_eq Route110_EventScript_1EF293
end
@@ -47,7 +47,7 @@ Route112_CableCarStation_EventScript_22AB38:: @ 822AB38
waitmovement 0
setvar VAR_0x8004, 0
setvar VAR_CABLE_CAR_STATION_STATE, 1
incrementgamestat 48
incrementgamestat GAME_STAT_RODE_CABLE_CAR
special CableCarWarp
special CableCar
waitstate
+2 -2
View File
@@ -15,8 +15,8 @@ Route119_EventScript_1F4439:: @ 81F4439
return
Route119_OnTransition: @ 81F444D
call Common_EventScript_SetupRivalGender
call Common_EventScript_SetupRivalOnBikeGender
call Common_EventScript_SetupRivalGfxId
call Common_EventScript_SetupRivalOnBikeGfxId
compare VAR_WEATHER_INSTITUTE_STATE, 1
call_if_eq Route119_EventScript_1F4466
special SetRoute119Weather
+1 -1
View File
@@ -5,7 +5,7 @@ RustboroCity_MapScripts:: @ 81E06BD
RustboroCity_OnTransition: @ 81E06C8
setflag FLAG_VISITED_RUSTBORO_CITY
call Common_EventScript_SetupRivalGender
call Common_EventScript_SetupRivalGfxId
compare VAR_RUSTBORO_CITY_STATE, 6
call_if_eq RustboroCity_EventScript_1E0707
getplayerxy VAR_TEMP_0, VAR_TEMP_1