From f750b7cb0623a67d25748764d59176adb0dc6192 Mon Sep 17 00:00:00 2001 From: codemann8 Date: Fri, 16 Aug 2024 21:46:18 -0500 Subject: [PATCH] Hera basement key double counting fix --- keydrop/standing_items.asm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/keydrop/standing_items.asm b/keydrop/standing_items.asm index 5cd31ce..b8539cc 100644 --- a/keydrop/standing_items.asm +++ b/keydrop/standing_items.asm @@ -674,12 +674,13 @@ KeyGet: + LDY.w SprItemReceipt, X LDA.w SprItemIndex, X : STA.w SpawnedItemIndex LDA.w SprItemFlags, X : STA.w SpawnedItemFlag - LDA.b RoomIndex : CMP.b #$87 : BNE + ;check for hera cage - LDA.w SpawnedItemFlag : BNE + ; if it came from a pot, it's fine - JSR ShouldKeyBeCountedForDungeon : BCC ++ - JSL CountChestKeyLong - ++ PLA : RTL - + STY.b Scrap00 + ; LDA.b RoomIndex : CMP.b #$87 : BNE + ;check for hera cage + ; LDA.w SpawnedItemFlag : BNE + ; if it came from a pot, it's fine + ; JSR ShouldKeyBeCountedForDungeon : BCC ++ + ; JSL CountChestKeyLong + ; ++ PLA : RTL + ;+ + STY.b Scrap00 LDA.w SprItemMWPlayer, X : STA.l !MULTIWORLD_ITEM_PLAYER_ID STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID : BNE .receive PHX