Various bug fixes for Follower Shuffle post-launch

- Fix issue with infinite purple chest item get
- Fix issue with Kiki running away on iframe ledge hops
- Fix issue with bad follower gfx on screens with followers
- Fix issue with Zelda appearing in conditional follower locations
This commit is contained in:
codemann8
2025-05-04 09:24:33 -05:00
parent 7b4470ddae
commit 86efa74185
5 changed files with 33 additions and 5 deletions

View File

@@ -180,6 +180,10 @@ LDA.b IndoorsFlag : BNE +
+
RTL
PostFixMirrorGfx:
JSL HandleFollowersAfterMirroring
JML FollowerGfxRedraw
PostFixOAMGfx:
JSL FollowerGfxRedraw
REP #$30 : LDA.w #$2000 ; what we wrote over

View File

@@ -77,6 +77,8 @@ org $9EE495
JSL Kiki_FollowCheck : BRA + : NOP #12 : +
org $9EE4AF
JSL Kiki_BecomeFollower : NOP #2
org $89A1B2
JSL Kiki_DontScareTheMonke : NOP #3
org $868D63
JSL SpritePrep_Locksmith : NOP #2 : db $90 ; BCC
@@ -84,13 +86,13 @@ org $868D7E
db $80 ; BRA
org $86BCD9
JML Locksmith_Chillin_PostMessage
org $86BD09
JSL Locksmith_BecomeFollower : NOP #2
org $86BD7A ; allow follower pickup after purple chest item
LDA.b #$00 : STA.w SpriteActivity, X
JSL Locksmith_RespondToAnswer_PostItem
org $86BDB4
JSL SpriteDraw_LocksmithFollower
org $86BD09
JSL Locksmith_BecomeFollower : NOP #2
pullpc
MaybeDeleteFollowersOnDeath:
@@ -421,11 +423,14 @@ DetermineFollowerSpawn:
PHA
; despawn if pre-requisite not met
LDA.w SpriteTypeTable, X : CMP.b #$B4 : BNE +
LDA.l NpcFlagsVanilla : AND.b #$20 : EOR.b #$20 : CMP.b #$20 : PLA : RTL
LDA.l NpcFlagsVanilla : AND.b #$20 : EOR.b #$20 : CMP.b #$20
BRA .prereq_check
+ CMP.b #$B5 : BNE +
LDA.l CrystalsField : AND.b #$05 : CMP.b #$05
LDA.b #$FF : ADC.b #$00 : ROR ; flip carry flag
PLA : RTL
.prereq_check
PLA : BCC .check_resolved
RTL
+
PLA
.check_resolved
@@ -811,6 +816,18 @@ Kiki_BecomeFollower:
LDA.b #$0A : STA.l FollowerIndicator
RTL
; on return it checks BEQ and if non-zero, kiki get spook
Kiki_DontScareTheMonke:
LDA.b LinkJumping : BEQ .return
LDA.w NoDamage : BNE .no_spook
LDA.w LinkThud : BNE .no_spook
.spook
LDA.b #$01 : RTL
.no_spook
LDA.b #$00
.return
RTL
SpritePrep_Locksmith:
LDA.l FollowerTravelAllowed : CMP.b #$02 : BNE .vanilla
JSL DetermineFollowerSpawn_locksmith_check : BCS +
@@ -880,8 +897,10 @@ Locksmith_BecomeFollower:
Locksmith_RespondToAnswer_PostItem:
STA.l FollowerIndicator ; what we wrote over
LDA.l FollowerTravelAllowed : CMP.b #$02 : BNE .no_despawn
LDA.l Follower_Locksmith : CMP.b #$0C : BEQ .despawn
LDA.w SpriteAux, X : BNE .no_despawn
LDA.l Follower_Locksmith : CMP.b #$0C : BNE .no_despawn
STZ.w SpriteAITable, X
.despawn
STZ.w SpriteAITable, X
.no_despawn
RTL

View File

@@ -410,6 +410,8 @@ JSL OnLoadDuckMap
;================================================================================
; Fix Clobbered Gfx
;--------------------------------------------------------------------------------
org $80DB92
JSL PostFixMirrorGfx
org $80E259
JSL PostFixOAMGfx : NOP

View File

@@ -221,6 +221,7 @@ ItemReceiptMethod = $7E02E9 ;
;
TileActBE = $7E02EF ; Bitfield used by breakables and entrances. b b b b d d d d
; b = Breakables | d = Entrances
LinkThud = $7E02F8 ; When set, guarantees a thud on landing
FollowerNoDraw = $7E02F9 ; When set, prevents follower from drawing and forces a game mode check
UseY1 = $7E0301 ; Bitfield for Y-item usage: b p - a x z h r
; b = Boomerang | p = Powder | a = Bow | x = Hammer (tested, never set)
@@ -842,6 +843,7 @@ endmacro
%assertRAM(CutsceneFlag, $7E02E4)
%assertRAM(ItemReceiptMethod, $7E02E9)
%assertRAM(TileActBE, $7E02EF)
%assertRAM(LinkThud, $7E02F8)
%assertRAM(FollowerNoDraw, $7E02F9)
%assertRAM(UseY1, $7E0301)
%assertRAM(CurrentYItem, $7E0303)

View File

@@ -94,6 +94,7 @@ Player_HaltDashAttackLong = $8791B3
Link_ReceiveItem = $87999D
Link_ReceiveItem_cool_pose = $8799EE
Link_ReceiveItem_not_cool_pose = $8799F2
HandleFollowersAfterMirroring = $87AA8B
LinkHop_FindArbitraryLandingSpot = $87E359
Link_HandleMovingAnimation_FullLongEntry = $87E68F
Link_CheckForEdgeScreenTransition = $87F413