From df99b4bda8c5dbf6cf5b993fcdc9b1ae138caa05 Mon Sep 17 00:00:00 2001 From: Karkat Date: Tue, 6 Mar 2018 23:03:35 -0500 Subject: [PATCH] let's dev 3/6/18 fixed fairy fountains to only take bottles fixed light cone bug in standard escape fixed mid-arrow bow swap bug started work on seizure-safe mode --- LTTP_RND_GeneralBugfixes.asm | 5 ++++- accessability.asm | 8 ++++++++ fairyfixes.asm | 25 +++++++++++++++++++++++++ hooks.asm | 10 ++++++++-- inventory.asm | 7 +++++++ lampmantlecone.asm | 3 ++- tables.asm | 4 ++++ 7 files changed, 58 insertions(+), 4 deletions(-) diff --git a/LTTP_RND_GeneralBugfixes.asm b/LTTP_RND_GeneralBugfixes.asm index eba6383..feca4cb 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 ; <- FFFF8 timestamp rom -db #$20, #$18, #$03, #$03 ; year/month/day +db #$20, #$18, #$03, #$06 ; year/month/day ;================================================================================ @@ -382,6 +382,9 @@ Sprite_DrawMultiple_player_deferred: org $05E1A7 ; 02E1A7 - Bank05.asm : 2592 Sprite_ShowSolicitedMessageIfPlayerFacing: +org $05E1F0 +Sprite_ShowMessageFromPlayerContact: + org $05E219 Sprite_ShowMessageUnconditional: diff --git a/accessability.asm b/accessability.asm index 9bc46ab..c934c74 100644 --- a/accessability.asm +++ b/accessability.asm @@ -9,4 +9,12 @@ FlipGreenPendant: LDA $0D : STA $0802, X ; stuff we wrote over "Set CHR, palette, and priority of the sprite" LDA $0C : STA $0803, X RTL +;================================================================================ +SetEtherFlicker: + LDA.l Seizure_Safety : BNE + + LDA $031D : CMP.b #$0B : RTL + + : CMP.b #$01 : BNE + + REP #$02 : RTL + + +RTL ;================================================================================ \ No newline at end of file diff --git a/fairyfixes.asm b/fairyfixes.asm index c13b91c..88ddc11 100644 --- a/fairyfixes.asm +++ b/fairyfixes.asm @@ -23,4 +23,29 @@ RTL .player_mp_not_full_yet LDA.b #$01 RTL +;-------------------------------------------------------------------------------- +FairyPond_Init: + LDA.l Restrict_Ponds : BNE + + LDA.b #$48 + JSL.l Sprite_ShowMessageFromPlayerContact + RTL + + + PHY : JSL.l Sprite_CheckDamageToPlayerSameLayerLong : BCC + + LDA $7EF35C : CMP.b #$02 : BNE ++ : LDA.b #$1C : PHA : BRA .emptyBottle : ++ + LDA $7EF35D : CMP.b #$02 : BNE ++ : LDA.b #$1D : PHA : BRA .emptyBottle : ++ + LDA $7EF35E : CMP.b #$02 : BNE ++ : LDA.b #$1E : PHA : BRA .emptyBottle : ++ + LDA $7EF35F : CMP.b #$02 : BNE ++ : LDA.b #$1F : PHA : BRA .emptyBottle : ++ + .noInventory + LDA $0D80, X : !ADD #$0A : STA $0D80, X + LDA.b #$51 + LDY.b #$01 + JSL.l Sprite_ShowMessageFromPlayerContact + PLY + RTL + .emptyBottle + LDA $0D80, X : !ADD #$02 : STA $0D80, X + LDA.b #$01 : STA $02E4 + PLA : STA $1CE8 + + : PLY +RTL ;-------------------------------------------------------------------------------- \ No newline at end of file diff --git a/hooks.asm b/hooks.asm index f298ec1..525fdbd 100644 --- a/hooks.asm +++ b/hooks.asm @@ -366,6 +366,9 @@ dw $0000, $0002, $0004, $0032, $0004, $0006, $0030 ;JSL FlipGreenPendant ;NOP #6 ;-------------------------------------------------------------------------------- +org $08AAE1 ; <- 42AE1 - ancilla_ether_spell.asm : 22 (LDA $031D : CMP.b #$0B) +JSL.l SetEtherFlicker : NOP +;-------------------------------------------------------------------------------- ;================================================================================ ; Ice Floor Toggle @@ -1347,8 +1350,11 @@ NOP #6 ; remove crystal room cutscene check that causes softlocks ;================================================================================ ; Text Changes ;-------------------------------------------------------------------------------- -org $06C7D3 ; <- 347D3 - sprite_ponds.asm:720 (LDA.b #$8A) -JSL.l DialogFairyThrow +;org $06C7D3 ; <- 347D3 - sprite_ponds.asm:720 (LDA.b #$8A) +;JSL.l DialogFairyThrow +;-------------------------------------------------------------------------------- +org $06C7BB ; <- 347BB - sprite_ponds.asm:702 (JSL Sprite_ShowMessageFromPlayerContact : BCC BRANCH_ALPHA) +JSL.l FairyPond_Init ;-------------------------------------------------------------------------------- org $08C5ED ; <- 445ED - ancilla_receive_item.asm:395 (STA $1CF0 : CMP.w #$0070 : BNE .notGeezerSpeech) NOP #3 diff --git a/inventory.asm b/inventory.asm index 1df9ef8..5582939 100644 --- a/inventory.asm +++ b/inventory.asm @@ -63,6 +63,13 @@ RTL BRL .captured + CMP #$01 : BNE + ; bow LDA !INVENTORY_SWAP_2 : AND #$C0 : CMP #$C0 : BNE .errorJump ; make sure we have both bows + PHX : LDX.b #$00 ; scan ancilla table for arrows + -- : CPX.b #$0A : !BGE ++ + LDA $0C4A, X : CMP.b #$09 : BNE +++ + PLX : BRA .errorJump ; found an arrow, don't allow the swap + +++ + INX : BRA -- : ++ + PLX LDA $7EF340 : !SUB #$01 : EOR #$02 : !ADD #$01 : STA $7EF340 ; swap bows LDA.b #$20 : STA $012F ; menu select sound BRL .captured diff --git a/lampmantlecone.asm b/lampmantlecone.asm index 371203c..c2dd7fd 100644 --- a/lampmantlecone.asm +++ b/lampmantlecone.asm @@ -37,7 +37,8 @@ RTL ;================================================================================ ;-------------------------------------------------------------------------------- SetOverlayIfLamp: - LDA $7EF34A ; check if lamp + ;LDA $7EF34A ; check if lamp + JSL.l LampCheck STA $1D ; write it directly to the overlay, this isn't a terrible idea at all RTL ;================================================================================ diff --git a/tables.asm b/tables.asm index ec90904..4826b0c 100644 --- a/tables.asm +++ b/tables.asm @@ -786,6 +786,10 @@ org $30817E ; PC 0x18017E Restrict_Ponds: db #$01 ; #$00 = Original Behavior - #$01 - Restrict to Bottles (Default) ;================================================================================ +org $30817F ; PC 0x18017F +Seizure_Safety: +db #$00 ; #$00 = Off (Default) - #$01 = Limit Certain Effects +;================================================================================ org $308190 ; PC 0x180190 TimerStyle: db #$00 ; #$00 = Off (Default) - #$01 Countdown - #$02 = Stopwatch