pokeyellow/scripts/SeafoamIslands1F.asm

49 lines
1.3 KiB
NASM
Raw Normal View History

SeafoamIslands1F_Script:
2014-05-18 18:19:10 +00:00
call EnableAutoTextBoxDrawing
2015-07-21 17:36:03 +00:00
SetEvent EVENT_IN_SEAFOAM_ISLANDS
ld hl, wMiscFlags
bit BIT_PUSHED_BOULDER, [hl]
res BIT_PUSHED_BOULDER, [hl]
jr z, .noBoulderWasPushed
2014-05-18 18:19:10 +00:00
ld hl, Seafoam1HolesCoords
call CheckBoulderCoords
ret nc
2015-07-21 17:36:03 +00:00
EventFlagAddress hl, EVENT_SEAFOAM1_BOULDER1_DOWN_HOLE
2015-07-19 03:49:52 +00:00
ld a, [wCoordIndex]
2014-05-18 18:19:10 +00:00
cp $1
jr nz, .boulder2FellDownHole
2015-07-21 17:36:03 +00:00
SetEventReuseHL EVENT_SEAFOAM1_BOULDER1_DOWN_HOLE
ld a, HS_SEAFOAM_ISLANDS_1F_BOULDER_1
2015-07-25 03:27:59 +00:00
ld [wObjectToHide], a
ld a, HS_SEAFOAM_ISLANDS_B1F_BOULDER_1
2015-07-25 03:27:59 +00:00
ld [wObjectToShow], a
jr .hideAndShowBoulderObjects
.boulder2FellDownHole
2015-07-21 17:36:03 +00:00
SetEventAfterBranchReuseHL EVENT_SEAFOAM1_BOULDER2_DOWN_HOLE, EVENT_SEAFOAM1_BOULDER1_DOWN_HOLE
ld a, HS_SEAFOAM_ISLANDS_1F_BOULDER_2
2015-07-25 03:27:59 +00:00
ld [wObjectToHide], a
ld a, HS_SEAFOAM_ISLANDS_B1F_BOULDER_2
2015-07-25 03:27:59 +00:00
ld [wObjectToShow], a
.hideAndShowBoulderObjects
2015-07-25 03:27:59 +00:00
ld a, [wObjectToHide]
ld [wMissableObjectIndex], a
predef HideObject
2015-07-25 03:27:59 +00:00
ld a, [wObjectToShow]
ld [wMissableObjectIndex], a
predef_jump ShowObject
.noBoulderWasPushed
ld a, SEAFOAM_ISLANDS_B1F
2014-09-13 07:50:56 +00:00
ld [wDungeonWarpDestinationMap], a
2014-05-18 18:19:10 +00:00
ld hl, Seafoam1HolesCoords
2015-07-19 03:49:52 +00:00
jp IsPlayerOnDungeonWarp
2014-05-18 18:19:10 +00:00
Seafoam1HolesCoords:
dbmapcoord 17, 6
dbmapcoord 24, 6
db -1 ; end
2014-05-18 18:19:10 +00:00
SeafoamIslands1F_TextPointers:
def_text_pointers
dw_const BoulderText, TEXT_SEAFOAMISLANDS1F_BOULDER1
dw_const BoulderText, TEXT_SEAFOAMISLANDS1F_BOULDER2