mirror of
https://github.com/thornAvery/jep-hack.git
synced 2026-02-06 16:15:24 +13:00
Partial Safari Game implementation
This adds some infrastructure for the Safari Game, specifically; - The guards who let you in; the ticket is given and Safari Balls are provided; you also get the leaving early and so on. Bit janky at times. - Infrastructure for the step system, albeit unfinished; the steps aren't initially counted and there's no kicking out process yet. All in all, it's now playable, but the loss conditions are not yet finished. I shall now lay down in a dark room.
This commit is contained in:
parent
b64504b9fd
commit
76c497dd99
9 changed files with 288 additions and 6 deletions
|
|
@ -880,6 +880,8 @@ CountStep:
|
|||
; If Repel wore off, don't count the step.
|
||||
call DoRepelStep
|
||||
jr c, .doscript
|
||||
|
||||
call DoSafariStep
|
||||
|
||||
; Count the step for poison and total steps
|
||||
ld hl, wPoisonStepCount
|
||||
|
|
@ -953,6 +955,33 @@ DoRepelStep:
|
|||
scf
|
||||
ret
|
||||
|
||||
; It's basically the same as the Repel, so we can do that.
|
||||
DoSafariStep:
|
||||
; Firstly, check the player is within the landmark.
|
||||
; Even the gates of the Safari Zone do not have the landmark. This is to ensure the steps and wild encounters are always part of the game.
|
||||
ld a, [wMapGroup]
|
||||
ld b, a
|
||||
ld a, [wMapNumber]
|
||||
ld c, a
|
||||
call GetWorldMapLocation
|
||||
cp LANDMARK_KANTO_SAFARI_ZONE ; I am 99.9% sure this can be done better
|
||||
jr nz, .skip
|
||||
; cp LANDMARK_JOHTO_SAFARI_ZONE enable these when they're up pls
|
||||
; jr nz, .skip
|
||||
; cp LANDMARK_NIHON_SAFARI_ZONE
|
||||
; jr nz, .skip
|
||||
|
||||
ld a, [wSafariZoneStepCount]
|
||||
and a
|
||||
ret z
|
||||
|
||||
dec a
|
||||
ld [wSafariZoneStepCount], a
|
||||
ret nz
|
||||
|
||||
.skip
|
||||
ret ; juuuuust to make sure, but also part of the safari step check.
|
||||
|
||||
DoPlayerEvent:
|
||||
ld a, [wScriptRunning]
|
||||
and a
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue