Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;LUDWIG VON KOOPA
- ;Ludwig walks around, occasionally spitting Bowser Statue fireballs. When stomped, he retreats into his shell
- ;and spins for a bit before popping back out. He takes a customizable amount of stomps to kill.
- !HP = $03 ;Number of stomps it takes to kill him. Probably shouldn't change this..
- !HPcounterRAM = $1528
- !Projectile = $B3 ;He spits Bowser Statue fireballs by default, but you can make him spawn whatever normal sprite you want.
- !RateOfFire = $40
- !ProjTimer = $1504 ;RAM address used as a throw timer in SMW, so yeah.
- Tilemap:
- db $80,$82,$84,$86,$A0,$A2,$A4,$A6,$C0,$C2,$C4,$C6;Her's 32x32 when out of his shell and 16x32 when in. Feel free to remap him if necessary.
- !HurtSFX = $28 ;Boss/Chuck hurt SFX by default
- !HurtSFXBank = $1DFC
- States:
- dw State00 ;Dead
- dw State01 ;Damaged
- dw State02 ;Walking and spitting (slowest speed)
- dw State03 ;Walking and spitting (medium speed)
- dw State04 ;Walking and spitting (fastest speed)
- dw State05 ;Spinning in shell
- State02Speed:
- db $04,$FC
- State03Speed:
- db $08,$F8
- State04Speed:
- db $0C,$F4
- SpinningSpeed:
- db $10,$F0
- print "INIT ",pc
- LDA #!HP
- STA !HPcounterRAM
- JSR SubHorizPos
- TYA
- STA $157C,x
- LDA State02
- STA $1534
- RTL
- print "MAIN ",pc
- PHB
- PHK
- PLB
- JSR MainCode
- MainCode:
- Spitting:
- LDA ProjTimer
- CMP #$00 ;Check the Projectile Timer to see if it has reached 0...
- BEQ SpitFire ;Spit a fireball if it has.
- RTS
- SpitFire:
- LDA $186C,x
- BNE EndSpawn
- JSL $02A9DE
- BMI EndSpawn
- LDA #$01
- STA $14C8,y
- LDA #!Projectile
- STA $009E,y
- LDA $E4,x
- STA $00E4,y
- LDA $14E0,x
- STA $14E0,y
- LDA $D8,x
- STA $00D8,y
- LDA $14D4,x
- STA $14D4,y
- PHX
- TYX
- JSL $07F7D2
- PLX
- EndSpawn:
- RTS
- LDA #RateOfFire
- STA ProjTimer ;Reset the timer after spitting.
- RTS
- RTS
- PLB
- RTL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement