============================================================================================
=                                                                                          =
=                                                                                          =
=                                                                                          =
= BBBBBBBBBBBBBBBBBBBBBBBBBBB                                 BBBBBBBBBBBBBBBBBBBBBBBBBBBB =
=   BBBBBBBBBBBBBBBBBBBBBBBBBBB                             BBBBBBBBBBBBBBBBBBBBBBBBBBBB   =
=      BBBBBBBBBBBBBBBBBBBBBBBBB           B   B           BBBBBBBBBBBBBBBBBBBBBBBBBB      =
=          BBBBBBBBBBBBBBBBBBBBBBB         BBBBB         BBBBBBBBBBBBBBBBBBBBBBBB          =
=            BBBBBBBBBBBBBBBBBBBBBBBBB     BBBBB     BBBBBBBBBBBBBBBBBBBBBBBBBB            =
=             BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB             =
=             BBBBBBBBBBBBBBBB                               BBBBBBBBBBBBBBBBB             =
=             BBBBBBBBBBBBBBBB         "BATMAN BEYOND"       BBBBBBBBBBBBBBBBB             =
=             BBBBBBBBBBBBBBBB       SPIDERBAT &  ALEXIQ     BBBBBBBBBBBBBBBBB             =
=             BBBBBBBBBBBBBBBB                               BBBBBBBBBBBBBBBBB             =
=                    BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB                   =
=                           BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB                           =
=                                   BBBBBBBBBBBBBBBBBBBB                                   =
=                                        BBBBBBBBBB                                        =
=                                           BBBB                                           =
=                                            BB                                            =
=                                                                                          =
============================================================================================


[Data]
life = 1000
power = 5000
attack = 75
defence = 100
fall.defence_up = 50
liedown.time = 35
airjuggle = 15
sparkno = 0
guard.sparkno = 40
KO.echo = 0
volume = 400
IntPersistIndex = 60
FloatPersistIndex = 40

[Size]
xscale = 1           ;Horizontal scaling factor.
yscale = 1           ;Vertical scaling factor.
ground.back = 20     ;Player width (back, ground)
ground.front = 30    ;Player width (front, ground)
air.back = 10        ;Player width (back, air)
air.front = 10       ;Player width (front, air)
height = 55      ;Height of player (for opponent to jump over)
attack.dist = 160    ;Default attack distance
proj.attack.dist = 90 ;Default attack distance for projectiles
proj.doscale = 0     ;Set to 1 to scale projectiles too
head.pos = 35, -40   ;Approximate position of head
mid.pos = -0, -21    ;Approximate position of midsection
shadowoffset = 0     ;Number of pixels to vertically offset the shadow
draw.offset = 0,0    ;Player drawing offset in pixels (x, y)

[Velocity]
walk.fwd  = 3      ;Walk forward
walk.back = -3.2     ;Walk backward
run.fwd  = 7, -1    ;Run forward (x, y)
run.back = -6.7,-3   ;Hop backward (x, y)
jump.neu = 0,-9.2
jump.back = -3.78
jump.fwd = 3.66
runjump.back = -3,-9 ;Running jump speeds (opt)
runjump.fwd = 4,-8.1      ;.
airjump.neu = 0,-8.1      ;.
airjump.back = -2.55      ;Air jump speeds (opt)
airjump.fwd = 2.5         ;.

[Movement]
airjump.num = 0      ;Number of air jumps allowed (opt)
airjump.height = 35  ;Minimum distance from ground before you can air jump (opt)
yaccel = .4        ;Vertical acceleration
stand.friction = .85  ;Friction coefficient when standing
crouch.friction = .82



;---------------------------------------------------------------------------
; Stand
[Statedef 0]
type = S
physics = S
sprpriority = 0

[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 0

[State 0, 1]
type = ChangeState
;triggerall = palno = 7
trigger1 = palno = 7
trigger2 = palno = 8
trigger3 = palno = 9
value = 1

[State 0, 2]
type = VelSet
trigger1 = Time = 0
y = 0

[State 0, 3] ;Stop moving if low velocity or 4 ticks pass
type = VelSet
trigger1 = abs(vel x) < 2
trigger2 = Time = 4
x = 0

[State 0, 4] ;Are you dead?
type = ChangeState
trigger1 = !alive
value = 5050

;---------------------------------------------------------------------------
;The Joker
[Statedef 1]
type = S
physics = S
sprpriority = 0

[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 1 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 1

[State 0,sound]
type = Playsnd
trigger1 = AnimElem = 37
value = 60,17

[State 0,sound]
type = Playsnd
trigger1 = AnimElem = 49
value = 60,19


[State 0, 2]
type = VelSet
trigger1 = Time = 0
y = 0

[State 0, 3] ;Stop moving if low velocity or 4 ticks pass
type = VelSet
trigger1 = abs(vel x) < 2
trigger2 = Time = 4
x = 0

[State 0, 4] ;Are you dead?
type = ChangeState
trigger1 = Time = 615
value = 5555


---------------------------------------------------------------------------
; Override common states (use same number to override) :
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; States that are always executed (use statedef -2)
;---------------------------------------------------------------------------
;INVISIBILITY
[Statedef -2]
[State -2, NoBGM]
type = Poweradd
trigger1 = (power <= 500) && (RoundState > 1)
Value = 1

[State -2, NoBGM]
type = AssertSpecial
trigger1 = Var(26) = 1
flag = nomusic
flag2 = globalnoshadow

;Raiden Got Tripped.
[State -2, Tripped]
type = VarSet
trigger1 = anim = 5070
v = 15
value = 1000

[State -2, hit]
type = VarSet
triggerall = var(17) = 1
trigger1 = movetype = H
var(17) = 0

[state -2, invisibility]
type = AssertSpecial
triggerall = var(17) = 1
trigger1 = 1
trigger2 = stateno = 22237
trigger2 = Time < 150
flag = invisible


;Raiden Recovered or got hit out of Tripped.
[State -2, notTripped]
type = VarSet
trigger1 = anim = [5000, 5040]
trigger2 = anim = 5120
trigger3 = anim = 5200
trigger4 = anim = 5210
v = 15
value = 0

;This allows the Sweep to hit fallen opponents It is set by a jump kick.
[State -2, 100]
type = VarSet
triggerall = var(13) = 1
trigger1 = Time >= 6
trigger1 = (stateno = 0) || (stateno = 11)
;trigger2 = anim = [41, 45]
v = 13
value = 0

[State -2, Landing Dust]
type = Explod
triggerall =  NumExplod(9290) < 1
triggerall = Time = 3
trigger1 = StateNo = 52 ;Jump land
trigger2 = StateNo = 101 ;Run-fdw land
trigger3 = StateNo = 106 ;Run-back land
trigger4 = StateNo = 9001 ;intro land
trigger5 = PrevStateNo = 52 && StateNo = 11 ;Jump land/crouch
persistent = 0
ID = 9290
anim = 9290
postype = p1
pos = 7, 3
velocity = 0, 0
accel = 0, 0
removetime = -2
sprpriority = -2
ownpal = 1


[State -2,jokericon]
type = Explod
trigger1 = palno = 7 && numexplod(9990) = 0
trigger2 = palno = 8 && numexplod(9990) = 0
trigger3 = palno = 9 && numexplod(9990) = 0
anim = 9990
ID = 9990
postype = left
pos = ifelse(teamside = 1,42,280),50
facing = ifelse(teamside = 1,1,1)
sprpriority = -3
ownpal = 1
ignorehitpause = 1
Persistent = 8
;vel = 1,0
bindtime = -1

[State -2, blood spark]
type = explod
trigger1 = ProjHit2765 = 1
anim = 2744
pos = -10,-75
facing = -1
postype = P2
sprpriority = 2
bindtime = -1
removetime = 125



;transparency
[state -2, transparency 1]
type = Assertspecial
triggerall = stateno != 181 && stateno != 183
trigger1 = palno = 10
trigger2 = palno = 11
flag = invisible

[state -2, transparency 2]
type = Afterimage
triggerall = time = 0
trigger1 = palno = 10
trigger2 = palno = 11
time = 99999
paladd = 0,0,0
length = 2
PalMul = 1,1,1
FrameGap = 1
palcolor = 256
palinvertall = 0
palbright = 62,62,62
palcontrast = 180,180,180
trans = add1

;---------------------------------------------------------------------------
; States that are always executed (use statedef -3)
;---------------------------------------------------------------------------
[Statedef -3]

[State -3, superjump opponent locator]
type = Helper
triggerall = (NumHelper(700) = 0)
trigger1 = (Pos Y < -200) && (P2Dist Y > 50)
ID = 700
pos = 0,-120
postype = p2
stateno = 9910
facing = 1

[State -3, VelAdd] ;to fall slower during super jump
type = VelAdd
trigger1 = Var(3) = 1 && Vel Y > 0
y = -0.2


[State 0, ]
type = PosSet
trigger1 = prevstateno = 100
y = 0

[State 0, ]
type = VelSet
trigger1 = prevstateno = 100
y = 0

[State 0, ]
type = PlaySnd
triggerall = anim = 47
trigger1 = time = 1
value = 5,10
ignorehitpause = 1
persistent = 0

[State 0, ]
type = Explod
trigger1 = stateno = 140
trigger1 = statetype = S
trigger1 = time = 0
anim = 143
bindtime = 1
sprpriority = 2
shadow = -1,-1,-1
ownpal = 1

[State 0, ]
type = Explod
trigger1 = stateno = 140
trigger1 = statetype = C
trigger1 = time = 0
anim = 144
bindtime = 1
sprpriority = 2
shadow = -1,-1,-1
ownpal = 1

[State 0, ]
type = Explod
trigger1 = stateno = 140
trigger1 = statetype = A
trigger1 = time = 0
anim = 145
bindtime = 1
sprpriority = 2
shadow = -1,-1,-1
ownpal = 1

[State 0, ]
type = Explod
triggerall = palno = 7
trigger1 = TeamSide = 1
anim = 20000
ID = 20000
pos = 70,35
postype = left
bindtime = -1
removetime = 1
sprpriority = -10
ontop = 0
ownpal = 1
ignorehitpause = 1
persistent = 1

[State 0, ]
type = Explod
triggerall = palno = 7
trigger1 = TeamSide = 2
anim = 20000
ID = 20000
pos = -70,35
postype = right
bindtime = -1
removetime = 1
sprpriority = -10
ontop = 0
ownpal = 1
ignorehitpause = 1
persistent = 1

[State 0, ]
type = Explod
triggerall = palno = 8
trigger1 = TeamSide = 1
anim = 20001
ID = 20001
pos = 70,35
postype = left
bindtime = -1
removetime = 1
sprpriority = -10
ontop = 0
ownpal = 1
ignorehitpause = 1
persistent = 1

[State 0, ]
type = Explod
triggerall = palno = 8
trigger1 = TeamSide = 2
anim = 20001
ID = 20001
pos = -70,35
postype = right
bindtime = -1
removetime = 1
sprpriority = -10
ontop = 0
ownpal = 1
ignorehitpause = 1
persistent = 1

[State 0, ]
type = Explod
triggerall = palno = 9
trigger1 = TeamSide = 1
anim = 20002
ID = 20002
pos = 70,35
postype = left
bindtime = -1
removetime = 1
sprpriority = -10
ontop = 0
ownpal = 1
ignorehitpause = 1
persistent = 1

[State 0, ]
type = Explod
triggerall = palno = 9
trigger1 = TeamSide = 2
anim = 20002
ID = 20002
pos = -70,35
postype = right
bindtime = -1
removetime = 1
sprpriority = -10
ontop = 0
ownpal = 1
ignorehitpause = 1
persistent = 1

[State 0, ]
type = AssertSpecial
trigger1 = palno > 9
flag = invisible

[State 0, ]
type = AfterImage
trigger1 = palno > 9
trigger1 = time = 0
time = 9999
length = 17
framegap = 4
palcontrast = 150,150,150
paladd = 0,0,0
palmul = .9,.9,.9
trans = add1
ignorehitpause = 0
persistent = 0



[State 0, ]
type = LifeAdd
triggerall = life > 0
trigger1 = palno > 9
trigger1 = movetype = I
value = 1





;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; Format:
; [Statedef STATENO]
; type = ?      S/C/A/L  stand/crouch/air/liedown
; movetype = ?  I/A/H    idle/attack/gethit
; physics = ?   S/C/A/N  stand/crouch/air/none
; juggle = ?             air juggle points move requires
;
; [State STATENO, ?]     ? - any number you choose
; type = ?
; ...

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; Jump Start
[Statedef 40]
type    = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1

[State 40, 1]
type = VarSet
trigger1 = Time = 0
sysvar(1) = 0

[State 40, 2]
type = VarSet
trigger1 = command = "holdfwd"
sysvar(1) = 1

[State 40, 3]
type = VarSet
trigger1 = command = "holdback"
sysvar(1) = -1

[State 40, 4]
type = VelSet
trigger1 = AnimTime = 0
x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))
y = const(velocity.jump.y)

[State 40, 5]
type = VelSet
trigger1 = AnimTime = 0
trigger1 = prevstateno = 100 ;RUN_FWD
trigger1 = sysvar(1) = 1
x = const(velocity.runjump.fwd.x)

[State 40, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1

;---------------------------------------------------------------------------
; AirJump Start
[Statedef 45]
type    = A
physics = N
ctrl = 0
velset = 0,0

[State 45, 1]
type = ChangeAnim
trigger1 = SelfAnimExist(44)
value = 44

[State 45, 2]
type = ChangeAnim
trigger1 = !SelfAnimExist(44)
value = 41

[State 45, 3]
type = VarSet
trigger1 = Time = 0
sysvar(1) = 0

[State 45, 4]
type = VarSet
trigger1 = command = "holdfwd"
sysvar(1) = 1

[State 45, 5]
type = VarSet
trigger1 = command = "holdback"
sysvar(1) = -1

[State 45, 6]
type = VelSet
trigger1 = Time = 2
x = ifelse(sysvar(1)=0, const(velocity.airjump.neu.x), ifelse(sysvar(1)=1, const(velocity.airjump.fwd.x), const(velocity.airjump.back.x)))
y = const(velocity.airjump.y)

[State 45, 7]
type = ChangeState
trigger1 = Time = 2
value = 50
ctrl = 1

;---------------------------------------------------------------------------
;Bouncing with wall
[Statedef 48]
type = A

[State 48, 0]
type = VarSet
trigger1 = Time = 0
v =  3
value = 0

[State 48, 0]
type = Turn
trigger1 = Anim = 42 || Anim = 44

[State 48, 1]
type = ChangeAnim
trigger1 = Time = 0
value = 48

[State 48, 1]
type = Velmul
trigger1 = command = "holdfwd"
x = 0
y = 0

[State 0, 1]
type = VelAdd
trigger1 = AnimTime = 0
x = 3
y = -3.5

[State 0, 1]
type = VelAdd
trigger1 = AnimTime = 0 && command = "holdup"
y = -7.5

[State 48, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 50

;---------------------------------------------------------------------------
; Jump Up
[Statedef 50]
type    = A
physics = A

[State 50, 1]
type = VarSet
trigger1 = Time = 0
sysvar(1) = 0

[State 50, 2]
type = ChangeAnim
trigger1 = Time = 0
value = ifelse((vel x)=0, 41, ifelse((vel x)>0, 42, 43))

[State 50, 3]
type = ChangeAnim
trigger1 = Vel y > -2
trigger1 = SelfAnimExist(anim + 3)
persistent = 0
value = Anim + 3

;---------------------------------------------------------------------------
; Jump Down (empty state for compatibility)
[Statedef 51]
type    = A
physics = A

[State 51, 1]
type = Null
trigger1 = 1

;---------------------------------------------------------------------------
; Jump Land
[Statedef 52]
type    = S
physics = S
ctrl = 0
anim = 47

; reset superjump direction var
[State 0, VarSet]
type = VarSet
trigger1 = Var(0) != 0
v = 0
value = 0

[State 52, 1]
type = VelSet
trigger1 = Time = 0
y = 0

[State 52, 2]
type = PosSet
trigger1 = Time = 0
y = 0

[State 52, 3]
type = CtrlSet
trigger1 = Time = 3
value = 1

[State 52, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;===========================================================================
;--------------------------------- super jump ------------------------------
;===========================================================================

[statedef 700]
type    = s
physics = s
anim = 40
ctrl = 0
sprpriority = 1

[State 700, ]
type = PlaySnd
trigger1 = time = 1
persistent = 0
value = S8,0


[state 700, super jump]
type = varset
trigger1 = time = 0
sysvar(1) = 0

[state 700, super jump]
type = varset
trigger1 = command = "holdfwd"
trigger2 = var(42) = -1
sysvar(1) = 1

[state 700 super jump]
type = varset
trigger1 = command = "holdback"
sysvar(1) = -1

[state 700, super jump]
type = velset
trigger1 = animtime = 0
x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x))) * 1.35
y = 1.55*const(velocity.jump.y)

;===Put in .cns file statedef for sjump
;from wonder woman's sjump
[State 700, ai]
type = Velset
trigger1 = Var(12) && (prevstateno=420)
x = 6
y = -12

[state 700, super jump]
type = velset
trigger1 = animtime = 0
trigger1 = prevstateno = 100 ;run_fwd
trigger1 = sysvar(1) = 1
x = const(velocity.runjump.fwd.x)

[state 700,super jump]
type = afterimage
trigger1 = time = 1
length = 30;100
PalBright   =  0,0,0;320, 320, 320
PalContrast =  120,120,220;0, 0, 0
PalAdd      =  0,0,0;80,80,100
PalMul      = 1,1,1;.50,.50,.50
TimeGap  = 1
FrameGap = 5
Trans = Add
time = 20

[state 700, super jump]
type = explod
trigger1 = time = 0
anim = F61
pos = 0, 0

[state 700, super jump]
type = playsnd
trigger1 = time = 0
value = 6,2

[state 700, super jump]
type = velmul
trigger1 = command = "holdback"
trigger1 = time > 10
x = -1.2

[state 700, super jump]
type = changestate
trigger1 = animtime = 0
value = 50
ctrl = 1


;---------------------------------------------------------------------------
;Super Jump opponent locator
[Statedef 9910]
type    = A
physics = N
ctrl = 0
sprpriority = 2

[State 9910, arrow]
type = ChangeAnim
trigger1 = IsHelper(700)
value = 9910

[State 9910, destroyself]
type = DestroySelf
triggerall = IsHelper(700)
trigger1 = RootDist Y > 0

;---------------------------------------------------------------------------
; win
[statedef 180]
type = s



[state 180, 0]
type = changestate
trigger1 = time = 0
trigger1 = winko= 0
value = 183

[State 180, 1]
type = VarRandom
trigger1 = Time = 0
v = 1
range = 0,50

[State 180, 2]
type = ChangeState
triggerall = palno != 7 && palno != 8 && palno != 9
trigger1 = Var(1) = [0,25]
value = 181

[State 180, 3]
type = ChangeState
triggerall = palno != 7 && palno != 8 && palno != 9
trigger1 = Var(1) = [26,50]
value = 182

[State 180, 1]
type = VarRandom
triggerall = Time = 0
trigger1 = palno = 7
trigger2 = palno = 8
trigger3 = palno = 9
v = 2
range = 0,50

[State 180, joker1]
type = ChangeState
triggerall = Var(2) = [0,25]
trigger1 = palno = 7
trigger2 = palno = 8
trigger3 = palno = 9
value = 11331

[State 180, joker2]
type = ChangeState
triggerall = Var(2) = [26,50]
trigger1 = palno = 7
trigger2 = palno = 8
trigger3 = palno = 9
value = 11330
;---------------------------------------------------------------------------
; win1
[statedef 181]
type = s
ctrl = 0
anim = 181
velset = 0,0,0

[state 181, 1]   ; so close.
type = playsnd
trigger1 = time = 0
value = 9, 11

[state 181, 3]
type = assertspecial
trigger1 = time = [0,200]
flag = roundnotover


;---------------------------------------------------------------------------
; win2
[statedef 182]
type = s
ctrl = 0
anim = 182
velset = 0,0,0

[state 0, 1]
type = explod
trigger1 = animelem = 3
anim = 60023
postype = p1
pos = 0,0
bindtime = 1
sprpriority = 2
ownpal = 1

[state 182, 1]   ; so close.
type = playsnd
trigger1 = time = 0
value = 9, 11

[state 182, snd2]   ; so close.
type = playsnd
trigger1 = animelem = 3
value = 0, 110


[state 182, 3]
type = AssertSpecial
trigger1 = time >= 0
trigger1 = time <=270 ; Time when state's over
flag = RoundNotOver




; win joker
[statedef 11331]
type = s
ctrl = 0
anim = 11331
velset = 0,0

[state 11331, snd2]   ; so close.
type = playsnd
trigger1 = animelem = 9
value = 0, 110


[state 11331, 1]
type = explod
trigger1 = animelem = 9
anim = 60023
postype = p1
pos = 0,0
bindtime = 1
sprpriority = 2
ownpal = 1

[state 11331, 3]
type = assertspecial
trigger1 = time = [0,200]
flag = roundnotover





; win joker 2
[statedef 11330]
type = s
ctrl = 0
anim = 11330
velset = 0,0

[state 11331, snd2]   ; so close.
type = playsnd
trigger1 = time = 50
value = 60, 20



[state 11330, 3]
type = assertspecial
trigger1 = time = [0,200]
flag = roundnotover



;---------------------------------------------------------------------------
; win by time over
[statedef 183]
type = s
ctrl = 0
anim = 181
velset = 0,0,0

[state 183,1]
type = changeanim
trigger1 = animtime = 0
value = 189

[state 183, 2]
type = assertspecial
trigger1 = time = [0,200]
flag = roundnotover



;---------------------------------------------------------------------------
;---Intro-----

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; PREINTRO
[Statedef 190]
type = S

[State 190, 1]
type = VarRandom
trigger1 = Time = 0
v = 1
range = 0,75

[State 190, ]
type = ChangeState
triggerall = time = 0
trigger1 = p2name = "superman"
value = 195
ctrl = 0

[State 190, 2]
type = ChangeState
triggerall = palno != 7 && palno != 8 && palno != 9
trigger1 = Var(1) = [0,25]
value = 191

[State 190, 3]
type = ChangeState
triggerall = palno != 7 && palno != 8 && palno != 9
trigger1 = Var(1) = [26,50]
value = 192

[State 190, 4]
type = ChangeState
triggerall = palno != 7 && palno != 8 && palno != 9
trigger1 = Var(1) = [51,75]
value = 193



[State 190, 1]
type = VarRandom
triggerall = Time = 0
trigger1 = palno = 7
trigger2 = palno = 8
trigger3 = palno = 9
v = 2
range = 0,50

[State 190, JOKER1]
type = ChangeState
triggerall = Var(2) = [0,25]
trigger1 = palno = 7
trigger2 = palno = 8
trigger3 = palno = 9
value = 11220

[State 190, JOKER2]
type = ChangeState
triggerall = Var(2) = [26,50]
trigger1 = palno = 7
trigger2 = palno = 8
trigger3 = palno = 9
value = 11221



;---------------------------------------------------------------------------
; introduction
[statedef 191]
type = s
ctrl = 0
anim = 193
velset = 0,0

[state 191, snd]   ; so close.
type = playsnd
trigger1 = time = 5
value = 5, 0


[state 191, 1] ;freeze animation Until preintro is over
type = changeanim
trigger1 = roundstate = 0
value = 193



[state 191, 2] ;assert this Until you want "round 1, Fight" to begin
type = assertspecial
trigger1 = 1
flag = intro



[state 191, 4] ;change to stand state
type = changestate
trigger1 = animtime = 0
value = 0

;---------------------------------------------------------------------------
; Introduction 2 - Jump in intro
[statedef 192]
type = s
ctrl = 0
anim = 10976
velset = 0,0

[state 192, snd]   ; so close.
type = playsnd
trigger1 = time = 5
value = 200, 1



[State 0, Explod] ;lighting
type = Explod
trigger1 = time=0
anim = 60022
ID =60022
pos = 3,-17
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove
pausemove
scale = 1,1
sprpriority = -2
ontop = 0
shadow = 0,0,-1
ownpal = 0
removeongethit = 0

[State 192, snd]
type=playsnd
trigger1 = animelem = 1
value=0,110
channel=0

[State 192, snd2]
type=playsnd
trigger1 = animelem = 26
value = 3,1
channel=0

[state 192, 2] ;assert this Until you want "round 1, Fight" to begin
type = assertspecial
trigger1 = 1
flag = intro



[state 192, 4] ;change to stand state
type = changestate
trigger1 = animtime = 0
value = 0

;-------------------------------------------------------------------------------
;---------------------------------------------------------------------------
; Introduction 2 - Jump in intro
[Statedef 193]
type    = A
physics = N
anim = 5201
velset = const(velocity.jump.fwd.x), -2

[state 193,afterimage]
type = afterimage
trigger1 = time = 1
length = 30;100
PalBright   =  0,0,0;320, 320, 320
PalContrast =  120,120,220;0, 0, 0
PalAdd      =  0,0,0;80,80,100
PalMul      = 1,1,1;.50,.50,.50
TimeGap  = 1
FrameGap = 5
Trans = Add
time = 20

[State 193, snd1]
type=playsnd
trigger1 = animelem = 1
value = 8,0
channel=0

[State 193, 0]
type = ScreenBound
trigger1 = 1
movecamera = 0

[State 193, 1]
type = PosAdd
trigger1 = Time = 0
X = -102
y = -100

[State 193, 2]
type = AssertSpecial
trigger1 = 1
flag = intro

[State 193, Gravity]
type = VelAdd
trigger1 = 1
y = const(movement.yaccel)

[State 193, Land]
type = ChangeState
trigger1 = Pos Y >= 0
value = 9001

;---------------------------------------------------------------------------
; Intro 2 Jump Land
[Statedef 9001]
type    = S
physics = S
ctrl = 0
anim = 4777

[State 192, snd2]
type=playsnd
trigger1 = animelem = 1
value = 3,1
channel=0

[State 9001, 1]
type = VelSet
trigger1 = Time = 0
y = -0.4

[State 9001, 1]
type = VelSet
trigger1 = Time = 0
x = 0




[State 9001, 2]
type = AssertSpecial
trigger1 = 1
flag = intro

[State 9001, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 0

--------------------------------------------------------------------------
; for superman
[statedef 195]
type = s
ctrl = 0
anim = 195
velset = 0,0

[state 193, snd]   ; so close.
type = playsnd
trigger1 = time = 5
value = 200, 1


[state 193, 1] ;freeze animation Until preintro is over
type = changeanim
trigger1 = roundstate = 0
value = 10976


[State 0, Explod] ;lighting
type = Explod
trigger1 = time=0
anim = 193
ID =193
pos = 3,-17
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove
pausemove
scale = 1,1
sprpriority = 2
ontop = 0
shadow = 0,0,-1
ownpal = 0
removeongethit = 0

[State 192, snd]
type=playsnd
trigger1 = animelem = 1
value=0,110
channel=0

[State 192, snd2]
type=playsnd
trigger1 = animelem = 26
value = 3,1
channel=0

[state 192, 2] ;assert this Until you want "round 1, Fight" to begin
type = assertspecial
trigger1 = 1
flag = intro



[state 192, 4] ;change to stand state
type = changestate
trigger1 = animtime = 0
value = 0

[statedef 197]
type = S
movetype = I
physics = S
anim = 197
ctrl = 0

[State 0, PalFX]
type = PalFX
trigger1 = time <= 100
time = 2
add = Time-100,Time-100,Time-100

[State 0, ]
type = AssertSpecial
trigger1 = 1
flag = intro
flag2 = nobardisplay

[State 0, ]
type = ScreenBound
trigger1 = 1
value = 0

[State 0, ]
type = PosSet
trigger1 = 1
y = 0

[State 0, ]
type = VelSet
trigger1 = 1
x = 0
y = 0

[State 0, ]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 0

[Statedef 198]
type = S
movetype = I
physics = S
ctrl = 0
anim = 1042

[State 0, SuperPause]
type = SuperPause
trigger1 =animelem=6
time =70
pos = 0,0
move
darken = 1
p2defmul = 0
poweradd = 0
unhittable = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 =time=13
value = 212,0

[State 0, Explod] ;lighting
type = Explod
trigger1 = time=13
anim = 1041
ID =1041
pos = 0,120
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove
pausemove
scale = 1,1
sprpriority = -3
ontop = 0
shadow = 0,0,-1
ownpal = 0
removeongethit = 0

[state 193, A2]
type = assertspecial
trigger1 = Time >= 0
flag = NoBarDisplay

[State 193, A3] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 193, A4]
type = PosAdd
trigger1 = !Time
y = -100

[State 193, A4]
type = PosAdd
trigger1 = !Time
x = -10

[State 193, A5]
type = VelAdd
trigger1 =time>0
x = .01


; introduction joker
[statedef 11220]
type = s
ctrl = 0
anim = 11220
velset = 0,0

[State 11220, Explod]
type = Explod
trigger1 = AnimElem = 19
anim = 8883
pos = 80, -75
ontop = 1

[State 11220, 2]
type = PlaySnd
trigger1 = AnimElem = 19
value = s32001,1

[state 11220, 2] ;assert this Until you want "round 1, Fight" to begin
type = assertspecial
trigger1 = 1
flag = intro



[state 11220, 4] ;change to stand state
type = changestate
trigger1 = animtime = 0
value = 0


; introduction 2 joker
[statedef 11221]
type = s
ctrl = 0
anim = 11221
velset = 0,0

[State 11221, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = s15,1

[State 11221, 1.5]
type = PlaySnd
trigger1 = AnimElem = 34
value = s60,17


[state 11221, 2] ;assert this Until you want "round 1, Fight" to begin
type = assertspecial
trigger1 = 1
flag = intro



[state 11221, 4] ;change to stand state
type = changestate
trigger1 = animtime = 0
value = 0
;---------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; Taunt
[Statedef 195]
type = S
ctrl = 0
anim = 195
velset = 0,0
movetype = I
physics = S
sprpriority = 2

[State 195, 1]
type = CtrlSet
trigger1 = Time = 40
value = 1

[State 195, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1



;---------------------------------------------------------------------------
; Liedown Roll Forward (Code by MystikBlaze)
[Statedef 8300]
type    = C       ;It's a crouching type move
movetype= I       ;The character is 'idle' while doing the recovery roll
physics = N
poweradd= 0
velset = 8,0      ;Just change the vel x to -8 if you want to roll backwards
ctrl = 0
anim = 990
sprpriority = -1

[State 8300, PlayerPush] ;So you can roll 'through' the opponent
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 8300, VelSet]   ;Stop once the recovery roll is over
type = VelSet
trigger1 = AnimTime = 0
x = 0

[State 8300, PosSet]
type = PosSet
trigger1 = Time >= 0
y = 0

[State 8300, MakeDust]  ;Just some dust effects
type = MakeDust
trigger1 = Time >= 0
pos = -16,0
spacing = 6

[State 8300, NotHitBy]  ;Can't get hit while rolling
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 8300, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 11             ;Change to crouching state
ctrl = 1

; Liedown Roll Backwards (Code by MystikBlaze)
[Statedef 8305]
type    = C       ;It's a crouching type move
movetype= I       ;The character is 'idle' while doing the recovery roll
physics = N
poweradd= 0
velset = -8,0      ;Just change the vel x to -8 if you want to roll backwards
ctrl = 0
anim = 992
sprpriority = -1

[State 8305, PlayerPush] ;So you can roll 'through' the opponent
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 8305, VelSet]   ;Stop once the recovery roll is over
type = VelSet
trigger1 = AnimTime = 0
x = 0

[State 8305, PosSet]
type = PosSet
trigger1 = Time >= 0
y = 0

[State 8305, MakeDust]  ;Just some dust effects
type = MakeDust
trigger1 = Time >= 0
pos = -16,0
spacing = 6

[State 8305, NotHitBy]  ;Can't get hit while rolling
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 8305, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 11             ;Change to crouching state
ctrl = 1




;---------------------------------------------------------------------------
; Stand Light Punch
[StateDef 200]
anim = 200
ctrl = 0
type = S
movetype = A
physics = S
velset = 0,0
poweradd = 30

[State 200, swoosh]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0,0

[State 200, grunt]
type = PlaySnd
trigger1 = AnimElem = 1
value = 1,0


