update puffstool ai, add damage flash to draw code
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
; =========================================================
|
||||
|
||||
!SPRID = $00; The sprite ID you are overwriting (HEX)
|
||||
!NbrTiles = 0 ; Number of tiles used in a frame
|
||||
!SPRID = $B1 ; The sprite ID you are overwriting (HEX)
|
||||
!NbrTiles = 02 ; Number of tiles used in a frame
|
||||
!Harmless = 00 ; 00 = Sprite is Harmful, 01 = Sprite is Harmless
|
||||
!HVelocity = 00 ; Is your sprite going super fast? put 01 if it is
|
||||
!Health = 0 ; Number of Health the sprite have
|
||||
@@ -37,6 +37,7 @@ Sprite_Puffstool_Long:
|
||||
PHB : PHK : PLB
|
||||
|
||||
JSR Sprite_Puffstool_Draw ; Call the draw code
|
||||
JSL Sprite_DrawShadow
|
||||
JSL Sprite_CheckActive ; Check if game is not paused
|
||||
BCC .SpriteIsNotActive ; Skip Main code is sprite is innactive
|
||||
|
||||
@@ -53,7 +54,7 @@ Sprite_Puffstool_Prep:
|
||||
{
|
||||
PHB : PHK : PLB
|
||||
|
||||
|
||||
LDA.b #$80 : STA.w SprHealth, X
|
||||
|
||||
PLB
|
||||
RTL
|
||||
@@ -72,12 +73,42 @@ Sprite_Puffstool_Main:
|
||||
Puffstool_Walking:
|
||||
{
|
||||
%PlayAnimation(0,6,10)
|
||||
JSL Sprite_PlayerCantPassThrough
|
||||
|
||||
LDA.b #$02
|
||||
JSL Sprite_ApplySpeedTowardsPlayer
|
||||
|
||||
JSL Sprite_Move
|
||||
JSL Sprite_DamageFlash_Long
|
||||
|
||||
JSL Sprite_CheckDamageFromPlayer : BCC .no_dano
|
||||
|
||||
%GotoAction(1)
|
||||
LDA.b #$60 : STA.w SprTimerA, X
|
||||
LDA.b #$60 : STA.w SprTimerF, X
|
||||
.no_dano
|
||||
|
||||
RTS
|
||||
}
|
||||
|
||||
Puffstool_Stunned:
|
||||
{
|
||||
%PlayAnimation(7,7,10)
|
||||
|
||||
JSL Sprite_CheckIfLifted
|
||||
JSL Sprite_DamageFlash_Long
|
||||
|
||||
LDA.w SprTimerA, X : BNE +
|
||||
%GotoAction(0)
|
||||
|
||||
LDA.b #$4A ; SPRITE 4A
|
||||
LDY.b #$0B
|
||||
JSL Sprite_SpawnDynamically : BMI .no_space
|
||||
JSL Sprite_SetSpawnedCoordinates
|
||||
JSL Sprite_TransmuteToBomb
|
||||
.no_space
|
||||
|
||||
+
|
||||
RTS
|
||||
}
|
||||
}
|
||||
@@ -92,7 +123,7 @@ Sprite_Puffstool_Draw:
|
||||
|
||||
LDA $0DC0, X : CLC : ADC $0D90, X : TAY;Animation Frame
|
||||
LDA .start_index, Y : STA $06
|
||||
|
||||
LDA.w SprMiscA, X : STA $08 ; Palette damage flash
|
||||
|
||||
PHX
|
||||
LDX .nbr_of_tiles, Y ;amount of tiles -1
|
||||
@@ -125,7 +156,7 @@ Sprite_Puffstool_Draw:
|
||||
INY
|
||||
LDA .chr, X : STA ($90), Y
|
||||
INY
|
||||
LDA .properties, X : STA ($90), Y
|
||||
LDA .properties, X : ORA $08 : STA ($90), Y
|
||||
|
||||
PHY
|
||||
|
||||
|
||||
Reference in New Issue
Block a user