From 178454205d76467eb6c1ce2414c4f3fa7d017183 Mon Sep 17 00:00:00 2001 From: Karkat Date: Wed, 26 Jul 2017 23:50:20 -0400 Subject: [PATCH] pyramid fix? --- darkworldspawn.asm | 3 ++- hooks.asm | 5 ++++- ice_bombos.bin | Bin 0 -> 64 bytes inventory.asm | 10 ++++++++++ newitems.asm | 47 +++++++++++++++++++++++++++++++++++++++++++-- tables.asm | 4 ++++ 6 files changed, 65 insertions(+), 4 deletions(-) create mode 100644 ice_bombos.bin diff --git a/darkworldspawn.asm b/darkworldspawn.asm index e961b95..3502c0c 100644 --- a/darkworldspawn.asm +++ b/darkworldspawn.asm @@ -51,7 +51,8 @@ SetDeathWorldChecked: LDA $040C : CMP #$FF : BNE .done ; unless it's a cave + LDA $7EF3C5 : CMP.b #$03 : !BGE .done; thing we originally did - skip if agahnim 1 is dead - LDA $A0 : BNE + ; check if we died in ganon's room + + LDA $1B : BNE + : LDA $A0 : BNE + ; check if we died in ganon's room LDA !FORCE_PYRAMID : ORA.b #$08 : STA !FORCE_PYRAMID ; set pyramid flag BRL DarkWorldFlagSet_pyramid + diff --git a/hooks.asm b/hooks.asm index f982b26..b06ee6d 100644 --- a/hooks.asm +++ b/hooks.asm @@ -1706,10 +1706,13 @@ NOP #36 ;================================================================================ ;================================================================================ -; Add SFX to Digging Game Prize Spawn +; Add SFX ;-------------------------------------------------------------------------------- org $1DFDA8 ; <- EFDA9 - sprite_digging_game_guy.asm:309 (STA $7FFE00) JSL.l SpawnShovelGamePrizeSFX +;-------------------------------------------------------------------------------- +org $01EEB6 ; <- EEB6 - Bank01.asm:14138 (ORA.b #$40 : STA $0403) +JSL.l SpawnChestGamePrizeSFX : NOP ;================================================================================ ;================================================================================ diff --git a/ice_bombos.bin b/ice_bombos.bin new file mode 100644 index 0000000000000000000000000000000000000000..4977567d5ca6ffc3030a525ce7d35098d92c6b6e GIT binary patch literal 64 zcmV-G0KfnL|NQ^(|LOMG=G)}D#k|7+{{#FF@E_nmz(2r$fPaAh|3ClFKlcy&2ZMiM WpE<_>|G+=+5BLZC1N;O20saA?+b4(s literal 0 HcmV?d00001 diff --git a/inventory.asm b/inventory.asm index 657d8bd..8f43822 100644 --- a/inventory.asm +++ b/inventory.asm @@ -920,6 +920,16 @@ RTL ;-------------------------------------------------------------------------------- SpawnShovelGamePrizeSFX: STA $7FFE00 ; thing we wrote over + LDA.b #$1B : STA $012F ; play puzzle sound +RTL +;-------------------------------------------------------------------------------- + +;-------------------------------------------------------------------------------- +; SpawnChestGamePrizeSFX: +;-------------------------------------------------------------------------------- +SpawnChestGamePrizeSFX: + ORA.b #$40 : STA $0403 ; thing we wrote over + STA $FFFFFF PHA LDA.b #$1B : STA $012F ; play puzzle sound PLA diff --git a/newitems.asm b/newitems.asm index d6e8957..5367126 100755 --- a/newitems.asm +++ b/newitems.asm @@ -282,12 +282,45 @@ RTL !SINGLE_INDEX_BITMASK_TEMP = "$7F5022" !LOCK_IN = "$7F5090" !ITEM_BUSY = "$7F5091" +;2B:Bottle Already Filled w/ Red Potion +;2C:Bottle Already Filled w/ Green Potion +;2D:Bottle Already Filled w/ Blue Potion +;3C:Bottle Already Filled w/ Bee +;3D:Bottle Already Filled w/ Fairy +;48:Bottle Already Filled w/ Gold Bee AddReceivedItemExpanded: { PHA : PHX JSL.l PreItemGet - - LDA $02D8 : CMP #$5E : BNE ++ ; Progressive Sword + LDA $02D8 : CMP.b #$16 : BNE ++ ; Bottle + JSR.w CountBottles : CMP.l BottleLimit : !BLT +++ + LDA.l BottleLimitReplacement : STA $02D8 + +++ : BRL .done + ++ : CMP.b #$2B : BNE ++ ; Red Potion w/bottle + JSR.w CountBottles : CMP.l BottleLimit : !BLT +++ + LDA.l BottleLimitReplacement : STA $02D8 + +++ : BRL .done + ++ : CMP.b #$2C : BNE ++ ; Green Potion w/bottle + JSR.w CountBottles : CMP.l BottleLimit : !BLT +++ + LDA.l BottleLimitReplacement : STA $02D8 + +++ : BRL .done + ++ : CMP.b #$2D : BNE ++ ; Blue Potion w/bottle + JSR.w CountBottles : CMP.l BottleLimit : !BLT +++ + LDA.l BottleLimitReplacement : STA $02D8 + +++ : BRL .done + ++ : CMP.b #$3C : BNE ++ ; Bee w/bottle + JSR.w CountBottles : CMP.l BottleLimit : !BLT +++ + LDA.l BottleLimitReplacement : STA $02D8 + +++ : BRL .done + ++ : CMP.b #$3D : BNE ++ ; Fairy w/bottle + JSR.w CountBottles : CMP.l BottleLimit : !BLT +++ + LDA.l BottleLimitReplacement : STA $02D8 + +++ : BRL .done + ++ : CMP.b #$48 : BNE ++ ; Gold Bee w/bottle + JSR.w CountBottles : CMP.l BottleLimit : !BLT +++ + LDA.l BottleLimitReplacement : STA $02D8 + +++ : BRL .done + ++ : CMP.b #$5E : BNE ++ ; Progressive Sword LDA $7EF359 : CMP.l ProgressiveSwordLimit : !BLT + LDA.l ProgressiveSwordReplacement : STA $02D8 : BRL .done + : CMP.b #$00 : BNE + ; No Sword @@ -758,4 +791,14 @@ GetRNGItemMulti: STA !LOCK_IN TAX : XBA : LDA.l RNGMultiItemTable, X RTL +;-------------------------------------------------------------------------------- +CountBottles: + LDX.b #$00 + LDA $7EF35C : BEQ ++ : INX + ++ : LDA $7EF35D : BEQ ++ : INX + ++ : LDA $7EF35E : BEQ ++ : INX + ++ : LDA $7EF35F : BEQ ++ : INX + ++ + TXA +RTS ;-------------------------------------------------------------------------------- \ No newline at end of file diff --git a/tables.asm b/tables.asm index d6e993e..be9200b 100644 --- a/tables.asm +++ b/tables.asm @@ -198,6 +198,10 @@ ProgressiveArmorLimit: db #$02 ; #$02 - 2 Armors (default) ProgressiveArmorReplacement: db #$47 ; #$47 - 20 Rupees (default) +BottleLimit: +db #$04 ; #$04 - 4 Bottles (default) +BottleLimitReplacement: +db #$47 ; #$47 - 20 Rupees (default) ;-------------------------------------------------------------------------------- org $308100 ; PC 0x180100 (0x40 bytes) ShovelSpawnTable: