mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-12-31 14:39:35 +13:00
vermilion gym trash can puzzle data
This commit is contained in:
parent
ffc0b8f9de
commit
093a5b9a4d
64
main.asm
64
main.asm
|
|
@ -98631,34 +98631,46 @@ GymTrashScript: ; 5ddfc (17:5dfc)
|
||||||
call EnableAutoTextBoxDrawing
|
call EnableAutoTextBoxDrawing
|
||||||
ld a, [wWhichTrade] ; $cd3d
|
ld a, [wWhichTrade] ; $cd3d
|
||||||
ld [$cd5b], a
|
ld [$cd5b], a
|
||||||
|
|
||||||
|
; Don't do the trash can puzzle if it's already been done.
|
||||||
ld a, [$d773]
|
ld a, [$d773]
|
||||||
bit 0, a
|
bit 0, a
|
||||||
jr z, .asm_5de11
|
jr z, .ok
|
||||||
|
|
||||||
ld a, $26 ; DisplayTextID $26 = VermilionGymTrashText (nothing in the trash)
|
ld a, $26 ; DisplayTextID $26 = VermilionGymTrashText (nothing in the trash)
|
||||||
jp Func_3ef5
|
jp Func_3ef5
|
||||||
.asm_5de11
|
|
||||||
|
.ok
|
||||||
bit 1, a
|
bit 1, a
|
||||||
jr nz, .resetOrOpenLocks
|
jr nz, .trySecondLock
|
||||||
|
|
||||||
ld a, [$d743]
|
ld a, [$d743]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [$cd5b]
|
ld a, [$cd5b]
|
||||||
cp b
|
cp b
|
||||||
jr z, .openFirstLock
|
jr z, .openFirstLock
|
||||||
|
|
||||||
ld a, $26 ; DisplayTextID $26 = VermilionGymTrashText (nothing in the trash)
|
ld a, $26 ; DisplayTextID $26 = VermilionGymTrashText (nothing in the trash)
|
||||||
jr .endTrashScript
|
jr .done
|
||||||
|
|
||||||
.openFirstLock
|
.openFirstLock
|
||||||
|
; Next can is trying for the second switch.
|
||||||
ld hl, $d773
|
ld hl, $d773
|
||||||
set 1, [hl]
|
set 1, [hl]
|
||||||
ld hl, Unknown_5de7d ; $5e7d
|
|
||||||
|
ld hl, GymTrashCans ; $5e7d
|
||||||
ld a, [$cd5b]
|
ld a, [$cd5b]
|
||||||
|
; * 5
|
||||||
ld b, a
|
ld b, a
|
||||||
add a
|
add a
|
||||||
add a
|
add a
|
||||||
add b
|
add b
|
||||||
ld d, $0
|
|
||||||
|
ld d, 0
|
||||||
ld e, a
|
ld e, a
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
|
|
||||||
ld [$FF00+$db], a
|
ld [$FF00+$db], a
|
||||||
push hl
|
push hl
|
||||||
call GenRandom
|
call GenRandom
|
||||||
|
|
@ -98668,38 +98680,64 @@ GymTrashScript: ; 5ddfc (17:5dfc)
|
||||||
and b
|
and b
|
||||||
dec a
|
dec a
|
||||||
pop hl
|
pop hl
|
||||||
ld d, $0
|
|
||||||
|
ld d, 0
|
||||||
ld e, a
|
ld e, a
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and $f
|
and $f
|
||||||
ld [$d744], a
|
ld [$d744], a
|
||||||
|
|
||||||
ld a, $3b ; DisplayTextID $3b = VermilionGymTrashSuccesText1 (first lock opened!)
|
ld a, $3b ; DisplayTextID $3b = VermilionGymTrashSuccesText1 (first lock opened!)
|
||||||
jr .endTrashScript
|
jr .done
|
||||||
.resetOrOpenLocks
|
|
||||||
|
.trySecondLock
|
||||||
ld a, [$d744]
|
ld a, [$d744]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [$cd5b]
|
ld a, [$cd5b]
|
||||||
cp b
|
cp b
|
||||||
jr z, .openSecondLock
|
jr z, .openSecondLock
|
||||||
|
|
||||||
|
; Reset the cans.
|
||||||
ld hl, $d773
|
ld hl, $d773
|
||||||
res 1, [hl]
|
res 1, [hl]
|
||||||
call GenRandom
|
call GenRandom
|
||||||
|
|
||||||
and $e
|
and $e
|
||||||
ld [$d743], a
|
ld [$d743], a
|
||||||
|
|
||||||
ld a, $3e ; DisplayTextID $3e = VermilionGymTrashFailText (locks reset!)
|
ld a, $3e ; DisplayTextID $3e = VermilionGymTrashFailText (locks reset!)
|
||||||
jr .endTrashScript
|
jr .done
|
||||||
|
|
||||||
.openSecondLock
|
.openSecondLock
|
||||||
|
; Completed the trash can puzzle.
|
||||||
ld hl, $d773
|
ld hl, $d773
|
||||||
set 0, [hl]
|
set 0, [hl]
|
||||||
ld hl, $d126
|
ld hl, $d126
|
||||||
set 6, [hl]
|
set 6, [hl]
|
||||||
|
|
||||||
ld a, $3d ; DisplayTextID $3d = VermilionGymTrashSuccesText3 (2nd lock opened!)
|
ld a, $3d ; DisplayTextID $3d = VermilionGymTrashSuccesText3 (2nd lock opened!)
|
||||||
.endTrashScript
|
|
||||||
|
.done
|
||||||
jp Func_3ef5
|
jp Func_3ef5
|
||||||
|
|
||||||
Unknown_5de7d: ; 5de7d (17:5e7d)
|
GymTrashCans: ; 5de7d (17:5e7d)
|
||||||
INCBIN "baserom.gbc",$5de7d,$5dec8 - $5de7d
|
db 2, 1, 3, 0, 0 ; 0
|
||||||
|
db 3, 0, 2, 4, 0 ; 1
|
||||||
|
db 2, 1, 5, 0, 0 ; 2
|
||||||
|
db 3, 0, 4, 6, 0 ; 3
|
||||||
|
db 4, 1, 3, 5, 7 ; 4
|
||||||
|
db 3, 2, 4, 8, 0 ; 5
|
||||||
|
db 3, 3, 7, 9, 0 ; 6
|
||||||
|
db 4, 4, 6, 8, 10 ; 7
|
||||||
|
db 3, 5, 7, 11, 0 ; 8
|
||||||
|
db 3, 6, 10, 12, 0 ; 9
|
||||||
|
db 4, 7, 9, 11, 13 ; 10
|
||||||
|
db 3, 8, 10, 14, 0 ; 11
|
||||||
|
db 2, 9, 13, 0, 0 ; 12
|
||||||
|
db 3, 10, 12, 14, 0 ; 13
|
||||||
|
db 2, 11, 13, 0, 0 ; 14
|
||||||
|
; 5dec8
|
||||||
|
|
||||||
VermilionGymTrashSuccesText1: ; 5dec8 (17:5ec8)
|
VermilionGymTrashSuccesText1: ; 5dec8 (17:5ec8)
|
||||||
TX_FAR _VermilionGymTrashSuccesText1
|
TX_FAR _VermilionGymTrashSuccesText1
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue