Compare commits
7 Commits
2dcfd8e67a
...
pikit_mode
| Author | SHA1 | Date | |
|---|---|---|---|
| bd722bef33 | |||
| 9208d06f3a | |||
| 2a31b7763b | |||
| 779c9a27ce | |||
| 381868c3ce | |||
| f6c0de88fb | |||
| f609727647 |
@@ -53,6 +53,17 @@ RTL
|
||||
GiveBonkItem:
|
||||
LDA.w SprItemMWPlayer, X : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
LDA.w SprSourceItemId, X
|
||||
|
||||
PHY : TAY
|
||||
JSL ShieldCheck
|
||||
TYA : PLY
|
||||
BCS +
|
||||
|
||||
STZ.w $0DD0, X
|
||||
PLA : PLA : PLA ; remove the stored return address
|
||||
JML $85FC9D
|
||||
|
||||
+
|
||||
JSR AbsorbKeyCheck : BCC .notKey
|
||||
PHY : LDY.b #$24 : JSL AddInventory : PLY ; do inventory processing for a small key
|
||||
LDA.l CurrentSmallKeys : INC A : STA.l CurrentSmallKeys
|
||||
|
||||
@@ -72,18 +72,27 @@ JML Dungeon_OpenKeyedObject_nextChest
|
||||
|
||||
TXA : LSR
|
||||
JSL RetrieveValueFromEncryptedTable
|
||||
JSL ShieldCheck
|
||||
STA.b Scrap0C
|
||||
|
||||
PLA : STA.b Scrap02 : PLA : STA.b Scrap00
|
||||
|
||||
LDA.l ChestData, X : ASL A : BCC .smallChest
|
||||
|
||||
JSL ShieldCheck : BCC .couldntFindChest
|
||||
PHY
|
||||
LDY.b Scrap0C
|
||||
JSL ShieldCheck
|
||||
STY.b Scrap0C
|
||||
PLY
|
||||
BCC .couldntFindChest
|
||||
JML Dungeon_OpenKeyedObject_bigChest ;(bank01.asm line #13783)
|
||||
|
||||
.smallChest
|
||||
JSL ShieldCheck : BCC .couldntFindChest
|
||||
PHY
|
||||
LDY.b Scrap0C
|
||||
JSL ShieldCheck
|
||||
STY.b Scrap0C
|
||||
PLY
|
||||
BCC .couldntFindChest
|
||||
JML Dungeon_OpenKeyedObject_smallChest
|
||||
|
||||
.couldntFindChest
|
||||
|
||||
@@ -88,6 +88,7 @@ RTL
|
||||
|
||||
PrizeReceiveItem:
|
||||
PHA
|
||||
LDA.b #$00 : STA.l BossDropTouched
|
||||
JSL BossPrizeGetPlayer : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
PLA
|
||||
CMP.b #$6A : BNE +
|
||||
@@ -105,7 +106,7 @@ RTL
|
||||
SetItemPose:
|
||||
PHA
|
||||
LDA.w DungeonID : BMI .one_handed
|
||||
LDA.w RoomItemsTaken : BIT.b #$80 : BNE +
|
||||
JSL CheckBossDropTouched : BNE +
|
||||
.one_handed
|
||||
PLA
|
||||
JML Link_ReceiveItem_not_cool_pose
|
||||
@@ -134,7 +135,7 @@ SetCutsceneFlag:
|
||||
PHX
|
||||
LDY.b #$01 ; wrote over
|
||||
LDA.w DungeonID : BMI .no_cutscene
|
||||
LDA.w RoomItemsTaken : BIT.b #$80 : BNE .dungeon_prize
|
||||
JSL CheckBossDropTouched : BNE .dungeon_prize
|
||||
.no_cutscene
|
||||
SEP #$30
|
||||
PLX
|
||||
@@ -155,7 +156,7 @@ AnimatePrizeCutscene:
|
||||
LDA.w ItemReceiptMethod : CMP.b #$03 : BNE +
|
||||
JSR CrystalOrPendantBehavior : BCC +
|
||||
LDA.w DungeonID : BMI +
|
||||
LDA.w RoomItemsTaken : BIT.b #$80 : BEQ +
|
||||
JSL CheckBossDropTouched : BEQ +
|
||||
SEC
|
||||
RTL
|
||||
+
|
||||
@@ -172,13 +173,13 @@ PrizeDropSparkle:
|
||||
RTL
|
||||
|
||||
HandleDropSFX:
|
||||
LDA.w RoomItemsTaken : BIT.b #$80 : BEQ .no_sound
|
||||
JSL CheckBossDropTouched : BEQ .no_sound
|
||||
JSR CrystalOrPendantBehavior : BCC .no_sound
|
||||
SEC
|
||||
RTL
|
||||
.no_sound
|
||||
.no_sound
|
||||
CLC
|
||||
RTL
|
||||
RTL
|
||||
|
||||
HandleCrystalsField:
|
||||
TAX
|
||||
@@ -192,7 +193,7 @@ RTL
|
||||
MaybeKeepLootID:
|
||||
PHA
|
||||
LDA.w DungeonID : BMI .no_prize
|
||||
LDA.w RoomItemsTaken : BIT.b #$80 : BNE .prize
|
||||
JSL CheckBossDropTouched : BNE .prize
|
||||
.no_prize
|
||||
STZ.w ItemReceiptID
|
||||
STZ.w ItemReceiptPose
|
||||
@@ -216,6 +217,15 @@ CheckSpawnPrize:
|
||||
SEP #$21
|
||||
RTL
|
||||
|
||||
CheckBossDropTouched:
|
||||
; Out: z - boss drop not touched
|
||||
LDA.w RoomItemsTaken
|
||||
AND.b #$80
|
||||
BNE .done
|
||||
LDA.l BossDropTouched
|
||||
.done
|
||||
RTL
|
||||
|
||||
CheckDungeonCompletion:
|
||||
LDX.w DungeonID
|
||||
REP #$20
|
||||
|
||||
@@ -70,7 +70,7 @@ GetAgahnimLightning:
|
||||
;1 = Forbid
|
||||
AllowJoypadInput:
|
||||
LDA.l PermitSQFromBosses : BEQ .fullCheck
|
||||
LDA.w RoomItemsTaken : AND.b #$80 : BEQ .fullCheck
|
||||
JSL CheckBossDropTouched : BEQ .fullCheck
|
||||
LDA.w MedallionFlag : ORA.w CutsceneFlag ; we have heart container, do short check
|
||||
RTL
|
||||
.fullCheck
|
||||
|
||||
@@ -2,13 +2,20 @@
|
||||
; Randomize Half Magic Bat
|
||||
;--------------------------------------------------------------------------------
|
||||
GetMagicBatItem:
|
||||
JSL ItemSet_MagicBat
|
||||
%GetPossiblyEncryptedItem(MagicBatItem, SpriteItemValues)
|
||||
CMP.b #$FF : BEQ .normalLogic
|
||||
TAY
|
||||
PHA : LDA.l MagicBatItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID : PLA
|
||||
PHA
|
||||
JSL ShieldCheck
|
||||
BCC .have_shield
|
||||
LDA.l MagicBatItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
JSL ItemSet_MagicBat
|
||||
PLA
|
||||
STZ.b ItemReceiptMethod ; 0 = Receiving item from an NPC or message
|
||||
JML Link_ReceiveItem
|
||||
.have_shield
|
||||
PLA
|
||||
RTL
|
||||
.normalLogic
|
||||
LDA.l HalfMagic
|
||||
STA.l MagicConsumption
|
||||
|
||||
@@ -5,8 +5,17 @@ HeartPieceGet:
|
||||
PHX : PHY
|
||||
LDA.w SprItemMWPlayer, X : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID
|
||||
LDY.w SprSourceItemId, X
|
||||
JSL HeartGet
|
||||
BCC +
|
||||
JSL MaybeMarkDigSpotCollected
|
||||
.skipLoad
|
||||
+
|
||||
PLY : PLX
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
HeartGet:
|
||||
JSL ShieldCheck
|
||||
BCC .skip
|
||||
|
||||
LDA.w SprItemMWPlayer, X : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
CPY.b #$26 : BNE .not_heart ; don't add a 1/4 heart if it's not a heart piece
|
||||
CMP.b #$00 : BNE .not_heart
|
||||
@@ -16,15 +25,27 @@ HeartPieceGet:
|
||||
STZ.w ItemReceiptMethod ; 0 = Receiving item from an NPC or message
|
||||
JSL Link_ReceiveItem
|
||||
JSL MaybeUnlockTabletAnimation
|
||||
|
||||
PLY : PLX
|
||||
RTL
|
||||
SEC
|
||||
RTL
|
||||
.skip
|
||||
JSL MaybeFreeLinkFromTablet
|
||||
CLC
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
HeartContainerGet:
|
||||
PHX : PHY
|
||||
JSL IncrementBossSword
|
||||
LDY.w SprSourceItemId, X
|
||||
BRA HeartPieceGet_skipLoad
|
||||
JSL HeartGet
|
||||
PLY : PLX
|
||||
BCC +
|
||||
LDA.w RoomItemsTaken
|
||||
ORA.b #$80
|
||||
STA.w RoomItemsTaken
|
||||
+
|
||||
LDA.b #$01
|
||||
STA.l BossDropTouched
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
DrawHeartPieceGFX:
|
||||
PHP
|
||||
|
||||
32
hooks.asm
32
hooks.asm
@@ -1053,8 +1053,12 @@ Overworld_Entrance_BRANCH_EPSILON: ; go here to lock doors
|
||||
org $81C50D : JSL CheckDungeonWorld
|
||||
org $81C517 : JSL CheckDungeonCompletion
|
||||
org $81C523 : JSL CheckDungeonCompletion
|
||||
org $81C710 : JSL CheckSpawnPrize
|
||||
BCS RoomTag_GetHeartForPrize_spawn_prize : BRA RoomTag_GetHeartForPrize_delete_tag
|
||||
org $81C709 : JSL CheckBossDropTouched : NOP
|
||||
org $81C710
|
||||
JSL CheckSpawnPrize
|
||||
BCS RoomTag_GetHeartForPrize_spawn_prize
|
||||
BRA RoomTag_GetHeartForPrize_delete_tag
|
||||
warnpc $81C731
|
||||
org $81C742 : JSL SpawnDungeonPrize : PLA : RTS
|
||||
org $8799EA : JML SetItemPose
|
||||
org $88C415 : JSL PendantMusicCheck
|
||||
@@ -1066,6 +1070,7 @@ org $88C622 : BCC ItemReceipt_Animate_continue
|
||||
org $88C6BA : JSL CheckPoseItemCoordinates
|
||||
org $88C6C3 : JSL PrepPrizeVRAMHigh
|
||||
org $88C6F4 : JSL PrepPrizeVRAMLow
|
||||
org $88CAC4 : JSL CheckBossDropTouched : NOP
|
||||
org $88CAD6 : JSL HandleDropSFX : NOP #2
|
||||
org $88CADC : BCC Ancilla29_MilestoneItemReceipt_skip_crystal_sfx
|
||||
org $88CAE9 : JSL PrepPrizeTile
|
||||
@@ -2005,7 +2010,7 @@ org $85EE53 ; <- 2EE53 - mushroom.asm : 22
|
||||
JSL ItemCheck_Mushroom : NOP #2
|
||||
;--------------------------------------------------------------------------------
|
||||
org $85EE8C ; <- 2EE8C - mushroom.asm : 69
|
||||
JSL ItemSet_Mushroom : NOP
|
||||
JSL ItemSet_Mushroom : NOP #5
|
||||
;--------------------------------------------------------------------------------
|
||||
org $85F53E ; <- 2F53E - sprite_potion_shop.asm : 40
|
||||
JSL ItemCheck_Powder : CMP.b #$20
|
||||
@@ -2033,7 +2038,10 @@ org $85EF79 ; <- 2EF79 - sprite_heart_upgrades.asm:128 (JSL Sprite_PrepAndDrawSi
|
||||
JSL DrawHeartContainerGFX
|
||||
;--------------------------------------------------------------------------------
|
||||
org $85EFCE ; <- 2EFCE - sprite_heart_upgrades.asm:176 (JSL Link_ReceiveItem)
|
||||
JSL HeartContainerGet
|
||||
JSL HeartContainerGet ; this also handles setting the boss-killed flag if appropriate
|
||||
PLX
|
||||
RTS
|
||||
warnpc $85EFDC
|
||||
;--------------------------------------------------------------------------------
|
||||
;--------------------------------------------------------------------------------
|
||||
org $8799B1 ; 399B1 - Bank07.asm:4063 (CPY.b #$3E : BNE .notHeartContainer)
|
||||
@@ -2059,10 +2067,13 @@ JSL HeartPieceSpawnDelayFix
|
||||
;--------------------------------------------------------------------------------
|
||||
org $85F08A ; <- 2F08A - sprite_heart_upgrades.asm : 324 - (LDA $7EF36B : INC A : AND.b #$03 : STA $7EF36B : BNE .got_4_piecese) item determination
|
||||
JSL HeartPieceGet
|
||||
PHP
|
||||
JSL DynamicDrawCleanup
|
||||
PLP : BCC +
|
||||
JSL IsMedallion
|
||||
BCS + : BRA Sprite_EB_HeartPiece_handle_flags : + ; Don't change OW flags if we're
|
||||
STZ.w SpriteAITable, X : RTS ; getting a tablet item
|
||||
warnpc $85F0C0
|
||||
;--------------------------------------------------------------------------------
|
||||
org $86C0B0 ; <- 340B0 - sprite prep
|
||||
JSL HeartPieceSpritePrep
|
||||
@@ -2848,3 +2859,16 @@ JML PikitSteal
|
||||
org $9E8CF2
|
||||
JSL PikitDigest
|
||||
NOP #2
|
||||
|
||||
org $879A52
|
||||
JSL LinkSnoring
|
||||
|
||||
org $879AAD
|
||||
JSL LinkAwaken
|
||||
|
||||
org $879A31
|
||||
JSL TuckLink
|
||||
NOP #2
|
||||
|
||||
org $80F950
|
||||
NOP #2
|
||||
|
||||
@@ -114,14 +114,15 @@ StartingGenericKeys: skip 1 ; PC 0x18338B
|
||||
InitInventoryTracking: skip 2 ; PC 0x18338C \ Need to set bits here for silver arrows,
|
||||
InitBowTracking: skip 2 ; PC 0x18338E / boomerangs, powder/mushroom, etc
|
||||
InitItemLimitCounts: skip 16 ; PC 0x183390
|
||||
skip 34 ;
|
||||
skip 32 ;
|
||||
InitPikitItem: dw $0004 ;
|
||||
InitFluteBitfield: db $00 ;
|
||||
InitSpecialWeaponLevel: db $00 ;
|
||||
InitItemOnB: db $00 ;
|
||||
InitProgressIndicator: db $02 ; PC 0x1833C5 - Set to $80 for instant post-aga with standard
|
||||
InitProgressFlags: db $14 ; PC 0x1833C6 - Set to $00 for standard
|
||||
InitProgressIndicator: db $00 ; PC 0x1833C5 - Set to $80 for instant post-aga with standard
|
||||
InitProgressFlags: db $04 ; PC 0x1833C6 - Set to $00 for standard
|
||||
InitMapIcons: skip 1 ; PC 0x1833C7
|
||||
InitStartingEntrance: db $01 ; PC 0x1833C8 - Set to $00 for standard
|
||||
InitStartingEntrance: db $00 ; PC 0x1833C8 - Set to $00 for standard
|
||||
InitNpcFlagsVanilla: skip 1 ; PC 0x1833C9
|
||||
InitCurrentWorld: skip 1 ; PC 0x1833CA
|
||||
skip 1 ; PC 0x1833CB
|
||||
|
||||
@@ -650,14 +650,21 @@ CollectPowder:
|
||||
BNE +
|
||||
; if for any reason the item value is 0 reload it, just in case
|
||||
%GetPossiblyEncryptedItem(WitchItem, SpriteItemValues) : TAY
|
||||
+ PHA
|
||||
+
|
||||
PHA
|
||||
JSL ShieldCheck
|
||||
BCC .skip
|
||||
|
||||
|
||||
LDA.l WitchItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
LDA.b #$01 : STA.l ShopEnableCount
|
||||
PLA
|
||||
STZ.w ItemReceiptMethod ; item from NPC
|
||||
JSL Link_ReceiveItem
|
||||
PHA : LDA.b #$00 : STA.l ShopEnableCount : STA.l PowderFlag : PLA
|
||||
PHA : LDA.b #$00 : STA.l ShopEnableCount : STA.l PowderFlag
|
||||
JSL ItemSet_Powder
|
||||
.skip
|
||||
PLA
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -416,40 +416,40 @@ macro SpriteProps(id, chest_width, standing_width, chest_pal, standing_pal, addr
|
||||
pullpc
|
||||
endmacro
|
||||
|
||||
%SpriteProps($00, 0, 2, $05, $02, PalettesVanilla_blue_ice+$0E) ; 00 - Fighter sword & Shield
|
||||
%SpriteProps($01, 0, 2, $05, $05, PalettesCustom_master_sword) ; 01 - Master sword
|
||||
%SpriteProps($02, 0, 2, $05, $01, PalettesCustom_tempered_sword) ; 02 - Tempered sword
|
||||
%SpriteProps($03, 0, 2, $05, $04, PalettesCustom_golden_sword) ; 03 - Golden sword
|
||||
%SpriteProps($00, 0, 0, $05, $80, PalettesCustom_fighter_shield) ; 00 - Fighter sword & Shield
|
||||
%SpriteProps($01, 0, 0, $05, $80, PalettesCustom_fighter_shield) ; 01 - Master sword
|
||||
%SpriteProps($02, 0, 0, $05, $80, PalettesCustom_fighter_shield) ; 02 - Tempered sword
|
||||
%SpriteProps($03, 0, 0, $05, $80, PalettesCustom_fighter_shield) ; 03 - Golden sword
|
||||
%SpriteProps($04, 0, 0, $05, $80, PalettesCustom_fighter_shield) ; 04 - Fighter shield
|
||||
%SpriteProps($05, 2, 2, $05, $80, PalettesCustom_red_shield) ; 05 - Fire shield
|
||||
%SpriteProps($06, 2, 2, $05, $80, PalettesCustom_mirror_shield) ; 06 - Mirror shield
|
||||
%SpriteProps($07, 0, 0, $01, $01, PalettesVanilla_red_melon+$0E) ; 07 - Fire rod
|
||||
%SpriteProps($08, 0, 0, $02, $02, PalettesVanilla_blue_ice+$0E) ; 08 - Ice rod
|
||||
%SpriteProps($09, 0, 0, $01, $01, PalettesVanilla_red_melon+$0E) ; 09 - Hammer
|
||||
%SpriteProps($0A, 0, 0, $01, $01, PalettesVanilla_red_melon+$0E) ; 0A - Hookshot
|
||||
%SpriteProps($0B, 0, 0, $01, $01, PalettesVanilla_red_melon+$0E) ; 0B - Bow
|
||||
%SpriteProps($0C, 0, 0, $02, $02, PalettesVanilla_blue_ice+$0E) ; 0C - Blue Boomerang
|
||||
%SpriteProps($0D, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 0D - Powder
|
||||
%SpriteProps($07, 0, 0, $01, $80, PalettesCustom_fighter_shield) ; 07 - Fire rod
|
||||
%SpriteProps($08, 0, 0, $02, $80, PalettesCustom_fighter_shield) ; 08 - Ice rod
|
||||
%SpriteProps($09, 0, 0, $01, $80, PalettesCustom_fighter_shield) ; 09 - Hammer
|
||||
%SpriteProps($0A, 0, 0, $01, $80, PalettesCustom_fighter_shield) ; 0A - Hookshot
|
||||
%SpriteProps($0B, 0, 0, $01, $80, PalettesCustom_fighter_shield) ; 0B - Bow
|
||||
%SpriteProps($0C, 0, 0, $02, $80, PalettesCustom_fighter_shield) ; 0C - Blue Boomerang
|
||||
%SpriteProps($0D, 2, 0, $02, $80, PalettesCustom_fighter_shield) ; 0D - Powder
|
||||
%SpriteProps($0E, 2, 0, $02, $03, PalettesVanilla_blue_ice+$0E) ; 0E - Bottle refill (bee)
|
||||
%SpriteProps($0F, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 0F - Bombos
|
||||
%SpriteProps($10, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 10 - Ether
|
||||
%SpriteProps($11, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 11 - Quake
|
||||
%SpriteProps($12, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 12 - Lamp
|
||||
%SpriteProps($13, 0, 0, $01, $01, PalettesVanilla_red_melon+$0E) ; 13 - Shovel
|
||||
%SpriteProps($14, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 14 - Flute
|
||||
%SpriteProps($15, 0, 0, $01, $01, PalettesVanilla_red_melon+$0E) ; 15 - Somaria
|
||||
%SpriteProps($16, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 16 - Bottle
|
||||
%SpriteProps($0F, 2, 0, $04, $80, PalettesCustom_fighter_shield) ; 0F - Bombos
|
||||
%SpriteProps($10, 2, 0, $04, $80, PalettesCustom_fighter_shield) ; 10 - Ether
|
||||
%SpriteProps($11, 2, 0, $04, $80, PalettesCustom_fighter_shield) ; 11 - Quake
|
||||
%SpriteProps($12, 2, 0, $01, $80, PalettesCustom_fighter_shield) ; 12 - Lamp
|
||||
%SpriteProps($13, 0, 0, $01, $80, PalettesCustom_fighter_shield) ; 13 - Shovel
|
||||
%SpriteProps($14, 2, 0, $02, $80, PalettesCustom_fighter_shield) ; 14 - Flute
|
||||
%SpriteProps($15, 0, 0, $01, $80, PalettesCustom_fighter_shield) ; 15 - Somaria
|
||||
%SpriteProps($16, 2, 0, $01, $80, PalettesCustom_fighter_shield) ; 16 - Bottle
|
||||
%SpriteProps($17, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 17 - Heart piece
|
||||
%SpriteProps($18, 0, 0, $02, $02, PalettesVanilla_blue_ice+$0E) ; 18 - Byrna
|
||||
%SpriteProps($19, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 19 - Cape
|
||||
%SpriteProps($1A, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 1A - Mirror
|
||||
%SpriteProps($1B, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 1B - Glove
|
||||
%SpriteProps($1C, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 1C - Mitts
|
||||
%SpriteProps($1D, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 1D - Book
|
||||
%SpriteProps($1E, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 1E - Flippers
|
||||
%SpriteProps($1F, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 1F - Pearl
|
||||
%SpriteProps($18, 0, 0, $02, $80, PalettesCustom_fighter_shield) ; 18 - Byrna
|
||||
%SpriteProps($19, 2, 0, $01, $80, PalettesCustom_fighter_shield) ; 19 - Cape
|
||||
%SpriteProps($1A, 2, 0, $02, $80, PalettesCustom_fighter_shield) ; 1A - Mirror
|
||||
%SpriteProps($1B, 2, 0, $01, $80, PalettesCustom_fighter_shield) ; 1B - Glove
|
||||
%SpriteProps($1C, 2, 0, $04, $80, PalettesCustom_fighter_shield) ; 1C - Mitts
|
||||
%SpriteProps($1D, 2, 0, $04, $80, PalettesCustom_fighter_shield) ; 1D - Book
|
||||
%SpriteProps($1E, 2, 0, $02, $80, PalettesCustom_fighter_shield) ; 1E - Flippers
|
||||
%SpriteProps($1F, 2, 0, $01, $80, PalettesCustom_fighter_shield) ; 1F - Pearl
|
||||
%SpriteProps($20, 2, 2, $86, $86, PalettesCustom_crystal) ; 20 - Crystal
|
||||
%SpriteProps($21, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 21 - Net
|
||||
%SpriteProps($21, 2, 0, $01, $80, PalettesCustom_fighter_shield) ; 21 - Net
|
||||
%SpriteProps($22, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 22 - Blue mail
|
||||
%SpriteProps($23, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 23 - Red mail
|
||||
%SpriteProps($24, 0, 0, $02, $04, PalettesVanilla_blue_ice+$0E) ; 24 - Small key
|
||||
@@ -457,11 +457,11 @@ endmacro
|
||||
%SpriteProps($26, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 26 - Heart container from 4/4
|
||||
%SpriteProps($27, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 27 - Bomb
|
||||
%SpriteProps($28, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 28 - 3 bombs
|
||||
%SpriteProps($29, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 29 - Mushroom
|
||||
%SpriteProps($2A, 0, 0, $01, $01, PalettesVanilla_red_melon+$0E) ; 2A - Red boomerang
|
||||
%SpriteProps($2B, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 2B - Full bottle (red)
|
||||
%SpriteProps($2C, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 2C - Full bottle (green)
|
||||
%SpriteProps($2D, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 2D - Full bottle (blue)
|
||||
%SpriteProps($29, 2, 0, $04, $80, PalettesCustom_fighter_shield) ; 29 - Mushroom
|
||||
%SpriteProps($2A, 0, 0, $01, $80, PalettesCustom_fighter_shield) ; 2A - Red boomerang
|
||||
%SpriteProps($2B, 2, 0, $01, $80, PalettesCustom_fighter_shield) ; 2B - Full bottle (red)
|
||||
%SpriteProps($2C, 2, 0, $04, $80, PalettesCustom_fighter_shield) ; 2C - Full bottle (green)
|
||||
%SpriteProps($2D, 2, 0, $02, $80, PalettesCustom_fighter_shield) ; 2D - Full bottle (blue)
|
||||
%SpriteProps($2E, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 2E - Potion refill (red)
|
||||
%SpriteProps($2F, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 2F - Potion refill (green)
|
||||
%SpriteProps($30, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 30 - Potion refill (blue)
|
||||
@@ -474,10 +474,10 @@ endmacro
|
||||
%SpriteProps($37, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 37 - Green pendant
|
||||
%SpriteProps($38, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 38 - Red pendant
|
||||
%SpriteProps($39, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 39 - Blue pendant
|
||||
%SpriteProps($3A, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 3A - Bow And Arrows
|
||||
%SpriteProps($3B, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 3B - Silver Bow
|
||||
%SpriteProps($3C, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 3C - Full bottle (bee)
|
||||
%SpriteProps($3D, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 3D - Full bottle (fairy)
|
||||
%SpriteProps($3A, 2, 0, $02, $80, PalettesCustom_fighter_shield) ; 3A - Bow And Arrows
|
||||
%SpriteProps($3B, 2, 0, $01, $80, PalettesCustom_fighter_shield) ; 3B - Silver Bow
|
||||
%SpriteProps($3C, 2, 0, $02, $80, PalettesCustom_fighter_shield) ; 3C - Full bottle (bee)
|
||||
%SpriteProps($3D, 2, 0, $02, $80, PalettesCustom_fighter_shield) ; 3D - Full bottle (fairy)
|
||||
%SpriteProps($3E, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 3E - Boss heart
|
||||
%SpriteProps($3F, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 3F - Sanc heart
|
||||
%SpriteProps($40, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 40 - 100 rupees
|
||||
@@ -488,23 +488,23 @@ endmacro
|
||||
%SpriteProps($45, 0, 0, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 45 - Small magic
|
||||
%SpriteProps($46, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 46 - 300 rupees
|
||||
%SpriteProps($47, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 47 - 20 rupees green
|
||||
%SpriteProps($48, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 48 - Full bottle (good bee)
|
||||
%SpriteProps($49, 0, 2, $05, $02, PalettesCustom_fighter_shield) ; 49 - Tossed fighter sword
|
||||
%SpriteProps($4A, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 4A - Active Flute
|
||||
%SpriteProps($4B, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 4B - Boots
|
||||
%SpriteProps($48, 2, 0, $02, $80, PalettesCustom_fighter_shield) ; 48 - Full bottle (good bee)
|
||||
%SpriteProps($49, 0, 0, $05, $80, PalettesCustom_fighter_shield) ; 49 - Tossed fighter sword
|
||||
%SpriteProps($4A, 2, 0, $02, $80, PalettesCustom_fighter_shield) ; 4A - Active Flute
|
||||
%SpriteProps($4B, 2, 0, $01, $80, PalettesCustom_fighter_shield) ; 4B - Boots
|
||||
%SpriteProps($4C, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 4C - Bomb capacity (50)
|
||||
%SpriteProps($4D, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 4D - Arrow capacity (70)
|
||||
%SpriteProps($4E, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 4E - 1/2 magic
|
||||
%SpriteProps($4F, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 4F - 1/4 magic
|
||||
%SpriteProps($50, 0, 2, $05, $02, PalettesCustom_master_sword) ; 50 - Safe master sword
|
||||
%SpriteProps($4E, 2, 0, $04, $80, PalettesCustom_fighter_shield) ; 4E - 1/2 magic
|
||||
%SpriteProps($4F, 2, 0, $04, $80, PalettesCustom_fighter_shield) ; 4F - 1/4 magic
|
||||
%SpriteProps($50, 0, 0, $05, $80, PalettesCustom_fighter_shield) ; 50 - Safe master sword
|
||||
%SpriteProps($51, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 51 - Bomb capacity (+5)
|
||||
%SpriteProps($52, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 52 - Bomb capacity (+10)
|
||||
%SpriteProps($52, 2, 0, $04, $80, PalettesCustom_fighter_shield) ; 52 - Bomb capacity (+10)
|
||||
%SpriteProps($53, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 53 - Arrow capacity (+5)
|
||||
%SpriteProps($54, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 54 - Arrow capacity (+10)
|
||||
%SpriteProps($55, 2, 2, $04, $04, $0000) ; 55 - Programmable item 1
|
||||
%SpriteProps($56, 2, 2, $04, $04, $0000) ; 56 - Programmable item 2
|
||||
%SpriteProps($57, 2, 2, $04, $04, $0000) ; 57 - Programmable item 3
|
||||
%SpriteProps($58, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 58 - Upgrade-only Silver Arrows
|
||||
%SpriteProps($58, 2, 0, $01, $80, PalettesCustom_fighter_shield) ; 58 - Upgrade-only Silver Arrows
|
||||
%SpriteProps($59, 0, 0, $03, $03, PalettesCustom_off_black) ; 59 - Rupoor
|
||||
%SpriteProps($5A, 2, 2, $01, $01, $0000) ; 5A - Nothing
|
||||
%SpriteProps($5B, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 5B - Red clock
|
||||
@@ -1220,40 +1220,40 @@ ItemReceiptGraphicsOffsets:
|
||||
; for receipt and non-receipt drawing.
|
||||
;===================================================================================================
|
||||
StandingItemGraphicsOffsets:
|
||||
dw $0860 ; 00 - Fighter Sword and Shield
|
||||
dw $00E0 ; 01 - Master Sword
|
||||
dw $0120 ; 02 - Tempered Sword
|
||||
dw $0160 ; 03 - Butter Sword
|
||||
dw BigDecompressionBuffer+$09E0 ; 00 - Fighter Sword and Shield
|
||||
dw BigDecompressionBuffer+$09E0 ; 01 - Master Sword
|
||||
dw BigDecompressionBuffer+$09E0 ; 02 - Tempered Sword
|
||||
dw BigDecompressionBuffer+$09E0 ; 03 - Butter Sword
|
||||
dw BigDecompressionBuffer+$09E0 ; 04 - Fighter Shield
|
||||
dw BigDecompressionBuffer+$1940 ; 05 - Fire Shield
|
||||
dw BigDecompressionBuffer+$0C80 ; 06 - Mirror Shield
|
||||
dw BigDecompressionBuffer+$1C80 ; 07 - Fire Rod
|
||||
dw BigDecompressionBuffer+$1C80 ; 08 - Ice Rod
|
||||
dw BigDecompressionBuffer+$1CA0 ; 09 - Hammer
|
||||
dw BigDecompressionBuffer+$1C60 ; 0A - Hookshot
|
||||
dw BigDecompressionBuffer+$1C00 ; 0B - Bow
|
||||
dw BigDecompressionBuffer+$1DE0 ; 0C - Boomerang
|
||||
dw BigDecompressionBuffer+$1CC0 ; 0D - Powder
|
||||
dw BigDecompressionBuffer+$09E0 ; 07 - Fire Rod
|
||||
dw BigDecompressionBuffer+$09E0 ; 08 - Ice Rod
|
||||
dw BigDecompressionBuffer+$09E0 ; 09 - Hammer
|
||||
dw BigDecompressionBuffer+$09E0 ; 0A - Hookshot
|
||||
dw BigDecompressionBuffer+$09E0 ; 0B - Bow
|
||||
dw BigDecompressionBuffer+$09E0 ; 0C - Boomerang
|
||||
dw BigDecompressionBuffer+$09E0 ; 0D - Powder
|
||||
dw 0 ; 0E - Bottle Refill (bee)
|
||||
dw BigDecompressionBuffer+$1440 ; 0F - Bombos
|
||||
dw BigDecompressionBuffer+$1400 ; 10 - Ether
|
||||
dw BigDecompressionBuffer+$1480 ; 11 - Quake
|
||||
dw BigDecompressionBuffer+$10C0 ; 12 - Lamp
|
||||
dw BigDecompressionBuffer+$11E0 ; 13 - Shovel
|
||||
dw BigDecompressionBuffer+$0C40 ; 14 - Flute
|
||||
dw BigDecompressionBuffer+$1C40 ; 15 - Somaria
|
||||
dw BigDecompressionBuffer+$14C0 ; 16 - Bottle
|
||||
dw BigDecompressionBuffer+$09E0 ; 0F - Bombos
|
||||
dw BigDecompressionBuffer+$09E0 ; 10 - Ether
|
||||
dw BigDecompressionBuffer+$09E0 ; 11 - Quake
|
||||
dw BigDecompressionBuffer+$09E0 ; 12 - Lamp
|
||||
dw BigDecompressionBuffer+$09E0 ; 13 - Shovel
|
||||
dw BigDecompressionBuffer+$09E0 ; 14 - Flute
|
||||
dw BigDecompressionBuffer+$09E0 ; 15 - Somaria
|
||||
dw BigDecompressionBuffer+$09E0 ; 16 - Bottle
|
||||
dw BigDecompressionBuffer+$0C00 ; 17 - Heartpiece
|
||||
dw BigDecompressionBuffer+$1C40 ; 18 - Byrna
|
||||
dw BigDecompressionBuffer+$1100 ; 19 - Cape
|
||||
dw BigDecompressionBuffer+$1040 ; 1A - Mirror
|
||||
dw BigDecompressionBuffer+$1D40 ; 1B - Glove
|
||||
dw BigDecompressionBuffer+$1D40 ; 1C - Mitts
|
||||
dw BigDecompressionBuffer+$1D80 ; 1D - Book
|
||||
dw BigDecompressionBuffer+$1000 ; 1E - Flippers
|
||||
dw BigDecompressionBuffer+$1180 ; 1F - Pearl
|
||||
dw BigDecompressionBuffer+$09E0 ; 18 - Byrna
|
||||
dw BigDecompressionBuffer+$09E0 ; 19 - Cape
|
||||
dw BigDecompressionBuffer+$09E0 ; 1A - Mirror
|
||||
dw BigDecompressionBuffer+$09E0 ; 1B - Glove
|
||||
dw BigDecompressionBuffer+$09E0 ; 1C - Mitts
|
||||
dw BigDecompressionBuffer+$09E0 ; 1D - Book
|
||||
dw BigDecompressionBuffer+$09E0 ; 1E - Flippers
|
||||
dw BigDecompressionBuffer+$09E0 ; 1F - Pearl
|
||||
dw BigDecompressionBuffer+$08A0 ; 20 - Crystal
|
||||
dw BigDecompressionBuffer+$0860 ; 21 - Net
|
||||
dw BigDecompressionBuffer+$09E0 ; 21 - Net
|
||||
dw BigDecompressionBuffer+$1900 ; 22 - Blue Mail
|
||||
dw BigDecompressionBuffer+$1900 ; 23 - Red Mail
|
||||
dw BigDecompressionBuffer+$1DC0 ; 24 - Small Key
|
||||
@@ -1261,11 +1261,11 @@ StandingItemGraphicsOffsets:
|
||||
dw BigDecompressionBuffer+$18C0 ; 26 - Heart Container from 4/4
|
||||
dw BigDecompressionBuffer+$1080 ; 27 - Bomb
|
||||
dw BigDecompressionBuffer+$1840 ; 28 - 3 bombs
|
||||
dw BigDecompressionBuffer+$1540 ; 29 - Mushroom
|
||||
dw BigDecompressionBuffer+$1DE0 ; 2A - Red boomerang
|
||||
dw BigDecompressionBuffer+$1500 ; 2B - Full bottle (red)
|
||||
dw BigDecompressionBuffer+$1500 ; 2C - Full bottle (green)
|
||||
dw BigDecompressionBuffer+$1500 ; 2D - Full bottle (blue)
|
||||
dw BigDecompressionBuffer+$09E0 ; 29 - Mushroom
|
||||
dw BigDecompressionBuffer+$09E0 ; 2A - Red boomerang
|
||||
dw BigDecompressionBuffer+$09E0 ; 2B - Full bottle (red)
|
||||
dw BigDecompressionBuffer+$09E0 ; 2C - Full bottle (green)
|
||||
dw BigDecompressionBuffer+$09E0 ; 2D - Full bottle (blue)
|
||||
dw $0920 ; 2E - Potion refill (red)
|
||||
dw $08A0 ; 2F - Potion refill (green)
|
||||
dw $08E0 ; 30 - Potion refill (blue)
|
||||
@@ -1278,10 +1278,10 @@ StandingItemGraphicsOffsets:
|
||||
dw $0820 ; 37 - Green pendant
|
||||
dw BigDecompressionBuffer+$0080 ; 38 - Blue pendant
|
||||
dw BigDecompressionBuffer+$0080 ; 39 - Red pendant
|
||||
dw BigDecompressionBuffer+$0920 ; 3A - Tossed bow
|
||||
dw BigDecompressionBuffer+$08E0 ; 3B - Silvers
|
||||
dw BigDecompressionBuffer+$09A0 ; 3C - Full bottle (bee)
|
||||
dw BigDecompressionBuffer+$0960 ; 3D - Full bottle (fairy)
|
||||
dw BigDecompressionBuffer+$09E0 ; 3A - Tossed bow
|
||||
dw BigDecompressionBuffer+$09E0 ; 3B - Silvers
|
||||
dw BigDecompressionBuffer+$09E0 ; 3C - Full bottle (bee)
|
||||
dw BigDecompressionBuffer+$09E0 ; 3D - Full bottle (fairy)
|
||||
dw BigDecompressionBuffer+$18C0 ; 3E - Boss heart
|
||||
dw BigDecompressionBuffer+$18C0 ; 3F - Sanc heart
|
||||
dw BigDecompressionBuffer+$0D20 ; 40 - 100 rupees
|
||||
@@ -1292,25 +1292,25 @@ StandingItemGraphicsOffsets:
|
||||
dw BigDecompressionBuffer+$0CE0 ; 45 - Small magic
|
||||
dw BigDecompressionBuffer+$0DA0 ; 46 - 300 rupees
|
||||
dw BigDecompressionBuffer+$0000 ; 47 - 20 rupees green
|
||||
dw BigDecompressionBuffer+$09A0 ; 48 - Full bottle (good bee)
|
||||
dw $00A0 ; 49 - Tossed fighter sword
|
||||
dw BigDecompressionBuffer+$0C40 ; 4A - Active Flute
|
||||
dw BigDecompressionBuffer+$0040 ; 4B - Boots
|
||||
dw BigDecompressionBuffer+$09E0 ; 48 - Full bottle (good bee)
|
||||
dw BigDecompressionBuffer+$09E0 ; 49 - Tossed fighter sword
|
||||
dw BigDecompressionBuffer+$09E0 ; 4A - Active Flute
|
||||
dw BigDecompressionBuffer+$09E0 ; 4B - Boots
|
||||
|
||||
; Rando items
|
||||
dw $04A0 ; 4C - Bomb capacity (50)
|
||||
dw $05A0 ; 4D - Arrow capacity (70)
|
||||
dw $01A0 ; 4E - 1/2 magic
|
||||
dw $01E0 ; 4F - 1/4 magic
|
||||
dw $00E0 ; 50 - Safe master sword
|
||||
dw BigDecompressionBuffer+$09E0 ; 4E - 1/2 magic
|
||||
dw BigDecompressionBuffer+$09E0 ; 4F - 1/4 magic
|
||||
dw BigDecompressionBuffer+$09E0 ; 50 - Safe master sword
|
||||
dw $0420 ; 51 - Bomb capacity (+5)
|
||||
dw $0460 ; 52 - Bomb capacity (+10)
|
||||
dw BigDecompressionBuffer+$09E0 ; 52 - Bomb capacity (+10)
|
||||
dw $0520 ; 53 - Arrow capacity (+5)
|
||||
dw $0560 ; 54 - Arrow capacity (+10)
|
||||
dw $0 ; 55 - Programmable item 1
|
||||
dw $0 ; 56 - Programmable item 2
|
||||
dw $0 ; 57 - Programmable item 3
|
||||
dw $05E0 ; 58 - Upgrade-only silver arrows
|
||||
dw BigDecompressionBuffer+$09E0 ; 58 - Upgrade-only silver arrows
|
||||
dw $0 ; 59 - Rupoor
|
||||
dw $0020 ; 5A - Nothing
|
||||
dw $0DE0 ; 5B - Red clock
|
||||
|
||||
@@ -696,6 +696,14 @@ KeyGet:
|
||||
LDA.l StandingItemsOn : BNE +
|
||||
PLA : RTL
|
||||
+ LDY.w SprSourceItemId, X
|
||||
|
||||
JSL ShieldCheck
|
||||
BCS .not_replaced
|
||||
PLA : PLA : PLA ; remove stored address to jump back to
|
||||
PLA ; restore the A value going into KeyGet
|
||||
JML $86D1A8
|
||||
.not_replaced
|
||||
|
||||
LDA.w SprItemIndex, X : STA.w SpawnedItemIndex
|
||||
LDA.w SprItemFlags, X : STA.w SpawnedItemFlag
|
||||
STY.b Scrap00
|
||||
|
||||
@@ -202,13 +202,22 @@ RTL
|
||||
|
||||
Multiworld_BottleVendor_GiveBottle:
|
||||
{
|
||||
PHA
|
||||
JSL ShieldCheck
|
||||
PLA
|
||||
BCC .no_take_shield
|
||||
|
||||
PHA : PHP
|
||||
SEP #$20
|
||||
LDA.l BottleMerchant_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
PLP : PLA
|
||||
|
||||
JSL Link_ReceiveItem ; thing we wrote over
|
||||
RTL
|
||||
RTL
|
||||
|
||||
.no_take_shield
|
||||
PLA : PLA : PLA : PLX
|
||||
JML $85EB3A
|
||||
}
|
||||
|
||||
Multiworld_MiddleAgedMan_ReactToSecretKeepingResponse:
|
||||
|
||||
84
npcitems.asm
84
npcitems.asm
@@ -98,9 +98,17 @@ ItemSet_MagicBat:
|
||||
RTL
|
||||
|
||||
ItemSet_OldMan:
|
||||
PHA : LDA.l OldManItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID : PLA
|
||||
PHA
|
||||
JSL ShieldCheck
|
||||
BCC .skip
|
||||
|
||||
LDA.l OldManItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
PLA
|
||||
JSL Link_ReceiveItem ; thing we wrote over
|
||||
PHA : LDA.l NpcFlags : ORA.b #$01 : STA.l NpcFlags : PLA
|
||||
PHA
|
||||
LDA.l NpcFlags : ORA.b #$01 : STA.l NpcFlags
|
||||
.skip
|
||||
PLA
|
||||
RTL
|
||||
|
||||
ItemSet_ZoraKing:
|
||||
@@ -108,21 +116,45 @@ ItemSet_ZoraKing:
|
||||
RTL
|
||||
|
||||
ItemSet_SickKid:
|
||||
PHA : LDA.l SickKidItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID : PLA
|
||||
PHA
|
||||
JSL ShieldCheck
|
||||
BCC .skip
|
||||
|
||||
LDA.l SickKidItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
PLA
|
||||
JSL Link_ReceiveItem ; thing we wrote over
|
||||
PHA : LDA.l NpcFlags : ORA.b #$04 : STA.l NpcFlags : PLA
|
||||
PHA
|
||||
LDA.l NpcFlags : ORA.b #$04 : STA.l NpcFlags
|
||||
.skip
|
||||
PLA
|
||||
RTL
|
||||
|
||||
ItemSet_TreeKid:
|
||||
PHA : LDA.l TreeKidItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID : PLA
|
||||
PHA
|
||||
JSL ShieldCheck
|
||||
BCC .skip
|
||||
|
||||
LDA.l TreeKidItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
PLA
|
||||
JSL Link_ReceiveItem ; thing we wrote over
|
||||
PHA : LDA.l NpcFlags : ORA.b #$08 : STA.l NpcFlags : PLA
|
||||
PHA
|
||||
LDA.l NpcFlags : ORA.b #$08 : STA.l NpcFlags
|
||||
.skip
|
||||
PLA
|
||||
RTL
|
||||
|
||||
ItemSet_Sahasrala:
|
||||
PHA : LDA.l SahasralaItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID : PLA
|
||||
PHA
|
||||
JSL ShieldCheck
|
||||
BCC .skip
|
||||
|
||||
LDA.l SahasralaItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
PLA
|
||||
JSL Link_ReceiveItem ; thing we wrote over
|
||||
PHA : LDA.l NpcFlags : ORA.b #$10 : STA.l NpcFlags : PLA
|
||||
PHA
|
||||
LDA.l NpcFlags : ORA.b #$10 : STA.l NpcFlags
|
||||
.skip
|
||||
PLA
|
||||
RTL
|
||||
|
||||
ItemSet_Catfish:
|
||||
@@ -130,22 +162,38 @@ ItemSet_Catfish:
|
||||
RTL
|
||||
|
||||
ItemSet_Library:
|
||||
PHA : LDA.l LibraryItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID : PLA
|
||||
PHA
|
||||
JSL ShieldCheck
|
||||
BCC .skip
|
||||
|
||||
LDA.l LibraryItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
PLA
|
||||
JSL Link_ReceiveItem ; thing we wrote over
|
||||
PHA : LDA.l NpcFlags : ORA.b #$80 : STA.l NpcFlags : PLA
|
||||
PHA
|
||||
LDA.l NpcFlags : ORA.b #$80 : STA.l NpcFlags
|
||||
.skip
|
||||
PLA
|
||||
RTL
|
||||
|
||||
ItemSet_Mushroom:
|
||||
PHA
|
||||
LDA.l NpcFlags+1 : ORA.b #$10 : STA.l NpcFlags+1
|
||||
LDY.w SprSourceItemId, X ; Retrieve stored item type
|
||||
BNE +
|
||||
; if for any reason the item value is 0 reload it, just in case
|
||||
%GetPossiblyEncryptedItem(MushroomItem, SpriteItemValues) : TAY
|
||||
+
|
||||
|
||||
JSL ShieldCheck
|
||||
BCC .skip
|
||||
LDA.l MushroomItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
PLA
|
||||
STZ.w ItemReceiptMethod ; thing we wrote over - the mushroom is an npc for item purposes apparently
|
||||
PLA
|
||||
|
||||
JSL Link_ReceiveItem
|
||||
PHA
|
||||
LDA.l NpcFlags+1 : ORA.b #$10 : STA.l NpcFlags+1
|
||||
.skip
|
||||
PLA
|
||||
RTL
|
||||
|
||||
ItemSet_Powder:
|
||||
@@ -223,16 +271,26 @@ MarkThrownItem:
|
||||
LDA.b OverworldIndex : CMP.b #$81 : BNE .catfish
|
||||
|
||||
.zora
|
||||
JSL ShieldCheck
|
||||
BCC .skip
|
||||
|
||||
JSL ItemSet_ZoraKing
|
||||
LDA.l ZoraItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
BRA .done
|
||||
|
||||
.catfish
|
||||
JSL ShieldCheck
|
||||
BCC .skip
|
||||
JSL ItemSet_Catfish
|
||||
|
||||
LDA.l CatfishItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
|
||||
.done
|
||||
PLA
|
||||
JSL Link_ReceiveItem ; thing we wrote over
|
||||
RTL
|
||||
RTL
|
||||
|
||||
.skip
|
||||
PLA
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
104
pikit.asm
104
pikit.asm
@@ -1,19 +1,84 @@
|
||||
pushpc
|
||||
org $89EB7A
|
||||
db $AA ; replace uncle with pikit
|
||||
org $89EB78
|
||||
db $18, $1A, $AA ; replace uncle with pikit
|
||||
|
||||
org $80DCCE
|
||||
db $1B ; load sprite sheet for pikit in link's house
|
||||
|
||||
org $80FC74
|
||||
NOP #2 ; do not load rain-state sprites
|
||||
|
||||
org $8A8029
|
||||
db $C8, $B6, $22 ; 0x022: Rail ↔ | { 31, 0B } | Size: 01
|
||||
db $C8, $CA, $22 ; 0x022: Rail ↔ | { 31, 0B } | Size: 01
|
||||
db $C8, $B6, $69 ; 0x069: Rail ↕ | { 3A, 0B } | Size: 01
|
||||
db $DC, $B6, $69 ; 0x069: Rail ↕ | { 3A, 0B } | Size: 01
|
||||
; move table slightly to center under pikit
|
||||
db $C9, $C0, $DD
|
||||
db $D0, $B8, $3C
|
||||
pullpc
|
||||
|
||||
TuckLink:
|
||||
; what we wrote over
|
||||
STZ.w $037C
|
||||
STZ.w $037D
|
||||
|
||||
LDA.b #$40 : STA.w $0FC2
|
||||
LDA.b #$09 : STA.w $0FC3
|
||||
|
||||
LDA.b #$5A : STA.w $0FC4
|
||||
LDA.b #$21 : STA.w $0FC5
|
||||
|
||||
RTL
|
||||
|
||||
LinkSnoring:
|
||||
LDA.l ProgressIndicator
|
||||
BNE +
|
||||
|
||||
LDA.b #$02
|
||||
STA.l ProgressIndicator
|
||||
LDA.b #$1D
|
||||
LDY.b #$00
|
||||
JSL Sprite_ShowMessageUnconditional
|
||||
BRA ++
|
||||
|
||||
+
|
||||
LDA.b FrameCounter
|
||||
AND.b #$03
|
||||
BNE ++
|
||||
|
||||
LDA.b $9C
|
||||
CMP.b #$20
|
||||
BEQ .lightened
|
||||
|
||||
DEC.b $9C
|
||||
DEC.b $9D
|
||||
|
||||
++
|
||||
; what we wrote over
|
||||
LDA.b FrameCounter
|
||||
AND.b #$1F
|
||||
RTL
|
||||
|
||||
.lightened
|
||||
INC.w $037C
|
||||
INC.w $037D
|
||||
RTL
|
||||
|
||||
LinkAwaken:
|
||||
; what we wrote over
|
||||
LDA.b #$06
|
||||
STA.b LinkState
|
||||
|
||||
LDA.l ProgressFlags
|
||||
ORA.b #$10
|
||||
STA.l ProgressFlags
|
||||
LDA.b #$01
|
||||
STA.l StartingEntrance
|
||||
RTL
|
||||
|
||||
BigChest_ShieldCheck:
|
||||
PHY
|
||||
LDY.b $0C
|
||||
JSL ShieldCheck
|
||||
STY.b $0C
|
||||
PLY
|
||||
BCC .no_open
|
||||
LDA.l BigKeyField
|
||||
AND.l BitMasks, X
|
||||
@@ -21,22 +86,29 @@ BigChest_ShieldCheck:
|
||||
RTL
|
||||
|
||||
SmallChest_ShieldCheck:
|
||||
PHY
|
||||
LDY.b $0C
|
||||
JSL ShieldCheck
|
||||
STY.b $0C
|
||||
PLY
|
||||
BCC .no_open
|
||||
LDA.w DungeonID
|
||||
LDA.w $0402
|
||||
ORA.w RoomFlagMask, Y
|
||||
.no_open
|
||||
RTL
|
||||
|
||||
ShieldCheck:
|
||||
PHP
|
||||
REP #$30
|
||||
PHX
|
||||
LDA.b $0C
|
||||
TYA
|
||||
AND.w #$00FF
|
||||
TAX
|
||||
LDA.l PikitItemList, X
|
||||
AND.w #$00FF
|
||||
BNE .replace
|
||||
PLX
|
||||
PLP
|
||||
SEC
|
||||
RTL
|
||||
|
||||
@@ -46,19 +118,27 @@ ShieldCheck:
|
||||
BNE .already_have_shield
|
||||
TXA
|
||||
STA.l PikitItem
|
||||
LDA.w #$0004
|
||||
STA.b $0C
|
||||
LDY.w #$0004
|
||||
PLX
|
||||
PLP
|
||||
SEC
|
||||
RTL
|
||||
|
||||
.already_have_shield
|
||||
SEP #$20
|
||||
SEP #$30
|
||||
LDA.b #$3C
|
||||
STA.w $012E
|
||||
REP #$20
|
||||
|
||||
PHY
|
||||
LDA.b #$98
|
||||
LDY.b #$01
|
||||
JSL Sprite_ShowMessageUnconditional
|
||||
PLY
|
||||
|
||||
REP #$30
|
||||
|
||||
PLX
|
||||
PLP
|
||||
CLC
|
||||
RTL
|
||||
|
||||
|
||||
3
ram.asm
3
ram.asm
@@ -619,7 +619,8 @@ HexToDecDigit3: skip 1 ;
|
||||
HexToDecDigit4: skip 1 ;
|
||||
HexToDecDigit5: skip 1 ;
|
||||
SpriteSkipEOR: skip 2 ; Used in utilities.asm to determine when to skip drawing sprites. Zero-padded
|
||||
skip $2B ; Unused
|
||||
skip $2A ; Unused
|
||||
BossDropTouched: skip 1
|
||||
AltTextFlag: skip 2 ; dialog.asm: Determines whether to load from vanilla decompression buffer
|
||||
; or from a secondary buffer (used for things like free dungeon item text)
|
||||
BossKills: skip 1 ;
|
||||
|
||||
5
sram.asm
5
sram.asm
@@ -190,7 +190,8 @@ ItemLimitCounts: skip 16 ; Keeps track of limited non-progressive items s
|
||||
; See: ItemSubstitutionRules in tables.asm
|
||||
; Right now this is only used for three items but extra space is
|
||||
; reserved
|
||||
skip 34 ; Unused
|
||||
skip 32 ; Unused
|
||||
PikitItem: skip 2 ; Item stored in shield player is carrying
|
||||
FluteBitfield: skip 1 ;
|
||||
SpecialWeaponLevel: skip 1 ; keeps track of level in special weapon modes
|
||||
ItemOnB: skip 1 ; NYI
|
||||
@@ -251,7 +252,7 @@ NpcFlags: skip 2 ; l - c s t k z o (bitfield)
|
||||
; b = Magic Bat | p = Potion Shop (Powder) | m = Lost Woods (Mushroom)
|
||||
; f = Fairy (unused) | s = Smith | b = Bombos Tablet
|
||||
; e = Ether Tablet
|
||||
PikitItem: skip 2 ; Item stored in shield player is carrying
|
||||
skip 2 ; Unused
|
||||
MapOverlay: skip 2 ; Used to reveal dungeon prizes on the map in modes where maps,
|
||||
; Saha, and the bomb shop guy reveal dungeon prizes (bitfield)
|
||||
; \ - - g r t h i s
|
||||
|
||||
@@ -132,6 +132,12 @@ GetSmithSword:
|
||||
.buy
|
||||
LDA.l SmithItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
LDA.l SmithItem : TAY
|
||||
|
||||
JSL ShieldCheck
|
||||
BCS +
|
||||
JML $86B4A5
|
||||
|
||||
+
|
||||
STZ.w ItemReceiptMethod ; Item from NPC
|
||||
PHX : JSL Link_ReceiveItem : PLX
|
||||
|
||||
|
||||
20
tablets.asm
20
tablets.asm
@@ -73,6 +73,26 @@ MaybeUnlockTabletAnimation:
|
||||
PLP : PLA
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
MaybeFreeLinkFromTablet:
|
||||
PHA : PHP
|
||||
JSL IsMedallion : BCC +
|
||||
STZ.w MedallionFlag ; disable falling-medallion mode
|
||||
STZ.w ForceSwordUp ; release link from item-up pose
|
||||
LDA.b #$00 : STA.b LinkState ; set link to ground state
|
||||
STZ.w CutsceneFlag
|
||||
STZ.w NoDamage
|
||||
|
||||
REP #$20 ; set 16-bit accumulator
|
||||
LDA.b OverworldIndex : CMP.w #$0030 : BNE ++ ; Desert
|
||||
SEP #$20 ; set 8-bit accumulator
|
||||
LDA.b #$02 : STA.b LinkDirection ; face link forward
|
||||
LDA.b #$3C : STA.b LinkIncapacitatedTimer ; lock link for 60f
|
||||
++
|
||||
SEP #$20 ; set 8-bit accumulator
|
||||
+
|
||||
PLP : PLA
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
IsMedallion:
|
||||
REP #$20 ; set 16-bit accumulator
|
||||
LDA.b OverworldIndex
|
||||
|
||||
@@ -192,6 +192,7 @@ LoadBackgroundGraphics_arbitrary = $80E64D
|
||||
RoomTag_GetHeartForPrize = $81C709
|
||||
RoomTag_GetHeartForPrize_spawn_prize = $81C731
|
||||
RoomTag_GetHeartForPrize_delete_tag = $81C749
|
||||
RoomTag_GetHeartForPrize_exit = $81C74D
|
||||
Underworld_SetBossOrSancMusicUponEntry = $828AD9
|
||||
ResetThenCacheRoomEntryProperties = $828C73
|
||||
RecoverPositionAfterDrowning = $829485
|
||||
|
||||
Reference in New Issue
Block a user