From 1eaa97763cb5e3cf88b94ae3a91ecc66e97c452f Mon Sep 17 00:00:00 2001 From: scawful Date: Tue, 22 Oct 2024 11:03:10 -0400 Subject: [PATCH] Prevent grapple with goldstar, apply higher damage --- masks/Goldstar.asm | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/masks/Goldstar.asm b/masks/Goldstar.asm index 81afede..8a32340 100644 --- a/masks/Goldstar.asm +++ b/masks/Goldstar.asm @@ -951,13 +951,33 @@ Hookshot_Init: ; ========================================================= +ApplyGoldstarDamageClass: +{ + PHA + ; If the hookshot is active + LDA.w $0202 : CMP.b #$03 : BNE .return + ; If the goldstar is active, swap in the damage class + LDA.w GoldstarOrHookshot : CMP.b #$02 : BNE .return + PLA + LDA #$02 + JMP .apply + .return + PLA + .apply + JSL $06ED25 ; Ancilla_CheckDamageToSprite_preset.apply + RTL +} + LinkHop_FindArbitraryLandingSpot = $07E370 ; Bug fix to clear $0112 when the goldstar grabs something -; Also will be where we prevent dragging with the goldstar +; Prevents grappling by clearing the timer checked by hookshot Goldstar_CheckForPreventDrag: { - STZ.w $0112 + LDA.w $0202 : CMP.b #$08 : BNE + + STZ.w $0112 + STZ.w $037E + + JSL LinkHop_FindArbitraryLandingSpot RTL } @@ -967,3 +987,7 @@ pushpc org $07AD49 LinkHookshot_GetDragged: JSL Goldstar_CheckForPreventDrag + +; Ancilla_CheckDamageToSprite.not_airborne +org $06ECF2 + JSL ApplyGoldstarDamageClass