From d3eb4c229fb0482672afdb20ee687761576f836a Mon Sep 17 00:00:00 2001 From: codemann8 Date: Wed, 30 Oct 2024 10:20:51 -0500 Subject: [PATCH] Fixed issue with vanilla HCBK acting like a small key --- inventory.asm | 1 + keydrop/standing_items.asm | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/inventory.asm b/inventory.asm index c324075..693800c 100644 --- a/inventory.asm +++ b/inventory.asm @@ -228,6 +228,7 @@ DungeonIncrement: LDA.w DungeonID : BMI .done CMP.l BallNChainDungeon : BNE + CPY.b #$32 : BEQ .ballchain_bigkey + CPY.b #$9F : BEQ .ballchain_bigkey + CMP.b #$00 : BNE + INC #2 diff --git a/keydrop/standing_items.asm b/keydrop/standing_items.asm index ef090b9..1263391 100644 --- a/keydrop/standing_items.asm +++ b/keydrop/standing_items.asm @@ -432,8 +432,10 @@ CheckIfDropValid: LDA.w SprSourceItemId, X : STA.w SpawnedItemID LDA.w SprItemMWPlayer, X : STA.w SpawnedItemMWPlayer LDY.b #$01 ; trigger the small key routines - LDA.w SpawnedItemID : STA.b Scrap00 : CMP.b #$32 : BNE + - LDA.l StandingItemsOn : BNE + + LDA.w SpawnedItemID : STA.b Scrap00 + CMP.b #$32 : BEQ ++ + CMP.b #$9F : BNE + ; HC BK check + ++ LDA.l StandingItemsOn : BNE + INY ; big key routine + PHX @@ -702,8 +704,9 @@ db $A0, $A0, $A2, $A3, $A4, $A5, $A6, $A7, $A8, $A9, $AA, $AB, $AC, $AD BigKeyGet: LDY.w SprItemReceipt, X - CPY.b #$32 : BNE + - STZ.w ItemReceiptMethod : LDY.b #$32 ; what we wrote over + CPY.b #$32 : BEQ ++ + CPY.b #$9F : BNE + : LDA.l StandingItemsOn : BNE +; HC BK check + ++ STZ.w ItemReceiptMethod : LDY.b #$32 ; what we wrote over PHX : JSL Link_ReceiveItem : PLX ; what we wrote over CLC : RTL + SEC : RTL