get prize for beating deku scrub bro, add shield deflection
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
; =========================================================
|
||||
; Deku Scrub Bro Enemy
|
||||
|
||||
!SPRID = $14 ; The sprite ID you are overwriting (HEX)
|
||||
!NbrTiles = 03 ; Number of tiles used in a frame
|
||||
@@ -10,7 +12,7 @@
|
||||
!SmallShadow = 00 ; 01 = small shadow, 00 = no shadow
|
||||
!Shadow = 00 ; 00 = don't draw shadow, 01 = draw a shadow
|
||||
!Palette = 00 ; Unused in this template (can be 0 to 7)
|
||||
!Hitbox = 00 ; 00 to 31, can be viewed in sprite draw tool
|
||||
!Hitbox = 03 ; 00 to 31, can be viewed in sprite draw tool
|
||||
!Persist = 00 ; 01 = your sprite continue to live offscreen
|
||||
!Statis = 00 ; 00 = is sprite is alive?, (kill all enemies room)
|
||||
!CollisionLayer = 00 ; 01 = will check both layer for collision
|
||||
@@ -44,6 +46,7 @@ Sprite_DekuScrubEnemy_Long:
|
||||
RTL ; Go back to original code
|
||||
}
|
||||
|
||||
; =========================================================
|
||||
|
||||
Sprite_DekuScrubEnemy_Prep:
|
||||
{
|
||||
@@ -58,6 +61,8 @@ Sprite_DekuScrubEnemy_Prep:
|
||||
RTL
|
||||
}
|
||||
|
||||
; =========================================================
|
||||
|
||||
; 0-2 - Spitting
|
||||
; 3-6 - Spinning
|
||||
; 7-7 - Crouching
|
||||
@@ -94,7 +99,7 @@ Sprite_DekuScrubEnemy_Main:
|
||||
LDA $20 : STA $03
|
||||
LDA SprX, X : STA $04
|
||||
LDA SprY, X : STA $05
|
||||
JSR GetDistance8bit : CMP.b #$24 : BCC .too_close
|
||||
JSL GetDistance8bit_Long : CMP.b #$24 : BCC .too_close
|
||||
; The player is below the scrub, so it should pop up
|
||||
LDA #$20 : STA SprTimerA, X
|
||||
%GotoAction(1)
|
||||
@@ -122,7 +127,7 @@ Sprite_DekuScrubEnemy_Main:
|
||||
LDA POSY : STA $03
|
||||
LDA SprX, X : STA $04
|
||||
LDA SprY, X : STA $05
|
||||
JSR GetDistance8bit : CMP #$18 : BCS .not_too_close
|
||||
JSL GetDistance8bit_Long : CMP #$18 : BCS .not_too_close
|
||||
%GotoAction(0)
|
||||
.not_too_close
|
||||
RTS
|
||||
@@ -187,9 +192,15 @@ Sprite_DekuScrubEnemy_Main:
|
||||
{
|
||||
%StartOnFrame(7)
|
||||
%PlayAnimation(7,7,1)
|
||||
%SetHarmless(1)
|
||||
|
||||
JSL Sprite_PlayerCantPassThrough
|
||||
JSL Sprite_CheckDamageFromPlayer
|
||||
|
||||
LDA.w SprMiscD, X : BNE .no_talk
|
||||
%ShowSolicitedMessage($12D) : BCC .no_talk
|
||||
JSR DekuScrub_GiveRandomPrize
|
||||
LDA.b #$01 : STA.w SprMiscD, X
|
||||
.no_talk
|
||||
|
||||
RTS
|
||||
}
|
||||
@@ -216,6 +227,22 @@ Sprite_DekuScrubEnemy_Main:
|
||||
}
|
||||
}
|
||||
|
||||
; =========================================================
|
||||
|
||||
DekuScrub_GiveRandomPrize:
|
||||
{
|
||||
JSL GetRandomInt : AND.b #$05
|
||||
TAY
|
||||
LDA.w .prizes, Y
|
||||
TAY : STZ $02E9
|
||||
JSL Link_ReceiveItem
|
||||
|
||||
RTS
|
||||
|
||||
.prizes
|
||||
db $40, $41, $42, $43, $44, $45
|
||||
}
|
||||
|
||||
CheckForPeaShotRedirect:
|
||||
{
|
||||
LDA.w $0D10, X : STA.b $00
|
||||
@@ -256,6 +283,8 @@ SpawnPeaShot:
|
||||
|
||||
LDA.b #$01 : STA $0E30, Y
|
||||
LDA.b #$06 : STA $0D80, Y
|
||||
LDA.b #$20 : STA.w SprPrize, Y
|
||||
LDA.b #$02 : STA.w SprMiscC, Y
|
||||
|
||||
PHX
|
||||
|
||||
@@ -285,6 +314,7 @@ SpawnPeaShot:
|
||||
RTS
|
||||
}
|
||||
|
||||
; =========================================================
|
||||
|
||||
Sprite_DekuScrubEnemy_Draw:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user