From a3bc24c383c2175dfa5fc6899e2785ca5c4eca71 Mon Sep 17 00:00:00 2001 From: cassidoxa Date: Sun, 13 Aug 2023 19:51:29 -0400 Subject: [PATCH] Quick fixes for shop fighter shield and retro shop arrow --- itemdatatables.asm | 2 +- newitems.asm | 18 ++++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/itemdatatables.asm b/itemdatatables.asm index 86fee15..2f7918e 100644 --- a/itemdatatables.asm +++ b/itemdatatables.asm @@ -89,7 +89,7 @@ endmacro %ReceiptProps($40, -4, 0, $34, $F360, $9C, skip, skip) ; 40 - 100 rupees %ReceiptProps($41, -4, 0, $35, $F360, $CE, skip, skip) ; 41 - 50 rupees %ReceiptProps($42, -2, 4, $31, $F372, $FF, skip, skip) ; 42 - Heart -%ReceiptProps($43, -2, 4, $33, $F376, $01, skip, skip) ; 43 - Arrow +%ReceiptProps($43, -2, 4, $33, $F376, $01, single_arrow, skip) ; 43 - Arrow %ReceiptProps($44, -4, 0, $02, $F376, $0A, skip, skip) ; 44 - 10 arrows %ReceiptProps($45, -2, 4, $32, $F373, $FF, skip, skip) ; 45 - Small magic %ReceiptProps($46, -4, 0, $36, $F360, $FF, skip, skip) ; 46 - 300 rupees diff --git a/newitems.asm b/newitems.asm index b4cfec9..45a03dc 100644 --- a/newitems.asm +++ b/newitems.asm @@ -202,18 +202,24 @@ ItemBehavior: .fighter_shield SEP #$10 - LDX.b #$01 - JSR .increment_shield + LDA.w ShopPurchaseFlag : BNE ..shop_shield + - + LDX.b #$01 + JSR .increment_shield + RTS + ..shop_shield + TYX + LDA.l InventoryTable_properties,X : BIT.b #$02 : BNE - RTS .red_shield SEP #$10 - LDA.w ShopPurchaseFlag : BNE .shop_shield + LDA.w ShopPurchaseFlag : BNE ..shop_shield - LDX.b #$02 JSR .increment_shield RTS - .shop_shield + ..shop_shield TYX LDA.l InventoryTable_properties,X : BIT.b #$02 : BNE - RTS @@ -411,6 +417,10 @@ ItemBehavior: + RTS + .single_arrow + INC.w UpdateHUD + RTS + .rupoor REP #$20 : LDA.l CurrentRupees : !SUB RupoorDeduction : STA.l CurrentRupees : SEP #$20 ; Take 1 rupee RTS