Skip to content

Commit

Permalink
Roclobster event
Browse files Browse the repository at this point in the history
  • Loading branch information
Pseurae committed Jul 2, 2023
1 parent 8c6c194 commit 579ea48
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 30 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ This patch is mostly compatible with vanilla saves. The bag expansion patch **wi
- Use any Electric moves for SS Cangrejo's elevator event
- Avoid softlock after losing the Senex battle
- Set respawn point in Sootopolis City before heading to Sootopolis Heights
- Hard Disk Solo is obtained without having to catch Roclobster

</details>

Expand Down
9 changes: 7 additions & 2 deletions config.asm
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
; Implement an Emerald Style Save Prompt with colored fields.
.definelabel EMERALD_SAVE_PROMPT, 1

; Enable this to have shadows on NPCs like in HGSS.
.definelabel OW_EVENT_SHADOWS, 1

; Bugfixes
; --------

Expand Down Expand Up @@ -83,5 +86,7 @@
; Enable this to explicitly set a respawn point in Sootopolis City when heading off to Sootopolis Heights.
.definelabel NECROPOLIS_RESPAWN, 1

; Enable this to have shadows on NPCs like in HGSS.
.definelabel OW_EVENT_SHADOWS, 1
; If you don't catch Roclobster from the dive spot in Dewford, you can't
; legally obtain the "Hard Disk Solo" and thus, cannot visit the Gym Island.
; Enable this to receive the item after the Roclobster battle.
.definelabel NEW_ROCLOBSTER_SCRIPT, 1
1 change: 1 addition & 0 deletions main.asm
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
.include "scripts/bugfixes/littleroot_tiles.asm"
.include "scripts/bugfixes/meteor_portrait.asm"
.include "scripts/bugfixes/necropolis_respawn.asm"
.include "scripts/bugfixes/roclobster.asm"
.include "scripts/bugfixes/senex_lilycove.asm"
.include "scripts/bugfixes/shop_frame_tiles.asm"
.include "scripts/bugfixes/ss_cangrejo.asm"
Expand Down
30 changes: 30 additions & 0 deletions scripts/bugfixes/roclobster.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.if NEW_ROCLOBSTER_SCRIPT
; Rock Lobster in Dewford Town divespot requires a HM check
.org 0x88259A3
s_goto @EventScript_RockLobster

.autoregion
@EventScript_RockLobster:
s_lock
s_goto_if_unset FLAG_BADGE03_GET, 0x81B0F3E
s_setvar VAR_0x8004, ITEM_HM06_ROCK_SMASH
s_callnative CheckIfPartyCanUseHM + 1
s_compare VAR_RESULT, 6
s_goto_if_eq 0x81B0F3E
s_msgbox 0x88259F7, MSGBOX_AUTOCLOSE
s_applymovement 0xFF, 0x880EE4F
s_waitmovement 0xFF
s_playbgm 0x166, 0x0
s_msgbox 0x8825A3E, MSGBOX_AUTOCLOSE
s_playmoncry 0x73, 0x0
s_msgbox 0x8825A62, MSGBOX_AUTOCLOSE
s_waitmoncry
s_setwildbattle 0x73, 0x32, 0x0
s_dowildbattle
s_setflag 0x3D44
s_removeobject 0x1
s_finditem 0x30, 0x1
s_release
s_end
.endautoregion
.endif
28 changes: 0 additions & 28 deletions scripts/hm_system.asm
Original file line number Diff line number Diff line change
Expand Up @@ -210,32 +210,4 @@ mov r0, #0
mov r0, #0
bx lr
.endarea

; Rock Lobster in Dewford Town divespot requires a HM check
.org 0x88259A3
s_goto @EventScript_RockLobster

.autoregion
@EventScript_RockLobster:
s_lock
s_goto_if_unset FLAG_BADGE03_GET, @CannotUseRockSmash
s_setvar VAR_0x8004, ITEM_HM06_ROCK_SMASH
s_callnative CheckIfPartyCanUseHM + 1
s_compare VAR_RESULT, 6
s_goto_if_eq 0x81B0F3E
s_msgbox 0x88259F7, MSGBOX_AUTOCLOSE
s_applymovement 0xFF, 0x880EE4F
s_waitmovement 0xFF
s_playbgm 0x166, 0x0
s_msgbox 0x8825A3E, MSGBOX_AUTOCLOSE
s_playmoncry 0x73, 0x0
s_msgbox 0x8825A62, MSGBOX_AUTOCLOSE
s_waitmoncry
s_setwildbattle 0x73, 0x32, 0x30
s_dowildbattle
s_setflag 0x3D44
s_removeobject 0x1
s_release
s_end
.endautoregion
.endif

0 comments on commit 579ea48

Please sign in to comment.