Advertisement
Guest User

Untitled

a guest
Oct 1st, 2014
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.82 KB | None | 0 0
  1. ;LUDWIG VON KOOPA
  2. ;Ludwig walks around, occasionally spitting Bowser Statue fireballs. When stomped, he retreats into his shell
  3. ;and spins for a bit before popping back out. He takes a customizable amount of stomps to kill.
  4.  
  5. !HP = $03 ;Number of stomps it takes to kill him. Probably shouldn't change this..
  6. !HPcounterRAM = $1528
  7.  
  8. !Projectile = $B3 ;He spits Bowser Statue fireballs by default, but you can make him spawn whatever normal sprite you want.
  9. !RateOfFire = $40
  10. !ProjTimer = $1504 ;RAM address used as a throw timer in SMW, so yeah.
  11. Tilemap:
  12. 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.
  13.  
  14. !HurtSFX = $28 ;Boss/Chuck hurt SFX by default
  15. !HurtSFXBank = $1DFC
  16.  
  17. States:
  18. dw State00 ;Dead
  19. dw State01 ;Damaged
  20. dw State02 ;Walking and spitting (slowest speed)
  21. dw State03 ;Walking and spitting (medium speed)
  22. dw State04 ;Walking and spitting (fastest speed)
  23. dw State05 ;Spinning in shell
  24.  
  25. State02Speed:
  26. db $04,$FC
  27.  
  28. State03Speed:
  29. db $08,$F8
  30.  
  31. State04Speed:
  32. db $0C,$F4
  33.  
  34. SpinningSpeed:
  35. db $10,$F0
  36.  
  37. print "INIT ",pc
  38. LDA #!HP
  39. STA !HPcounterRAM
  40. JSR SubHorizPos
  41. TYA
  42. STA $157C,x
  43. LDA State02
  44. STA $1534
  45. RTL
  46.  
  47. print "MAIN ",pc
  48. PHB
  49. PHK
  50. PLB
  51. JSR MainCode
  52. MainCode:
  53. Spitting:
  54. LDA ProjTimer
  55. CMP #$00 ;Check the Projectile Timer to see if it has reached 0...
  56. BEQ SpitFire ;Spit a fireball if it has.
  57. RTS
  58. SpitFire:
  59. LDA $186C,x
  60. BNE EndSpawn
  61. JSL $02A9DE
  62. BMI EndSpawn
  63. LDA #$01
  64. STA $14C8,y
  65. LDA #!Projectile
  66. STA $009E,y
  67. LDA $E4,x
  68. STA $00E4,y
  69. LDA $14E0,x
  70. STA $14E0,y
  71. LDA $D8,x
  72. STA $00D8,y
  73. LDA $14D4,x
  74. STA $14D4,y
  75. PHX
  76. TYX
  77. JSL $07F7D2
  78. PLX
  79. EndSpawn:
  80. RTS
  81. LDA #RateOfFire
  82. STA ProjTimer ;Reset the timer after spitting.
  83. RTS
  84. RTS
  85. PLB
  86. RTL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement