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)
|
!SPRID = $14 ; The sprite ID you are overwriting (HEX)
|
||||||
!NbrTiles = 03 ; Number of tiles used in a frame
|
!NbrTiles = 03 ; Number of tiles used in a frame
|
||||||
@@ -10,7 +12,7 @@
|
|||||||
!SmallShadow = 00 ; 01 = small shadow, 00 = no shadow
|
!SmallShadow = 00 ; 01 = small shadow, 00 = no shadow
|
||||||
!Shadow = 00 ; 00 = don't draw shadow, 01 = draw a shadow
|
!Shadow = 00 ; 00 = don't draw shadow, 01 = draw a shadow
|
||||||
!Palette = 00 ; Unused in this template (can be 0 to 7)
|
!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
|
!Persist = 00 ; 01 = your sprite continue to live offscreen
|
||||||
!Statis = 00 ; 00 = is sprite is alive?, (kill all enemies room)
|
!Statis = 00 ; 00 = is sprite is alive?, (kill all enemies room)
|
||||||
!CollisionLayer = 00 ; 01 = will check both layer for collision
|
!CollisionLayer = 00 ; 01 = will check both layer for collision
|
||||||
@@ -44,6 +46,7 @@ Sprite_DekuScrubEnemy_Long:
|
|||||||
RTL ; Go back to original code
|
RTL ; Go back to original code
|
||||||
}
|
}
|
||||||
|
|
||||||
|
; =========================================================
|
||||||
|
|
||||||
Sprite_DekuScrubEnemy_Prep:
|
Sprite_DekuScrubEnemy_Prep:
|
||||||
{
|
{
|
||||||
@@ -58,6 +61,8 @@ Sprite_DekuScrubEnemy_Prep:
|
|||||||
RTL
|
RTL
|
||||||
}
|
}
|
||||||
|
|
||||||
|
; =========================================================
|
||||||
|
|
||||||
; 0-2 - Spitting
|
; 0-2 - Spitting
|
||||||
; 3-6 - Spinning
|
; 3-6 - Spinning
|
||||||
; 7-7 - Crouching
|
; 7-7 - Crouching
|
||||||
@@ -94,7 +99,7 @@ Sprite_DekuScrubEnemy_Main:
|
|||||||
LDA $20 : STA $03
|
LDA $20 : STA $03
|
||||||
LDA SprX, X : STA $04
|
LDA SprX, X : STA $04
|
||||||
LDA SprY, X : STA $05
|
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
|
; The player is below the scrub, so it should pop up
|
||||||
LDA #$20 : STA SprTimerA, X
|
LDA #$20 : STA SprTimerA, X
|
||||||
%GotoAction(1)
|
%GotoAction(1)
|
||||||
@@ -122,7 +127,7 @@ Sprite_DekuScrubEnemy_Main:
|
|||||||
LDA POSY : STA $03
|
LDA POSY : STA $03
|
||||||
LDA SprX, X : STA $04
|
LDA SprX, X : STA $04
|
||||||
LDA SprY, X : STA $05
|
LDA SprY, X : STA $05
|
||||||
JSR GetDistance8bit : CMP #$18 : BCS .not_too_close
|
JSL GetDistance8bit_Long : CMP #$18 : BCS .not_too_close
|
||||||
%GotoAction(0)
|
%GotoAction(0)
|
||||||
.not_too_close
|
.not_too_close
|
||||||
RTS
|
RTS
|
||||||
@@ -187,9 +192,15 @@ Sprite_DekuScrubEnemy_Main:
|
|||||||
{
|
{
|
||||||
%StartOnFrame(7)
|
%StartOnFrame(7)
|
||||||
%PlayAnimation(7,7,1)
|
%PlayAnimation(7,7,1)
|
||||||
|
%SetHarmless(1)
|
||||||
|
|
||||||
JSL Sprite_PlayerCantPassThrough
|
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
|
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:
|
CheckForPeaShotRedirect:
|
||||||
{
|
{
|
||||||
LDA.w $0D10, X : STA.b $00
|
LDA.w $0D10, X : STA.b $00
|
||||||
@@ -256,6 +283,8 @@ SpawnPeaShot:
|
|||||||
|
|
||||||
LDA.b #$01 : STA $0E30, Y
|
LDA.b #$01 : STA $0E30, Y
|
||||||
LDA.b #$06 : STA $0D80, Y
|
LDA.b #$06 : STA $0D80, Y
|
||||||
|
LDA.b #$20 : STA.w SprPrize, Y
|
||||||
|
LDA.b #$02 : STA.w SprMiscC, Y
|
||||||
|
|
||||||
PHX
|
PHX
|
||||||
|
|
||||||
@@ -285,6 +314,7 @@ SpawnPeaShot:
|
|||||||
RTS
|
RTS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
; =========================================================
|
||||||
|
|
||||||
Sprite_DekuScrubEnemy_Draw:
|
Sprite_DekuScrubEnemy_Draw:
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user