; Rumai's constants and state file.

[Data]
;Amount of life to start with
;体力ゲージの初期値
life = 600
;attack power (more is stronger)
;攻撃ダメージ
attack = 125
;defensive power (more is stronger)
;体力パワー
defence = 80
;Percentage to increase defense everytime player is knocked down
fall.defence_up = 60
;Time which player lies down for, before getting up
liedown.time = 20
;Number of points for juggling
airjuggle = 15
;Default hit spark number for HitDefs
sparkno = 2
;Default guard spark number
guard.sparkno = 40
;1 to enable echo on KO
KO.echo = 0
;Volume offset (negative for softer)
volume = 75
;Variables with this index and above will not have their values
;reset to 0 between rounds or matches. There are 60 int variables,
;indexed from 0 to 59, and 40 float variables, indexed from 0 to 39.
;If omitted, then it defaults to 60 and 40 for integer and float
;variables repectively, meaning that none are persistent, i.e. all
;are reset. If you want your variables to persist between matches,
;you need to override state 5900 from common1.cns.
IntPersistIndex = 60
FloatPersistIndex = 40

[Size]
xscale = 1           ;Horizontal scaling factor.
yscale = 1           ;Vertical scaling factor.
ground.back = 15     ;Player width (back, ground)
ground.front = 16    ;Player width (front, ground)
air.back = 12        ;Player width (back, air)
air.front = 12       ;Player width (front, air)
height = 60          ;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 = 1     ;Set to 1 to scale projectiles too
head.pos = -5, -90   ;Approximate position of head
mid.pos = -5, -60    ;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  = 1.5      ;Walk forward
walk.back = -1.5 ;Walk backward
run.fwd  = 3.5, 0    ;Run forward (x, y)
run.back = -5.5,-4 ;Hop backward (x, y)
jump.neu = 0,-11    ;Neutral jumping velocity (x, y)
jump.back = -3.7    ;Jump back Speed (x, y)
jump.fwd = 3.7       ;Jump forward Speed (x, y)
runjump.back = -2.55,-8.1 ;Running jump speeds (opt)
runjump.fwd = 4,-8.1      ;.
airjump.neu = 0,-8.1      ;.
airjump.back = -4      ;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 = .65         ;Vertical acceleration
stand.friction = .85  ;Friction coefficient when standing
crouch.friction = .82 ;Friction coefficient when crouching

;---------------------------------------------------------------------------
; Variable usage:
; This is a record of the variables that KFM uses. Keeping a record of your
; variable usage helps you avoid careless mistakes later.
; var(1)  - Used in kfm.cmd for combo condition (updated every tick)
; var(2)  - Used in Kung Fu Throw (state 800) to remember if fwd was being
;           held (remembered from state 800 through state 810).


;---------------------------------------------------------------------------
; Lose by Time Over
; CNS difficulty: basic
; CNS レベル: 基本
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0

[State 170, Snd01]
type = PlaySnd
trigger1 = AnimElem =2
value = 1000, 1
;channel = 0

[State 170, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

;---------------------------------------------------------------------------
; 勝利セリフ表示 （地図）
[Statedef 9901]
type = S
ctrl = 0
anim = 0
velset = 0,0

[State 9901, 1]
type = Explod
trigger1 = Time = 1
anim = 9901
id = 9901
bindtime = -1
pos = 0,0
postype = left
sprpriority = 9
removetime = -1
ownpal = 1
pausemovetime = 100
shadow = 0,0,0
ontop = 1

[State 9901, 2]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

;---------------------------------------------------------------------------
; 勝利セリフ表示 （地図）
[Statedef 9903]
type = S
ctrl = 0
anim = 3345
velset = 0,0

[State 9903, 1]
type = Explod
trigger1 = Time = 1
anim = 9903
id = 9903
bindtime = -1
pos = 0,0
postype = left
sprpriority = 9
removetime = -1
ownpal = 1
pausemovetime = 100
shadow = 0,0,0
ontop = 1

[State 9903, 2] 
type = AssertSpecial
trigger1 = Time >= 0
flag = nomusic

[State 9903, 3]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

;---------------------------------------------------------------------------
; Taunt
; CNS difficulty: easy
[Statedef 195]
type = S
ctrl = 0
anim = 195
velset = 0,0
movetype = I
physics = S
sprpriority = 2

[State 195, Snd01]
type = PlaySnd
trigger1 = AnimElem =3
value = 1000, 2
;channel = 0

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

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

;---------------------------------------------------------------------------
; BASIC ATTACKS
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------

; Standing Light Slash
; CNS difficulty: easy

[Statedef 200]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
velset = 0,0
anim = 200
poweradd = 35
givepower = 25

[State 200, Snd01]
type = PlaySnd
trigger1 = time =1
value = 0,0
;channel = 0

[State 200, Voice01]
type = PlaySnd
trigger1 = AnimElem =1
value = 200,0
;channel = 0

[State 200, Explod]
type = Explod
trigger1 = Time = 1
anim = 8002
id = 8002
bindtime = -1
pos = 50, -55
postype = p1
sprpriority = 9
removetime = 20
ownpal = 1
pausemovetime = 100
shadow = 0,0,0
ontop = 1

[State 200 , HitDef]
type = HitDef
trigger1 = AnimElem = 2
persistent = 0
attr = S, NA
animtype = light
damage = 65
guardflag = MA
hitflag = MAF
pausetime = 5,20
ground.type = High
ground.slidetime = 6
ground.hittime = 10
ground.velocity = -5
air.velocity = -4,-4
guardsound = S1,1
hitsound = S10,1
airguard.velocity = -5,-1
air.cornerpush.veloff = 0
air.animtype = Back
air.hittime = 17
air.fall = 0
fall.recover = 0
sparkno = S8105
guard.sparkno = S8020
sparkxy = -10, -55   

[State 200 , HitDef2]
type = HitDef
trigger1 = AnimElem = 3
persistent = 0
attr = S, NA
animtype = light
damage = 45
guardflag = MA
pausetime = 5,20
ground.type = High
ground.slidetime = 6
ground.hittime = 10
ground.velocity = -5
air.velocity = -4,-4
guardsound = S1,0
hitsound = S9,1
airguard.velocity = -5,-1
air.cornerpush.veloff = 0
air.animtype = Back
air.hittime = 17
air.fall = 0
fall.recover = 0
sparkno = S8118
guard.sparkno = S8021
sparkxy = -10, -55

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

;---------------------------------------------------------------------------

; Standing Medium Slash
; CNS difficulty: easy

[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 7
ctrl = 0
velset = 0,0
anim = 210
poweradd = 75
givepower = 55

[State 210, Snd01]
type = PlaySnd
trigger1 = AnimElem =1
value = 200,2
;channel = 0

[State 210, Snd02]
type = PlaySnd
trigger1 = AnimElem =1
value = 0,1
;channel = 1

[State 210, Explod]
type = Explod
trigger1 = Time = 1
anim = 8001
id = 8001
bindtime = -1
pos = 10, -30   
postype = p1
sprpriority = 9
removetime = 20
ownpal = 1
pausemovetime = 100
shadow = 0,0,0
ontop = 1

[State 210 , HitDef]
type = HitDef
trigger1 = Time = 0
persistent = 0
attr = S, NA
animtype = medium
damage = 125
guardflag = MA
hitflag = MAF
pausetime = 10,20
ground.type = High
ground.slidetime = 15
ground.hittime = 7
ground.velocity = -7
air.velocity = -4,-4
hitsound = S9,0
guardsound = S1,0
airguard.velocity = -5,-1
air.cornerpush.veloff = 0
air.animtype = Back
air.hittime = 17
air.fall = 0
fall.recover = 0
sparkno = S8110
guard.sparkno = S8021
sparkxy = -20, -60   

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

;---------------------------------------------------------------------------

; Standing Hard Slash
; CNS difficulty: easy

[Statedef 220]
type    = S
movetype= A
physics = S
juggle  = 9
ctrl = 0
velset = 0,0
anim = 420
poweradd = 115
givepower = 75
sprpriority = 2

[State 220, Snd01]
type = PlaySnd
trigger1 = time = 0
value = 200,1
channel = 0

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

[State 220, 1]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 235
animtype  = Hard
hitflag = MAFD
guardflag = MAF
pausetime = 30,40
sparkno = S8116
guard.sparkno = S8020
sparkxy = -20,-140
hitsound = S9,0
guardsound = S1,0
ground.type = High
ground.slidetime = 6
ground.hittime  = 10
ground.velocity = -5
air.velocity = -2,-3
down.velocity = -5,0
down.hittime = 20
air.fall = 1
fall.recover = 0

[State 220, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;---------------------------------------------------------------------------

; Standing Kick
; CNS difficulty: easy

[Statedef 230]
type    = S
movetype= A
physics = S
juggle  = 3
ctrl = 0
velset = 0,0
anim = 230
poweradd = 25
givepower = 25


[State 230 , HitDef]
type = HitDef
trigger1 = Time = 0
persistent = 0
attr = S, NA
animtype = light
damage = 55
guardflag = MA
hitflag = MAF
pausetime = 3,15
ground.type = High
ground.slidetime = 7
ground.hittime = 2
ground.velocity = -5
air.velocity = -4,-4
hitsound = S10,3
guardsound = S10,4
airguard.velocity = -5,-1
air.cornerpush.veloff = 0
air.animtype = Back
air.hittime = 17
air.fall = 0
fall.recover = 0
sparkno = S8010
sparkxy = -10, -50

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

;---------------------------------------------------------------------------

;Crouching Light Slash
; CNS difficulty: easy

[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 3
poweradd= 50
ctrl = 0
anim = 400
sprpriority = 2

[State 400, Snd01]
type = PlaySnd
trigger1 = AnimElem =1
value = 0,0
;channel = 0

[State 400, Explod]
type = Explod
trigger1 = Time = 1
anim = 8002
id = 8002
bindtime = -1
pos = 50, -45
postype = p1
sprpriority = 9
removetime = 15
ownpal = 1
pausemovetime = 100
shadow = 0,0,0
ontop = 1

[State 400, 1]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 45
animtype  = Light
hitflag = MAF
guardflag = L
pausetime = 10,10
sparkno = S8118
guard.sparkno = S8020
sparkxy = -10,-42
hitsound = S10,0
guardsound = S1,0
ground.type = Low
ground.slidetime = 6
ground.hittime  = 10
ground.velocity = -5
air.velocity = -2,-3
down.velocity = -5,0
down.hittime = 20

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

;---------------------------------------------------------------------------

;Crouching Medium Slash
; CNS difficulty: easy

[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 65
ctrl = 0
anim = 410
sprpriority = 2

[State 410, Snd01]
type = PlaySnd
trigger1 = AnimElem =1
value = 1000, 01
;channel = 0

[State 410, Snd02]
type = PlaySnd
trigger1 = AnimElem =1
value = 0,1
;channel = 1

[State 410, Explod]
type = Explod
trigger1 = Time = 1
anim = 8001
id = 8001
bindtime = -1
pos = 10, -30   
postype = p1
sprpriority = 9
removetime = 20
ownpal = 1
pausemovetime = 100
shadow = 0,0,0
ontop = 1

[State 410, 1]
type = HitDef
trigger1 = Time = 0
velocity = 0
attr = C, NA
damage   = 125
animtype = Medium
hitflag = MAF
guardflag = L
priority = 2
pausetime = 7,32
sparkno = S8110
guard.sparkno = S8021
hitsound = S10,0
guardsound = S1,1
sparkxy = -30, -10
;ground.type = Trip
ground.slidetime = 3
ground.hittime  = 9
ground.velocity = -1, -5
air.velocity = -1,-5
down.hittime = 18
fall = 1
fall.recover = 0

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

;---------------------------------------------------------------------------

;Crouching Hard Slash
; CNS difficulty: easy

[Statedef 420]
type    = C
movetype= A
physics = C
juggle  = 7
poweradd= 65
ctrl = 0
anim = 440
sprpriority = 2

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


[State 420, Snd02]
type = PlaySnd
trigger1 = AnimElem =1
value = 0,1

[State 420, Explod]
type = Explod
trigger1 = Time = 1
anim = 10001
id = 10001
bindtime = -1
pos = 80, -50   
postype = p1
sprpriority = 9
removetime = 20
ownpal = 1
pausemovetime = 100
shadow = 0,0,0
ontop = 1


[State 420, 1]
type = HitDef
trigger1 = Time = 0
velocity = 0
attr = C, NA
damage   = 200
animtype = Hard
hitflag = MAF
guardflag = L
priority = 2
pausetime = 35,37
sparkno = S8110
guard.sparkno = S8021
hitsound = S10,0
guardsound = S1,1
sparkxy = -30, -10
;ground.type = Trip
ground.slidetime = 3
ground.hittime  = 9
ground.velocity = -1, -7
air.velocity = -1,-5
down.hittime = 18
fall = 1
fall.recover = 0

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

;---------------------------------------------------------------------------

;Crouching Kick
; CNS difficulty: easy

[Statedef 430]
type    = C
movetype= A
physics = C
juggle  = 4
poweradd= 35
ctrl = 0
anim = 430
sprpriority = 2


[State 430, 1]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 65
animtype  = Light
hitflag = MAF
guardflag = L
pausetime = 5,5
sparkno = S8010
sparkxy = -15,-5
hitsound = S10,5
guardsound = 10,7
ground.type = Low
ground.slidetime = 6
ground.hittime  = 10
ground.velocity = -5
air.velocity = -2,-3
down.velocity = -5,0
down.hittime = 20

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

;---------------------------------------------------------------------------

; Jumping Light slash
; CNS difficulty: easy

[Statedef 600]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 55
ctrl = 0
anim = 600
sprpriority = 2

[State 600, Snd01]
type = PlaySnd
trigger1 = AnimElem =1
value = 200,2
;channel = 0

[State 600, Snd02]
type = PlaySnd
trigger1 = AnimElem =1
value = 0,0
;channel = 1

[State 600, Explod]
type = Explod
trigger1 = Time = 1
anim = 8002
id = 8002
bindtime = -1
pos = 60, -95
postype = p1
sprpriority = 9
removetime = 20
ownpal = 1
pausemovetime = 100
shadow = 0,0,0
ontop = 1

[State 600, 1]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 85
guardflag = HA
hitflag = MAF
priority = 3
pausetime = 12,8
sparkno = S8105
guard.sparkno = S8020
sparkxy = -10,0
hitsound   = S8,0
guardsound = S1,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -4
air.velocity = -1.3,-3

[State 600, 2]
type = CtrlSet
trigger1 = Time = 17
value = 1
ctrl = 1

;---------------------------------------------------------------------------

; Jumping Medium Slash

[Statedef 610]
type    = A
movetype= A
physics = A
juggle  = 7
poweradd= 75
ctrl = 0
anim = 420
sprpriority = 2

[State 610, Snd01]
type = PlaySnd
trigger1 = AnimElem =1
value = 200,1
;channel = 0

[State 610, Snd01]
type = PlaySnd
trigger1 = AnimElem =1
value = 0,1
;channel = 1

[State 610, 1]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = 170
guardflag = HA
hitflag = MAF
priority = 2
pausetime = 17,25
sparkno = S8110
guard.sparkno = S8021
sparkxy = -10,-30
hitsound   = S10,2
guardsound = S1,1
animtype = Hard
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -5
air.velocity = -3,-4

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------

; Jumping Hard Slash

[Statedef 620]
type    = A
movetype= A
physics = A
juggle  = 9
poweradd= 75
ctrl = 0
anim = 621
sprpriority = 2

[State 620, Snd01]
type = PlaySnd
trigger1 = AnimElem =1
value = 200,0
;channel = 0

[State 620, Snd01]
type = PlaySnd
trigger1 = AnimElem =1
value = 0,1
;channel = 1

[State 620, Explod]
type = Explod
trigger1 = Time = 1
anim = 10001
id = 10001
bindtime = -1
pos = 80, -70   
postype = p1
sprpriority = 9
removetime = 20
ownpal = 1
pausemovetime = 100
shadow = 0,0,0
ontop = 1

[State 620, 1]
type = HitDef
trigger1 = AnimElem = 2
attr = A, NA
damage = 235
guardflag = HA
hitflag = MAF
priority = 2
pausetime = 27,25
sparkno = S8110
guard.sparkno = S8021
sparkxy = -10,-30
hitsound   = S10,2
guardsound = S1,1
animtype = Hard
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -5
air.velocity = -3,-4

;---------------------------------------------------------------------------

; Jumping Kick
; CNS difficulty: easy

[Statedef 630]
type    = A
movetype= A
physics = A
juggle  = 3
poweradd= 35
ctrl = 0
anim = 630
sprpriority = 2


[State 630, 1]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 45
guardflag = HA
hitflag = MAF
priority = 1
pausetime = 7,7
sparkno = S8010
;sparkxy = 0,0
hitsound   = S10,3
guardsound = S10,7
ground.type = High
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -4
air.velocity = -1.3,-3

[State 630, 2]
type = CtrlSet
trigger1 = Time = 17
value = 1
ctrl = 1

;---------------------------------------------------------------------------

;B+C Overhead Attack
; CNS difficulty: easy

[Statedef 299]
type    = S
movetype= A
physics = S
juggle  = 15
poweradd= 30
ctrl = 0
anim = 299
sprpriority = 2

[State 299, Snd01]
type = PlaySnd
trigger1 = AnimElem =3
value = 1000, 1
;channel = 0

[State 299, 1]
type = HitDef
trigger1 = Time = 0
velocity = 0
attr = C, NA
damage   = 95
animtype = Medium
hitflag = MAF
guardflag = HA
priority = 1
pausetime = 20,12
sparkno = S8110
guard.sparkno = S8021
hitsound = S10,2
guardsound = S1,0
sparkxy = -30, -10
ground.type = Trip
ground.slidetime = 3
ground.hittime  = 9
ground.velocity = -2, -5
air.velocity = -2,-5
down.hittime = 25
fall = 1
fall.recover = 0

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

; Lay Down
;---------

[Statedef 60]
Type = S
MoveType = A
Physics = S
anim = 60
sprpriority = 1
ctrl = 0

[State 60, invincibility]
type = nothitby
trigger1 = 1
value = SA, AT

[State 60, end state]
type = ChangeState
trigger1 = Animtime = 0
value = 0
ctrl = 1

; Hop Forward
;------------
[Statedef 62]
Type = A
MoveType = A
Physics = N
anim = 62
sprpriority = 1
velset = 5, -5
ctrl = 0

[State 62, ghost]
type = playerpush
trigger1 = 1
value = 0

[State 62, gravity]
type = veladd
trigger1 = 1
y = 0.45

[State 62, jump sound]
type = PlaySnd
trigger1 = Time = 1
value = 100, 9
;channel = 1

[State 62, end state]
type = ChangeState
trigger1 = Animtime = 0
value = 65

; Land
;-----

[Statedef 65]
Type = S
MoveType = I
Physics = S
anim = 65
sprpriority = 1
velset = 0, 0
ctrl = 0

[State 65, ground position]
type = posset
trigger1 = 1
y = 0

[State 65, land sound]
type = PlaySnd
trigger1 = Time = 0
value = 40,0
;channel = 1

[State 65, end state]
type = ChangeState
trigger1 = time = 7
value = 0
ctrl = 1

; Roll Forward
;-------------

[Statedef 66]
type = S
movetype = A
physics = N
anim = 66
sprpriority = 1
velset = 0
ctrl = 0

[State 66, velocity]
type = VelSet
trigger1 = time = 1
x = 8

[State 66, velocity]
type = VelSet
trigger1 = time = 6
x = 7

[State 66, velocity]
type = VelSet
trigger1 = time = 11
x = 6

[State 66, velocity]
type = VelSet
trigger1 = time = 14
x = 5

[State 66, velocity]
type = VelSet
trigger1 = time = 17
x = 4.5

[State 66, velocity]
type = VelSet
trigger1 = time = 21
x = 0

[State 66, end state]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

; Roll Back
;----------

[Statedef 68]
type = S
movetype = A
physics = N
anim = 68
sprpriority = -2
velset = 0
ctrl = 0

[State 68, velocity]
type = VelSet
trigger1 = time = 1
x = -7

[State 68, velocity]
type = VelSet
trigger1 = time = 3
x = -6.5

[State 68, velocity]
type = VelSet
trigger1 = time = 6
x = -6

[State 68, velocity]
type = VelSet
trigger1 = time = 9
x = -4.5

[State 68, velocity]
type = VelSet
trigger1 = time = 12
x = -4

[State 68, velocity]
type = VelSet
trigger1 = time = 15
x = -3

[State 68, velocity]
type = VelSet
trigger1 = time = 17
x = 0

[State 68, end state]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

; Roll Forward Get Up
;--------------------

[Statedef 72]
Type = C
MoveType = I
Physics = N
sprpriority = -2
anim = 72
ctrl = 0

[State 72, animation]
type = ChangeAnim
trigger1 = time = 0
value = 72
ifelse = anim = 5110
;value = ifelse(anim = 5110, 72)

[State 72, velset]
type = VelSet
trigger1 = AnimElem = 3
x = 4.8

[State 72, velset]
type = VelSet
trigger1 = AnimTime = 3
x = 0

[State 72, ghost]
type = PlayerPush
trigger1 = 1
value = 0

[State 72, invincibility]
type = NotHitBy
trigger1 = 1
value = SCA

[State 72, end state]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

; Roll Back Get Up
;-----------------

[Statedef 76]
Type = C
MoveType = I
Physics = N
sprpriority = -2
anim = 76
ctrl = 0

[State 76, animation]
type = ChangeAnim
trigger1 = time = 0
value = 76
ifelse = anim = 5110
;value = ifelse(anim = 5110, 76)

[State 76, velset]
type = VelSet
trigger1 = AnimElem = 3
x = -4.8

[State 76, velset]
type = VelSet
trigger1 = AnimTime = 5
x = 0

[State 76, ghost]
type = PlayerPush
trigger1 = 1
value = 0

[State 76, invincibility]
type = NotHitBy
trigger1 = 1
value = SCA

[State 76, end state]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

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

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

[State 40, jump sound]
type = PlaySnd
trigger1 = Time = 1
value = 100, 9
;channel = 0

[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

;---------------------------------------------------------------------------
; RUN_BACK
[Statedef 105]
type    = A
physics = A
ctrl = 0
anim = 105
sprpriority = 1

[State 105, jump sound]
type = PlaySnd
trigger1 = Time = 1
value = 100, 13
;channel = 0

[State 105, 1]
type = VelSet
trigger1 = Time = 0
x = const(velocity.run.back.x)
y = const(velocity.run.back.y)

[State 105, 2]
type = CtrlSet
trigger1 = Time = 2
value = 1

[State 105, 3]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 106

;---------------------------------------------------------------------------
; HITG_SHAKE
[Statedef 5000]
type    = S
movetype= H
physics = N
velset = 0,0

[State 5000, HurtSnd01]
type = PlaySnd
trigger1 = Time = 1
value = 1000,0
channel = 0

[State 5000, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(groundtype) = 1),5000,5010) + GetHitVar(animtype)

[State 5000, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 5000, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

[State 5000, 4] ;Freeze anim
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 5000, 5] ;State type gets set to aerial if getting hit up
type = StateTypeSet
trigger1 = Time = 0
trigger1 = GetHitVar(yvel) != 0 || GetHitVar(fall)
trigger2 = Pos Y != 0
statetype = a

[State 5000, 6]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0 && !GetHitVar(fall)
value = 5001 ;HITG_SLIDE

[State 5000, 7]
type = ChangeState
trigger1 = HitShakeOver
value = 5030

[State 5000, FFB Light]
type = ForceFeedback
trigger1 = anim = 5000
trigger2 = anim = 5010
persistent = 0
time = 6
waveform = square

[State 5000, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5001
trigger2 = anim = 5011
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 5000, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

;---------------------------------------------------------------------------
; HITC_SLIDE
[Statedef 5011]
type    = C
movetype= H
physics = C

[State 5011, HurtSnd01]
type = PlaySnd
trigger1 = Time = 1
value = 300,0
channel = 0

[State 5011, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1

[State 5011, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 5025 + GetHitVar(animtype)

[State 5011, 3] ;Stop sliding back
type = VelMul
trigger1 = Time >= GetHitVar(slidetime)
x = .6

[State 5011, 4]
type = VelSet
trigger1 = HitOver
x = 0

[State 5011, 5]
type = DefenceMulSet
trigger1 = HitOver
value = 1

[State 5011, 6]
type = ChangeState
trigger1 = HitOver
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; HITA_SHAKE
[Statedef 5020]
type    = A
movetype= H
physics = N
velset = 0,0

[State 5020, HurtSnd01]
type = PlaySnd
trigger1 = Time = 1
value = 300,0
channel = 0

[State 5020, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(airtype) = 1),5000,5010) + GetHitVar(animtype)

[State 5020, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 5020, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

[State 5020, 4] ;Freeze anim
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 5020, 5]
type = ChangeState
trigger1 = HitShakeOver
value = 5030

[State 5020, FFB Light]
type = ForceFeedback
trigger1 = anim = 5000
trigger2 = anim = 5010
persistent = 0
time = 6
waveform = square

[State 5020, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5001
trigger2 = anim = 5011
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 5020, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
trigger4 = anim = [5051,5059]
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

;---------------------------------------------------------------------------
; HITA_UP_T (transition)
[Statedef 5035]
type    = A
movetype= H
physics = N

[State 5035, HurtSnd01]
type = PlaySnd
trigger1 = Time = 1
value = 300,1
channel = 0

[State 5035, 1]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5035)
trigger1 = Anim != [5051,5059] ;Not if in hit up anim
trigger1 = Anim != 5090 ;Not if hit off ground anim
value = 5035

[State 5035, 2]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5035, 3]
type = ChangeState
triggerall = !HitFall
trigger1 = HitOver  ;Hit is over
trigger2 = AnimTime = 0 ;Animation over
trigger3 = Vel Y > 0    ;Hit ground
trigger3 = Pos Y >= 10  ;.
trigger4 = Time = 0     ;No transition anim
trigger4 = Anim != 5035 ;.
value = 5040 ;HITA_RECOV

[State 5035, 4]
type = ChangeState
triggerall = HitFall
trigger1 = HitOver  ;Hit is over
trigger2 = AnimTime = 0 ;Anim is over
trigger3 = Vel Y > 0    ;Hit ground
trigger3 = Pos Y >= 10  ;.
trigger4 = Time = 0     ;No transition anim
trigger4 = Anim != 5035 ;.
value = 5050 ;HITA_FALL

;---------------------------------------------------------------------------
; Continue?
[Statedef 5500]
type = S
ctrl = 0
anim = 5300
velset = 0,0

[State 5500, HurtSnd01]
type = PlaySnd
trigger1 = Time = 1
value = 100,5
;channel = 0

[State 5500, 1] ;Use continue animation if available
type = ChangeAnim
trigger1 = time = 0
trigger1 = SelfAnimExist(5500)
value = 1
ctrl = 1

; Rage Explosion Mode
;--------------------

[Statedef 3000]
Type = S
MoveType = A
Physics = S
anim = 3000
sprpriority = 2
velset = 0,0
ctrl = 0

[State 3000, invincibility]
type = NotHitBy
trigger1 = 1
value = SCA

[state 3000, rage mode init]
type = VarSet
trigger1 = time = 1
v = 20
value = 1

[state 3000, rage gauge init]
type = VarSet
trigger1 = time >= 1
v = 21
value = 1000

[state 3000, rage mode explosion set]
type = VarSet
trigger1 = time = 1
v = 22
value = 1

[State 3000, super pause]
type = Superpause
trigger1 = time = 2
time = 26
movetime = 26
anim = -1
pos = 0, 0
sound = S100, 6
darken = 0

[State 3000, PalFX]
type = PalFX
trigger1 = 1
Time = -1
add = 237,27,35
mul = 143, 143, 143
sinadd   = 90,5,0,80
ignorehitpause = 1


[State 3000, fire column]
type = Explod
trigger1 = time = 2
id = 3000
anim = 3001
pos = 0,0
bindtime = 1
ignorehitpause = 1
sprpriority = 3
ownpal = 1
supermovetime = 15
;supermovetime = 9

[State 3000, shake]
type = EnvShake
trigger1 = time = 2;28
time = 40

[State 3000, explosion]
type = Explod
trigger1 = time = 29
id = 3000
anim = 3002
pos = 0,0
bindtime = 1
ignorehitpause = 1
sprpriority = 3
ownpal = 1
supermovetime = 50
;supermovetime = 32


[State 3000, smoke 1]
type = Explod
trigger1 = time = 47
id = 3000
anim = 3003
pos = -22,0
bindtime = 1
ignorehitpause = 1
sprpriority = 2
ownpal = 1
supermovetime = 16

[State 3000, smoke 2]
type = Explod
trigger1 = time = 47
id = 3000
anim = 3003
pos = 20,0
facing = -1
bindtime = 1
ignorehitpause = 1
sprpriority = -4
ownpal = 1
supermovetime = 16

[state 3000, voice]
type = PlaySnd
trigger1 = AnimElem = 5
value = 8000, 0
channel = 2


[State 3000, hit def]
type = HitDef
trigger1 = AnimElem = 3, = 30
attr = S, HA
hitflag = MAF
animtype = hard
air.animtype = hard
priority = 5, Hit
damage = 0, 0
pausetime = 12, 12
sparkno = S4130
sparkxy = 0,-50 + ceil(P2BodyDist y)
hitsound = S800, 5
ground.type = low
air.type = high
ground.velocity = -11,0
ground.slidetime = 12
ground.hittime = 38
air.velocity = -4, -5
air.hittime = 12
ground.cornerpush.veloff = -19.4

[State 3000, move hit background]
type = envcolor
trigger1 = MoveHit
persistent = 0
ignorehitpause = 1
background = 1
value = 255,0,0
time = 2

[State 3000, end state]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

; Rage Dissipates
;--------------------

[Statedef 3010]
Type = S
MoveType = I
Physics = S
anim = 0
sprpriority = 2
velset = 0,0
ctrl = 0

[State 3010, End Rage]
type = VarSet
trigger1 = time >= 100
v = 22
value = 0

[State 3010, end rage mode]
type = VarSet
trigger1 = time >= 100
v = 20
value = 0

[State 3010, close rage gauge]
type = VarSet
trigger1 = time >= 100
v = 21
value = 0

[State 3010, No Rage]
type = PalFx
trigger1 = Var(20) = 0
add = 0,0,0
mul = 256,256,256
ignorehitpause = 1

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

;-------------------------------------------------------------------

;---------------------------------------------------------------------------
; States that are always executed (use statedef -2)
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
[State -2, Set Dead Flag]
type = VarRangeSet
trigger1 = roundstate = 0
first = 39
last = 40
value = 0

;---------------------------------------------------------------------------
[State -2, K.Oed Flag]
type = VarAdd
trigger1 = !Alive
var(39) = 1
ignorehitpause = 1

;---------------------------------------------------------------------------
[State -2, K.O.voice]
type = PlaySnd
trigger1 = anim != 170
trigger1 = !Alive
trigger1 = var(39) = 10
value = 11,MatchOver+1
ignorehitpause = 1

; Rage Mode
;----------
[State -2, blink]
type = PalFx
trigger1 = RoundState = 2 && life > 0
trigger1 = var(20) = 1
time = 1
add = 75,75,75
ignorehitpause = 1

[State -2, rage explosion background]
type = BgPalFx
trigger1 = RoundState = 2 && life > 0
trigger1 = stateno != [4511, 4512]
trigger1 = var(20) = 1 && var(22) = 1
time = 1
add = -256,-44,-72
mul = 0,205,256
ignorehitpause = 1

; No More Rage
;----------
[State -2, No Rage]
type = PalFx
trigger1 = RoundState = 2 && life > 0
trigger1 = stateno = 3201
time = 1
add = 0,0,0
mul = 256,256,256
ignorehitpause = 1

; Display Rage Mode Infos
;------------------------
[State -2, display rage mode]
type = null;DisplayToClipboard
trigger1 = 1
text = "Rage Explosion = %d, Rage Mode = %d\nRage Gauge = %d, Hit Gauge = %d, Life Gauge = %d"
params = var(22),var(20),var(21),var(23),var(24)

; Power Bar
;----------
[state -2, set power bar]
type = PowerSet
triggerall = name = "Jun"	; prevents to remove any "161" animation from the enemy
triggerall = RoundState = 2
triggerall = stateno != [4511, 4512]
triggerall = life > 0
trigger1 = var(20) = 0 && var(25) = 0 && power != var(23)	; when no special modes : Power = Hit Gauge
trigger2 = var(20) = 1 && power != var(21)			; when Rage Mode		: Power = Rage Gauge
trigger3 = var(25) = 1 && power != var(26)			; when Mu no Kyouchi	: Power = Timer
value = ifelse(var(20)=1, var(21), ifelse(var(25)=1, var(26), var(23)))
ignorehitpause

;---------------------------------------------------------------------------
; States that are executed when in self's state file (use statedef -3)
;---------------------------------------------------------------------------

[Statedef -3]

;This controller plays a sound everytime KFM lands from a jump, or
;from his back-dash.
[State -3, Landing Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52 ;Jump land
trigger2 = stateno = 106 ;Run-back land
value = 40, 0

; Rage Mode
;----------

; Activate/Desactivate Rage Mode
;-------------------------------
[state -3, set rage mode]			; Switch ON/OFF the Rage Mode
type = VarSet					; ---------------------------
triggerall = RoundState = 2			; if the round isn't finished
trigger1 = var(20) = 0 && var(23) >= 1000	; if the player isn't enraged but the Hit Gauge is full
trigger2 = var(20) = 1 && var(21) <= 0	; or the player is enraged but the Rage Gauge is empty
v = 20						;
value = 0 + (var(23) >= 1000)			; then set the Rage Mode (ON if Hit Gauge full ; OFF if rage gauge empty)

; Rage Gauge
;-----------
[state -3, initialize rage gauge]		; Initialize the Rage Gauge
type = VarSet					; -------------------------
triggerall = RoundState = 2			; if the round isn't finished
trigger1 = var(23) >= 1000			; if the Hit  Gauge is full  (player starts being enraged)
trigger2 = var(21) <= 0				; or the Rage Gauge is empty (player stops being enreged)
v = 21						;
value = 0 + 1000*(var(23) >= 1000)		; then set the Rage Gauge (full if enraged ; empty if not enraged)

[state -3, decrease rage gauge]		; Decrease the Rage Gauge
type = VarSet					; -----------------------
triggerall = RoundState = 2			; if the round isn't finished
triggerall = stateno != [4511, 4512]	; if the player isn't in a Tag state
trigger1 = var(21) > 0				; if the Rage Gauge isn't empty
v = 21						;
value = var(21)-1					; then decrese the Rage Gauge

[state -3, increase rage gauge]		; Increase the Rage Gauge when player is hit (deactivated here)
type = null;VarAdd				; ------------------------------------------
triggerall = RoundState = 2			; if the round isn't finished
trigger1 = var(20) = 1				; if the player is enraged
trigger1 = var(24) != life			; if the player has lost life (has been hit)
v = 21						;
value = ceil((var(24)-life)*1.20)		; then Hit Gauge <- (lost life) + (0.2 x lost life)

; Rage Explosion Mode
;--------------------
[state -3, initialize rage explosion mode] ; Initialize the Rage Explosion mode (deactivated here)
type = null;VarSet				 ; ----------------------------------
triggerall = RoundState = 2			 ; if the round isn't finished
trigger1 = var(21) <= 0 && var(22) = 1	 ; if the Rage Gauge is empty and the Rage Explosion mode is activated
v = 22						 ;
value = 0						 ; then remove the Rage Explosion mode

; Hit Gauge
;----------
[state -3, initialize hit gauge]		  ; Deactivate the Hit Gauge when player is enraged
type = VarSet					  ; -----------------------------------------------
triggerall = RoundState = 2			  ; if the round isn't finished
trigger1 = var(20) = 1				  ; if the player is enraged
v = 23						  ;
value = 0						  ; then set the Hit Gauge to zero

[state -3, increase hit gauge]		  ; Increase the Hit Gauge when player is hit
type = VarSet					  ; -----------------------------------------
triggerall = RoundState = 2			  ; if the round isn't finished
trigger1 = var(22) = 0 && var(25) = 0	  ; if the Rage Explosion or Mu no Kyouchi haven't been activated
trigger1 = var(24) != life			  ; if the player has lost life (has been hit)
v = 23						  ;
value = var(23) + ceil((var(24)-life)*1.20) ; then Hit Gauge <- (lost life) + (0.2 x lost life)

; Life Gauge
;-----------
[state -3, set life gauge]			; Check if the player has lost life :
type = VarSet					; -----------------------------------
trigger1 = var(24) != life			; if   Life Gauge != Life Bar
v = 24						;
value = life					; then Life Gauge <= Life Bar


;---------------------------------------------------------------------------
; Rumai Mutsube A
;---------------------------------------------------------------------------

[Statedef 6000]
type    = S
movetype= A
physics = S
juggle  = 10
poweradd= 30
ctrl = 0
anim = 6000
sprpriority = 2

[State 6000, Voice01]
type = PlaySnd
trigger1 = AnimElem =1
value = 1000,3
;channel = 0

[State 6000, after images]
type = AfterImage
trigger1 = AnimElem = 1
time = 7
lenght = 1
palbright = 0,0,0
palcontrast = 0, 0, 35
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
timegap = 1
framegap = 2
trans = add1

[State 6000, velocity1]
type = VelSet
trigger1 = AnimElem = 3
x = 10

[State 6000, velocity2]
type = VelSet
trigger1 = AnimElem = 4
x = 9

[State 6000, velocity3]
type = VelSet
trigger1 = AnimElem = 5
x = 7

[State 6000, velocity4]
type = VelSet
trigger1 = AnimElem = 6
x = 5

[State 6000, Explod]
type = Explod
trigger1 = Time = 1
anim = 10001
id = 10001
bindtime = -1
pos = 80, -30   
postype = p1
sprpriority = 9
removetime = 20
ownpal = 1
pausemovetime = 100
shadow = 0,0,0
ontop = 1

[State 6000 , HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
animtype = light
damage = 90
guardflag = MA
hitflag = MAF
pausetime = 9,7
ground.type = High
ground.slidetime = 6
ground.hittime = 10
ground.velocity = -5
air.velocity = -0,-2
hitsound = S10,0
guardsound = S1,1
airguard.velocity = -5,-1
air.cornerpush.veloff = 0
air.animtype = Back
air.hittime = 17
air.fall = 1
fall = 1

fall.recover = 0
sparkno = S8105
guard.sparkno = S8020
sparkxy = -10, -76  

[State 6000]
type = width
trigger1 = 1
value = 40,0

[state 6000, Projsound]
type = PlaySnd
trigger1 = AnimElem = 4
value = 9000, 1

[State 6000, Proj1]
type = Projectile
trigger1 = AnimElem = 6
projanim = 10000
projhitanim = 10002
offset = 120, -50
hitsound = S9000,2
guardsound = S1,0
projpriority = 0
projsprpriority = 3
projremovetime = 99
pausemovetime = 50
velocity = 3
accell = 0.9
attr = S, SP
damage   = 30
animtype = Light
hitflag = MAFD
projhits = 1
guardflag = M
pausetime = 5,5
sparkno = S8105
guard.sparkno = S8021
;sparkxy = 0, 0
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -3.7
air.velocity = -5,-5
ProjID = 10000
palfx.time = 56
palfx.sinadd = 30,255,0,3
projpriority = 1

[State 6000,1]
type = changestate
trigger1 = AnimElem = 7
value = 6005

;---------------------------------------------------------------------------

; ROLL DMG A
; CNS difficulty: easy

[Statedef 6005]
type    = C
movetype= A
physics = C
juggle  = 1
ctrl = 0
velset = 0,0
anim = 6005
poweradd = 25
givepower = 25

[State 6005, velocity1]
type = VelSet
trigger1 = AnimElem = 1
x = 7

[State 6005, velocity2]
type = VelSet
trigger1 = AnimElem = 2
x = 5

[State 6005, velocity3]
type = VelSet
trigger1 = AnimElem = 3
x = 3

[State 6005, velocity4]
type = VelSet
trigger1 = AnimElem = 4
x = 0

[State 6005 , HitDef]
type = HitDef
trigger1 = AnimElem = 1
trigger2 = AnimElem  = 2
trigger3 = AnimElem  = 3
trigger4 = AnimElem  = 4
persistent = 0
attr = C, NA
animtype = light
damage = 25
guardflag = L
hitflag = MAFD
pausetime = 3,17
ground.type = Low
ground.slidetime = 9
ground.hittime = 1
ground.velocity = -5
air.velocity = -4,-4
hitsound = S10,3
guardsound = S10,4
airguard.velocity = -5,-1
air.cornerpush.veloff = 0
air.animtype = Back
air.hittime = 17
air.fall = 0
fall.recover = 0
sparkno = S8010
sparkxy = -10, -50

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


;---------------------------------------------------------------------------
; Rumai Mutsube B
;---------------------------------------------------------------------------

[Statedef 6010]
type    = S
movetype= A
physics = S
juggle  = 10
poweradd= 30
ctrl = 0
anim = 6000
sprpriority = 2

[State 6010, Voice01]
type = PlaySnd
trigger1 = AnimElem =1
value = 1000,3
;channel = 0

[State 6010, after images]
type = AfterImage
trigger1 = AnimElem = 1
time = 7
lenght = 1
palbright = 0,0,0
palcontrast = 0, 0, 35
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
timegap = 1
framegap = 2
trans = add1

[State 6010, velocity1]
type = VelSet
trigger1 = AnimElem = 3
x = 10

[State 6010, velocity2]
type = VelSet
trigger1 = AnimElem = 4
x = 9

[State 6010, velocity3]
type = VelSet
trigger1 = AnimElem = 5
x = 7

[State 6010, velocity4]
type = VelSet
trigger1 = AnimElem = 6
x = 5

[State 6010, Explod]
type = Explod
trigger1 = Time = 1
anim = 10001
id = 10001
bindtime = -1
pos = 80, -30   
postype = p1
sprpriority = 9
removetime = 20
ownpal = 1
pausemovetime = 100
shadow = 0,0,0
ontop = 1

[State 6010 , HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
animtype = light
damage = 90
guardflag = MA
hitflag = MAF
pausetime = 9,7
ground.type = High
ground.slidetime = 6
ground.hittime = 10
ground.velocity = -5
air.velocity = -0,-2
hitsound = S10,0
guardsound = S1,1
airguard.velocity = -5,-1
air.cornerpush.veloff = 0
air.animtype = Back
air.hittime = 17
air.fall = 1
fall = 1

fall.recover = 0
sparkno = S8105
guard.sparkno = S8020
sparkxy = -10, -76  

[State 6010]
type = width
trigger1 = 1
value = 40,0

[state 6010, Projsound]
type = PlaySnd
trigger1 = AnimElem = 4
value = 9000, 1

[State 6010, Proj1]
type = Projectile
trigger1 = AnimElem = 6
projanim = 10000
projhitanim = 10002
offset = 120, -50
hitsound = S9000,2
guardsound = S1,0
projpriority = 0
projsprpriority = 3
projremovetime = 99
pausemovetime = 50
velocity = 3,-3
accell = 0.9, 0.9
attr = S, SP
damage   = 30
animtype = Light
hitflag = MAFD
projhits = 1
guardflag = M
pausetime = 5,5
sparkno = S8105
guard.sparkno = S8021
;sparkxy = 0, 0
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -3.7
air.velocity = -5,-5
ProjID = 10000
palfx.time = 56
palfx.sinadd = 30,255,0,3
projpriority = 1

[State 6010,1]
type = changestate
trigger1 = AnimElem = 7
value = 6005

;---------------------------------------------------------------------------
; Rumai Mutsube C
;---------------------------------------------------------------------------

[Statedef 6020]
type    = S
movetype= A
physics = S
juggle  = 10
poweradd= 30
ctrl = 0
anim = 6000
sprpriority = 2

[State 6020, Voice01]
type = PlaySnd
trigger1 = AnimElem =1
value = 1000,3
;channel = 0

[State 6020, after images]
type = AfterImage
trigger1 = AnimElem = 1
time = 7
lenght = 1
palbright = 0,0,0
palcontrast = 0, 0, 35
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
timegap = 1
framegap = 2
trans = add1

[State 6020, velocity1]
type = VelSet
trigger1 = AnimElem = 3
x = 10
y = -10

[State 6020, velocity2]
type = VelSet
trigger1 = AnimElem = 4
x = 9
y = -9

[State 6020, velocity3]
type = VelSet
trigger1 = AnimElem = 5
x = 7
y = -7

[State 6020, velocity4]
type = VelSet
trigger1 = AnimElem = 6
x = 5
y = -5

[State 6020, Explod]
type = Explod
trigger1 = Time = 1
anim = 10001
id = 10001
bindtime = -1
pos = 80, -30   
postype = p1
sprpriority = 9
removetime = 20
ownpal = 1
pausemovetime = 100
shadow = 0,0,0
ontop = 1

[State 6020 , HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
animtype = Medium
damage = 90
guardflag = MA
hitflag = MAF
pausetime = 9,7
ground.type = High
ground.slidetime = 6
ground.hittime = 10
ground.velocity = -5
air.velocity = -0,-2
hitsound = S10,0
guardsound = S1,1
airguard.velocity = -5,-1
air.cornerpush.veloff = 0
air.animtype = Back
air.hittime = 17
air.fall = 1
fall = 1
fall.recover = 0
sparkno = S8105
guard.sparkno = S8020
sparkxy = -10, -76
projpriority = 1

[State 6020]
type = width
trigger1 = 1
value = 40,0

[state 6020, Projsound]
type = PlaySnd
trigger1 = AnimElem = 4
value = 9000, 1

[State 6020, Proj1]
type = Projectile
trigger1 = AnimElem = 6
projanim = 10000
projhitanim = 10002
offset = 120, -50
hitsound = S9000,2
guardsound = S1,0
projpriority = 0
projsprpriority = 3
projremovetime = 99
pausemovetime = 50
velocity = 3
accell = 0.9
attr = S, SP
damage   = 30
animtype = Light
hitflag = MAFD
projhits = 1
guardflag = M
pausetime = 5,5
sparkno = S8105
guard.sparkno = S8021
;sparkxy = 0, 0
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -3.7
air.velocity = -5,-5
ProjID = 10000
palfx.time = 56
palfx.sinadd = 30,255,0,3


[State 6020,1]
type = changestate
trigger1 = AnimElem = 7
value = 6025

;---------------------------------------------------------------------------

; ROLL DMG C
; CNS difficulty: easy

[Statedef 6025]
type    = C
movetype= A
physics = C
juggle  = 1
ctrl = 0
velset = 0,0
anim = 6105
poweradd = 25
givepower = 25

[State 6025, 1]
type = veladd
trigger1 = 1
y = 0.3

[State 6025, velocity1]
type = VelSet
trigger1 = AnimElem = 1
y = 7

[State 6025, velocity2]
type = VelSet
trigger1 = AnimElem = 2
y = 5

[State 6025, velocity3]
type = VelSet
trigger1 = AnimElem = 3
y = 3

[State 6025, velocity4]
type = VelSet
trigger1 = AnimElem = 4
y = 0


[State 6025, after images]
type = AfterImage
trigger1 = AnimElem = 1
time = 7
lenght = 1
palbright = 0,0,0
palcontrast = 0, 0, 35
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
timegap = 1
framegap = 2
trans = add1

[State 6025 , HitDef]
type = HitDef
trigger1 = AnimElem = 1
trigger2 = AnimElem  = 2
trigger3 = AnimElem  = 3
trigger4 = AnimElem  = 4
persistent = 0
attr = C, NA
animtype = light
damage = 25
guardflag = L
hitflag = MAFD
pausetime = 3,17
ground.type = Low
ground.slidetime = 9
ground.hittime = 1
ground.velocity = -5
air.velocity = -4,-4
hitsound = S10,3
guardsound = S10,4
airguard.velocity = -5,-1
air.cornerpush.veloff = 0
air.animtype = Back
air.hittime = 17
air.fall = 0
fall.recover = 0
sparkno = S8010
sparkxy = -10, -50

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

;---------------------------------------------------------------------------
; Initialize (at the start of the round)
;[Statedef 5900]
;type = S;

;[State 5900, 1] ;Clear all int variables
;type = VarRangeSet
;trigger1 = roundsexisted = 0
;value = 0

;[State 5900, 2] ;Clear all float variables
;type = VarRangeSet
;trigger1 = roundsexisted = 0
;fvalue = 0

;[State 5900, 3] ;Intro for round 1
;type = ChangeState
;trigger1 = roundno = 1
;value = 190

;---------------------------------------------------------------------------
; Win state decider
; CNS difficulty: basic
[Statedef 180]
type = S

[State 180, 1]
type = ChangeState
triggerall = var(23) != 1
triggerall=roundno = 3
trigger1 = Time = 0
value = 181

[State 180, 1]
type = ChangeState
triggerall = var(23) != 1
triggerall= random<=500
trigger1 = Time = 0
value = 182

[State 180, 1]
type = ChangeState
triggerall = var(23) != 1
triggerall= Random<=999;Var(1)=1
trigger1 = Time = 0
value = 183

;---------------------------------------------------------------------------
; Win pose 1
; CNS difficulty: basic
[Statedef 181]
type = S
ctrl = 0
anim = 181
velset = 0,0

[State 181, 1]
type = NotHitBy
trigger1 = Time >= 0
value = SCA
time = 1

[State 181, Voice01]
type = PlaySnd
trigger1 = AnimElem =1
value = 1000,8
;channel = 0

[State 181, PlaySnd]
type = PlaySnd
triggerall = matchover
triggerall = var(21)!=1 || var (23)!=1
trigger1 = time = 100
value = S1112,3
volume = 255
channel = 6

[State 181, 1]
type = Explod
trigger1 = Time = 1
anim = 9900
id = 9900
bindtime = -1
pos = 105,70
postype = left
sprpriority = -1
removetime = -1
ownpal = 1
pausemovetime = 100
shadow = 0,0,0

[State 181, Explod]
type = Explod
triggerall= matchover
trigger1 = time = 320
anim = 9901
ID =9901
pos = 0,0
postype = left  ;p2,front,back,left,right
facing = 0
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
supermove
pausemove
scale = 1,1
sprpriority = 5
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0

[State 181, AssertSpecial]
type = AssertSpecial
triggerall= matchover
trigger1 = time < 600;matchover
flag = roundnotover
flag2 = nomusic

;---------------------------------------------------------------------------
; Win pose 2
; CNS difficulty: basic
[Statedef 182]
type = S
ctrl = 0
anim = 182
velset = 0,0

[State 182, 1]
type = NotHitBy
trigger1 = Time >= 0
value = SCA
time = 1

[State 6000, Voice01]
type = PlaySnd
trigger1 = AnimElem =4
value = 1000,1
;channel = 0

[State 182, PlaySnd]
type = PlaySnd
triggerall = matchover
triggerall = var(21)!=1 || var (23)!=1
trigger1 = time = 100
value = S1112,3
volume = 255
channel = 6

[State 182, 1]
type = Explod
trigger1 = time = 1
anim = 9900
id = 9900
bindtime = -1
pos = 105,70
postype = left
sprpriority = -1
removetime = -1
ownpal = 1
pausemovetime = 100
shadow = 0,0,0

[State 182, Explod]
type = Explod
triggerall = matchover
trigger1 = time = 320
anim = 9902
ID =9902
pos = 0,0
postype = left  ;p2,front,back,left,right
facing = 0
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
supermove
pausemove
scale = 1,1
sprpriority = 5
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0

[State 182, AssertSpecial]
type = AssertSpecial
triggerall= matchover
trigger1 = time  < 560 ;matchover
flag = roundnotover
flag2= nomusic

; Win pose 3
; CNS difficulty: basic
[Statedef 183]
type = S
ctrl = 0
anim = 184
velset = 0,0

[State 183, 1]
type = NotHitBy
trigger1 = Time >= 0
value = SCA
time = 1

[State 6000, Voice01]
type = PlaySnd
trigger1 = AnimElem =1
value = 1000,4
;channel = 0

[State 183, PlaySnd]
type = PlaySnd
triggerall = matchover
triggerall = var(21)!=1 || var (23)!=1
trigger1 = time = 100
value = S1112,3
volume = 255
channel = 6

[State 183, 1]
type = Explod
trigger1 = time = 1
anim = 9900
id = 9900
bindtime = -1
pos = 105,70
postype = left
sprpriority = -1
removetime = -1
ownpal = 1
pausemovetime = 100
shadow = 0,0,0

[State 183, Explod]
type = Explod
triggerall = matchover
trigger1 = time = 320
anim = 9903
ID =9903
pos = 0,0
postype = left  ;p2,front,back,left,right
facing = 0
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
supermove
pausemove
scale = 1,1
sprpriority = 5
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0

[State 183, AssertSpecial]
type = AssertSpecial
triggerall= matchover
trigger1 = time  < 560 ;matchover
flag = roundnotover
flag2= nomusic

;============================
; intro
[Statedef 190]
type = S
movetype = I
physics = S
velset = 0
anim = 0

[State 191, 1]
type = varset
triggerall = Time = 0
trigger1 = enemy, Name = "SSVDimaano" && enemy,authorname = "John.M featuring Eddie.M"
var(40) = 1

[State 191, 1]
type = ChangeState
triggerall = Time = 0
trigger1 = enemy, Name = "SSVDimaano" && enemy,authorname = "John.M featuring Eddie.M"
value = 193

[State 190, enemyname-decide]
type = varset
triggerall = roundstate = 0 || time = 0
trigger1 = (P2name = "SSVDimaano") || (P4name = "SSVDimaano")
var(55) = 1

[State 190, 1] ;intro against Dimaano
type = ChangeState
trigger1 = var(55) = 1
trigger1 = Time = 0
value = 193

[State 191, 1]
type = ChangeState
triggerall = Time = 0
trigger1 = (p2name = "SSVYunfei") || (p4name = "SSVYunfei")
value = 977

[State 191, 1]
type = ChangeState
triggerall = Time = 0
trigger1 = (p2name = "SSVJun") || (p4name = "SSVJun")
value = 988

[State 190, 1] ;normal intro
type = ChangeState
trigger1 = var(55) = 0
trigger1 = Time = 0
value = 191

;---------------------------------
; 193 intro against Dimaano
;---------------------------------
[Statedef 193]
type = S
movetype = I
physics = S
velset = 0
anim = 193

[State 193, Hespeaks2]
type = Explod
trigger1 = AnimElem = 1
anim = 11003
id = 11003
bindtime = 165
pos = 25,180
postype = left
sprpriority = 9
removetime = 550
ownpal = 1
pausemovetime = 165
shadow = 0,0,0

[State 193, Yuga] ; I didn't actually create the Yuga sprite so I take no credit for its creation. 
;Its a great one tho and I thought ppl should see it. :)
type = Explod
trigger1 = AnimElem = 1
anim = 11004
id = 11004
bindtime = 165
pos = -95,-170
postype = p1
sprpriority = -1
removetime = 220
ownpal = 1
pausemovetime = 165
shadow = 0,0,0

[State 193, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = 8000,0
volume = 255

[State 193, AssertSpecial1]
type = AssertSpecial
triggerall = 1
trigger1 =1
flag = intro
flag2 = nomusic
flag3 = nobardisplay

[State 193, AssertSpecial2]
type = AssertSpecial
triggerall=1
trigger1 = 1
flag = noFG

[State 193, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
triggerall roundstate = 1
trigger1 = 1;gametime =[0,12000]
flag = intro
flag2= nomusic
flag3= NoBarDisplay

[State 193, VarSet]
type = VarSet
trigger1 =time = 0
v = 14    ;fv = 10
value = 1

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

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

;---------------------------------
; 977 intro against Yunfei
;---------------------------------
[Statedef 977]
type = S
movetype = I
physics = S
velset = 0
anim = 193

[State 977, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = 8000,0
volume = 255

[State 977, AssertSpecial1]
type = AssertSpecial
triggerall = 1
trigger1 =1
flag = intro
flag2 = nomusic
flag3 = nobardisplay

[State 977, AssertSpecial2]
type = AssertSpecial
triggerall=1
trigger1 = 1
flag = noFG

[State 977, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
triggerall roundstate = 1
trigger1 = 1;gametime =[0,700]
flag = intro
flag2= nomusic
flag3= NoBarDisplay

[State 977, VarSet]
type = VarSet
trigger1 =time = 0
v = 14    ;fv = 10
value = 1

[State 977, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = time  >= 700
flag = Intro

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

;---------------------------------
; 988 intro against Jun
;---------------------------------
[Statedef 988]
type = S
movetype = I
physics = S
velset = 0
anim = 193

[State 988, Villager1]
type = Explod
trigger1 = AnimElem =1
anim = 11006
id = 11006
bindtime = 165
pos = -120,-105
postype = p1
sprpriority = -1
removetime = 220
ownpal = 1
pausemovetime = 165
shadow = 0,0,0

[State 988, Villager1]
type = PlaySnd
trigger1 = animelem = 1
value = 999,0
volume = 255
channel = 10
persistent = 0

[State 988, Villager2]
type = Explod
trigger1 = Time = 100
anim = 11006
id = 11006
bindtime = 165
pos = -120,-105
postype = p1
sprpriority = 3
removetime = 140
ownpal = 1
pausemovetime = 165
shadow = 0,0,0

[State 988, Villager2]
type = PlaySnd
trigger1 = Time = 100
value = 999,1
volume = 255
channel = 10
persistent = 0

[State 988, Villager3]
type = PlaySnd
trigger1 = Time = 200
value = 999,2
volume = 255
channel = 10
persistent = 0

[State 988, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = 8000,0
volume = 255

[State 988, AssertSpecial1]
type = AssertSpecial
triggerall = 1
trigger1 =1
flag = intro
flag2 = nomusic
flag3 = nobardisplay

[State 988, AssertSpecial2]
type = AssertSpecial
triggerall=1
trigger1 = 1
flag = noFG

[State 988, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
triggerall roundstate = 1
trigger1 = 1;gametime =[0,700]
flag = intro
flag2= nomusic
flag3= NoBarDisplay

[State 988, VarSet]
type = VarSet
trigger1 =time = 0
v = 14    ;fv = 10
value = 1

[State 988, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = time  >= 700
flag = Intro

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


;---------------------------------------------------------------------------
; Introduction
; CNS difficulty: basic
[Statedef 191]
type = S
ctrl = 0
anim = 190
velset = 0,0
sprpriority = -1

[State 190, AssertSpecial]
type = AssertSpecial
triggerall = 1
trigger1 =1
flag = intro
flag2 = nomusic
flag3 = nobardisplay

[State 190, AssertSpecial]
type = AssertSpecial
triggerall=1
trigger1 = 1
flag = noFG

[State 190, BGPalFX]
type = BGPalFX
trigger1 = time<=780
time = 1
add = 0,0,0
mul = 0,0,0
sinadd = 0,0,0,10
;invertall = 0
;color = 256
;ignorehitpause =
;persistent =

[State 190, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S9000,0
volume = 255
channel = 10
persistent = 0

[State 190, Explod]
type = Explod
triggerall = numexplod (9911)!=1
trigger1 = AnimElem = 1
anim = 9911
ID =   9911
pos = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 780
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,1
sprpriority = 4
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0

[State 190, Explod]
type = Explod
triggerall = numexplod(9912)= !1
trigger1 = AnimElem = 1
anim = 9912
ID =   9912
pos = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = 780
supermove
scale = 1,1
sprpriority = 5
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0

;;Remove the Huge ass Rumai picture; <-- Coding from lom2b. Awesum work on Mizuki btw. =)
[State 191, RemoveExplod]
type = RemoveExplod
trigger1 = Time >= 800
id = 9911

;Remove The Text;
[State 191, RemoveExplod]
type = RemoveExplod
trigger1 = Time >= 800
id = 9912

[State 190, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
triggerall roundstate = 1
trigger1 = 1;gametime =[0,420]
flag = intro
flag2= nomusic
flag3= NoBarDisplay

[State 190, VarSet]
type = VarSet
trigger1 =time = 0
v = 14    ;fv = 10
value = 1

[State 190, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = time  >= 800
flag = Intro

[State 190, Voice01]
type = PlaySnd
trigger1 = Time = 800
value = 1000,4
;channel = 0

[State 190, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 800
value = 0
;elem = 1

;---------------------------------------------------------------------------
; Omai Shine (SUPER)
;---------------------------------------------------------------------------

; Omai Shine
;------------
[Statedef 3201]
type    = S
movetype = A
physics = S
juggle = 0
anim = 3201
sprpriority = 1
velset = 0,0
ctrl = 0

[State 3201, camera]
type = ScreenBound
trigger1 = 1
value = 1

[State 3201, ???]
type = width
trigger1 = 1
value = 40,0

[State 3201, erase foreground]
type = AssertSpecial
trigger1 = 1
flag = NoFg

[State 3201, background 1]
type = BgPalFx
trigger1 = time%2 = 0
time = 1
add = -255,-255,-255
ignorehitpause

[State 3201, background 2]
type = BgPalFx
trigger1 = time%2 != 0
time = 30
add = 255,255,255
ignorehitpause

[State 3201, SHOWBG]
type = Explod
trigger1 = Time = 1
anim = 4011
id = 4011
bindtime = -1
pos = 0,0
postype = left
sprpriority = -1
removetime = 200
ownpal = 1
pausemovetime = 200
shadow = 0,0,0

[State 3201, Voice01]
type = PlaySnd
trigger1 = AnimElem =1
value = 1000,7
;channel = 0

[State 3201, velocity1]
type = VelSet
trigger1 = AnimElem = 1
x = 10

[State 6000, velocity2]
type = VelSet
trigger1 = AnimElem = 10
x = 9

[State 6000, velocity3]
type = VelSet
trigger1 = AnimElem = 20
x = 7

[State 6000, velocity4]
type = VelSet
trigger1 = AnimElem = 30
x = 5


[State 6000, velocity4]
type = VelSet
trigger1 = AnimElem = 32
y = -20


[State 3201, camera]
type = ScreenBound
trigger1 = 1
value = 1

[State 3201, super pause]
type = Superpause
trigger1 = AnimElem = 1
time = 1
anim = S4130
pos = 2, -55
sound = S800, 6
darken = 0

;[State 3201, Voice]
;type = PlaySnd
;trigger1 = AnimElem = 1
;value = 8000, 1

[State 3201 , HitDef1]
type = HitDef
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
trigger3 = AnimElem = 4
trigger4 = AnimElem = 5
attr = S, NA
animtype = Light
damage = 7
guardflag = MAL
hitflag = MAFD
pausetime = 7,37
ground.type = High
ground.slidetime = 6
ground.hittime = 10
ground.velocity = -5
air.velocity = -0,-2
hitsound = S10,1
guardsound = S1,1
airguard.velocity = -5,-1
air.cornerpush.veloff = 0
air.animtype = Back
air.hittime = 17
sparkno = S8105
guard.sparkno = S8020
sparkxy = -10, -55 
palfx.time = 56
palfx.sinadd = 30,255,0,3

[State 3201 , HitDef2]
type = HitDef
trigger1 = AnimElem = 7
trigger2 = AnimElem = 8
trigger3 = AnimElem = 9
attr = S, NA
animtype = Medium
damage = 10
guardflag = MAL
hitflag = MAFD
pausetime = 7,37
ground.type = High
ground.slidetime = 6
ground.hittime = 10
ground.velocity = -5
air.velocity = -0,-2
hitsound = S10,2
guardsound = S1,0
airguard.velocity = -5,-1
air.cornerpush.veloff = 0
air.animtype = Back
air.hittime = 17
sparkno = S8110
guard.sparkno = S8021
sparkxy = -20, -60 
palfx.time = 56
palfx.sinadd = 30,255,0,3

[State 3201 , HitDef3]
type = HitDef
trigger1 = AnimElem = 14
trigger2 = AnimElem = 15
trigger3 = AnimElem = 16
trigger4 = AnimElem = 17
trigger5 = AnimElem = 18
attr = S, NA
animtype = Hard
damage = 20
guardflag = MAL
hitflag = MAFD
pausetime = 7,37
ground.type = High
ground.slidetime = 6
ground.hittime = 10
ground.velocity = 5
air.velocity = 5,-2
hitsound = S8,0
guardsound = S1,1
airguard.velocity = 5,-1
air.cornerpush.veloff = 0
air.animtype = Back
air.hittime = 17
sparkno = S8115
guard.sparkno = S8020
sparkxy = -60,-5
palfx.time = 56
palfx.sinadd = 30,255,0,3

[State 3201 , HitDef4]
type = HitDef
trigger1 = AnimElem = 20
trigger2 = AnimElem = 21
trigger3 = AnimElem = 22
trigger4 = AnimElem = 23
attr = S, NA
animtype = Hard
damage = 20
guardflag = MAL
hitflag = MAFD
pausetime = 7,37
ground.type = High
ground.slidetime = 6
ground.hittime = 10
ground.velocity = -5
air.velocity = -0,-2
guardsound = S1,1
airguard.velocity = -5,-1
air.cornerpush.veloff = 0
air.animtype = Back
air.hittime = 17
sparkno = S8110
guard.sparkno = S8021
hitsound = S10,2
guardsound = S1,0
sparkxy = -30, -10
palfx.time = 56
palfx.sinadd = 30,255,0,3


[State 3201 , HitDef5]
type = HitDef
trigger1 = AnimElem = 26
trigger2 = AnimElem = 27
trigger3 = AnimElem = 28
attr = S, NA
animtype = Heavy
damage = 20
guardflag = MAL
hitflag = MAFD
pausetime = 7,37
ground.type = High
ground.slidetime = 6
ground.hittime = 10
ground.velocity = -5
air.velocity = -0,-2
hitsound = S10,0
guardsound = S1,1
airguard.velocity = -5,-1
air.cornerpush.veloff = 0
air.animtype = Back
air.hittime = 17
sparkno = S8115
guard.sparkno = S8020
sparkxy = -20, -55 
palfx.time = 56
palfx.sinadd = 30,255,0,3

[State 3201, HitDef6]
type = HitDef
trigger1 = AnimElem = 30
attr = C, NA
damage    = 100
animtype  = Hard
hitflag = MAFD
guardflag = MAF
pausetime = 30,40
sparkno = S8116
guard.sparkno = S8020
sparkxy = -20,-140
hitsound = S9,0
guardsound = S1,0
ground.type = High
ground.slidetime = 6
ground.hittime  = 10
ground.velocity = 5,3
air.velocity = 5,3
down.velocity = 5,2
down.hittime = 20
air.fall = 1
fall.recover = 0
sparkno = S8116
guard.sparkno = S8020
palfx.time = 56
palfx.sinadd = 30,255,0,3

[State 3201 , HitDef7]
type = HitDef
trigger1 = AnimElem = 32
attr = S, NA
animtype = Hard
damage = 100
guardflag = MAFD
hitflag = MAFD
pausetime = 9,7
ground.type = High
ground.slidetime = 6
ground.hittime = 10
ground.velocity = -5
air.velocity = -0,-2
hitsound = S10,0
guardsound = S1,1
airguard.velocity = -5,-1
air.cornerpush.veloff = 0
air.animtype = Back
air.hittime = 17
air.fall = 1
fall = 1
palfx.time = 56
palfx.sinadd = 30,255,0,3

[State 3201, Voice02]
type = PlaySnd
trigger1 = AnimElem =32
value = 1000,3
;channel = 0

[State 3201, velocity1]
type = VelSet
trigger1 = AnimElem = 32
y = -5

[State 3201, velocity2]
type = VelSet
trigger1 = AnimElem = 33
y = -10

[State 3201, velocity3]
type = VelSet
trigger1 = AnimElem = 34
y = -15

[State 3201, velocity4]
type = VelSet
trigger1 = AnimElem = 35
y = -20

[State 3201, velocity5]
type = VelSet
trigger1 = AnimElem = 36
y = -25

[State 3201, velocity6]
type = VelSet
trigger1 = AnimElem = 37
y = -30

[State 3201, after images]
type = AfterImage
trigger1 = AnimElem = 1
time = 77
lenght = 1
palbright = 0,0,0
palcontrast = 0, 0, 35
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
timegap = 1
framegap = 2
trans = add1


[State 3201, end rage mode]
type = VarSet
trigger1 = time = 0
v = 20
value = 0

[State 3201, close rage gauge]
type = VarSet
trigger1 = time = 0
v = 21
value = 0

[State 3201, remove explod]
type = RemoveExplod
trigger1 = time = 0
ID = 8300

[State 3201, No Rage]
type = PalFx
trigger1 = RoundState = 2 && life > 0
trigger1 = Time = 0
time = 1
add = 0,0,0
mul = 256,256,256
ignorehitpause = 1

[State 3201, end state]
type = ChangeState
trigger1 = Animtime = 0
value = 3255

;------------------------------------------------------------------------------

; Fall State
; CNS difficulty: easy

[Statedef 3255]
type    = A
movetype= I
physics = A
juggle  = 0
ctrl = 0
velset = 0,0
anim = 6105
poweradd = 0
givepower = 0

[State 3255, 1]
type = veladd
trigger1 = 1
y = 3

[State 3255, velocity1]
type = VelSet
trigger1 = AnimElem = 1
y = 7

[State 3255, velocity2]
type = VelSet
trigger1 = AnimElem = 2
y = 5

[State 3255, velocity3]
type = VelSet
trigger1 = AnimElem = 3
y = 3

[State 3255, velocity4]
type = VelSet
trigger1 = AnimElem = 4
y = 0

[State 3255, after images]
type = AfterImage
trigger1 = AnimElem = 1
time = 7
lenght = 1
palbright = 0,0,0
palcontrast = 0, 0, 35
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
timegap = 1
framegap = 2
trans = add1

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

;---------------------------------------------------------------------------
[State -2, Set Dead Flag]
type = VarRangeSet
trigger1 = roundstate = 0
first = 39
last = 40
value = 0

;---------------------------------------------------------------------------
[State -2, K.Oed Flag]
type = VarAdd
trigger1 = !Alive
var(39) = 1
ignorehitpause = 1

;---------------------------------------------------------------------------
[State -2, K.O.voice]
type = PlaySnd
trigger1 = anim != 170
trigger1 = !Alive
trigger1 = var(39) = 10
value = 11,2
ignorehitpause = 1

;---------------------------------------------------------------------------
[State -2, Dead]
type = SelfState
triggerall = !Alive
triggerall = var(40) > 0
trigger1 = StateNo != 5390
trigger1 = StateNo != 5400
value = 5390
ignorehitpause = 1

;---------------------------------------------------------------------------

; Sutoringu
; CNS difficulty: easy

[Statedef 6500]
type    = S
movetype= A
physics = S
juggle  = 3
ctrl = 0
velset = 0,0
anim = 6500
poweradd = 25
movehitpersist = 1

[State 6500, Voice02]
type = PlaySnd
trigger1 = AnimElem =1
value = 8000,0
;channel = 0

[State 6500 , HitDef]
type = HitDef
trigger1 = Time = 0
persistent = 0
attr = S, NA
animtype = light
damage = 35
guardflag = MA
hitflag = MAF
pausetime = 3,15
ground.type = High
ground.slidetime = 7
ground.hittime = 2
ground.velocity = -5
air.velocity = -4,-4
hitsound = S10,3
guardsound = S10,4
airguard.velocity = -5,-1
air.cornerpush.veloff = 0
air.animtype = Back
air.hittime = 17
air.fall = 0
fall.recover = 0
sparkno = S8010
sparkxy = -10, -70
palfx.time = 56
palfx.sinadd = 30,255,0,3
guard.sparkno = S8021

[State 6500, Activate Sutoringu State]
type = VarSet
trigger1 = Movehit
v = 11
value = 1

[State 6500, End Zonbi Jitsu State]
type = VarSet
trigger1 = Movehit
v = 10
value = 0

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

;---------------------------------------------------------------------------

; Zonbi Jitsuryoku
; CNS difficulty: easy

[Statedef 6505]
type    = S
movetype= A
physics = S
juggle  = 3
ctrl = 0
velset = 0,0
anim = 11005
poweradd = 0
movehitpersist = 1

[State 6505, Voice02]
type = PlaySnd
trigger1 = AnimElem =1
value = 200,1
;channel = 0

[State 6505, smoke 1]
type = Explod
trigger1 = time = 47
id = 3000
anim = 3003
pos = -22,0
bindtime = 1
ignorehitpause = 1
sprpriority = 2
ownpal = 1
supermovetime = 16

[State 6506, smoke 2]
type = Explod
trigger1 = time = 47
id = 3000
anim = 3003
pos = 20,0
facing = -1
bindtime = 1
ignorehitpause = 1
sprpriority = -4
ownpal = 1
supermovetime = 16

[State 6505, hit def]
type = HitDef
trigger1 = AnimElem >= 1
attr = S, HA
hitflag = MAF
animtype = hard
air.animtype = hard
priority = 5, Hit
damage = 0, 0
pausetime = 12, 12
sparkno = S4130
sparkxy = 0,-50 + ceil(P2BodyDist y)
hitsound = S800, 5
ground.type = low
air.type = high
ground.velocity = -19,0
ground.slidetime = 19
ground.hittime = 38
air.velocity = -9, -5
air.hittime = 12
ground.cornerpush.veloff = -19.4
sparkno = S8010
sparkxy = -10, -70
palfx.time = 56
palfx.sinadd = 30,255,0,3
guard.sparkno = S8021

[State 6505, Begin Zonbi Jitsu]
type = VarSet
trigger1 = Movehit
v = 10
value = 1

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

;---------------------------------------------------------------------------
; Rumai Mutsube D
;---------------------------------------------------------------------------

[Statedef 6998]
type    = S
movetype= A
physics = S
juggle  = 10
poweradd= 30
ctrl = 0
anim = 6000
sprpriority = 2

[State 6998, Voice01]
type = PlaySnd
trigger1 = AnimElem =1
value = 1000,3
;channel = 0

[State 6998, after images]
type = AfterImage
trigger1 = AnimElem = 1
time = 7
lenght = 1
palbright = 0,0,0
palcontrast = 0, 0, 35
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
timegap = 1
framegap = 2
trans = add1

[State 6998, velocity1]
type = VelSet
trigger1 = AnimElem = 3
x = 10

[State 6998, velocity2]
type = VelSet
trigger1 = AnimElem = 4
x = 9

[State 6998, velocity3]
type = VelSet
trigger1 = AnimElem = 5
x = 7

[State 6998, velocity4]
type = VelSet
trigger1 = AnimElem = 6
x = 5

[State 6998, Explod]
type = Explod
trigger1 = Time = 1
anim = 10001
id = 10001
bindtime = -1
pos = 80, -30   
postype = p1
sprpriority = 9
removetime = 20
ownpal = 1
pausemovetime = 100
shadow = 0,0,0
ontop = 1

[State 6998 , HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
animtype = light
damage = 90
guardflag = MA
hitflag = MAF
pausetime = 9,7
ground.type = High
ground.slidetime = 6
ground.hittime = 10
ground.velocity = -5
air.velocity = -0,-2
hitsound = S10,0
guardsound = S1,1
airguard.velocity = -5,-1
air.cornerpush.veloff = 0
air.animtype = Back
air.hittime = 17
air.fall = 1
fall = 1
fall.recover = 0
sparkno = S8105
guard.sparkno = S8020
sparkxy = -10, -76  

[State 6998]
type = width
trigger1 = 1
value = 40,0

[state 6998, Projsound]
type = PlaySnd
trigger1 = AnimElem = 4
value = 9000, 1

[State 6998, Proj1]
type = Projectile
trigger1 = AnimElem = 6
projanim = 10000
projhitanim = 10002
offset = 120, -50
hitsound = S9000,2
guardsound = S1,0
projpriority = 0
projsprpriority = 3
projremovetime = 99
pausemovetime = 50
velocity = 3
accell = 0.9
attr = S, SP
damage   = 30
animtype = Light
hitflag = MAFD
projhits = 1
guardflag = M
pausetime = 5,5
sparkno = S8105
guard.sparkno = S8021
;sparkxy = 0, 0
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -3.7
air.velocity = -5,-5
ProjID = 10000
palfx.time = 56
palfx.sinadd = 30,255,0,3
projpriority = 0

[State 6998, Proj2]
type = Projectile
trigger1 = AnimElem = 6
projanim = 10000
projhitanim = 10002
offset = 120, -50
hitsound = S9000,2
guardsound = S1,0
projpriority = 0
projsprpriority = 3
projremovetime = 99
pausemovetime = 50
velocity = 3,-3
accell = 0.9, 0.9
attr = S, SP
damage   = 30
animtype = Light
hitflag = MAFD
projhits = 1
guardflag = M
pausetime = 5,5
sparkno = S8105
guard.sparkno = S8021
;sparkxy = 0, 0
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -3.7
air.velocity = -5,-5
ProjID = 10000
palfx.time = 56
palfx.sinadd = 30,255,0,3
projpriority = 0

[State 6998, Proj3]
type = Projectile
trigger1 = AnimElem = 6
projanim = 10000
projhitanim = 10002
offset = 120, -50
hitsound = S9000,2
guardsound = S1,0
projpriority = 0
projsprpriority = 3
projremovetime = 99
pausemovetime = 50
velocity = 1,-1
accell = 0.9, 0.9
attr = S, SP
damage   = 30
animtype = Light
hitflag = MAFD
projhits = 1
guardflag = M
pausetime = 5,5
sparkno = S8105
guard.sparkno = S8021
;sparkxy = 0, 0
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -3.7
air.velocity = -5,-5
ProjID = 10000
palfx.time = 56
palfx.sinadd = 30,255,0,3
projpriority = 0

[State 6988, Activate Zonbi Mutsube State]
type = VarSet
trigger1 = Movehit
v = 12
value = 1

[State 6988, End Zonbi Jitsu State]
type = VarSet
trigger1 = Movehit
v = 10
value = 0

[State 6988, End Sutoringu State]
type = VarSet
trigger1 = Movehit
v = 11
value = 0

[State 6998,1]
type = changestate
trigger1 = AnimElem = 7
value = 6005

;---------------------------------------------------------------------
; Ambrosia Sama
;---------------------------------------------------------------------

[Statedef 6999]
type = S
movetype = A
physics = S
velset = 0, 0
ctrl = 0
anim = 6999
juggle = 9
poweradd = 100

[State 6999, sound1]
type = PlaySnd
trigger1 = AnimElem = 1
value = 1000,7

[State 6999, sound2]
type = PlaySnd
trigger1 = AnimElem = 4
value = 5000,0

[State 6999, Ambrosia]
type = Explod
trigger1 = animelem = 4
anim = 11007
id = 11007
postype = p2
pos = 0,5
sprpriority = 0
supermove = 1
removetime = 90
ownpal = 1
removeongethit = 1
bindtime = -1

[State 6999, background 1]
type = BgPalFx
trigger1 = time%2 = 0
time = 1
add = -255,-255,-255
ignorehitpause

[State 6999, background 2]
type = BgPalFx
trigger1 = time%2 != 0
time = 30
add = 255,255,255
ignorehitpause

[State 6999, hit def]
type = HitDef
trigger1 = AnimElem = 4
attr = S, HA, SP
hitflag = MA-
animtype = hard
ground.type = high
air.type = low
priority = 4, hit
damage = 225
sparkno = S3323
guard.sparkno = S8020
sparkxy = 0, -64
hitsound = S100,14
guardsound = S1,0
pausemovetime = 185,185
pausetime = 185,185
ground.slidetime = 17
ground.hittime = 17
ground.velocity = -12
guard.pausetime = 11,11
guard.slidetime = 18
guard.hittime = 36
guard.ctrtime = 36
guard.velocity = -12
air.velocity = -3.5,-16
ground.cornerpush.veloff = -27
air.cornerpush.veloff = -16
guard.cornerpush.veloff = -27
yaccel = 1
fall = 1
recover=0

[State 6999, End Zonbi Jitsu State]
type = VarSet
trigger1 = Movehit
v = 10
value = 0

[State 6999, End Sutoringu State]
type = VarSet
trigger1 = Movehit
v = 11
value = 0

[State 6999, End Zonbi Mutsube State]
type = VarSet
trigger1 = Movehit
v = 12
value = 0

[State 6999, end state]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

