diff --git a/data/damage_table.bin b/data/damage_table.bin index 1fd15f2..557656e 100644 Binary files a/data/damage_table.bin and b/data/damage_table.bin differ diff --git a/data/i18n_en.bin b/data/i18n_en.bin index 1537236..bb23181 100644 Binary files a/data/i18n_en.bin and b/data/i18n_en.bin differ diff --git a/dialog.asm b/dialog.asm index e268b8a..3a88e38 100644 --- a/dialog.asm +++ b/dialog.asm @@ -252,8 +252,8 @@ DialogGanon2: LDA.w #$018D : JMP .done + JSL CheckMushroom - LDA.w #$0198 : JMP .done BCC + + LDA.w #$0198 : JMP .done + LDA.l GanonVulnerabilityItem : AND #$00FF : BNE .special_item LDA.l SpecialWeapons : AND.w #$00FF diff --git a/hooks.asm b/hooks.asm index 6c5f106..f3a1b5e 100644 --- a/hooks.asm +++ b/hooks.asm @@ -2694,3 +2694,11 @@ db $00, $EE, $DE, $D4, $D0, $D4, $DE, $EE org $05A4BD JSL SetLanmolaVelocity BRA + : NOP #4 : + + +; ganon - silvers just don't work like they used to +org $0DB93D +db $08 + +; ganon - randomize vulnerability when stunned +org $1D9010 +JSL StunGanon : NOP diff --git a/ram.asm b/ram.asm index 0b75f5f..1b2c57e 100644 --- a/ram.asm +++ b/ram.asm @@ -525,7 +525,7 @@ OHKOFlag: skip 1 ; Any non-zero write sets OHKO mode SpriteSwapper: skip 1 ; Loads new link sprite and glove/armor palette. No gfx or ; code currently in base ROM for this. BootsModifier: skip 1 ; $01 = Give dash ability -skip 1 ; Unused +GanonVulnerabilityItem: skip 1 ; Item Ganon is vulnerable to while stunned ; Crypto Block ($7F50D0 - $7F51FF) KeyBase: skip $10 ; y: skip 4 ; diff --git a/tables.asm b/tables.asm index 4280a19..c39b7b6 100644 --- a/tables.asm +++ b/tables.asm @@ -105,7 +105,7 @@ ChallengeModes: db #$00 ; #$00 = Default behavior; ;-------------------------------------------------------------------------------- org $30802E ; PC 0x18003E -GanonVulnerabilityItem: +DONOTUSE__GanonVulnerabilityItem: db #$00 ; #$00 = Default behavior (silver arrows) ;-------------------------------------------------------------------------------- org $30802F ; PC 0x18003F diff --git a/variable_ganon_vulnerability.asm b/variable_ganon_vulnerability.asm index 4ff68e3..438f65e 100644 --- a/variable_ganon_vulnerability.asm +++ b/variable_ganon_vulnerability.asm @@ -126,6 +126,53 @@ CheckBeeBoss: RTL ; return non-zero A if entity is a boss (and bee should not attack) ;-------------------------------------------------------------------------------- +StunGanon: + JSL GetRandomInt + BIT.b #$30 + BEQ .non_magic +.magic + AND.b #$0E + LSR + BRA .chosen +.non_magic + AND.b #$0C + LSR #2 + ORA.b #$08 +.chosen + PHX + TAX + LDA.l Ganon_RandomizeItem, X + STA.l GanonVulnerabilityItem + PLX + JSL DialogItem + LDA.b #$D7 + STA.w $0E20, X + RTL +;-------------------------------------------------------------------------------- +DialogItem: + PHX : PHY + LDA.l GanonVulnerabilityItem + ASL + TAX + LDA.l Ganon_TextBox+1, X + TAY + LDA.l Ganon_TextBox, X + JSL Sprite_ShowMessageUnconditional + PLY : PLX + RTL +;-------------------------------------------------------------------------------- +Ganon_RandomizeItem: +db #$05, #$06, #$07, #$08 +db #$09, #$0A, #$11, #$12 +db #$01, #$02, #$03, #$0C +;-------------------------------------------------------------------------------- +Ganon_TextBox: +dw #$0000 ; default behavior--assume silvers +dw #$0199, #$019A, #$019B, #$019C, #$019D +dw #$019E, #$019F, #$01A0, #$01A1, #$01A2 +dw #$0000, #$01A3, #$0000, #$0000, #$0000 +dw #$01A4, #$01A5, #$01A6, #$0000, #$0000 +;-------------------------------------------------------------------------------- Ganon_CheckByAncilla: db #$00 ; default behavior--we shouldn't be checking the table here anyway db #$00, #$05, #$1F, #$07, #$00