Fix cave state item cutscene flag with boss hearts
Add item substitutions
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
;--------------------------------------------------------------------------------
|
||||
LoadLibraryItemGFX:
|
||||
%GetPossiblyEncryptedItem(LibraryItem, SpriteItemValues)
|
||||
JSL.l AttemptItemSubstitution
|
||||
JSL.l ResolveLootIDLong
|
||||
STA.w SpriteID, X
|
||||
JSL.l PrepDynamicTile_loot_resolved
|
||||
@@ -30,6 +31,7 @@ LoadBonkItemGFX:
|
||||
LoadBonkItemGFX_inner:
|
||||
LDA.b #$00 : STA.l RedrawFlag
|
||||
JSR LoadBonkItem
|
||||
JSL.l AttemptItemSubstitution
|
||||
JSL.l ResolveLootIDLong
|
||||
STA.w SpriteItemType, X
|
||||
STA.w SpriteID, X
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
;--------------------------------------------------------------------------------
|
||||
SpawnDungeonPrize:
|
||||
PHX : PHB
|
||||
JSL.l AttemptItemSubstitution
|
||||
JSL.l ResolveLootIDLong
|
||||
STA.w ItemReceiptID
|
||||
TAX
|
||||
@@ -61,6 +62,7 @@ RTS
|
||||
PrepPrizeTile:
|
||||
PHA : PHX : PHY
|
||||
LDA.w AncillaGet, X
|
||||
JSL.l AttemptItemSubstitution
|
||||
JSL.l ResolveLootIDLong
|
||||
STA.w SpriteID,X
|
||||
JSL.l TransferItemReceiptToBuffer_using_ReceiptID
|
||||
@@ -69,6 +71,7 @@ RTL
|
||||
|
||||
SetItemPose:
|
||||
PHA
|
||||
LDA.w DungeonID : BMI .one_handed
|
||||
LDA.w RoomItemsTaken : BIT.b #$80 : BNE +
|
||||
.one_handed
|
||||
PLA
|
||||
@@ -97,6 +100,7 @@ SetCutsceneFlag:
|
||||
; Out: c - Cutscene flag $02 if set, $01 if unset.
|
||||
PHX
|
||||
LDY.b #$01 ; wrote over
|
||||
LDA.w DungeonID : BMI .no_cutscene
|
||||
LDA.w RoomItemsTaken : BIT #$80 : BNE .dungeon_prize
|
||||
.no_cutscene
|
||||
PLX
|
||||
@@ -112,6 +116,7 @@ RTL
|
||||
AnimatePrizeCutscene:
|
||||
LDA.w ItemReceiptMethod : CMP.b #$03 : BNE +
|
||||
JSR.w CrystalOrPendantBehavior : BCC +
|
||||
LDA.w DungeonID : BMI +
|
||||
LDA.w RoomItemsTaken : BIT #$80 : BEQ +
|
||||
SEC
|
||||
RTL
|
||||
@@ -148,7 +153,9 @@ RTL
|
||||
|
||||
MaybeKeepLootID:
|
||||
PHA
|
||||
LDA.w DungeonID : BMI .no_prize
|
||||
LDA.w RoomItemsTaken : BIT #$80 : BNE .prize
|
||||
.no_prize
|
||||
STZ.w ItemReceiptID
|
||||
STZ.w ItemReceiptPose
|
||||
PLA
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
HeartPieceGet:
|
||||
PHX : PHY
|
||||
JSL.l LoadHeartPieceRoomValue
|
||||
JSL.l AttemptItemSubstitution
|
||||
JSL.l ResolveLootIDLong
|
||||
TAY
|
||||
JSL.l MaybeMarkDigSpotCollected
|
||||
@@ -112,6 +113,7 @@ HeartPieceSpritePrep:
|
||||
|
||||
LDA.b #$00 : STA.l RedrawFlag
|
||||
JSL.l LoadHeartPieceRoomValue
|
||||
JSL.l AttemptItemSubstitution
|
||||
JSL.l ResolveLootIDLong
|
||||
STA.w SpriteID, X
|
||||
JSL.l PrepDynamicTile_loot_resolved
|
||||
@@ -125,6 +127,7 @@ HeartContainerSpritePrep:
|
||||
|
||||
LDA.b #$00 : STA.l RedrawFlag
|
||||
JSL.l LoadHeartContainerRoomValue ; load item type
|
||||
JSL.l AttemptItemSubstitution
|
||||
JSL.l ResolveLootIDLong
|
||||
STA.w SpriteID, X
|
||||
JSL.l PrepDynamicTile_loot_resolved
|
||||
|
||||
@@ -520,6 +520,7 @@ LoadPowder:
|
||||
PHX
|
||||
JSL.l Sprite_SpawnDynamically ; thing we wrote over
|
||||
%GetPossiblyEncryptedItem(WitchItem, SpriteItemValues)
|
||||
JSL.l AttemptItemSubstitution
|
||||
JSL.l ResolveLootIDLong
|
||||
STA.w SpriteID, Y
|
||||
TYX
|
||||
@@ -572,6 +573,7 @@ LoadMushroom:
|
||||
|
||||
LDA.b #$00 : STA.l RedrawFlag
|
||||
%GetPossiblyEncryptedItem(MushroomItem, SpriteItemValues)
|
||||
JSL.l AttemptItemSubstitution
|
||||
JSR.w ResolveLootID
|
||||
STA.w SpriteID,X
|
||||
JSL.l PrepDynamicTile
|
||||
|
||||
@@ -175,6 +175,7 @@ RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
LoadZoraKingItemGFX:
|
||||
LDA.l $9DE1C3 ; location randomizer writes zora item to
|
||||
JSL.l AttemptItemSubstitution
|
||||
JSL.l ResolveLootIDLong
|
||||
STA.w SpriteID,Y
|
||||
TYX
|
||||
@@ -190,6 +191,7 @@ JumpToSplashItemTarget:
|
||||
;--------------------------------------------------------------------------------
|
||||
LoadCatfishItemGFX:
|
||||
LDA.l $9DE185 ; location randomizer writes catfish item to
|
||||
JSL.l AttemptItemSubstitution
|
||||
JSL.l ResolveLootIDLong
|
||||
STA.w SpriteID, Y
|
||||
TYX
|
||||
|
||||
@@ -87,7 +87,6 @@ SmithItemMode:
|
||||
db $01 ; #$00 = Classic Tempering Process - #$01 = Quick Item Get (default)
|
||||
SmithItem:
|
||||
db $02 ; #$02 = Tempered Sword (default)
|
||||
|
||||
org $86B55C ; PC 0x3355C ; sprite_smithy_bros.asm : 634
|
||||
SmithSword:
|
||||
db $02 ; #$02 = Tempered Sword (default)
|
||||
|
||||
@@ -30,6 +30,7 @@ RTS
|
||||
;--------------------------------------------------------------------------------
|
||||
SpawnTabletItem:
|
||||
JSL.l LoadOutdoorValue
|
||||
JSL.l AttemptItemSubstitution
|
||||
JSL.l ResolveLootIDLong
|
||||
PHA
|
||||
LDA.b #$EB : STA.l MiniGameTime
|
||||
|
||||
Reference in New Issue
Block a user