From a15ae1dc942e530b43d7986aa70596b18237d73e Mon Sep 17 00:00:00 2001 From: Karkat Date: Fri, 7 Jul 2017 23:51:48 -0400 Subject: [PATCH] let's dev 7/7/17 fixed (probably) bonk key stats added book dialog for ether and bombos tablets prepped progressive items for easy mode (progressives have progression caps with filler items replacing those above the cap) --- LTTP_RND_GeneralBugfixes.asm | 2 +- bookofmudora.asm | 2 +- dialog.asm | 32 +++++++++++++++++++++++++++++ hooks.asm | 4 ++-- newitems.asm | 18 +++++++++++----- tables.asm | 40 +++++++++++++++++++++++++++++++----- 6 files changed, 84 insertions(+), 14 deletions(-) diff --git a/LTTP_RND_GeneralBugfixes.asm b/LTTP_RND_GeneralBugfixes.asm index 134ce06..a2b6e55 100644 --- a/LTTP_RND_GeneralBugfixes.asm +++ b/LTTP_RND_GeneralBugfixes.asm @@ -26,7 +26,7 @@ org $3FFFFF ; <- 1FFFFF db #$00 ; expand file to 2mb org $1FFFF8 ; timestamp rom -dl #$20170701 +dl #$20170707 ;================================================================================ diff --git a/bookofmudora.asm b/bookofmudora.asm index 8f9c9ac..a49c842 100644 --- a/bookofmudora.asm +++ b/bookofmudora.asm @@ -54,7 +54,7 @@ GiveBonkItem: JSR LoadBonkItem CMP #$24 : BNE .notKey .key - JSL.l AddInventory_incrementKeyLong + PHY : LDY.b #$24 : JSL.l AddInventory : PLY ; do inventory processing for a small key LDA $7EF36F : INC A : STA $7EF36F LDA.b #$2F : JSL.l Sound_SetSfx3PanLong RTL diff --git a/dialog.asm b/dialog.asm index c21f985..f159b74 100644 --- a/dialog.asm +++ b/dialog.asm @@ -242,6 +242,38 @@ RTL PLA : JSL Sprite_ShowMessageUnconditional ; Text From MSPedestalText (tables.asm) RTL ;-------------------------------------------------------------------------------- +DialogEtherTablet: + PHA + LDA $0202 : CMP.b #$0F : BEQ + ; Show normal text if book is not equipped + - + PLA : JSL Sprite_ShowMessageUnconditional ; Wacky Hylian Text +RTL + + + BIT $F4 : BVC - ; Show normal text if Y is not pressed + LDA $7EF359 : CMP.b #$02 : !BGE .noText + %LoadDialogAddress(EtherTabletText) + PLA : JSL Sprite_ShowMessageUnconditional ; Text From MSPedestalText (tables.asm) +RTL + .noText + PLA +RTL +;-------------------------------------------------------------------------------- +DialogBombosTablet: + PHA + LDA $0202 : CMP.b #$0F : BEQ + ; Show normal text if book is not equipped + - + PLA : JSL Sprite_ShowMessageUnconditional ; Wacky Hylian Text +RTL + + + BIT $F4 : BVC - ; Show normal text if Y is not pressed + LDA $7EF359 : CMP.b #$02 : !BGE .noText + %LoadDialogAddress(BombosTabletText) + PLA : JSL Sprite_ShowMessageUnconditional ; Text From MSPedestalText (tables.asm) +RTL + .noText + PLA +RTL +;-------------------------------------------------------------------------------- DialogUncle: ;%LoadDialog(UncleQuote,DialogUncleData) %LoadDialogAddress(UncleText) diff --git a/hooks.asm b/hooks.asm index 944a272..6e6118b 100644 --- a/hooks.asm +++ b/hooks.asm @@ -1317,11 +1317,11 @@ NOP #4 ;---------------------------------------------------- ;-- Bombos tablet org $05F3BF ; <- 2F3BF sprite_medallion_tablet.asm : 254 (JSL Sprite_ShowMessageUnconditional) -NOP #4 +JSL.l DialogBombosTablet ;---------------------------------------------------- ;-- Ether tablet org $05F429 ; <- 2F429 sprite_medallion_tablet.asm : 317 (JSL Sprite_ShowMessageUnconditional) -NOP #4 +JSL.l DialogEtherTablet ;---------------------------------------------------- ;-- Agahnim 1 Defeated org $068475 ; <- 30475 Bank06.asm : 762 - (JSL Sprite_ShowMessageMinimal) diff --git a/newitems.asm b/newitems.asm index 0693411..15425d3 100755 --- a/newitems.asm +++ b/newitems.asm @@ -288,7 +288,9 @@ AddReceivedItemExpanded: JSL.l PreItemGet LDA $02D8 : CMP #$5E : BNE ++ ; Progressive Sword - LDA $7EF359 : BNE + ; No Sword + LDA $7EF359 : CMP.l ProgressiveSwordLimit : !BLT + + LDA.l ProgressiveSwordReplacement : STA $02D8 : BRL .done + + : CMP.b #$00 : BNE + ; No Sword LDA.b #$49 : STA $02D8 : BRL .done + : CMP.b #$01 : BNE + ; Fighter Sword LDA.b #$50 : STA $02D8 : BRL .done @@ -297,16 +299,22 @@ AddReceivedItemExpanded: + ; Everything Else LDA.b #$03 : STA $02D8 : BRL .done ++ : CMP.b #$5F : BNE ++ ; Progressive Shield + LDA !PROGRESSIVE_SHIELD : LSR #6 : CMP.l ProgressiveShieldLimit : !BLT + + LDA.l ProgressiveShieldReplacement : STA $02D8 : BRL .done + + LDA !PROGRESSIVE_SHIELD : AND.b #$C0 : BNE + ; No Shield LDA.b #$04 : STA $02D8 - LDA !PROGRESSIVE_SHIELD : AND.b #$3F : ORA.b #$40 : STA !PROGRESSIVE_SHIELD : BRA .done + LDA !PROGRESSIVE_SHIELD : !ADD.b #$40 : STA !PROGRESSIVE_SHIELD : BRL .done + : CMP.b #$40 : BNE + ; Fighter Shield LDA.b #$05 : STA $02D8 - LDA !PROGRESSIVE_SHIELD : AND.b #$3F : ORA.b #$80 : STA !PROGRESSIVE_SHIELD : BRA .done + LDA !PROGRESSIVE_SHIELD : !ADD.b #$40 : STA !PROGRESSIVE_SHIELD : BRA .done + ; Everything Else - LDA.b #$06 : STA $02D8 : BRA .done + LDA.b #$06 : STA $02D8 + LDA !PROGRESSIVE_SHIELD : !ADD.b #$40 : STA !PROGRESSIVE_SHIELD : BRA .done ++ : CMP.b #$60 : BNE ++ ; Progressive Armor - LDA $7EF35B : BNE + ; No Shield + LDA $7EF35B : CMP.l ProgressiveArmorLimit : !BLT + + LDA.l ProgressiveArmorReplacement : STA $02D8 : BRL .done + + : BNE + ; No Shield LDA.b #$22 : STA $02D8 : BRA .done + ; Everything Else LDA.b #$23 : STA $02D8 : BRA .done diff --git a/tables.asm b/tables.asm index addf59b..99e5ade 100644 --- a/tables.asm +++ b/tables.asm @@ -185,6 +185,20 @@ org $308086 ; PC 0x180086 GanonAgahRNG: db #$00 ; $00 = static rng, $01 = no extra blue balls/warps ;-------------------------------------------------------------------------------- +org $308090 ; PC 0x180090 +ProgressiveSwordLimit: +db #$04 ; #$04 (default) +ProgressiveSwordReplacement: +db #$47 ; #$47 - 20 Rupees (default) +ProgressiveShieldLimit: +db #$03 ; #$03 (default) +ProgressiveShieldReplacement: +db #$47 ; #$47 - 20 Rupees (default) +ProgressiveArmorLimit: +db #$02 ; #$02 (default) +ProgressiveArmorReplacement: +db #$47 ; #$47 - 20 Rupees (default) +;-------------------------------------------------------------------------------- org $308100 ; PC 0x180100 (0x40 bytes) ShovelSpawnTable: db $B2 ; Gold Bee @@ -773,7 +787,7 @@ db $7f, $7f ; $308A00 (0x180A00) - $308AFF (0x180AFF) ; SahasrahlaNoPendantText org $308A00 ; PC 0x180A00 -SahasrahlaNoPendantText: +SahasrahlaNoPendantText: ; Want something|for free? Tell|you what|bring me the|green pendant. db $74, $00, $C0, $00, $AA, $00, $B7, $00, $BD, $00, $FF, $00, $BC, $00, $B8, $00, $B6, $00, $AE, $00, $BD, $00, $B1, $00, $B2, $00, $B7, $00, $B0, $75, $00, $AF, $00, $B8, $00, $BB, $00, $FF, $00, $AF, $00, $BB, $00, $AE, $00, $AE, $00, $C6, $00, $FF, $00, $BD, $00, $AE, $00, $B5, $00, $B5, $76, $00, $C2, $00, $B8, $00, $BE, $00, $FF, $00, $C0, $00, $B1, $00, $AA, $00, $BD, $00, $CC, $7E, $73, $76, $00, $AB, $00, $BB, $00, $B2, $00, $B7, $00, $B0, $00, $FF, $00, $B6, $00, $AE, $00, $FF, $00, $BD, $00, $B1, $00, $AE, $73, $76, $00, $B0, $00, $BB, $00, $AE, $00, $AE, $00, $B7, $00, $FF, $00, $B9, $00, $AE, $00, $B7, $00, $AD, $00, $AA, $00, $B7, $00, $BD, $00, $CD db $7f, $7f @@ -781,7 +795,7 @@ db $7f, $7f ; $308B00 (0x180B00) - $308BFF (0x180BFF) ; SahasrahlaAfterItemText org $308B00 ; PC 0x180B00 -SahasrahlaAfterItemText: +SahasrahlaAfterItemText: ; I already gave|you all I have|Why don't you|go bother|someone else? db $74, $00, $B2, $00, $FF, $00, $AA, $00, $B5, $00, $BB, $00, $AE, $00, $AA, $00, $AD, $00, $C2, $00, $FF, $00, $B0, $00, $AA, $00, $BF, $00, $AE, $75, $00, $C2, $00, $B8, $00, $BE, $00, $FF, $00, $AA, $00, $B5, $00, $B5, $00, $FF, $00, $B2, $00, $FF, $00, $B1, $00, $AA, $00, $BF, $00, $AE, $76, $00, $C0, $00, $B1, $00, $C2, $00, $FF, $00, $AD, $00, $B8, $00, $B7, $00, $D8, $00, $BD, $00, $FF, $00, $C2, $00, $B8, $00, $BE, $7E, $73, $76, $00, $B0, $00, $B8, $00, $FF, $00, $AB, $00, $B8, $00, $BD, $00, $B1, $00, $AE, $00, $BB, $73, $76, $00, $BC, $00, $B8, $00, $B6, $00, $AE, $00, $B8, $00, $B7, $00, $AE, $00, $FF, $00, $AE, $00, $B5, $00, $BC, $00, $AE, $00, $C6 db $7f, $7f @@ -789,7 +803,7 @@ db $7f, $7f ; $308C00 (0x180C00) - $308CFF (0x180CFF) ; AlcoholicText org $308C00 ; PC 0x180C00 -AlcoholicText: +AlcoholicText: ; If you haven't|found Quake|yet|it's not your|fault. db $74, $00, $B2, $00, $AF, $00, $FF, $00, $C2, $00, $B8, $00, $BE, $00, $FF, $00, $B1, $00, $AA, $00, $BF, $00, $AE, $00, $B7, $00, $D8, $00, $BD, $75, $00, $AF, $00, $B8, $00, $BE, $00, $B7, $00, $AD, $00, $FF, $00, $BA, $00, $BE, $00, $AA, $00, $B4, $00, $AE, $76, $00, $C2, $00, $AE, $00, $BD, $00, $CC, $7E, $73, $76, $00, $B2, $00, $BD, $00, $D8, $00, $BC, $00, $FF, $00, $B7, $00, $B8, $00, $BD, $00, $FF, $00, $C2, $00, $B8, $00, $BE, $00, $BB, $73, $76, $00, $AF, $00, $AA, $00, $BE, $00, $B5, $00, $BD, $00, $CD db $7f, $7f @@ -797,7 +811,7 @@ db $7f, $7f ; $308D00 (0x180D00) - $308DFF (0x180DFF) ; BombShopGuyText org $308D00 ; PC 0x180D00 -BombShopGuyText: +BombShopGuyText: ; please deliver|this big bomb|to my fairy|friend in the|pyramid? db $74, $00, $B9, $00, $B5, $00, $AE, $00, $AA, $00, $BC, $00, $AE, $00, $FF, $00, $AD, $00, $AE, $00, $B5, $00, $B2, $00, $BF, $00, $AE, $00, $BB, $75, $00, $BD, $00, $B1, $00, $B2, $00, $BC, $00, $FF, $00, $AB, $00, $B2, $00, $B0, $00, $FF, $00, $AB, $00, $B8, $00, $B6, $00, $AB, $76, $00, $BD, $00, $B8, $00, $FF, $00, $B6, $00, $C2, $00, $FF, $00, $AF, $00, $AA, $00, $B2, $00, $BB, $00, $C2, $7E, $73, $76, $00, $AF, $00, $BB, $00, $B2, $00, $AE, $00, $B7, $00, $AD, $00, $FF, $00, $B2, $00, $B7, $00, $FF, $00, $BD, $00, $B1, $00, $AE, $73, $76, $00, $B9, $00, $C2, $00, $BB, $00, $AA, $00, $B6, $00, $B2, $00, $AD, $00, $C6 db $7f, $7f @@ -809,6 +823,22 @@ BombShopGuyNoCrystalsText: ; bring me the|5th and 6th|crystals so I|can make a big|bomb! db $74, $00, $AB, $00, $BB, $00, $B2, $00, $B7, $00, $B0, $00, $FF, $00, $B6, $00, $AE, $00, $FF, $00, $BD, $00, $B1, $00, $AE, $75, $00, $A5, $00, $BD, $00, $B1, $00, $FF, $00, $AA, $00, $B7, $00, $AD, $00, $FF, $00, $A6, $00, $BD, $00, $B1, $76, $00, $AC, $00, $BB, $00, $C2, $00, $BC, $00, $BD, $00, $AA, $00, $B5, $00, $BC, $00, $FF, $00, $BC, $00, $B8, $00, $FF, $00, $B2, $7E, $73, $76, $00, $AC, $00, $AA, $00, $B7, $00, $FF, $00, $B6, $00, $AA, $00, $B4, $00, $AE, $00, $FF, $00, $AA, $00, $FF, $00, $AB, $00, $B2, $00, $B0, $73, $76, $00, $AB, $00, $B8, $00, $B6, $00, $AB, $00, $C7 db $7f, $7f +;-------------------------------------------------------------------------------- +; $308F00 (0x180F00) - $308FFF (0x180FFF) +; EtherTabletText +org $308F00 ; PC 0x180F00 +EtherTabletText: +; bring me the|5th and 6th|crystals so I|can make a big|bomb! +db $74, $00, $AB, $00, $BB, $00, $B2, $00, $B7, $00, $B0, $00, $FF, $00, $B6, $00, $AE, $00, $FF, $00, $BD, $00, $B1, $00, $AE, $75, $00, $A5, $00, $BD, $00, $B1, $00, $FF, $00, $AA, $00, $B7, $00, $AD, $00, $FF, $00, $A6, $00, $BD, $00, $B1, $76, $00, $AC, $00, $BB, $00, $C2, $00, $BC, $00, $BD, $00, $AA, $00, $B5, $00, $BC, $00, $FF, $00, $BC, $00, $B8, $00, $FF, $00, $B2, $7E, $73, $76, $00, $AC, $00, $AA, $00, $B7, $00, $FF, $00, $B6, $00, $AA, $00, $B4, $00, $AE, $00, $FF, $00, $AA, $00, $FF, $00, $AB, $00, $B2, $00, $B0, $73, $76, $00, $AB, $00, $B8, $00, $B6, $00, $AB, $00, $C7 +db $7f, $7f +;-------------------------------------------------------------------------------- +; $308E00 (0x180E00) - $308EFF (0x180EFF) +; BombosTabletText +org $309000 ; PC 0x181000 +BombosTabletText: +; please deliver|this big bomb|to my fairy|friend in the|pyramid? +db $74, $00, $B9, $00, $B5, $00, $AE, $00, $AA, $00, $BC, $00, $AE, $00, $FF, $00, $AD, $00, $AE, $00, $B5, $00, $B2, $00, $BF, $00, $AE, $00, $BB, $75, $00, $BD, $00, $B1, $00, $B2, $00, $BC, $00, $FF, $00, $AB, $00, $B2, $00, $B0, $00, $FF, $00, $AB, $00, $B8, $00, $B6, $00, $AB, $76, $00, $BD, $00, $B8, $00, $FF, $00, $B6, $00, $C2, $00, $FF, $00, $AF, $00, $AA, $00, $B2, $00, $BB, $00, $C2, $7E, $73, $76, $00, $AF, $00, $BB, $00, $B2, $00, $AE, $00, $B7, $00, $AD, $00, $FF, $00, $B2, $00, $B7, $00, $FF, $00, $BD, $00, $B1, $00, $AE, $73, $76, $00, $B9, $00, $C2, $00, $BB, $00, $AA, $00, $B6, $00, $B2, $00, $AD, $00, $C6 +db $7f, $7f ;================================================================================ org $30A000 ; $30A000 (0x182000) - $30A07F (0x18007F) RNGSingleItemTable: @@ -1114,7 +1144,7 @@ dw #9999 ; Rupee Limit !BIGRAM = "$7EC900"; ; $7EC900 - Big RAM Buffer ($1F00) ;================================================================================ -org $309000 ; PC 0x181000 +org $30FF00 ; PC 0x187F00 NameHashTable: ; change this for each new version - MOVE THIS TO BANK $30 db $57, $41, $D6, $7A, $E0, $10, $8A, $97, $A2, $89, $82, $45, $46, $1C, $DF, $F7 db $55, $0F, $1D, $56, $AC, $29, $DC, $D1, $25, $2A, $C5, $92, $42, $B7, $BE, $50