; Kenji's constants and state file.

[Data]
life = 1000
attack = 100
Power = 3000
defence = 100
fall.defence_up = 50
liedown.time = 40
airjuggle = 30
sparkno = 2 ;s5560
guard.sparkno = 40
KO.echo = 0
volume = 0
IntPersistIndex = 60
FloatPersistIndex = 40

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

[Velocity]
walk.fwd  = 2.8 ; 2.4      ;Walk forward
walk.back = -2.8 ; -2.2    ;Walk backward
run.fwd  = 7.9, 0  ;4.6, 0  ;Run forward (x, y)
run.back = -9, 0 ;-6.0, -3.8  ;Hop backward (x, y)
jump.neu = 0,-10 ;11   ;Neutral jumping velocity (x, y)
jump.back = -3.8    ;Jump back Speed (x, y)
jump.fwd = 4.3       ;Jump forward Speed (x, y)
runjump.back = -4.7,-9 ;Running jump speeds (opt)
runjump.fwd = 4.7,-9      ;.
airjump.neu = 0,-10      ;.
airjump.back = -4      ;Air jump speeds (opt)
airjump.fwd = 4         ;.

[Movement]
airjump.num = 1      ;Number of air jumps allowed (opt)
airjump.height = 35  ;Minimum distance from ground before you can air jump (opt)
yaccel = .45        ;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
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0

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

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

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

[state 180, anim]
type = changestate
trigger1 = Var(1) = [0,125]
value = 181

[state 180, anim]
type = changestate
trigger1 = Var(1) = [126,250]
value = 182

[state 180, anim]
type = changestate
trigger1 = Var(1) = [251,375]
value = 183

[state 180, anim]
type = changestate
trigger1 = Var(1) = [376,500]
value = 184

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

;[State 180, 1]
;type = ChangeState
;trigger1 = Time = 0
;value = 181

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


[State 181, a]
type = AssertSpecial 
trigger1 = time >= 0 
trigger1 = time <=200
flag = RoundNotOver 

[state 181, Assert] 
type = assertspecial 
trigger1 = Time >= 0 
flag = NoBarDisplay 

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

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

[State 182, a]
type = AssertSpecial 
trigger1 = time >= 0 
trigger1 = time <=200
flag = RoundNotOver 

[state 182, Assert] 
type = assertspecial 
trigger1 = Time >= 0 
flag = NoBarDisplay 

[State 182, PlaySnd]
type = PlaySnd
trigger1 = animelem = 11
trigger2 = animelem = 13
trigger3 = animelem = 15
value = 182,0


[State 182, Explod]
type = Explod
trigger1 = animelem = 16
anim = 185
ID = 182
pos = 200,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 30
vel = 0,0
accel = 0,0
removetime = -1
scale = 1,1
sprpriority = 0
ontop = 1

[State 184, Helper]
type = Helper
trigger1 = animelem= 14
helpertype = normal ;player
name = "Female Helper"
ID = 182
stateno = 193
pos = -5,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0

[State 182, Explod]
type = Explod
trigger1 = animelem = 19
anim = 194
ID = 182
pos = 30,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 30
vel = 0,0
accel = 0,0
removetime = -1
;scale = 1,1
sprpriority = -2
ontop = 1


[State 182, Explod]
type = Explod
trigger1 = animelem = 21
anim = 194
ID = 182
pos = 60,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 30
vel = 0,0
accel = 0,0
removetime = -1
;scale = 1,1
sprpriority = -2
ontop = 1

[State 182, Explod]
type = Explod
trigger1 = animelem = 23
anim = 194
ID = 182
pos = 90,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 30
vel = 0,0
accel = 0,0
removetime = -1
;scale = 1,1
sprpriority = -2
ontop = 1

[State 182, Explod]
type = Explod
trigger1 = animelem = 25
anim = 194
ID = 182
pos = 120,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 30
vel = 0,0
accel = 0,0
removetime = -1
;scale = 1,1
sprpriority = -2
ontop = 1

[State 182, Explod]
type = Explod
trigger1 = animelem = 27
anim = 194
ID = 182
pos = 150,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 30
vel = 0,0
accel = 0,0
removetime = -1
;scale = 1,1
sprpriority = -2
ontop = 1

[State 182, Explod]
type = Explod
trigger1 = animelem = 29
anim = 194
ID = 182
pos = 180,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 30
vel = 0,0
accel = 0,0
removetime = -1
;scale = 1,1
sprpriority = -2
ontop = 1

[State 182, Explod]
type = Explod
trigger1 = animelem = 31
anim = 194
ID = 182
pos = 210,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 30
vel = 0,0
accel = 0,0
removetime = -1
;scale = 1,1
sprpriority = -2
ontop = 1

[State 182, Explod]
type = Explod
trigger1 = animelem = 33
anim = 194
ID = 182
pos = 240,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 30
vel = 0,0
accel = 0,0
removetime = -1
;scale = 1,1
sprpriority = -2
ontop = 1



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

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


[State 183, a]
type = AssertSpecial 
trigger1 = time >= 0 
trigger1 = time <=200
flag = RoundNotOver 

[state 183, Assert] 
type = assertspecial 
trigger1 = Time >= 0 
flag = NoBarDisplay 

[State 183, PlaySnd]
type = PlaySnd
trigger1 = animelem = 22
value = 183,0



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

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

[State 184, a]
type = AssertSpecial 
trigger1 = time >= 0 
trigger1 = time <=200 
flag = RoundNotOver 

[state 184, Assert] 
type = assertspecial 
trigger1 = Time >= 0 
flag = NoBarDisplay 

[State 184, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = 2000,2

[State 184, Dash]
type = PlaySnd
trigger1 = animelem = 1
trigger2 = animelem = 3
trigger3 = animelem = 5
value = 10,2



[State 184, Ghost Run 1]
type = Helper
trigger1 = time = 9
helpertype = normal ;player
name = "Ghost Run 1"
ID = 184
stateno = 187
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0


[State 184, Ghost Run 1]
type = Helper
trigger1 = time = 14
helpertype = normal ;player
name = "Ghost Run 1"
ID = 184
stateno = 187
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0


[State 184, Ghost Run 1]
type = Helper
trigger1 = time = 19
helpertype = normal ;player
name = "Ghost Run 1"
ID = 184
stateno = 187
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0


[State 184, Ghost Run 2]
type = Helper
trigger1 = time = 9
helpertype = normal ;player
name = "Ghost Run 2"
ID = 184
stateno = 186
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 0
keyctrl = 0
ownpal = 0

[State 184, Ghost Run 2]
type = Helper
trigger1 = time = 14
helpertype = normal ;player
name = "Ghost Run 2"
ID = 184
stateno = 186
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 0
keyctrl = 0
ownpal = 0


[State 184, Ghost Run 2]
type = Helper
trigger1 = time = 19
helpertype = normal ;player
name = "Ghost Run 2"
ID = 184
stateno = 186
pos = 0,0
postype =p1    ;p2,front,back,left,right
facing = 0
keyctrl = 0
ownpal = 0



[State 184, Ghost Jump]
type = Helper
trigger1 = time = 9
helpertype = normal ;player
name = "Ghost Jump"
ID = 184
stateno = 188
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0

[State 184, Ghost Jump]
type = Helper
trigger1 = time = 14
helpertype = normal ;player
name = "Ghost Jump"
ID = 184
stateno = 188
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0


[State 184, Ghost Jump]
type = Helper
trigger1 = time = 19
helpertype = normal ;player
name = "Ghost Jump"
ID = 184
stateno = 188
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0



[State 184, EnvShake]
type = EnvShake
trigger1 = animelem = 3
time = 15
freq = 30
ampl = -2
phase = 10
;ignorehitpause =
;persistent =


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

;---------------------------------------------------------------------------
; Ghost Run 2
; CNS difficulty: easy
[Statedef 186]
type = S
ctrl = 0
anim = 186
velset = -14,0


[State 186, DestroySelf]
type = Destroyself
trigger1 = time = 22
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------------
; Ghost Run 1
; CNS difficulty: easy
[Statedef 187]
type = S
ctrl = 0
anim = 187
velset = 14,0


[State 186, DestroySelf]
type = Destroyself
trigger1 = time = 22
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------------
; Ghost Jump
; CNS difficulty: easy
[Statedef 188]
type = S
ctrl = 0
anim = 188
velset = 0,-16


[State 188, DestroySelf]
type = Destroyself
trigger1 = time = 22
;ignorehitpause =
;persistent =



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

[State 191, 1] ;Freeze animation until PreIntro is over
type = ChangeAnim
trigger1 = RoundState = 0
value = 190

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



[State 191, voice]
type = PlaySnd
Triggerall = p2name = "Nool (EoH version)" || authorname = "Trasgo7"
trigger1 = animelem = 2
value = 184,0

[State 191, voice]
type = PlaySnd
triggerall = p2name = "Symbiote Onslaught"
trigger1 = animelem = 2
value = 184,0



[State 191, voice]
type = PlaySnd
Triggerall = p2name != "Nool (EoH version)" || authorname != "Trasgo7"
triggerall = p2name != "Symbiote Onslaught"
trigger1 = animelem = 5
value = 195,0





[State 191, HatSnd]
type = PlaySnd
trigger1 = animelem = 18
value = 1,0


[State 191, 3] ;Change to stand state when done
type = ChangeState
trigger1 = AnimTime = 0
value = 194

;---------------------------------------------------------------------------
; Introduction 2
; CNS difficulty: basic
[Statedef 192]
type = S
ctrl = 0
anim = 192
velset = 0,0

[State 192, 1] ;Freeze animation until PreIntro is over
type = ChangeAnim
trigger1 = RoundState = 0
value = 192

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


[State 192, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = 1100,0

[State 192, PlaySnd]
type = PlaySnd
trigger1 = animelem = 19
value = 5000, 0

[State 192, PlaySnd]
type = PlaySnd
trigger1 = animelem = 38
value = 3000, 0



[State 2061, PlaySnd]
type = PlaySnd
trigger1 = time = 40
trigger2 = time = 60
value = 2000,3


[State 194, EnvShake]
type = EnvShake
trigger1 = time = 40
trigger2 = time = 60
time = 110
freq = 200
ampl = -5
phase = 150


[State 192, Explod]
type = Explod
trigger1 = time = 40
anim = 2064
ID = 192
pos = 10,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
removetime = -2
scale = 1,1
sprpriority = 7
ontop = 1

[State 192, Explod]
type = Explod
trigger1 = time = 70
anim = 2064
ID = 192
pos = 70,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
removetime = -2
scale = 1,1
sprpriority = 7
ontop = 1



[State 192, Explod]
type = Explod
trigger1 = time = 70
anim = 2064
ID = 192
pos = -50,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
removetime = -2
scale = 1,1
sprpriority = 7
ontop = 1


[State 192, 3] ;Change to stand state when done
type = ChangeState
trigger1 = AnimTime = 0
value = 194

;---------------------------------------------------------------------------
; Female Helper
; CNS difficulty: easy
[Statedef 193]
type = S
ctrl = 0
anim = 193
velset = 0,0

[State 192, wind]
type = PlaySnd
trigger1 = animelem = 1
trigger2 = animelem = 15
value = 1000,5

[State 192, DestroySelf]
type = Destroyself
trigger1 = time = 178
;ignorehitpause =
;persistent =


;----------------------------------------------- 
[Statedef 194]; Move around before match 
type = S 
physics =S 
sprpriority = 0 

[State 0] 
type = varset 
trigger1 = time = 1 
var(50) = 0 

[State 0] 
type = posset 
trigger1 = 1 
y = 0 

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

[State 20, 1] 
type = VelSet 
trigger1 = command = "holdfwd" 
x = 2.4 

[State 20, 2] 
type = VelSet 
trigger1 = command = "holdback" 
x = -2.0 

[State 2] 
type = ChangeAnim 
trigger1 = command = "holdfwd" 
trigger1 = Anim != 20 
value = 20 

[State 2] 
type = ChangeAnim 
trigger1 = command = "holdback" 
trigger1 = Anim != 21 
value = 21 

[State 2] 
type = ChangeAnim 
trigger1 = command != "holdback" 
trigger1 = command != "holdfwd" 
trigger1 = Anim != 0 
value = 0 

[State 20, 2] 
type = VelSet 
trigger1 = command != "holdback" 
trigger1 = command != "holdfwd" 
x = 0 

[State var] 
type = VarSet 
trigger1 = roundstate != 2 
var(9) = floor(pos x) 

[State F] 
type = posset 
trigger1 = roundstate = 2 
trigger1 = var(9) != 0 
x = var(9) 

[State F] 
type = varset 
trigger1 = roundstate = 2 
var(9) = 0 

[State F] 
type = changestate 
trigger1 = ctrl 
value = ifelse((command = "holdfwd") || (command ="holdback"),20,0) 

 

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

[State 195, 1]
type = PlaySnd
trigger1 = animelem = 12
value = 3000, 0

[State 195, 1]
type = PlaySnd
trigger1 = animelem = 7
value = 275, 1

[State 195, Ki Quake1]
type = EnvShake
trigger1 = animelem = 7
time = 3
freq = 40
ampl = -15
phase = 100


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


;---------------------------------------------------------------------------
; Stand Light Punch
; CNS difficulty: easy
[Statedef 200]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
juggle  = 1                      ;Number of air juggle points move takes
;Commonly-used controllers:
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 200                       ;Change animation (Def: no change)
poweradd = 20                    ;Power to add (Def: 0)

[State 200, Slide]
type = Velset
trigger1 = (Time > 0) && (time <= 10) && (PrevStateNo = 100)
x = 2.5

[State 200, Helper]
type = Helper
trigger1 = animelem = 2
helpertype = normal ;player
name = "SLP_Slash"
ID = 280
stateno = 280
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
ownpal = 0


;[State 200, Flash]
;type = Explod
;trigger1 = animelem = 2
;id = 200
;anim = 201
;pos = 0,0 ;-1, -1
;postype = p1  ;p2,front,back,left,right
;bindtime = 10
;scale = 1,1
;facing = 1
;vfacing = 1
;scale = 1,1
;removetime = -2
;removeongethit = 1
;sprpriority = 2


;[State 200, Flash]
;type = Explod
;trigger1 = animelem = 3
;id = 200
;anim = 425
;pos = 0,0 ;-1, -1
;postype = p1  ;p2,front,back,left,right
;bindtime = 10
;scale = 1,1
;facing = 1
;vfacing = 1
;scale = 1,1
;removetime = -2
;removeongethit = 1
;sprpriority = 2

[State 200, Dust]
type = Explod
trigger1 = Animelem = 1 && (PrevStateNo = 100)
trigger2 = Animelem = 3 && (PrevStateNo = 100)
trigger3 = Animelem = 5 && (PrevStateNo = 100)
trigger4 = Animelem = 7 && (PrevStateNo = 100)
anim = 5556
ID = 200
pos = 0,2
postype = p1  ;p2,front,back,left,right
facing = 1
bindtime = 1
removetime = -2
scale = -1,-1
sprpriority = 7
ontop = 1
ownpal = 1
removeongethit = 0

[State 200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = 800,1

[State 200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = 250,2

[State 200, 1]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA                     ;Attribute: Standing, Normal Attack
damage = 18                  ;Damage that move inflicts, guard damage
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = M                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 2, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
pausetime = 10, 11                 ;Time attacker pauses, time opponent shakes
sparkno = s981                      ;Spark anim no (Def: set above)
sparkxy = -40, -73               ;X-offset for the "hit spark" rel. to p2,
guard.sparkno = s5570;Y-offset for the spark rel. to p1
hitsound = s50, 6                  ;Sound to play on hit
guardsound = s50, 19                ;Sound to play on guard
ground.type = High               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5             ;Time that the opponent slides back
ground.hittime  = 12             ;Time opponent is in hit state
ground.velocity = -6             ;Velocity at which opponent is pushed
airguard.velocity = -3.9,-.8     ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.type = High                  ;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -4.6,-3.3           ;X-velocity at which opponent is pushed,
;Y-velocity at which opponent is pushed
air.hittime = 12                 ;Time before opponent regains control in air
ground.cornerpush.veloff = -9
guard.cornerpush.veloff = -12.6
air.cornerpush.veloff = -12.6
envshake.time = 1
envshake.ampl = 1


[State -1, SC Ichim 1]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Ichimonji_x"
value = 1000

[State -1, SC Ichim 2]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Ichimonji_y"
value = 1005

[State -1, SC Ichim 3]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Ichimonji_z"
value = 1010



[State -1, SC Rask 1]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasen_Kyaku_a"
value = 1300

[State -1, SC Rask 2]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasen_Kyaku_b"
value = 1301

[State -1, SC Rask 3]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasen_Kyaku_c"
value = 1302

[State -1, SC Utsus L]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "utsusemi_left"
value = 1200

[State -1, SC Utsus C]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "utsusemi_center"
value = 1201

[State -1, SC Utsus R]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "utsusemi_right"
value = 1202

[State -1, SC Rasetsujin_x]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasetsujin_x"
value = 1500


[State -1, SC Rasetsujin_y]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasetsujin_y"
value = 1505

[State -1, SC Rasetsujin_z]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasetsujin_z"
value = 1510



[State 200, Link 200]
type = ChangeState
triggerall = movecontact > 0 && time = 9
trigger1 = (command = "x") && (command != "holddown")
value = 200

[State 200, Link 203]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "y") && (command != "holddown") && (command != "holdfwd")
value = 203

[State 200, Link 202]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "y") && (command = "holdfwd") && (command != "holddown")
value = 202

[State 203, Link 240]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "z") && (command != "holddown") && (command != "holdfwd")
value = 240

[State 200, Body Check]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "z") && (command = "holdfwd") && (command != "holddown")
value = 241


;[State 200, Link 205]
;type = ChangeState
;triggerall = movecontact > 0
;trigger1 = (command = "a") && (command != "holddown")
;value = 205

;[State 200, Link 215]
;type = ChangeState
;triggerall = movecontact > 0
;trigger1 = (command = "a") && (command != "holddown")
;value = 215

[State 200, Link 209]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "y") && (command = "holddown")  ;&& (command != "holdfwd")
value = 209

[State 200, Link 210]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "z") && (command = "holddown")
value = 210



;[State 200, Flash]
;type = Explod
;trigger1 = animelem = 2
;anim = 201
;pos = -1, -1
;postype = p1  ;p2,front,back,left,right
;bindtime = 1
;scale = 1,1
;facing = 1
;vfacing = 1
;scale = 1,1
;pausemove = 1

;[State 200, Flash]
;type = Explod
;trigger1 = animelem = 3
;anim = 425
;pos = -1, -1
;postype = p1  ;p2,front,back,left,right
;bindtime = 1
;scale = 1,1
;facing = 1
;vfacing = 1
;scale = 1,1
;pausemove = 1

;[State 0, RemoveExplod]
;type = RemoveExplod
;trigger1 = stateno = 1100
;id = 200
;ignorehitpause =
;persistent =


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

;---------------------------------------------------------------------------
;SLP - Slash
[Statedef 280]
type = A
movetype = A
physics = N
velset = 0,0
anim = 201
ctrl = 0
sprpriority = 3

[State 280, BindToParent]
type = BindToParent
trigger1 = 1
time = 9999
facing = 1
pos = 0,0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = parent, animelem = 4
value = 425

[State 0, DestroySelf]
type = DestroySelf
trigger1 = parent, animelem = 7 || parent, movetype = H || parent, anim != 200

;----------------------------------------------------------------------
; Standing Medium Punch
; CNS difficulty: easy
[StateDef 203]
type = S
movetype= A
physics = S
juggle  = 1
velset = .5,0
ctrl = 0
anim = 203
poweradd = 35
sprpriority = 2

;[State 203, Flash2]
;type = Explod
;trigger1 = animelem = 3
;anim = 251
;id = 203
;pos = 0, 0
;postype = p1  ;p2,front,back,left,right
;bindtime = 10
;scale = 1,1
;facing = 1
;vfacing = 1
;scale = 1,1
;removetime = -2
;removeongethit = 1
;sprpriority = 5

;[State 203, Flash2]
;type = Explod
;trigger1 = animelem = 5
;anim = 252
;id = 203
;pos = 0, 0
;postype = p1  ;p2,front,back,left,right
;bindtime = 10
;scale = 1,1
;facing = 1
;vfacing = 1
;scale = 1,1
;removetime = -2
;removeongethit = 1
;sprpriority = 5

;[State 0, RemoveExplod]
;type = RemoveExplod
;trigger1 = stateno = 1100
;id = 203
;ignorehitpause =
;persistent =


[State 203, Slide]
type = Velset
trigger1 = (Time > 0) && (time <= 10) && (PrevStateNo = 100)
x = 2.5

[State 203, Dust]
type = Explod
trigger1 = Animelem = 1 && (PrevStateNo = 100)
trigger2 = Animelem = 3 && (PrevStateNo = 100)
trigger3 = Animelem = 5 && (PrevStateNo = 100)
trigger4 = Animelem = 7 && (PrevStateNo = 100)
trigger5 = Animelem = 9 && (PrevStateNo = 100)
anim = 5556
ID = 203
pos = 0,2
postype = p1  ;p2,front,back,left,right
facing = 1
bindtime = 1
removetime = -2
scale = -1,-1
sprpriority = 7
ontop = 1
ownpal = 1
removeongethit = 0

[State 203, 1]
type = PlaySnd
trigger1 = animelem = 3
value = 250, 1

[State 203, 1]
type = HitDef
trigger1 = AnimElem = 4
attr = S, NA
damage = 24
animtype = medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 10, 12
sparkno = s985
sparkxy = -5, -67
guard.sparkno = s5570
hitsound = s50, 5
guardsound = s50, 19
ground.type = High
ground.slidetime = 8
ground.hittime  = 16
ground.velocity = -4
airguard.velocity = -2.9,-.8
air.type = High
air.velocity = -6,-3.5
air.hittime = 16
ground.cornerpush.veloff = -3.5
guard.cornerpush.veloff = -4
air.cornerpush.veloff = -12.6
envshake.time = 2
envshake.ampl = 1

[State 203, Helper]
type = Helper
trigger1 = animelem = 3
helpertype = normal ;player
name = "SMP_Slash"
ID = 281
stateno = 281
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
ownpal = 0


[State 203, 2]
type = PlaySnd
trigger1 = animelem = 2
value = 200, 6


[State 203, 1]
type = PlaySnd
trigger1 = animelem = 1
trigger2 = animelem = 7
value = 50, 0



[State -1, SC Homura 1]
type = ChangeState
triggerall = movecontact > 0 && (power >= 1000)
trigger1 = command = "Homura"
value = 1100

[State -1, SC Hyper_Bakuryu]
type = ChangeState
triggerall = movecontact > 0 && (power >= 1000)
trigger1 = command = "Hyper_Bakuryu"
value = 2058

[State -1, SC Jumonji]
type = ChangeState
triggerall = movecontact > 0 && (power >= 1000)
trigger1 = command = "Jumonji"
value = 2100


[State -1, SC Ichim 1]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Ichimonji_x"
value = 1000

[State -1, SC Ichim 2]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Ichimonji_y"
value = 1005

[State -1, SC Ichim 3]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Ichimonji_z"
value = 1010


[State -1, SC Rask 1]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasen_Kyaku_a"
value = 1300

[State -1, SC Rask 2]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasen_Kyaku_b"
value = 1301

[State -1, SC Rask 3]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasen_Kyaku_c"
value = 1302

[State -1, SC Rasetsujin_x]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasetsujin_x"
value = 1500


[State -1, SC Rasetsujin_y]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasetsujin_y"
value = 1505

[State -1, SC Rasetsujin_z]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasetsujin_z"
value = 1510



[State 203, Step Kick]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "holdfwd" && command = "holddown" && command = "c"
value = 217


[State 203, Link 202]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "y") && (command = "holdfwd")
value = 202


[State 203, Link 240]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "z") && (command != "holddown")
value = 240


[State 203, Link 220]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "c") && (command != "holddown")
value = 220


[State 203, Link 230]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "c") && (command = "holddown")
value = 230

[State 203, Link 210]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "z") && (command = "holddown")
value = 210


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

;----------------------------------------------------------------------
;SMP - Slash
[Statedef 281]
type = A
movetype = A
physics = N
velset = 0,0
anim = 251
ctrl = 0
sprpriority = 3

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
time = 9999
facing = 1
pos = 0,0
;ignorehitpause =
;persistent =

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = parent, animelem = 5
value = 252

[State 0, DestroySelf]
type = DestroySelf
trigger1 = parent, animelem = 8 || parent, movetype = H || parent, anim != 203
;ignorehitpause =
;persistent =



;---------------------------------------------------------------------------
; Standing Medium Punch - Forward
[StateDef 202]
type = S
movetype= A
physics = S
juggle  = 1
velset = 5,0 ;5,0
ctrl = 0
juggle = 2
anim = 202
poweradd = 50
sprpriority = 2

[State 200, Slide]
type = Velset
trigger1 = (Time > 0) && (time <= 10) && (PrevStateNo = 100)
x = 2.5

[State 215, Helper]
type = Helper
trigger1 = animelem = 5
helpertype = normal ;player
name = "SFMP_Slash"
ID = 282
stateno = 282
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
ownpal = 0

[State 202, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 200, 11

[State 202, 1]
type = PlaySnd
trigger1 = animelem = 1
trigger2 = animelem = 9
value = 50, 0

[State 202, 1]
type = PlaySnd
trigger1 = animelem = 4
value = 250, 0

[State 202, 1]
type = HitDef
triggerall = p2name = "Symbiote Onslaught"
trigger1 = AnimElem = 6
attr = S, NA
damage = 28
animtype = hard
guardflag = MA
hitflag = MAFP
priority = 5, Hit
pausetime = 10, 11;;sparkno = 0
sparkno = s990
sparkxy = 10, -55
guard.sparkno = s5570
hitsound = s50, 5
guardsound = s50, 19
ground.type = High
ground.slidetime = 10
ground.hittime  = 17
ground.velocity = -15, -5
airguard.velocity = -3.9,-.8
air.type = High
air.velocity = -7,-3
yaccel = .5
Forcestand = 1
air.hittime = 17
p2facing = 1        ;Force to face p1
;air.fall = 1
ground.cornerpush.veloff = -6
guard.cornerpush.veloff = -.6
air.cornerpush.veloff = -12.6
envshake.time = 4
envshake.ampl = 2


[State 202, 1]
type = HitDef
triggerall = p2name != "Symbiote Onslaught"
trigger1 = AnimElem = 6
attr = S, NA
damage = 28
animtype = hard
guardflag = MA
hitflag = MAFP
priority = 5, Hit
pausetime = 10, 11;;sparkno = 0
sparkno = s990
sparkxy = 10, -55
guard.sparkno = s5570
hitsound = s50, 5
guardsound = s50, 19
ground.type = High
ground.slidetime = 10
ground.hittime  = 17
ground.velocity = -15, -5
airguard.velocity = -3.9,-.8
air.type = High
air.velocity = -7,-3
yaccel = .5
Forcestand = 1
air.hittime = 17
p2facing = 1        ;Force to face p1
;air.fall = 1
ground.cornerpush.veloff = -6
guard.cornerpush.veloff = -.6
air.cornerpush.veloff = -12.6
envshake.time = 4
envshake.ampl = 2
p2stateno = 290



[State 202, 1]
type = PlaySnd
trigger1 = animelem = 1
value = 200, 4


[State -1, SC Homura 1]
type = ChangeState
triggerall = movecontact > 0 && (power >= 1000)
trigger1 = command = "Homura"
value = 1100

[State -1, SC Hyper_Bakuryu]
type = ChangeState
triggerall = movecontact > 0 && (power >= 1000)
trigger1 = command = "Hyper_Bakuryu"
value = 2058

[State -1, SC Jumonji]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Jumonji" && (power >= 1000)
value = 2100

[State -1, SC Utsus L]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "utsusemi_left"
value = 1200

[State -1, SC Utsus C]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "utsusemi_center"
value = 1201

[State -1, SC Utsus R]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "utsusemi_right"
value = 1202

[State -1, SC Rasetsujin_x]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasetsujin_x"
value = 1500


[State -1, SC Rasetsujin_y]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasetsujin_y"
value = 1505

[State -1, SC Rasetsujin_z]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasetsujin_z"
value = 1510


;[State 202, ScreenBound]
;type = ScreenBound
;triggerall = Pos y < -15
;trigger1 = BackEdgeBodyDist < 65
;trigger2 = FrontEdgeBodyDist < 65
;value = 1
;movecamera = 0,1

;[State 202, Hit wall]
;type = ChangeState
;triggerall = Pos y < -15
;trigger1 = BackEdgeBodyDist <= 20
;trigger2 = FrontEdgeBodyDist <= 20
;value = 1



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

;----------------------------------------------------------------------
;SFMP - Slash
[Statedef 282]
type = A
movetype = A
physics = N
velset = 0,0
anim = 311
ctrl = 0
sprpriority = 3

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
time = 9999
facing = 1
pos = 0,0
;ignorehitpause =
;persistent =

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = parent, animelem = 7
value = 312

[State 0, DestroySelf]
type = DestroySelf
trigger1 = parent, animelem = 9 || parent, movetype = H || parent, anim != 202
;ignorehitpause =
;persistent =


;---------------------------------------------------------------------------
; Slam FX
; CNS difficulty: easy
[StateDef 204]
type = S
movetype = I
physics = S
velset = 0,0
ctrl = 0
anim = 5562
sprpriority = 0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 0, PosSet]
type = PosSet
trigger1 = time = 0
y = 0
;ignorehitpause =
;persistent =



[State 204, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0
;ignorehitpause =
;persistent =



;---------------------------------------------------------------------------
; Stand Hard Punch Far
[StateDef 225]
type = S
movetype = A
physics = S
juggle  = 2
velset = 0,0
ctrl = 0
anim = 225
poweradd = 25
sprpriority = 2

[State 225, 1]
type = HitDef
trigger1 = time = 0
attr = S, NA
damage = 21
animtype = hard
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9, 11
sparkno = s995
guard.sparkno = s5570
sparkxy = -5, -65
hitsound   = s50,4;s50,5
guardsound = s50,15
ground.type = High
ground.slidetime = 8
ground.hittime  = 18
ground.velocity = -8
airguard.velocity = -2.5,-.8
air.type = High
air.velocity = -4.5,-3
air.hittime = 18
ground.cornerpush.veloff = -9
guard.cornerpush.veloff = -9.6
envshake.time = 6
envshake.ampl = 4


[State 225, Width]
type = Width
trigger1 = time = 0
value = 7,0
;ignorehitpause =
;persistent =


[State 225, Yell]
type = PlaySnd
trigger1 = animelem = 6
value = 200, 10


[State -1, SC CORE]
type = ChangeState
triggerall = movecontact > 0 && (power >= 3000)
trigger1 = command = "CORE"
value = 6000


[State -1, SC Homura 1]
type = ChangeState
triggerall = movecontact > 0 && (power >= 1000)
trigger1 = command = "Homura"
value = 1100

[State -1, SC Homura 1]
type = ChangeState
triggerall = movecontact > 0 && (power >= 1000)
trigger1 = command = "Hyper_Bakuryu"
value = 2058

[State -1, SC Jumonji]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Jumonji" && (power >= 1000)
value = 2100


[State -1, SC Kage 1]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Kagero_a"
value = 1400

[State -1, SC Kage 2]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Kagero_b"
value = 1425

[State -1, SC Kage 3]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Kagero_c"
value = 1440


[State -1, SC Rasetsujin_x]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasetsujin_x"
value = 1500


[State -1, SC Rasetsujin_y]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasetsujin_y"
value = 1505

[State -1, SC Rasetsujin_z]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasetsujin_z"
value = 1510


[State 225, Chain]
type = PlaySnd
trigger1 = animelem = 6
value = 300, 0

[State 225, 2]
type = ChangeState
value = 226
triggerall = time >= 27 && time < 38  && movecontact > 0
trigger1 = command = "z"

[State 225, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0    ;226
ctrl = 1

;---------------------------------------------------------------------------
; Stand Hard Punch Far - 2nd
; CNS difficulty: easy
[StateDef 226]
type = S
movetype= A
physics = S
juggle  = 5
velset = 2.7,0
ctrl = 0
anim = 226
poweradd = 25
sprpriority = 2

[State 226, 1]
type = HitDef
trigger1 = time = 0
attr = S, NA
damage = 21
animtype = hard
guardflag = MA
hitflag = MAFP
priority = 4, Hit
pausetime = 8, 11
sparkno = s960
guard.sparkno = s5570
sparkxy = -5, -65
hitsound = 275, 3
guardsound = 150, 0
ground.type = High
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -11, -5
airguard.velocity = -2.9,-.8
air.type = High
air.velocity = -12,-5
air.hittime = 20
;Fall = 1
ground.cornerpush.veloff = -6
guard.cornerpush.veloff = -6.6
envshake.time = 5
envshake.ampl = 3


[State 226, 1]
type = PlaySnd
trigger1 = animelem = 4
value = 300, 0



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

;---------------------------------------------------------------------------
; Standing Hard Punch - Close
[StateDef 240]
type = S
movetype= A
physics = S
juggle  = 2
velset = 0,0
ctrl = 0
anim = 240
poweradd = 30
sprpriority = 2

[State 240, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = 250,2


[State 240, Slide]
type = Velset
trigger1 = (Time > 0) && (time <= 10) && (PrevStateNo = 100)
x = 2.5

[State 240, Dust]
type = Explod
trigger1 = Animelem = 1 && (PrevStateNo = 100)
trigger2 = Animelem = 3 && (PrevStateNo = 100)
trigger3 = Animelem = 5 && (PrevStateNo = 100)
trigger4 = Animelem = 7 && (PrevStateNo = 100)
anim = 5556
ID = 240
pos = 0,2
postype = p1  ;p2,front,back,left,right
facing = 1
bindtime = 1
removetime = -2
scale = -1,-1
sprpriority = 7
ontop = 1
ownpal = 1
removeongethit = 0


[State 240, Advance]
type = VelSet
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
x = 11


[State 240, Stop]
type = VelSet
trigger1 = animelem = 4
x = 0


[State 240, 1]
type = HitDef
trigger1 = AnimElem = 4
attr = S, NA
damage = 32
animtype = hard
guardflag = MA
hitflag = MAF
priority = 3, Hit
hitsound = s50, 5 ;s275,1
guardsound = s50, 19;s150,0
pausetime = 9, 12
sparkno = s990;s960
guard.sparkno = s5570
sparkxy = -10, -55
ground.type = High
ground.slidetime = 12
ground.hittime  = 20
ground.velocity = -7
airguard.velocity = -2.9,-.8
air.type = High
air.velocity = -4.9,-3.5
air.hittime = 20
ground.cornerpush.veloff = -4
guard.cornerpush.veloff = -6.6
air.cornerpush.veloff = -7.6
envshake.time = 5
envshake.ampl = 4


;[State 240, EnvShake]
;type = EnvShake
;trigger1 = animelem =4
;time = 3
;freq = 45
;ampl = -15
;phase = 100

[State 240, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 200, 9


[State -1, SC Homura 1]
type = ChangeState
triggerall = movecontact > 0 && (power >= 1000)
trigger1 = command = "Homura"
value = 1100

[State -1, SC Jumonji]
type = ChangeState
triggerall = movecontact > 0 && (power >= 1000)
trigger1 = command = "Jumonji"
value = 2100

[State -1, SC Ichim 1]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Ichimonji_x"
value = 1000

[State -1, SC Ichim 2]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Ichimonji_y"
value = 1005

[State -1, SC Ichim 3]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Ichimonji_z"
value = 1010



[State -1, SC Rask 1]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasen_Kyaku_a"
value = 1300

[State -1, SC Rask 2]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasen_Kyaku_b"
value = 1301

[State -1, SC Rask 3]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasen_Kyaku_c"
value = 1302

[State -1, SC Utsus L]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "utsusemi_left"
value = 1200

[State -1, SC Utsus C]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "utsusemi_center"
value = 1201

[State -1, SC Utsus R]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "utsusemi_right"
value = 1202

[State -1, SC Rasetsujin_x]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasetsujin_x"
value = 1500


[State -1, SC Rasetsujin_y]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasetsujin_y"
value = 1505

[State -1, SC Rasetsujin_z]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasetsujin_z"
value = 1510


[State -1, Body Check]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "z") && (command = "holdfwd")
value = 241

[State -1, Step Kick]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "holdfwd" && command = "holddown" && command = "c"
value = 217

[State 240, Link 220]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "c") && (command != "holddown")
value = 220

[State 240, Link 230]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "c") && (command = "holddown")
value = 230

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

;------------------------------------------------------------------------
; Body Check
[StateDef 241]
type = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
ctrl = 0
anim = 241
poweradd = 40
sprpriority = 2

[State 241, Advance]
type = VelSet
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
x = 10


[State 241, Stop]
type = VelSet
trigger1 = animelem = 4
x = 0



[State 241, 1]
type = HitDef
trigger1 = AnimElem = 4
attr = S, NA
damage = 35
animtype = hard
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9, 11
sparkno = s960
guard.sparkno = s5570
sparkxy = -5, -50
hitsound = s275, 0
guardsound = s150,0
ground.type = low
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -14, -5
Fall = 1
airguard.velocity = -4.9,-.9
air.type = High
air.velocity = -14,-5
air.hittime = 20
air.fall = 1
fall.recover = 1
ground.cornerpush.veloff = -5
guard.cornerpush.veloff = -6.6
air.cornerpush.veloff = -12.6
envshake.time = 6
envshake.ampl = 5



[State 241, EnvShake]
type = EnvShake
trigger1 = animelem =4
time = 6
freq = 45
ampl = -20
phase = 100


[State 241, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 200, 10


[State -1, SC Utsus L]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "utsusemi_left"
value = 1200

[State -1, SC Utsus C]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "utsusemi_center"
value = 1201

[State -1, SC Utsus R]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "utsusemi_right"
value = 1202



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


;---------------------------------------------------------------------------
;Standing Light Kick
; CNS difficulty: easy
[Statedef 205]
type    = S
movetype= A
physics = S
juggle  = 1
poweradd= 22
ctrl = 0
velset = 0,0
anim = 205
sprpriority = 2

[State 205, Slide]
type = Velset
trigger1 = (Time > 0) && (time <= 10) && (PrevStateNo = 100)
x = 2.5

[State 205, Dust]
type = Explod
trigger1 = Animelem = 1 && (PrevStateNo = 100)
trigger2 = Animelem = 3 && (PrevStateNo = 100)
trigger3 = Animelem = 5 && (PrevStateNo = 100)
trigger4 = Animelem = 7 && (PrevStateNo = 100)
anim = 5556
ID = 205
pos = 0,2
postype = p1  ;p2,front,back,left,right
facing = 1
bindtime = 1
removetime = -2
scale = -1,-1
sprpriority = 7
ontop = 1
ownpal = 1
removeongethit = 0

[State 205, 1]
type = PlaySnd
trigger1 = Time = 2
value = 200, 3


[State 205, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Light
damage    = 18
guardflag = MA
pausetime = 5,8
sparkno = s951
guard.sparkno = s5570
sparkxy = -5,-37
hitsound   = s275,5
guardsound = s150,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 11
ground.velocity = -4
air.velocity = -1.5,-3
ground.cornerpush.veloff = -4
guard.cornerpush.veloff = -6.6
air.cornerpush.veloff = -12.6
air.hittime = 11


[State -1, SC Ichim 1]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Ichimonji_x"
value = 1000

[State -1, SC Ichim 2]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Ichimonji_y"
value = 1005

[State -1, SC Ichim 3]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Ichimonji_z"
value = 1010


[State -1, SC Rask 1]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasen_Kyaku_a"
value = 1300

[State -1, SC Rask 2]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasen_Kyaku_b"
value = 1301

[State -1, SC Rask 3]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasen_Kyaku_c"
value = 1302

[State -1, SC Rasetsujin_x]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasetsujin_x"
value = 1500


[State -1, SC Rasetsujin_y]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasetsujin_y"
value = 1505

[State -1, SC Rasetsujin_z]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasetsujin_z"
value = 1510


[State 205, Link 203]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "y") && (command != "holddown") && (command != "holdfwd")
value = 203


[State 205, Link 206]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "b") && (command != "holddown")
value = 206

[State 205, Link 216]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "b") && (command = "holddown")
value = 216

[State 205, Link 209]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "y") && (command = "holddown")  && (command != "holdfwd")
value = 209

[State 205, Link 220]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "c") && (command != "holddown")
value = 220


[State 205, Link 230]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "c") && (command = "holddown")
value = 230



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

;---------------------------------------------------------------------------
; Standing medium kick
; CNS difficulty: easy
[Statedef 206]
type    = S
movetype= A
physics = S
juggle  = 2
poweradd= 36
ctrl = 0
velset = 0,0
anim = 206
sprpriority = 2

[State 206, Slide]
type = Velset
trigger1 = (Time > 0) && (time <= 10) && (PrevStateNo = 100)
x = 2.5

[State 206, Dust]
type = Explod
trigger1 = Animelem = 1 && (PrevStateNo = 100)
trigger2 = Animelem = 3 && (PrevStateNo = 100)
trigger3 = Animelem = 5 && (PrevStateNo = 100)
anim = 5556
ID = 206
pos = 0,2
postype = p1  ;p2,front,back,left,right
facing = 1
bindtime = 1
removetime = -2
scale = -1,-1
sprpriority = 7
ontop = 1
ownpal = 1
removeongethit = 0


[State 206, 1]
type = PlaySnd
trigger1 = Time = 1
value = 200, 12


[State 206, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = medium
damage    = 23
guardflag = MA
hitflag = MAF
pausetime = 9,11
sparkno = s955
guard.sparkno = s5570
sparkxy = -5,-70
hitsound   = s275,4
guardsound = s150,0
ground.type = high
ground.slidetime = 13
ground.hittime  = 15
ground.velocity = -4.9
air.velocity = -4,-6.9
ground.cornerpush.veloff = -4
guard.cornerpush.veloff = -6.6
air.cornerpush.veloff = -12.6
envshake.time = 3
envshake.ampl = 2
air.hittime = 15

[State -1, SC Homura 1]
type = ChangeState
triggerall = movecontact > 0 && (power >= 1000)
trigger1 = command = "Homura"
value = 1100

[State -1, SC Hyper_Bakuryu]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Hyper_Bakuryu" && (power >= 1000)
value = 2058

[State -1, SC Jumonji]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Jumonji" && (power >= 1000)
value = 2100

[State -1, SC Ichim 1]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Ichimonji_x"
value = 1000

[State -1, SC Ichim 2]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Ichimonji_y"
value = 1005

[State -1, SC Ichim 3]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Ichimonji_z"
value = 1010


[State -1, SC Rask 1]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasen_Kyaku_a"
value = 1300

[State -1, SC Rask 2]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasen_Kyaku_b"
value = 1301

[State -1, SC Rask 3]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasen_Kyaku_c"
value = 1302

[State -1, SC Rasetsujin_x]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasetsujin_x"
value = 1500


[State -1, SC Rasetsujin_y]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasetsujin_y"
value = 1505

[State -1, SC Rasetsujin_z]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasetsujin_z"
value = 1510


[State 206, Step Kick]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "holdfwd" && command = "holddown" && command = "c"
value = 217

[State 206, Link 240]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "z") && (command != "holddown")
value = 240

[State 206, Link 210]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "z") && (command = "holddown")
value = 210

[State 206, Link 220]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "c") && (command != "holddown")
value = 220


[State 206, Link 230]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "c") && (command = "holddown")
value = 230

[State 206, Spin Kick]
type = ChangeState
value = 211
triggerall = movecontact > 0
trigger1 = command = "b"


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

;---------------------------------------------------------------------------
; Jumping Spin Kick - Startup
[Statedef 211]
type    = S
movetype= A
physics = S
juggle  = 0
poweradd= 44
velset = 0,0
anim = 211
ctrl = 0
sprpriority = 2


[State 211, 1]
type = PlaySnd
trigger1 = animelem = 1
value = 200, 13


[State 211, 2]
type = null;PosAdd
trigger1 = AnimElem = 1
x = 15

[State 211, 3]
type = PosAdd
trigger1 = AnimElem = 1
x = 20


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

;------------------
;Jumping Spin Kick
[Statedef 212]
type    = A
movetype= A
physics = N
velset = 1.6,-4 ; 2,-6
anim = 212
;hitdefpersist = 1 ;Keep the HitDef from previous state active
juggle = 2

[State 212, 1] ;Gravity
type = VelAdd
trigger1 = 1
y = .44

[State 212, 2]
type = HitDef
trigger1 = Time = 0
attr = A, SA
animtype = up
air.animtype = up
damage    = 25
priority  = 5
guardflag = MA
pausetime = 10,11
sparkxy = -5,-80
sparkno = s955
guard.sparkno = s5570
hitsound   = s275,0
guardsound = s150,0
ground.type = high
ground.slidetime = 20
ground.hittime  = 30
ground.velocity = ceil(-0.2),ceil(-12.5) ; -3.5,-7
guard.velocity = -7
air.velocity = -ceil(0.2),-11;-4.5,-10
p2facing = 1
forcestand = 1
;yaccel = .5            ;p2 will accelerate down at .4 pixels/sec^2 when falling
ground.cornerpush.veloff = -4
guard.cornerpush.veloff = -6.6
air.cornerpush.veloff = -12.6
airguard.velocity = -7, -4
envshake.time = 6
envshake.ampl = 4
air.hittime = 30


[State 212, Width]
type = Width
trigger1 = p2dist x <= 30
value = 10,0


[State 213, Launch FX]
type = Explod
trigger1 = movehit
anim = 5552
ID = 213
removetime = -2
persistent = 0
pos = ceil(p2bodydist x)+0,-60
postype = p1
sprpriority = 2
;facing = -1
ownpal = 1
bindtime = 1
supermovetime = 0
ontop = 1
ignorehitpause = 1
scale = 2.20, 0.64
trans = add


[State 213, Launch FX]
type = Explod
trigger1 = movehit
anim = 5553
removetime = -2
persistent = 0
pos = ceil(p2bodydist x)+0,-60
postype = p1
sprpriority = 2
;facing = -1
ownpal = 1
bindtime = 1
;supermove = 1
supermovetime = 0
ontop = 1
ignorehitpause = 1
scale = 2.20, 0.64
trans = add


[State 213, Chase Jump]
type = ChangeState
value = 7000
triggerall = movehit && (Time <= 20)&& enemynear, movetype = H
trigger1 = command = "holdup" && command = "holdfwd" || command = "holdup" && command = "holdback" || Command = "holdup"


[State 212, 3] ;Change state when KFM is close to ground
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= -10
value = 213
ctrl = 0

;------------------------------------------------
;Jumping Spin Kick (Landing)
[Statedef 213]
type    = S
movetype= I
physics = S
anim = 213
sprpriority = 1
velset = 0,0

[State 213, 1] ;Reset y-position to ground level
type = PosSet
trigger1 = Time = 0
y = 0

[State 213, 3] ;Give KFM back control early
type = CtrlSet
trigger1 = AnimElem = 4, -1
value = 1

[State 213, 4] ;Move KFM back a little
type = PosAdd
trigger1 = AnimElem = 12
x = -15

[State 213, Landing FX]
type = Explod
trigger1 = animelem = 1
anim = 5562
ID = 213
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 0
ontop = 0
ownpal = 1
removeongethit = 1
;ignorehitpause =
;persistent =

[State 213, Landing]
type = PlaySnd
trigger1 = animelem = 1
value = 10,0

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


;---------------------------------------------------------------------------
;Standing Gun (Prepare)
;CNS difficulty: easy
[Statedef 220]
type    = S
movetype= A
physics = S
poweradd= 10
ctrl = 0
velset = 0,0
anim = 220
sprpriority = 2


[State 220, Slide]
type = Velset
trigger1 = (Time > 0) && (time <= 10) && (PrevStateNo = 100)
x = 2.5

[State 220, Dust]
type = Explod
trigger1 = Animelem = 1 && (PrevStateNo = 100)
trigger2 = Animelem = 3 && (PrevStateNo = 100)
trigger3 = Animelem = 5 && (PrevStateNo = 100)
trigger4 = Animelem = 7 && (PrevStateNo = 100)
trigger5 = Animelem = 9 && (PrevStateNo = 100)
trigger6 = Animelem = 11 && (PrevStateNo = 100)
anim = 5556
ID = 220
pos = 0,2
postype = p1  ;p2,front,back,left,right
facing = 1
bindtime = 1
removetime = -2
scale = -1,-1
sprpriority = 7
ontop = 1
ownpal = 1
removeongethit = 0

[State 220, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 221


;---------------------------------------------------------------------------
; Standing Gun (Fired) 
; CNS difficulty: easy 
[Statedef 221]
type = S 
movetype= A 
physics = S 
juggle = 4 
poweradd= 50
ctrl = 0 
velset = -6,0
anim = 221
sprpriority = 2 

[State 221, 1]
type = PlaySnd 
trigger1 = Animelem = 1
value = 600, 1

[State 221, Projectile]
type = Projectile
trigger1 = animelem = 1
ProjID = 221
projanim = 229
projhitanim = 229
projcancelanim = 229
projscale = 1,1
projremove = 1
projremovetime = 9
velocity = 0,0
projhits = 1
projpriority = 4
projsprpriority =1
offset = 42,-48
postype = p1         ;p2,front,back,left,right
attr = S,SP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAFP        ;HLAFD+-
guardflag = MA         ;HLA
animtype = back          ;light,medium,hard,back,up,diagup
air.animtype = back
priority = 5,Hit   ;Hit,Miss,Dodge
damage = 40, 10
pausetime = 11,13
sparkxy = 45,0
sparkno = s970
guard.sparkno = s5570
hitsound =s50,7
guardsound = 6,0
ground.type = high
ground.slidetime = 10
ground.hittime = 22
ground.velocity = -15, -5
air.velocity = -15,-4
air.hittime = 22
fall = 1
air.fall =1
fall.recover = 1             ;Prevent p2 from recovering
down.bounce = 1
down.bounce.velocity = -4, -40;-4, -32
ground.cornerpush.veloff = -4
guard.cornerpush.veloff = -6.6
air.cornerpush.veloff = -12.6
palfx.time = 40
palfx.add = 40,-70, -200
palfx.mul = 256,256,256
palfx.sinadd = 40,30,0
Palfx.color = 0
palfx.invertall = 1


[State 221, EnvShake]
type = EnvShake
trigger1 = animelem =1
time = 5
freq = 60
ampl = -15
phase = 150
;ignorehitpause =
;persistent =

[State 221, ScreenBound]
type = ScreenBound
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist < 65
trigger2 = FrontEdgeBodyDist < 65
value = 1
movecamera = 0,1

[State 221, Explod]
type = Explod
trigger1 = animelem= 1
anim = 223
ID = 221
pos = 42,-48
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 10
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove
pausemove
scale = 1,1
sprpriority = 4
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
;ignorehitpause =
;persistent =

[State 221, ScreenBound]
type = ScreenBound
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist < 65
trigger2 = FrontEdgeBodyDist < 65
value = 1
movecamera = 0,1


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


;---------------------------------------------------------------------------
;Crouching light punch
[Statedef 208]
type    = C
movetype= A
physics = C
juggle  = 1
poweradd= 20
ctrl = 0
anim = 208
sprpriority = 2

[State 208, 1]
type = PlaySnd
trigger1 = Time = 1
value = 800, 1


[State 208, 2]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 18
priority  = 3
animtype  = Light
hitflag = MAF
guardflag = MA
pausetime = 4,8
sparkno = s951
guard.sparkno = s5570
sparkxy = -10,-42
hitsound   = s275,5
guardsound = s150,0
ground.type = Low
ground.slidetime = 4
ground.hittime  = 12
ground.velocity = -4
air.velocity = -1.5,-3
ground.cornerpush.veloff = -6
guard.cornerpush.veloff = -6.6
air.cornerpush.veloff = -12.6
air.hittime = 12

[State -1, SC Ichim 1]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Ichimonji_x"
value = 1000

[State -1, SC Ichim 2]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Ichimonji_y"
value = 1005

[State -1, SC Ichim 3]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Ichimonji_z"
value = 1010



[State -1, SC Rask 1]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasen_Kyaku_a"
value = 1300

[State -1, SC Rask 2]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasen_Kyaku_b"
value = 1301

[State -1, SC Rask 3]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasen_Kyaku_c"
value = 1302

[State -1, SC Utsus L]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "utsusemi_left"
value = 1200

[State -1, SC Utsus C]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "utsusemi_center"
value = 1201

[State -1, SC Utsus R]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "utsusemi_right"
value = 1202

[State -1, SC Rasetsujin_x]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasetsujin_x"
value = 1500

[State -1, SC Rasetsujin_y]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasetsujin_y"
value = 1505

[State -1, SC Rasetsujin_z]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasetsujin_z"
value = 1510


[State 208, Body Check]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "z") && (command = "holdfwd")
value = 241


[State 208, Link 208]
type = ChangeState
triggerall = movecontact > 0 && time = 7
trigger1 = (command = "x") && (command = "holddown")
value = 208

[State 208, Link 203]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "y") && (command != "holddown") && (command != "holdfwd")
value = 203


[State 208, Link 240]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "z") && (command != "holddown") && (command != "holdfwd")
value = 240


;[State 208, Link 205]
;type = ChangeState
;triggerall = movecontact > 0
;trigger1 = (command = "a") && (command != "holddown")
;value = 205


;[State 208, Link 215]
;type = ChangeState
;triggerall = movecontact > 0
;trigger1 = (command = "a") && (command = "holddown")
;value = 215


[State 208, Link 209]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "y") && (command = "holddown")
value = 209

[State 208, Combo 210]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "z") && (command = "holddown")
value = 210

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

;---------------------------------------------------------------------------
;Crouching Medium punch
[Statedef 209]
type    = C
movetype= A
physics = C
juggle  = 2
poweradd= 35
juggle = 2
ctrl = 0
anim = 209
sprpriority = 2

;[State 209, Flash]
;type = Explod
;trigger1 = animelem = 3
;id = 209
;anim = 421
;pos = 0, 0
;postype = p1  ;p2,front,back,left,right
;bindtime = 10
;scale = 1,1
;ignorehitpause = 0
;removetime = -2
;removeongethit = 1
;sprpriority = 7

;[State 209, Flash]
;type = Explod
;trigger1 = animelem = 4
;id = 209
;anim = 422
;pos = 0, 0
;postype = p1  ;p2,front,back,left,right
;bindtime = 10
;scale = 1,1
;ignorehitpause = 0
;removetime = -2
;removeongethit = 1
;sprpriority = 7


;[State 209, Flash]
;type = Explod
;trigger1 = animelem = 5
;id = 209
;anim = 423
;pos = 0, 0
;postype = p1  ;p2,front,back,left,right
;bindtime = 10
;scale = 1,1
;ignorehitpause = 0
;removetime = -2
;removeongethit = 1
;sprpriority = 7

[State 200, Helper]
type = Helper
trigger1 = animelem = 3
helpertype = normal ;player
name = "CMP_Slash"
ID = 283
stateno = 283
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
ownpal = 0
ignorehitpause = 0


;[State 0, RemoveExplod]
;type = RemoveExplod
;trigger1 = stateno = 1100
;id = 209
;ignorehitpause =
;persistent =



[State 209, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 250, 1


[State 209, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = C, NA
damage    = 17
animtype  = Medium
hitflag = MAF
guardflag = MA
pausetime = 5,7
sparkno = s981
guard.sparkno = s5570
sparkxy = -5,-8
hitsound = s50, 5
guardsound = s50, 19
ground.type = Low
ground.slidetime = 10
ground.hittime  = 16
ground.velocity = -4
air.velocity = -3,-4
ground.cornerpush.veloff = -4
guard.cornerpush.veloff = -6.6
air.cornerpush.veloff = -12.6
envshake.time = 3
envshake.ampl = 2
air.hittime = 16


[State 209, 3]
type = HitDef
trigger1 = AnimElem = 5
attr = C, NA
damage    = 17
animtype  = Medium
hitflag = MAF
guardflag = MA
pausetime = 5,8
sparkno = s985
guard.sparkno = s5570
sparkxy = -5,-85
hitsound = s50, 5
guardsound = s50, 19
ground.type = High
ground.slidetime = 10
ground.hittime  = 16
ground.velocity = -7
air.velocity = -3,-4
envshake.time = 3
envshake.ampl = 2
air.hittime = 16

[State -1, SC Homura 1]
type = ChangeState
triggerall = movecontact > 0 && (power >= 1000)
trigger1 = command = "Homura"
value = 1100

[State -1, SC Hyper_Bakuryu]
type = ChangeState
triggerall = movecontact > 0 && (power >= 1000)
trigger1 = command = "Hyper_Bakuryu"
value = 2058

[State -1, SC Jumonji]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Jumonji" && (power >= 1000)
value = 2100

[State -1, SC Ichim 1]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Ichimonji_x"
value = 1000

[State -1, SC Ichim 2]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Ichimonji_y"
value = 1005

[State -1, SC Ichim 3]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Ichimonji_z"
value = 1010


[State -1, SC Rask 1]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasen_Kyaku_a"
value = 1300

[State -1, SC Rask 2]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasen_Kyaku_b"
value = 1301

[State -1, SC Rask 3]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasen_Kyaku_c"
value = 1302

[State -1, SC Rasetsujin_x]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasetsujin_x"
value = 1500


[State -1, SC Rasetsujin_y]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasetsujin_y"
value = 1505

[State -1, SC Rasetsujin_z]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasetsujin_z"
value = 1510



[State 209, Link 202]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "y") && (command = "holdfwd") && (command != "holddown")
Trigger2 = animelem = 3 && animelem = 5
value = 202

[State 209, Link 225]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "z") && (command = "holdfwd") && (command != "holddown")
Trigger2 = animelem = 3 && animelem = 5
value = 225

[State 209, Link 240]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "z") && (command != "holdfwd") && (command != "holddown")
Trigger2 = animelem = 3 && animelem = 5
value = 240



[State -1, Step Kick]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "holdfwd" && command = "holddown" && command = "c"
Trigger2 = animelem = 3 && animelem = 5
value = 217

[State 209, Link 220]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "c") && (command != "holddown")
Trigger2 = animelem = 3 && animelem = 5
value = 220

[State 206, Link 230]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "c") && (command = "holddown")
Trigger2 = animelem = 3 && animelem = 5
value = 230


[State 209, Combo 210]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "z") && (command = "holddown")
Trigger2 = animelem = 3 && animelem = 5
value = 210


[State 209, 1]
type = PlaySnd
trigger1 = animelem = 3
value = 200, 6

[State 209, 1]
type = PlaySnd
trigger1 = animelem = 1
trigger2 = animelem = 8
value = 50, 0



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

;----------------------------------------------------------------------
;CMP - Slash
[Statedef 283]
type = A
movetype = A
physics = N
velset = 0,0
anim = 421
ctrl = 0
sprpriority = 3

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
time = 9999
facing = 1
pos = 0,0
;ignorehitpause =
;persistent =

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = parent, animelem = 4
value = 422

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = parent, animelem = 5
value = 423


[State 0, DestroySelf]
type = DestroySelf
trigger1 = parent, animelem = 7 || parent, movetype = H || parent, anim != 209
;ignorehitpause =
;persistent =


;---------------------------------------------------------------------------
;Crouching hard punch
[Statedef 210]
type    = C
movetype= A
physics = C
juggle  = 3
poweradd= 58
juggle = 3
ctrl = 0
anim = 210
sprpriority = 2


[State 210, 2]
type = HitDef
Triggerall = enemynear, statetype != L
trigger1 = Time = 0
attr = C, NA
damage    = 32
priority  = 3
animtype  = hard
hitflag = MAF
guardflag = L
pausetime = 10,12
sparkno = s995;s960
guard.sparkno = s5570
sparkxy = -5,-10
hitsound   = s50,4;s50,5
guardsound = s50,15
ground.type = Low
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -8
air.velocity = -4.5,-3
ground.cornerpush.veloff = -9
guard.cornerpush.veloff = -9.6
envshake.time = 6
envshake.ampl = 4
air.hittime = 20


[State 210, 2]
type = HitDef
Triggerall = enemynear, statetype = L && enemynear, stateno != 5120
trigger1 = Time = 0
attr = C, NA
damage    = 32
priority  = 3
animtype  = hard
hitflag = MAFD
guardflag = L
pausetime = 10,12
sparkno = s995;s960
guard.sparkno = s5570
sparkxy = -5,-10
hitsound   = s50,4;s50,5
guardsound = s50,15
ground.type = Low
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -8
air.velocity = -4.5,-3
ground.cornerpush.veloff = -9
guard.cornerpush.veloff = -9.6
envshake.time = 6
envshake.ampl = 4
air.hittime = 20
p2stateno = 431
p2facing = 1

[State 210, Width]
type = Width
trigger1 = movecontact = 1
value = 7,0

[State 210, Yell]
type = PlaySnd
trigger1 = Time = 4
value = 200, 10


[State 210, 1]
type = PlaySnd
trigger1 = Time = 4
value = 300, 0

[State -1, SC CORE]
type = ChangeState
triggerall = movecontact > 0 && (power >= 3000)
trigger1 = command = "CORE"
value = 6000


[State -1, SC Homura 1]
type = ChangeState
triggerall = movecontact > 0 && (power >= 1000)
trigger1 = command = "Homura"
value = 1100

[State -1, SC Homura 1]
type = ChangeState
triggerall = movecontact > 0 && (power >= 1000)
trigger1 = command = "Hyper_Bakuryu"
value = 2058

[State -1, SC Jumonji]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Jumonji" && (power >= 1000)
value = 2100


[State -1, SC Kage 1]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Kagero_a"
value = 1400

[State -1, SC Kage 2]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Kagero_b"
value = 1425

[State -1, SC Kage 3]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Kagero_c"
value = 1440

[State -1, SC Rasetsujin_x]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasetsujin_x"
value = 1500


[State -1, SC Rasetsujin_y]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasetsujin_y"
value = 1505

[State -1, SC Rasetsujin_z]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasetsujin_z"
value = 1510



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

;---------------------------------------------------------------------------
; OTG - Opponent Knocked up #1
[Statedef 431]
type    = A
movetype= H
physics = N
velset = -2, -7

[State 821, 1] ;Gravity
type = VelAdd
Trigger1 = 1
y = .35


[State 431, 1]
type = Changeanim
Trigger1 = time = 0
value = 5050



[State 0, ChangeState]
type = ChangeState
trigger1 = time > 5 && pos Y >= 0
value = 5110
ctrl = 1
;anim =
;ignorehitpause =
;persistent =


;---------------------------------------------------------------------------
; OTG - Opponent Knocked up #2
[Statedef 432]
type    = A
movetype= H
physics = N
velset = -2.5, -3.5


[State 821, 1] ;Gravity
type = VelAdd
Trigger1 = 1
y = .35


[State 431, 1]
type = Changeanim
Trigger1 = time = 0
value = 5050



[State 0, ChangeState]
type = ChangeState
trigger1 = time > 5 && pos Y >= 0
value = 5110
ctrl = 1
;anim =
;ignorehitpause =
;persistent =


;---------------------------------------------------------------------------
; OTG - Opponent Knocked up #3
[Statedef 433]
type    = A
movetype= H
physics = N
velset = -2.5, -5

[State 821, 1] ;Gravity
type = VelAdd
Trigger1 = 1
y = .35


[State 431, 1]
type = Changeanim
Trigger1 = time = 0
value = 5050



[State 0, ChangeState]
type = ChangeState
trigger1 = time > 5 && pos Y >= 0
value = 5110
ctrl = 1
;anim =
;ignorehitpause =
;persistent =



;---------------------------------------------------------------------------
;Crouching light kick
[Statedef 215]
type    = C
movetype= A
physics = C
juggle  = 1
poweradd= 22
ctrl = 0
anim = 215
sprpriority = 2

[State 215, 1]
type = PlaySnd
trigger1 = Time = 1
value = 200, 3


[State 215, 2]
type = HitDef
triggerall = enemynear, statetype != L
trigger1 = Time = 0
attr = C, NA
damage    = 18
animtype  = Light
hitflag = MAF
guardflag = L
pausetime = 11,11
sparkno = s951
guard.sparkno = s5570
sparkxy = -10,-6
hitsound   = s275,5
guardsound = s150,0
ground.type = Low
ground.slidetime = 6
ground.hittime  = 11
ground.velocity = -6
air.velocity = -2,-3
down.velocity = -5,0
down.hittime = 20
ground.cornerpush.veloff = -4
guard.cornerpush.veloff = -6.6
air.hittime = 11



[State 215, 2]
type = HitDef
triggerall = enemynear, statetype = L && enemynear, stateno != 5120
trigger1 = Time = 0
attr = C, NA
damage    = 18
animtype  = Light
hitflag = MAFD
guardflag = L
pausetime = 11,11
sparkno = s951
guard.sparkno = s5570
sparkxy = -10,-6
hitsound   = s275,5
guardsound = s150,0
ground.type = Low
ground.slidetime = 6
ground.hittime  = 11
ground.velocity = -6
air.velocity = -2,-3
down.velocity = -5,0
down.hittime = 20
ground.cornerpush.veloff = -4
guard.cornerpush.veloff = -6.6
air.hittime = 11
p2stateno = 432
p2facing = 1


[State -1, SC Ichim 1]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Ichimonji_x"
value = 1000

[State -1, SC Ichim 2]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Ichimonji_y"
value = 1005

[State -1, SC Ichim 3]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Ichimonji_z"
value = 1010



[State -1, SC Rask 1]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasen_Kyaku_a"
value = 1300

[State -1, SC Rask 2]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasen_Kyaku_b"
value = 1301

[State -1, SC Rask 3]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasen_Kyaku_c"
value = 1302

[State -1, SC Utsus L]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "utsusemi_left"
value = 1200

[State -1, SC Utsus C]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "utsusemi_center"
value = 1201

[State -1, SC Utsus R]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "utsusemi_right"
value = 1202


[State 215, Link 209]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "y") && (command = "holddown")  && (command != "holdfwd")
value = 209

[State 215, Link 203]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "y") && (command != "holddown") && (command != "holdfwd")
value = 203


[State 215, Link 206]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "b") && (command != "holddown")
value = 206

[State 215, Link 216]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "b") && (command = "holddown")
value = 216


[State 215, Link 220]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "c") && (command != "holddown")
value = 220


[State 215, Link 230]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "c") && (command = "holddown")
value = 230


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

;---------------------------------------------------------------------------
;Crouching Medium kick
; CNS difficulty: easy
[Statedef 216]
type    = C
movetype= A
physics = C
juggle  = 2
poweradd = 40
ctrl = 0
anim = 216
sprpriority = 2


[State 216, 2]
type = HitDef
triggerall = enemynear, statetype != L
trigger1 = Time = 0
attr = C, NA
damage    = 23
animtype  = medium
hitflag = MAF
guardflag = L
pausetime = 10,12
sparkno = s955
guard.sparkno = s5570
sparkxy = -5,-15
hitsound   = s275,4
guardsound = s150,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -5
air.velocity = -2,-3
p2facing = 1              ;Top 4 lines are from KFM's Upper, bottom 3 are from KFM's Hyper Upper
ground.cornerpush.veloff = -4
guard.cornerpush.veloff = -6.6
air.hittime = 15