[State 200, grunt]
type = PlaySnd
trigger1 = AnimElem = 1
value = 7,2

[State 200, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
damage = 30
guardflag = MA
pausetime = 8,8
hitsound = S2,0
guardsound = S3,0
guard.sparkno = S2500
sparkno = S2600
sparkxy = 0,-99
animtype = Light
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -3
guard.velocity = -2
air.velocity = -2,-3

[State 200, ChangeState]
type = ChangeState
trigger1 = AnimElem = 3, > 0
trigger1 = command = "x"
value = 210

[State 200, ChangeState]
type = ChangeState
trigger1 = command = "a"
value = 230

[State 200, back to stance]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


;---------------------------------------------------------------------------
; Stand Medium Punch
[StateDef 210]
anim = 210
ctrl = 0
type = S
movetype = A
physics = S
velset = 0,0
poweradd = 65

[State 210, swoosh]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0,1

[State 210, grunt]
type = PlaySnd
trigger1 = AnimElem = 1
value = 1,1

[State 210, grunt]
type = PlaySnd
trigger1 = AnimElem = 1
value = 7,3

[State 210, HitDef]
type = HitDef
trigger1 = AnimElem = 4
attr = S, NA
damage = 65
guardflag = MA
pausetime = 9,9
hitsound = S2,1
guardsound = S3,0
sparkno = S2601
guard.sparkno = S2500
sparkxy = 0,-100
animtype = Medium
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -7
guard.velocity = -5
air.velocity = -3,-6

[State 200, ChangeState]
type = ChangeState
trigger1 = command = "a"
value = 240

[State 210, 1]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


;---------------------------------------------------------------------------
; Stand Hard Punch
[StateDef 220]
anim = 220
ctrl = 0
type = S
movetype = A
physics = S
velset = 0,0
poweradd = 96

[State 220, swoosh]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0,2

[State 220, grunt]
type = PlaySnd
trigger1 = AnimElem = 1
value = 1,2




 [State 220, grunt]
type = PlaySnd
trigger1 = AnimElem = 1
value = 7,1




[State 220, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
damage = 96
guardflag = MA
pausetime = 11,11
hitsound = S2,2
guardsound = S3,0
sparkno = S2800
guard.sparkno = S2500
sparkxy = 0,-96
animtype = Heavy
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -8
guard.velocity = -5
air.velocity = -4,8

[State 220, back to stance]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


;---------------------------------------------------------------------------
; Stand Light Kick
[StateDef 230]
anim = 230
ctrl = 0
type = S
movetype = A
physics = S
velset = 0,0
poweradd = 25

[State 230, swoosh]
type = PlaySnd
trigger1 = Time = 2
value = 0,0

[State 230, grunt]
type = PlaySnd
trigger1 = Time = 0
value = 1,0

[State 230, grunt]
type = PlaySnd
trigger1 = Time = 0
value = 7,2

[State 230, HitDef]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage = 25
guardflag = MAFD
pausetime = 6,6
hitsound = S2,0
guardsound = S3,0
guard.sparkno = S2500
sparkno = S2600
sparkxy = 0,-30
animtype = Light
ground.type = Low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -3
guard.velocity = -2
air.velocity = -2,-3

[State 200, ChangeState]
type = ChangeState
trigger1 = command = "x"
value = 210

[State 200, ChangeState]
type = ChangeState
trigger1 = AnimElem = 3, > 0
trigger1 = command = "a"
value = 240

[State 230, back to stance]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Stand Medium Kick
[StateDef 240]
anim = 240
ctrl = 0
type = S
movetype = A
physics = S
velset = 0,0
poweradd = 65

[State 240, swoosh]
type = PlaySnd
trigger1 = Time = 2
value = 0,1

[State 240, grunt]
type = PlaySnd
trigger1 = Time = 0
value = 1,1

[State 240, grunt]
type = PlaySnd
trigger1 = Time = 0
value = 7,3

[State 240, HitDef]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 65
guardflag = MA
pausetime = 9,9
hitsound = S2,1
guardsound = S3,0
guard.sparkno = S2500
sparkno = S2601
sparkxy = 0,-80
animtype = Medium
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = 4
guard.velocity = -5
air.velocity = -3,-6

[State 240, back to stance]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


;---------------------------------------------------------------------------
; Stand Hard Kick
[StateDef 250]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
velset = 0,0
anim = 250

[State 0, 1]
type = PlaySnd
trigger1 = Time = 2
value = 0, 1

[State 0, 2]
type = HitDef
trigger1 = AnimElem = 4
attr = S, NA
animtype  = Back
damage    = 166, 22
guardflag = MA
hitflag = MAF
pausetime = 12,12
guard.sparkno = S2500
sparkno = S2800
hitsound   = S2,2
guardsound = S3,0
ground.type = High
ground.slidetime = 30
ground.hittime  = 30
ground.velocity = -5,-5
air.velocity = -4.4,-5.2
air.hittime = 17
fall = 1
kill       = (Var(9) = 0)
fall.kill  = (Var(9) = 0)
guard.kill = (Var(9) = 0)
fall.recover = 28

[State 0, 4]
type = SprPriority
trigger1 = AnimElem = 1
value = 2

[State 0, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1





;---------------------------------------------------------------------------
; Crouch Light Punch
[StateDef 400]
anim = 400
ctrl = 0
type = C
movetype = A
physics = C
velset = 0,0
poweradd = 30

[State 400, swoosh]
type = PlaySnd
trigger1 = Time = 2
value = 0,0

[State 400, grunt]
type = PlaySnd
trigger1 = Time = 0
value = 1,0

[State 400, HitDef]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage = 30
guardflag = L
pausetime = 8,8
hitsound = S2,0
guardsound = S3,0
guard.sparkno = S2500
sparkno = S2600
sparkxy = 0,-40
animtype = Light
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -3
guard.velocity = -2
air.velocity = -3,-6

[State 200, ChangeState]
type = ChangeState
trigger1 = AnimElem = 3, > 0
trigger1 = command = "x"
value = 410

[State 200, ChangeState]
type = ChangeState
trigger1 = command = "a"
value = 430

[State 400, 1]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; Crouch Medium Punch
[StateDef 410]
anim = 410
ctrl = 0
type = C
movetype = A
physics = C
velset = 0,0
poweradd = 65

[State 410, swoosh]
type = PlaySnd
trigger1 = Time = 2
value = 0,1

[State 410, grunt]
type = PlaySnd
trigger1 = Time = 0
value = 1,1

[State 410, HitDef]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage = 65
guardflag = L
pausetime = 9,9
hitsound = S2,1
guardsound = S3,0
guard.sparkno = S2500
sparkno = S2601
sparkxy = 0,-40
animtype = Medium
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -8
guard.velocity = -10
air.velocity = -3,-6

[State 200, ChangeState]
type = ChangeState
trigger1 = command = "a"
value = 440

[State 410, 1]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; Crouch Hard Punch
[StateDef 420]
anim = 420
ctrl = 0
type = C
movetype = A
physics = C
velset = 0,0
poweradd = 65

[State 420, swoosh]
type = PlaySnd
trigger1 = Time = 2
value = 0,2

[State 420, grunt]
type = PlaySnd
trigger1 = Time = 0
value = 1,2

[State 420, grunt]
type = PlaySnd
trigger1 = Time = 0
value = 7,7

[State 420, HitDef]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage = 25
guardflag = L
pausetime = 11,11
hitsound = S2,2
guardsound = S3,0
guard.sparkno = S2500
sparkno = S2800
sparkxy = 0,-40
animtype = Heavy
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = 0,-12
guard.velocity = -5
air.velocity = -2,-11

[State 420, Explod]
type = Explod
trigger1 = AnimElem = 1
anim = 455
ID = 455
pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = 1
;removetime = -2
;sprpriority = 2
ontop = 1
removeongethit = 1

[State 420, 1]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; Crouch Light Kick
[StateDef 430]
anim = 430
ctrl = 0
type = C
movetype = A
physics = C
velset = 0,0
poweradd = 25

[State 430, swoosh]
type = PlaySnd
trigger1 = Time = 2
value = 0,0

[State 430, grunt]
type = PlaySnd
trigger1 = Time = 0
value = 1,0

[State 430, HitDef]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage = 25
guardflag = L
pausetime = 8,8
hitsound = S2,0
guardsound = S3,0
guard.sparkno = S2500
sparkno = S2600
sparkxy = 0,0
animtype = Light
ground.type = Low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -2
guard.velocity = -1
air.velocity = -2,-3

[State 200, ChangeState]
type = ChangeState
trigger1 = command = "x"
value = 410

[State 200, ChangeState]
type = ChangeState
trigger1 = AnimElem = 2, > 0
trigger1 = command = "a"
value = 440

[State 430, 1]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; Crouch Medium Kick
[StateDef 440]
anim = 440
ctrl = 0
type = C
movetype = A
physics = C
velset = 0,0
poweradd = 65

[State 440, swoosh]
type = PlaySnd
trigger1 = Time = 2
value = 0,1

[State 440, grunt]
type = PlaySnd
trigger1 = Time = 0
value = 1,1

[State 440, HitDef]
type = hitdef
trigger1 = time = 0
attr = c, na
damage    = 30
hitflag = maf
guarDFlag = lam
animtype = back
pausetime = 8,7
guard.sparkno = S2500
sparkno = S2601
sparkxy = 0,-32
hitsound = S2,1
guardsound = S3,0
ground.type = low
ground.slidetime = 10
ground.hittime  = 40
ground.velocity = 0, -6
air.velocity = 0,-4
air.ctrltime = 15
guard.velocity = -9
ground.cornerpush.veloff = 0


[State 440, 1]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; Crouch Hard Kick
[StateDef 450]
anim = 450
ctrl = 0
type = C
movetype = A
physics = C
velset = 0,0
poweradd = 25

[State 450, swoosh]
type = PlaySnd
trigger1 = Time = 2
value = 0,2

[State 450, grunt]
type = PlaySnd
trigger1 = Time = 0
value = 1,2











[State 450, grunt]
type = PlaySnd
trigger1 = Time = 0
value = 7,8







[State 450, HitDef]
type = HitDef
trigger1 = Time = 0
attr = C, NA
hitflag = M
damage = 60
guardflag = L
pausetime = 11,11
hitsound = S2,2
guardsound = S3,0
guard.sparkno = S2500
sparkno = S2800
sparkxy = 0,0
animtype = Back
ground.type = Trip
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -6
guard.velocity = -3

[State 450, 1]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1




;----------------------------------------------------------
;---------------------------------------------------------------------------
; Bullet Jump
[Statedef 91088]
type    = A
physics = A
ctrl = 0

[State 0, 2]
type = ChangeAnim
trigger1 = Time = 0
value = 104

[State 0, 3]
type = ChangeState
triggerall = Time > 6
trigger1 = Vel y > -2
trigger2 = command = "a"
trigger3 = command = "b"
trigger4 = command = "c"
value = 910880






