Document New Mauville scripts

This commit is contained in:
GriffinR 2019-11-07 10:32:21 -05:00
parent c132989679
commit 0b5c2c2721
5 changed files with 86 additions and 86 deletions

View File

@ -38,7 +38,7 @@
"elevation": 3,
"var": "VAR_NEW_MAUVILLE_STATE",
"var_value": "0",
"script": "NewMauville_Entrance_EventScript_2372FF"
"script": "NewMauville_Entrance_EventScript_Door"
}
],
"bg_events": []

View File

@ -1,14 +1,14 @@
NewMauville_Entrance_MapScripts:: @ 82372AD
map_script MAP_SCRIPT_ON_LOAD, NewMauville_Entrance_MapScript1_2372B8
map_script MAP_SCRIPT_ON_LOAD, NewMauville_Entrance_OnLoad
map_script MAP_SCRIPT_ON_TRANSITION, NewMauville_Entrance_OnTransition
.byte 0
NewMauville_Entrance_MapScript1_2372B8: @ 82372B8
NewMauville_Entrance_OnLoad: @ 82372B8
compare VAR_NEW_MAUVILLE_STATE, 0
call_if_eq NewMauville_Entrance_EventScript_2372C4
call_if_eq NewMauville_Entrance_EventScript_CloseDoor
end
NewMauville_Entrance_EventScript_2372C4:: @ 82372C4
NewMauville_Entrance_EventScript_CloseDoor:: @ 82372C4
setmetatile 3, 0, METATILE_Facility_NewMauvilleDoor_Closed_Tile0, 1
setmetatile 4, 0, METATILE_Facility_NewMauvilleDoor_Closed_Tile1, 1
setmetatile 5, 0, METATILE_Facility_NewMauvilleDoor_Closed_Tile2, 1
@ -21,18 +21,18 @@ NewMauville_Entrance_OnTransition: @ 82372FB
setflag FLAG_LANDMARK_NEW_MAUVILLE
end
NewMauville_Entrance_EventScript_2372FF:: @ 82372FF
NewMauville_Entrance_EventScript_Door:: @ 82372FF
lockall
applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceFastestUp
waitmovement 0
msgbox NewMauville_Entrance_Text_237382, MSGBOX_DEFAULT
msgbox NewMauville_Entrance_Text_DoorIsLocked, MSGBOX_DEFAULT
checkitem ITEM_BASEMENT_KEY, 1
compare VAR_RESULT, 0
goto_if_eq NewMauville_Entrance_EventScript_237380
msgbox NewMauville_Entrance_Text_237396, MSGBOX_YESNO
compare VAR_RESULT, FALSE
goto_if_eq NewMauville_Entrance_EventScript_DontOpenDoor
msgbox NewMauville_Entrance_Text_UseBasementKey, MSGBOX_YESNO
compare VAR_RESULT, NO
goto_if_eq NewMauville_Entrance_EventScript_237380
msgbox NewMauville_Entrance_Text_2373AC, MSGBOX_DEFAULT
goto_if_eq NewMauville_Entrance_EventScript_DontOpenDoor
msgbox NewMauville_Entrance_Text_UsedBasementKey, MSGBOX_DEFAULT
setmetatile 3, 0, METATILE_Facility_NewMauvilleDoor_Open_Tile0, 0
setmetatile 4, 0, METATILE_Facility_NewMauvilleDoor_Open_Tile1, 0
setmetatile 5, 0, METATILE_Facility_NewMauvilleDoor_Open_Tile2, 0
@ -45,17 +45,17 @@ NewMauville_Entrance_EventScript_2372FF:: @ 82372FF
releaseall
end
NewMauville_Entrance_EventScript_237380:: @ 8237380
NewMauville_Entrance_EventScript_DontOpenDoor:: @ 8237380
releaseall
end
NewMauville_Entrance_Text_237382: @ 8237382
NewMauville_Entrance_Text_DoorIsLocked: @ 8237382
.string "The door is locked.$"
NewMauville_Entrance_Text_237396: @ 8237396
NewMauville_Entrance_Text_UseBasementKey: @ 8237396
.string "Use the BASEMENT KEY?$"
NewMauville_Entrance_Text_2373AC: @ 82373AC
NewMauville_Entrance_Text_UsedBasementKey: @ 82373AC
.string "{PLAYER} used the BASEMENT KEY.\p"
.string "The door opened!$"

View File

@ -89,7 +89,7 @@
"movement_range_y": 1,
"trainer_type": "0",
"trainer_sight_or_berry_tree_id": "0",
"script": "NewMauville_Inside_EventScript_2377AF",
"script": "NewMauville_Inside_EventScript_Voltorb1",
"flag": "FLAG_HIDE_NEW_MAUVILLE_VOLTORB_1"
},
{
@ -102,7 +102,7 @@
"movement_range_y": 1,
"trainer_type": "0",
"trainer_sight_or_berry_tree_id": "0",
"script": "NewMauville_Inside_EventScript_2377FC",
"script": "NewMauville_Inside_EventScript_Voltorb2",
"flag": "FLAG_HIDE_NEW_MAUVILLE_VOLTORB_2"
},
{
@ -115,7 +115,7 @@
"movement_range_y": 1,
"trainer_type": "0",
"trainer_sight_or_berry_tree_id": "0",
"script": "NewMauville_Inside_EventScript_237849",
"script": "NewMauville_Inside_EventScript_Voltorb3",
"flag": "FLAG_HIDE_NEW_MAUVILLE_VOLTORB_3"
}
],
@ -136,7 +136,7 @@
"elevation": 3,
"var": "VAR_TEMP_1",
"var_value": "0",
"script": "NewMauville_Inside_EventScript_237459"
"script": "NewMauville_Inside_EventScript_BlueButton"
},
{
"type": "trigger",
@ -145,7 +145,7 @@
"elevation": 3,
"var": "VAR_TEMP_2",
"var_value": "0",
"script": "NewMauville_Inside_EventScript_237471"
"script": "NewMauville_Inside_EventScript_GreenButton"
},
{
"type": "trigger",
@ -154,7 +154,7 @@
"elevation": 3,
"var": "VAR_TEMP_1",
"var_value": "0",
"script": "NewMauville_Inside_EventScript_237459"
"script": "NewMauville_Inside_EventScript_BlueButton"
},
{
"type": "trigger",
@ -163,7 +163,7 @@
"elevation": 3,
"var": "VAR_TEMP_1",
"var_value": "0",
"script": "NewMauville_Inside_EventScript_237459"
"script": "NewMauville_Inside_EventScript_BlueButton"
},
{
"type": "trigger",
@ -172,7 +172,7 @@
"elevation": 3,
"var": "VAR_TEMP_2",
"var_value": "0",
"script": "NewMauville_Inside_EventScript_237471"
"script": "NewMauville_Inside_EventScript_GreenButton"
},
{
"type": "trigger",
@ -181,7 +181,7 @@
"elevation": 3,
"var": "VAR_TEMP_2",
"var_value": "0",
"script": "NewMauville_Inside_EventScript_237471"
"script": "NewMauville_Inside_EventScript_GreenButton"
},
{
"type": "trigger",
@ -190,7 +190,7 @@
"elevation": 3,
"var": "VAR_TEMP_1",
"var_value": "0",
"script": "NewMauville_Inside_EventScript_237459"
"script": "NewMauville_Inside_EventScript_BlueButton"
},
{
"type": "trigger",
@ -199,7 +199,7 @@
"elevation": 3,
"var": "VAR_TEMP_1",
"var_value": "0",
"script": "NewMauville_Inside_EventScript_237459"
"script": "NewMauville_Inside_EventScript_BlueButton"
},
{
"type": "trigger",
@ -208,7 +208,7 @@
"elevation": 3,
"var": "VAR_TEMP_2",
"var_value": "0",
"script": "NewMauville_Inside_EventScript_237471"
"script": "NewMauville_Inside_EventScript_GreenButton"
},
{
"type": "trigger",
@ -217,7 +217,7 @@
"elevation": 3,
"var": "VAR_NEW_MAUVILLE_STATE",
"var_value": "1",
"script": "NewMauville_Inside_EventScript_237725"
"script": "NewMauville_Inside_EventScript_RedButton"
}
],
"bg_events": [
@ -227,7 +227,7 @@
"y": 4,
"elevation": 3,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
"script": "NewMauville_Inside_EventScript_23778F"
"script": "NewMauville_Inside_EventScript_Generator"
},
{
"type": "sign",
@ -235,7 +235,7 @@
"y": 3,
"elevation": 3,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
"script": "NewMauville_Inside_EventScript_23778F"
"script": "NewMauville_Inside_EventScript_Generator"
},
{
"type": "sign",
@ -243,7 +243,7 @@
"y": 2,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
"script": "NewMauville_Inside_EventScript_23778F"
"script": "NewMauville_Inside_EventScript_Generator"
},
{
"type": "sign",
@ -251,7 +251,7 @@
"y": 4,
"elevation": 3,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
"script": "NewMauville_Inside_EventScript_23778F"
"script": "NewMauville_Inside_EventScript_Generator"
},
{
"type": "sign",
@ -259,7 +259,7 @@
"y": 4,
"elevation": 3,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
"script": "NewMauville_Inside_EventScript_23778F"
"script": "NewMauville_Inside_EventScript_Generator"
},
{
"type": "sign",
@ -267,7 +267,7 @@
"y": 4,
"elevation": 3,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
"script": "NewMauville_Inside_EventScript_23778F"
"script": "NewMauville_Inside_EventScript_Generator"
},
{
"type": "sign",
@ -275,7 +275,7 @@
"y": 3,
"elevation": 3,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
"script": "NewMauville_Inside_EventScript_23778F"
"script": "NewMauville_Inside_EventScript_Generator"
},
{
"type": "sign",
@ -283,7 +283,7 @@
"y": 2,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
"script": "NewMauville_Inside_EventScript_23778F"
"script": "NewMauville_Inside_EventScript_Generator"
}
]
}

View File

@ -1,18 +1,18 @@
NewMauville_Inside_MapScripts:: @ 82373D7
map_script MAP_SCRIPT_ON_RESUME, NewMauville_Inside_MapScript1_2373E7
map_script MAP_SCRIPT_ON_RESUME, NewMauville_Inside_OnResume
map_script MAP_SCRIPT_ON_TRANSITION, NewMauville_Inside_OnTransition
map_script MAP_SCRIPT_ON_LOAD, NewMauville_Inside_MapScript1_23744D
map_script MAP_SCRIPT_ON_LOAD, NewMauville_Inside_OnLoad
.byte 0
NewMauville_Inside_MapScript1_2373E7: @ 82373E7
NewMauville_Inside_OnResume: @ 82373E7
compare VAR_TEMP_1, 1
call_if_eq NewMauville_Inside_EventScript_237489
call_if_eq NewMauville_Inside_EventScript_SetBarrierStateBlueButton
compare VAR_TEMP_2, 1
call_if_eq NewMauville_Inside_EventScript_2375D7
call_if_set FLAG_SYS_CTRL_OBJ_DELETE, NewMauville_Inside_EventScript_237407
call_if_eq NewMauville_Inside_EventScript_SetBarrierStateGreenButton
call_if_set FLAG_SYS_CTRL_OBJ_DELETE, NewMauville_Inside_EventScript_TryRemoveVoltorb
end
NewMauville_Inside_EventScript_237407:: @ 8237407
NewMauville_Inside_EventScript_TryRemoveVoltorb:: @ 8237407
specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, B_OUTCOME_CAUGHT
goto_if_ne Common_EventScript_NopReturn
@ -22,49 +22,49 @@ NewMauville_Inside_EventScript_237407:: @ 8237407
NewMauville_Inside_OnTransition: @ 823741B
setvar VAR_TEMP_1, 0
setvar VAR_TEMP_2, 0
call_if_unset FLAG_DEFEATED_VOLTORB_1_NEW_MAUVILLE, NewMauville_Inside_EventScript_237441
call_if_unset FLAG_DEFEATED_VOLTORB_2_NEW_MAUVILLE, NewMauville_Inside_EventScript_237445
call_if_unset FLAG_DEFEATED_VOLTORB_3_NEW_MAUVILLE, NewMauville_Inside_EventScript_237449
call_if_unset FLAG_DEFEATED_VOLTORB_1_NEW_MAUVILLE, NewMauville_Inside_EventScript_ShowVoltorb1
call_if_unset FLAG_DEFEATED_VOLTORB_2_NEW_MAUVILLE, NewMauville_Inside_EventScript_ShowVoltorb2
call_if_unset FLAG_DEFEATED_VOLTORB_3_NEW_MAUVILLE, NewMauville_Inside_EventScript_ShowVoltorb3
end
NewMauville_Inside_EventScript_237441:: @ 8237441
NewMauville_Inside_EventScript_ShowVoltorb1:: @ 8237441
clearflag FLAG_HIDE_NEW_MAUVILLE_VOLTORB_1
return
NewMauville_Inside_EventScript_237445:: @ 8237445
NewMauville_Inside_EventScript_ShowVoltorb2:: @ 8237445
clearflag FLAG_HIDE_NEW_MAUVILLE_VOLTORB_2
return
NewMauville_Inside_EventScript_237449:: @ 8237449
NewMauville_Inside_EventScript_ShowVoltorb3:: @ 8237449
clearflag FLAG_HIDE_NEW_MAUVILLE_VOLTORB_3
return
NewMauville_Inside_MapScript1_23744D: @ 823744D
NewMauville_Inside_OnLoad: @ 823744D
compare VAR_NEW_MAUVILLE_STATE, 2
call_if_eq NewMauville_Inside_EventScript_23773A
call_if_eq NewMauville_Inside_EventScript_SetGeneratorOffMetatiles
end
NewMauville_Inside_EventScript_237459:: @ 8237459
NewMauville_Inside_EventScript_BlueButton:: @ 8237459
lockall
setvar VAR_TEMP_1, 1
setvar VAR_TEMP_2, 0
playse SE_PIN
call NewMauville_Inside_EventScript_237489
call NewMauville_Inside_EventScript_SetBarrierStateBlueButton
special DrawWholeMapView
releaseall
end
NewMauville_Inside_EventScript_237471:: @ 8237471
NewMauville_Inside_EventScript_GreenButton:: @ 8237471
lockall
setvar VAR_TEMP_1, 0
setvar VAR_TEMP_2, 1
playse SE_PIN
call NewMauville_Inside_EventScript_2375D7
call NewMauville_Inside_EventScript_SetBarrierStateGreenButton
special DrawWholeMapView
releaseall
end
NewMauville_Inside_EventScript_237489:: @ 8237489
NewMauville_Inside_EventScript_SetBarrierStateBlueButton:: @ 8237489
setmetatile 23, 34, METATILE_BikeShop_Barrier_Hidden_Top, 1
setmetatile 23, 35, METATILE_BikeShop_Barrier_Hidden_Bottom, 1
setmetatile 23, 36, METATILE_BikeShop_Floor_Shadow_Top, 0
@ -104,7 +104,7 @@ NewMauville_Inside_EventScript_237489:: @ 8237489
setmetatile 18, 36, METATILE_BikeShop_Button_Green, 0
return
NewMauville_Inside_EventScript_2375D7:: @ 82375D7
NewMauville_Inside_EventScript_SetBarrierStateGreenButton:: @ 82375D7
setmetatile 23, 34, METATILE_BikeShop_Barrier_Blue_Top, 1
setmetatile 23, 35, METATILE_BikeShop_Barrier_Blue_TopMid, 1
setmetatile 23, 36, METATILE_BikeShop_Barrier_Blue_BottomMid, 1
@ -144,15 +144,15 @@ NewMauville_Inside_EventScript_2375D7:: @ 82375D7
setmetatile 30, 38, METATILE_BikeShop_Button_Blue, 0
return
NewMauville_Inside_EventScript_237725:: @ 8237725
NewMauville_Inside_EventScript_RedButton:: @ 8237725
lockall
msgbox NewMauville_Inside_Text_237932, MSGBOX_DEFAULT
call NewMauville_Inside_EventScript_23773A
msgbox NewMauville_Inside_Text_SteppedOnSwitchGeneratorStopped, MSGBOX_DEFAULT
call NewMauville_Inside_EventScript_SetGeneratorOffMetatiles
setvar VAR_NEW_MAUVILLE_STATE, 2
releaseall
end
NewMauville_Inside_EventScript_23773A:: @ 823773A
NewMauville_Inside_EventScript_SetGeneratorOffMetatiles:: @ 823773A
setmetatile 33, 6, METATILE_BikeShop_Button_Pressed, 0
setmetatile 32, 2, METATILE_BikeShop_Generator_Off_Tile0, 1
setmetatile 33, 2, METATILE_BikeShop_Generator_Off_Tile1, 1
@ -165,20 +165,20 @@ NewMauville_Inside_EventScript_23773A:: @ 823773A
special DrawWholeMapView
return
NewMauville_Inside_EventScript_23778F:: @ 823778F
NewMauville_Inside_EventScript_Generator:: @ 823778F
lockall
compare VAR_NEW_MAUVILLE_STATE, 2
goto_if_eq NewMauville_Inside_EventScript_2377A5
msgbox NewMauville_Inside_Text_237896, MSGBOX_DEFAULT
goto_if_eq NewMauville_Inside_EventScript_GeneratorOff
msgbox NewMauville_Inside_Text_GeneratorRadiatingHeat, MSGBOX_DEFAULT
releaseall
end
NewMauville_Inside_EventScript_2377A5:: @ 82377A5
msgbox NewMauville_Inside_Text_237916, MSGBOX_DEFAULT
NewMauville_Inside_EventScript_GeneratorOff:: @ 82377A5
msgbox NewMauville_Inside_Text_GeneratorQuietedDown, MSGBOX_DEFAULT
releaseall
end
NewMauville_Inside_EventScript_2377AF:: @ 82377AF
NewMauville_Inside_EventScript_Voltorb1:: @ 82377AF
lock
faceplayer
setwildbattle SPECIES_VOLTORB, 25, ITEM_NONE
@ -191,21 +191,21 @@ NewMauville_Inside_EventScript_2377AF:: @ 82377AF
clearflag FLAG_SYS_CTRL_OBJ_DELETE
specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, B_OUTCOME_WON
goto_if_eq NewMauville_Inside_EventScript_2377F3
goto_if_eq NewMauville_Inside_EventScript_DefeatedVoltorb1
compare VAR_RESULT, B_OUTCOME_RAN
goto_if_eq NewMauville_Inside_EventScript_2377F3
goto_if_eq NewMauville_Inside_EventScript_DefeatedVoltorb1
compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED
goto_if_eq NewMauville_Inside_EventScript_2377F3
goto_if_eq NewMauville_Inside_EventScript_DefeatedVoltorb1
setflag FLAG_DEFEATED_VOLTORB_1_NEW_MAUVILLE
release
end
NewMauville_Inside_EventScript_2377F3:: @ 82377F3
NewMauville_Inside_EventScript_DefeatedVoltorb1:: @ 82377F3
setflag FLAG_DEFEATED_VOLTORB_1_NEW_MAUVILLE
goto Common_EventScript_RemoveStaticPokemon
end
NewMauville_Inside_EventScript_2377FC:: @ 82377FC
NewMauville_Inside_EventScript_Voltorb2:: @ 82377FC
lock
faceplayer
setwildbattle SPECIES_VOLTORB, 25, ITEM_NONE
@ -218,21 +218,21 @@ NewMauville_Inside_EventScript_2377FC:: @ 82377FC
clearflag FLAG_SYS_CTRL_OBJ_DELETE
specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, B_OUTCOME_WON
goto_if_eq NewMauville_Inside_EventScript_237840
goto_if_eq NewMauville_Inside_EventScript_DefeatedVoltorb2
compare VAR_RESULT, B_OUTCOME_RAN
goto_if_eq NewMauville_Inside_EventScript_237840
goto_if_eq NewMauville_Inside_EventScript_DefeatedVoltorb2
compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED
goto_if_eq NewMauville_Inside_EventScript_237840
goto_if_eq NewMauville_Inside_EventScript_DefeatedVoltorb2
setflag FLAG_DEFEATED_VOLTORB_2_NEW_MAUVILLE
release
end
NewMauville_Inside_EventScript_237840:: @ 8237840
NewMauville_Inside_EventScript_DefeatedVoltorb2:: @ 8237840
setflag FLAG_DEFEATED_VOLTORB_2_NEW_MAUVILLE
goto Common_EventScript_RemoveStaticPokemon
end
NewMauville_Inside_EventScript_237849:: @ 8237849
NewMauville_Inside_EventScript_Voltorb3:: @ 8237849
lock
faceplayer
setwildbattle SPECIES_VOLTORB, 25, ITEM_NONE
@ -245,30 +245,30 @@ NewMauville_Inside_EventScript_237849:: @ 8237849
clearflag FLAG_SYS_CTRL_OBJ_DELETE
specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, B_OUTCOME_WON
goto_if_eq NewMauville_Inside_EventScript_23788D
goto_if_eq NewMauville_Inside_EventScript_DefeatedVoltorb3
compare VAR_RESULT, B_OUTCOME_RAN
goto_if_eq NewMauville_Inside_EventScript_23788D
goto_if_eq NewMauville_Inside_EventScript_DefeatedVoltorb3
compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED
goto_if_eq NewMauville_Inside_EventScript_23788D
goto_if_eq NewMauville_Inside_EventScript_DefeatedVoltorb3
setflag FLAG_DEFEATED_VOLTORB_3_NEW_MAUVILLE
release
end
NewMauville_Inside_EventScript_23788D:: @ 823788D
NewMauville_Inside_EventScript_DefeatedVoltorb3:: @ 823788D
setflag FLAG_DEFEATED_VOLTORB_3_NEW_MAUVILLE
goto Common_EventScript_RemoveStaticPokemon
end
NewMauville_Inside_Text_237896: @ 8237896
NewMauville_Inside_Text_GeneratorRadiatingHeat: @ 8237896
.string "The generator is radiating heat that\n"
.string "can be felt even at a distance.\p"
.string "It looks like it should be turned off\n"
.string "as soon as possible.$"
NewMauville_Inside_Text_237916: @ 8237916
NewMauville_Inside_Text_GeneratorQuietedDown: @ 8237916
.string "The generator quieted down.$"
NewMauville_Inside_Text_237932: @ 8237932
NewMauville_Inside_Text_SteppedOnSwitchGeneratorStopped: @ 8237932
.string "{PLAYER} stepped on the switch.\p"
.string "Click…\p"
.string "… … … … … … … …\n"

View File

@ -381,7 +381,7 @@
#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Right_Alt 0x27C
#define METATILE_TrickHousePuzzle_Arrow_YellowOnWhite_Right 0x298
// gTileset_BikeShop
// gTileset_BikeShop (also used by New Mauville)
#define METATILE_BikeShop_Barrier_Hidden_Top 0x269
#define METATILE_BikeShop_Barrier_Hidden_Bottom 0x271
#define METATILE_BikeShop_Floor_Shadow_Top 0x26D