[State 216, 2]
type = HitDef
triggerall = enemynear, statetype = L && enemynear, stateno != 5120
trigger1 = Time = 0
attr = C, NA
damage    = 23
animtype  = medium
hitflag = MAFD
guardflag = L
pausetime = 10,12
sparkno = s955
guard.sparkno = s5570
sparkxy = -5,-15
hitsound   = s275,4
guardsound = s150,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 13
ground.velocity = -5
air.velocity = -2,-3
p2facing = 1
ground.cornerpush.veloff = -4
guard.cornerpush.veloff = -6.6
air.hittime = 13
p2stateno = 433
p2facing = 1


[State 216, vocal]
type = PlaySnd
trigger1 = animelem = 1
value =  200, 13

[State 216, kick]
type = PlaySnd
trigger1 = animelem = 1
value = 210, 2


[State -1, SC Homura 1]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Homura" && (power >= 1000)
value = 1100

[State -1, SC Ichim 1]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Ichimonji_x"
value = 1000

[State -1, SC Ichim 2]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Ichimonji_y"
value = 1005

[State -1, SC Ichim 3]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Ichimonji_z"
value = 1010



[State -1, SC Rask 1]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasen_Kyaku_a"
value = 1300

[State -1, SC Rask 2]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasen_Kyaku_b"
value = 1301

[State -1, SC Rask 3]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasen_Kyaku_c"
value = 1302

[State -1, SC Rasetsujin_x]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasetsujin_x"
value = 1500


[State -1, SC Rasetsujin_y]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasetsujin_y"
value = 1505

[State -1, SC Rasetsujin_z]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Rasetsujin_z"
value = 1510


[State 216, Link 240]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "z") && (command != "holddown")
value = 240


[State 216, Link 211]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "b") && (command != "holddown") && (command = "holdfwd")
value = 211


[State 216, Link 220]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "c") && (command != "holdfwd") && (command != "holddown")
value = 220


[State 216, Link 230]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "c") && (command != "holdfwd") && (command = "holddown")
value = 230

[State 216, Spin Kick]
type = ChangeState
value = 211
triggerall = movecontact > 0
trigger1 = command = "b"


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

;---------------------------------------------------------------------------
;Step Kick
[Statedef 217]
type    = C
movetype= A
physics = C
juggle  = 2
poweradd= 70
ctrl = 0
anim = 217
velset = 0,0
sprpriority = 2

[State 217, PosAdd]
type = PosAdd
trigger1 = animelem = 1
trigger2 = animelem = 3
x = 8
y = 0

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

[State 217, 3]
type = PlaySnd
trigger1 = Time = 1
value = 200, 13

[State 217, Hit]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 28
hitflag = MAF
guardflag = MA
pausetime = 12,13
animtype = up
air.animtype = up
sparkno = s960
guard.sparkno = s5570
sparkxy = 10,-100
hitsound   = s275,0
guardsound = s150,0
ground.type = high
ground.slidetime = 20
ground.hittime  = 30
ground.velocity = ceil(-0.2),ceil(-12.5)  ; -3.5,-7
guard.velocity = -7
air.velocity = -1,-11 ;-4.5,-10
p2facing = 1
forcestand = 1
;fall = 1                   ;Make p2 fall down
;fall.recovertime = 15      ;40 ticks before p2 can recover from fall
;yaccel = .5                ;p2 will accelerate down at .4 pixels/sec^2 when falling
airguard.velocity = -7, -4
envshake.time = 7
envshake.ampl = 5
p2facing = 1              ;Top 4 lines are from KFM's Upper, bottom 3 are from KFM's Hyper Upper
air.hittime = 30

[State 216, Chase Jump]
type = ChangeState
value = 7000
triggerall = movehit && (Time <= 12) && enemy, movetype = H
trigger1 = command = "holdup" && command = "holdfwd" || command = "holdup" && command = "holdback" || Command = "holdup"

[State 217, Launch FX]
type = Explod
trigger1 = movehit
anim = 5552
removetime = -2
persistent = 0
pos = ceil(p2bodydist x)+0,-60
postype = p1
sprpriority = 2
;facing = -1
ownpal = 1
bindtime = 1
supermovetime = 0
ontop = 1
ignorehitpause = 1
scale = 2.20, 0.64
trans = add


[State 217, Launch FX]
type = Explod
trigger1 = movehit
anim = 5553
removetime = -2
persistent = 0
pos = ceil(p2bodydist x)+0,-60
postype = p1
sprpriority = 2
;facing = -1
ownpal = 1
bindtime = 1
;supermove = 1
supermovetime = 0
ontop = 1
ignorehitpause = 1
scale = 2.20, 0.64
trans = add


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

;---------------------------------------------------------------------------
; Crouching Gun (Prepare)
; CNS difficulty: easy
[Statedef 230]
type    = C
movetype= A
physics = S
ctrl = 0
velset = 0,0
anim = 230
sprpriority = 2



[State 230, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 231


;---------------------------------------------------------------------------
; Crouching Gun (Hold)
; CNS difficulty: easy
[Statedef 231]
type    = C
movetype= A
physics = S
ctrl = 0
velset = 0,0
anim = 231
sprpriority = 2

[State 231, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 232


;---------------------------------------------------------------------------
; Crouching Gun (Fired)
; CNS difficulty: easy
[Statedef 232]
type    = C
movetype= A
physics = c
juggle  = 5
poweradd= 30
ctrl = 0
velset = 0,0
anim = 232
sprpriority = 2

[State 232, VelSet]
type = VelSet
trigger1 = animelem = 2
x = -3


[State 232, 1]
type = PlaySnd
trigger1 = animelem = 1
value = 600, 1

[State 232, Projectile]
type = Projectile
trigger1 = Time = 0
ProjID = 230
projanim = 229
projhitanim = 229
projcancelanim = 229
projscale = 1,1
projremove = 1
projremovetime = 9
velocity = 0,0
projhits = 1
projpriority = 4
projsprpriority =1
offset = 87,-20
postype = p1         ;p2,front,back,left,right
attr = C,SP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MLAFP        ;HLAFD+-
guardflag = LP         ;HLA
animtype = Heavy          ;light,medium,hard,back,up,diagup
air.animtype = Heavy
priority = 5,Hit
damage = 38, 8
pausetime = 10,10
sparkno = s970
sparkxy = 20,-15
guard.sparkno = s5570
hitsound =s50,7
guardsound = 6,0
ground.type = trip
ground.slidetime = 14
ground.hittime  = 22
ground.velocity = -5, -2
air.velocity = -2.5,-3.5
airguard.velocity = -7, 6
;fall = 1
fall.recover = 0             ;Prevent p2 from recovering
down.bounce = 1
down.bounce.velocity = -4, -40;-4, -32
ground.cornerpush.veloff = -4
guard.cornerpush.veloff = -6.6
air.hittime = 22
palfx.time = 40
palfx.add = 40,-70, -200
palfx.mul = 256,256,256
palfx.sinadd = 40,30,0
Palfx.color = 0
palfx.invertall = 1


[State 232, Explod]
type = Explod
trigger1 = animelem= 1
anim = 223
ID = 223
pos = 87,-20
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 10
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove
pausemove
scale = 1,1
sprpriority = 4
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
;ignorehitpause =
;persistent =

[State 232, EnvShake]
type = EnvShake
trigger1 = animelem =1
time = 5
freq = 60
ampl = -15
phase = 150


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

;---------------------------------------------------------------------------
; Knockback - Opponent Hit
[Statedef 290]
type    = S
movetype= H
physics = N
velset = 0,0;-13, -4

[State 0, PosSet]
type = PosSet
Triggerall = Pos Y >= -10
trigger1 = time = 0
y = -5

[State 290, 1]
type = Changeanim2
Trigger1 = time = 0
value = 811


[State 290, 5]
type = ChangeState
trigger1 = time = 5
value = 291
ctrl = 0

;---------------------------------------------------------------------------
; Knockback - ^Opponent Knocked Away
[Statedef 291]
type    = A
movetype= H
physics = N
velset = -12, -2

[State 821, 1] ;Gravity
type = VelAdd
Trigger1 = 1
y = .45


[State 291, 1]
type = Changeanim
Trigger1 = time >= 0
value = 5030

[State 291, 5]
type = ChangeState
trigger1 = Pos Y >= 0 ; Vel Y > 0 &&
value = 292
ctrl = 0

;---------------------------------------------------------------------------
; Knockback - Opponent Bounce
[Statedef 292]
type    = A
movetype= H
physics = N
velset = 0,0

[State 0, Crash]
type = PlaySnd
trigger1 = time = 0
value = 800, 9

[State 0, EnvShake]
type = EnvShake
trigger1 = time = 0
time = 10
;freq = 40
ampl = 7
;phase = 20
;ignorehitpause =



[State 222, 1]
type = Changeanim
Trigger1 = time = 0
value = 5100

[State 222, 5]
type = ChangeState
Triggerall = alive = 1
trigger1 = time = 5
value = 293
ctrl = 0

[State 222, 5]
type = ChangeState
Triggerall = alive = 0
trigger1 = time = 5
value = 5110
ctrl = 0

;---------------------------------------------------------------------------
; Knockback- ^Opponent Recover
[Statedef 293]
type    = A
movetype= H
physics = A
velset = -6,-6.5


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

[State 223, 1]
type = Changeanim
Trigger1 = time = 0
value = 5160

[State 223, 1]
type = Changeanim
Trigger1 = time = 8
value = 5040

[State 0, SelfState]
type = SelfState
trigger1 = time > 8 && pos Y >= -5
value = 52
ctrl = 1

;---------------------------------------------------------
;Sword Flashes, LP
[Statedef 295]
physics = N
anim = 299
sprpriority = -3

[State 0, BindToParent]
type = BindToParent
trigger1 = time = 0
time = 40
facing = 1
pos = 0,0
;ignorehitpause =
;persistent =


[State 295, 7]
Type = Destroyself
trigger1 = parent, movetype = H  ;parent, stateno != 220


;---------------------------------------------------------
;Sword Flashes, MP
[Statedef 296]
physics = N
anim = 299
sprpriority = -3

[State 0, BindToParent]
type = BindToParent
trigger1 = time = 0
time = 40
facing = 1
pos = 0,0
;ignorehitpause =
;persistent =


[State 296, 7]
Type = Destroyself
trigger1 = parent, movetype = H  ;parent, stateno != 220

;---------------------------------------------------------
;Sword Flashes, F+MP
[Statedef 297]
physics = N
anim = 299
sprpriority = -3

[State 0, BindToParent]
type = BindToParent
trigger1 = time = 0
time = 40
facing = 1
pos = 0,0
;ignorehitpause =
;persistent =




[State 297, 7]
Type = Destroyself
trigger1 = parent, movetype = H  ;parent, stateno != 220

;---------------------------------------------------------
;Sword Flashes, CMP
[Statedef 298]
physics = N
anim = 299
sprpriority = -3

[State 0, BindToParent]
type = BindToParent
trigger1 = time = 0
time = 40
facing = 1
pos = 0,0
;ignorehitpause =
;persistent =





[State 298, 7]
Type = Destroyself
trigger1 = parent, movetype = H  ;parent, stateno != 220

;---------------------------------------------------------
;Sword Flashes, JMP
[Statedef 299]
physics = N
anim = 299
sprpriority = -3

[State 0, BindToParent]
type = BindToParent
trigger1 = time = 0
time = 40
facing = 1
pos = 0,0
;ignorehitpause =
;persistent =




[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = Pos Y = 0
;ignorehitpause =
;persistent =


[State 299, 7]
Type = Destroyself
trigger1 = parent, movetype = H  ;parent, stateno != 220






;---------------------------------------------------------------------------
;Upper Punch
; CNS difficulty: easy
[Statedef 600]
type    = A
movetype= A
physics = A
juggle  = 1
poweradd= 28
ctrl = 0
anim = 600
sprpriority = 2

[State 600, 1]
type = PlaySnd
trigger1 = Time = 1
value = 800, 1


[State 600, 1st hit]
type = HitDef
trigger1 = animelem = 3
attr = A, NA
damage    = 10
guardflag = HA
animtype  = light
priority = 3
pausetime = 7,8
sparkno = s951
guard.sparkno = s5570
sparkxy = -10,-80
hitsound   = s275,5
guardsound = s150,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -4
air.velocity = -1,((vel y)-.1) ;-.5, -3 ;-1, -2; ((vel y)-.1)
air.hittime = 12

[State 600, 2nd hit]
type = HitDef
trigger1 = animelem = 4 && prevstateno != 630 || animelem = 4 && prevstateno != 605
attr = A, NA
damage    = 10
guardflag = HA
animtype  = light
priority = 3
pausetime = 7,8
sparkno = s951
sparkxy = -10,-90
hitsound   = s275,5
guardsound = s150,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 20
ground.velocity = -4
air.velocity = -1,((vel y)-.1) ;-.5, -3 ;-1, -2; ((vel y)-.1)
air.hittime = 20

[State 600, 2nd hit]
type = HitDef
trigger1 = animelem = 4 && prevstateno = 630 || animelem = 4 && prevstateno = 605
attr = A, NA
damage    = 14
guardflag = HA
animtype  = light
priority = 3
pausetime = 7,8
sparkno = s951
sparkxy = -10,-90
hitsound   = s275,5
guardsound = s150,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 20
ground.velocity = -4
air.velocity = -1,-8.5 ;-.5, -3 ;-1, -2; ((vel y)-.1)
air.hittime = 20

[State -1, 2nd Jump]
type = ChangeState
triggerall = prevstateno = 630 && animelem = 5 && movecontact >= 0 || prevstateno = 605 && animelem = 5 && movecontact >= 0
trigger1 = command = "holdup";trigger1 = command = "holdup"
value = 46

;[State 600, 1] ;Gravity
;type = PosAdd
;trigger1 = movecontact > 0 && p2statetype = A
;trigger2 = animelem = 3 && animelem = 4
;y = -3


[State -1, SC Jumonji]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Jumonji" && (power >= 1000)
value = 2200



[State -1, SC Aichi 1]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Air Ichimonji_x"
value = 1050

[State -1, SC Aichi 2]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Air Ichimonji_y"
value = 1060

[State -1, SC Aichi 2]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Air Ichimonji_z"
value = 1070



[State 600, Link 610]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "y") && (command != "holddown")
trigger2 = animelem = 3 && animelem = 4
value = 610

[State 600, Link 640]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "b") && (command != "holddown")
trigger2 = animelem = 3 && animelem = 4
value = 640

[State 600, Link 645]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "b") && (command = "holddown")
trigger2 = animelem = 3 && animelem = 4
value = 645

[State 600, Link 650]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "c") && (command != "holdfwd") && (command != "holddown")
trigger2 = animelem = 3 && animelem = 4
value = 650


[State 600, Link 652]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "c") && (command = "holdfwd") && (command != "holddown")
trigger2 = animelem = 3 && animelem = 4
value = 651

[State 600, Link 656]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "c") && (command != "holdfwd") && (command = "holddown")
trigger2 = animelem = 3 && animelem = 4
value = 652


;[State 600, 3]
;type = ChangeState
;trigger1 = AnimTime = 0
;value = 50

[State 600, 3]
type = ChangeState
trigger1 = Time = 21
value = 680

;---------------------------------------------------------------------------
;Jumping Weak Punch
; CNS difficulty: easy
[Statedef 605]
type    = A
movetype= A
physics = A
juggle  = 1
poweradd= 25
ctrl = 0
anim = 605
sprpriority = 2

[State 605, 1]
type = PlaySnd
trigger1 = animelem = 1
value = 200, 6

[State 605, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = 250,2

[State 605, 2]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 18
guardflag = HMA
priority = 3
pausetime = 7,8
sparkno = s981
guard.sparkno = s5570
sparkxy = -10,-58
hitsound = s50, 6                  ;Sound to play on hit
guardsound = s50, 19
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -4
air.velocity = -1,((vel y)-.1) ;-1, -3 ;((vel y)-.1)
air.hittime = 12

[State -1, SC Jumonji]
type = ChangeState
triggerall = movecontact > 0 && time <=15
trigger1 = command = "Jumonji" && (power >= 1000)
value = 2200


[State -1, SC Aichi 1]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Air Ichimonji_x"
value = 1050

[State -1, SC Aichi 2]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Air Ichimonji_y"
value = 1060

[State -1, SC Aichi 2]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Air Ichimonji_z"
value = 1070


[State 605, Link 600]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "x") && (command = "holdup")
value = 600

[State 605, Link 610]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "y") && (command != "holddown")
value = 610

[State 605, Link 630]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "a") && (command != "holddown")
value = 630

[State 605, Link 640]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "b") && (command != "holddown")
value = 640

[State 605, Link 645]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "b") && (command = "holddown")
value = 645

[State 605, Link 650]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "c") && (command != "holdfwd") && (command != "holddown")
value = 650


[State 605, Link 652]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "c") && (command = "holdfwd") && (command != "holddown")
value = 651

[State 605, Link 656]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "c") && (command != "holdfwd") && (command = "holddown")
value = 652



[State 605, 3]
type = ChangeState
trigger1 = Time = 44
value = 680

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


;---------------------------------------------------------------------------
;SJ Jumping Weak Punch
; CNS difficulty: easy
[Statedef 606]
type    = A
movetype= A
physics = A
juggle  = 1
poweradd= 25
ctrl = 0
anim = 605
sprpriority = 2

[State 605, 1]
type = PlaySnd
trigger1 = animelem = 1
value = 200, 6

[State 605, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = 250,2

[State 605, 2]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 18
guardflag = HMA
priority = 3
pausetime = 7,8
sparkno = s981
guard.sparkno = s5570
sparkxy = -10,-58
hitsound = s50, 6                  ;Sound to play on hit
guardsound = s50, 19
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -4
air.velocity = -1,((vel y)-.1) ;-1, -3 ;((vel y)-.1)
air.hittime = 12

[State -1, SC Jumonji]
type = ChangeState
triggerall = movecontact > 0 && time <=15
trigger1 = command = "Jumonji" && (power >= 1000)
value = 2200


[State -1, SC Aichi 1]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Air Ichimonji_x"
value = 1050

[State -1, SC Aichi 2]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Air Ichimonji_y"
value = 1060

[State -1, SC Aichi 2]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Air Ichimonji_z"
value = 1070

[State 605, Link 610]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "y") && (command != "holddown")
value = 610

[State 605, Link 630]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "a") && (command != "holddown")
value = 631

[State 605, Link 640]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "b") && (command != "holddown")
value = 640

[State 605, Link 645]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "b") && (command = "holddown")
value = 645

[State 606, Link 650]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "c") && (command != "holdfwd") && (command != "holddown")
value = 650


[State 606, Link 651]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "c") && (command = "holdfwd") && (command != "holddown")
value = 651

[State 606, Link 652]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "c") && (command != "holdfwd") && (command = "holddown")
value = 652



[State 606, 3]
type = ChangeState
trigger1 = Time = 44
value = 680

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


;---------------------------------------------------------------------------
;Jump Medium Punch
[Statedef 610]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 40
ctrl = 0
anim = 610

[State 610, 1]
type = PlaySnd
trigger1 = animelem = 3
value = 250, 1

[State 610, 3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = 23
guardflag = HMA
priority = 4
pausetime = 10,13
sparkno = s985
guard.sparkno = s5570
sparkxy = -10,-55
hitsound = s50, 5
guardsound = s50, 19
animtype = Medium
ground.type = High
ground.slidetime = 17
ground.hittime  = 16
ground.velocity = -5
air.velocity = -2,((vel y)-.1) ;-1, -4; ((vel y)-.05)
air.hittime = 16


;[State 610, Flash1]
;type = Explod
;trigger1 = animelem = 4
;id = 610
;anim = 313
;pos = 0, 0
;postype = p1  ;p2,front,back,left,right
;bindtime = 10
;scale = 1,1
;ignorehitpause = 0
;removetime = -2
;vfacing = 1
;removeongethit = 1

;[State 610, Flash2]
;;type = Explod
;trigger1 = animelem = 6
;id = 610
;anim = 314
;pos = 0, 0
;postype = p1  ;p2,front,back,left,right
;bindtime = 10
;scale = 1,1
;ignorehitpause = 0
;removetime = -2
;removeongethit = 1

;[State 0, RemoveExplod]
;type = RemoveExplod
;trigger1 = stateno = 2200
;id = 610
;ignorehitpause =
;persistent =


[State 610, Helper]
type = Helper
trigger1 = animelem = 4
helpertype = normal ;player
name = "JMP_Slash"
ID = 615
stateno = 615
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
ownpal = 1


[State 610, 2]
type = PlaySnd
trigger1 = animelem = 2
value = 200, 6


[State 610, 2]
type = PlaySnd
trigger1 = animelem = 1
trigger2 = animelem = 9
value = 50, 0


[State -1, SC Jumonji]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Jumonji" && (power >= 1000)
value = 2200



[State -1, SC Aichi 1]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Air Ichimonji_x"
value = 1050

[State -1, SC Aichi 2]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Air Ichimonji_y"
value = 1060

[State -1, SC Aichi 2]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Air Ichimonji_z"
value = 1070


[State 610, Link 620]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "z"
value = 620


[State 610, Link 640]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "b") && (command != "holddown")
value = 640

[State 610, Link 645]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "b") && (command = "holddown")
value = 645


[State 610, Link 650]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "c") && (command != "holdfwd") && (command != "holddown")
value = 650


[State 610, Link 651]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "c") && (command = "holdfwd") && (command != "holddown")
value = 651

[State 610, Link 652]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "c") && (command != "holdfwd") && (command = "holddown")
value = 652


;[State 605, Link 610]
;type = ChangeState
;triggerall = time > 33
;trigger1 = (command = "y") && (command != "holddown")
;value = 610



;[State 610, 4]
;type = ChangeState
;trigger1 = AnimTime = 0
;value = 50
;ctrl = 1


[State 610, 3]
type = ChangeState
trigger1 = Time = 24
value = 680

;----------------------------------------------------------------------
;JMP - Slash
[Statedef 615]
type = A
movetype = A
physics = N
velset = 0,0
anim = 313
ctrl = 0
sprpriority = 3

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
time = 9999
facing = 1
pos = 0,0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = parent, animelem = 6
value = 314

[State 0, DestroySelf]
type = DestroySelf
trigger1 = parent, animelem = 8 || parent, movetype = H || parent, pos Y >= 0 || parent, anim!= 610

;---------------------------------------------------------------------------
;Jumping Strong Punch
; CNS difficulty: easy
[Statedef 620]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 65
ctrl = 0
anim = 620
sprpriority = 2

[State 620, 2]
type = HitDef
triggerall = enemynear, statetype = S
trigger1 = Time = 0
attr = A, NA
animtype = hard
damage    = 32
guardflag = HMA
priority = 5, hit
pausetime = 8,8
sparkno = s960
guard.sparkno = s5570
sparkxy = -5,-40
hitsound   = s50,5
guardsound = s50,15
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -8
air.velocity = -5.9,7
air.hittime = 20
envshake.time = 6
envshake.ampl = 4
Air.Fall = 1

[State 620, 2]
type = HitDef
triggerall = enemynear, statetype = A
trigger1 = Time = 0
attr = A, NA
animtype = hard
damage    = 32
guardflag = HMA
priority = 5, hit
pausetime = 8,8
sparkno = s960
guard.sparkno = s5570
sparkxy = -5,-40
hitsound   = s50,5
guardsound = s50,15
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -8
air.velocity = -5.9,7
air.hittime = 20
envshake.time = 6
envshake.ampl = 4
Air.Fall = 1
p2stateno = 621


[State 620, Width]
type = Width
trigger1 = time = 0
value = 10,4
;ignorehitpause =
;persistent =


[State 620, 1]
type = PlaySnd
trigger1 = Time = 1
value = 200, 10

[State 620, 1]
type = PlaySnd
trigger1 = Time = 3
value = 300, 0


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


[State 620, 3]
type = ChangeState
trigger1 = Time = 22
value = 680

;---------------------------------------------------------------------------
; Knockback - Opponent Hit
[Statedef 621]
type    = S
movetype= H
physics = N
velset = 0,0;-13, -4


[State 290, 1]
type = Changeanim
Trigger1 = time = 0
value = 5006


[State 290, 5]
type = ChangeState
trigger1 = time = 3
value = 622
ctrl = 0



;---------------------------------------------------------------------------
; Knockback - ^Opponent Knocked Away
[Statedef 622]
type    = A
movetype= H
physics = N
velset = -13, 10

[State 821, 1] ;Gravity
type = VelAdd
Trigger1 = 1
y = .35


[State 1360, 1]
type = Changeanim
Trigger1 = time = 0
value = 5030


[State 220, 5]
type = ChangeState
trigger1 = Pos Y >= 0 ; Vel Y > 0 &&
value = 292
ctrl = 0

;---------------------------------------------------------------------------
;Jump Light Kick
; CNS difficulty: easy
[Statedef 630]
type    = A
movetype= A
physics = A
juggle  = 1
poweradd= 20
ctrl = 0
anim = 630
sprpriority = 2

[State 630, 1]
type = PlaySnd
trigger1 = Animelem = 2
value = 200, 3

[State 630, 2]
type = HitDef
trigger1 = animelem = 6
attr = A, NA
damage = 18
guardflag = HMA
priority = 3
animtype = light
pausetime = 8,9
sparkno = s951
guard.sparkno = s5570
sparkxy = -5,-35
hitsound   = s275,5
guardsound = s150,0
ground.type = low
ground.slidetime = 6
ground.hittime  = 12
ground.velocity = -4
air.velocity=-1,((vel y)-.1);-2.5;
air.hittime = 12

[State -1, SC Jumonji]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Jumonji" && (power >= 1000)
value = 2200


[State -1, SC Aichi 1]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Air Ichimonji_x"
value = 1050

[State -1, SC Aichi 2]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Air Ichimonji_y"
value = 1060

[State -1, SC Aichi 2]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Air Ichimonji_z"
value = 1070



[State 620, Link 600]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "x") && (command = "holdup")
value = 600

[State 620, Link 610]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "y") && (command != "holddown")
value = 610

[State 620, Link 640]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "b") && (command != "holddown")
value = 640

[State 620, Link 645]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "b") && (command = "holddown")
value = 645

[State 620, Link 650]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "c") && (command != "holdfwd") && (command != "holddown")
value = 650


[State 620, Link 651]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "c") && (command = "holdfwd") && (command != "holddown")
value = 651

[State 620, Link 652]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "c") && (command != "holdfwd") && (command = "holddown")
value = 652



[State 620, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 11

;---------------------------------------------------------------------------
;SJ Jump Light Kick
; CNS difficulty: easy
[Statedef 631]
type    = A
movetype= A
physics = A
juggle  = 1
poweradd= 20
ctrl = 0
anim = 630
sprpriority = 2

[State 631, 1]
type = PlaySnd
trigger1 = Animelem = 2
value = 200, 3

[State 631, 2]
type = HitDef
trigger1 = animelem = 6
attr = A, NA
damage = 18
guardflag = HMA
priority = 3
animtype = light
pausetime = 8,9
sparkno = s951
guard.sparkno = s5570
sparkxy = -5,-35
hitsound   = s275,5
guardsound = s150,0
ground.type = low
ground.slidetime = 6
ground.hittime  = 12
ground.velocity = -4
air.velocity=-1,((vel y)-.1);-2.5;
air.hittime = 12

[State -1, SC Jumonji]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Jumonji" && (power >= 1000)
value = 2200


[State -1, SC Aichi 1]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Air Ichimonji_x"
value = 1050

[State -1, SC Aichi 2]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Air Ichimonji_y"
value = 1060

[State -1, SC Aichi 2]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Air Ichimonji_z"
value = 1070


[State 631, Link 610]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "y") && (command != "holddown")
value = 610

[State 631, Link 640]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "b") && (command != "holddown")
value = 640

[State 631, Link 645]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "b") && (command = "holddown")
value = 645

[State 631, Link 650]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "c") && (command != "holdfwd") && (command != "holddown")
value = 650


[State 631, Link 651]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "c") && (command = "holdfwd") && (command != "holddown")
value = 651

[State 631, Link 652]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "c") && (command != "holdfwd") && (command = "holddown")
value = 652



[State 631, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 11


;---------------------------------------------------------------------------
;Jump Medium Kick
; CNS difficulty: easy
[Statedef 640]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 35
ctrl = 0
anim = 640
sprpriority = 2

[State 640, Kick]
type = PlaySnd
trigger1 = Time = 1
value = 210, 2

[State 640, vocal]
type = PlaySnd
trigger1 = animelem = 1
value =  200, 6

[State 640, 2]
type = HitDef
trigger1 = animelem = 3
attr = A, NA
damage = 23
animtype = medium
guardflag = HA
priority = 3
pausetime = 8,12
sparkno = s951
guard.sparkno = s5570
sparkxy = -5,-80
hitsound   = s275,4
guardsound = s150,0
ground.type = High
ground.slidetime = 6
ground.hittime  = 16
ground.velocity = -4
air.velocity=  -2, ((vel y)-.1) ;-1, -3 ;((vel y)-.05)
air.hittime = 16

[State -1, SC Jumonji]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Jumonji" && (power >= 1000)
value = 2200


[State -1, SC Aichi 1]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Air Ichimonji_x"
value = 1050

[State -1, SC Aichi 2]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Air Ichimonji_y"
value = 1060

[State -1, SC Aichi 2]
type = ChangeState
triggerall = movecontact > 0
trigger1 = command = "Air Ichimonji_z"
value = 1070


[State 640, Link 645]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "b") && (command = "holddown")
value = 645

[State 640, Link 650]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "c") && (command != "holdfwd") && (command != "holddown")
value = 650


[State 640, Link 651]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "c") && (command = "holdfwd") && (command != "holddown")
value = 651

[State 640, Link 652]
type = ChangeState
triggerall = movecontact > 0
trigger1 = (command = "c") && (command != "holdfwd") && (command = "holddown")
value = 652


[State 640, 3] ;Change state when KFM is close to ground
type = ChangeState
trigger1 = animtime = 0
value = 680


;---------------------------------------------------------------------------
;Jumping Axe Kick (Start)
; CNS difficulty: easy
[Statedef 645]
type    = A
movetype= A
physics = A
ctrl = 0
anim = 645
sprpriority = 2


[State 645, 2]
type = PlaySnd
trigger1 = Time = 5
value = 200, 15

[State 645, 2]
type = PlaySnd
trigger1 = Time = 6
value = 210, 2





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

;---------------------------------------------------------------------------
;Jumping Axe Kick
; CNS difficulty: easy
[Statedef 646]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 50
ctrl = 0
anim = 646
sprpriority = 2


