Eon Sea Urchin impervious to sword, better prize pack
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
; =========================================================
|
; =========================================================
|
||||||
; Sprite Properties
|
; Sprite Properties
|
||||||
; =========================================================
|
; =========================================================
|
||||||
|
|
||||||
!SPRID = Sprite_SeaUrchin
|
!SPRID = Sprite_SeaUrchin
|
||||||
!NbrTiles = 04 ; Number of tiles used in a frame
|
!NbrTiles = 04 ; Number of tiles used in a frame
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
!DeathAnimation = 00 ; 00 = normal death, 01 = no death animation
|
!DeathAnimation = 00 ; 00 = normal death, 01 = no death animation
|
||||||
!ImperviousAll = 00 ; 00 = Can be attack, 01 = attack will clink on it
|
!ImperviousAll = 00 ; 00 = Can be attack, 01 = attack will clink on it
|
||||||
!SmallShadow = 00 ; 01 = small shadow, 00 = no shadow
|
!SmallShadow = 00 ; 01 = small shadow, 00 = no shadow
|
||||||
!Shadow = 01 ; 00 = don't draw shadow, 01 = draw a shadow
|
!Shadow = 01 ; 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 = 00 ; 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
|
||||||
@@ -35,25 +35,24 @@
|
|||||||
Sprite_SeaUrchin_Long:
|
Sprite_SeaUrchin_Long:
|
||||||
{
|
{
|
||||||
PHB : PHK : PLB
|
PHB : PHK : PLB
|
||||||
|
JSR Sprite_SeaUrchin_Draw
|
||||||
JSR Sprite_SeaUrchin_Draw ; Call the draw code
|
|
||||||
JSL Sprite_DrawShadow
|
JSL Sprite_DrawShadow
|
||||||
JSL Sprite_CheckActive ; Check if game is not paused
|
JSL Sprite_CheckActive : BCC .SpriteIsNotActive
|
||||||
BCC .SpriteIsNotActive ; Skip Main code is sprite is innactive
|
JSR Sprite_SeaUrchin_Main
|
||||||
|
|
||||||
JSR Sprite_SeaUrchin_Main ; Call the main sprite code
|
|
||||||
|
|
||||||
.SpriteIsNotActive
|
.SpriteIsNotActive
|
||||||
PLB ; Get back the databank we stored previously
|
PLB
|
||||||
RTL ; Go back to original code
|
RTL
|
||||||
}
|
}
|
||||||
|
|
||||||
Sprite_SeaUrchin_Prep:
|
Sprite_SeaUrchin_Prep:
|
||||||
{
|
{
|
||||||
PHB : PHK : PLB
|
PHB : PHK : PLB
|
||||||
|
LDA #$01 : STA.w SprPrize, X
|
||||||
LDA #$03 : STA.w SprPrize, X
|
LDA WORLDFLAG : BEQ +
|
||||||
|
; Eon Sea Urchin impervious to sword
|
||||||
|
LDA.b #%10000100 : STA.w SprDefl, X
|
||||||
|
LDA.b #$07 : STA.w SprPrize, X
|
||||||
|
+
|
||||||
PLB
|
PLB
|
||||||
RTL
|
RTL
|
||||||
}
|
}
|
||||||
@@ -70,35 +69,24 @@ Sprite_SeaUrchin_Main:
|
|||||||
{
|
{
|
||||||
%PlayAnimation(0,3,8)
|
%PlayAnimation(0,3,8)
|
||||||
%PlayerCantPassThrough()
|
%PlayerCantPassThrough()
|
||||||
|
|
||||||
%DoDamageToPlayerSameLayerOnContact()
|
%DoDamageToPlayerSameLayerOnContact()
|
||||||
|
JSL Sprite_CheckDamageFromPlayer : BCC .NoDamage
|
||||||
JSL Sprite_CheckDamageFromPlayer
|
%GotoAction(1)
|
||||||
BCC .NoDamage
|
|
||||||
|
|
||||||
%GotoAction(1)
|
|
||||||
|
|
||||||
.NoDamage
|
.NoDamage
|
||||||
|
|
||||||
RTS
|
RTS
|
||||||
}
|
}
|
||||||
|
|
||||||
Death:
|
Death:
|
||||||
{
|
{
|
||||||
LDA.b #$06
|
LDA.b #$06 : STA.w SprState, X
|
||||||
STA.w $0DD0,X
|
LDA.b #$0A : STA.w SprTimerA, X
|
||||||
|
|
||||||
LDA.b #$0A
|
|
||||||
STA.w $0DF0,X
|
|
||||||
|
|
||||||
STZ.w $0BE0,X
|
STZ.w $0BE0,X
|
||||||
|
|
||||||
LDA.b #$09 ; SFX2.1E
|
LDA.b #$09 ; SFX2.1E
|
||||||
JSL $0DBB8A ; SpriteSFX_QueueSFX3WithPan
|
JSL $0DBB8A ; SpriteSFX_QueueSFX3WithPan
|
||||||
|
|
||||||
RTS
|
RTS
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -110,24 +98,22 @@ Sprite_SeaUrchin_Draw:
|
|||||||
LDA $0DC0, X : CLC : ADC $0D90, X : TAY;Animation Frame
|
LDA $0DC0, X : CLC : ADC $0D90, X : TAY;Animation Frame
|
||||||
LDA .start_index, Y : STA $06
|
LDA .start_index, Y : STA $06
|
||||||
|
|
||||||
|
|
||||||
PHX
|
PHX
|
||||||
LDX .nbr_of_tiles, Y ;amount of tiles -1
|
LDX .nbr_of_tiles, Y ;amount of tiles -1
|
||||||
LDY.b #$00
|
LDY.b #$00
|
||||||
.nextTile
|
.nextTile
|
||||||
|
|
||||||
PHX ; Save current Tile Index?
|
PHX ; Save current Tile Index?
|
||||||
|
|
||||||
TXA : CLC : ADC $06 ; Add Animation Index Offset
|
TXA : CLC : ADC $06 ; Add Animation Index Offset
|
||||||
|
|
||||||
PHA ; Keep the value with animation index offset?
|
PHA ; Keep the value with animation index offset?
|
||||||
|
|
||||||
ASL A : TAX
|
ASL A : TAX
|
||||||
|
|
||||||
REP #$20
|
REP #$20
|
||||||
|
|
||||||
LDA $00 : CLC : ADC .x_offsets, X : STA ($90), Y
|
LDA $00 : CLC : ADC .x_offsets, X : STA ($90), Y
|
||||||
AND.w #$0100 : STA $0E
|
AND.w #$0100 : STA $0E
|
||||||
INY
|
INY
|
||||||
LDA $02 : CLC : ADC .y_offsets, X : STA ($90), Y
|
LDA $02 : CLC : ADC .y_offsets, X : STA ($90), Y
|
||||||
CLC : ADC #$0010 : CMP.w #$0100
|
CLC : ADC #$0010 : CMP.w #$0100
|
||||||
@@ -144,14 +130,10 @@ Sprite_SeaUrchin_Draw:
|
|||||||
INY
|
INY
|
||||||
LDA .properties, X : STA ($90), Y
|
LDA .properties, X : STA ($90), Y
|
||||||
|
|
||||||
PHY
|
PHY
|
||||||
|
|
||||||
TYA : LSR #2 : TAY
|
TYA : LSR #2 : TAY
|
||||||
|
|
||||||
LDA.b #$02 : ORA $0F : STA ($92), Y ; store size in oam buffer
|
LDA.b #$02 : ORA $0F : STA ($92), Y ; store size in oam buffer
|
||||||
|
|
||||||
PLY : INY
|
PLY : INY
|
||||||
|
|
||||||
PLX : DEX : BPL .nextTile
|
PLX : DEX : BPL .nextTile
|
||||||
|
|
||||||
PLX
|
PLX
|
||||||
|
|||||||
Reference in New Issue
Block a user