Code!Health = $0A ; Health the sprite has. Can be anywhere between 0-99 (#$63 being 99). Don't be silly, though.
!FaceMario = $01 ; Initially face Mario?
; 01 -> Yes. 00 -> No.
!SprAnimate = $01 ; Does your sprite animate? (i.e. flip between 2 frames)
; 00 -> No, 01 -> Yes.
!SprAnimate2 = $00 ; Does your sprite animate for JSR Animate2? (In case you want to animate for other frames at a certain HP)
; 00 -> No, 01 -> Yes.
!SprAnimate3 = $01 ; Does your sprite animate for Animate3?
; 00 -> No, 01 -> Yes.
; NOTE: If they animate, you specify the animation frames in the graphics defines below.
!FastAnimation = $00 ; If you want your sprite to animate fast, make this an 01.
; If you leave it as 00, the sprite will not animate fast (a bit slower).
!DeathType = $01 ; Type of Death:
; 00 -> Fall down, as if killed by star
; 01 -> Disappear in a puff of smoke.
; 02 -> Explosion (bob-omb) style.
!DoFlash = $01 ; Does the sprite "flash" when it gets hurt? Flashes through colors and cannot be in
; Contact if it does.
; 00 -> No, 01 -> Yes.
!ExitType = $02 ; Type of exit when Boss dies:
; 00 - Goal sphere style, normal exit (no walking).
; 01 - Goal sphere style, secret exit (walking).
; 02 - Teleport to whatever in the screen exit.
; 03 - Fade to OW. (Exit specified below).
; 04-FF - Nothing.
!TeleSFX = $05 ; Sound to play when/if teleporting. ($1DFC)
!ExitSFX = $0B ; Type of music when boss is defeated (only applicable if !Exit is 0-2)
; 0B - Boss defeated.
; 0C - Normal SMW level complete music.
!OWExit = $02 ; If using !Exit as option 03, fade to the OW..
; 01 -> Normal exit. 02 = Secret Exit.
!NormalSprite = $02 ; Normal sprite to generate (if generating one).
!CustomSprite = $00 ; Custom sprite to generate.
; NOTE: Generating a custom sprite that doesn't exist will (probably) result in a crash.
!Gravity = $10 ; Does your boss float in the air?
; If so, leave it as 00. Otherwise, this is the gravity for the sprite.
; Suggested value: any value from 00-50.
; 10 = low gravity.
; 50 = high gravity.
!Ledges = $01 ; Does your sprite stay on ledges?
; 00 -> No, 01 -> Yes.
SPRITE_TO_GEN: ; For generating a random sprite, write the sprites here. Table must be 3 bytes!
db $0D,$0F,$10 ; Bomb, Goomba, ParaGoomba.
!INITSTAT = $01 ; STATUS for above sprites. For stationary shells, make this 09 etc.
; See $14C8,x in the RAM Map for all states.
!StunTimerA = $20 ; How long the boss stuns the ground (only applicable if JSR'ing to Strong)
!StunTimerB = $40 ; How long the boss stuns the ground (only applicable if JSR'ing to Strong2)
!JumpHeight = $D0 ; New Jump height if posioned. $FF = mimimum, 80 = maximum.
; Advisable - A0-E0
!PoTimer = $03 ; Time to poison Mario, in seconds. (If JSR'ing to Poision).
!Speed = $18 ; Speed Mario gets when poisioned. 00 = No speed at all, 26 = Max running speed.
; Advisable values = 15-20.
!Col = $01 ; Have a green face when Mario is poisioned? 00 -> No, 01 -> Yes.
; NOTES:
; IF NEAR THE STATUS BAR (TOP), THE COLORS REVERT TO NORMAL
; SAME IF THE PLAYER PAUSES.
; THIS AFFECTS COLORS 86,89, 8C and 8E only.
!High = $45 ; Color for Mario's face when poisioned.
!Low = $0E ; 4 digit RGB values, like this:
; XXYY <- YY is !High, and XX is Low.
!High2 = $B6
!Low2 = $30 ; Color for Mario's pants.
!FireballHealth = $01 ; Does the sprite have fireball HP?
; 00-> No, 01-> Yes.
; NOTE-> For fireball HP, it's the normal HP * 3 (this is because it won't be easy
; .. to customise)
!CapeHealth = $00 ; Does the sprite have cape HP? If so, it's normal health. (Not normal health*3).
!CapeFlight = $00 ; Disable cape flight during the boss battle?
; 00-> No, 01-> Yes.
!ExSound = $26 ; Sound to play when either a bone or hammer is thrown.
; Uses $1DF9.
!PTimer = $88 ; Timer for p-switch (if it's activated).
!FTimer = $4F ; How long the sprite flashes for when hit.
!Dark = $0B ; Darkness to use when JSR'ing to Dark.
!Dark2 = $07 ; Darkness to use when JSR'ing to Dark 2.
; Can be from 00-0F.
; 0F - Most brightness (also normal amount in SMW), 00 = Completely black.
!NoSpin = $01 ; Should the sprite only be stompable if Mario spin-jumps on him?
; Stompable like an eerie (bounces off Mario), but it doesn't reduce the boss's HP.
; NOTE: If enabled, the sprite can be stomped on if using JSR ThrowHurt.
; 00 -> No, 01-> Yes.
!Bouncy = $00 ; "Push" Mario back after jumping on the sprite?
; 00 -> No, 01-> Yes.
!RiseLoc = $00F0 ; If making your sprite rise at a certain hitpoint (JSR Rise)
; ..specify the height at which it should stop.
; 0145 = 40% up of the screen.
; 0130 = Halfway up the screen.
; 0115 = 2/3 up screen.
; 00F0 = Right below the status bar.
; Must be 4 digits, otherwise the game will crash!
!RiseSpeed = $E0 ; Speed at which the sprite rises.
; 80 - Extremely fast.
; FF - Slowest.
; Suggested: A0-E0.
!DropSpeed = $16 ; If making your sprite drop again, specify the speed..
; ..at which it falls down.
; 01 -> Slowest.
; 7F -> Extremely fast.
; Suggested values: 10-40.
; NOTE, it stops when it touches the ground.
!PushMario = $22 ; Speed to push Mario if the sprite touches him. (Only applicable if doing JSR Push).
!YPush = $D5 ; Upwards push movement if sprite hurts Mario.
;If making your sprite chase Mario..
MaxAcceleration: db $1A,$E6 ; Maximum speeds the sprite can chase.
MaxAccelerationY: db $10,$F0 ; Maximum speeds the sprite can chase.
AccelerationX: db $02,$FE ; Acceleration for X speed.
AccelerationY: db $04,$FC ; Acceleration for Y speed.
;If using messages, read below:
!Msg1T = $01 ; Message one type. 01 = Message one, 02 = Message two.
!Msg2T = $01 ; Same for the second message.
!Msg1L = $00 ; Level of first message.
!Msg2L = $29 ; Level of second message.
;These can be quite tricky. Up to level 24 = 24, but then it's 25 for level 101. 101 = 25, 102 = 26, 103 = 27, 104 = 28,
;105 = 29, 106 = 2A, 107 = 2B etc.
; Level 00 = 00
; Level 1A = 1A
; Level 20 = 20
; etc.
; Level 24 = 24
; Level 101 = 25 ; After level 24 comes level 101, so that becomes 25.
; Level 102 = 26
; Level 103 = 27.
;================================================================
;Status Bar Stuff Here!
;================================================================
!A = $0A : !B = $0B : !C = $0C : !D = $0D : !E = $0E : !F = $0F : !G = $10 : !H = $11 : !I = $12 : !J = $13 : !K = $14
!L = $15 : !M = $16 : !N = $17 : !O = $18 : !P = $19 : !Q = $1A : !R = $1B : !S = $1C : !T = $1D : !U = $1E : !V = $1F
!W = $20 : !X = $21 : !Y = $22 : !Z = $23
!YMove = $1510
!InvTimer = $7F9989 ; Used for many sprite misc. stuff. Make it atleast 12 bytes.
;Don't touch that.
!ShowTiles = $01 ; Draw <Name>x<HP> on status bar? (E.g. Idiotx10)
; 00 -> No. Anything else -> Yes.
NameTable:
db !S,!M,!W,!C ; Name of boss. Write like this: !A for A, !F for F, !Q for Q etc.
; MUST PUT THE ! AND COMMA (,) after each letter except the last one.
; The db at the beginning is important, don't touch that.
; db !F,!A,!I,!L will write "FAIL".
!NameSize = $03 ; The number of letters you wrote for your boss -1. For example, If my boss was called
; LOL, I would put a 02 here (3-1). (NOTE: must be 2 digit, so for 04 write 04, not 4)
!Position = $0EF9 ; Position to draw tiles to.
; Can be anywhere from $0EF9-$0F2F. See 1024's status bar for reference.
;================================================================
;Graphics Routine!
;================================================================
;Notes:
;This is a 32x32 Boss, so it has 4 tiles - Top Left, Top Right, Bottom Left and Bottom Right.
;If you didn't set your sprite to animate, it will NOT use the walking frames.
;By default, it will always animate between frames if it's set to animate.
;For each 16x16 tile (Top Right, Top Left etc.) , you specify the top-left part of that 16x16 tile. For example, the Mushroom
;Is a 16x16 tile. In the 8x8 editor it's tile 0x224. So you would right the last 2 digits - 24 for that and the whole 16x16
;Gets drawn. Similarly, the fire flower graphic would be 26.
;NOTE: IF YOU CHOOSE "use second graphics page" in the cfg editor, it uses tiles from SP3 and SP4.
!TopLeft = $A0
!TopRight = $AB
!BottomLeft = $C0
!BottomRight = $C2
!WalkTopLeft = $E0
!WalkTopRight = $E2
!WalkBottomLeft = $E4
!WalkBottomRight = $E6
;If using more animation frames in the sprite, specify them here:
;NOTE: To use them, use JSR Animate2 and JSR Animate3 in your sprite STATES.
;For Animate2:
!TopLeft2 = $CC
!TopRight2 = $CE
!BottomLeft2 = $EC
!BottomRight2 = $EE
!WalkTopLeft2 = $6D
!WalkTopRight2 = $6D
!WalkBottomLeft2 = $6D
!WalkBottomRight2 = $6D
;For Animate3:
!TopLeft3 = $6D
!TopRight3 = $6D
!BottomLeft3 = $6D
!BottomRight3 = $6D
!WalkTopLeft3 = $CC
!WalkTopRight3 = $CE
!WalkBottomLeft3 = $EC
!WalkBottomRight3 = $EE
;================================================================
;Sprite X Speeds Are Configurable Here!
;================================================================
; Notes:
; If your sprite has 6HP, you need to write to the first 7 values of the table only (00-06), if it has 3 HP, write to the first 4 values of the table etc.
; Slowest speed is 01 and fastest is 7F. It's recommended to not go higher than 25 as it gets very fast from there onwards.
; 00 is stationary i.e. the sprite doesn't move.
; First value in the table is for 00 HP, last value is for 99 HP. Writing to values not used doesn't have any affect.
Tbl1R: db $00,$11,$11,$12,$14,$10,$0F,$13,$18,$14,$10 ; 10
db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; 20
db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; 30
db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; 40
db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; 50
db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; 60
db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; 70
db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; 80
db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; 90
db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; 99
;===================;
; Pointers ;
;===================;
MainPointer:
LDA $1528,x
JSL $0086DF
dw STATE0 ; Dead state. Don't use for actions (ony RTS)
dw STATE1 ; 01, last hit point.
dw STATE2 ; 02, 2 hit points left ..
dw STATE3 ; 03, 3rd last hit point.
dw STATE4 ; 04, etc.
dw STATE5 ; 05
dw STATE6 ; 06
dw STATE7 ; 07
dw STATE8 ; NOTE! MAKE SURE YOU HAVE AS MANY DWS AS YOUR BOSS HP, OTHERWISE YOU MIGHT GET PROBLEMS!
dw STATE9
dw STATE10
STATE10:
STATE9:
STATE8:
STATE7:
STATE6:
STATE5:
STATE4:
STATE3:
STATE2:
STATE1:
STATE0:
JSR Move
RTS
CodeTbl1R: db $00,$11,$11,$12,$14,$10,$0F,$13,$18,$14,$10 ; 10
db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; 20
db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; 30
db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; 40
db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; 50
db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; 60
db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; 70
db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; 80
db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; 90
db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; 99