pokeemerald/data/maps/AbandonedShip_HiddenFloorRooms/scripts.inc

126 lines
3.8 KiB
PHP
Raw Normal View History

2021-07-20 21:18:31 +02:00
AbandonedShip_HiddenFloorRooms_MapScripts::
2019-11-06 15:31:04 +01:00
map_script MAP_SCRIPT_ON_FRAME_TABLE, AbandonedShip_HiddenFloorRooms_OnFrame
2017-11-10 02:21:31 +01:00
.byte 0
2021-07-20 21:18:31 +02:00
AbandonedShip_HiddenFloorRooms_OnFrame:
2019-11-06 15:31:04 +01:00
map_script_2 VAR_TEMP_1, 0, AbandonedShip_HiddenFloorRooms_EventScript_DoHiddenItemSparkle
2017-11-10 02:21:31 +01:00
.2byte 0
2019-11-06 15:31:04 +01:00
@ After the below calculation, VAR_TEMP_4 is the room number of the door the player entered
@ Bottom row, left column (Rm 1)
@ Bottom row, middle column (Rm 2)
@ Bottom row, right column (Rm 3)
@ Upper row, left column (Rm 4)
@ Upper row, middle column (Rm 5)
@ Upper row, right column (Rm 6)
2021-07-20 21:18:31 +02:00
AbandonedShip_HiddenFloorRooms_EventScript_DoHiddenItemSparkle::
2018-05-19 18:02:43 +02:00
setvar VAR_TEMP_1, 1
getplayerxy VAR_TEMP_2, VAR_TEMP_3
setvar VAR_TEMP_4, 1
compare VAR_TEMP_2, 21
2019-11-06 15:31:04 +01:00
call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_InMiddleRoomColumn
2018-05-19 18:02:43 +02:00
compare VAR_TEMP_2, 36
2019-11-06 15:31:04 +01:00
call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_InRightRoomColumn
2018-05-19 18:02:43 +02:00
compare VAR_TEMP_3, 2
2019-11-06 15:31:04 +01:00
call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_InUpperRoomRow
2018-05-19 18:02:43 +02:00
switch VAR_TEMP_4
2019-11-06 15:31:04 +01:00
case 1, AbandonedShip_HiddenFloorRooms_EventScript_EnterRm1
case 2, AbandonedShip_HiddenFloorRooms_EventScript_EnterRm2
case 3, AbandonedShip_HiddenFloorRooms_EventScript_EnterRm3
case 4, AbandonedShip_HiddenFloorRooms_EventScript_EnterRm4
case 5, AbandonedShip_HiddenFloorRooms_EventScript_EnterRm5
case 6, AbandonedShip_HiddenFloorRooms_EventScript_EnterRm6
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
AbandonedShip_HiddenFloorRooms_EventScript_InMiddleRoomColumn::
2018-05-19 18:02:43 +02:00
addvar VAR_TEMP_4, 1
2017-11-10 02:21:31 +01:00
return
2021-07-20 21:18:31 +02:00
AbandonedShip_HiddenFloorRooms_EventScript_InRightRoomColumn::
2018-05-19 18:02:43 +02:00
addvar VAR_TEMP_4, 2
2017-11-10 02:21:31 +01:00
return
2021-07-20 21:18:31 +02:00
AbandonedShip_HiddenFloorRooms_EventScript_InUpperRoomRow::
2018-05-19 18:02:43 +02:00
addvar VAR_TEMP_4, 3
2017-11-10 02:21:31 +01:00
return
2021-07-20 21:18:31 +02:00
AbandonedShip_HiddenFloorRooms_EventScript_EnterRm1::
2017-11-10 02:21:31 +01:00
delay 20
2019-11-06 16:11:54 +01:00
dofieldeffectsparkle 10, 10, 0
specialvar VAR_RESULT, FoundAbandonedShipRoom4Key
2019-11-06 15:31:04 +01:00
compare VAR_RESULT, FALSE
call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_Rm4KeySparkle
waitfieldeffect FLDEFF_SPARKLE
2017-11-10 02:21:31 +01:00
delay 10
end
2021-07-20 21:18:31 +02:00
AbandonedShip_HiddenFloorRooms_EventScript_EnterRm2::
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
AbandonedShip_HiddenFloorRooms_EventScript_EnterRm3::
specialvar VAR_RESULT, FoundAbandonedShipRoom1Key
2019-11-06 15:31:04 +01:00
compare VAR_RESULT, TRUE
goto_if_eq AbandonedShip_HiddenFloorRooms_EventScript_Rm3NoSparkle
2017-11-10 02:21:31 +01:00
delay 20
2019-11-06 15:31:04 +01:00
compare VAR_RESULT, FALSE
call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_Rm1KeySparkle
waitfieldeffect FLDEFF_SPARKLE
2017-11-10 02:21:31 +01:00
delay 10
end
2021-07-20 21:18:31 +02:00
AbandonedShip_HiddenFloorRooms_EventScript_Rm3NoSparkle::
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
AbandonedShip_HiddenFloorRooms_EventScript_EnterRm4::
2017-11-10 02:21:31 +01:00
delay 20
2019-11-06 16:11:54 +01:00
dofieldeffectsparkle 8, 5, 0
dofieldeffectsparkle 11, 3, 0
specialvar VAR_RESULT, FoundAbandonedShipRoom6Key
2019-11-06 15:31:04 +01:00
compare VAR_RESULT, FALSE
call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_Rm6KeySparkle
waitfieldeffect FLDEFF_SPARKLE
2017-11-10 02:21:31 +01:00
delay 10
end
2021-07-20 21:18:31 +02:00
AbandonedShip_HiddenFloorRooms_EventScript_EnterRm5::
2017-11-10 02:21:31 +01:00
delay 20
2019-11-06 16:11:54 +01:00
dofieldeffectsparkle 16, 3, 0
dofieldeffectsparkle 25, 2, 0
dofieldeffectsparkle 24, 6, 0
specialvar VAR_RESULT, FoundAbandonedShipRoom2Key
2019-11-06 15:31:04 +01:00
compare VAR_RESULT, FALSE
call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_Rm2KeySparkle
waitfieldeffect FLDEFF_SPARKLE
2017-11-10 02:21:31 +01:00
delay 10
end
2021-07-20 21:18:31 +02:00
AbandonedShip_HiddenFloorRooms_EventScript_EnterRm6::
2017-11-10 02:21:31 +01:00
end
2021-07-20 21:18:31 +02:00
AbandonedShip_HiddenFloorRooms_EventScript_Rm1KeySparkle::
2019-11-06 16:11:54 +01:00
dofieldeffectsparkle 42, 10, 0
2017-11-10 02:21:31 +01:00
return
2021-07-20 21:18:31 +02:00
AbandonedShip_HiddenFloorRooms_EventScript_Rm2KeySparkle::
2019-11-06 16:11:54 +01:00
dofieldeffectsparkle 20, 5, 0
2017-11-10 02:21:31 +01:00
return
2021-07-20 21:18:31 +02:00
AbandonedShip_HiddenFloorRooms_EventScript_Rm4KeySparkle::
2019-11-06 16:11:54 +01:00
dofieldeffectsparkle 1, 12, 0
2017-11-10 02:21:31 +01:00
return
2021-07-20 21:18:31 +02:00
AbandonedShip_HiddenFloorRooms_EventScript_Rm6KeySparkle::
2019-11-06 16:11:54 +01:00
dofieldeffectsparkle 1, 2, 0
2017-11-10 02:21:31 +01:00
return
2021-07-20 21:18:31 +02:00
AbandonedShip_HiddenFloorRooms_EventScript_Trash::
2017-11-10 02:21:31 +01:00
lockall
2019-11-06 15:31:04 +01:00
msgbox AbandonedShip_HiddenFloorRooms_Text_BrightShinyTrash, MSGBOX_DEFAULT
2017-11-10 02:21:31 +01:00
releaseall
end
2021-07-20 21:18:31 +02:00
AbandonedShip_HiddenFloorRooms_Text_BrightShinyTrash:
2018-12-07 16:41:08 +01:00
.string "It's bright and shiny!\n"
.string "But it's just trash…$"
2017-11-10 02:21:31 +01:00