[State 646, 3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 26
guardflag = HMAF
priority = 4
pausetime = 12,12
sparkno = s960
guard.sparkno = s5570
sparkxy = -5,-75
hitsound   = s275,3
guardsound = s150,0
animtype = hard
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -5
air.velocity = -3,17
Fall = 1
fall.recover = 0
down.velocity = -4,20
down.hittime = 30
down.bounce = 1
down.bounce.velocity = -4, -40;-4, -32
envshake.time = 8
envshake.ampl = 6



[State 646, 4]
type = ChangeState
trigger1 = animtime = 0
value = 680

;---------------------------------------------------------------------------
;Air Gun - Diagonal
[Statedef 650]
type    = A
movetype= A
physics = A
ctrl = 0
anim = 650
sprpriority = 2

[State 650, StateTypeSet]
type = StateTypeSet
trigger1 = time >= 13 && time < 15
statetype = A       ;S,A,C,L
movetype = A        ;I,A,H
physics = S         ;A,C,S,N

[State 650, StateTypeSet]
type = StateTypeSet
trigger1 = time > 15
statetype = A       ;S,A,C,L
movetype = A        ;I,A,H
physics = A         ;A,C,S,N


[State 650, VelSet]
type = VelSet
trigger1 = time >= 13 && time < 15
y = -1
;x = -1

[State 650, VelSet]
type = VelSet
trigger1 = animelem = 9
x = -3
y = -4
yaccel = -20  ; .10


[State 651, Projectile]
type = Projectile
trigger1 = animelem = 9
ProjID = 650
projanim = 269
projhitanim = 269
projcancelanim = 269
projscale = 1,1
projremove = 1
projremovetime = 8
velocity = 0,0
projhits = 1
projpriority = 4
projsprpriority =1
offset = 45,-40
postype = p1         ;p2,front,back,left,right
attr = A,SP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
Hitflag = HMAFP        ;HLAFD+-
guardflag = HMAP         ;HLA
animtype = back          ;light,medium,hard,back,up,diagup
air.animtype = back
priority = 5,Hit   ;Hit,Miss,Dodge
damage = 40, 8
pausetime = 8,8
sparkno = s970
guard.sparkno = s5570
sparkxy = 20,20
hitsound =s50,7
guardsound = 6,0
ground.type = High
ground.slidetime = 6
ground.hittime  = 6
ground.velocity = -4
air.velocity = -8,11
airguard.velocity, -6, 6
Fall = 1
fall.recover = 0
palfx.time = 40
palfx.add = 40,-70, -200
palfx.mul = 256,256,256
palfx.sinadd = 40,30,0
Palfx.color = 0
palfx.invertall = 1

[State 0, PosAdd]
type = PosAdd
triggerall = prevstateno = [600,640]
trigger1 = animelem = 8
y = -3

[State 651, 1]
type = PlaySnd
trigger1 = animelem = 9
value = 600, 0


[State 651, Explod]
type = Explod
trigger1 = animelem= 9
anim = 652
pos = 45,-40
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 10
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove
pausemove
scale = 1,1
sprpriority = 4
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
;ignorehitpause =
;persistent =

[State 651, EnvShake]
type = EnvShake
trigger1 = animelem =9
time = 5
freq = 60
ampl = -15
phase = 150

[State 650, ScreenBound]
type = ScreenBound
triggerall = numhelper(1425) != 1 || numhelper(1401) != 1
triggerall = prevstateno = [600,640]
Triggerall = enemynear, stateno != [130,155]
trigger1 = enemynear, movetype = H && enemynear, statetype = A;&& backedgebodydist > 20
value = 0
movecamera = 0,0
;ignorehitpause =
;persistent =


[State 650, ChangeState]
type = ChangeState
trigger1 = backedgebodydist < -25 || backedgebodydist < -25 && (Vel Y > 0) && (Pos Y >= 0)
value = 659 ;run back onscreen state
ctrl = 0

[State 650, ChangeState]
type = ChangeState
trigger1 = pos y >= 0 && backedgebodydist >= -15;This is true only if he is NOT offscreen
value = 52 ;
ctrl = 0


;---------------------------------------------------------------------------
;Air Gun - Straight
; CNS difficulty: easy
[Statedef 651]
type    = A
movetype= A
physics = A
ctrl = 0
anim = 653
sprpriority = 2

[State 651, StateTypeSet]
type = StateTypeSet
trigger1 = time >= 13 && time < 15
statetype = A       ;S,A,C,L
movetype = A        ;I,A,H
physics = S         ;A,C,S,N

[State 651, StateTypeSet]
type = StateTypeSet
trigger1 = time > 15
statetype = A       ;S,A,C,L
movetype = A        ;I,A,H
physics = A         ;A,C,S,N


[State 651, VelSet]
type = VelSet
trigger1 = time >= 13 && time < 15
y = -1
;x = -1

[State 651, VelSet]
type = VelSet
trigger1 = animelem = 9
x = -3
y = -2
yaccel = -20  ; .10

[State 651, Projectile]
type = Projectile
trigger1 = animelem = 9
ProjID = 652
projanim = 229
projhitanim = 229
projcancelanim = 229
projscale = 1,1
projremove = 1
projremovetime = 9
velocity = 0,0
projhits = 1
projpriority = 4
projsprpriority =1
offset = 60,-60
postype = p1         ;p2,front,back,left,right
attr = A,SP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
Hitflag = HMAFP        ;HLAFD+-
guardflag = HMAP         ;HLA
animtype = back          ;light,medium,hard,back,up,diagup
air.animtype = back
priority = 5,Hit   ;Hit,Miss,Dodge
damage = 40, 8
pausetime = 8,8
sparkno = s970
guard.sparkno = s5570
sparkxy = 45,-30
hitsound =s50,7
guardsound = 6,0
ground.type = High
ground.slidetime = 6
ground.hittime  = 6
ground.velocity = -8
air.velocity = -10, 3
airguard.velocity = -5, 2
fall = 1
fall.recover = 0
palfx.time = 40
palfx.add = 40,-70, -200
palfx.mul = 256,256,256
palfx.sinadd = 40,30,0
Palfx.color = 0
palfx.invertall = 1

[State 651, 1]
type = PlaySnd
trigger1 = animelem = 9
value = 600, 0

[State 651, Explod]
type = Explod
trigger1 = animelem = 9
anim = 223
ID =  223
pos = 60,-75
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 10
removetime = -2
scale = 1,1
sprpriority = 4
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0

[State 651, ScreenBound]
type = ScreenBound
triggerall = numhelper(1425) != 1 || numhelper(1401) != 1
triggerall = prevstateno = [600,640]
Triggerall = enemynear, stateno != [130,155]
trigger1 = enemynear, movetype = H && enemynear, statetype = A;&& backedgebodydist > 20
value = 0
movecamera = 0,0
;ignorehitpause =
;persistent =

[State 0, PosAdd]
type = PosAdd
triggerall = prevstateno = [600,640]
trigger1 = animelem = 8
y = -3

[State 651, EnvShake]
type = EnvShake
trigger1 = animelem = 9
time = 5
freq = 60
ampl = -15
phase = 150

[State 651, ChangeState]
type = ChangeState
trigger1 = backedgebodydist < -70 || backedgebodydist < -70 && (Vel Y > 0) && (Pos Y >= 0)
value = 659 ;101 ;run back onscreen state
ctrl = 0

[State 651, ChangeState]
type = ChangeState
trigger1 = Pos Y >= 0 && backedgebodydist >= -15 ;This is true only if he is NOT offscreen
value = 52 ;
ctrl = 0


;[State 652, 3]
;type = ChangeState
;trigger1 = AnimTime = 0
;value = 653


;---------------------------------------------------------------------------
;Air Gun - Down
[Statedef 652]
type    = A
movetype= A
physics = A
ctrl = 0
anim = 657
sprpriority = 2

[State 652, StateTypeSet]
type = StateTypeSet
trigger1 = time >= 13 && time < 15
statetype = A       ;S,A,C,L
movetype = A        ;I,A,H
physics = S         ;A,C,S,N

[State 652, StateTypeSet]
type = StateTypeSet
trigger1 = time > 15
statetype = A       ;S,A,C,L
movetype = A        ;I,A,H
physics = A         ;A,C,S,N


[State 652, VelSet]
type = VelSet
trigger1 = time >= 13 && time < 15
y = -1
;x = -1


[State 652, VelSet]
type = VelSet
trigger1 = animelem = 9
x = -2
y = -5
yaccel = -20  ; .10

[State 652, Projectile]
type = Projectile
trigger1 = animelem = 9
ProjID = 657
projanim = 270
projhitanim = 270
projcancelanim = 270
projscale = 1,1
projremove = 1
projremovetime = 7
velocity = 0,0
projhits = 1
projpriority = 4
projsprpriority =1
offset = 2,-30
postype = p1         ;p2,front,back,left,right
attr = A,SP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
Hitflag = HMAFP        ;HLAFD+-
guardflag = HMA         ;HLA
animtype = hard          ;light,medium,hard,back,up,diagup
air.animtype = hard
priority = 5,Hit   ;Hit,Miss,Dodge
damage = 40, 8
pausetime = 8,8
sparkno = s970
guard.sparkno = s5570
sparkxy = 5,40
hitsound =s50,7
guardsound = 6,0
ground.type = High
ground.slidetime = 6
ground.hittime  = 6
ground.velocity = -4
air.velocity = -3,15
Fall = 1
fall.recover = 0
down.velocity = -1,30
down.bounce = 1
down.bounce.velocity = -4, -40;-4, -32
palfx.time = 40
palfx.add = 40,-70, -200
palfx.mul = 256,256,256
palfx.sinadd = 40,30,0
Palfx.color = 0
palfx.invertall = 1

[State 0, PosAdd]
type = PosAdd
triggerall = prevstateno = [600,640]
trigger1 = animelem = 8
y = -3

[State 652, 1]
type = PlaySnd
trigger1 = animelem = 9
value = 600, 0


[State 652, Explod]
type = Explod
trigger1 = animelem = 9
anim = 671
ID = 671
pos = 2,-30
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 10
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove
pausemove
scale = 1,1
sprpriority = 4
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
;ignorehitpause =
;persistent =

[State 652, EnvShake]
type = EnvShake
trigger1 = animelem = 9
time = 5
freq = 60
ampl = -15
phase = 150


[State 652, 3] ;Change state when KFM is close to ground
type = ChangeState
trigger1 = Pos Y >= 0
value = 52
ctrl = 0



;[State 656, 3]
;type = ChangeState
;trigger1 = AnimTime = 0
;value = 657


;------------------------------------------------------------------------------
; Landing State (out of screen)
; CNS difficulty: easy
[Statedef 659]
type = S
movetype= I
physics = S
velset = 0,0
ctrl = 0
anim = 659
sprpriority = 2

[State 0, PosSet]
type = PosSet
trigger1 = 1
y = 0
;ignorehitpause =
;persistent =


[State 655, ScreenBound]
type = ScreenBound
trigger1 = enemy, movetype = H
value = 0
movecamera = 0,0
;ignorehitpause =
;persistent =

[state 659, run]
type = ChangeState
trigger1 = animtime = 0
value = 101 ;101 ;run back onscreen state
ctrl = 0



;---------------------------------------------------------------------------
;Jump Attack Recovery
; CNS difficulty: easy
[Statedef 680]
type    = A
movetype= A
physics = A
anim = 680
sprpriority = 2


[State -1, Miss Jumonji]
type = ChangeState
triggerall = time >= 10 && (power >= 1000)
trigger1 = command = "Jumonji"
value = 2200

[State -1, Miss Aichi 1]
type = ChangeState
triggerall = time >= 10
trigger1 = command = "Air Ichimonji_x"
value = 1050

[State -1, Miss Aichi 2]
type = ChangeState
triggerall = time >= 10
trigger1 = command = "Air Ichimonji_y"
value = 1060

[State -1, Miss Aichi 3]
type = ChangeState
triggerall = time >= 10
trigger1 = command = "Air Ichimonji_z"
value = 1070


[State 680, Miss 605]
type = ChangeState
triggerall = time >= 10
trigger1 = (command = "x") && (command != "holddown")
value = 605

[State 680, Miss 600]
type = ChangeState
triggerall = time >= 10
trigger1 = (command = "x") && (command = "holdup")
value = 600


[State 680, Miss 620]
type = ChangeState
triggerall = time >= 10
trigger1 = command = "z"
value = 620

[State 680, Miss 630]
type = ChangeState
triggerall = time >= 10
trigger1 = command = "a"
value = 630


[State 680, Miss 640]
type = ChangeState
triggerall = time >= 10
trigger1 = (command = "b") && (command != "holddown")
value = 640

[State 680, Miss 645]
type = ChangeState
triggerall = time >= 10
trigger1 = (command = "b") && (command = "holddown")
value = 645


[State 680, Miss 650]
type = ChangeState
triggerall = time >= 10
trigger1 = (command = "c") && (command != "holdfwd") && (command != "holddown")
value = 650


[State 680, Miss 652]
type = ChangeState
triggerall = time >= 10
trigger1 = (command = "c") && (command = "holdfwd") && (command != "holddown")
value = 652

[State 680, Miss 656]
type = ChangeState
triggerall = time >= 10
trigger1 = (command = "c") && (command != "holdfwd") && (command = "holddown")
value = 656

[State 680, Miss Block]
type = ChangeState
triggerall = time >= 10
trigger1 = (p2statetype = A) && (command = "holdback")
value = 132


[State 680, 5]
type = CtrlSet
Triggerall = prevstateno != 2200
trigger1 = Time = 10
value = 1

;-------------------------------------------------------
;Violent Spiral - Attempt
[Statedef 800]
type = S
movetype= A
physics = S
juggle = 0
velset = 0,0
ctrl = 0
anim = 800


[State 800, 1]
type = HitDef
Trigger1 = Animelem = 3
attr = S, NT
hitflag = M-
priority = 1, Miss
sparkno = -1
sprpriority = 1
p1facing = ifelse(command = "holdback", -1, 1)
p2facing = 1
p1stateno = 810
p2stateno = 811
guard.dist = 0
fall = 1

[State 800, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

;----------------------------------------------------------------------
;Violent Spiral - Initaiate
[Statedef 810]
type = S
movetype= A
physics = N
anim = 810
poweradd = 60

[State 800, Grab]
type = PlaySnd
trigger1 = time = 0
value = 800, 10

[State 810, 2]
type = PlaySnd
trigger1 = animelem = 6
value = 200, 6

[State 810, 2]
type = PlaySnd
trigger1 = animelem = 21
value = 200, 2

[State 810, SprPriority]
type = SprPriority
trigger1 = AnimElem =2
value = 2

[State 810, SprPriority]
type = SprPriority
trigger1 = AnimElem = 9
value = -1


[State 810, SprPriority]
type = SprPriority
trigger1 = AnimElem = 12
value = 7

[State 810, Bind 1]
type = TargetBind
trigger1 = Time = 30
pos = 0, 0

[State 810, Bind 1]
type = TargetBind
trigger1 = animelem = 9
pos = 50, -20


[State 810, Bind 1]
type = TargetBind
trigger1 = animelem = 10
pos = 60, -20

[State 810, Bind 1]
type = TargetBind
trigger1 = animelem = 12
pos = 70, -20


[State 810, Bind 1]
type = TargetBind
trigger1 = animelem = 14
pos = 70, 0

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 1
x = 50


[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 8
x = 10

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 9
x = 5

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 10
x = 5

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 11
x = 5

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 12
x = 2

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 13
x = 2


[State 810, Hurt]
type = TargetLifeAdd
trigger1 = AnimElem = 13
value = -150


[State 810, Throw]
type = TargetState
trigger1 = AnimElem = 14
value = 821


[State 0, EnvShake]
type = EnvShake
trigger1 = animelem = 14
time = 20
freq = 70
ampl = -10
phase = 80
;ignorehitpause =



[State 0, SuperPause]
type = SuperPause
trigger1 = animelem = 14
time = 10
sound = s800, 20
darken = 0
anim = 800
;ignorehitpause =
;persistent =


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

;----------------------------------------------------------------------
;Violent Spiral - Opponent Caught
[Statedef 811]
type = S
physics = N
movetype = H
velset = 0,0
ctrl = 0


[State 811, 1]
type = ChangeAnim2
Trigger1 = time = 0
value = 811


[State 811, 1]
type = ChangeAnim2
trigger1 = animelem = 10
value = 5061

[State 811, SprPriority]
type = SprPriority
trigger1 = time = 49
value = 7


[State 811, SprPriority]
type = SprPriority
trigger1 = time = 57
value = -1


;----------------------------------------------------------------------
;Violent Spiral - Opponent Thrown #1
[Statedef 821]
type = S
movetype = H
physics = N
velset = -5,0
poweradd = 40


[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 0
value = 5100

[State 821, 1]
type = VelAdd
Trigger1 = 1
y = .4

[State 821, 4]
type = Changestate
Trigger1 = Time = 5
value = 822

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


;[State 821, 4] ;Hit ground
;type = SelfState
;trigger1 = Vel Y > 0
;trigger1 = Pos Y >= 0
;value = 5100 ;Hit ground


;----------------------------------------------------------------------
;Violent Spiral - Opponent Thrown #2
[Statedef 822]
type = A
movetype = H
physics = N
velset = -3,-7


[State 821, 1]
type = VelAdd
Trigger1 = 1
y = .4

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 0
value = 5051

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 10
value = 5061

[State 821, 4] ;Gravity
type = Selfstate
Trigger1 = Vel Y > 0 && Pos Y >= 0
value = 5110

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


;-------------------------------------------------------
;Blind Blow
[Statedef 850]
type = S
movetype= A
physics = S
juggle = 0
velset = 0,0
ctrl = 0
anim = 800


[State 850, 1]
type = HitDef
Trigger1 = Animelem = 3
attr = S, NT
hitflag = M-
priority = 1, Miss
sparkno = -1
sprpriority = 1
p1facing = 1 ;ifelse (command = "holdfwd", -1, 1)
p2facing = 1
p1stateno = 860
p2stateno = 861
guard.dist = 0
fall = 1

[State 850, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1



;----------------------------------------------------------------------
;Blind Blow - Hold & Hit
[Statedef 860]
type = S
movetype= A
physics = N
anim = 870
poweradd = 60


[State 850, Grab]
type = PlaySnd
trigger1 = time = 0
value = 800, 10

[State 810, Running]
type = PlaySnd
trigger1 = Animelem = 2
trigger2 = Animelem = 4
trigger3 = Animelem = 6
trigger4 = Animelem = 8
trigger5 = Animelem = 10
value = 10,0
Volume = -3

[State 810, 1]
type = PlaySnd
trigger1 = animelem = 13
value = 200, 10

[State 810, 1]
type = PlaySnd
trigger1 = animelem = 15
value = 275, 0

[State 810, SprPriority]
type = SprPriority
trigger1 = AnimElem =1 ;2
value = -1 ;2

[State 810, SprPriority]
type = SprPriority
trigger1 = AnimElem = 13
value = 7

[State 810, Bind 1]
type = TargetBind
trigger1 = Time = 120
pos = 0, 0

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 2
x = 15

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 3
x = 15

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 4
x = 15

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 5
x = 15

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 6
x = 15

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 7
x = 15

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 8
x = 15

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 9
x = 15

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 10
x = 15

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 11
x = 5


[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 13
x = -15

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 14
x = -20

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 15
x = -15

[State 0, Explod]
type = Explod
trigger1 = animelem = 14
anim = 955
pos = -15, -50
postype = p2  ;p2,front,back,left,right
facing = 1
bindtime = 1
removetime = -2
scale = 1,1
ontop = 1
sprpriority = 7
ownpal = 1
removeongethit = 0


[State 860, Hurt]
type = TargetLifeAdd
trigger1 = AnimElem = 15
value = -125

[State 860, Knock away]
type = TargetState
trigger1 = AnimElem = 15
value = 871

[State 860, EnvShake]
type = EnvShake
trigger1 = animelem =15
time = 3
freq = 45
ampl = -15
phase = 100

[State 860, Helper]
type = Helper
trigger1 = Time = 0
helpertype = normal ;player
name = "Clone Assistant"
ID = 860
stateno = 862
pos = -70,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
ignorehitpause = 1
;persistent =


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

;----------------------------------------------------------------------
;Blind Blow - Opponent Caught
[Statedef 861]
type = S
physics = N
movetype = H
velset = 0,0
ctrl = 0

[State 861, 1]
type = ChangeAnim2
Trigger1 = time = 0
value = 871

[State 861, 1]
type = ChangeAnim
Trigger1 = time = 45
value = 5300


;----------------------------------------------------------------------
;Blind Blow - Clone Helper
[Statedef 862]
type = S
movetype= A
physics = N
anim = 860
ctrl = 0
sprpriority = 7

[State 850, Tsumuji]
type = PlaySnd
trigger1 = animelem = 2
trigger2 = animelem = 5
trigger3 = animelem = 8
value = 10,2



[State 0, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0
;ignorehitpause =
;persistent =



;----------------------------------------------------------------------
;Blind Blow - ???
[Statedef 870]
type = A
movetype = H
physics = N
velset = 0,0
anim = 5050


[State 870, 1]
type = ChangeAnim2
Trigger1 = time = 0
value = 5050

;----------------------------------------------------------------------
;Blind Blow - Opponent Knocked away
[Statedef 871]
type = A
movetype = H
physics = N
velset = 10,-6
poweradd = 40
anim = 5050

[State 0, PosSet]
type = PosSet
trigger1 = time = 0
y = -3


[State 871, 1] ;Gravity
type = VelAdd
Trigger1 = 1
y = .5

[State 871, 2] ; Recover near ground (use ChangeState)
type = ChangeState
trigger1 = Pos Y >= 0
value = 872 ;HITFALL_RECOVER

;---------------------------------------------------------------------------
; Blind Blow - Opponent Bounce
[Statedef 872]
type    = A
movetype= H
physics = N
velset = 0,0

[State 0, Crash]
type = PlaySnd
trigger1 = time = 0
value = 800, 9

[State 0, EnvShake]
type = EnvShake
trigger1 = time = 0
time = 10
;freq = 40
ampl = 7
;phase = 20
;ignorehitpause =

[State 222, 1]
type = Changeanim
Trigger1 = time = 0
value = 5100

[State 222, 5]
type = ChangeState
trigger1 = time = 5
value = 873
ctrl = 0


;----------------------------------------------------------------------
;Blind Blow - Opponent in air (Can Recover)
[Statedef 873]
type = A
movetype = H
physics = N
velset = 5,-7


[State 873, 1] ;Gravity
type = VelAdd
Trigger1 = 1
y = .4

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 0
value = 5051
;elem = 1
;ignorehitpause =
;persistent =


[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 10
value = 5061


[State 871, 2]
type = ChangeState
triggerall = alive = 1
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200 ;HITFALL_RECOVER

[State 821, 4]
type = SelfState
Trigger1 = Vel Y > 0 && Pos Y >= 0
value = 5110

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


;-------------------------------------------------------
;Great Leap (Normal)
[Statedef 875]
type = A
movetype= A
physics = A
juggle = 0
;velset = 0,0
ctrl = 0
anim = 805


[State 875, 1]
type = HitDef
Trigger1 = Animelem = 2
attr = S, NT
hitflag = A-
priority = 1, Miss
sparkno = -1
sprpriority = 1
p1facing = 1 ;ifelse (command = "holdfwd", -1, 1)
p2facing = 1
p1stateno = 880
p2stateno = 890
guard.dist = 0
fall = 1

[State 875, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

[State 0, CtrlSet]
type = CtrlSet
trigger1 = AnimTime = 0
value = 1


;---------------------------------------------------------------------------
;Great Leap through Kagero
[Statedef 876]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 50
ctrl = 0
anim = 885
sprpriority = 3


[State 876, 1]
type = HitDef
Trigger1 = Time = 0 && enemy, statetype = A
attr = S, ST
hitflag = A-
priority = 1, Miss
sparkno = -1
sprpriority = 1
p1facing = 1 ;ifelse (command = "holdfwd", -1, 1)
p2facing = 1
p1stateno = 880
p2stateno = 890
guard.dist = 0
fall = 1

[State 876, 1]
type = HitDef
Trigger1 = Time = 0 && enemynear, statetype = S
attr = S, ST
hitflag = M-
priority = 1, Miss
sparkno = -1
sprpriority = 1
p1facing = 1 ;ifelse (command = "holdfwd", -1, 1)
p2facing = 1
p1stateno = 881
p2stateno = 890
guard.dist = 0
fall = 1



[State 876, 4]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= -10
value = 213
ctrl = 0

;----------------------------------------------------------------------
;Great Leap - Activate
[Statedef 880]
type = S
movetype= A
physics = S
anim = 880
poweradd = 60
velset = 0,0

[State 800, Grab]
type = PlaySnd
trigger1 = time = 0
value = 800, 10

[State 810, 2]
type = PlaySnd
trigger1 = animelem = 6
value = 200, 6

[State 880, 2]
type = PlaySnd
trigger1 = animelem = 5
value = 275, 1

[State 880, SprPriority]
type = SprPriority
trigger1 = Time > 0 && time <= 20
value = 7


[State 880, Bind 1]
type = TargetBind
trigger1 = Time = 0
pos = 0, 0

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 1
x = 5
y =-17

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 2
x = 5
y =-17

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 3
x = 5
y =-16


[State 810, Hurt]
type = TargetLifeAdd
trigger1 = AnimElem = 6
value = -150


[State 810, Throw]
type = TargetState
trigger1 = AnimElem = 6
value = 895


[State 810, EnvShake]
type = EnvShake
trigger1 = animelem = 6
time = 10
freq = 30
ampl = 4
phase = 10


[State 810, State End]
type = ChangeState
trigger1 = AnimTime = 0
value = 885
ctrl = 0

;----------------------------------------------------------------------
;Great Leap (Ground) - Activate
[Statedef 881]
type = S
movetype= A
physics = S
anim = 880
poweradd = 60
velset = 0,0

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

[State 0, PosAdd]
type = PosAdd
trigger1 = time = 0
y = 5


[State 881, Grab]
type = PlaySnd
trigger1 = time = 0
value = 800, 10

[State 881, 2]
type = PlaySnd
trigger1 = animelem = 6
value = 200, 6

[State 880, 2]
type = PlaySnd
trigger1 = animelem = 5
value = 275, 1

[State 880, SprPriority]
type = SprPriority
trigger1 = Time > 0 && time <= 20
value = 7


[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 1
x = 5
y =-17

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 2
x = 5
y =-17

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 3
x = 5
y =-16


[State 810, Hurt]
type = TargetLifeAdd
trigger1 = AnimElem = 6
value = -150


[State 810, Throw]
type = TargetState
trigger1 = AnimElem = 6
value = 895


[State 810, EnvShake]
type = EnvShake
trigger1 = animelem = 6
time = 10
freq = 30
ampl = 4
phase = 10


[State 810, State End]
type = ChangeState
trigger1 = AnimTime = 0
value = 885
ctrl = 0


;----------------------------------------------------------------------
;Great Leap - Finish
[Statedef 885]
type    = A
physics = A
velset = 4,-6
anim = 42
ctrl = 0

[State 0, CtrlSet]
type = CtrlSet
trigger1 = animtime = 0
value = 1
;ignorehitpause =
;persistent =



;----------------------------------------------------------------------
;Great Leap - Opponent Caught
[Statedef 890]
type = S
physics = N
movetype = H
velset = 0,0
ctrl = 0


[State 811, 1]
type = ChangeAnim
Trigger1 = time = 0
value = 5002

[State 811, 1]
type = ChangeAnim
Trigger1 = time = 28
value = 5030


;----------------------------------------------------------------------
;Great Leap - Slammed
[Statedef 895]
type = A
movetype = H
physics = N
velset = 0,11
poweradd = 40
anim = 5061
ctrl = 0

[State 895, EnvShake]
type = EnvShake
trigger1 = Vel Y > 0 && Pos Y >= 0
time = 15
freq = 30
ampl = 4
phase = 10

[State 821, 4] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground





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

;For debugging purposes
[State -2, Debug Info]
type = DisplayToClipboard
trigger1 = roundstate > 0
text = "Hits: %d, Win or DOS? %d, AI On %d, Super Jump %d, Recovery Roll %d"
;text = "Intro No. %d, Win No. %d, Enemy Proj: %d, Enemy Helpers: %d"
;text = "Score %d"
;text = "P2 Distance X from P1 %f, P2 Distance Y from P1 %f"
params = var(8), var(17), var(59), var(0), var(5)
;params = var(1), var(2), var(7), var(6)
;params = var(11)
;params = P2BodyDist X, P2BodyDist Y

;---------------------------------------------------------------------------
;Is DOS or Win?
[State -2, Detect System]
type = Varadd
trigger1 = (var(17)%2 = 0) && (movecontact) > (movecontact = 1)
v = 17
value = 1

;screenpack mvsc2?
[State -2, Detect Screeenpack]
type = Varadd
trigger1 = var(17) < 10 && roundstate < 2 && numexplod(8522) != 0
v = 17
value = 10

;---------------------------------------------------------------------------
; - mvsc2 screen pack
[State -2, Is MvC2 Screeenpack]
type = Explod
trigger1 = var(17) < 10 && roundstate < 2 && numexplod(8522) = 0
id = 8522
anim = 9001
pos = 0,240
postype = p1
removetime = 1
bindtime = -1
sprpriority = -1
ownpal = 1

;---------------------------------------------------------------------------
; - Press Start (from the Mvc2 screen pack)
[State -2, Press Start Label]
type = Explod
triggerall = var(59) = 1 && roundstate >= 0
trigger1 = (gametime%60) = id && life != 0
id = 8620
anim = 9001
pos = ((enemy, id)<id)*172, 0
postype = Left
removetime = 30
bindtime = -1
sprpriority = -1
ownpal = 1
ontop = 1

; Combo Messages and Score control =====================================
;
[State -2, VS_Combo]
type = VarSet
trigger1 = var(8) >= 3
trigger2 = var(8)=-1 && (movehit || p2stateno = 6300 || p2stateno = [5000,5899])
var(9) = 1+(var(8)>4)+(var(8)>5)+(var(8)>7)+(var(8)>9)+(var(8)>29)+(var(8)>49)+(var(8)>69)-(var(8)=-1)
ignorehitpause = 1

[State -2, Danger]
type = VarSet
trigger1 = var(10) !=1 && roundstate=2 && life = [1,250]
var(9) = 9
ignorehitpause = 1

[State -2, First Attack]
type = PlaySnd
triggerall = var(8)=-1
triggerall = NumExplod(8701) = 0
trigger1 = var(8)=-1 && (movehit || p2stateno = 6300 || p2stateno = [5000,5899])
persistent = 0
value = 230,0
volume=255
ignorehitpause = 1

[State -2, Combo Sound]
type = PlaySnd
trigger1 = NumExplod(8701) = 0
trigger1 = var(8)=0 && var(9)!=0
persistent = 0;1
value = 230,var(9)
volume=255
ignorehitpause = 1

[State -2, Left]
type = explod
trigger1 = var(8)=0 && var(9)!=0
trigger2 = var(8)=-1 && (movehit || p2stateno = 6300 || p2stateno = [5000,5899])
triggerall = TeamSide = 1 && NumExplod(8701) = 0
anim = (8000 + var(9))
ID = 8701
postype = left
pos = 0,80
ontop = 1
bindtime = -1
removetime = 60
supermovetime = 60
pausemovetime = 60
scale = 0.5,0.5
persistent = 0
ignorehitpause = 1

[State -2, Right]
type = explod
trigger1 = var(8)=0 && var(9)!=0
trigger2 = var(8)=-1 && (movehit || p2stateno = 6300 || p2stateno = [5000,5899])
triggerall = TeamSide = 2 && NumExplod(8701) = 0
anim = (8100+ var(9))
ID = 8701
postype = right
pos = -1,80
ontop = 1
bindtime = -1
removetime = 60
supermovetime = 60
pausemovetime = 60
scale = 0.5,0.5
persistent = 0;1
ignorehitpause = 1

[State -2, VS_Combo]
type = VarAdd
trigger1 = enemynear, time = 0
trigger1 = enemynear, Hitshakeover = 0
trigger1 = p2stateno = 6300 || p2stateno = [5000,5899]
trigger2 = var(8)=-1 && (movehit || p2stateno = 6300 || p2stateno = [5000,5899])
var(8) = 1 + (var(8)=-1)
ignorehitpause = 1

[State -2, VS_Combo]
type = VarSet
trigger1 = var(8)!=-1 && (p2movetype!=H || enemynear, ctrl)
trigger2 = var(8)=-1 && stateno = [5000,5899]
var(8) = 0 - (roundstate<2)
ignorehitpause = 1

[State -2, VS_Combo]
type = VarSet
triggerall = numexplod(8701)!=0
trigger1 = var(8)=0
var(9) = 0
ignorehitpause = 1

[State -2, Score]
type = Varadd
trigger1 = enemynear, time=0
trigger1 = enemynear, Hitshakeover=0
trigger1 = moveguarded || p2stateno = 6300 || p2stateno = [5000,5899]
trigger2 = var(8)=-1 && (movehit || p2stateno = 6300 || p2stateno = [5000,5899])
trigger3 = roundstate=4 && time=0 && stateno = [180,189]
var(11) = ceil(stateno/50)*var(8) + (life)*(roundstate=4) + (moveguarded)
ignorehitpause = 1

[State -2, Normalize Score]
type = Varset
triggerall = numpartner=1
trigger1 = var(11)< partner, var(11)
var(11) = partner, var(11)

[State -2, Is Danger]
type = VarSet
trigger2 = var(10) = 0 && life <= 250
trigger1 = var(10) = 1 && roundstate!=2
var(10) = (roundstate>1)
ignorehitpause = 1

[State -2, Is First Attack p3]
type = VarSet
triggerall = numpartner=1
trigger1 = partner, movehit
trigger1 = partner, var(8) != -1
var(8) = 0
ignorehitpause = 1


;--------------------------------------------------
;P2 Custom Slam FX
[State -2, Helper]
type = Helper
Triggerall = enemynear, movetype = H ;&& movehit
Trigger1 = enemynear, stateno = 292 || enemynear, stateno = 621 || enemy, stateno = 821 || enemynear, stateno = 872
helpertype = normal ;player
name = "Slam"
stateno = 204
pos = 0,0
postype = p2    ;p2,front,back,left,right
facing = 1
size.xscale = 0.7
size.yscale = 1
supermovetime = 999
pausemovetime = 999

;P2 Custom Slam FX #2
[State -2, Helper]
type = Helper
Triggerall = enemynear, movetype = H
Trigger1 = enemynear, stateno = 6034
helpertype = normal ;player
name = "Slam"
stateno = 204
pos = 0,0
postype = p2    ;p2,front,back,left,right
facing = 1
size.xscale = 0.7
size.yscale = 1
supermovetime = 999
pausemovetime = 999

;P2 Custom Slam FX #3
[State -2, Helper]
type = Helper
Triggerall = enemynear, stateno != 6034 || enemynear, stateno != 292 || enemynear, stateno != 621 || enemy, stateno != 821 || enemynear, stateno != 872
Triggerall = enemynear, movetype = H && (time > 0) && (time <= 3)
Trigger1 = enemynear, anim = 5100
helpertype = normal ;player
name = "Slam"
stateno = 204
pos = 0,0
postype = p2    ;p2,front,back,left,right
facing = 1
size.xscale = 0.7
size.yscale = 1
supermovetime = 999
pausemovetime = 999


;-----------------------------------
;MvC Damage Damper - Currently disabled. If enabled, the damage for Homura Tsumuji in both hitdefs needs 
;to be adjusted to 37, 11 and 45, 11 respectively.
;
[State -2, Damage based on hits]
type=varset
trigger1= numenemy
fvar(12)= enemynear,gethitvar(hitcount)
ignorehitpause=1

[State -2, Reset var when the opponent recovers]
type=varset
trigger1= numenemy
trigger1= (enemynear,movetype!=H)
trigger2= !numenemy
fvar(12)=1

[State -2, Dampener]
type=varset
trigger1=1
fvar(10)= ifelse(fvar(12)=0, 1, ifelse(fvar(12)=1, 1, .9**fvar(12)))
ignorehitpause=1


;[State -2, Dampener itself]
;type=attackmulset
;trigger1= 1
;value=fvar(10)
;ignorehitpause=1


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


