; The King of Fighters XI - Yuki CNS

;----------------------------------------------------------
;       Índice de Variáveis
;----------------------------------------------------------
; var(0)  = the simplifier variable, optional but helpful.
; var(1)  = winstate decider
; var(2)  = Attack strenght
; var(3)  = Yuki-Chan no Trap Viga/Chang Controller
; var(4)  =
; var(5)  = Long Jump
; var(6)  = Long Jump Sound Controller
; var(7)  =
; var(8)  =
; var(9)  =

; var(30) = Decides which button settings to use.

; var(56) = used by the XOR-ed commands method to detect recent custom states.
; var(57) = the GameTime variable, required by the helper and XOR methods.
; var(58) = the primary AI variable.

; var(59) = Winpose VS Yagami/Kyo

; fvar(7) = winpose abrazo
; fvar(8) = winpose abrazo
; fvar(9) = Winpose vs Yagami

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

[Size]
xscale = 1           
yscale = 1           
ground.back = 15
ground.front = 15
air.back = 15
air.front = 15
height = 65
attack.dist = 160    
proj.attack.dist = 90 
proj.doscale = 0     
head.pos = -10, -85
mid.pos = -10, -55
shadowoffset = 0    
draw.offset = 0,0    

[Velocity]
walk.fwd  = 3.25
walk.back = -2.25
run.fwd  = 6.261719, 0
run.back = -6.078125,-3.093735
jump.neu = 0,-10.013676
jump.back = -3.25
jump.fwd = 3.25
runjump.back = -4.54921875
runjump.fwd = 4.54921875
airjump.neu = 0,-9.066406
airjump.back = -3.3125
airjump.fwd = 3.3125
;low jump = -6.6015625

[Movement]
airjump.num = 0
airjump.height = 35
yaccel = .47266
stand.friction = .85
crouch.friction = .82

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

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

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

;---------------------------------------------------------------------------
; Stand to Crouch
[Statedef 10]
type    = C
physics = C
anim = 10
velset = 0,0

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

;---------------------------------------------------------------------------
; Crouching
[Statedef 11]
type    = C
physics = C
anim = 11
sprpriority = 0
velset = 0,0

[State 11, 1] ;Change from turning animation
type = ChangeAnim
trigger1 = Anim = 6 && AnimTime = 0
value = 11

;---------------------------------------------------------------------------
; Crouch to Stand
[Statedef 12]
type    = S
physics = S
anim = 12
velset = 0,0

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

;---------------------------------------------------------------------------
; Walk
[Statedef 20]
type    = S
physics = S
sprpriority = 0

[State 20, 1]
type = VelSet
trigger1 = command = "holdfwd"
x = const(velocity.walk.fwd.x)

[State 20, 2]
type = VelSet
trigger1 = command = "holdback"
x = const(velocity.walk.back.x)

[State 20, 3]
type = ChangeAnim
triggerall = vel x > 0
trigger1 = Anim != 20 && Anim != 5
trigger2 = Anim = 5 && Time > 0
value = 20

[State 20, 4]
type = ChangeAnim
triggerall = vel x < 0
trigger1 = Anim != 21 && Anim != 5
trigger2 = Anim = 5 && Time > 0
value = 21

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

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

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

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

[State 40, 4]
type = VarSet
trigger1 = command = "longjump"
trigger1 = !time
trigger2 = var(0)
trigger2 = P2Bodydist x > 65
var(5) = 1

[State 40, 5]
type = VarSet
triggerall = prevstateno = 100
trigger1 = !time
var(6) = 1

[State 40, 6]
type = VelSet
triggerall = !var(5)
triggerall = !var(0)
trigger1 = AnimTime = 0
x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))
y = ifelse(command = "holdup", const(velocity.jump.y),(const(velocity.jump.y)*.7428))

[State 40, 7]
type = VelSet
triggerall = var(5)
triggerall = !var(0)
trigger1 = AnimTime = 0
x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.runjump.fwd.x), const(velocity.runjump.back.x)))
y = ifelse(command = "holdup", const(velocity.jump.y),(const(velocity.jump.y)*.7428))

[State 40, 8]
type = VelSet
triggerall = !var(0)
trigger1 = AnimTime = 0
trigger1 = prevstateno = 100
trigger1 = sysvar(1) = 1
x = const(velocity.runjump.fwd.x)
y = ifelse(command = "holdup", const(velocity.jump.y),(const(velocity.jump.y)*.7428))

[State 40, 9]
type = VelSet
triggerall = !var(5)
triggerall = var(0)
trigger1 = AnimTime = 0
x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))
y = ifelse(p2bodydist x > 100, const(velocity.jump.y),(const(velocity.jump.y)*.7428))

[State 40, 10]
type = VelSet
triggerall = var(5)
triggerall = var(0)
trigger1 = AnimTime = 0
x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.runjump.fwd.x), const(velocity.runjump.back.x)))
y = ifelse(p2bodydist x > 100, const(velocity.jump.y),(const(velocity.jump.y)*.7428))

[State 40, 11]
type = VelSet
triggerall = var(0)
trigger1 = AnimTime = 0
trigger1 = prevstateno = 100
trigger1 = sysvar(1) = 1
x = const(velocity.runjump.fwd.x)
y = ifelse(P2Bodydist x > 100, const(velocity.jump.y),(const(velocity.jump.y)*.7428))

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


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

[State 50, 0]
type = PlaySnd
triggerall = var(6)
trigger1 = time = 0
value = s50,ifelse(vel y = const(velocity.jump.y),2,1)

[State 50, 1]
type = PlaySnd
triggerall = !var(5)
trigger1 = time = 0
value = s50,ifelse(vel y = const(velocity.jump.y),1,0)

[State 50, 2]
type = PlaySnd
triggerall = var(5)
trigger1 = time = 0
value = s50,ifelse(vel y = const(velocity.jump.y),2,1)

[State 50, 3]
type = VarSet
trigger1 = Time = 0
var(5) = 0

[State 50, 4]
type = VarSet
trigger1 = Time = 0
var(6) = 0

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

[State 50, 6]
type = ChangeAnim
triggerall = vel y > (const(velocity.jump.y))
trigger1 = Time = 0
value = ifelse((vel x)=0, 1041, ifelse((vel x)>0, 1042, 1043))

[State 50, 7]
type = ChangeAnim
triggerall = vel y <= const(velocity.jump.y)
trigger1 = Time = 0
value = ifelse((vel x)=0, 41, ifelse((vel x)>0, 42, 43))

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

[State 50, 9]
type = AfterImage
triggerall = vel x = const(velocity.runjump.fwd.x) || vel x = const(velocity.runjump.back.x)
trigger1 = time = 0
time = 20
length = 15
palbright = 40,40,40
palcontrast = 250,250,250
palpostbright = -80,-80,-80
timegap = 1
flamegap = 1
trans = add1

[State 50, 10]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 52

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

[State 52, 1]
type = playsnd
trigger1 = !time
value = s47,0

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

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

[State 52, 4]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; RUN_FWD
[Statedef 100]
type    = S
physics = S
anim = 100
sprpriority = 1
ctrl = 0

[State 100, 1]
type = VelSet
trigger1 = 1
x = const(velocity.run.fwd.x)

[State 100, 2]
type = Playsnd
trigger1 = time = 0
value = s100,1
channel = 2
loop = 1

[State 100, 3]
Type = ChangeState
Trigger1 = Command = "holdup"
Value = 40

[State 100, 4]
type = ChangeState
triggerall = Time > 9
trigger1 = command != "holdfwd"
value = 101
ctrl = 0

; RUN_FWD END
[Statedef 101]
type    = S
physics = S
anim = 101
sprpriority = 1
ctrl = 0
velset = 0,0

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

;---------------------------------------------------------------------------
; RUN_BACK
[Statedef 105]
type    = S
physics = S
ctrl = 0
anim = 105
sprpriority = 1
velset = 0,0

[State 105, 1]
type = Playsnd
trigger1 = animelem = 2
value = s105,0

;exp = e**
; x = a*e^(-b*x)
; a = 8.7461
; b = 0.0645

[State 105, 2]
type = VelSet
trigger1 = animElemTime(2) >= 0
x = -(8.66797232095506*exp((-0.05211626303051)*(time)))

[State 105, 3]
type = VelSet
trigger1 = animElemTime(2) = 0
y = const(velocity.run.back.y)

[State 105, 4]
type = Veladd
trigger1 = animElemTime(2) >= 0
y = .4375

[State 105, 5]
type = Veladd
trigger1 = time >= 11
y = -.2265625

[State 105, 6]
type = StateTypeSet
trigger1 = animElemTime(2) = 0
statetype = A
physics = N

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

;---------------------------------------------------------------------------
; RUN_BACK2 (land)
[Statedef 106]
type    = S
physics = S
ctrl = 0
anim = 106
velset = 0,0

[State 106, 1]
type = Playsnd
trigger1 = time = 0
value = s47,0

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

[State 106, 3]
type = PosSet
trigger1 = Time = 0
y = 0

[State 106, 4]
type = MakeDust
trigger1 = Time = 2
pos = -5,-2
spacing = 1

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

;---------------------------------------------------------------------------
; AGUARDHIT (shaking)
[Statedef 154]
type    = A
movetype= H
physics = N
velset = 0,0

[State 154, 1]
type = ChangeAnim
trigger1 = 1
value = 152

[State 154, 2]
type = ChangeState
trigger1 = HitShakeOver
value = 155 ;AGUARDHIT2

[State 154, 3]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 4

;---------------------------------------------------------------------------
; AGUARDHIT2 (knocked away)
[Statedef 155]
type    = A
movetype= H
physics = N
anim = 152

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

[State 155, 2]
type = VelAdd
trigger1 = 1
y = Const(movement.yaccel)

[State 155, 3]
type = VarSet
trigger1 = 1
sysvar(0) = (pos y >= 0) && (vel y > 0)

[State 155, 4]
type = VelSet
trigger1 = sysvar(0)
y = 0

[State 155, 5]
type = PosSet
trigger1 = sysvar(0)
y = 0

[State 155, 6]
type = ChangeState
trigger1 = sysvar(0)
trigger1 = command = "holdback"
trigger1 = inguarddist
value = 130

[State 155, 7]
type = ChangeState
trigger1 = sysvar(0)
value = 52

;---------------------------------------------------------------------------
; Lose by Time Over
[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
[Statedef 180]
type = S

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

;Win Abrazo (after Hyper)
[State 180, 2]
type = Changestate
triggerall = numhelper(3815)
trigger1 = time = 1
value = 186

;Win vs Kyo
[State 180, 3]
type = Changestate
triggerall = var(59) = 1
trigger1 = time = 1
value = 185

;Win vs Yagami
[State 180, 4]
type = Changestate
triggerall = var(59) = 2
trigger1 = time = 1
value = 187

[State 180, 5]
type = ChangeState
triggerall = command = "holdx"
trigger1 = time = 1
value = 181

[State 180, 6]
type = ChangeState
triggerall = command = "holdy"
trigger1 = time = 1
value = 182

[State 180, 7]
type = ChangeState
triggerall = command = "holda"
trigger1 = time = 1
value = 183

[State 180, 8]
type = ChangeState
triggerall = command = "holdb"
trigger1 = time = 1
value = 184

[State 180, 9]
type = ChangeState
trigger1 = Time = 1
value = 180 + var(1)

;---------------------------------------------------------------------------
; Winpose 1
[Statedef 181]
type = S
ctrl = 0
anim = 180
velset = 0,0

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

[State 181, 2]
type = PlaySnd
trigger1 = animelem = 2
value = S180,0
channel = 0

[State 182, 3]
type = Helper
triggerall = teammode = single
trigger1 = time = 160 && MatchOver
helpertype = normal
name = "Winscreen"
ID = 3650
stateno = 3650
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1

[State 182, 4]
type = AssertSpecial
trigger1 = time <= 200
flag = roundnotover


;---------------------------------------------------------------------------
 Winpose 2
[Statedef 182]
type = S
ctrl = 0
anim = 181
velset = 0,0

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

[State 182, 2]
type = PlaySnd
trigger1 = animelem = 2
value = S181,0
channel = 0

[State 182, 3]
type = Helper
triggerall = teammode = single
trigger1 = time = 170 && MatchOver
helpertype = normal
name = "Winscreen"
ID = 3650
stateno = 3650
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1

[State 182, 4]
type = AssertSpecial
trigger1 = time <= 200
flag = roundnotover

;---------------------------------------------------------------------------
 Winpose 3 (KOF Kyo)
[Statedef 183]
type = S
ctrl = 0
anim = 182
velset = 0,0

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

[State 183, 2]
type = PlaySnd
trigger1 = animelem = 3
value = S1000,9

[State 183, 3]
type = Explod
trigger1 = animelem = 3, = 0
anim = 8058
ID = 8058
pos = 0,0
postype = p1
facing = 1
bindtime = 1
scale = 1,1
vel = 0,0
accel = 0,0
random = 0,0
sprpriority = 3
ownpal = 1
removeongethit = 0
removetime = 22

[State 183, 4]
type = PlaySnd
trigger1 = animelem = 4
value = S1600,0
channel = 0

[State 183, 5]
type = Helper
triggerall = teammode = single
trigger1 = time = 160 && MatchOver
helpertype = normal
name = "Winscreen"
ID = 3650
stateno = 3650
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1

[State 183, 6]
type = AssertSpecial
trigger1 = time <= 180
flag = roundnotover

;---------------------------------------------------------------------------
 Winpose 4 (Fail)
[Statedef 184]
type = S
ctrl = 0
anim = 183
velset = 0,0

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

[State 184, 2]
type = PlaySnd
triggerall = anim = 183
trigger1 = animelem = 2
value = s1840,0
channel = 0

[State 184, 3]
type = Helper
triggerall = anim = 183
trigger1 = animelem = 3
helpertype = normal
name = "Syo"
ID = 1840
stateno = 1840
postype = back
pos = -500,0
facing = 1
keyctrl = 0
ownpal = 0

[State 184, 4]
type = ChangeAnim
triggerall = anim = 183
triggerall = numhelper(1840) = 1
trigger1 =  (helper(1840), pos x - pos x)*facing >= -200
value = 184

[State 184, 5]
type = PlaySnd
triggerall = anim = 184
trigger1 = animelem = 1
value = S1600,0
channel = 0

[State 184, 6]
type = PlaySnd
triggerall = anim = 184
trigger1 = animelem = 10
value = s194,3
channel = 0

[State 184, 7]
type = Helper
triggerall = anim = 184
trigger1 = animelem = 11
helpertype = normal
name = "Kyo"
ID = 1842
stateno = 1842
postype = back
pos = -80,0
facing = 1
keyctrl = 0
ownpal = 0

[State 184, 8]
type = ChangeAnim
triggerall = anim = 184
triggerall = numhelper(1842) = 1
trigger1 = (helper(1842), pos x - pos x)*facing >= -10
value = 186

[State 184, 9]
type = Explod
triggerall = anim = 186
trigger1 = animelem = 1, = 1
anim = 8000
ID = 8000
pos = -10,-65
postype = p1
facing = 1
bindtime = 1
scale = 1,1
vel = 0,0
accel = 0,0
random = 0,0
sprpriority = 3
ownpal = 1
removeongethit = 0
removetime = 11

[State 184, 10]
type = PlaySnd
triggerall = anim = 186
trigger1 = animelem = 1, = 1
value = S201,1

[State 184, 11]
type = PlaySnd
triggerall = anim = 186
trigger1 = animelem = 1, = 1
value = s5000,1
channel = 0

[State 184, 12]
type = PlaySnd
triggerall = anim = 186
trigger1 = animelem = 18
value = s3100,0
channel = 0

[State 184, 13]
type = PlaySnd
triggerall = anim = 186
trigger1 = animelem = 19
value = S1220,1

[State 184, 14]
type = EnvShake
triggerall = anim = 186
trigger1 = animelem = 19
ampl = 4
time = 20

[State 184, 15]
type = Explod
triggerall = anim = 186
trigger1 = animelem = 19
anim = 8056
ID = 8056
pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = 11
scale = 1,1
sprpriority = 1
ownpal = 1
removeongethit = 0

[State 184, 16]
type = Explod
triggerall = anim = 186
trigger1 = animelem = 20
anim = 8057
ID = 8057
pos = 0,4
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = 7
scale = 1,1
sprpriority = 2
ownpal = 1
removeongethit = 0

[State 184, 17]
type = Helper
triggerall = teammode = single
trigger1 = time = 270 && MatchOver
helpertype = normal
name = "Winscreen"
ID = 3650
stateno = 3650
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1

[State 184, 18]
type = AssertSpecial
trigger1 = time <= 280
flag = roundnotover

;---------------------------------------------------------------------------
; Syo
[Statedef 1840]
type = S
ctrl = 0
anim = 187
velset = 0,0
sprpriority = ifelse(TeamSide = 1, 4, 3)

[State 1840, 1]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1840, 2]
type = VelSet
trigger1 = 1
x = 8

[State 1840, 3]
type = PlaySnd
trigger1 = time = 20
value = S180,20

[State 1840, 4]
type = Helper
trigger1 = !time
helpertype = normal
name = "Moto"
ID = 1841
stateno = 1841
postype = p1
pos = 0,0
facing = 1
keyctrl = 0
ownpal = 0

[State 1840, 5]
type = destroyself
trigger1 = Frontedgedist < -200

;---------------------------------------------------------------------------
; Moto
[Statedef 1841]
type = S
physics = N
ctrl = 0
anim = 1902
velset = 0,0
sprpriority = ifelse(TeamSide = 1, 4, 3)

[State 1841, 1]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1841, 2]
type = BindToParent
trigger1 = 1
pos = 0,0

[State 1841, 3]
type = Playsnd
trigger1 = animelem = 1, = 1
value = s190,5
persistent = 0

[State 1841, 4]
type = Playsnd
trigger1 = time = 25
value = s180,5
persistent = 0

[State 1841, 5]
type = destroyself
trigger1 = Frontedgedist < -200


;---------------------------------------------------------------------------
;Kyo Running
[Statedef 1842]
type    = S
movetype= A
physics = N
anim = 188
velset = 0,0
poweradd = 0
ctrl = 0
sprpriority = 1

[State 1842, 1]
type = VelSet
trigger1 = 1
x = const(velocity.run.fwd.x)*1.3

[State 1842, 2]
type = Playsnd
trigger1 = time = 0
value = s12,8
channel = 2
loop = 1

[State 1842, 3]
type = PlaySnd
trigger1 = time = 5
value = S180,16

[State 1842, 4]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1842, 5]
type = StopSnd
trigger1 = Frontedgedist < -100
channel = 2

[State 1842, 6]
type = destroyself
trigger1 = Frontedgedist < -100


;---------------------------------------------------------------------------
; Winpose vs Kyo
[Statedef 185]
type = S
ctrl = 0
anim = 185
velset = 0,0

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

[State 185, 2]
type = PlaySnd
trigger1 = animelem = 2
value = S183,0
channel = 0

[State 185, 3]
type = Helper
triggerall = teammode = single
trigger1 = time = 135 && MatchOver
helpertype = normal
name = "Winscreen"
ID = 3650
stateno = 3650
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1

[State 185, 4]
type = AssertSpecial
trigger1 = time <= 140
flag = roundnotover


;---------------------------------------------------------------------------
; Winpose Abrazo
[Statedef 186]
type = S
ctrl = 0
anim = 189
velset = 0,0
sprpriority = 2

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

[State 186, 2]
type = Helper
trigger1 = !time
helpertype = normal
name = "Yuki"
ID = 1860
stateno = 1860
postype = p1
pos = 0,0
facing = 1
keyctrl = 0
ownpal = 1

[State 186, 3]
type = AssertSpecial
triggerall = numhelper(1860)
trigger1 = 1
flag = invisible

[State 186, 4]
type = ChangeAnim
triggerall = numhelper(1860)
trigger1 = helper(1860), anim = 100
trigger2 = numhelper(1860) && helper(1860), anim = 189 && helper(1860), time < 1
value = anim

[State 186, 5]
type = VarSet
trigger1 = !time
fvar(7) = helper(3815), pos x

[State 186, 6]
type = VarSet
trigger1 = 1
fvar(8) = (helper(1860), pos x - pos x)*facing

[State 186, 7]
type = Helper
triggerall = teammode = single
trigger1 = time = 190 && MatchOver
helpertype = normal
name = "Winscreen"
ID = 3650
stateno = 3650
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1

[State 186, 8]
type = AssertSpecial
trigger1 = time <= 200
flag = roundnotover

;---------------------------------------------------------------------------
; Yuki Helper
[Statedef 1860]
type = S
physics = N
ctrl = 0
anim = 100
velset = 0,0
sprpriority = 2

[State 1860, 1]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1860, 2]
type = VelSet
triggerall = anim = 100
trigger1 = animelemtime(2) = 0
x = const(velocity.run.fwd.x)

[State 1860, 3]
type = Playsnd
triggerall = anim = 100
trigger1 = animelem = 2
value = s100,1

[State 1860, 4]
type = ChangeAnim
triggerall = anim = 100
trigger1 = (parent, fvar(7) - pos x)*facing <= 15
value = 189

[State 1860, 5]
type = VelSet
triggerall = anim = 189
trigger1 = 1
x = 0

[State 1860, 6]
type = playsnd
triggerall = anim = 189
trigger1 = animelem = 3
value = s182,0
channel = 0

[State 1860, 7]
type = playsnd
triggerall = anim = 189
trigger1 = animelem = 9
value = s182,1
channel = 0

[State 1860, 8]
type = AssertSpecial
trigger1 = time <= 140
flag = roundnotover

;---------------------------------------------------------------------------
; Kyo Abrazo
[Statedef 1861]
type = S
physics = N
ctrl = 0
anim = 3840;1890
velset = 0,0
sprpriority = 1

[State 1861, 1]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1861, 2]
type = ChangeAnim
triggerall = anim != 1890
trigger1 = parent, stateno = 186 && parent, anim = 189 && parent, animelemtime(2) >= 0
value = 1890

[State 1861, 3]
type = Explod
triggerall = anim = 1890
trigger1 = animelem = 12
anim = 1891
ID = 1891
pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
scale = 1,1
sprpriority = 3

[State 1861, 4]
type = Playsnd
triggerall = anim = 1890
trigger1 = animelem = 7
value = s180,2

[State 1861, 5]
type = BindToParent
triggerall = anim = 1890
trigger1 = animelemtime(10) >= 0
pos = ceil(parent, fvar(8))+12,0

;---------------------------------------------------------------------------
; Winpose vs Yagami
[Statedef 187]
type = S
ctrl = 0
anim = 1870
velset = 0,0

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

[State 187, 2]
type = Helper
trigger1 = !time
helpertype = normal
name = "Yuki"
ID = 1870
stateno = 1870
postype = p1
pos = 0,0
facing = 1
keyctrl = 0
ownpal = 1

[State 187, 3]
type = AssertSpecial
triggerall = numhelper(1870)
trigger1 = 1
flag = invisible

[State 187, 4]
type = ChangeAnim
triggerall = numhelper(1870)
trigger1 = helper(1870), anim = 100
trigger2 = helper(1870), anim = 105
trigger3 = helper(1870), anim = 106
value = anim

[State 187, 5]
type = VarSet
trigger1 = !time
fvar(9) = helper(1870), pos x

[State 187, 6]
type = Helper
triggerall = teammode = single
trigger1 = time = 245 && MatchOver
helpertype = normal
name = "Winscreen"
ID = 3650
stateno = 3650
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1

[State 187, 7]
type = AssertSpecial
trigger1 = time <= 250
flag = roundnotover

;---------------------------------------------------------------------------
; Yuki Helper
[Statedef 1870]
type = S
physics = N
ctrl = 0
anim = ifelse(((pos x)*facing) < 0, 100, 105)
velset = 0,0
sprpriority = 2

[State 1870, 1]
type = VarSet
trigger1 = 1
fvar(15) = pos x

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

[State 1870, 3]
type = AssertSpecial
trigger1 = 1
flag = roundnotover

[State 1870, 4]
type = PlayerPush
trigger1 = 1
value = 0

[State 1870, 5]
type = VelSet
triggerall = anim = 100
trigger1 = animelemtime(2) = 0
x = const(velocity.run.fwd.x)

[State 1870, 6]
type = Playsnd
triggerall = anim = 100
trigger1 = animelem = 2
value = s100,1

[State 1870, 7]
type = VelSet
triggerall = anim = 105
trigger1 = AnimElem = 2
x = -(fvar(15))*facing/16.0
y = -4.8

[State 1870, 8]
type = StateTypeSet
triggerall = anim = 105
trigger1 = animelem = 2
statetype = A
physics = N

[State 1870, 9]
type = VelMul
triggerall = anim = 105
trigger1 = AnimElemTime(2) > 0
x = .98

[State 1870, 10]
type = VelAdd
triggerall = anim = 105
trigger1 = AnimElemTime(2) > 0
y = .65

[State 1870, 11]
type = playsnd
triggerall = anim = 105
trigger1 = animelem = 2
value = s105,0

[State 1870, 12]
type = ChangeState
triggerall = anim = 100
trigger1 = facing = 1 && pos x >= 0
trigger2 = facing = -1 && pos x <= 0
value = 1871

[State 1870, 13]
type = ChangeState
triggerall = anim = 105
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 1871

[Statedef 1871]
type    = S
physics = S
ctrl = 0
anim = anim+1
velset = 0,0

[State 1871, 1]
type = playsnd
triggerall = anim = 106
trigger1 = animelem = 1
value = s47,0

[State 1871, 2]
type = PosSet
trigger1 = !time
y = 0
x = 0

[State 1871, 3]
type = ChangeAnim
triggerall = anim = 101 || anim = 106
trigger1 = !animtime
value = 1870

[State 1871, 4]
type = playsnd
triggerall = anim = 1870
trigger1 = animelem = 4
value = s184,0
channel = 0

[State 1871, 5]
type = Helper
triggerall = numhelper(1872) = 0
trigger1 = animelem = 1, = 0
helpertype = normal
name = "Athena"
ID = 1872
stateno = 1872
pos = -23,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1

[State 1871, 6]
type = Helper
triggerall = numhelper(1873) = 0
trigger1 = animelem = 1, = 0
helpertype = normal
name = "Yuri"
ID = 1873
stateno = 1873
pos = -25,-200
postype = p1
facing = 1
keyctrl = 0
ownpal = 1

[State 1871, 7]
type = Helper
triggerall = anim = 1870
triggerall = numhelper(1875) = 0
trigger1 = animelem = 4
helpertype = normal
name = "Mai"
ID = 1875
stateno = 1875
pos = -80,0
postype = back
facing = 1
keyctrl = 0
ownpal = 1

[State 1871, 8]
type = Helper
triggerall = numhelper(1877) = 0
trigger1 = animelem = 1, = 1
helpertype = normal
name = "Whip"
ID = 1877
stateno = 1877
pos = 90,-200
postype = p1
facing = 1
keyctrl = 0
ownpal = 1

[State 1871, 9]
type = Helper
triggerall = numhelper(1879) = 0
trigger1 = animelem = 1, = 2
helpertype = normal
name = "Shermie"
ID = 1879
stateno = 1879
pos = 153,-200
postype = p1
facing = 1
keyctrl = 0
ownpal = 1

[State 1871, 10]
type = Helper
triggerall = numhelper(1881) = 0
trigger1 = animelem = 1, = 3
helpertype = normal
name = "Shiki"
ID = 1881
stateno = 1881
pos = 120,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1

[State 1871, 11]
type = Helper
triggerall = numhelper(1882) = 0
trigger1 = animelem = 1, = 1
helpertype = normal
name = "Nakoruru"
ID = 1882
stateno = 1882
pos = -150,-200
postype = p1
facing = 1
keyctrl = 0
ownpal = 1

[State 1871, 12]
type = Helper
triggerall = anim = 1870
triggerall = numhelper(1887) = 0
trigger1 = animelem = 1, = 2
helpertype = normal
name = "Akari"
ID = 1887
stateno = 1887
pos = 80,0
postype = front
facing = -1
keyctrl = 0
ownpal = 1

[State 1871, 13]
type = Helper
triggerall = numhelper(1889) = 0
trigger1 = animelem = 1, = 3
helpertype = normal
name = "Leona"
ID = 1889
stateno = 1889
pos = -180,-200
postype = p1
facing = 1
keyctrl = 0
ownpal = 1


;---------------------------------------------------------------------------
; Athena
[Statedef 1872]
type = S
physics = N
ctrl = 0
anim = 1871
velset = 0,0
sprpriority = 2

[State 1872, 1]
type = NotHitBy
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 1872, 2]
type = Trans
trigger1 = AnimElemtime(1) >= 0 && AnimElemtime(8) < 0
trans = addalpha
alpha = animelemtime(1)*10,255-animelemtime(1)*5

[State 1872, 3]
type = Explod
trigger1 = animelem = 1
anim = 1972
ID = 1972
pos = 0,-65
postype = p1
facing = 1
bindtime = 1
scale = 1,1
vel = 0,0
accel = 0,0
random = 0,0
sprpriority = 1
ownpal = 1
removeongethit = 0
removetime = 36

[State 1872, 4]
type = Playsnd
trigger1 = animelem = 1
value = s1000,5

[State 1872, 5]
type = Playsnd
trigger1 = animelem = 1, = 2
value = s184,1

[State 1872, 6]
type = Playsnd
trigger1 = animelem = 10
value = s184,2

[State 1872, 7]
type = DestroySelf
trigger1 = roundstate = 0
trigger2 = numhelper(3650) = 1


;---------------------------------------------------------------------------
; Yuri
[Statedef 1873]
type = A
physics = N
ctrl = 0
anim = 1872
velset = 2,0
sprpriority = 2

[State 1873, 1]
type = NotHitBy
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 1873, 2]
type = Veladd
trigger1 = 1
y = .5

[State 1873, 3]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 1874

[Statedef 1874]
type    = S
physics = S
ctrl = 0
anim = 1873
velset = 0,0

[State 1874, 1]
type = playsnd
trigger1 = animelem = 1
value = s47,0

[State 1874, 2]
type = PosSet
trigger1 = !time
y = 0

[State 1874, 3]
type = playsnd
trigger1 = animelem = 6
value = s184,3

[State 1874, 4]
type = DestroySelf
trigger1 = roundstate = 0
trigger2 = numhelper(3650) = 1


;---------------------------------------------------------------------------
; Mai
[Statedef 1875]
type = S
physics = N
ctrl = 0
anim = 1874
velset = 0,0
sprpriority = 3

[State 1875, 1]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1875, 2]
type = PlayerPush
trigger1 = 1
value = 0

[State 1875, 3]
type = VelSet
trigger1 = animelemtime(1) = 0
x = const(velocity.run.fwd.x)

[State 1875, 4]
type = Playsnd
trigger1 = animelem = 1, = 1
value = s100,1
persistent = 0

[State 1875, 5]
type = ChangeState
trigger1 = facing = 1 && pos x >= 33
trigger2 = facing = -1 && pos x <= -33
value = 1876

[Statedef 1876]
type    = S
physics = S
ctrl = 0
anim = anim+1
velset = 0,0

[State 1876, 1]
type = PosAdd
trigger1 = animelem = 3
x = 10

[State 1876, 2]
type = PosAdd
trigger1 = animelem = 4
x = 5

[State 1876, 3]
type = PosAdd
trigger1 = animelem = 5
x =6

[State 1876, 4]
type = PosAdd
trigger1 = animelem = 6
x = 8

[State 1876, 5]
type = PosAdd
trigger1 = animelem = 7
x = 3

[State 1876, 6]
type = PlaySnd
trigger1 = animelem = 3
value = S1890,6

[State 1876, 7]
type = DestroySelf
trigger1 = roundstate = 0
trigger2 = numhelper(3650) = 1


;---------------------------------------------------------------------------
; Whip
[Statedef 1877]
type = A
physics = N
ctrl = 0
anim = 1876
velset = 0,8
sprpriority = 5

[State 1877, 1]
type = NotHitBy
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 1877, 2]
type = PlaySnd
trigger1 = animelem = 1
value = S1890,4

[State 1877, 3]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 1878

[Statedef 1878]
type    = S
physics = S
ctrl = 0
anim = anim+1
velset = 0,0

[State 1878, 1]
type = playsnd
trigger1 = animelem = 1
value = s47,0

[State 1878, 2]
type = PosSet
trigger1 = !time
y = 0

[State 1878, 3]
type = DestroySelf
trigger1 = roundstate = 0
trigger2 = numhelper(3650) = 1


;---------------------------------------------------------------------------
; Shermie
[Statedef 1879]
type = A
physics = N
ctrl = 0
anim = 1878
velset = -2,0
sprpriority = 3

[State 1879, 1]
type = NotHitBy
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 1879, 2]
type = Veladd
trigger1 = 1
y = .5

[State 1879, 3]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 1880

[Statedef 1880]
type    = S
physics = S
ctrl = 0
anim = anim+1
velset = 0,0

[State 1880, 1]
type = playsnd
trigger1 = animelem = 1
value = s47,0

[State 1880, 2]
type = PosSet
trigger1 = !time
y = 0

[State 1880, 3]
type = PlaySnd
trigger1 = animelem = 3
value = S1890,5

[State 1880, 4]
type = DestroySelf
trigger1 = roundstate = 0
trigger2 = numhelper(3650) = 1


;---------------------------------------------------------------------------
; Shiki
[Statedef 1881]
type = S
physics = N
ctrl = 0
anim = 1880
velset = 0,0
sprpriority = 5

[State 1881, 1]
type = NotHitBy
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 1881, 2]
type = Trans
trigger1 = AnimElemtime(1) >= 0 && AnimElemtime(8) < 0
trans = addalpha
alpha = animelemtime(1)*10,255-animelemtime(1)*5

[State 1881, 3]
type = Explod
trigger1 = animelem = 1
anim = 1881
ID = 1881
pos = 5,-77
postype = p1
facing = 1
bindtime = 1
scale = 1,1
vel = 0,0
accel = 0,0
random = 0,0
sprpriority = 5
ownpal = 1
removeongethit = 0
removetime = 36

[State 1881, 4]
type = PlaySnd
trigger1 = animelem = 1
value = S1890,9

[State 1881, 5]
type = PlaySnd
trigger1 = animelem = 1
value = S1890,8

[State 1881, 6]
type = DestroySelf
trigger1 = roundstate = 0
trigger2 = numhelper(3650) = 1

;---------------------------------------------------------------------------
; Nakoruru
[Statedef 1882]
type = A
physics = N
ctrl = 0
anim = 1882
velset = 1,2
sprpriority = 1

[State 1882, 1]
type = Helper
triggerall = anim = 1882
triggerall = numhelper(1885) = 0
trigger1 = animelem = 1
helpertype = normal
name = "Mamahaha"
ID = 1885
stateno = 1885
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1

[State 1882, 2]
type = NotHitBy
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 1882, 3]
type = ChangeAnim
triggerall = anim = 1882
trigger1 = time = 70
value = 1883

[State 1882, 4]
type = VelSet
triggerall = anim = 1883
trigger1 = animelem = 1
x = 2
y = 5.5

[State 1882, 5]
type = ChangeState
triggerall = anim = 1883
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 1883

[Statedef 1883]
type    = S
physics = S
ctrl = 0
anim = anim+1
velset = 0,0

[State 1883, 1]
type = playsnd
trigger1 = animelem = 1
value = s47,0

[State 1883, 2]
type = PosSet
trigger1 = !time
y = 0

[State 1883, 3]
type = PlaySnd
trigger1 = animelem = 6
value = S1890,2

[State 1883, 4]
type = DestroySelf
trigger1 = roundstate = 0
trigger2 = numhelper(3650) = 1

;---------------------------------------------------------------------------
; Mamahaha
[Statedef 1885]
type = A
physics = N
ctrl = 0
anim = 1885
velset = 0,0
sprpriority = 0

[State 1885, 1]
type = BindToParent
triggerall = parent, anim = 1882
trigger1 = 1
pos = -3,-89

[State 1885, 2]
type = PlaySnd
trigger1 = animelem = 1
value = S1890,1

[State 1885, 3]
type = NotHitBy
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 1885, 4]
type = SprPriority
triggerall = vel x = -.35
trigger1 = 1
value = 1

[State 1885, 5]
type = VelSet
triggerall = parent, stateno = 1883 && parent, animelem = 8
trigger1 = 1
x = -.35
y = 4

[State 1885, 6]
type = ChangeState
triggerall = parent, stateno = 1883
trigger1 = parent, pos y - pos y <= 86
value = 1886
ctrl = 0


[Statedef 1886]
type = A
physics = N
ctrl = 0
anim = anim+1
velset = 0,0
sprpriority = 1

[State 1886, 1]
type = BindToParent
trigger1 = 1
pos = -33,-86

[State 1886, 2]
type = NotHitBy
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 1886, 3]
type = PlaySnd
trigger1 = time = 40
value = S1890,0

[State 1886, 4]
type = DestroySelf
trigger1 = roundstate = 0
trigger2 = numhelper(3650) = 1

;---------------------------------------------------------------------------
; Akari
[Statedef 1887]
type = S
physics = N
ctrl = 0
anim = 1887
velset = 0,0
sprpriority = 1

[State 1887, 1]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1887, 2]
type = PlayerPush
trigger1 = 1
value = 0

[State 1887, 3]
type = VelSet
trigger1 = animelemtime(1) = 0
x = const(velocity.run.fwd.x)

[State 1887, 4]
type = Playsnd
trigger1 = animelem = 1, = 1
value = s100,1
persistent = 0

[State 1887, 5]
type = ChangeState
trigger1 = facing = -1 && pos x <= -87
trigger2 = facing = 1 && pos x >= 87
value = 1888

[Statedef 1888]
type    = S
physics = S
ctrl = 0
anim = anim+1
velset = 0,0

[State 1888, 1]
type = SprPriority
trigger1 = animelem = 7
value = 2

[State 1888, 2]
type = PlaySnd
trigger1 = animelem = 7
value = S1890,3

[State 1888, 3]
type = DestroySelf
trigger1 = roundstate = 0
trigger2 = numhelper(3650) = 1

;---------------------------------------------------------------------------
; Leona
[Statedef 1889]
type = A
physics = N
ctrl = 0
anim = 1889
velset = 2,0
sprpriority = 1

[State 1889, 1]
type = NotHitBy
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 1889, 2]
type = Veladd
trigger1 = 1
y = .5

[State 1889, 3]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 1890

[Statedef 1890]
type    = S
physics = S
ctrl = 0
anim = 18900
velset = 0,0

[State 1890, 1]
type = playsnd
trigger1 = animelem = 1
value = s47,0

[State 1890, 2]
type = PosSet
trigger1 = !time
y = 0

[State 1890, 3]
type = playsnd
trigger1 = animelem = 2
value = s1890,7

[State 1890, 4]
type = DestroySelf
trigger1 = roundstate = 0
trigger2 = numhelper(3650) = 1


;---------------------------------------------------------------------------
; PREINTRO
[Statedef 190]
type = S
ctrl = 0
velset = 0,0

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

;intro vs Athena
[State 190, 2]
type = Changestate
trigger1 = !time && (P2Name = "Athena Asamiya" || P4Name = "Athena Asamiya" ) && enemy,authorname = "Warusaki3"
trigger2 = !time && (P2Name = "Athena_Asamiya" || P4Name = "Athena_Asamiya" ) && enemy,authorname = "nana"
trigger3 = !time && (P2Name = "Athena Asamiya" || P4Name = "Athena Asamiya" ) && enemy,authorname = "Man"
trigger4 = !time && (P2Name = "Athena Asamiya" || P4Name = "Athena Asamiya" ) && enemy,authorname = "ahuron"
trigger5 = !time && (P2Name = "Athena Asamiya XI" || P4Name = "Athena Asamiya XI" ) && enemy,authorname = "KoopaKoot"
trigger6 = !time && (P2Name = "D-Athena" || P4Name = "D-Athena" ) && enemy,authorname = "ahuron"
trigger7 = !time && (P2Name = "Athena Asamiya" || P4Name = "Athena Asamiya" ) && enemy,authorname = "ahuron"
trigger8 = !time && (P2Name = "athena-rkn" || P4Name = "athena-rkn" )
trigger9 = !time && (P2Name = "Athena Asamiya" || P4Name = "Athena Asamiya" )
value = 1940

;intro vs Kensou
[State 190, 3]
type = Changestate
trigger1 = !time && (P2Name = "Sie Kensou" || P4Name = "Sie Kensou" ) && enemy,authorname = "NeoGouki"
trigger2 = !time && (P2Name = "Sie Kensou" || P4Name = "Sie Kensou" ) && enemy,authorname = "MotherEarth"
trigger3 = !time && (P2Name = "Sie Kensou" || P4Name = "Sie Kensou" ) && enemy,authorname = "JFCT555"
trigger4 = !time && (P2Name = "Tin's Kensou2" || P4Name = "Tin's Kensou2" ) && enemy,authorname = "Tin"
trigger5 = !time && (P2Name = "Sie Kensou" || P4Name = "Sie Kensou" )
value = 1945

;intro vs Sakura
[State 190, 4]
type = Changestate
trigger1 = !time && (P2Name = "Sakura" || P4Name = "Sakura" ) && enemy,authorname = "Dark Girl"
trigger2 = !time && (P2Name = "KOF Sakura" || P4Name = "KOF Sakura" ) && enemy,authorname = "Dark Girl"
trigger3 = !time && (P2Name = "KOF Sakura Kasugano" || P4Name = "KOF Sakura Kasugano" ) && enemy,authorname = "Dark Girl"
trigger4 = !time && (P2Name = "SNK Sakura" || P4Name = "SNK Sakura" ) && enemy,authorname = "Dark Girl"
trigger5 = !time && (P2Name = "Sakura Kasugano" || P4Name = "Sakura Kasugano" ) && enemy,authorname = "Dark Girl"
trigger6 = !time && (P2Name = "SNK Sakura Kasugano" || P4Name = "SNK Sakura Kasugano" ) && enemy,authorname = "Dark Girl"
trigger7 = !time && (P2Name = "Sakura" || P4Name = "Sakura" ) && enemy,authorname = "darkgirl"
trigger8 = !time && (P2Name = "KOF Sakura" || P4Name = "KOF Sakura" ) && enemy,authorname = "darkgirl"
trigger9 = !time && (P2Name = "KOF Sakura Kasugano" || P4Name = "KOF Sakura Kasugano" ) && enemy,authorname = "darkgirl"
trigger10 = !time && (P2Name = "SNK Sakura" || P4Name = "SNK Sakura" ) && enemy,authorname = "darkgirl"
trigger11 = !time && (P2Name = "Sakura Kasugano" || P4Name = "Sakura Kasugano" ) && enemy,authorname = "darkgirl"
trigger12 = !time && (P2Name = "SNK Sakura Kasugano" || P4Name = "SNK Sakura Kasugano" ) && enemy,authorname = "darkgirl"
trigger13 = !time && (P2Name = "Sakura Kasugano" || P4Name = "Sakura Kasugano" )
value = 1950

;intro vs Yagami
[State 190, 5]
type = Changestate
trigger1 = !time && (P2Name = "Another Iori" || P4Name = "Another Iori" ) && enemy,authorname = "--4LUC4RD H3L§!NG--"
trigger2 = !time && (P2Name = "Iori yagami" || P4Name = "Iori yagami" ) && enemy,authorname = "Zelgadis"
trigger3 = !time && (P2Name = "d-Yagami" || P4Name = "d-Yagami" ) && enemy,authorname = "jin"
trigger4 = !time && (P2Name = "F-iori" || P4Name = "F-iori" ) && enemy,authorname = "·ç»¨"
trigger5 = !time && (P2Name = "God_Iori" || P4Name = "God_Iori" ) && enemy,authorname = "Zelgadis"
trigger6 = !time && (P2Name = "Iori Yagami" || P4Name = "Iori Yagami" ) && enemy,authorname = "Sander71113"
trigger7 = !time && (P2Name = "Iori-98" || P4Name = "Iori-98" ) && enemy,authorname = "Zelgadis"
trigger8 = !time && (P2Name = "Iori Yagami" || P4Name = "Iori Yagami" ) && enemy,authorname = "huolisi"
trigger9 = !time && (P2Name = "Iori Yagami" || P4Name = "Iori Yagami" ) && enemy,authorname = "[Yagami+ihoo1836]"
trigger10 = !time && (P2Name = "Iori_WLS" || P4Name = "Iori_WLS" ) && enemy,authorname = "Vans"
trigger11 = !time && (P2Name = "Iori yagami" || P4Name = "Iori yagami" ) && enemy,authorname = "Zelgadis"
trigger12 = !time && (P2Name = "iorinbc" || P4Name = "iorinbc" ) && enemy,authorname = "Beppu"
trigger13 = !time && (P2Name = "Iori-type-M" || P4Name = "Iori-type-M" ) && enemy,authorname = "MIT"
trigger14 = !time && (P2Name = "Iori Yagami" || P4Name = "Iori Yagami" ) && enemy,authorname = "Sander71113"
trigger15 = !time && (P2Name = "ioriXI" || P4Name = "ioriXI" ) && enemy,authorname = "Beppu"
trigger16 = !time && (P2Name = "Iori-XM" || P4Name = "Iori-XM" ) && enemy,authorname = "Zelgadis"
trigger17 = !time && (P2Name = "Yazakani Iori" || P4Name = "Yazakani Iori" ) && enemy,authorname = "Kjha435y"
trigger18 = !time && (P2Name = "iorinbc" || P4Name = "iorinbc" ) && enemy,authorname = "Beppu"
trigger19 = !time && (P2Name = "Iori Yagami" || P4Name = "Iori Yagami" ) && enemy,authorname = "[Yagami+ihoo1836]"
trigger20 = !time && (P2Name = "Yagami Iori" || P4Name = "Yagami Iori" ) && enemy,authorname = "E.S.S."
trigger21 = !time && (P2Name = "Yagami-AKOF" || P4Name = "Yagami-AKOF" ) && enemy,authorname = "jin"
trigger22 = !time && (P2Name = "Iori Yagami" || P4Name = "Iori Yagami" )
value = 1955

;intro vs Kyo (Iron)
[State 190, 6]
type = Changestate
trigger1 = !time && (P2Name = "Kyo Kusanagi" || P4Name = "Kyo Kusanagi" ) && enemy,authorname = "David Demianoff"
value = 1965

;intro vs Kyo
[State 190, 7]
type = Changestate
trigger1 = !time && (P2Name = "Kyo Kusanagi" || P4Name = "Kyo Kusanagi" ) && enemy,authorname = "K.O.D."
trigger2 = !time && (P2Name = "NeoKyo" || P4Name = "NeoKyo" ) && enemy,authorname = "Sander71113"
trigger3 = !time && (P2Name = "Kyo98" || P4Name = "Kyo98" ) && enemy,authorname = "HIro=hiRO"
trigger4 = !time && (P2Name = "kyo98UM" || P4Name = "kyo98UM" ) && enemy,authorname = "beppu"
trigger5 = !time && (P2Name = "Kyo-96" || P4Name = "Kyo-96" ) && enemy,authorname = "Zelgadis"
trigger6 = !time && (P2Name = "KYO" || P4Name = "KYO" ) && enemy,authorname = "The KJ"
trigger7 = !time && (P2Name = "kyo_classic" || P4Name = "kyo_classic" ) && enemy,authorname = "ikaruga"
trigger8 = !time && (P2Name = "KYO" || P4Name = "KYO" ) && enemy,authorname = "The KJ"
trigger9 = !time && (P2Name = "Kyo Kusanagi" || P4Name = "Kyo Kusanagi" ) && enemy,authorname = "K.O.D."
trigger10 = !time && (P2Name = "EX-Kyo" || P4Name = "EX-Kyo" ) && enemy,authorname = "jin"
trigger11 = !time && (P2Name = "Kyo Kusanagi" || P4Name = "Kyo Kusanagi" )
value = 1960

;intro vs Luise Meyrink
[State 190, 8]
type = Changestate
trigger1 = !time && (P2Name = "Luise Meyrink" || P4Name = "Luise Meyrink" ) && enemy,authorname = "Blue Blood"
value = 1970

; Intro vs. Kusanagi (Iron)
[State 190, 9]
type = Changestate
trigger1 = !time && (P2Name = "Kusanagi" || P4Name = "Kusanagi" ) && enemy,authorname = "David Demianoff"
value = 1980

; Intro vs. clones Kyo, Kusanagi
[State 190, 10]
type = Changestate
trigger1 = !time && (P2Name = "CloneKyo" || P4Name = "CloneKyo" ) && enemy,authorname = "jin"
trigger2 = !time && (P2Name = "Kyo-1" || P4Name = "Kyo-1" ) && enemy,authorname = "jin"
trigger3 = !time && (P2Name = "Kyo-2" || P4Name = "Kyo-2" ) && enemy,authorname = "jin"
trigger4 = !time && (P2Name = "Kyo Kusanagi" || P4Name = "Kyo Kusanagi" ) && enemy,authorname = "Sander71113"
trigger5 = !time && (P2Name = "Sunforce's Kyo-1" || P4Name = "Sunforce's Kyo-1" ) && enemy,authorname = "Sunboy & D@rK-SuN"
trigger6 = !time && (P2Name = "Kyo Clone-1" || P4Name = "Kyo Clone-1" ) && enemy,authorname = "Zelgadis"
trigger7 = !time && (P2Name = "Kyo-2" || P4Name = "Kyo-2" ) && enemy,authorname = "HIro=hiRO"
trigger8 = !time && (P2Name = "Kyo Clone-2" || P4Name = "Kyo Clone-2" ) && enemy,authorname = "Zelgadis"
trigger9 = !time && (P2Name = "kyo clone-10" || P4Name = "kyo clone-10" ) && enemy,authorname = "MechKyo"
trigger10 = !time && (P2Name = "kyo clone-10" || P4Name = "kyo clone-10" ) && enemy,authorname = "jjong1917"
trigger11 = !time && (P2Name = "kusanagi" || P4Name = "kusanagi" ) && enemy,authorname = "ikaruga"
trigger12 = !time && (P2Name = "Kusanagi" || P4Name = "Kusanagi" ) && enemy,authorname = "K.O.D."
trigger13 = !time && (P2Name = "kyou kusanagi" || P4Name = "kyou kusanagi" ) && enemy,authorname = "arukari"
value = 1975

[State 190, 11] ;Go straight to intro.
type = ChangeState
trigger1 = !time
value = ifelse(random <= 333, 191, ifelse(random <= 500, 192, 193))


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

[State 191, 1]
type = ChangeAnim
trigger1 = RoundState = 0
value = 190

[State 191, 2]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 191, 3]
type = PlaySnd
trigger1 = animelem = 3
value = S190,0
channel = 0

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

;---------------------------------------------------------------------------
; Introduction (Moto)
[Statedef 192]
type = S
ctrl = 0
anim = 191
velset = 0,0

[State 192, 1]
type = ChangeAnim
trigger1 = RoundState = 0
trigger2 = numhelper(1900) = 1
value = 191

[State 192, 2]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 192, 3]
type = AssertSpecial
triggerall = numhelper(1900) = 1
trigger1 = helper(1900),Pos Y <= 0
flag = invisible
flag2 = noshadow

[State 192, 4]
type = playsnd
trigger1 = animelem = 2
value = s47,0

[State 192, 5]
type = Helper
trigger1 = !time
helpertype = normal
name = "Yuki"
ID = 1900
stateno = 1900
postype = back
pos = -500,0
facing = 1
keyctrl = 0
ownpal = 1

[State 192, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 0


;---------------------------------------------------------------------------
; yuki
[Statedef 1900]
type = S
physics = N
ctrl = 0
anim = 1900
velset = 0,0
sprpriority = ifelse(TeamSide = 1, 2, 1)

[State 1900, 1]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1900, 2]
type = VelSet
trigger1 = 1
x = 8

[State 1900, 3]
type = Helper
trigger1 = !time
helpertype = normal
name = "Kyo"
ID = 1905
stateno = 1905
postype = p1
pos = 0,0
facing = 1
keyctrl = 0
ownpal = 0

[State 1900, 4]
type = Helper
trigger1 = !time
helpertype = normal
name = "Moto"
ID = 1910
stateno = 1910
postype = p1
pos = 0,0
facing = 1
keyctrl = 0
ownpal = 0

[State 1900, 5]
type = Changestate
triggerall = root, stateno = 192
trigger1 = (root, pos x - pos x)*facing <= -50
value = 1901
ctrl = 0

[State 1900, 6]
type = PlaySnd
triggerall = root, stateno = 193
trigger1 = time = 105
value = s190,2
channel = 0

[State 1900, 7]
type = Changestate
triggerall = root, stateno = 193
trigger1 = Frontedgedist < -200
value = 1902
ctrl = 0

[Statedef 1901]
type = S
physics = N
ctrl = 0
anim = 1901
velset = 0,0
sprpriority = ifelse(TeamSide = 1, 2, 1)

[State 1901, 1]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1901, 2]
type = VelSet
trigger1 = !time
x = (root, pos x - pos x)*facing/35
y = const(velocity.jump.y)

[State 1901, 3]
type = VelAdd
trigger1 = time > 0
y = .47266

[State 1901, 4]
type = PlaySnd
trigger1 = !time
value = S50,0

[State 1901, 5]
type = playsnd
trigger1 = !time
value = s200,10
channel = 0

[State 1901, 6]
type = destroyself
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0


;---------------------------------------------------------------------------
; Kyo
[Statedef 1905]
type = S
ctrl = 0
anim = 1903
velset = 0,0
sprpriority = ifelse(TeamSide = 1, 2, 1)

[State 1905, 1]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1905, 2]
type = VelSet
trigger1 = 1
x = 8

[State 1905, 3]
type = destroyself
trigger1 = Frontedgedist < -200

;---------------------------------------------------------------------------
; Moto
[Statedef 1910]
type = S
physics = N
ctrl = 0
anim = 1902
velset = 0,0
sprpriority = ifelse(TeamSide = 1, 2, 1)

[State 1910, 1]
type = VelSet
trigger1 = 1
x = 8

[State 1910, 2]
type = Playsnd
trigger1 = animelem = 1, = 1
value = s190,5
persistent = 0

[State 1910, 3]
type = Playsnd
trigger1 = time = 25
value = s180,5
persistent = 0

[State 1910, 3]
type = Playsnd
triggerall = root, stateno = 193
trigger1 = time = 105
value = s190,3
persistent = 0

[State 1910, 4]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1910, 5]
type = destroyself
trigger1 = Frontedgedist < -200


;---------------------------------------------------------------------------
; Introduction (Moto Fail)
[Statedef 193]
type = S
ctrl = 0
anim = 5
velset = 0,0

[State 193, 1]
type = ChangeAnim
trigger1 = RoundState = 0
trigger2 = numhelper(1900) = 1
value = 5

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

[State 193, 3]
type = AssertSpecial
triggerall = numhelper(1900) = 1
triggerall = helper(1900), stateno = 1900 || helper(1900), stateno = 1901 || (helper(1900), stateno = 1902 && helper(1900), anim = 100)
trigger1 = 1
flag = invisible
flag2 = noshadow

[State 193, 4]
type = AssertSpecial
triggerall = numhelper(1900) = 1
triggerall = helper(1900), stateno = 1902
trigger1 = helper(1900), anim = 101 && helper(1900), animelemtime(1) < 3
flag = invisible
flag2 = noshadow

[State 193, 5]
type = Helper
trigger1 = !time
helpertype = normal
name = "Yuki"
ID = 1900
stateno = 1900
postype = back
pos = -500,0
facing = 1
keyctrl = 0
ownpal = 1

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

;---------------------------------------------------------------------------
; Yuki running
[Statedef 1902]
type = S
physics = N
ctrl = 0
anim = 100
velset = 0,0
sprpriority = ifelse(TeamSide = 1, 2, 1)

[State 1902, 1]
type = NotHitBy
trigger1 = 1
value = SCA

[State 1902, 2]
type = Turn
trigger1 = !time

[State 1902, 3]
type = VelSet
trigger1 = animelemtime(2) >= 0
x = const(velocity.run.fwd.x)

[State 1902, 4]
type = ChangeAnim
trigger1 = time <= 100
value = anim

[State 1902, 5]
type = Playsnd
trigger1 = animelem = 2
value = s100,1
persistent = 0

[State 1902, 6]
type = VelSet
trigger1 = (root, pos x - pos x)*facing <= 0
x = 0

[State 1902, 7]
type = ChangeAnim
trigger1 = (root, pos x - pos x)*facing <= 0
value = 101
persistent = 0

[State 1902, 8]
type = destroyself
triggerall = anim = 101
trigger1 = !animtime


;---------------------------------------------------------------------------
; Introduction vs Athena
[Statedef 1940]
type = S
ctrl = 0
anim = 1940
velset = 0,0

[State 1940, 1]
type = ChangeAnim
trigger1 = RoundState = 0
value = 1940

[State 1940, 2]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 1940, 3]
type = PlaySnd
trigger1 = animelem = 3
value = S192,1
channel = 0

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


;---------------------------------------------------------------------------
; Introduction vs Kensou
[Statedef 1945]
type = S
ctrl = 0
anim = 1945
velset = 0,0

[State 1945, 1]
type = ChangeAnim
trigger1 = RoundState = 0
value = 1945

[State 1945, 2]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 1945, 3]
type = PlaySnd
trigger1 = animelem = 3
value = S192,0
channel = 0

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


;---------------------------------------------------------------------------
; Introduction vs Sakura
[Statedef 1950]
type = S
ctrl = 0
anim = 195
velset = 0,0

[State 1950, 1]
type = ChangeAnim
trigger1 = RoundState = 0
value = 195

[State 1950, 2]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 1950, 3]
type = PlaySnd
trigger1 = animelem = 3
value = S190,1
channel = 0

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


;---------------------------------------------------------------------------
; Introduction vs Yagami
[Statedef 1955]
type = S
ctrl = 0
anim = 1955
velset = 0,0

[State 1955, 1]
type = ChangeAnim
trigger1 = RoundState = 0
value = 1955

[State 1955, 2]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 1955, 3]
type = PlaySnd
trigger1 = animelem = 3
value = S195,1
channel = 0

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


;---------------------------------------------------------------------------
; Introduction Generic vs Kyo
[Statedef 1960]
type = S
ctrl = 0
anim = 1960
velset = 0,0

[State 1960, 1]
type = ChangeAnim
trigger1 = RoundState = 0
value = 1960

[State 1960, 2]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 1960, 3]
type = PlaySnd
trigger1 = animelem = 3
value = S194,2
channel = 0

[State 1960, 4]
type = PlaySnd
trigger1 = animelem = 16
value = S194,3
channel = 0

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


;---------------------------------------------------------------------------
; Introduction vs Kyo (Iron)
[Statedef 1965]
type = S
ctrl = 0
anim = 1965
velset = 0,0

[State 1965, 1]
type = ChangeAnim
trigger1 = RoundState = 0
value = 1965

[State 1965, 2]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 1965, 3]
type = PlaySnd
trigger1 = animelem = 6
value = S194,0
channel = 0

[State 1965, 4]
type = PlaySnd
trigger1 = animelem = 17
value = S194,1
channel = 0

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

;---------------------------------------------------------------------------
; Introduction vs Luise
[Statedef 1970]
type = S
ctrl = 0
anim = 1970
velset = 0,0

[State 1970, 1]
type = Helper
triggerall = numhelper(1971) = 0
trigger1 = animelem = 1
helpertype = normal
name = "Athena"
ID = 1971
stateno = 1971
pos = -60,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1

[State 1970, 2]
type = ChangeAnim
trigger1 = RoundState = 0
trigger2 = numhelper(1971) = 1 && helper(1971), anim = 1971 && helper(1971), animelemtime(5) < 0
value = 1970

[State 1970, 3]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 1970, 4]
type = AssertSpecial
trigger1 = numhelper(1971) = 1 && helper(1971), anim = 1971 && helper(1971), animelemtime(5) < 0
flag = invisible

[State 1970, 5]
type = Trans
trigger1 = AnimElemtime(1) > 0 && AnimElemtime(2) < 60
trans = addalpha
alpha = animelemtime(2)*10,255-animelemtime(2)*5

[State 1970, 6]
type = Explod
trigger1 = animelem = 2, = 31
anim = 1974
ID = 1974
pos = -1,-32
postype = p1
facing = 1
bindtime = 1
scale = 1,1
vel = 0,0
accel = 0,0
random = 0,0
sprpriority = -2
ownpal = 1
removeongethit = 0
;removetime = 32

[State 1970, 7]
type = Explod
trigger1 = animelem = 2, = 1
anim = 1975
ID = 1975
pos = -5,-10
postype = p1
facing = 1
bindtime = 1
scale = 1,1
vel = 0,0
accel = 0,0
random = 0,0
sprpriority = 5
ownpal = 1
removeongethit = 0
removetime = 28

[State 1970, 8]
type = Explod
trigger1 = animelem = 2, = 17
anim = 1976
ID = 1976
pos = 0,-80
postype = p1
facing = 1
bindtime = 999999
scale = .7,.7
vel = 0,0
accel = 0,0
random = 0,0
sprpriority = 5
ownpal = 1
removeongethit = 0
removetime = 61

[State 1970, 9]
type = PlaySnd
trigger1 = animelem = 2, = 1
value = S3850,0

[State 1970, 10]
type = PlaySnd
trigger1 = animelem = 5
value = S190,4
channel = 0

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

;---------------------------------------------------------------------------
; Athena
[Statedef 1971]
type = S
physics = N
ctrl = 0
anim = 1971
velset = 0,0
sprpriority = 2

[State 1971, 1]
type = ChangeAnim
trigger1 = RoundState = 0
value = 1971

[State 1971, 2]
type = NotHitBy
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 1971, 3]
type = AssertSpecial
trigger1 = animelemtime(2) <= 0
flag = invisible

[State 1971, 3]
type = Trans
trigger1 = AnimElemtime(2) > 0 && AnimElemtime(3) < 0
trans = addalpha
alpha = animelemtime(2)*10,255-animelemtime(2)*5

[State 1971, 4]
type = Explod
trigger1 = animelem = 2
anim = 1972
ID = 1972
pos = 0,-65
postype = p1
facing = 1
bindtime = 1
scale = 1,1
vel = 0,0
accel = 0,0
random = 0,0
sprpriority = 1
ownpal = 1
removeongethit = 0
removetime = 36

[State 1971, 5]
type = Explod
trigger1 = animelem = 20
anim = 1972
ID = 1972
pos = -8,-65
postype = p1
facing = 1
bindtime = 1
scale = 1,1
vel = 0,0
accel = 0,0
random = 0,0
sprpriority = 3
ownpal = 1
removeongethit = 0
removetime = 36

[State 1971, 6]
type = Explod
trigger1 = animelem = 5
anim = 1973
ID = 1973
pos = 37,-61
postype = p1
facing = 1
bindtime = 1
scale = 1,1
vel = 0,0
accel = 0,0
random = 0,0
sprpriority = 3
ownpal = 1
removeongethit = 0
removetime = 45

[State 1971, 7]
type = Playsnd
trigger1 = animelem = 2
trigger2 = animelem = 20
value = s1000,5

[State 1971, 8]
type = Playsnd
trigger1 = animelem = 5
value = s1000,3

[State 1971, 9]
type = Playsnd
trigger1 = animelem = 11
value = s193,0
;;volume = 255

[State 1971, 9]
type = Playsnd
trigger1 = animelem = 21
value = s193,1
;;volume = 255

[State 1971, 10]
type = VarSet
trigger1 = animelem = 20, = 5
var(2) = time

[State 1971, 11]
type = Trans
trigger1 = animelemtime(21) >= 0
trans = addalpha
alpha = 256-(time-var(2))*10,(time-var(2))*10

[State 1971, 12]
type = destroyself
trigger1 = !animtime


;---------------------------------------------------------------------------
; Introduction vs Clones Kyo, Kusanagi
[Statedef 1975]
type = S
ctrl = 0
anim = 106
velset = 0,0

[State 1975, 1]
type = Helper
trigger1 = !time
helpertype = normal
name = "Yuki"
ID = 1976
stateno = 1976
postype = back
pos = -80,0
facing = 1
keyctrl = 0
ownpal = 1

[State 1975, 2]
type = AssertSpecial
triggerall = numhelper(1976)
trigger1 = numhelper(1976) = 1 && helper(1976), stateno = 1976
flag = invisible

[State 1975, 3]
type = ChangeAnim
trigger1 = RoundState = 0
trigger2 = numhelper(1976)
value = 106

[State 1975, 4]
type = AssertSpecial
trigger1 = 1
flag = Intro

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


;---------------------------------------------------------------------------
; Yuki running
[Statedef 1976]
type = S
physics = N
ctrl = 0
anim = 100
velset = 0,0
sprpriority = 2

[State 1976, 1]
type = VarSet
trigger1 = enemynear, name = "CloneKyo" && enemynear,authorname = "jin"
trigger2 = enemynear, name = "Kyo-1" && enemynear,authorname = "jin"
trigger3 = enemynear, name = "Kyo-2" && enemynear,authorname = "jin"
trigger4 = enemynear, name = "Kyo Kusanagi" && enemynear,authorname = "Sander71113"
trigger5 = enemynear, name = "Sunforce's Kyo-1" && enemynear,authorname = "Sunboy & D@rK-SuN"
trigger6 = enemynear, name = "Kyo Clone-1" && enemynear,authorname = "Zelgadis"
trigger7 = enemynear, name = "Kyo-2" && enemynear,authorname = "HIro=hiRO"
trigger8 = enemynear, name = "Kyo Clone-2" && enemynear,authorname = "Zelgadis"
trigger9 = enemynear, name = "kyo clone-10" && enemynear,authorname = "MechKyo"
trigger10 = enemynear, name = "kyo clone-10" && enemynear,authorname = "jjong1917"
trigger11 = enemynear, name = "kusanagi" && enemynear,authorname = "ikaruga"
trigger12 = enemynear, name = "Kusanagi" && enemynear,authorname = "K.O.D."
trigger13 = enemynear, name = "kyou kusanagi" && enemynear,authorname = "arukari"
var(2) = enemynear, ID

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

[State 1976, 3]
type = VelSet
triggerall = anim = 100
trigger1 = animelemtime(2) = 0
x = const(velocity.run.fwd.x)

[State 1976, 4]
type = ChangeAnim
trigger1 = time <= 10
value = anim

[State 1976, 5]
type = Playsnd
triggerall = anim = 100
trigger1 = animelem = 2
value = s100,1
persistent = 0

[State 1976, 6]
type = VelSet
triggerall = anim != 105
triggerall = var(2) && PlayerIDExist(var(2))
trigger1 = (playerID(var(2)), pos x - pos x)*facing <= 40
x = 0

[State 1976, 7]
type = ChangeAnim
triggerall = var(2) && PlayerIDExist(var(2))
trigger1 = (playerID(var(2)), pos x - pos x)*facing <= 40
value = 101
persistent = 0

[State 1976, 8]
type = ChangeAnim
triggerall = anim = 101
trigger1 = !animtime
value = 1977
persistent = 0

[State 1976, 9]
type = playsnd
triggerall = anim = 1977
trigger1 = animelem = 10
value = s1600,0
channel = 0

[State 1976, 10]
type = ChangeAnim
triggerall = anim = 1977
trigger1 = !animtime
value = 105
persistent = 0

[State 1976, 11]
type = StateTypeSet
triggerall = anim = 105
trigger1 = animElemTime(2) = 0
statetype = A
physics = N

[State 1976, 12]
type = VelSet
triggerall = anim = 105
trigger1 =  animElemTime(2) = 0
x = (root, pos x - pos x)*facing/20

[State 1976, 13]
type = VelSet
triggerall = anim = 105
trigger1 = animElem = 2
y = const(velocity.run.back.y)

[State 1976, 14]
type = Veladd
triggerall = anim = 105
trigger1 = animElemTime(2) >= 0
y = .4375

[State 1976, 15]
type = Veladd
triggerall = anim = 105
trigger1 = animelemtime(2) >= 7
y = -.2265625

[State 1976, 16]
type = Playsnd
triggerall = anim = 105
trigger1 = animelem = 2
value = s105,0

[State 1976, 17]
type = Playsnd
triggerall = anim = 105
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = s47,0

[State 1976, 18]
type = changestate
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 1977
ctrl = 0

[Statedef 1977]
type    = S
physics = N
ctrl = 0
anim = 106
velset = 0,0

[State 1977, 1]
type = Playsnd
trigger1 = time = 0
value = s47,0

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

[State 1977, 3]
type = PosSet
trigger1 = Time = 0
y = 0

[State 1977, 4]
type = MakeDust
trigger1 = Time = 2
pos = -5,-2
spacing = 1

[State 1977, 5]
type = destroyself
trigger1 = time = 1


;---------------------------------------------------------------------------
; Introduction vs Kusanagi (Iron)
[Statedef 1980]
type = S
ctrl = 0
anim = 106
velset = 0,0

[State 1980, 1]
type = Helper
trigger1 = !time
helpertype = normal
name = "Yuki"
ID = 1985
stateno = 1985
postype = back
pos = -80,0
facing = 1
keyctrl = 0
ownpal = 1

[State 1980, 2]
type = AssertSpecial
triggerall = numhelper(1985)
trigger1 = numhelper(1985) = 1 && helper(1985), stateno = 1985
flag = invisible

[State 1980, 3]
type = ChangeAnim
trigger1 = RoundState = 0
trigger2 = numhelper(1985)
value = 106

[State 1980, 4]
type = AssertSpecial
trigger1 = 1
flag = Intro

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


;---------------------------------------------------------------------------
; Yuki running
[Statedef 1985]
type = S
physics = N
ctrl = 0
anim = 100
velset = 0,0
sprpriority = 2

[State 1985, 1]
type = VarSet
trigger1 = enemynear, name = "Kusanagi" && enemynear,authorname = "David Demianoff"
var(2) = enemynear, ID

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

[State 1985, 3]
type = VelSet
triggerall = anim = 100
trigger1 = animelemtime(2) = 0
x = const(velocity.run.fwd.x)

[State 1985, 4]
type = ChangeAnim
trigger1 = time <= 10
value = anim

[State 1985, 6]
type = Playsnd
triggerall = anim = 100
trigger1 = animelem = 2
value = s100,1
persistent = 0

[State 1985, 7]
type = VelSet
triggerall = anim != 105
triggerall = var(2) && PlayerIDExist(var(2))
trigger1 = (playerID(var(2)), pos x - pos x)*facing <= 80
x = 0

[State 1985, 8]
type = ChangeAnim
triggerall = var(2) && PlayerIDExist(var(2))
trigger1 = (playerID(var(2)), pos x - pos x)*facing <= 80
value = 101
persistent = 0

[State 1985, 9]
type = ChangeAnim
triggerall = anim = 101
trigger1 = !animtime
value = 1980
persistent = 0

[State 1985, 11]
type = playsnd
triggerall = anim = 1980
trigger1 = animelem = 5
value = s182,(random%2)
channel = 0

[State 1985, 10]
type = playsnd
triggerall = anim = 1980
trigger1 = animelem = 8
value = s1600,0
channel = 0

[State 1985, 11]
type = playsnd
triggerall = anim = 1980
trigger1 = animelem = 14
value = s194,3
channel = 0

[State 1985, 12]
type = ChangeAnim
triggerall = anim = 1980
trigger1 = !animtime
value = 105
persistent = 0

[State 1985, 13]
type = StateTypeSet
triggerall = anim = 105
trigger1 = animElemTime(2) = 0
statetype = A
physics = N

[State 1985, 14]
type = VelSet
triggerall = anim = 105
trigger1 =  animElemTime(2) = 0
x = (root, pos x - pos x)*facing/20

[State 1985, 16]
type = VelSet
triggerall = anim = 105
trigger1 = animElem = 2
y = const(velocity.run.back.y)

[State 1985, 17]
type = Veladd
triggerall = anim = 105
trigger1 = animElemTime(2) >= 0
y = .4375

[State 1985, 18]
type = Veladd
triggerall = anim = 105
trigger1 = animelemtime(2) >= 7
y = -.2265625

[State 1985, 19]
type = Playsnd
triggerall = anim = 105
trigger1 = animelem = 2
value = s105,0

[State 1985, 20]
type = Playsnd
triggerall = anim = 105
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = s47,0

[State 1985, 21]
type = changestate
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 1977
ctrl = 0

[Statedef 1977]
type    = S
physics = N
ctrl = 0
anim = 106
velset = 0,0

[State 1977, 1]
type = Playsnd
trigger1 = time = 0
value = s47,0

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

[State 1977, 3]
type = PosSet
trigger1 = Time = 0
y = 0

[State 1977, 4]
type = MakeDust
trigger1 = Time = 2
pos = -5,-2
spacing = 1

[State 1977, 5]
type = destroyself
trigger1 = time = 1

;---------------------------------------------------------------------------
; Taunt
[Statedef 195]
type = S
ctrl = 0
anim = ifelse(random < 500, 195, 196)
velset = 0,0
movetype = I
physics = S
sprpriority = 2

[State 195, 1]
type = ctrlset
trigger1 = Time = 60
value = 1

[State 195, 2]
type = PlaySnd
triggerall = anim = 195
trigger1 = animelem = 7
value = S195,0
channel = 3

[State 195, 3]
type = PlaySnd
triggerall = anim = 196
trigger1 = animelem = 6
value = S196,0
channel = 3

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

;---------------------------------------------------------------------------
; Stand Light Punch
[Statedef 200]
type    = S                    
movetype= A                 
physics = S                
juggle  = 8
velset = 0,0                    
ctrl = 0                       
anim = 205
poweradd = 30
sprpriority = 2
facep2 = 1

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

[State 200, 2]
type = PlaySnd
trigger1 = AnimElem = 1 && Random <= 800
value = s200,0
channel = 0

[State 200, 3]
type = HitDef
triggerall = numtarget(750) = 0
triggerall = p2stateno != [5020,5040]
trigger1 = time = 0
attr = S, NA
damage = 20,0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 7,7
sparkno = s8000
guard.sparkno = s8030
sparkxy = -10,-70
hitsound = s201,1
guardsound = s120,0
ground.type = High
ground.slidetime = 12
ground.hittime = 12
air.hittime = 8
guard.ctrltime = 11
ground.velocity = -5.79
guard.velocity = -4.18
air.velocity = -4.39,-6.726568
yaccel = .54688

[State 200, 4]
type = HitDef
triggerall = numtarget(750) = 1
triggerall = p2stateno != [5020,5040]
trigger1 = time = 0
attr = S, NA
damage = 20,0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 7,7
sparkno = s8000
guard.sparkno = s8030
sparkxy = -10,-70
hitsound = s201,1
guardsound = s120,0
ground.type = High
ground.slidetime = 12
ground.hittime = 12
air.hittime = 8
guard.ctrltime = 11
ground.velocity = -5.79
guard.velocity = -4.18
air.velocity = -4.39,-6.726568
yaccel = .54688
p2stateno = 201

[State 200, 5]
type = AssertSpecial
triggerall = numtarget(750) = 1
trigger1 = 1
flag = nojugglecheck

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


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

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

[State 201, 0]
type = PosSet
triggerall = pos y > 0
trigger1 = !time
y = 0

[State 201, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = 5030

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

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

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

[State 201, 5]
type = ChangeState
trigger1 = HitShakeOver
value = 202
ctrl = 0

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

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

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

;---------------------------------------------------------------------------
; HITA_UP (initial going up)
[Statedef 202]
type    = A
movetype= H
physics = N
ctrl = 0

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

[State 202, 1]
type = VelAdd;Gravity
trigger1 = 1
y = GetHitVar(yaccel)

[State 202, 3]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 202, 4]
type = ChangeState
trigger1 = HitOver
trigger2 = Vel Y > 0    ;Hit ground
trigger2 = Pos Y >= 10  ;.
value = 203 ;HITA_RECOV
ctrl = 0

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

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

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

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

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

[Statedef 204]
type    = A
movetype= H
physics = N
ctrl = 0

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

[State 204, 1]
type = SelfState
trigger1 = !Alive
value = 5050

[State 204, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim != 5040
trigger2 = Time = 0
trigger2 = Anim != 5035
value = 5040

[State 204, 3]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 204, 4]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 52 ;JUMPLAND

;---------------------------------------------------------------------------
; Stand Light Punch (close)
[Statedef 205]
type    = S
movetype= A
physics = S
juggle  = 8
velset = 0,0
ctrl = 0
anim = 200
poweradd = 30
sprpriority = 2
facep2 = 1

[State 205, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = s201,0

[State 205, 2]
type = PlaySnd
trigger1 = AnimElem = 1 && Random <= 800
value = s200,0
channel = 0

[State 205, 3]
type = HitDef
triggerall = numtarget(750) = 0
triggerall = p2stateno != [5020,5040]
trigger1 = time = 0
attr = S, NA
damage = 20,0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 7,7
sparkno = s8000
guard.sparkno = s8030
sparkxy = -10,-80
hitsound = s201,1
guardsound = s120,0
ground.type = high
ground.slidetime = 12
ground.hittime = 12
air.hittime = 8
guard.ctrltime = 11
ground.velocity = -5.79
guard.velocity = -4.18
air.velocity = -4.39,-6.726568
yaccel = .54688

[State 205, 4]
type = HitDef
triggerall = numtarget(750) = 1
triggerall = p2stateno != [5020,5040]
trigger1 = time = 0
attr = S, NA
damage = 20,0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 7,7
sparkno = s8000
guard.sparkno = s8030
sparkxy = -10,-80
hitsound = s201,1
guardsound = s120,0
ground.type = high
ground.slidetime = 12
ground.hittime = 12
air.hittime = 8
guard.ctrltime = 11
ground.velocity = -5.79
guard.velocity = -4.18
air.velocity = -4.39,-6.726568
yaccel = .54688
p2stateno = 201

[State 205, 5]
type = AssertSpecial
triggerall = numtarget(750) = 1
trigger1 = 1
flag = nojugglecheck

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


;---------------------------------------------------------------------------
; Standing strong punch
[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 8
poweradd= 85
ctrl = 0
velset = 0,0
anim = 215
sprpriority = 1
facep2 = 1

[State 210, 1]
type = PlaySnd
trigger1 = AnimElem = 6
value = s201,2

[State 210, 2]
type = PlaySnd
trigger1 = AnimElem = 6 && Random <= 800
value = s200,1
channel = 0

[State 210, 3]
type = HitDef
triggerall = numtarget(750) = 0
triggerall = p2stateno != [5020,5040]
trigger1 = time = 0
attr = S, NA
animtype = Heavy
damage = 36,0
hitflag = MAF
guardflag = MA
priority = 2,Hit
pausetime = 11,11
sparkno = s8005
guard.sparkno = s8035
sparkxy = -10,-60
hitsound = s201,3
guardsound = s120,0
ground.type = low
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -9.5
guard.velocity = -8.28
air.velocity = -4.39,-6.726568
yaccel = .54688

[State 210, 4]
type = HitDef
triggerall = numtarget(750) = 1
triggerall = p2stateno != [5020,5040]
trigger1 = time = 0
attr = S, NA
animtype = Heavy
damage = 36,0
hitflag = MAF
guardflag = MA
priority = 2,Hit
pausetime = 11,11
sparkno = s8005
guard.sparkno = s8035
sparkxy = -10,-60
hitsound = s201,3
guardsound = s120,0
ground.type = low
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -9.5
guard.velocity = -8.28
air.velocity = -4.39,-6.726568
yaccel = .54688
p2stateno = 201

[State 210, 5]
type = AssertSpecial
triggerall = numtarget(750) = 1
trigger1 = 1
flag = nojugglecheck

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

;---------------------------------------------------------------------------
; Standing strong punch  (close)
[Statedef 215]
type    = S
movetype= A
physics = S
juggle  = 8
poweradd= 85
ctrl = 0
velset = 0,0
anim = 210
sprpriority = 1
facep2 = 1

[State 215, 1]
type = PlaySnd
trigger1 = animelem = 2
value = s201,2

[State 215, 2]
type = PlaySnd
trigger1 = AnimElem = 2 && Random <= 800
value = s200,1
channel = 0

[State 215, 3]
type = HitDef
triggerall = numtarget(750) = 0
triggerall = p2stateno != [5020,5040]
trigger1 = time = 0
attr = S, NA
animtype = Heavy
damage = 36,0
hitflag = MAF
guardflag = MA
priority = 2,Hit
pausetime = 11,11
sparkno = s8005
guard.sparkno = s8035
sparkxy = -10,-ifelse(p2statetype = A, 95, 62)
hitsound = s201,3
guardsound = s120,0
ground.type = high
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -9.5
guard.velocity = -8.28
air.velocity = -4.39,-6.726568
yaccel = .54688

[State 215, 4]
type = HitDef
triggerall = numtarget(750) = 1
triggerall = p2stateno != [5020,5040]
trigger1 = time = 0
attr = S, NA
animtype = Heavy
damage = 36,0
hitflag = MAF
guardflag = MA
priority = 2,Hit
pausetime = 11,11
sparkno = s8005
guard.sparkno = s8035
sparkxy = -10,-ifelse(p2statetype = A, 95, 62)
hitsound = s201,3
guardsound = s120,0
ground.type = high
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -9.5
guard.velocity = -8.28
air.velocity = -4.39,-6.726568
yaccel = .54688
p2stateno = 201

[State 215, 5]
type = AssertSpecial
triggerall = numtarget(750) = 1
trigger1 = 1
flag = nojugglecheck

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


;---------------------------------------------------------------------------
; Standing light kick
[Statedef 230]
type    = S
movetype= A
physics = S
juggle = 8
poweradd= 30
ctrl = 0
velset = 0,0
anim = 235
sprpriority = 2
facep2 = 1

[State 230, 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = s201,4

[State 230, 2]
type = PlaySnd
trigger1 = AnimElem = 2 && Random <= 800
value = s200,0
channel = 0

[State 230, 3]
type = HitDef
triggerall = numtarget(750) = 0
triggerall = p2stateno != [5020,5040]
trigger1 = Time = 0
attr = S, NA
animtype = Light
damage = 20,0
hitflag = MAF
guardflag = MA
pausetime = 7,7
sparkno = s8000
guard.sparkno = s8030
sparkxy = -10,-80
hitsound = s201,5
guardsound = s120,0
ground.type = high
ground.slidetime = 12
ground.hittime = 12
air.hittime = 10
guard.ctrltime = 11
ground.velocity = -5.79
guard.velocity = -4.18
air.velocity = -4.39,-6.726568
yaccel = .54688

[State 230, 4]
type = HitDef
triggerall = numtarget(750) = 1
triggerall = p2stateno != [5020,5040]
trigger1 = Time = 0
attr = S, NA
animtype = Light
damage = 20,0
hitflag = MAF
guardflag = MA
pausetime = 7,7
sparkno = s8000
guard.sparkno = s8030
sparkxy = -10,-80
hitsound = s201,5
guardsound = s120,0
ground.type = high
ground.slidetime = 12
ground.hittime = 12
air.hittime = 10
guard.ctrltime = 11
ground.velocity = -5.79
guard.velocity = -4.18
air.velocity = -4.39,-6.726568
yaccel = .54688
p2stateno = 201

[State 230, 5]
type = AssertSpecial
triggerall = numtarget(750) = 1
trigger1 = 1
flag = nojugglecheck

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

;---------------------------------------------------------------------------
; Standing light kick (close)
[Statedef 235]
type    = S
movetype= A
physics = S
juggle  = 8
poweradd= 30
ctrl = 0
velset = 0,0
anim = 230
sprpriority = 2
facep2 = 1

[State 235, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = s201,4

[State 235, 2]
type = PlaySnd
trigger1 = AnimElem = 1 && Random <= 800
value = s200,0
channel = 0

[State 235, 3]
type = HitDef
triggerall = numtarget(750) = 0
triggerall = p2stateno != [5020,5040]
trigger1 = Time = 0
attr = S, NA
animtype = Light
damage = 20,0
hitflag = M
guardflag = L
pausetime = 7,7
sparkno = s8000
guard.sparkno = s8030
sparkxy = -10,-35
hitsound = s201,5
guardsound = s120,0
ground.type = low
ground.slidetime = 12
ground.hittime = 12
air.hittime = 10
guard.ctrltime = 11
ground.velocity = -5.79
guard.velocity = -4.18
air.velocity = -4.39,-6.726568
yaccel = .54688

[State 235, 4]
type = HitDef
triggerall = numtarget(750) = 1
triggerall = p2stateno != [5020,5040]
trigger1 = Time = 0
attr = S, NA
animtype = Light
damage = 20,0
hitflag = M
guardflag = L
pausetime = 7,7
sparkno = s8000
guard.sparkno = s8030
sparkxy = -10,-35
hitsound = s201,5
guardsound = s120,0
ground.type = low
ground.slidetime = 12
ground.hittime = 12
air.hittime = 10
guard.ctrltime = 11
ground.velocity = -5.79
guard.velocity = -4.18
air.velocity = -4.39,-6.726568
yaccel = .54688
p2stateno = 201

[State 235, 5]
type = AssertSpecial
triggerall = numtarget(750) = 1
trigger1 = 1
flag = nojugglecheck

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

;---------------------------------------------------------------------------
; Standing strong kick
[Statedef 240]
type    = S
movetype= A
physics = S
juggle  = 8
poweradd= 85
ctrl = 0
velset = 0,0
anim = 245
sprpriority = 2
facep2 = 1

[State 240, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = s201,6

[State 240, 2]
type = PlaySnd
trigger1 = AnimElem = 4 && Random <= 800
value = s200,1
channel = 0

[State 240, 3]
type = PosAdd
trigger1 = animelem = 3
trigger2 = animelem = 4
x = 5

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

[State 240, 5]
type = PosAdd
trigger1 = animelem = 6
x = 3

[State 240, 6]
type = PosAdd
trigger1 = animelem = 7
x = 14

[State 240, 7]
type = PosAdd
trigger1 = animelem = 8
x = 8

[State 240, 8]
type = PosAdd
trigger1 = animelem = 9
trigger2 = animelem = 10
x = 4

[State 240, 9]
type = PosAdd
trigger1 = !animtime
x = 2

[State 240, 10]
type = HitDef
triggerall = numtarget(750) = 0
triggerall = p2stateno != [5020,5040]
trigger1 = Time = 0
attr = A, NA
animtype = Heavy
damage = 36,0
hitflag = MAF
guardflag = MA
pausetime = 11,11
sparkno = s8005
guard.sparkno = s8035
sparkxy = -10,-65
hitsound = s201,7
guardsound = s120,0
ground.type = low
air.type = Low
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -9.5
guard.velocity = -8.28
air.velocity = -4.39,-6.726568
yaccel = .54688

[State 240, 11]
type = HitDef
triggerall = numtarget(750) = 1
triggerall = p2stateno != [5020,5040]
trigger1 = Time = 0
attr = A, NA
animtype = Heavy
damage = 36,0
hitflag = MAF
guardflag = MA
pausetime = 11,11
sparkno = s8005
guard.sparkno = s8035
sparkxy = -10,-65
hitsound = s201,7
guardsound = s120,0
ground.type = low
air.type = Low
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -9.5
guard.velocity = -8.28
air.velocity = -4.39,-6.726568
yaccel = .54688
p2stateno = 201

[State 240, 12]
type = AssertSpecial
triggerall = numtarget(750) = 1
trigger1 = 1
flag = nojugglecheck

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

;---------------------------------------------------------------------------
; Standing strong kick (close)
[Statedef 245]
type    = S
movetype= A
physics = S
juggle  = 8
poweradd= 85
ctrl = 0
velset = 0,0
anim = 240
sprpriority = 2
facep2 = 1

[State 245, 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = s201,6

[State 245, 2]
type = PlaySnd
trigger1 = AnimElem = 2 && Random <= 800
value = s200,1
channel = 0

[State 245, 3]
type = HitDef
triggerall = numtarget(750) = 0
triggerall = p2stateno != [5020,5040]
trigger1 = !time
attr = S, NA
animtype = Heavy
damage = 25,0
hitflag = MAF
guardflag = MA
pausetime = 11,11
sparkno = s8005
guard.sparkno = s8035
sparkxy = -10,-63
hitsound = s201,7
guardsound = s120,0
ground.type = high
air.type = Low
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -9.5
guard.velocity = -8.28
air.velocity = -4.39,-6.726568
yaccel = .54688

[State 245, 4]
type = HitDef
triggerall = numtarget(750) = 1
triggerall = p2stateno != [5020,5040]
trigger1 = !time
attr = S, NA
animtype = Heavy
damage = 25,0
hitflag = MAF
guardflag = MA
pausetime = 11,11
sparkno = s8005
guard.sparkno = s8035
sparkxy = -10,-63
hitsound = s201,7
guardsound = s120,0
ground.type = high
air.type = Low
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -9.5
guard.velocity = -8.28
air.velocity = -4.39,-6.726568
yaccel = .54688
p2stateno = 201

[State 245, 5]
type = AssertSpecial
triggerall = numtarget(750) = 1
trigger1 = 1
flag = nojugglecheck

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

;---------------------------------------------------------------------------
;Crouching light punch
[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 8
poweradd= 30
velset = 0,0
ctrl = 0
anim = 400
sprpriority = 2
facep2 = 1

[State 400, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = s201,0

[State 400, 2]
type = PlaySnd
trigger1 = AnimElem = 1 && Random <= 800
value = s200,0
channel = 0

[State 400, 3]
type = HitDef
triggerall = numtarget(750) = 0
triggerall = p2stateno != [5020,5040]
trigger1 = Time = 0
attr = C, NA
damage = 20,0
priority = 3, hit
animtype = Light
hitflag = MAF
guardflag = MA
pausetime = 7,7
sparkno = s8000
guard.sparkno = s8030
sparkxy = -10,-33
hitsound = s201,1
guardsound = s120,0
ground.type = low
ground.slidetime = 12
ground.hittime = 12
air.hittime = 10
guard.ctrltime = 11
ground.velocity = -5.79
guard.velocity = -4.18
air.velocity = -4.39,-6.726568
yaccel = .54688

[State 400, 4]
type = HitDef
triggerall = numtarget(750) = 1
triggerall = p2stateno != [5020,5040]
trigger1 = Time = 0
attr = C, NA
damage = 20,0
priority = 3, hit
animtype = Light
hitflag = MAF
guardflag = MA
pausetime = 7,7
sparkno = s8000
guard.sparkno = s8030
sparkxy = -10,-33
hitsound = s201,1
guardsound = s120,0
ground.type = low
ground.slidetime = 12
ground.hittime = 12
air.hittime = 10
guard.ctrltime = 11
ground.velocity = -5.79
guard.velocity = -4.18
air.velocity = -4.39,-6.726568
yaccel = .54688
p2stateno = 201

[State 400, 5]
type = AssertSpecial
triggerall = numtarget(750) = 1
trigger1 = 1
flag = nojugglecheck

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

;---------------------------------------------------------------------------
;Crouching strong punch
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 8
poweradd= 85
velset = 0,0
ctrl = 0
anim = 410
sprpriority = 2
facep2 = 1

[State 410, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = s201,2

[State 410, 2]
type = PlaySnd
trigger1 = AnimElem = 3 && Random <= 800
value = s200,1
channel = 0

[State 410, 3]
type = HitDef
triggerall = numtarget(750) = 0
triggerall = p2stateno != 5040
trigger1 = !time
attr = C, NA
damage = 30,0
animtype = Heavy
hitflag = MA
guardflag = MA
pausetime = 11,11
sparkno = s8005
guard.sparkno = s8035
sparkxy = -10,-5
hitsound = s201,3
guardsound = s120,0
ground.type = low
air.type = Low
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -9.5
guard.velocity = -8.28
air.velocity = -4.39,-6.726568
yaccel = .54688

[State 410, 4]
type = HitDef
triggerall = numtarget(750) = 1
triggerall = p2stateno != 5040
trigger1 = !time
attr = C, NA
damage = 30,0
animtype = Heavy
hitflag = MAF
guardflag = MA
pausetime = 11,11
sparkno = s8005
guard.sparkno = s8035
sparkxy = -10,-5
hitsound = s201,3
guardsound = s120,0
ground.type = low
air.type = Low
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -9.5
guard.velocity = -8.28
air.velocity = -4.39,-6.726568
yaccel = .54688
p2stateno = 201

[State 410, 5]
type = AssertSpecial
triggerall = numtarget(750) = 1
trigger1 = 1
flag = nojugglecheck

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

;---------------------------------------------------------------------------
;Crouching light kick
[Statedef 430]
type    = C
movetype= A
physics = C
juggle  = 8
poweradd= 30
velset = 0,0
ctrl = 0
anim = 430
sprpriority = 2
facep2 = 1

[State 430, 1]
type = PlaySnd
trigger1 = animelem = 2
value = s201,4

[State 430, 2]
type = PlaySnd
trigger1 = AnimElem = 2 && Random <= 800
value = s200,0
channel = 0

[State 430, 3]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage = 20,0
animtype = Light
hitflag = M
guardflag = L
pausetime = 7,7
sparkno = s8000
guard.sparkno = s8030
sparkxy = -10,-25
hitsound = s201,5
guardsound = s120,0
ground.type = low
air.type = Low
ground.slidetime = 12
ground.hittime = 12
air.hittime = 10
guard.ctrltime = 11
ground.velocity = -5.79
guard.velocity = -4.18
air.velocity = -4.39,-6.726568
yaccel = .54688

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

;---------------------------------------------------------------------------
;Crouch Strong Kick
[Statedef 440]
type    = C
movetype= A
physics = C
juggle  = 8
poweradd= 85
velset = 0,0
ctrl = 0
anim = 440
sprpriority = 2
facep2 = 1

[State 440, 1]
type = PlaySnd
trigger1 = animelem = 5
value = s201,6

[State 440, 2]
type = PlaySnd
trigger1 = AnimElem = 5 && Random <= 800
value = s200,1
channel = 0

[State 440, 3]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage = 30,0
hitflag = M
guardflag = L
pausetime = 12,12
sparkno = s8005
guard.sparkno = s8035
sparkxy = -5,-10
hitsound = s201,7
guardsound = s120,0
ground.type = trip
air.type = Low
ground.slidetime = 19
ground.hittime = 20
guard.ctrltime = 17
ground.velocity = -3,-6
air.velocity = -3,-6
guard.velocity = -8.28
fall = 1
air.fall = 1
air.recover = 0
yaccel = .54688

[State 440, 4]
type = PosAdd
trigger1 = animelem = 2
x = 1

[State 440, 5]
type = PosAdd
trigger1 = animelem = 4
x = 7

[State 440, 6]
type = PosAdd
trigger1 = animelem = 5
x = 3

[State 440, 7]
type = PosAdd
trigger1 = animelem = 6
x = 5

[State 440, 8]
type = PosAdd
trigger1 = animelem = 7
x = 14

[State 440, 9]
type = PosAdd
trigger1 = animelem = 8
x = -10

[State 440, 10]
type = PosAdd
trigger1 = animelem = 9
x = -8

[State 440, 11]
type = PosAdd
trigger1 = animelem = 10
x = -12

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

;---------------------------------------------------------------------------
;Jump Light Punch
[Statedef 600]
type    = A
movetype= A
physics = A
anim = 600
juggle  = 8
poweradd= 30
ctrl = 0
sprpriority = 2

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

[State 600, 2]
type = PlaySnd
trigger1 = AnimElem = 1 && Random <= 800
value = s200,0
channel = 0

[State 600, 3]
type = HitDef
triggerall = numtarget(750) = 0
triggerall = p2stateno != 5040
trigger1 = !Time
attr = A, NA
damage = 20,0
hitflag = MAF
guardflag = HA
priority = 3
pausetime = 11,11
sparkno = s8000
guard.sparkno = s8030
sparkxy = -10,-85
hitsound = s201,1
guardsound = s120,0
animtype = Light
ground.type = Low
air.type = High
ground.slidetime = 12
ground.hittime = 12
air.hittime = 10
guard.ctrltime = 11
ground.velocity = -5.79
guard.velocity = -4.18
air.velocity = -4.39,-6.726568
yaccel = .54688

[State 600, 4]
type = HitDef
triggerall = numtarget(750) = 1
triggerall = p2stateno != 5040
trigger1 = !Time
attr = A, NA
damage = 20,0
hitflag = MAF
guardflag = HA
priority = 3
pausetime = 11,11
sparkno = s8000
guard.sparkno = s8030
sparkxy = -10,-85
hitsound = s201,1
guardsound = s120,0
animtype = Light
ground.type = Low
air.type = High
ground.slidetime = 12
ground.hittime = 12
air.hittime = 10
guard.ctrltime = 11
ground.velocity = -5.79
guard.velocity = -4.18
air.velocity = -4.39,-6.726568
yaccel = .54688
p2stateno = 201

[State 600, 5]
type = AssertSpecial
triggerall = numtarget(750) = 1
trigger1 = 1
flag = nojugglecheck


;---------------------------------------------------------------------------
;Jump Strong Punch
[Statedef 610]
type    = A
movetype= A
physics = A
juggle  = 8
poweradd= 85
anim = 610
ctrl = 0
sprpriority = 2

[State 610, 1]
type = PlaySnd
trigger1 = animelem = 2
value = s201,2

[State 610, 2]
type = PlaySnd
trigger1 = AnimElem = 2 && Random <= 800
value = s200,1
channel = 0

[State 610, 3]
type = HitDef
triggerall = numtarget(750) = 0
triggerall = p2stateno != 5040
trigger1 = !time
attr = A, NA
damage = 45,0
hitflag = MAF
guardflag = HA
priority = 4
pausetime = 11,11
sparkno = s8005
guard.sparkno = s8035
sparkxy = -10,-50
hitsound = s201,3
guardsound = s120,0
animtype = Heavy
ground.type = Low
air.type = high
ground.slidetime = 12
ground.hittime = 12
air.hittime = 10
guard.ctrltime = 11
ground.velocity = -5.79
guard.velocity = -4.18
air.velocity = -4.39,-6.726568
yaccel = .54688

[State 610, 4]
type = HitDef
triggerall = numtarget(750) = 1
triggerall = p2stateno != 5040
trigger1 = !time
attr = A, NA
damage = 45,0
hitflag = MAF
guardflag = HA
priority = 4
pausetime = 11,11
sparkno = s8005
guard.sparkno = s8035
sparkxy = -10,-50
hitsound = s201,3
guardsound = s120,0
animtype = Heavy
ground.type = Low
air.type = high
ground.slidetime = 12
ground.hittime = 12
air.hittime = 10
guard.ctrltime = 11
ground.velocity = -5.79
guard.velocity = -4.18
air.velocity = -4.39,-6.726568
yaccel = .54688
p2stateno = 201

[State 610, 5]
type = AssertSpecial
triggerall = numtarget(750) = 1
trigger1 = 1
flag = nojugglecheck


;---------------------------------------------------------------------------
;Jump Light Kick
[Statedef 630]
type    = A
movetype= A
physics = A
juggle  = 8
poweradd= 30
ctrl = 0
anim = 630
sprpriority = 2

[State 630, 1]
type = PlaySnd
trigger1 = animelem = 2
value = s201,4

[State 630, 2]
type = PlaySnd
trigger1 = AnimElem = 2 && Random <= 800
value = s200,0
channel = 0

[State 630, 3]
type = HitDef
triggerall = numtarget(750) = 0
triggerall = p2stateno != 5040
trigger1 = Time = 0
attr = A, NA
damage = 20,0
hitflag = MAF
guardflag = HA
priority = 3
pausetime = 11,11
sparkno = s8000
guard.sparkno = s8030
sparkxy = -10,-35
hitsound = s201,5
guardsound = s120,0
animtype = Light
ground.type = low
air.type = High
ground.slidetime = 12
ground.hittime = 12
air.hittime = 10
guard.ctrltime = 11
ground.velocity = -5.79
guard.velocity = -4.18
air.velocity = -4.39,-6.726568
yaccel = .54688

[State 630, 4]
type = HitDef
triggerall = numtarget(750) = 1
triggerall = p2stateno != 5040
trigger1 = Time = 0
attr = A, NA
damage = 20,0
hitflag = MAF
guardflag = HA
priority = 3
pausetime = 11,11
sparkno = s8000
guard.sparkno = s8030
sparkxy = -10,-35
hitsound = s201,5
guardsound = s120,0
animtype = Light
ground.type = low
air.type = High
ground.slidetime = 12
ground.hittime = 12
air.hittime = 10
guard.ctrltime = 11
ground.velocity = -5.79
guard.velocity = -4.18
air.velocity = -4.39,-6.726568
yaccel = .54688
p2stateno = 201

[State 630, 5]
type = AssertSpecial
triggerall = numtarget(750) = 1
trigger1 = 1
flag = nojugglecheck

;---------------------------------------------------------------------------
;Jump Light Kick (neutral)
[Statedef 635]
type    = A
movetype= A
physics = A
juggle  = 8
poweradd= 30
ctrl = 0
anim = 635
sprpriority = 2

[State 635, 1]
type = PlaySnd
trigger1 = animelem = 2
value = s201,4

[State 635, 2]
type = PlaySnd
trigger1 = AnimElem = 2 && Random <= 800
value = s200,0
channel = 0

[State 635, 3]
type = HitDef
triggerall = numtarget(750) = 0
triggerall = p2stateno != 5040
trigger1 = Time = 0
attr = A, NA
damage = 20,0
hitflag = MAF
guardflag = HA
priority = 3
pausetime = 11,11
sparkno = s8000
guard.sparkno = s8030
sparkxy = -10,-50
hitsound = s201,5
guardsound = s120,0
animtype = Light
ground.type = low
air.type = High
ground.slidetime = 12
ground.hittime = 12
air.hittime = 10
guard.ctrltime = 11
ground.velocity = -5.79
guard.velocity = -4.18
air.velocity = -4.39,-6.726568
yaccel = .54688

[State 635, 4]
type = HitDef
triggerall = numtarget(750) = 1
triggerall = p2stateno != 5040
trigger1 = Time = 0
attr = A, NA
damage = 20,0
hitflag = MAF
guardflag = HA
priority = 3
pausetime = 11,11
sparkno = s8000
guard.sparkno = s8030
sparkxy = -10,-50
hitsound = s201,5
guardsound = s120,0
animtype = Light
ground.type = low
air.type = High
ground.slidetime = 12
ground.hittime = 12
air.hittime = 10
guard.ctrltime = 11
ground.velocity = -5.79
guard.velocity = -4.18
air.velocity = -4.39,-6.726568
yaccel = .54688
p2stateno = 201

[State 635, 5]
type = AssertSpecial
triggerall = numtarget(750) = 1
trigger1 = 1
flag = nojugglecheck

;---------------------------------------------------------------------------
;Jump Strong Kick
[Statedef 640]
type    = A
movetype= A
physics = A
juggle  = 8
poweradd= 85
ctrl = 0
anim = 640
sprpriority = 2

[State 640, 1]
type = PlaySnd
trigger1 = animelem = 2
value = s201,6

[State 640, 2]
type = PlaySnd
trigger1 = AnimElem = 2 && Random <= 800
value = s200,1
channel = 0

[State 640, 3]
type = HitDef
triggerall = numtarget(750) = 0
triggerall = p2stateno != 5040
trigger1 = animelem = 3
attr = A, NA
damage = 36,0
hitflag = MAF
guardflag = HA
priority = 4
pausetime = 11,11
sparkno = s8005
guard.sparkno = s8035
sparkxy = -10,-30
hitsound = s201,7
guardsound = s120,0
animtype = Heavy
ground.type = Low
air.type = high
ground.slidetime = 12
ground.hittime = 12
air.hittime = 10
guard.ctrltime = 11
ground.velocity = -5.79
guard.velocity = -4.18
air.velocity = -4.39,-6.726568
yaccel = .54688

[State 640, 4]
type = HitDef
triggerall = numtarget(750) = 1
triggerall = p2stateno != 5040
trigger1 = animelem = 3
attr = A, NA
damage = 36,0
hitflag = MAF
guardflag = HA
priority = 4
pausetime = 11,11
sparkno = s8005
guard.sparkno = s8035
sparkxy = -10,-30
hitsound = s201,7
guardsound = s120,0
animtype = Heavy
ground.type = Low
air.type = high
ground.slidetime = 12
ground.hittime = 12
air.hittime = 10
guard.ctrltime = 11
ground.velocity = -5.79
guard.velocity = -4.18
air.velocity = -4.39,-6.726568
yaccel = .54688
p2stateno = 201

[State 640, 5]
type = AssertSpecial
triggerall = numtarget(750) = 1
trigger1 = 1
flag = nojugglecheck

;---------------------------------------------------------------------------
;Jump Strong Kick (Neutral)
[Statedef 645]
type    = A
movetype= A
physics = A
juggle  = 8
poweradd= 85
ctrl = 0
anim = 645
sprpriority = 2

[State 645, 1]
type = PlaySnd
trigger1 = animelem = 2
value = s201,6

[State 645, 2]
type = PlaySnd
trigger1 = AnimElem = 2 && Random <= 800
value = s200,1
channel = 0

[State 645, 3]
type = HitDef
triggerall = numtarget(750) = 0
triggerall = p2stateno != 5040
trigger1 = Time = 0
attr = A, NA
damage = 36,0
hitflag = MAF
guardflag = HA
priority = 4
pausetime = 11,11
sparkno = s8005
guard.sparkno = s8035
sparkxy = -10,-62
hitsound = s201,7
guardsound = s120,0
animtype = Heavy
ground.type = Low
air.type = high
ground.slidetime = 12
ground.hittime = 12
air.hittime = 10
guard.ctrltime = 11
ground.velocity = -5.79
guard.velocity = -4.18
air.velocity = -4.39,-6.726568
yaccel = .54688

[State 645, 4]
type = HitDef
triggerall = numtarget(750) = 1
triggerall = p2stateno != 5040
trigger1 = Time = 0
attr = A, NA
damage = 36,0
hitflag = MAF
guardflag = HA
priority = 4
pausetime = 11,11
sparkno = s8005
guard.sparkno = s8035
sparkxy = -10,-62
hitsound = s201,7
guardsound = s120,0
animtype = Heavy
ground.type = Low
air.type = high
ground.slidetime = 12
ground.hittime = 12
air.hittime = 10
guard.ctrltime = 11
ground.velocity = -5.79
guard.velocity = -4.18
air.velocity = -4.39,-6.726568
yaccel = .54688
p2stateno = 201

[State 645, 5]
type = AssertSpecial
triggerall = numtarget(750) = 1
trigger1 = 1
flag = nojugglecheck

;---------------------------------------------------------------------------
; Yuki-Chan ga Koronda!?
[Statedef 700]
type    = S
movetype= A
physics = S
juggle  = 8
poweradd= 55
ctrl = 0
velset = 0,0
anim = 700
sprpriority = 1

[State 700, 1]
type = Changestate
triggerall = prevstateno = [200,499]
trigger1 = !time
value = 705
ctrl = 0

[State 700, 2]
type = PlaySnd
trigger1 = AnimElem = 5
value = s201,6

[State 700, 3]
type = PlaySnd
trigger1 = AnimElem = 5  && Random <= 800
value = s5000,1
channel = 0

[State 700, 4]
type = Posadd
trigger1 = AnimElem = 3
x = 17

[State 700, 5]
type = Posadd
trigger1 = AnimElem = 4
x = 19

[State 700, 6]
type = Posadd
trigger1 = AnimElem = 5
x = 14

[State 700, 7]
type = Posadd
trigger1 = AnimElem = 6
x = 15

[State 700, 8]
type = StateTypeSet
trigger1 = animelem = 6
statetype = A
physics = N

[State 700, 9]
type = VelSet
trigger1 = animelem = 6
x = 2.5
y = -2

[State 700, 10]
type = Veladd
trigger1 = animelemtime(6) > 0
y = .5

[State 700, 11]
type = HitDef
triggerall = p2stateno != [5020,5040]
triggerall = prevstateno != [200,499]
trigger1 = !time
attr = A, NA
animtype = Heavy
damage = 36,0
hitflag = MAF
guardflag = HA
pausetime = 11,11
sparkno = s8005
guard.sparkno = s8035
sparkxy = -10,-50
hitsound = s201,7
guardsound = s120,0
animtype = Heavy
ground.type = low
ground.slidetime = 20
guard.slidetime = 20
ground.hittime = 18
guard.hittime = 18
air.hittime = 20
guard.ctrltime = 20
ground.velocity = -4.0278,-6.75
guard.velocity = -8
air.velocity = -4.0278,-6.75
fall = 1
air.fall = 1
air.recover = 0
yaccel = .5

[State 700, 12]
type = AssertSpecial
triggerall = numtarget(750) = 1
trigger1 = 1
flag = nojugglecheck

[State 700, 13]
type = Changestate
triggerall = animelemtime(6) > 0
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 710
ctrl = 0

[Statedef 705]
type    = S
movetype= A
physics = S
juggle  = 8
poweradd= 55
ctrl = 0
velset = 0,0
anim = 705
sprpriority = 1

[State 705, 1]
type = PlaySnd
trigger1 = AnimElem = 5
value = s201,6

[State 705, 2]
type = PlaySnd
trigger1 = AnimElem = 5  && Random <= 800
value = s5000,1
channel = 0

[State 705, 3]
type = Posadd
trigger1 = AnimElem = 3
x = 17

[State 705, 4]
type = Posadd
trigger1 = AnimElem = 4
x = 19

[State 705, 5]
type = Posadd
trigger1 = AnimElem = 5
x = 14

[State 705, 6]
type = Posadd
trigger1 = AnimElem = 6
x = 15

[State 705, 7]
type = StateTypeSet
trigger1 = animelem = 6
statetype = A
physics = N

[State 705, 8]
type = Changestate
trigger1 = !animtime
value = 710
ctrl = 0

[Statedef 710]
type    = C
movetype= A
physics = N
juggle  = 8
poweradd= 55
ctrl = 0
velset = 0,0
anim = 710
sprpriority = 1

[State 710, 1]
type = HitDef
triggerall = prevstateno = 705
trigger1 = !time
attr = C, NA
animtype = Heavy
damage = 36,0
hitflag = M
guardflag = M
pausetime = 11,11
sparkno = s8005
guard.sparkno = s8035
sparkxy = -10,-47
hitsound = s201,7
guardsound = s120,0
ground.type = Low
air.type = Low
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -8.28
guard.velocity = -8.28
air.velocity = -4.39,-6.726568
yaccel = .54688

[State 710, 2]
type = PlaySnd
trigger1 = AnimElem = 2
value = s2,5
volume = -255

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


;---------------------------------------------------------------------------
;Stylish 1
[Statedef 720]
type    = S
movetype= A
physics = S
juggle  = 8
poweradd= 55
velset = 0,0
ctrl = 0
anim = 720
sprpriority = 2

[State 720, 1]
type = PlaySnd
trigger1 = animelem = 7
value = s201,2

[State 720, 2]
type = PlaySnd
trigger1 = AnimElem = 7 && Random <= 800
value = s240,0
channel = 0

[State 720, 3]
type = Posadd
trigger1 = AnimElem = 1
trigger2 = AnimElem = 6
trigger3 = AnimElem = 7
trigger4 = AnimElem = 8
trigger5 = AnimElem = 11
x = 10

[State 720, 4]
type = Posadd
trigger1 = AnimElem = 12
x = 8

[State 720, 5]
type = Posadd
trigger1 = AnimElem = 13
x = 4

[State 720, 6]
type = HitDef
trigger1 = !time
attr = S, NA
damage = 36,0
hitflag = MA
guardflag = MA
pausetime = 11,11
sparkno = s8005
guard.sparkno = s8035
sparkxy = -10,ifelse(p2statetype = C, -55, ifelse((p2bodydist y = [-50,0]), -80,-115))
hitsound = s201,9
guardsound = s120,0
animtype = Heavy
ground.type = High
ground.slidetime = 19
ground.hittime = 20
guard.ctrltime = 17
ground.velocity = -2.5,-18.125;-17.625
guard.velocity = -8.28
air.velocity = -2.5,-18.125
air.guard.velocity = -4.39,-6.726568
air.hittime = 10
fall = 1
air.recover = 0
p2stateno = 750
id = 750
mindist = 0,-100
maxdist = 38,0

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

;---------------------------------------------------------------------------
;Stylish 2
[Statedef 730]
type    = A
movetype= A
physics = A
juggle  = 8
poweradd= 85
ctrl = 0
anim = 730
sprpriority = 2

[State 730, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = s240,0
channel = 0

[State 730, 2]
type = PlaySnd
trigger1 = animelem = 3
value = s201,2

[State 730, 3]
type = HitDef
triggerall = numtarget(3100) = 0
triggerall = p2stateno != [5020,5040]
trigger1 = !time
attr = A, NA
damage = 36,0
hitflag = MAF
guardflag = HA
priority = 4
pausetime = 11,11
sparkno = s8005
guard.sparkno = s8035
sparkxy = -10,-45
hitsound = s201,3
guardsound = s120,0
animtype = Heavy
ground.type = low
air.type = high
ground.slidetime = 12
ground.hittime = 12
air.hittime = 10
guard.ctrltime = 11
ground.velocity = -5.79
guard.velocity = -4.18
air.velocity = -8,8
yaccel = .54688
fall = 0
air.fall = 1
fall.recover = 0

[State 730, 4]
type = AssertSpecial
triggerall = numtarget(750) = 1
trigger1 = 1
flag = nojugglecheck


;---------------------------------------------------------------------------
; HIT_SHAKE
[Statedef 750]
type    = A
movetype= H
physics = N
velset = 0,0

[State 750, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 750

[State 750, 2] ;Freeze anim
type = ChangeAnim2
trigger1 = Time > 0
value = anim

[State 750, 3]
type = ChangeState
trigger1 = HitShakeOver
value = 751

[State 750, 4]
type = ForceFeedback
trigger1 = anim = 5012
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

;---------------------------------------------------------------------------
; HITA_UP (initial going up)
[Statedef 751]
type    = A
movetype= H
physics = N
ctrl = 0

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

[State 751, 2]
type = VelAdd
trigger1 = time > 0
y = 1.25

[State 751, 3]
type = VarSet
trigger1 = time = 8
fvar(8) = vel y

[State 751, 4]
type = ChangeState
trigger1 = Time = 8
value = 752

[Statedef 752]
type    = A
movetype= H
physics = N

[State 752, 1]
type = VelSet
trigger1 = !time
y = fvar(8)

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

[State 752, 3]
type = VelAdd
trigger1 = 1
y = .3125

[State 752, 4]
type = VarSet
trigger1 = time = 2
fvar(8) = vel y

[State 752, 5]
type = ChangeState
trigger1 = Time = 2
value = 753

;---------------------------------------------------------------------------
; HITA_FALL (knocked up, falling)
[Statedef 753]
type    = A
movetype= H
physics = N

[State 753, 1]
type = ChangeAnim
triggerall = SelfAnimExist(5060)
trigger1 = Time = 5
value = 5060

[State 753, 2]
type = VelSet
trigger1 = !time
y = fvar(8)

[State 753, 4]
type = VelAdd
trigger1 = 1
y = .625

[State 753, 5] ;Recover near ground
type = Selfstate
triggerall = Vel Y > 0
triggerall = Pos Y >= -40
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery" || command = "z"
value = 5200 ;HITFALL_RECOVER

[State 753, 6]
type = Selfstate
trigger1 = Vel Y > 0
trigger1 = Pos Y >= ifelse((anim = [5051,5059]) || (anim = [5061,5069]), 0, 25)
value = 5100 ;HIT_BOUNCE


;----------------------------------------------------------
; Throw
[Statedef 800]
type    = S
movetype= A
physics = S
juggle  = 8
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 2

[State 800, 1]
type = VarSet
trigger1 = !time
var(2) = ifelse(command = "y", 0, 1)

[State 800, 2]
type = HitDef
triggerall = P2StateNo != [150,155]
triggerall = p2stateno != 40
;triggerall = p2stateno != 52
Trigger1 = time = 0
attr = S, NT
hitflag = M-
priority = 1, Miss
sparkno = -1
sprpriority = 1
p1facing = 1
p2facing = 1
p1stateno = ifelse(var(2), 810, 805)
p2stateno = ifelse(var(2), 855, 850)
guard.dist = 0
fall = 1
numhits = 0
id = 800

[State 800, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = ifelse(var(2), 245, 215)
ctrl = 0

;---------------------------------------------------------------------------
;Throwing the opponent  (Punch Version)
[Statedef 805]
type    = S
movetype= A
physics = N
anim = 810
poweradd = 65
sprpriority = 3

[State 805, 1]
type = PlaySnd
trigger1 = animelem = 1
value = s800,3

[State 805, 2]
type = PlaySnd
trigger1 = animelem = 3
value = s201,8

[State 805, 3]
type = PlaySnd
trigger1 = animelem = 3
value = s800,0
channel = 0

[State 805, 4]
type = Explod
trigger1 = AnimElem = 1
anim = 8020
ID = 8020
pos = 30,-60
postype = p1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = 4
ownpal = 1

[State 805, 5]
type = Width
trigger1 = time = 0
edge = 30,0

[State 805, 6]
type = TargetBind
trigger1 = AnimElemTime(4) < 0
pos = 25,0

[State 805, 7]
type = NotHitBy
trigger1 = Time >= 0
value = SCA

[State 805, 8]
type = TargetFacing
trigger1 = !time
value = -1
ID = 800

[State 805, 9]
type = HitDef
trigger1 = Time = 0
attr = S, NT
damage = 90
hitflag = MAF
guardflag = MA
animtype = Heavy
pausetime = 10,10
sparkno = s8005
guard.sparkno = s8035
sparkxy = -10,-60
hitsound = s201,9
guardsound = s120,1
ground.type = high
ground.slidetime = 12
ground.hittime = 15
ground.velocity = -4.0278,-6.75
guard.velocity = -8.28
air.velocity = -4.0278,-6.75
air.guard.velocity = -4.39,-6.726568
fall = 1
fall.recover = 1
air.fall = 1
air.recover = 0
yaccel = .5
chainid = 800

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

;---------------------------------------------------------------------------
;Throwing the opponent (Kick Version)
[Statedef 810]
type    = S
movetype= A
physics = N
anim = 815
poweradd = 65
sprpriority = 3

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

[State 810, 2]
type = PlaySnd
trigger1 = animelem = 1
value = s800,3

[State 810, 3]
type = Explod
trigger1 = AnimElem = 1
anim = 8020
ID = 8020
pos = 40,-70
postype = p1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = 4
ownpal = 1

[State 810, 4]
type = PlaySnd
trigger1 = AnimElem = 2
value = s50,0

[State 810, 5]
type = TargetBind
trigger1 = animelemtime(3) < 0
pos = 25, 0

[State 810, 6]
type = Width
trigger1 = animelemtime(1) >= 0 && animelemtime(2) < 0
edge = 30,0

[State 810, 7]
type = Width
trigger1 = animelemtime(2) >= 0 && animelemtime(2) < 2
edge = 45,0

[State 810, 8]
type = Width
trigger1 = animelemtime(2) = 2
edge = 65,0

[State 810, 9]
type = PlayerPush
trigger1 = AnimElemTime(2) >= 0
value = 0

[State 810, 10]
type = Statetypeset
trigger1 = animelem = 2
statetype = A
physics = N

[State 810, 11]
type = velset
trigger1 = AnimElem = 3, = 1
x = 3.5
y = -5

[State 810, 12]
type = veladd
trigger1 = AnimElemTime(3) > 0
y = .45

[State 810, 13]
type = Changestate
triggerall = time >= 15
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 815
ctrl = 0

[Statedef 815]
type    = S
movetype= A
physics = N
anim = 820
ctrl = 0
sprpriority = 3
velset = 0,0

[State 815, 1]
type = Turn
trigger1 = !time

[State 815, 2]
type = posset
trigger1 = time = 0
y = 0

[State 815, 3]
type = Playsnd
trigger1 = time = 0
value = s47,0

[State 815, 4]
type = PlaySnd
trigger1 = animelem = 3
value = s201,8

[State 815, 5]
type = PlaySnd
trigger1 = animelem = 4
value = s800,0
channel = 0

[State 815, 6]
type = HitDef
trigger1 = animelem = 5
attr = S, NT
damage = 90
hitflag = MAF
guardflag = MA
animtype = Heavy
pausetime = 10,10
sparkno = s8005
guard.sparkno = s8035
sparkxy = -10,-60
hitsound = s201,9
guardsound = s120,1
ground.type = high
ground.slidetime = 12
ground.hittime = 15
ground.velocity = -4.0278,-6.75
guard.velocity = -8.28
air.velocity = -4.0278,-6.75
air.guard.velocity = -4.39,-6.726568
fall = 1
fall.recover = 1
air.fall = 1
air.recover = 0
yaccel = .5
chainid = 800

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

;---------------------------------------------------------------------------
;Thrown (Punch Version)
[Statedef 850]
type    = A
movetype= H
physics = N
velset = 0,0

[State 850, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 850

[State 850, 2]
type = selfState
trigger1 = !animtime
value = 0
ctrl = 1


;---------------------------------------------------------------------------
;Thrown (Kick Version)
[Statedef 855]
type    = S
movetype= H
physics = N
velset = 0,0

[State 855, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 855

[State 855, 2]
type = SelfState
trigger1 = !animtime
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Emergency Evade (Forwards)
[Statedef 900]
Type    = S
Movetype = I
Physics = S
velset = 0,0
ctrl = 0

[State 900, 1]
type = changeanim
triggerall = prevstateno = [200,440]
trigger1 = time < 4
value = (anim)
elem = (animelemno(0))

[State 900, 2]
type = changeanim
triggerall = prevstateno = [200,440]
trigger1 = Time = 4
value = 900

[State 900, 3]
type = changeanim
triggerall = prevstateno != [200,440]
trigger1 = Time = 0
value = 900

[State 900, 4]
type = PlaySnd
triggerall = anim = 900
trigger1 = animelem = 1
value = S190,0
channel = 0

[State 900, 5]
type = NotHitBy
trigger1 = animelemtime(8) < 0
value = SCA,NA,SA,HA,NP,SP,HP

[State 900, 6]
type = HitBy
trigger1 = animelemtime(8) < 0
value = SC,NT,ST,HT

[State 900, 7]
type = PlayerPush
triggerall = anim = 900
trigger1 = animelemtime(8) < 0
value = 0

[State 900, 8]
type = VelSet
triggerall = anim = 900
trigger1 = AnimElemtime(3) >= 0 && AnimElemtime(8) < 0
x = 5

[State 900, 9]
type = VelSet
triggerall = anim = 900
trigger1 = AnimElem = 8
x = 0

[State 900, 10] ;Blink White
type = PalFX
triggerall = prevstateno = 150 || prevstateno = 152
trigger1 = Time = 0
time = 3
add = 512,512,512

[State 900, 11] ;Blink Blue
type = PalFX
triggerall = prevstateno = [200,440]
trigger1 = Time = 0
time = 3
add = 0,0,256
mul = 0,0,256

[State 900, 12]
type = PowerAdd
triggerall = (prevstateno = 150 || prevstateno = 152) || prevstateno = [200,440]
trigger1 = time = 0
value = -1000

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

;---------------------------------------------------------------------------
; Emergency Evade (Backwards)
[Statedef 905]
Type    = S
Movetype = I
Physics = S
anim = 905
velset = 0,0
ctrl = 0

[State 905, 0]
type = PlaySnd
trigger1 = animelem = 1
value = S190,0
channel = 0

[State 905, 1]
type = NotHitBy
trigger1 = animelemtime(8) < 0
value = SCA,NA,SA,HA,NP,SP,HP

[State 905, 2]
type = HitBy
trigger1 = animelemtime(8) < 0
value = SC,NT,ST,HT

[State 905, 3]
type = PlayerPush
trigger1 = animelemtime(8) < 0
value = 0

[State 905, 4]
type = VelSet
trigger1 = AnimElemtime(3) >= 0 && AnimElemtime(8) < 0
x = -5

[State 905, 5]
type = VelSet
trigger1 = AnimElem = 8
x = 0

[State 905, 6] ;Blink White
type = PalFX
triggerall = prevstateno = 150 || prevstateno = 152
trigger1 = Time = 0
time = 3
add = 512,512,512

[State 905, 7]
type = PowerAdd
triggerall = (prevstateno = 150 || prevstateno = 152) || (prevstateno = [200,440])
trigger1 = time = 0
value = -1000

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

;---------------------------------------------------------------------------
; Blowback Attack
[Statedef 910]
type = S
movetype = A
physics = S
anim = 910
ctrl = 0
velset = 0,0
juggle = 8
poweradd = 85
facep2 = 1

[State 910, 1]
type = Posadd
trigger1 = AnimElem = 7
x = 12

[State 910, 2]
type = Posadd
trigger1 = AnimElem = 8
x = 7

[State 910, 3]
type = Posadd
trigger1 = AnimElem = 9
trigger2 = AnimElem = 10
x = 8

[State 910, 4]
type = Posadd
trigger1 = AnimElem = 11
x = 10

[State 910, 5]
type = Posadd
trigger1 = AnimElem = 12
x = 3

[State 910, 6]
type = PlaySnd
trigger1 = animelem = 7
value = s240,0
channel = 0

[State 910, 7]
type = PlaySnd
trigger1 = animelem = 7
value = s201,8

[State 910, 8]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 90
hitflag = MAF
guardflag = MA
animtype = Heavy
pausetime = 10,10
sparkno = s8005
guard.sparkno = s8035
sparkxy = -10,-ifelse(p2statetype = A, 95, 70)
hitsound = s201,9
guardsound = s120,1
ground.type = high
ground.slidetime = 12
ground.hittime = 15
ground.velocity = -4.0278,-6.75
guard.velocity = -8.28
air.velocity = -4.0278,-6.75
air.guard.velocity = -4.39,-6.726568
fall = 1
fall.recover = 1
air.fall = 1
air.recover = 0
yaccel = .5

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

;---------------------------------------------------------------------------
; Guard Cancel Blowback Attack
[Statedef 915]
type = S
movetype = A
physics = S
anim = 915
ctrl = 0
velset = 0,0
juggle = 8
poweradd = -1000
facep2 = 1

[State 915, 1] ;Blink White
type = PalFX
trigger1 = Time = 0
time = 5
add = 512,512,512

[State 915, 2]
type = NotHitBy
trigger1 = AnimElemtime(5) <= 0
value = SCA

[State 915, 3]
type = PlaySnd
trigger1 = animelem = 3
value = s240,0
channel = 0

[State 915, 4]
type = PlaySnd
trigger1 = animelem = 3
value = s201,8

[State 915, 5]
type = HitDef
trigger1 = animelem = 5
attr = S, NA
damage = 90
hitflag = MAF
guardflag = MA
animtype = Heavy
pausetime = 10,10
sparkno = s8005
guard.sparkno = s8035
sparkxy = -10,-60
hitsound = s201,9
guardsound = s120,1
ground.type = high
ground.slidetime = 12
ground.hittime = 15
ground.velocity = -4.0278,-6.75
guard.velocity = -8.28
air.velocity = -4.0278,-6.75
air.guard.velocity = -4.39,-6.726568
fall = 1
fall.recover = 1
air.fall = 1
air.recover = 0
yaccel = .5

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

;---------------------------------------------------------------------------
; Air Blowback Attack
[Statedef 920]
type = A
movetype = A
physics = A
anim = 920
ctrl = 0
juggle  = 8
poweradd= 85

[State 920, 1]
type = PlaySnd
trigger1 = animelem = 3
value = s240,0
channel = 0

[State 920, 2]
type = PlaySnd
trigger1 = animelem = 3
value = s201,8

[State 920, 3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = 90
hitflag = MAF
guardflag = M
animtype = Heavy
pausetime = 10,10
sparkno = s8005
guard.sparkno = s8035
sparkxy = -10,-40
hitsound = s201,9
guardsound = s120,1
ground.type = high
ground.slidetime = 12
ground.hittime = 15
ground.velocity = -4.0278,-6.75
guard.velocity = -8.28
air.velocity = -4.0278,-6.75
air.guard.velocity = -4.39,-6.726568
fall = 1
fall.recover = 1
air.fall = 1
air.recover = 0
yaccel = .5
id = 920


;---------------------------------------------------------------------------
; Special Attacks
;---------------------------------------------------------------------------
;------------------------------------------------------------------------------
; Yuki-Chan no Kaban no Nakami
[Statedef 1000]
type    = S
movetype= A
physics = S
juggle = 8
poweradd= 100
ctrl = 0
sprpriority = 2
velset = 0,0
anim = 1000
facep2 = 1

[State 1000, 0]
type = varset
triggerall = var(0)
trigger1 = !time
var(2) = ifelse(p2bodydist x < 120, 0, 1)

[State 1000, 1]
type = varset
triggerall = !var(0)
trigger1 = !time
var(2) = ifelse(command = "x", 0, 1)

[State 1000, 2]
type = PlaySnd
trigger1 = animelem = 2
value = s1000,0
channel = 0

[State 1000, 3]
type = Projectile
trigger1 = animelem = 8
ProjID = 1000
projanim = 1010
projhitanim = -1
projcancelanim = -1
projremanim = -1
projscale = 1,1
projremove = 1
velocity = (4+(var(2)*2)), -3
remvelocity = 0,0
accel = 0,.4
velmul = 1
projhits = 1
projmiss = 0
projpriority = 1
projsprpriority = 3
projedgebound = 40
projstagebound = 40
projheightbound = -240
offset = 70,-59
postype = p1
attr = S, SP
hitflag = MAF
guardflag = MA
animtype = Hard
air.animtype = Hard
priority = 4,Hit
damage = 40,8
pausetime = 11,11
sparkno = s8010
guard.sparkno = s8040
sparkxy = 15,-15
hitsound = s201,3
guardsound = s120,1
ground.type = High
air.type = Low
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -9.5
guard.velocity = -8.28
air.velocity = -4.0278,-6.75
air.fall = 1
fall.recover = 1
air.recover = 0
yaccel = .54688
air.juggle = ifelse(numtarget(750) = 1, 7, 8)

[State 1000, 4]
type = Helper
trigger1 = animelem = 8
helpertype = normal
name = "Yuki-Chan no Kaban no Nakami Item 1"
ID = 1010
pos = 72,-61
postype = p1
facing = 1
stateno = 1010
keyctrl = 0
ownpal = 1
sprpriority = 6

[State 1000, 5]
type = Helper
trigger1 = animelem = 8
helpertype = normal
name = "Yuki-Chan no Kaban no Nakami Item 2"
ID = 1020
pos = 77,-61
postype = p1
facing = 1
stateno = 1020
keyctrl = 0
ownpal = 1
sprpriority = 6

[State 1000, 6]
type = Helper
trigger1 = animelem = 8
helpertype = normal
name = "Yuki-Chan no Kaban no Nakami Item 3"
ID = 1030
pos = 77,-76
postype = p1
facing = 1
stateno = 1030
keyctrl = 0
ownpal = 1
sprpriority = 6

[State 1000, 7]
type = Helper
trigger1 = animelem = 8
helpertype = normal
name = "Yuki-Chan no Kaban no Nakami Item 4"
ID = 1040
pos = 72,-76
postype = p1
facing = 1
stateno = 1040
keyctrl = 0
ownpal = 1
sprpriority = 6

[State 1000, 8]
type = playsnd
trigger1 = time = 0
value = s1000,1

[State 1000, 9]
type = Changestate
trigger1 = !animtime
value = 0
ctrl = 1


;-------------------------------------------------------------------------------------------
; Yuki-Chan no Kaban no Nakami Item 1 States
[Statedef 1010]
type    = A
movetype= A
physics = N
juggle  = 8
poweradd = 0
ctrl = 0
sprpriority = 7
anim = 1015

[State 1010, 1]
type = Varset
trigger1 = time = 0
var(2) = parent, var(2)

[State 1010, 2]
type = AssertSpecial
trigger1 = time >= 0
flag = noshadow
ignorehitpause = 1
persistent = 1

[State 1010, 3]
type = VelSet
trigger1 = time = 0
y = -3
x = 2.8+(var(2)*2)

[State 1010, 4]
type = veladd
trigger1 = time >= 0
y = .4

[State 1010, 5]
type = AngleAdd
trigger1 = 1
value = 10

[State 1010, 6]
type = AngleDraw
trigger1 = 1

[State 1010, 7]
type = changestate
trigger1 = !parent, numprojid(1000)
trigger2 = Vel Y > 0
trigger2 = Pos Y >= -10
value = 1015
ctrl = 0

[Statedef 1015]
type = A
physics = N
movetype = I
velset = 0,0
sprpriority = 7

[State 1015, 1]
type = ChangeAnim
trigger1 = time = 0
value = anim + 10

[State 1015, 2]
type = AssertSpecial
trigger1 = time >= 0
flag = noshadow
ignorehitpause = 1
persistent = 1

[State 1015, 3]
type = velset
trigger1 = !time
x = ifelse((parent,projcontact(1000) = 0, < 15), (2.8+(var(2)*2)), -2)
y = -3

[State 1015, 4]
type = veladd
trigger1 = 1
y = .4

[State 1015, 5]
type = AngleAdd
trigger1 = 1
value = 10

[State 1015, 6]
type = AngleDraw
trigger1 = 1

[State 1015, 7]
type = Destroyself
triggerall = time > 3
trigger1 = pos y >= -6 && vel Y > 0



;-------------------------------------------------------------------------------------------
; Yuki-Chan no Kaban no Nakami Item 2 States
[Statedef 1020]
type    = A
movetype= A
physics = N
juggle  = 8
poweradd = 0
ctrl = 0
sprpriority = 7
anim = 1016

[State 1020, 1]
type = Varset
trigger1 = time = 0
var(2) = parent, var(2)

[State 1020, 2]
type = AssertSpecial
trigger1 = time >= 0
flag = noshadow
ignorehitpause = 1
persistent = 1

[State 1020, 3]
type = VelSet
trigger1 = time = 0
y = -3
x = 3.8+(var(2)*2)

[State 1020, 4]
type = veladd
trigger1 = time >= 0
y = .4

[State 1020, 5]
type = changestate
trigger1 = !parent, numprojid(1000)
trigger2 = Vel Y > 0
trigger2 = Pos Y >= -10
value = 1025
ctrl = 0

[Statedef 1025]
type = A
physics = N
movetype = I
velset = 0,0
sprpriority = 7

[State 1025, 1]
type = ChangeAnim
trigger1 = time = 0
value = anim + 10

[State 1025, 2]
type = AssertSpecial
trigger1 = time >= 0
flag = noshadow
ignorehitpause = 1
persistent = 1

[State 1025, 3]
type = velset
trigger1 = !time
x = ifelse((parent,projcontact(1000) = 0, < 15), (3.8+(var(2)*2)), -2)
y = -3

[State 1025, 4]
type = veladd
trigger1 = 1
y = .4

[State 1025, 5]
type = Destroyself
triggerall = time > 3
trigger1 = pos y >= -6 && vel Y > 0


;-------------------------------------------------------------------------------------------
; Yuki-Chan no Kaban no Nakami Item 3 States
[Statedef 1030]
type    = A
movetype= A
physics = N
juggle  = 8
poweradd = 0
ctrl = 0
sprpriority = 7
anim = 1017

[State 1030, 1]
type = Varset
trigger1 = time = 0
var(2) = parent, var(2)

[State 1030, 2]
type = AssertSpecial
trigger1 = time >= 0
flag = noshadow
ignorehitpause = 1
persistent = 1

[State 1030, 3]
type = VelSet
trigger1 = time = 0
y = -3
x = 4+(var(2)*2)

[State 1030, 4]
type = veladd
trigger1 = time >= 0
y = .4

[State 1030, 5]
type = AngleAdd
trigger1 = 1
value = 10

[State 1030, 6]
type = AngleDraw
trigger1 = 1

[State 1030, 7]
type = changestate
trigger1 = !parent, numprojid(1000)
trigger2 = Vel Y > 0
trigger2 = Pos Y >= -10
value = 1035
ctrl = 0

[Statedef 1035]
type = A
physics = N
movetype = I
velset = 0,0
sprpriority = 7

[State 1035, 1]
type = ChangeAnim
trigger1 = time = 0
value = anim + 10

[State 1035, 2]
type = AssertSpecial
trigger1 = time >= 0
flag = noshadow
ignorehitpause = 1
persistent = 1

[State 1035, 3]
type = velset
trigger1 = !time
x = ifelse((parent,projcontact(1000) = 0, < 15), (4+(var(2)*2)), -2)
y = -3

[State 1035, 4]
type = veladd
trigger1 = 1
y = .4

[State 1035, 5]
type = AngleAdd
trigger1 = 1
value = 10

[State 1035, 6]
type = AngleDraw
trigger1 = 1

[State 1037, 7]
type = Destroyself
triggerall = time > 3
trigger1 = pos y >= -6 && vel Y > 0

;-------------------------------------------------------------------------------------------
; Yuki-Chan no Kaban no Nakami Item 4 States
[Statedef 1040]
type    = A
movetype= A
physics = N
juggle  = 8
poweradd = 0
ctrl = 0
sprpriority = 7
anim = 1018

[State 1040, 1]
type = Varset
trigger1 = time = 0
var(2) = parent, var(2)

[State 1040, 2]
type = AssertSpecial
trigger1 = time >= 0
flag = noshadow
ignorehitpause = 1
persistent = 1

[State 1040, 3]
type = VelSet
trigger1 = time = 0
y = -3
x = 3+(var(2)*2)

[State 1040, 4]
type = veladd
trigger1 = time >= 0
y = .4

[State 1040, 5]
type = changestate
trigger1 = !parent, numprojid(1000)
trigger2 = Vel Y > 0
trigger2 = Pos Y >= -10
value = 1045
ctrl = 0

[Statedef 1045]
type = A
physics = N
movetype = I
velset = vel x,0
sprpriority = 7

[State 1045, 1]
type = ChangeAnim
trigger1 = time = 0
value = anim + 10

[State 1045, 2]
type = AssertSpecial
trigger1 = time >= 0
flag = noshadow
ignorehitpause = 1
persistent = 1

[State 1045, 3]
type = velset
trigger1 = !time
x = ifelse((parent,projcontact(1000) = 0, < 15), (3+(var(2)*2)), -2)
y = -3

[State 1045, 4]
type = veladd
trigger1 = 1
y = .4

[State 1045, 5]
type = Destroyself
triggerall = time > 3
trigger1 = pos y >= -6 && vel Y > 0



;---------------------------------------------------------------------------
; Otome no Sakebi
[Statedef 1100]
type    = S
movetype= A
physics = S
juggle  = 8
poweradd= 100
velset = 0,0
ctrl = 0
sprpriority = 2

[State 1100, 0]
type = varset
triggerall = var(0)
trigger1 = time = 0
var(2) = ifelse(random < 300, 1, 0)

[State 1100, 1]
type = VarSet
triggerall = !var(0)
trigger1 = time = 0
var(2) = ifelse(command = "a", 0, 1)

[State 1100, 2]
type = ChangeAnim
trigger1 = !time
value = 1100+var(2)*5

[State 1100, 3]
type = StateTypeSet
trigger1 = animelem = 2
statetype = C
physics = N

[State 1100, 4]
type = StateTypeSet
trigger1 = animelem = 6
statetype = S
physics = N

[State 1100, 5]
type = Helper
trigger1 = animelem = 3, = 3
helpertype = normal
name = "Otome no Sakebi Projectile"
ID = 1105
stateno = 1105
pos = 40,-95
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = 1
size.yscale = 1

[State 1100, 6]
type = PlaySnd
trigger1 = AnimElem = 3
value = s1100,0
channel = 0
;;volume = 255

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

; Otome no Sakebi Projectile
[Statedef 1105]
type    = A
movetype= A
physics = N
juggle = 8
poweradd= 0
ctrl = 0
sprpriority = 3
anim = 9999

[State 1105, 1]
type = AssertSpecial
trigger1 = Time < 7
flag = invisible

[State 1105, 2]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1105, 3]
type = PlaySnd
trigger1 = !time
value = s1000,1

[State 1105, 4]
type = Explod
trigger1 = !time
anim = 1110
ID = 1110
pos = -30,40 ;10,-55
postype = p1
facing = ifelse(facing = 1, 1, -1)
bindtime = 1
vel = 3.5,-4.5
scale = .1,.1
sprpriority = 3
ontop = 0
ownpal = 1
removeongethit = 0
removetime = 7

[State 1105, 5]
type = ModifyExplod
trigger1 = time > 0
ID = 1110
scale = (time+1)*.1,(time+1)*.1

[State 1105, 6]
type = Explod
trigger1 = time = 7
anim = 1115
ID = 1115
pos = 0,0
postype = p1
facing = ifelse(facing = 1, 1, -1)
bindtime = 1
vel = 0,0
scale = 1,1
sprpriority = 3
ontop = 0
ownpal = 1
removeongethit = 0

[State 1105, 7]
type = Projectile
;trigger1 = time = 7
trigger1 = time = 1
ProjID = 1100
projanim = 1120
projhitanim = -1
projremanim = -1
projcancelanim = -1
projscale = 1,1
projremove = 1
projremovetime = ifelse(var(2), 20, 17)
velocity = 3.5,-4.5
accel = -.225,.265
projhits = 1
projpriority = 1
projsprpriority = -1
projedgebound = 40
projstagebound = 40
projheightbound = -240
offset = -25,40
postype = p1
attr = S,SP
hitflag = MAF
guardflag = MA
getpower = 0,0
givepower = 150,75
animtype = Hard
priority = 4,Hit
damage = 60,15
pausetime = 0,11
guard.pausetime = 0,11
sparkno = s8010
guard.sparkno = s8040
sparkxy = ifelse((ceil(p2bodydist x)+10 < -30), -40,ifelse((ceil(p2bodydist x)+10 = [-30,30]), ceil(p2bodydist x)+10, 45)),ifelse(p2statetype = C, 20, ifelse((p2bodydist y = [-40,0]), -27,0))
hitsound = s201,3
guardsound = s120,1
ground.type = High
ground.slidetime = 20
ground.hittime = 21
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -4.0278,-6.75
guard.velocity = -8.28
air.velocity = -4.0278,-6.75
air.guard.velocity = -4.39,-6.726568
sprpriority = 1
fall = 1
fall.recover = 1
air.fall = 1
air.recover = 0
yaccel = .5
air.juggle = ifelse(parent,numtarget(750) = 1, 7, 8)
maxdist = 500,80

[State 1105, 8]
type = Destroyself
trigger1 = time = 29

;----------------------------------------------------------
; Valting Over
[Statedef 1200]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
poweradd = 100
ctrl = 0
sprpriority = 2
anim = 1200

[State 1200, 1]
type = NotHitBy
trigger1 = animelemtime(4) < 0
value = SCA,NA,SA,HA

[State 1200, 2]
type = HitDef
triggerall = P2StateNo != [150,155]
triggerall = p2stateno != 40
;triggerall = p2stateno != 52
Trigger1 = animelem = 3
attr = S, ST
hitflag = M-
priority = 1, Miss
sparkno = -1
sprpriority = 1
p1facing = 1
p2facing = 1
p1stateno = 1210
p2stateno = 1250
guard.dist = 0
fall = 0
numhits = 0
id = 1200

[State 1200, 3]
type = PlaySnd
trigger1 = animelem = 4
value = s1300,0
channel = 0

[State 1200, 4]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Valting Over Throw - Throwing the opponent
[Statedef 1210]
type    = S
movetype= A
physics = N
anim = 1205
poweradd = 0

[State 1210, 1]
type = PlaySnd
trigger1 = animelem = 1
value = s800,3

[State 1210, 2]
type = Explod
trigger1 = AnimElem = 1
anim = 8025
ID = 8025
pos = 40,-70
postype = p1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = 4
ownpal = 1

[State 1210, 3]
type = PlaySnd
trigger1 = AnimElem = 3
value = s50,0

[State 1210, 4]
type = PlaySnd
trigger1 = AnimElem = 4
value = s800,0
channel = 0

[State 1210, 5]
type = TargetBind
trigger1 = animelemtime(3) < 0
pos = 25, 0

[State 1210, 6]
type = BindToTarget
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
pos = 25, 40, Mid

[State 1210, 7]
type = BindToTarget
trigger1 = animelemtime(4) = 0
pos = -5,46, Head

[State 1210, 8]
type = Width
trigger1 = animelemtime(1) >= 0 && animelemtime(2) < 0
edge = 30,0

[State 1210, 9]
type = Width
trigger1 = animelemtime(2) >= 0 && animelemtime(2) < 2
edge = 45,0

[State 1210, 10]
type = Width
trigger1 = animelemtime(2) = 2
edge = 65,0

[State 1210, 11]
type = PlayerPush
trigger1 = AnimElemTime(2) >= 0
value = 0

[State 1210, 12]
type = Statetypeset
trigger1 = animelem = 3
statetype = A
physics = N

[State 1210, 13]
type = velset
trigger1 = AnimElem = 4, = 1
x = 2
y = -3

[State 1210, 14]
type = veladd
trigger1 = AnimElemTime(4) > 0
y = .45

[State 1210, 15]
type = Changestate
triggerall = time >= 15
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 1215
ctrl = 0

[Statedef 1215]
type    = S
movetype= A
physics = S
juggle = 8
anim = 1210
poweradd= 0
ctrl = 0
sprpriority = 2
velset = 0,0

[State 1215, 1]
type = Turn
trigger1 = !time

[State 1215, 2]
type = posset
trigger1 = time = 0
y = 0

[State 1215, 3]
type = Playsnd
trigger1 = time = 0
value = s47,0

[State 1215, 4]
type = Changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Thrown by Valting Over Throw
[Statedef 1250]
type    = S
movetype= H
physics = N
velset = 0,0

[State 1250, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 1250

[State 1250, 2]
type = SelfState
trigger1 = animtime = 0
value = 0
ctrl = 1


;----------------------------------------------------------
; Kaban Barrier!?
[Statedef 1300]
type    = S
movetype= A
physics = S
juggle  = 8
poweradd= 100
velset = 0,0
ctrl = 0
sprpriority = 2

[State 1300, 0]
type = varset
triggerall = var(0)
trigger1 = time = 0
var(2) = ifelse(random < 300, 1, 0)

[State 1300, 1]
type = VarSet
triggerall = !var(0)
trigger1 = time = 0
var(2) = ifelse(command = "a", 0, 1)

[State 1300, 2]
type = ChangeAnim
trigger1 = !time
value = 1300+var(2)*5

[State 1300, 3]
type = Explod
trigger1 = animelem = 1
anim = 1310
ID = 1310
pos = 0,0
postype = p1
facing = 1
bindtime = 1
vel = 0,0
scale = 1,1
sprpriority = 3
ontop = 0
ownpal = 1
removeongethit = 1

[State 1300, 4]
type = PlaySnd
trigger1 = AnimElem = 2
value = s1200,1
channel = 0

[State 1300, 5]
type = PlaySnd
trigger1 = AnimElem = 2
value = s1000,5
volume = -100

[State 1300, 6]
type = Projectile
trigger1 = animelem = 2, =2
ProjID = 1300
projanim = 1315
projhitanim = 1320
projremanim = 1320
projcancelanim = 1320
projscale = 1,1
projremove = 0
projremovetime = ifelse(var(2), 20, 15)
velocity = 0,0
accel = 0,0
projhits = 1
projpriority = 1
projsprpriority = 3
projedgebound = 40
projstagebound = 40
projheightbound = -240
offset = 0,0
postype = p1
attr = S,SP
hitflag = MAF
guardflag = MA
getpower = 0,0
givepower = 150,75
animtype = Hard
priority = 4,Hit
damage = 60,15
pausetime = 0,11
guard.pausetime = 0,11
sparkno = s8010
guard.sparkno = s8040
sparkxy = ifelse((ceil(p2bodydist x)+20 < 30), 30,ifelse((ceil(p2bodydist x)+20 = [30,90]), ceil(p2bodydist x)+20, 90)),ifelse(p2statetype = C, -55, ifelse((p2bodydist y = [-40,0]), -65,-90))
hitsound = s201,3
guardsound = s120,1
ground.type = High
ground.slidetime = 20
ground.hittime = 21
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -4.0278,-6.75
guard.velocity = -8.28
air.velocity = -4.0278,-6.75
air.guard.velocity = -4.39,-6.726568
sprpriority = 1
fall = 1
fall.recover = 1
air.fall = 1
air.recover = 0
yaccel = .5
air.juggle = ifelse(numtarget(750) = 1, 7, 8)
maxdist = 500,0

[State 1300, 7]
type = Helper
trigger1 = animelem = 2, = 2
helpertype = normal
name = "Kaban Barrier!? Reflection"
ID = 1305
stateno = 1305
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1

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

;---------------------------------------------------------------------------
; Kaban Barrier Reflection
[Statedef 1305]
type    = A
movetype= I
physics = N
juggle  = 8
poweradd= 0
velset = 0,0
ctrl = 0
sprpriority = 2
anim = 1350

[State 1305, 1]
type = VarSet
trigger1 = !time
var(2) = parent, var(2)

[State 1305, 2]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1305, 3]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NT,ST,HT,HP

[State 1305, 4]
type = HitBy
trigger1 = 1
value = SCA,NP,SP

[State 1305, 5]
type = HitOverride
trigger1 = 1
attr = SCA,NP,SP
stateno = 1310

[State 1305, 6]
type = DestroySelf
trigger1 = parent,numprojid(1300) = 0
trigger2 = time = ifelse(var(2), 20, 15)

[Statedef 1310]
type    = A
movetype= I
physics = N
juggle  = 8
poweradd= 0
velset = 0,0
ctrl = 0
sprpriority = 2
anim = 9999

[State 1310, 1]
type = AssertSpecial
trigger1 = 1
flag = noshadow

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

[State 1310, 3]
type = DestroySelf
triggerall = root, movetype = H
trigger1 = time = 0

[State 1310, 4]
type = Projectile
trigger1 = time = 1
ProjID = 1310
projanim = 1355
projhitanim = 1320
projremanim = 1320
projcancelanim = 1320
projscale = 1,1
projremove = 1
projremovetime = -1
velocity = ifelse(!var(2),8,10),0
accel = 0,0
projhits = 1
projpriority = 1
projsprpriority = 3
projedgebound = 40
projstagebound = 40
projheightbound = -240
offset = 0,0;0
postype = p1
attr = S,SP
hitflag = MAF
guardflag = MA
getpower = 0,0
givepower = 150,75
animtype = Hard
priority = 4,Hit
damage = 60,15
pausetime = 0,14
sparkno = s8010
guard.sparkno = s8040
sparkxy = 65,-73
hitsound = s201,3
guardsound = s120,1
ground.type = High
ground.slidetime = 20
ground.hittime = 21
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -11
guard.velocity = -8.28
air.velocity = -4.0278,-6.75
air.guard.velocity = -4.39,-6.726568
sprpriority = 1
fall = 0
air.fall = 1
fall.recover = 1
air.recover = 0
yaccel = .5
air.juggle = 8

[State 1310, 5]
type = DestroySelf
trigger1 = time = 1

;------------------------------------------------------------------------------
; Yuki-Chan Furimawasu
[Statedef 1400]
type    = S
movetype= A
physics = S
juggle = 8
poweradd= 100
ctrl = 0
sprpriority = 2
velset = 0,0

[State 1400, 0]
type = varset
triggerall = var(0)
trigger1 = !time
var(2) = ifelse(movehit && (prevstateno = [200,720]), 1, 0)

[State 1400, 1]
type = varset
triggerall = !var(0)
trigger1 = !time
var(2) = ifelse(command = "x", 0, 1)

[State 1400, 2]
type = ChangeAnim
trigger1 = time = 0
value = 1400+var(2)*5

[State 1400, 3]
type = PlaySnd
trigger1 = animelem = 2
value = s1200,0
channel = 0

[State 1400, 4]
type = PlaySnd
trigger1 = animelem = 4
value = s1000,6

[State 1400, 5]
type = PlaySnd
trigger1 = animelem = 4
trigger2 = animelem = 10
trigger3 = var(2) && animelem = 16
trigger4 = var(2) && animelem = 22
value = s201,2

[State 1400,6]
type = VelSet
trigger1 = !var(2) && (animelemtime(2) >= 0 && animelemtime(14) < 0)
trigger2 = var(2) && (animelemtime(2) >= 0 && animelemtime(27) < 0)
x = 3

[State 1400, 7]
type = VelSet
trigger1 = !var(2) && animelem = 14
trigger2 = var(2) && animelem = 27
x = 0

[State 1400, 8]
type = HitDef
triggerall = p2stateno != 5040
trigger1 = animelem = 6
trigger2 = var(2) && animelem = 12
trigger3 = var(2) && animelem = 18
attr = S, SA
damage = 22,0
hitflag = MAF
guardflag = MA
priority = 4
pausetime = 8,8
sparkno = s8010
guard.sparkno = s8040
sparkxy = -10,-55
hitsound = s201,3
guardsound = s120,1
animtype = Heavy
ground.type = low
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -5.25
guard.velocity = -8.28
air.velocity = -4.0278,-6.75
fall = 0
air.fall = 1
air.recover = 0
yaccel = .5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
id = 1400

[State 1400, 9]
type = HitDef
triggerall = p2stateno != 5040
trigger1 = !var(2) && animelem = 12
trigger2 = var(2) && animelem = 24
attr = S, SA
damage = 32,0
hitflag = MAF
guardflag = MA
priority = 4
pausetime = 11,11
sparkno = s8010
guard.sparkno = s8040
sparkxy = -10,-55
hitsound = s201,3
guardsound = s120,1
animtype = Heavy
ground.type = low
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -4.0278,-6.75
guard.velocity = -8.28
air.velocity = -4.0278,-6.75
fall = 1
air.fall = 1
air.recover = 0
yaccel = .5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
id = 1400

[State 1400, 10]
type = PlaySnd
trigger1 = animelem = 26
value = s5000,1
channel = 0

[State 1400, 11]
type = PlaySnd
trigger1 = animelem = 27
value = S1220,1

[State 1400, 12]
type = EnvShake
trigger1 = animelem = 27
ampl = 4
time = 20

[State 1400, 13]
type = StateTypeSet
trigger1 = 27
statetype = C

[State 1400, 14]
type = StateTypeSet
trigger1 = 32
statetype = S

[State 1400, 15]
type = Explod
trigger1 = animelem = 27
anim = 8056
ID = 8056
pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = 11
scale = 1,1
sprpriority = 1
ownpal = 1
removeongethit = 0

[State 1400, 16]
type = Explod
trigger1 = animelem = 28
anim = 8057
ID = 8057
pos = 0,4
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = 7
scale = 1,1
sprpriority = 2
ownpal = 1
removeongethit = 0

[State 1400, 17]
type = AssertSpecial
triggerall = numtarget(750) = 1
trigger1 = 1
flag = nojugglecheck

[State 1400, 18]
type = Changestate
trigger1 = !animtime
value = 0
ctrl = 1



;------------------------------------------------------------------------------
; Hyakuretsu Terekakushi
[Statedef 1500]
type    = S
movetype= A
physics = S
juggle = 8
poweradd= 100
ctrl = 0
sprpriority = 2
velset = 0,0
facep2 = 1

[State 1500, 0]
type = varset
triggerall = var(0)
trigger1 = !time
var(2) = ifelse(random < 500, 0, 1)

[State 1500, 1]
type = varset
triggerall = !var(0)
trigger1 = !time
var(2) = ifelse(command = "Hyakuretsu Terekakushi_x", 0, 1)

[State 1500, 2]
type = changeanim
trigger1 = !time
value = 1500

[State 1500, 3]
type = velset
trigger1 = animelemtime(2) >= 0
x = ((8.2500+var(2)*2)*exp((-0.1886)*(time-5)))

[State 1500, 4]
type = PlaySnd
trigger1 = animelem = 3
trigger2 = animelem = 7
trigger3 = animelem = 11
trigger4 = animelem = 15
trigger5 = animelem = 19
trigger6 = animelem = 23
value = s1200,2
channel = 0

[State 1500, 5]
type = PlaySnd
trigger1 = animelem = 2
trigger2 = animelem = 4
trigger3 = animelem = 6
trigger4 = animelem = 8
trigger5 = animelem = 10
trigger6 = animelem = 12
trigger7 = animelem = 14
trigger8 = animelem = 16
trigger9 = animelem = 18
trigger10 = animelem = 20
trigger11 = animelem = 22
trigger12 = animelem = 24
value = s5,4

[State 1500, 6]
type = HitDef
triggerall = p2stateno != [5020,5040]
trigger1 = animelem = 3
trigger2 = animelem = 11
trigger3 = animelem = 19
attr = S, SA
animtype = Heavy
damage = 0,0
hitflag = MAF
guardflag = MA
pausetime = 0,0
guard.pausetime = 3,3
sparkno = s8010
guard.sparkno = s8040
sparkxy = -10,-75
hitsound = s201,3
guardsound = s120,0
ground.type = high
air.type = high
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -5.79
guard.velocity = -4.18
air.velocity = -4.0278,-6.75
fall = 0
air.fall = 0
air.recover = 0
fall.recover = 0
yaccel = .54688
kill = 0
guard.kill = 0
id = ifelse(numtarget(750) = 1, 1505, 1500)
numhits = 0
p1stateno = 1510
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = -8
airguard.cornerpush.veloff = -8

[State 1500, 7]
type = HitDef
triggerall = p2stateno != [5020,5040]
trigger1 = animelem = 5
trigger2 = animelem = 9
trigger3 = animelem = 13
trigger4 = animelem = 17
trigger5 = animelem = 21
trigger6 = animelem = 25
attr = S, SA
animtype = Heavy
damage = 0,0
hitflag = MAF
guardflag = MA
pausetime = 0,0
guard.pausetime = 3,3
sparkno = s8010
guard.sparkno = s8040
sparkxy = -10,-65
hitsound = s201,3
guardsound = s120,0
ground.type = high
air.type = high
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -5.79
guard.velocity = -4.18
air.velocity = -4.0278,-6.75
fall = 0
air.fall = 0
air.recover = 0
fall.recover = 0
yaccel = .54688
kill = 0
guard.kill = 0
id = ifelse(numtarget(750) = 1, 1505, 1500)
numhits = 0
p1stateno = 1510
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = -8
airguard.cornerpush.veloff = -8

[State 1500, 8]
type = HitDef
triggerall = p2stateno != [5020,5040]
trigger1 = animelem = 7
trigger2 = animelem = 15
trigger3 = animelem = 23
attr = S, SA
animtype = Heavy
damage = 0,0
hitflag = MAF
guardflag = MA
pausetime = 0,0
guard.pausetime = 3,3
sparkno = s8010
guard.sparkno = s8040
sparkxy = -10,-55
hitsound = s201,3
guardsound = s120,0
ground.type = low
air.type = low
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -5.79
guard.velocity = -4.18
air.velocity = -4.0278,-6.75
fall = 0
air.fall = 0
air.recover = 0
fall.recover = 0
yaccel = .54688
kill = 0
guard.kill = 0
id = ifelse(numtarget(750) = 1, 1505, 1500)
numhits = 0
p1stateno = 1510
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = -8
airguard.cornerpush.veloff = -8

[State 1500, 9]
type = AssertSpecial
triggerall = numtarget(750) = 1
trigger1 = 1
flag = nojugglecheck

[State 1500, 10]
type = Changestate
trigger1 = !var(2) && animelem = 18, = 0
trigger2 = !animtime
value = 1505
ctrl = 0

[Statedef 1505]
type    = S
movetype= A
physics = S
juggle = 8
ctrl = 0
sprpriority = 2
velset = 0,0
anim = 1505

[State 1505, 1]
type = Changestate
trigger1 = !animtime
value = 0
ctrl = 1

[Statedef 1510]
type    = S
movetype= A
physics = S
juggle = 8
ctrl = 0
sprpriority = 2
velset = 0,0
anim = 1510

[State 1510, 1]
type = Width
trigger1 = !time
edge = 30,0

[State 1510, 2]
type = TargetState
trigger1 = !time
value = 1550
ID = 1500

[State 1510, 3]
type = TargetState
trigger1 = !time
value = 1550
ID = 1505

[State 1510, 4]
type = TargetBind
trigger1 = !time
time = 1
id = 1500
pos = 20,0

[State 1510, 5]
type = TargetBind
trigger1 = !time
time = 1
id = 1505
pos = 20,0

[State 1510, 6]
type = PlaySnd
trigger1 = animelem = 2
trigger2 = animelem = 6
trigger3 = animelem = 10
trigger4 = animelem = 14
trigger5 = animelem = 18
trigger6 = animelem = 22
trigger7 = animelem = 26
value = s1200,2
channel = 0

[State 1510, 7]
type = PlaySnd
trigger1 = animelem = 1
trigger2 = animelem = 3
trigger3 = animelem = 5
trigger4 = animelem = 7
trigger5 = animelem = 9
trigger6 = animelem = 11
trigger7 = animelem = 13
trigger8 = animelem = 15
trigger9 = animelem = 17
trigger10 = animelem = 19
trigger11 = animelem = 21
trigger12 = animelem = 23
trigger13 = animelem = 25
value = s5,4

[State 1510, 8]
type = AssertSpecial
triggerall = numtarget(1505) = 1
trigger1 = 1
flag = nojugglecheck

[State 1510, 9]
type = HitDef
trigger1 = animelem = 2
trigger2 = animelem = 10
trigger3 = animelem = 18
attr = S, SA
animtype = Heavy
damage = 5,5
hitflag = MAF
guardflag = MA
pausetime = 0,0
guard.pausetime = 3,3
sparkno = s8010
guard.sparkno = s8040
sparkxy = -10,-75
hitsound = s201,3
guardsound = s120,0
ground.type = high
air.type = high
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = 0
guard.velocity = 0
air.velocity = -4.0278,-6.75
fall = 0
air.fall = 0
air.recover = 0
fall.recover = 0
yaccel = .54688
getpower = 0,0
kill = 0
guard.kill = 1
id = ifelse(numtarget(1505) = 1, 1505, 1500)

[State 1510, 10]
type = HitDef
trigger1 = animelem = 4
trigger2 = animelem = 8
trigger3 = animelem = 12
trigger4 = animelem = 16
trigger5 = animelem = 20
trigger6 = animelem = 24
attr = S, SA
animtype = Heavy
damage = 5,5
hitflag = MAF
guardflag = MA
pausetime = 0,0
guard.pausetime = 3,3
sparkno = s8010
guard.sparkno = s8040
sparkxy = -10,-65
hitsound = s201,3
guardsound = s120,0
ground.type = high
air.type = high
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = 0
guard.velocity = 0
air.velocity = -4.0278,-6.75
fall = 0
air.fall = 0
air.recover = 0
fall.recover = 0
yaccel = .54688
getpower = 0,0
kill = 0
guard.kill = 1
id = ifelse(numtarget(1505) = 1, 1505, 1500)

[State 1510, 11]
type = HitDef
trigger1 = animelem = 6
trigger2 = animelem = 14
trigger3 = animelem = 22
attr = S, SA
animtype = Heavy
damage = 5,5
hitflag = MAF
guardflag = MA
pausetime = 0,0
guard.pausetime = 3,3
sparkno = s8010
guard.sparkno = s8040
sparkxy = -10,-55
hitsound = s201,3
guardsound = s120,0
ground.type = low
air.type = low
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = 0
guard.velocity = 0
air.velocity = -4.0278,-6.75
fall = 0
air.fall = 0
air.recover = 0
fall.recover = 0
yaccel = .54688
getpower = 0,0
kill = 0
guard.kill = 1
id = ifelse(numtarget(1505) = 1, 1505, 1500)

[State 1510, 12]
type = HitDef
trigger1 = animelem = 26
attr = S, SA
animtype = Heavy
damage = 15,5
hitflag = MAF
guardflag = MA
pausetime = 15,15
sparkno = s8010
guard.sparkno = s8040
sparkxy = -10,-80
hitsound = s2,13
guardsound = s120,0
ground.type = high
air.type = high
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -4.0278,-6.75
guard.velocity = -8.28
air.velocity = -4.0278,-6.75
air.guard.velocity = -4.39,-6.726568
fall = 1
air.fall = 1
air.recover = 0
fall.recover = 0
yaccel = .54688
getpower = 0,0
id = 1510

[State 1510, 13]
type = Changestate
trigger1 = !animtime
value = 0
ctrl = 1


;---------------------------------------------------------------------------
; P2 States
[Statedef 1550]
type    = S
movetype= H
physics = N
velset = 0,0

[State 1550, 1]
type = HitFallSet
trigger1 = 1
value = 0

[State 1550, 2]
type = PosSet
trigger1 = !time
y = 0

[State 1550, 3]
type = ChangeAnim
trigger1 = Time = 0
value = 5000

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

[State 1550, 5]
type = changestate
trigger1 = HitShakeOver
value = 1555
ctrl = 0

[Statedef 1555]
type    = S
movetype= H
physics = S

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

[State 1555, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 5007

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

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

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

[State 1555, 6]
type = selfstate
trigger1 = HitOver
value = 0
ctrl = 1


;----------------------------------------------------------
; Sabaori 2000
[Statedef 1600]
type    = S
movetype= A
physics = S
juggle  = 8
velset = 0,0
poweradd = 100
ctrl = 0
sprpriority = 2
anim = 1600
juggle = 8

[State 1600, 1]
type = NotHitBy
trigger1 = animelemtime(8) < 0
value = SCA,NA,SA,HA

[State 1600, 2]
type = HitDef
triggerall = P2StateNo != [150,155]
triggerall = p2stateno != 40
;triggerall = p2stateno != 52
Trigger1 = animelem = 7
attr = S, ST
hitflag = M-
priority = 1, Miss
sparkno = -1
sprpriority = 1
p1facing = 1
p2facing = 1
p1stateno = 1605
p2stateno = 1650
guard.dist = 0
fall = 1
numhits = 0
id = 1600

[State 1600, 3]
type = PlaySnd
trigger1 = animelem = 2
value = s1600,0
channel = 0

[State 1600, 4]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Sabaori 2000 Throw - Throwing the opponent
[Statedef 1605]
type    = S
movetype= A
physics = N
anim = 1605
poweradd = 0

[State 1605, 1]
type = PlaySnd
trigger1 = animelem = 1
value = s800,3

[State 1605, 2]
type = Explod
trigger1 = AnimElem = 1
anim = 8025
ID = 8025
pos = 36,-61
postype = p1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = 4
ownpal = 1

[State 1605, 3]
type = PlaySnd
trigger1 = animelem = 3
trigger2 = animelem = 7
trigger3 = animelem = 11
trigger4 = animelem = 15
trigger5 = AnimElem = 19
value = s200,0
channel = 0
;volume = 255

[State 1605, 4]
type = PlaySnd
trigger1 = animelem = 3
trigger2 = animelem = 7
trigger3 = animelem = 11
trigger4 = animelem = 15
trigger5 = AnimElem = 19
value = s1600,1

[State 1605, 5]
type = Explod
trigger1 = animelem = 3
trigger2 = animelem = 7
trigger3 = animelem = 11
trigger4 = animelem = 15
trigger5 = AnimElem = 19
anim = 8000
ID = 8000
pos = 34,-60
postype = p1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = 4
ownpal = 1

[State 1605, 6]
type = TargetBind
trigger1 = animelemtime(21) < 0
pos = 12, 0

[State 1605, 7]
type = Width
trigger1 = animelemtime(21) < 0
edge = 30,0

[State 1605, 8]
type = TargetLifeAdd
trigger1 = animelem = 3
trigger2 = animelem = 7
trigger3 = animelem = 11
trigger4 = animelem = 15
value = -20
ID = 1600
kill = 0
absolute = 1

[State 1605, 9]
type = TargetLifeAdd
trigger1 = animelem = 19
value = -20
ID = 1600
kill = 1
absolute = 1

[State 1605, 10]
type = TargetState
trigger1 = animelem = 21
value = 1655
ID = 1600

[State 1605, 11]
type = Changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Thrown by Sabaori 2000 Throw
[Statedef 1650]
type    = S
movetype= H
physics = N
velset = 0,0

[State 1650, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 1650

[State 1650, 2]
type = SelfState
trigger1 = animtime = 0
value = 0
ctrl = 1


[Statedef 1655]
type    = A
movetype= H
physics = N
velset = 0,0

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

[State 1655, 2]
type = ChangeAnim
trigger1 = anim = [5050,5059]
trigger1 = Vel Y >= ifelse(anim = 5050, 1, -2)
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 1655, 3]
type = VelAdd;Gravity
trigger1 = 1
y = .5

[State 1655, 4]
type = VelSet
trigger1 = Time = 0
x = -4.0278
y = -6.75

[State 1655, 5];Recover near ground
type = Selfstate
triggerall = time > 10
triggerall = Vel Y > 0
triggerall = Pos Y >= -40
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery" || command = "z"
value = 5200 ;HITFALL_RECOVER

[State 1655, 6]
type = Selfstate
triggerall = time > 10
trigger1 = Vel Y > 0
trigger1 = Pos Y >= ifelse((anim = [5051,5059]) || (anim = [5061,5069]), 0, 25)
value = 5100 ;HIT_BOUNCE




;---------------------------------------------------------------------------
; Hyper Attacks
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; Yuki-Chan no Trap
[Statedef 3000]
type    = S
movetype= A
physics = N
anim = 3000
juggle = 8
velset = 0,0
poweradd = 0
ctrl = 0
sprpriority = 2
facep2 = 1

[State 3000, 1]
type = VarSet
trigger1 = !time
var(3) = 0

[State 3000, 2]
type = Helper
triggerall = prevstateno = [1000,1999]
trigger1 = time = 0
helpertype = normal
name = "Super Cancel"
ID = 3600
stateno = 3600
pos = 0,0
postype = left
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 9999
pausemovetime = 9999
size.xscale = 1
size.yscale = 1
ignorehitpause = 1

[State 3000, 3]
type = PalFX
triggerall = prevstateno = [1000,1999]
triggerall = time <= 10
trigger1 = Time%2
time = 1
add = 256,0,0
mul = 256,0,0
sinadd = 256,0,0,1
invertall = 0
color = 256

[State 3000, 4]
type = AssertSpecial
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
flag= noFG
flag2= noBG

[State 3000, 5]
type = SuperPause
trigger1 = animelem = 3
time = 38
anim = -1
sound = s3200,0
movetime = 38
darken = 0
poweradd = -1000
unhittable = 1
p2defmul = 1

[State 3000, 6]
type = EnvColor
trigger1 = animelem = 3, = 0
value = 248,248,248
time = 2
under = 1

[State 3000, 7]
type = EnvColor
trigger1 = animelem = 3
value = 0, 0, 0
time = 38
under = 1

[State 3000, 8]
type = NotHitBy
trigger1 = animelemtime(8) < 0
value = SCA

[State 3000, 9]
type = Explod
trigger1 = animelem = 3, = 0
anim = 8200
ID = 8200
pos = 34,-104
postype = p1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = 4
ownpal = 1
supermove = 1

[State 3000, 10]
type = Explod
trigger1 = animelem = 3, = 0
anim = 8201
ID = 8201
pos = 34,-104
postype = p1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = -1
ownpal = 1
supermove = 1

[State 3000, 11]
type = PlaySnd
trigger1 = animelem = 7
value = s240,0
channel = 0

[State 3000, 12]
type = PlaySnd
trigger1 = animelem = 7
value = s201,8

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

[State 3000, 14]
type = PosAdd
trigger1 = animelem = 6
x = 7

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

[State 3000, 16]
type = velset
trigger1 = animelemtime(4) >= 0
x = (8.2500*exp((-0.1886)*(time-38)))

[State 3000, 17]
type = VarSet
trigger1 = movehit
trigger1 = numtarget
var(3) = 1
ignorehitpause = 1
persistent = 1

[State 3000, 18]
type = NotHitBy
triggerall = var(3)
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 3000, 19]
type = HitDef
trigger1 = animelem = 8
attr = S, HA
damage = 90,15
hitflag = MAF
guardflag = MA
animtype = Heavy
pausetime = 12,12
sparkno = s8005
guard.sparkno = s8035
sparkxy = -10,-60
hitsound = s201,9
guardsound = s120,1
ground.type = Low
air.type = Low
ground.slidetime = 15
guard.slidetime = 15
ground.hittime = 12
guard.hittime = 12
air.hittime = 12
guard.ctrltime = 12
ground.velocity = -5.5,-5
guard.velocity = -6
air.velocity = -5.5,-5
sprpriority = 2
fall = 1
air.fall = 1
air.recover = 0
fall.recover = 0
yaccel = .5
p2stateno = 3080
id = 3000
p2facing = 1
getpower = 0,0
mindist = 35,0
maxdist = 80,9999999999
hitonce = 1

[State 3000, 20]
type = AssertSpecial
triggerall = numtarget(750) = 1 || numtarget(1400) = 1 || numtarget(1505) = 1 || numtarget(1510) = 1
trigger1 = 1
flag = nojugglecheck

[State 3000, 21]
type = ChangeState
triggerall = var(3)
trigger1 = animelem = 9
value = 3005
ctrl = 0

[State 3000, 22]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1

[Statedef 3005]
type    = S
movetype= A
physics = N
anim = 3005
juggle = 8
velset = 0,0
poweradd = 0
ctrl = 0
sprpriority = 2

[State 3005, 1]
type = NotHitBy
triggerall = animelemtime(23) <= 0
trigger1 = 1
value = SCA

[State 3005, 2]
type = Helper
trigger1 = animelem = 4
helpertype = normal
name = "Yuki-Chan no Trap Projectile"
ID = 3010
stateno = 3010
pos = 155,-120;ceil(((target(3000), pos x + (10*facing))- pos x)*facing),-120
postype = p1
facing = 1
keyctrl = 0
ownpal = 1

[state 3005, 3]
type = velset
triggerall = numtarget(3000) && (animelemtime(3) >= 0 && animelemtime(6) < 0)
trigger1 = target(3000),BackEdgeBodyDist = 0
x = (target(3000),vel x)

[State 3005, 4]
type = VelSet
trigger1 = animelem = 6
x = 0

[State 3005, 5]
type = PlaySnd
trigger1 = animelem = 23
value = S3000,1
channel = 0

[State 0, TargetState]; ***
type = TargetState
trigger1 = time = 31
value = 3091
ID = -1

[State 0, TargetFacing]; ***
type = Targetlifeadd
trigger1 = time = 31
value = -150
ID = -1

[State 0, HitAdd]; ***
type = HitAdd
trigger1 = time = 42
value = 1

[State 3010, 9]; ***
type = Explod
trigger1 = time = 31
anim = 8005
pos = -10,-10
postype = p2
bindtime = 1
supermove = 0
pausemovetime = 0
sprpriority = 5
ownpal = 1
removeongethit = 0

[State 0, PlaySnd]; ***
type = PlaySnd
trigger1 = time = 31
value = s2,6
channel = -1

[State 3005, 6]
type = ChangeState
trigger1 = !animtime
value = 0
ctrl = 1


;---------------------------------------------------------------------------
;Yuki-Chan no Trap Projectile
[Statedef 3010]
type    = A
movetype= A
physics = N
anim = 3010
juggle = 0
velset = 0,0
poweradd = 0
ctrl = 0
sprpriority = 4

[State 3010, 1]
type = AngleDraw
trigger1 = 1

[State 3010, 2]
type = AngleSet
trigger1 = 1
value = -20

[state 3010, 3]
type = Trans
trigger1 = AnimElemtime(1) >= 0 && AnimElemtime(1) < 11
trans = addalpha
alpha = animelemtime(1)*10,255-animelemtime(1)*5

[State 3010, 4]
type = AssertSpecial
trigger1 = time >= 0
flag = noshadow
ignorehitpause = 1
persistent = 1

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

[State 3010, 6]
type = VelSet
trigger1 = animelem = 2
y = 11

[State 3010, 7]
type = PlaySnd
trigger1 = animelem = 2
value = S1000,12

[State 3010, 8]
type = SprPriority
trigger1 = 1
value = 4
ignorehitpause = 1

[State 3010, 9]
type = null; HitDef
trigger1 = animelem = 2
attr = A, HA
damage = 150,15
hitflag = MAFD
guardflag = MA
animtype = Heavy
pausetime = 0,15
sparkno = s8005
guard.sparkno = s8035
sparkxy = -10,-10
hitsound = s2,6
guardsound = s120,1
ground.type = Low
air.type = Low
ground.slidetime = 15
guard.slidetime = 15
ground.hittime = 12
guard.hittime = 12
air.hittime = 12
guard.ctrltime = 12
ground.velocity = -5.5,-5
guard.velocity = -6
air.velocity = -5.5,-5
sprpriority = 2
fall = 1
air.fall = 1
air.recover = 0
fall.recover = 0
yaccel = .5
envshake.time = 30
envshake.ampl = 6
getpower = 0,0

[State 3010, 10]
type = ScreenBound
trigger1 = 1
value = 1

[State 3010, 11]
type = changestate
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 3015
ctrl = 0

[Statedef 3015]
type    = A
movetype= I
physics = N
juggle  = 8
poweradd = 0
ctrl = 0
sprpriority = 4

[State 3015, 1]
type = AngleDraw
trigger1 = 1

[State 3015, 2]
type = AngleSet
trigger1 = 1
value = -20

[State 3015, 3]
type = velset
trigger1 = time >= 0
x = 0
y = 0
ignorehitpause = 1

[State 3015, 4]
type = AssertSpecial
trigger1 = time >= 0
flag = noshadow
ignorehitpause = 1
persistent = 1

[State 3015, 5]
type = PlaySnd
trigger1 = time = 1
value = s3,18

[State 3015, 6]
type = NotHitBy
trigger1 = time >= 0
value = SCA

[State 3015, 7]
type = Trans
trigger1 = time >= 20
trans = addalpha
alpha = 256-(time-20)*10,(time-20)*10

[State 3015, 8]
type = EnvShake
trigger1 = !time
ampl = 6
time = 30

[State 3010, 9]
type = Explod
trigger1 = time = 0
anim = 8055
ID = 8055
pos = 0,0
postype = p1
facing = 1
bindtime = 1
vel = 0,0
removetime = 35
supermove = 0
pausemovetime = 0
sprpriority = 5
ownpal = 1
removeongethit = 0

[State 3015, 10]
type = Destroyself
trigger1 = time = 40


;---------------------------------------------------------------------------
; EX Yuki-Chan no Trap
[Statedef 3050]
type    = S
movetype= A
physics = N
anim = 3000
juggle = 8
velset = 0,0
poweradd = 0
ctrl = 0
sprpriority = 2
facep2 = 1

[State 3050, 1]
type = VarSet
trigger1 = !time
var(3) = 0

[State 3050, 2]
type = Helper
triggerall = prevstateno = [1000,1999]
trigger1 = time = 0
helpertype = normal
name = "Super Cancel"
ID = 3600
stateno = 3600
pos = 0,0
postype = left
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 9999
pausemovetime = 9999
size.xscale = 1
size.yscale = 1
ignorehitpause = 1

[State 3050, 3]
type = PalFX
triggerall = prevstateno = [1000,1999]
triggerall = time <= 10
trigger1 = Time%2
time = 1
add = 256,0,0
mul = 256,0,0
sinadd = 256,0,0,1
invertall = 0
color = 256

[State 3050, 4]
type = AssertSpecial
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
flag= noFG
flag2= noBG

[State 3050, 5]
type = SuperPause
trigger1 = animelem = 3
time = 38
anim = -1
sound = s3200,1
movetime = 38
darken = 0
poweradd = -2000
unhittable = 1
p2defmul = 1

[State 3050, 6]
type = EnvColor
trigger1 = animelem = 3, = 0
value = 248,248,248
time = 2
under = 1

[State 3050, 7]
type = EnvColor
trigger1 = animelem = 3
value = 0, 0, 0
time = 38
under = 1

[State 3050, 8]
type = NotHitBy
trigger1 = animelemtime(8) < 0
value = SCA

[State 3050, 9]
type = Explod
trigger1 = animelem = 3, = 0
anim = 8205
ID = 8205
pos = 34,-104
postype = p1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = 4
ownpal = 1
supermove = 1

[State 3050, 10]
type = Explod
trigger1 = animelem = 3, = 0
anim = 8206
ID = 8206
pos = 34,-104
postype = p1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = -1
ownpal = 1
supermove = 1

[State 3050, 11]
type = PlaySnd
trigger1 = animelem = 7
value = s240,0
channel = 0

[State 3050, 12]
type = PlaySnd
trigger1 = animelem = 7
value = s201,8

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

[State 3050, 14]
type = PosAdd
trigger1 = animelem = 6
x = 7

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

[State 3050, 16]
type = velset
trigger1 = animelemtime(4) >= 0
x = (8.2500*exp((-0.1886)*(time-38)))

[State 3000, 17]
type = VarSet
trigger1 = movehit
trigger1 = numtarget
var(3) = 1
ignorehitpause = 1
persistent = 1

[State 3000, 18]
type = NotHitBy
triggerall = var(3)
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 3050, 19]
type = HitDef
trigger1 = animelem = 8
attr = S, HA
damage = 90,15
hitflag = MAF
guardflag = MA
animtype = Heavy
pausetime = 12,12
sparkno = s8005
guard.sparkno = s8035
sparkxy = -10,-60
hitsound = s201,9
guardsound = s120,1
ground.type = Low
air.type = Low
ground.slidetime = 15
guard.slidetime = 15
ground.hittime = 12
guard.hittime = 12
air.hittime = 12
guard.ctrltime = 12
ground.velocity = -5.5,-5
guard.velocity = -6
air.velocity = -5.5,-5
sprpriority = 2
fall = 1
air.fall = 1
air.recover = 0
fall.recover = 0
yaccel = .5
p2stateno = 3080
id = 3050
p2facing = 1
getpower = 0,0
mindist = 35,0
maxdist = 80,9999999999
hitonce = 1

[State 3050, 20]
type = AssertSpecial
triggerall = numtarget(750) = 1 || numtarget(1400) = 1 || numtarget(1505) = 1 || numtarget(1510) = 1
trigger1 = 1
flag = nojugglecheck

[State 3000, 21]
type = ChangeState
triggerall = var(3)
trigger1 = animelem = 9
value = 3055
ctrl = 0

[State 3050, 22]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1

[Statedef 3055]
type    = S
movetype= A
physics = N
anim = 3005
juggle = 8
velset = 0,0
poweradd = 0
ctrl = 0
sprpriority = 2

[State 3055, 1]
type = NotHitBy
triggerall = animelemtime(23) <= 0
trigger1 = 1
value = SCA

[State 3055, 2]
type = Helper
trigger1 = animelem = 4
helpertype = normal
name = "Yuki-Chan no Trap Chang"
ID = 3060
stateno = 3060
pos = 175,-250;ceil(((target(3000), pos x + (80*facing))- pos x)*facing),-250
postype = p1
facing = 1
keyctrl = 0
ownpal = 1

[state 3055, 3]
type = velset
triggerall = numtarget(3050) && (animelemtime(3) >= 0 && animelemtime(6) < 0)
trigger1 = target(3050),BackEdgeBodyDist = 0
x = (target(3050),vel x)

[State 3055, 4]
type = VelSet
trigger1 = animelem = 6
x = 0

[State 3055, 5]
type = PlaySnd
trigger1 = animelem = 23
value = S3000,1
;volume = 255
channel = 0

[State 0, TargetState]; ***
type = TargetState
trigger1 = time = 42
value = 3091
ID = -1

[State 0, TargetFacing]; ***
type = Targetlifeadd
trigger1 = time = 42
value = -260
ID = -1

[State 0, HitAdd]; ***
type = HitAdd
trigger1 = time = 42
value = 1

[State 3010, 9]; ***
type = Explod
trigger1 = time = 42
anim = 8005
pos = -10,-10
postype = p2
bindtime = 1
supermove = 0
pausemovetime = 0
sprpriority = 5
ownpal = 1
removeongethit = 0

[State 0, PlaySnd]; ***
type = PlaySnd
trigger1 = time = 42
value = s2,6
channel = -1

[State 3055, 6]
type = ChangeState
trigger1 = !animtime
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Chang
[Statedef 3060]
type    = A
movetype= A
physics = N
anim = 3050
juggle = 0
velset = 0,0
poweradd = 0
ctrl = 0
sprpriority = 4

[state 3060, 1]
type = Trans
trigger1 = AnimElemtime(1) >= 0 && AnimElemtime(1) < 11
trans = addalpha
alpha = animelemtime(1)*10,255-animelemtime(1)*5

[State 3060, 2]
type = NotHitBy
trigger1 = time >= 0
value = SCA

[State 3060, 3]
type = VelSet
trigger1 = animelem = 2
y = 12

[State 3060, 4]
type = PlaySnd
trigger1 = animelem = 1
value = S3060,0

[State 3060, 5]
type = PlaySnd
trigger1 = animelem = 2
value = S1000,12

[State 3060, 6]
type = SprPriority
trigger1 = 1
value = 4
ignorehitpause = 1

[State 3060, 7]
type = null;HitDef
trigger1 = animelem = 2
attr = A, HA
damage = 260,15;110,15      ***
hitflag = MAFD
guardflag = MA
animtype = Heavy
pausetime = 0,15
sparkno = s8005
guard.sparkno = s8035
sparkxy = -10,-10
hitsound = s2,6
guardsound = s120,1
ground.type = Low
air.type = Low
ground.slidetime = 15
guard.slidetime = 15
ground.hittime = 12
guard.hittime = 12
air.hittime = 12
guard.ctrltime = 12
ground.velocity = -5.5,-5
guard.velocity = -6
air.velocity = -5.5,-5
sprpriority = 2
fall = 1
air.fall = 1
air.recover = 0
fall.recover = 0
yaccel = .5
envshake.time = 30
envshake.ampl = 6
getpower = 0,0

[State 3060, 8]
type = ScreenBound
trigger1 = 1
value = 1

[State 3060, 9]
type = changestate
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 3065
ctrl = 0

[Statedef 3065]
type    = S
movetype= I
physics = N
juggle  = 0
poweradd = 0
ctrl = 0
sprpriority = 4
velset = 0,0
anim = 3055

[State 3065, 1]
type = PosSet
trigger1 = !time
y = 0

[State 3065, 2]
type = NotHitBy
trigger1 = time >= 0
value = SCA

[State 3065, 3]
type = velset
trigger1 = animelem = 2
x = 3.5
y = -3.5

[State 3065, 4]
type = StateTypeSet
trigger1 = animelem = 2
statetype = A
physics = N

[State 3065, 5]
type = StateTypeSet
trigger1 = animelem = 3
statetype = A
movetype = A
physics = N

[State 3065, 6]
type = veladd
trigger1 = animelemtime(2) >= 0
y = .3

[State 3065, 7]
type = PlaySnd
trigger1 = time = 1
value = s3060,1

[State 3065, 8]
type = EnvShake
trigger1 = !time
ampl = 6
time = 30

[State 3065, 9]
type = Explod
trigger1 = time = 0
anim = 8055
ID = 8055
pos = 0,0
postype = p1
facing = 1
bindtime = 1
vel = 0,0
removetime = 35
supermove = 0
pausemovetime = 0
sprpriority = 5
ownpal = 1
removeongethit = 0

[State 3065, 10]
type = ScreenBound
trigger1 = 1
value = 1

[State 3065, 11]
type = null;HitDef
trigger1 = animelem = 4
attr = A, HA
damage = 150,15
hitflag = MAFD
guardflag = MA
animtype = Heavy
pausetime = 0,15
sparkno = s8005
guard.sparkno = s8035
sparkxy = -10,-10
hitsound = s2,6
guardsound = s120,1
ground.type = Low
air.type = Low
ground.slidetime = 15
guard.slidetime = 15
ground.hittime = 12
guard.hittime = 12
air.hittime = 12
guard.ctrltime = 12
ground.velocity = -5.5,-5
guard.velocity = -6
air.velocity = -5.5,-5
sprpriority = 2
fall = 1
air.fall = 1
air.recover = 0
fall.recover = 0
yaccel = .5
getpower = 0,0

[State 3065, 12]
type = changestate
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 3070
ctrl = 0

[Statedef 3070]
type    = S
movetype= I
physics = N
juggle  = 8
poweradd = 0
ctrl = 0
sprpriority = 4
velset = 0,0
anim = 3060

[State 3070, 1]
type = PosSet
trigger1 = !time
y = 0

[State 3070, 2]
type = NotHitBy
trigger1 = time >= 0
value = SCA

[State 3070, 3]
type = EnvShake
trigger1 = !time
ampl = 6
time = 30

[State 3070, 4]
type = PlaySnd
trigger1 = time = 1
value = s1220,1

[State 3070, 5]
type = Explod
trigger1 = animelem = 1, = 0
anim = 8056
ID = 8056
pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = 11
scale = 1,1
sprpriority = 2
ownpal = 1
removeongethit = 0

[State 3070, 6]
type = Explod
trigger1 = animelem = 2, = 1
anim = 8057
ID = 8057
pos = 0,4
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = 7
scale = 1,1
sprpriority = 4
ownpal = 1
removeongethit = 0

[State 3070, 7]
type = velset
trigger1 = animelem = 6
x = 5

[State 3070, 8]
type = PlaySnd
trigger1 = animelem = 6
value = s3060,2

[State 3070, 9]
type = Destroyself
trigger1 = Frontedgedist < -80 || Backedgedist < 0


;---------------------------------------------------------------------------
; P2 Sates
[statedef 3080]
type = A
movetype = H
physics = N
velset = 0,0
ctrl = 0

[State 0, NotHitBy] ; ADDED ***
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
ignorehitpause = 1

[State 3080, 1]
type = Changeanim
trigger1 = time = 0
value = 5030

[State 3080, 2]
type = PosSet
triggerall = Pos y > 0
trigger1 = time = 0
y = 0
ignorehitpause = 1

[State 3080, 3]
type = ChangeState
trigger1 = hitshakeover = 1
value = 3085

[Statedef 3085]
type = A
movetype= H
physics = N
ctrl = 0
velset = -5.5,-4

[State 0, NotHitBy] ; ADDED ***
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
ignorehitpause = 1

[State 3085, 1]
type = Changeanim
trigger1 = time = 0
value = 5050

[State 3085, 2]
type = Changeanim
triggerall = anim = 5050
trigger1 = animtime = 0
value = 5060

[State 3085, 3]
type = VelAdd
trigger1 = 1
y = .45

[State 3085, 4]
type = Changestate
triggerall = time > 10
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 3090

[Statedef 3090]
type = L
movetype = H
physics = N
ctrl = 0


[State 0, NotHitBy] ; ADDED ***
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
ignorehitpause = 1

[State 3090, 1]
type = Posset
trigger1 = time = 0
y = 0

[State 3090, 2]
type = Changeanim
trigger1 = time = 0
value = 5080

[State 3090, 3]
type = Changeanim
trigger1 = time = 20
value = 5110

[State 3090, 4]
type = Velset
trigger1 = time = 0
x = -7.5
y = 0

[State 3090, 5]
type = Velset
trigger1 = time = 20
x = 0

[State 3090, 6]
type = Veladd
trigger1 = time <= 15
x = 0.4

[State 3090, 7]
type = MakeDust
trigger1 = time =[0,10]
pos = 0,0
spacing = 3

[State 3090, 8]
type = Selfstate
trigger1 = alive
trigger1 = time = 30
value = 5120

[State 3090, 9]
type = selfstate
trigger1 = !alive
trigger1 = time = 30
value = 5150



[Statedef 3091] ; ADDED STATE ***
type = L
movetype = H
physics = N
ctrl = 0

[State 0, NotHitBy] ; ADDED ***
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
ignorehitpause = 1

[State 3091, 1]
type = Posset
trigger1 = 1
y = 0

[State 3091, 2]
type = Changeanim
trigger1 = time = 0
value = 5080

[State 3091, 3]
type = Changeanim
trigger1 = time = 16
value = 5110

[State 3091, 4]
type = Velset
trigger1 = 1
x = 0
y = 0

[State 3091, 8]
type = Selfstate
trigger1 = alive
trigger1 = time = 60
value = 5120

[State 3091, 9]
type = selfstate
trigger1 = !alive
trigger1 = time = 60
value = 5150

;---------------------------------------------------------------------------
; Naku Ko wa Tsuyoi
[Statedef 3100]
type    = S
movetype= A
physics = N
anim = 3100
juggle = 8
velset = 0,0
poweradd = 0
ctrl = 0
sprpriority = 2
facep2 = 1

[State 3100, 1]
type = varset
triggerall = !var(0)
trigger1 = !time
var(2) = ifelse(command = "x", 0, 1)

[State 3100, 2]
type = AssertSpecial
trigger1 = animelemtime(3) < 0
flag= noFG
flag2= noBG

[State 3100, 3]
type = SuperPause
trigger1 = animelem = 1
time = 47
anim = -1
sound = s3200,0
movetime = 47
darken = 0
poweradd = -1000
unhittable = 1
p2defmul = 1

[State 3100, 4]
type = EnvColor
trigger1 = animelem = 1, = 0
value = 248,248,248
time = 2
under = 1

[State 3100, 5]
type = EnvColor
trigger1 = animelem = 1
value = 0, 0, 0
time = 47
under = 1

[State 3100, 6]
type = NotHitBy
trigger1 = animelemtime(7) < 0
value = SCA

[State 3100, 7]
type = Explod
trigger1 = animelem = 1, = 0
anim = 8200
ID = 8200
pos = -1,-80
postype = p1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = 4
ownpal = 1
supermove = 1

[State 3100, 8]
type = Explod
trigger1 = animelem = 1, = 0
anim = 8201
ID = 8201
pos = -1,-80
postype = p1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = -1
ownpal = 1
supermove = 1

[State 3100, 9]
type = Explod
trigger1 = animelem = 2, = 0
anim = 3105
ID = 3105
pos = 0,0
postype = p1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = 1
ownpal = 1
supermove = 1

[State 3100, 10]
type = PlaySnd
trigger1 = animelem = 1
value = s3100,0
channel = 0

[State 3100, 11]
type = Helper
triggerall = prevstateno = [1000,1999]
trigger1 = time = 0
helpertype = normal
name = "Super Cancel"
ID = 3600
stateno = 3600
pos = 0,0
postype = left
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 9999
pausemovetime = 9999
size.xscale = 1
size.yscale = 1
ignorehitpause = 1

[State 3100, 12]
type = PalFX
triggerall = prevstateno = [1000,1999]
triggerall = time <= 10
trigger1 = Time%2
time = 1
add = 256,0,0
mul = 256,0,0
sinadd = 256,0,0,1
invertall = 0
color = 256

[State 3100, 13]
type = PlaySnd
trigger1 = animelem = 5
trigger2 = animelem = 12
trigger3 = animelem = 19
trigger4 = animelem = 28
trigger5 = animelem = 34
value = s3100,1

[State 3100, 14]
type = PlaySnd
trigger1 = animelem = 5
trigger2 = animelem = 12
trigger3 = animelem = 19
trigger4 = animelem = 28
value = s200,1
channel = 0

[State 3100, 15]
type = PlaySnd
trigger1 = animelem = 34
value = s240,0
channel = 0

[State 3100, 16]
type = VelSet
trigger1 = animelemtime(5) >= 0 && animelemtime(36) < 0
x = 2.5

[State 3100, 17]
type = VelSet
trigger1 = animelem = 36
x = 0

[State 3100, 18]
type = Posadd
trigger1 = AnimElem = 36
x = 10

[State 3100, 19]
type = Posadd
trigger1 = AnimElem = 39
x = -10

[State 3100, 20]
type = HitDef
trigger1 = animelem = 7
trigger2 = animelem = 14
trigger3 = animelem = 21
attr = S, HA
animtype = Heavy
damage = 15,1
hitflag = MAF
guardflag = MA
pausetime = 5,5
sparkno = s8010
guard.sparkno = s8040
sparkxy = -15,-70
hitsound = s3100,2
guardsound = s120,1
ground.type = low
air.type = Low
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -3.5
guard.velocity = -3.5
air.velocity = -2.5,-4.75
fall = 0
air.fall = 1
air.recover = 0
fall.recover = 0
yaccel = .54688
getpower = 0,0
maxdist = 99999,0
id = ifelse((numtarget(1505) = 1 || numtarget(3105) = 1), 3105, 3100)

[State 3100, 21]
type = HitDef
trigger1 = animelem = 8
trigger2 = animelem = 15
trigger3 = animelem = 22
attr = S, HA
animtype = Heavy
damage = 15,1
hitflag = MAF
guardflag = MA
pausetime = 5,5
sparkno = s8010
guard.sparkno = s8040
sparkxy = -10,-50
hitsound = s3100,2
guardsound = s120,1
ground.type = low
air.type = Low
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -3.5
guard.velocity = -3.5
air.velocity = -2.5,-4.75
fall = 0
air.fall = 1
air.recover = 0
fall.recover = 0
yaccel = .54688
getpower = 0,0
maxdist = 99999,0
id = ifelse((numtarget(1505) = 1 || numtarget(3105) = 1), 3105, 3100)

[State 3100, 22]
type = HitDef
trigger1 = animelem = 9
trigger2 = animelem = 16
trigger3 = animelem = 23
attr = S, HA
animtype = Heavy
damage = 15,1
hitflag = MAF
guardflag = MA
pausetime = 5,5
sparkno = s8010
guard.sparkno = s8040
sparkxy = -10,-35
hitsound = s3100,2
guardsound = s120,1
ground.type = low
air.type = Low
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -3.5
guard.velocity = -3.5
air.velocity = -2.5,-4.75
fall = 0
air.fall = 1
air.recover = 0
fall.recover = 0
yaccel = .54688
getpower = 0,0
maxdist = 99999,0
id = ifelse((numtarget(1505) = 1 || numtarget(3105) = 1), 3105, 3100)

[State 3100, 23]
type = HitDef
trigger1 = animelem = 30
attr = S, HA
animtype = Heavy
damage = 15,1
hitflag = MAF
guardflag = MA
pausetime = 5,5
sparkno = s8010
guard.sparkno = s8040
sparkxy = -15,-70
hitsound = s3100,2
guardsound = s120,1
ground.type = high
air.type = high
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -3.5
guard.velocity = -3.5
air.velocity = -2.5,-4.75
fall = 0
air.fall = 1
air.recover = 0
fall.recover = 0
yaccel = .54688
getpower = 0,0
maxdist = 99999,0
id = ifelse((numtarget(1505) = 1 || numtarget(3105) = 1), 3105, 3100)

[State 3100, 24]
type = HitDef
trigger1 = animelem = 29
trigger2 = animelem = 35
attr = S, HA
animtype = Heavy
damage = 15,1
hitflag = MAF
guardflag = MA
pausetime = 5,5
sparkno = s8010
guard.sparkno = s8040
sparkxy = -10,-35
hitsound = s3100,2
guardsound = s120,1
ground.type = high
air.type = high
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -3.5
guard.velocity = -3.5
air.velocity = -2.5,-4.75
fall = 0
air.fall = 1
air.recover = 0
fall.recover = 0
yaccel = .54688
getpower = 0,0
maxdist = 99999,0
id = ifelse((numtarget(1505) = 1 || numtarget(3105) = 1), 3105, 3100)

[State 3100, 25]
type = HitDef
trigger1 = animelem = 31
attr = S, HA
animtype = Heavy
damage = 15,1
hitflag = MAF
guardflag = MA
pausetime = 5,5
sparkno = s8010
guard.sparkno = s8040
sparkxy = -10,-85
hitsound = s3100,2
guardsound = s120,1
ground.type = high
air.type = high
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -3.5
guard.velocity = -3.5
air.velocity = -2.5,-4.75
fall = 0
air.fall = 1
air.recover = 0
fall.recover = 0
yaccel = .54688
getpower = 0,0
maxdist = 99999,0
id = ifelse((numtarget(1505) = 1 || numtarget(3105) = 1), 3105, 3100)

[State 3100, 26]
type = HitDef
trigger1 = animelem = 37
attr = S, HA
animtype = diagup
damage = 45,5
hitflag = MAF
guardflag = MA
pausetime = 11,11
sparkno = s8010
guard.sparkno = s8040
sparkxy = -10,-85
hitsound = s3100,2
guardsound = s120,1
ground.type = high
air.type = high
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -4.0278,-11.5
guard.velocity = -8.28
air.velocity = -4.0278,-11.5
fall = 1
air.fall = 1
air.recover = 0
fall.recover = 0
yaccel = .54688
getpower = 0,0
maxdist = 99999,0
id = 3110

[State 3100, 27]
type = AssertSpecial
triggerall = numtarget(750) = 1 || numtarget(1400) = 1 || numtarget(1505) = 1 || numtarget(1510) = 1 || numtarget(3105) = 1
trigger1 = 1
flag = nojugglecheck

[State 3100, 27]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1


;---------------------------------------------------------------------------
; Naku Ko wa Tsuyoi EX
[Statedef 3150]
type    = S
movetype= A
physics = N
anim = 3150
juggle = 8
velset = 0,0
poweradd = 0
ctrl = 0
sprpriority = 2
facep2 = 1

[State 3150, 1]
type = AssertSpecial
trigger1 = animelemtime(3) < 0
flag= noFG
flag2= noBG

[State 3150, 2]
type = SuperPause
trigger1 = animelem = 1
time = 47
anim = -1
sound = s3200,1
movetime = 47
darken = 0
poweradd = -2000
unhittable = 1
p2defmul = 1

[State 3150, 3]
type = EnvColor
trigger1 = animelem = 1, = 0
value = 248,248,248
time = 2
under = 1

[State 3150, 4]
type = EnvColor
trigger1 = animelem = 1
value = 0, 0, 0
time = 47
under = 1

[State 3150, 5]
type = NotHitBy
trigger1 = animelemtime(7) < 0
value = SCA

[State 3150, 6]
type = Explod
trigger1 = animelem = 1, = 0
anim = 8205
ID = 8205
pos = -1,-80
postype = p1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = 4
ownpal = 1
supermove = 1

[State 3150, 7]
type = Explod
trigger1 = animelem = 1, = 0
anim = 8206
ID = 8206
pos = -1,-80
postype = p1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = -1
ownpal = 1
supermove = 1

[State 3100, 9]
type = Explod
trigger1 = animelem = 2, = 0
anim = 3105
ID = 3105
pos = 0,0
postype = p1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = 1
ownpal = 1
supermove = 1

[State 3150, 10]
type = PlaySnd
trigger1 = animelem = 1
value = s3100,0
channel = 0

[State 3150, 11]
type = Helper
triggerall = prevstateno = [1000,1999]
trigger1 = time = 0
helpertype = normal
name = "Super Cancel"
ID = 3600
stateno = 3600
pos = 0,0
postype = left
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 9999
pausemovetime = 9999
size.xscale = 1
size.yscale = 1
ignorehitpause = 1

[State 3150, 12]
type = PalFX
triggerall = prevstateno = [1000,1999]
triggerall = time <= 10
trigger1 = Time%2
time = 1
add = 256,0,0
mul = 256,0,0
sinadd = 256,0,0,1
invertall = 0
color = 256

[State 3150, 13]
type = PlaySnd
trigger1 = animelem = 9
value = s3100,1

[State 3150, 14]
type = PlaySnd
trigger1 = animelem = 9
value = s200,1
channel = 0

[State 3150, 15]
type = HitDef
trigger1 = animelem = 10
attr = S, HA
animtype = Heavy
damage = 15,1
hitflag = MAF
guardflag = MA
pausetime = 5,5
sparkno = s8010
guard.sparkno = s8040
sparkxy = -15,-54
hitsound = s3100,2
guardsound = s120,1
ground.type = low
air.type = Low
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = 4.0278
guard.velocity = 4.0278
air.velocity = 3.5,-4.75
fall = 0
air.fall = 1
air.recover = 0
fall.recover = 0
yaccel = .54688
getpower = 0,0
maxdist = 75,0
id = ifelse((numtarget(750) = 1 || numtarget(1505) = 1 || numtarget(1510) = 1 || numtarget(3155) = 1), 3155, 3150)
p1stateno = 3160
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = -8
airguard.cornerpush.veloff = -8

[State 3150, 16]
type = HitDef
trigger1 = animelem = 11
attr = S, HA
animtype = Heavy
damage = 15,1
hitflag = MAF
guardflag = MA
pausetime = 5,5
sparkno = s8010
guard.sparkno = s8040
sparkxy = -15,-17
hitsound = s3100,2
guardsound = s120,1
ground.type = low
air.type = Low
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = 4.0278
guard.velocity = 4.0278
air.velocity = 3.5,-4.75
fall = 0
air.fall = 1
air.recover = 0
fall.recover = 0
yaccel = .54688
getpower = 0,0
maxdist = 75,0
id = ifelse((numtarget(750) = 1 || numtarget(1505) = 1 || numtarget(1510) = 1 || numtarget(3155) = 1), 3155, 3150)
p1stateno = 3160
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = -8
airguard.cornerpush.veloff = -8

[State 3150, 17]
type = AssertSpecial
triggerall = numtarget(750) = 1 || numtarget(1400) = 1 || numtarget(1505) = 1 || numtarget(1510) = 1 || numtarget(3155) = 1
trigger1 = 1
flag = nojugglecheck

[State 3150, 18]
type = Changestate
trigger1 = animelem = 12
value = 3155
ctrl = 0

[Statedef 3155]
type    = S
movetype= A
physics = S
juggle = 8
ctrl = 0
sprpriority = 2
velset = 0,0
anim = 3155

[State 3155, 1]
type = Changestate
trigger1 = !animtime
value = 0
ctrl = 1

[Statedef 3160]
type    = S
movetype= A
physics = N
juggle = 8
velset = 0,0
poweradd = 0
ctrl = 0
sprpriority = 2
facep2 = 1

[State 3160, 1]
type = TargetState
trigger1 = !time
value = 1550
ID = 3150

[State 3160, 2]
type = TargetState
trigger1 = !time
value = 1550
ID = 3155

[State 3160, 3]
type = PlaySnd
trigger1 = animelem = 9
trigger2 = animelem = 15
trigger3 = animelem = 22
trigger4 = animelem = 31
trigger5 = animelem = 38
trigger6 = animelem = 46
trigger7 = animelem = 54
trigger8 = animelem = 60
value = s3100,1

[State 3160, 4]
type = PlaySnd
trigger1 = animelem = 9
trigger2 = animelem = 15
trigger3 = animelem = 22
trigger4 = animelem = 31
trigger5 = animelem = 38
trigger6 = animelem = 46
trigger7 = animelem = 54
value = s200,1
channel = 0
;volume = 255

[State 3160, 5]
type = PlaySnd
trigger1 = animelem = 60
value = s240,0
channel = 0
;volume = 255

[State 3160, 6]
type = VelSet
trigger1 = animelemtime(13) >= 0 && animelemtime(63) < 0
x = 2.5

[State 3160, 7]
type = VelSet
trigger1 = animelem = 63
x = 0

[State 3160, 8]
type = HitDef
trigger1 = animelem = 11
attr = S, HA
animtype = Heavy
damage = 17,10
hitflag = MAF
guardflag = MA
pausetime = 5,5
sparkno = s8010
guard.sparkno = s8040
sparkxy = -15,-17
hitsound = s3100,2
guardsound = s120,1
ground.type = low
air.type = Low
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = 4.0278
guard.velocity = 4.0278
air.velocity = 3.5,-4.75
fall = 0
air.fall = 1
air.recover = 0
fall.recover = 0
yaccel = .54688
getpower = 0,0
maxdist = 75,0
id = ifelse(numtarget(3155) = 1, 3155, 3150)
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = -8
airguard.cornerpush.veloff = -8

[State 3160, 9]
type = HitDef
trigger1 = animelem = 16
trigger2 = animelem = 23
trigger3 = animelem = 32
trigger4 = animelem = 47
attr = S, HA
animtype = Heavy
damage = 17,10
hitflag = MAF
guardflag = MA
pausetime = 5,5
sparkno = s8010
guard.sparkno = s8040
sparkxy = -15,-70
hitsound = s3100,2
guardsound = s120,1
ground.type = low
air.type = Low
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -4.0278
guard.velocity = -4.0278
air.velocity = -4.0278,-4.75
fall = 0
air.fall = 1
air.recover = 0
fall.recover = 0
yaccel = .54688
getpower = 0,0
maxdist = 99999,0
id = ifelse(numtarget(3155) = 1, 3155, 3150)

[State 3160, 10]
type = HitDef
trigger1 = animelem = 15
trigger2 = animelem = 22
trigger3 = animelem = 33
attr = S, HA
animtype = Heavy
damage = 17,5
hitflag = MAF
guardflag = MA
pausetime = 5,5
sparkno = s8010
guard.sparkno = s8040
sparkxy = -10,-50
hitsound = s3100,2
guardsound = s120,1
ground.type = low
air.type = Low
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -4.0278
guard.velocity = -4.0278
air.velocity = -3.5,-4.75
fall = 0
air.fall = 1
air.recover = 0
fall.recover = 0
yaccel = .54688
getpower = 0,0
maxdist = 99999,0
id = ifelse(numtarget(3155) = 1, 3155, 3150)

[State 3160, 11]
type = HitDef
trigger1 = animelem = 17
trigger2 = animelem = 24
trigger3 = animelem = 57
attr = S, HA
animtype = Heavy
damage = 17,5
hitflag = MAF
guardflag = MA
pausetime = 5,5
sparkno = s8010
guard.sparkno = s8040
sparkxy = -10,-85
hitsound = s3100,2
guardsound = s120,1
ground.type = high
air.type = high
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -4.0278
guard.velocity = -4.0278
air.velocity = -3.5,-4.75
fall = 0
air.fall = 1
air.recover = 0
fall.recover = 0
yaccel = .54688
getpower = 0,0
maxdist = 99999,0
id = ifelse(numtarget(3155) = 1, 3155, 3150)

[State 3160, 12]
type = HitDef
trigger1 = animelem = 34
attr = S, HA
animtype = Heavy
damage = 17,5
hitflag = MAF
guardflag = MA
pausetime = 5,5
sparkno = s8010
guard.sparkno = s8040
sparkxy = -10,-35
hitsound = s3100,2
guardsound = s120,1
ground.type = low
air.type = Low
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -4.0278
guard.velocity = -4.0278
air.velocity = -3.5,-4.75
fall = 0
air.fall = 1
air.recover = 0
fall.recover = 0
yaccel = .54688
getpower = 0,0
maxdist = 99999,0
id = ifelse(numtarget(3155) = 1, 3155, 3150)

[State 3160, 13]
type = HitDef
trigger1 = animelem = 39
attr = S, HA
animtype = Heavy
damage = 17,5
hitflag = M
guardflag = L
pausetime = 5,5
sparkno = s8010
guard.sparkno = s8040
sparkxy = -10,-15
hitsound = s3100,2
guardsound = s120,1
ground.type = low
air.type = Low
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -4.0278
guard.velocity = -4.0278
;air.velocity = -3.5,-4.75
air.velocity = -1.5,-2.75 ; ***
fall = 0
air.fall = 1
air.recover = 0
fall.recover = 0
yaccel = .54688
getpower = 0,0
maxdist = 99999,0
id = ifelse(numtarget(3155) = 1, 3155, 3150)

[State 3160, 14]
type = HitDef
trigger1 = animelem = 40
attr = S, HA
animtype = Heavy
damage = 17,5
hitflag = M
guardflag = L
pausetime = 5,5
sparkno = s8010
guard.sparkno = s8040
sparkxy = -10,-15
hitsound = s3100,2
guardsound = s120,1
ground.type = low
air.type = Low
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -1.5,-4.75
guard.velocity = -4.0278
;air.velocity = -1.5,-4.75
air.velocity = -1.5,-2.75 ; ***
fall = 1
air.fall = 1
air.recover = 0
fall.recover = 0
yaccel = .54688
getpower = 0,0
maxdist = 99999,0
id = ifelse(numtarget(3155) = 1, 3155, 3150)

[State 3160, 15]
type = HitDef
trigger1 = animelem = 48
attr = S, HA
animtype = Heavy
damage = 17,5
hitflag = MAF
guardflag = MA
pausetime = 5,5
sparkno = s8010
guard.sparkno = s8040
sparkxy = -10,-50
hitsound = s3100,2
guardsound = s120,1
ground.type = low
air.type = Low
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -4.0278
guard.velocity = -4.0278
;air.velocity = -6,6
air.velocity = -1.5,-2.75 ; ***
fall = 0
air.fall = 1
air.recover = 0
fall.recover = 0
yaccel = .54688
getpower = 0,0
maxdist = 99999,0
id = ifelse(numtarget(3155) = 1, 3155, 3150)

[State 3160, 16]
type = HitDef
trigger1 = animelem = 55
;trigger2 = animelem = 61 ***
attr = S, HA
animtype = Heavy
damage = 17,5
hitflag = MAFD
guardflag = MA
pausetime = 5,5
sparkno = s8010
guard.sparkno = s8040
sparkxy = -10,-35
hitsound = s3100,2
guardsound = s120,1
ground.type = high
air.type = high
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -4.0278
guard.velocity = -4.0278
;air.velocity = -3.5,-4.75
air.velocity = -1.5,-2.75 ; ***
fall = 0
air.fall = 1
air.recover = 0
fall.recover = 0
yaccel = .54688
getpower = 0,0
maxdist = 99999,0
id = ifelse(numtarget(3155) = 1, 3155, 3150)

[State 3160, 17]
type = HitDef
trigger1 = animelem = 56
attr = S, HA
animtype = Heavy
damage = 17,5
hitflag = MAFD
guardflag = MA
pausetime = 5,5
sparkno = s8010
guard.sparkno = s8040
sparkxy = -15,-70
hitsound = s3100,2
guardsound = s120,1
ground.type = high
air.type = high
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -4.0278
guard.velocity = -4.0278
;air.velocity = -3.5,-4.75
air.velocity = -1.5,-2.75 ; ***
fall = 0
air.fall = 1
air.recover = 0
fall.recover = 0
yaccel = .54688
getpower = 0,0
maxdist = 99999,0
id = ifelse(numtarget(3155) = 1, 3155, 3150)

[State 3160, 18]
type = HitDef
trigger1 = animelem = 63
attr = S, HA
animtype = diagup
damage = 79,10;62,10  ***
hitflag = MAF
guardflag = MA
pausetime = 11,11
sparkno = s8010
guard.sparkno = s8040
sparkxy = -10,-85
hitsound = s3100,2
guardsound = s120,1
ground.type = high
air.type = high
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -4.0278,-11.5
guard.velocity = -8.28
air.velocity = -4.0278,-11.5
fall = 1
air.fall = 1
air.recover = 0
fall.recover = 0
fall.recover = 0
yaccel = .54688
getpower = 0,0
maxdist = 99999,0
id = 3160

[State 3160, 19]
type = AssertSpecial
triggerall = numtarget(3155) = 1
trigger1 = 1
flag = nojugglecheck

[State 3160, 20]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1



;---------------------------------------------------------------------------
; Yuki's Hamburger
[Statedef 3200]
type    = C
movetype= I
physics = N
anim = 3200
juggle = 8
velset = 0,0
poweradd = 0
ctrl = 0
sprpriority = 2
facep2 = 1

[State 3200, 1]
type = varset
triggerall = !var(0)
trigger1 = !time
var(2) = ifelse(command = "a", 0, 1)

[State 3200, 2]
type = AssertSpecial
trigger1 = animelemtime(3) < 0
flag= noFG
flag2= noBG

[State 3200, 3]
type = SuperPause
trigger1 = animelem = 1
time = 38
anim = -1
sound = s3200,0
movetime = 38
darken = 0
poweradd = -1000
unhittable = 1
p2defmul = 1

[State 3200, 4]
type = EnvColor
trigger1 = animelem = 1, = 0
value = 248,248,248
time = 2
under = 1

[State 3200, 5]
type = EnvColor
trigger1 = animelem = 1
value = 0, 0, 0
time = 38
under = 1

[State 3200, 6]
type = NotHitBy
trigger1 = animelemtime(3) < 0
value = SCA

[State 3200, 7]
type = Explod
trigger1 = animelem = 1, = 0
anim = 8200
ID = 8200
pos = -7,-8
postype = p1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = 4
ownpal = 1
supermove = 1

[State 3200, 8]
type = Explod
trigger1 = animelem = 1, = 0
anim = 8201
ID = 8201
pos = -7,-8
postype = p1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = -1
ownpal = 1
supermove = 1

[State 3200, 9]
type = Helper
triggerall = prevstateno = [1000,1999]
trigger1 = time = 0
helpertype = normal
name = "Super Cancel"
ID = 3600
stateno = 3600
pos = 0,0
postype = left
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 9999
pausemovetime = 9999
size.xscale = 1
size.yscale = 1
ignorehitpause = 1

[State 3200, 10]
type = PalFX
triggerall = prevstateno = [1000,1999]
triggerall = time <= 10
trigger1 = Time%2
time = 1
add = 256,0,0
mul = 256,0,0
sinadd = 256,0,0,1
invertall = 0
color = 256

[State 3200, 11]
type = LifeAdd
trigger1 = animelem = 8, = 0
trigger2 = animelem = 9, = 0
trigger3 = animelem = 10, = 0
trigger4 = animelem = 11, = 0
trigger5 = animelem = 12, = 0
trigger6 = animelem = 13, = 0
trigger7 = animelem = 14, = 0
trigger8 = animelem = 15, = 0
trigger9 = animelem = 16, = 0
trigger10 = animelem = 17, = 0
trigger11 = animelem = 18, = 0
trigger12 = animelem = 19, = 0
trigger13 = animelem = 20, = 0
trigger14 = animelem = 21, = 0
value = 10
absolute = 1

[State 3200, 12]
type = StateTypeSet
trigger1 = animelem = 5
statetype = S

[State 3200, 13]
type = PlaySnd
trigger1 = animelem = 8
trigger2 = animelem = 12
trigger3 = animelem = 16
trigger4 = animelem = 20
value = S3200,5
;volume = 255
channel = 0

[State 3200, 14]
type = PlaySnd
trigger1 = animelem = 22
value = S190,4
;volume = 255
channel = 0

[State 3200, 15]
type = StateTypeSet
trigger1 = animelem = 26
statetype = C

[State 3200, 16]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1



;---------------------------------------------------------------------------
; Ai no Kusanagi Dai Koushin!!
[Statedef 3300]
type    = S
movetype= A
physics = N
anim = 3300
juggle = 8
velset = 0,0
poweradd = 0
ctrl = 0
sprpriority = 2
facep2 = 1

[State 3300, 1]
type = varset
triggerall = !var(0)
trigger1 = !time
var(2) = ifelse(command = "x", 0, 1)

[State 3300, 2]
type = AssertSpecial
trigger1 = animelemtime(3) < 0
flag= noFG
flag2= noBG

[State 3300, 3]
type = SuperPause
trigger1 = animelem = 1
time = 47
anim = -1
sound = s3200,0
movetime = 47
darken = 0
poweradd = -1000
unhittable = 1
p2defmul = 1

[State 3300, 4]
type = EnvColor
trigger1 = animelem = 1, = 0
value = 248,248,248
time = 2
under = 1

[State 3300, 5]
type = EnvColor
trigger1 = animelem = 1
value = 0, 0, 0
time = 47
under = 1

[State 3300, 6]
type = NotHitBy
trigger1 = animelemtime(6) < 1
value = SCA

[State 3300, 7]
type = Explod
trigger1 = animelem = 1, = 0
anim = 8200
ID = 8200
pos = -4,-74
postype = p1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = 4
ownpal = 1
supermove = 1

[State 3300, 8]
type = Explod
trigger1 = animelem = 1, = 0
anim = 8201
ID = 8201
pos = -4,-74
postype = p1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = -1
ownpal = 1
supermove = 1

[State 3300, 9]
type = Helper
triggerall = prevstateno = [1000,1999]
trigger1 = time = 0
helpertype = normal
name = "Super Cancel"
ID = 3600
stateno = 3600
pos = 0,0
postype = left
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 9999
pausemovetime = 9999
size.xscale = 1
size.yscale = 1
ignorehitpause = 1

[State 3300, 10]
type = PalFX
triggerall = prevstateno = [1000,1999]
triggerall = time <= 10
trigger1 = Time%2
time = 1
add = 256,0,0
mul = 256,0,0
sinadd = 256,0,0,1
invertall = 0
color = 256

[State 3300, 11]
type = ReversalDef
triggerall = P2MoveType != H
trigger1 = animelemtime(6) > 0
attr = S,HA
reversal.attr = SCA, NA,SA,NP,SP
getpower = 0
givepower = 0
pausetime = 8,8
sparkno = S8040
sparkxy = 0,0
hitsound = S120,1
numhits = 0

[State 3300, 12]
type = Helper
trigger1 = animelem = 4, = 0
helpertype = normal
name = "Kyo-1"
ID = 3310
stateno = 3310
pos = -20,0
postype = back
facing = 1
keyctrl = 0
ownpal = 1

[State 3300, 13]
type = Helper
trigger1 = animelem = 4, = 1
helpertype = normal
name = "Kyo-2"
ID = 3315
stateno = 3315
pos = -40,0
postype = back
facing = 1
keyctrl = 0
ownpal = 1

[State 3300, 14]
type = Helper
trigger1 = animelem = 5, = 0
helpertype = normal
name = "Kusanagi"
ID = 3320
stateno = 3320
pos = -60,0
postype = back
facing = 1
keyctrl = 0
ownpal = 1

[State 3300, 15]
type = Helper
trigger1 = animelem = 5, = 1
helpertype = normal
name = "Kyoko"
ID = 3325
stateno = 3325
pos = -80,0
postype = back
facing = 1
keyctrl = 0
ownpal = 1

[State 3300, 16]
type = Helper
trigger1 = animelem = 6, = 0
helpertype = normal
name = "Shingo"
ID = 3330
stateno = 3330
pos = -100,0
postype = back
facing = 1
keyctrl = 0
ownpal = 1

[State 3300, 17]
type = ChangeState
triggerall = numhelper(3310)
trigerall = animelemtime(6) > 0
trigger1 =  (helper(3310), pos x - pos x)*facing >= -10
value = 3305
ctrl = 0

[Statedef 3305]
type    = S
movetype= I
physics = N
juggle = 8
poweradd= 0
ctrl = 0
sprpriority = 2
velset = 0,0
anim = ifelse(prevstateno = 3350, 3350, 3305)

[State 3305, 1]
type = Explod
trigger1 = animelem = 1
anim = 8000
ID = 8000
pos = -10,-65
postype = p1
facing = 1
bindtime = 1
scale = 1,1
vel = 0,0
accel = 0,0
random = 0,0
sprpriority = 3
ownpal = 1
removeongethit = 0
removetime = 11

[State 3305, 2]
type = PlaySnd
trigger1 = animelem = 1
value = S201,1

[State 3305, 3]
type = PlaySnd
trigger1 = animelem = 1
value = s5000,1
channel = 0

[State 3305, 4]
type = PlaySnd
trigger1 = animelem = 2
value = S1000,6

[State 3305, 5]
type = PlaySnd
trigger1 = animelem = 18
value = s5000,2
channel = 0

[State 3305, 6]
type = PlaySnd
triggerall = anim = 3350
trigger1 = animelem = 27
value = s3305,0
channel = 0
volume = 255

[State 3305, 7]
type = PlaySnd
trigger1 = animelem = 19
value = S1220,1

[State 3305, 8]
type = EnvShake
trigger1 = animelem = 19
ampl = 4
time = 20

[State 3305, 9]
type = StateTypeSet
trigger1 = 19
statetype = C

[State 3305, 10]
type = StateTypeSet
trigger1 = 24
statetype = S

[State 3305, 11]
type = Explod
trigger1 = animelem = 19
anim = 8056
ID = 8056
pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = 11
scale = 1,1
sprpriority = 1
ownpal = 1
removeongethit = 0

[State 3305, 12]
type = Explod
trigger1 = animelem = 20
anim = 8057
ID = 8057
pos = 0,4
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = 7
scale = 1,1
sprpriority = 2
ownpal = 1
removeongethit = 0

[State 3305, 13]
type = Changestate
trigger1 = !animtime
value = 0
ctrl = 1


;---------------------------------------------------------------------------
;Kyo-1 Running
[Statedef 3310]
type    = S
movetype= A
physics = N
anim = 3310
juggle = 8
velset = 0,0
poweradd = 0
ctrl = 0
sprpriority = 1

[State 3310, 1]
type = VelSet
trigger1 = 1
x = const(velocity.run.fwd.x)*1.3

[State 3310, 2]
type = Playsnd
trigger1 = time = 0
value = s12,8
channel = 2
loop = 1

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

[State 3310, 4]
type = HitDef
trigger1 = !time
attr = S, HA
damage = 48,5
hitflag = MAF
guardflag = MA
animtype = Heavy
pausetime = 0,12
sparkno = s8005
guard.sparkno = s8035
sparkxy = -10,-60
hitsound = s2,6
guardsound = s120,1
ground.type = Low
ground.slidetime = 11
ground.hittime = 12
ground.velocity = -2.5,-18.125
guard.velocity = -8.28
air.type = high
air.velocity = -2.5,-18.125
air.guard.velocity = -4.39,-6.726568
air.hittime = 10
fall = 1
air.recover = 0
p2stateno = 750
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 0,0

[State 3310, 5]
type = StopSnd
trigger1 = Frontedgedist < -100
channel = 2

[State 3310, 6]
type = destroyself
trigger1 = Frontedgedist < -100


;---------------------------------------------------------------------------
;Kyo-2 Running
[Statedef 3315]
type    = S
movetype= A
physics = N
anim = 3315
juggle = 8
velset = 0,0
poweradd = 0
ctrl = 0
sprpriority = 1

[State 3315, 1]
type = VelSet
trigger1 = 1
x = const(velocity.run.fwd.x)*1.3

[State 3315, 2]
type = Playsnd
trigger1 = time = 0
value = s12,8
channel = 2
loop = 1

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

[State 3315, 4]
type = HitDef
trigger1 = !time
attr = S, HA
damage = 48,5
hitflag = MAF
guardflag = MA
animtype = Heavy
pausetime = 0,12
sparkno = s8005
guard.sparkno = s8035
sparkxy = -10,-60
hitsound = s2,6
guardsound = s120,1
ground.type = Low
ground.slidetime = 11
ground.hittime = 12
ground.velocity = -2.5,-18.125
guard.velocity = -8.28
air.type = high
air.velocity = -2.5,-18.125
air.guard.velocity = -4.39,-6.726568
air.hittime = 10
fall = 1
air.recover = 0
p2stateno = 750
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 0,0

[State 3315, 5]
type = StopSnd
trigger1 = Frontedgedist < -100
channel = 2

[State 3315, 6]
type = destroyself
trigger1 = Frontedgedist < -100


 ;---------------------------------------------------------------------------
;Kusanagi Running
[Statedef 3320]
type    = S
movetype= A
physics = N
anim = 3320
juggle = 8
velset = 0,0
poweradd = 0
ctrl = 0
sprpriority = 1

[State 3320, 1]
type = VelSet
trigger1 = 1
x = const(velocity.run.fwd.x)*1.3

[State 3320, 2]
type = Playsnd
trigger1 = time = 0
value = s12,8
channel = 2
loop = 1

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

[State 3320, 4]
type = HitDef
trigger1 = !time
attr = S, HA
damage = 48,5
hitflag = MAF
guardflag = MA
animtype = Heavy
pausetime = 0,12
sparkno = s8005
guard.sparkno = s8035
sparkxy = -10,-60
hitsound = s2,6
guardsound = s120,1
ground.type = Low
ground.slidetime = 11
ground.hittime = 12
ground.velocity = -2.5,-18.125
guard.velocity = -8.28
air.type = high
air.velocity = -2.5,-18.125
air.guard.velocity = -4.39,-6.726568
air.hittime = 10
fall = 1
air.recover = 0
p2stateno = 750
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 0,0

[State 3320, 5]
type = StopSnd
trigger1 = Frontedgedist < -100
channel = 2

[State 3320, 6]
type = destroyself
trigger1 = Frontedgedist < -100

;---------------------------------------------------------------------------
;Kyoko Running
[Statedef 3325]
type    = S
movetype= A
physics = N
anim = 3325
juggle = 8
velset = 0,0
poweradd = 0
ctrl = 0
sprpriority = 1

[State 3325, 1]
type = VelSet
trigger1 = 1
x = const(velocity.run.fwd.x)*1.3

[State 3325, 2]
type = Playsnd
trigger1 = time = 0
value = s12,8
channel = 2
loop = 1

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

[State 3325, 4]
type = HitDef
trigger1 = !time
attr = S, HA
damage = 48,5
hitflag = MAF
guardflag = MA
animtype = Heavy
pausetime = 0,12
sparkno = s8005
guard.sparkno = s8035
sparkxy = -10,-60
hitsound = s2,6
guardsound = s120,1
ground.type = Low
ground.slidetime = 11
ground.hittime = 12
ground.velocity = -2.5,-18.125
guard.velocity = -8.28
air.type = high
air.velocity = -2.5,-18.125
air.guard.velocity = -4.39,-6.726568
air.hittime = 10
fall = 1
air.recover = 0
p2stateno = 750
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 0,0

[State 3325, 5]
type = StopSnd
trigger1 = Frontedgedist < -100
channel = 2

[State 3325, 6]
type = destroyself
trigger1 = Frontedgedist < -100


;---------------------------------------------------------------------------
;Shingo Running
[Statedef 3330]
type    = S
movetype= A
physics = N
anim = 3330
juggle = 8
velset = 0,0
poweradd = 0
ctrl = 0
sprpriority = 1

[State 3330, 1]
type = VelSet
trigger1 = 1
x = const(velocity.run.fwd.x)*1.3

[State 3330, 2]
type = Playsnd
trigger1 = time = 0
value = s12,8
channel = 2
loop = 1

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

[State 3330, 4]
type = HitDef
trigger1 = !time
attr = S, HA
damage = 48,5
hitflag = MAF
guardflag = MA
animtype = Heavy
pausetime = 0,12
sparkno = s8005
guard.sparkno = s8035
sparkxy = -10,-60
hitsound = s2,6
guardsound = s120,1
ground.type = Low
ground.slidetime = 11
ground.hittime = 12
ground.velocity = -2.5,-18.125
guard.velocity = -8.28
air.type = high
air.velocity = -2.5,-18.125
air.guard.velocity = -4.39,-6.726568
air.hittime = 10
fall = 1
air.recover = 0
p2stateno = 750
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 0,0

[State 3330, 5]
type = StopSnd
trigger1 = Frontedgedist < -100
channel = 2

[State 3330, 6]
type = destroyself
trigger1 = Frontedgedist < -100


;---------------------------------------------------------------------------
; EX Ai no Kusanagi Dai Koushin!!
[Statedef 3350]
type    = S
movetype= A
physics = N
anim = 3300
juggle = 8
velset = 0,0
poweradd = 0
ctrl = 0
sprpriority = 2
facep2 = 1

[State 3350, 1]
type = AssertSpecial
trigger1 = animelemtime(3) < 0
flag= noFG
flag2= noBG

[State 3350, 2]
type = SuperPause
trigger1 = animelem = 1
time = 47
anim = -1
sound = s3200,1
movetime = 47
darken = 0
poweradd = -2000
unhittable = 1
p2defmul = 1

[State 3350, 3]
type = EnvColor
trigger1 = animelem = 1, = 0
value = 248,248,248
time = 2
under = 1

[State 3350, 4]
type = EnvColor
trigger1 = animelem = 1
value = 0, 0, 0
time = 47
under = 1

[State 3350, 5]
type = NotHitBy
trigger1 = animelemtime(6) < 1
value = SCA

[State 3350, 6]
type = Explod
trigger1 = animelem = 1, = 0
anim = 8205
ID = 8205
pos = -4,-74
postype = p1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = 4
ownpal = 1
supermove = 1

[State 3350, 7]
type = Explod
trigger1 = animelem = 1, = 0
anim = 8206
ID = 8206
pos = -4,-74
postype = p1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = -1
ownpal = 1
supermove = 1

[State 3350, 8]
type = Helper
triggerall = prevstateno = [1000,1999]
trigger1 = time = 0
helpertype = normal
name = "Super Cancel"
ID = 3600
stateno = 3600
pos = 0,0
postype = left
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 9999
pausemovetime = 9999
size.xscale = 1
size.yscale = 1
ignorehitpause = 1

[State 3350, 9]
type = PalFX
triggerall = prevstateno = [1000,1999]
triggerall = time <= 10
trigger1 = Time%2
time = 1
add = 256,0,0
mul = 256,0,0
sinadd = 256,0,0,1
invertall = 0
color = 256

[State 3350, 10]
type = ReversalDef
triggerall = P2MoveType != H
trigger1 = animelemtime(6) > 0
attr = S,HA
reversal.attr = SCA, NA,SA,NP,SP
getpower = 0
givepower = 0
pausetime = 8,8
sparkno = S8040
sparkxy = 0,0
hitsound = S120,1
numhits = 0

[State 3350, 11]
type = Helper
trigger1 = animelem = 4, = 0
helpertype = normal
name = "Kyo-1"
ID = 3310
stateno = 3310
pos = -20,0
postype = back
facing = 1
keyctrl = 0
ownpal = 1

[State 3350, 12]
type = Helper
trigger1 = animelem = 4, = 1
helpertype = normal
name = "Kyo-2"
ID = 3315
stateno = 3315
pos = -40,0
postype = back
facing = 1
keyctrl = 0
ownpal = 1

[State 3350, 13]
type = Helper
trigger1 = animelem = 5, = 0
helpertype = normal
name = "Kusanagi"
ID = 3320
stateno = 3320
pos = -60,0
postype = back
facing = 1
keyctrl = 0
ownpal = 1

[State 3350, 14]
type = Helper
trigger1 = animelem = 5, = 1
helpertype = normal
name = "Kyoko"
ID = 3325
stateno = 3325
pos = -80,0
postype = back
facing = 1
keyctrl = 0
ownpal = 1

[State 3350, 15]
type = Helper
trigger1 = animelem = 6, = 0
helpertype = normal
name = "Shingo"
ID = 3330
stateno = 3330
pos = -100,0
postype = back
facing = 1
keyctrl = 0
ownpal = 1

[State 3350, 16]
type = Helper
trigger1 = animelem = 6, = 0
helpertype = normal
name = "Kyo+Moto"
ID = 3355
stateno = 3355
pos = -200,0
postype = back
facing = 1
keyctrl = 0
ownpal = 1

[State 3350, 17]
type = ChangeState
triggerall = numhelper(3310)
trigerall = animelemtime(6) > 0
trigger1 =  (helper(3310), pos x - pos x)*facing >= -10
value = 3305
ctrl = 0


;---------------------------------------------------------------------------
; Kyo
[Statedef 3355]
type    = S
movetype= A
physics = N
anim = 1903
juggle = 8
velset = 0,0
poweradd = 0
ctrl = 0
sprpriority = 1

[State 3355, 1]
type = NotHitBy
trigger1 = 1
value = SCA

[State 3355, 2]
type = VelSet
trigger1 = time >= 50
x = 11

[State 3355, 3]
type = Helper
trigger1 = !time
helpertype = normal
name = "Moto"
ID = 3360
stateno = 3360
postype = p1
pos = 0,0
facing = 1
keyctrl = 0
ownpal = 1

[State 3355, 4]
type = HitDef
trigger1 = !time
attr = S, HA
damage = 110,10
hitflag = MAFD
guardflag = MA
animtype = diagup
pausetime = 0,12
sparkno = s8005
guard.sparkno = s8035
sparkxy = -10,-20
hitsound = s2,6
guardsound = s120,1
ground.type = Low
ground.slidetime = 11
ground.hittime = 12
ground.velocity = -4.0278,-11.5
guard.velocity = -8.28
air.velocity = -4.0278,-11.5
fall = 1
air.fall = 1
air.recover = 0
fall.recover = 0
yaccel = .54688
getpower = 0,0
maxdist = 99999,0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
air.juggle = 8
down.bounce = 0

[State 3355, 5]
type = destroyself
trigger1 = Frontedgedist < -200

;---------------------------------------------------------------------------
; Moto
[Statedef 3360]
type = S
physics = N
ctrl = 0
anim = 1902
velset = 0,0
sprpriority = ifelse(TeamSide = 1, 2, 1)

[State 3360, 1]
type = BindToParent
trigger1 = 1
pos = 0,0
ignorehitpause = 1

[State 3360, 2]
type = Playsnd
trigger1 = time = 50
value = s3360,0
persistent = 0

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

[State 3360, 4]
type = destroyself
trigger1 = Frontedgedist < -200


;------------------------------------------------------------------------------
; Kyo's Saishuu Kessen Ougi "Mu Shiki"
[Statedef 3800]
type    = S
movetype= A
physics = S
juggle = 8
poweradd= -3000
ctrl = 0
sprpriority = 2
velset = 0,0
anim = 3800

[State 3800, 1]
type = ChangeAnim
triggerall = prevstateno = [1000,3999]
trigger1 = !time && prevstateno != 3200
value = 3801

[State 3800, 2]
type = Helper
triggerall = prevstateno = [1000,1999]
trigger1 = time = 0
helpertype = normal
name = "Super Cancel"
ID = 3600
stateno = 3600
pos = 0,0
postype = left
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 9999
pausemovetime = 9999
size.xscale = 1
size.yscale = 1
ignorehitpause = 1

[State 3800, 3]
type = Helper
triggerall = prevstateno = [3000,3999]
trigger1 = time = 0
helpertype = normal
name = "Dream Cancel"
ID = 3700
stateno = 3700
pos = 0,0
postype = left
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 9999
pausemovetime = 9999
size.xscale = 1
size.yscale = 1
ignorehitpause = 1

[State 3800, 4]
type = HitDef
triggerall = enemynear, alive
triggerall = P2StateNo != [150,155]
triggerall = p2stateno != 40
triggerall = anim = 3801
Trigger1 = !time
attr = S, HT
hitflag = MAF
priority = 1, Miss
sparkno = -1
sprpriority = 1
p1facing = 1
p2facing = 1
p1stateno = 3810
p2stateno = 3850
guard.dist = 0
fall = 1
numhits = 0
id = 3800
airjuggle = 8

[State 3800, 5]
type = AssertSpecial
triggerall = prevstateno = [1000,3999]
trigger1 = 1
flag = nojugglecheck

[State 3800, 6]
type = ReversalDef
triggerall = anim = 3800
trigger1 = !time
reversal.attr = SCA,NA,SA,HA
pausetime = 10,10
sparkno = S8010
hitsound = S201,1
p1stateno = 3805
numhits = 0

[State 3800, 7]
type = Changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

; Kyo's Saishuu Kessen Ougi "Mu Shiki" Suceed (part 1)
[Statedef 3805]
type    = S
movetype= A
physics = N
anim = 3802
juggle = 0
velset = 0,0
poweradd = 0
ctrl = 0
sprpriority = 2

[State 3805, 1]
type = HitDef
triggerall = enemynear, alive
triggerall = P2StateNo != [150,155]
triggerall = p2stateno != 40
Trigger1 = !time
attr = S, HT
hitflag = MAF
priority = 1, Miss
sparkno = -1
sprpriority = 1
p1facing = 1
p2facing = 1
p1stateno = 3810
p2stateno = 3850
guard.dist = 0
fall = 1
numhits = 0
airjuggle = 8
id = 3800

[State 3805, 2]
type = Changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

; Kyo's Saishuu Kessen Ougi "Mu Shiki" Suceed (part 2)
[Statedef 3810]
type    = S
movetype= A
physics = S
anim = ifelse(anim = 3801, 3806, 3805)
juggle = 0
velset = 0,0
poweradd = 0
ctrl = 0
sprpriority = 2

[State 3810, 1]
type = Helper
triggerall = !numhelper(3600)
triggerall = !numhelper(3700)
triggerall = !numhelper(3910)
trigger1 = animelem = 1
helpertype = normal
name = "Max 2 Portrait"
ID = 3910
stateno = 3910
pos = 160,120
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 99999999999999999999
pausemovetime = 99999999999999999999
size.xscale = 1
size.yscale = 1
ignorehitpause = 1

[State 3810, 2]
type = Helper
triggerall = !numhelper(3900)
trigger1 = animelem = 2
helpertype = normal
name = "Max 2 BG Effect"
ID = 3900
stateno = 3900
pos = 160,120
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 99999999999999999999
pausemovetime = 99999999999999999999
size.xscale = 1
size.yscale = 1
ignorehitpause = 1

[State 3810, 3]
type = SuperPause
trigger1 = animelem = 1, = 0
time = 50
anim = -1
sound = s3,15
movetime = 50
darken = 0
poweradd = 0
unhittable = 1
p2defmul = 1

[State 3810, 4]
type = EnvColor
trigger1 = animelem = 1, = 0
value = 248,248,248
time = 4
under = 1
ignorehitpause = 1
persistent = 0

[State 3810, 5]
type = AssertSpecial
trigger1 = 1
flag= noFG
flag2= noBG
ignorehitpause = 1

[State 3810, 6]
type = Explod
trigger1 = animelem = 3
anim = 8220
ID = 8220
pos = ifelse(anim = 3805, -16, -4), ifelse(anim = 3805, -82, -74)
postype = p1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = 4
ownpal = 1
supermove = 1

[State 3810, 7]
type = Explod
trigger1 = animelem = 3
anim = 8221
ID = 8221
pos = ifelse(anim = 3805, -16, -4), ifelse(anim = 3805, -82, -74)
postype = p1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = -1
ownpal = 1
supermove = 1

[State 3810, 8]
type = PlaySnd
trigger1 = animelem = 3, = 1
value = s3400,0
channel = 0

; TEST AUTO SET ***
[State 3501]
type = PosSet
trigger1 = !time && numtarget
trigger1 = (pos x = [-160,-90]) && facing=-1 || (pos x = [90,160]) && facing=1
x = Ifelse(facing=-1,-89,89)
ignorehitpause = 1

[State 3810, 9]
type = TargetBind
trigger1 = animelemtime(4) <= 0
id =3800
pos = 40,0

[State 3810, 10]
type = Helper
trigger1 = animelem = 4, = 1
helpertype = normal
name = "Kyo"
ID = 3815
stateno = 3815
pos = -50,-290
postype = back
facing = 1
keyctrl = 0
ownpal = 1

[State 3810, 11]
type = PlaySnd
trigger1 = animelem = 14
value = S184,0
volume = 255
channel = 0

[State 3810, 12]
type = Changestate
trigger1 = animtime = 0
value = 0
ctrl = 1


;---------------------------------------------------------------------------
;Kyo Jumping
[Statedef 3815]
type    = A
movetype= A
physics = N
anim = 3815
juggle = 8
velset = 0,0
poweradd = 0
ctrl = 0
sprpriority = 3

[State 3815, 1]
type = NotHitBy
trigger1 = 1
value = SCA

[State 3815, 2]
type = PlayerPush
trigger1 = 1
value = 1

[State 3815, 3]
type = VelSet
trigger1 = !time
x = (parent, pos x - pos x)*facing/15
y = 15

[State 3815, 4]
type = HitDef
trigger1 = animelem = 1
attr = A, HA
animtype = heavy
damage = 60,10
hitflag = MAF
guardflag = M
priority = 4
pausetime = 11,20
sparkno = s8010
guard.sparkno = s8040
sparkxy = -10,-50
hitsound = s201,9
guardsound = s120,1
ground.type = Low
ground.slidetime = 13
ground.hittime = 15
ground.velocity = -9.5
guard.velocity = -8.28
air.velocity = -4.60321,-6.75
air.guard.velocity = -4.39,-6.726568
fall = 0
fall.recover = 0
air.fall = 0
air.recover = 0
yaccel = .5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 0,0
givepower = 0,0
kill = 0

[State 3815, 5]
type = ChangeState
triggerall = time > 0
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 3816
ctrl = 0

;Kyo's Saishuu Kessen Ougi "Mu Shiki" part 1
[Statedef 3816]
type    = S
movetype= A
physics = N
anim = 3816
juggle = 8
velset = 0,0
poweradd = 0
ctrl = 0
sprpriority = 3

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

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

[State 3816, 3]
type = PlayerPush
trigger1 = 1
value = 1

[State 3816, 4]
type = playsnd
trigger1 = animelem = 1
value = s47,0

[State 3816, 5]
type = playsnd
trigger1 = animelem = 3
value = s3810,0
volume = 255

[State 3816, 6]
type = PosSet
trigger1 = Time = 0
y = 0

[State 3816, 7]
type = PosAdd
trigger1 = animelem = 5
x = -11

[State 3816, 8]
type = PosAdd
trigger1 = animelem = 11
x = 9

[State 3816, 9]
type = SuperPause
trigger1 = animelem = 2, = 1
time = 42
anim = -1
sound = s3,15
movetime = 42
darken = 0
poweradd = 0
unhittable = 1
p2defmul = 1

[State 3816, 10]
type = EnvColor
trigger1 = animelem = 2, = 1
value = 248,248,248
time = 4
under = 1
ignorehitpause = 1
persistent = 0

[State 3816, 11]
type = AssertSpecial
trigger1 = animelemtime(5) < 0
flag= noFG
flag2= noBG
ignorehitpause = 1

[State 3816, 12]
type = Explod
trigger1 = animelem = 3
anim = 8220
ID = 8220
pos = 7,-60
postype = p1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = 4
ownpal = 1
supermove = 1

[State 3816, 13]
type = Explod
trigger1 = animelem = 3
anim = 8221
ID = 8221
pos = 7,-60
postype = p1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = -1
ownpal = 1
supermove = 1

[State 3816, 14]
type = Explod
trigger1 = animelem = 2, = 1
anim = 3828
ID = 3828
pos = 20,-117
postype = p1
bindtime = -1
vel = 0,0
accel = 0,0
sprpriority = 4
ownpal = 1
supermove = 1

[State 3816, 15]
type = Explod
trigger1 = animelem = 3
anim = 3829
ID = 3829
pos = 5,-63
postype = p1
vel = 0,0
accel = 0,0
sprpriority = 4
ownpal = 1
supermove = 1
removetime = -1
bindtime = -1

[State 3816, 16]
type = ModifyExplod
trigger1 = animelem = 4
ID = 3829
pos = 9,-62
postype = p1

[State 3816, 17]
type = ModifyExplod
trigger1 = animelem = 5
ID = 3829
pos = -30,-105
postype = p1

[State 3816, 18]
type = ModifyExplod
trigger1 = animelem = 6
ID = 3829
pos = -26,-95
postype = p1

[State 3816, 19]
type = ModifyExplod
trigger1 = animelem = 7
ID = 3829
pos = 39,-56
postype = p1

[State 3816, 20]
type = ModifyExplod
trigger1 = animelem = 8
ID = 3829
pos = -30,-100
postype = p1

[State 3816, 21]
type = RemoveExplod
trigger1 = animelem = 9
id = 3829

[State 3816, 22]
type = Explod
trigger1 = animelem = 9
anim = 3830
ID = 3830
pos = -27,-103
postype = p1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = 4
ownpal = 1
supermove = 1

[State 3816, 23]
type = Explod
trigger1 = animelem = 7, = 1
anim = 3831
ID = 3831
pos = -3,-9
postype = p1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = 4
ownpal = 1
supermove = 1

[State 3816, 24]
type = Explod
trigger1 = animelem = 8
anim = 3825
ID = 3825
pos = 65,0
postype = p1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = 4
ownpal = 1
supermove = 1

[State 3816, 25]
type = playsnd
trigger1 = animelem = 8
value = s3810,2

[State 3816, 26]
type = Projectile
trigger1 = animelem = 8
ProjID = 3800
projanim = 3836
projscale = 1,1
projremove = 1
projremovetime = 12
velocity = 0,0
remvelocity = 0,0
accel = 0,0
velmul = 1
projhits = 1
projmiss = 0
projpriority = 2
projsprpriority = 3
projedgebound = 40
projstagebound = 40
projheightbound = -240
offset = 65,0
postype = p1
projshadow = 0,0,0
supermovetime = 0
pausemovetime = 0
attr = S,HP
hitflag = MAF
guardflag = MA
getpower = 0,0
givepower = 10,5
animtype = hard
air.animtype = up
priority = 4,Hit
damage = 21,5
pausetime = 0,0
sparkno = s8010
guard.sparkno = s8040
sparkxy = 15,-15
hitsound = s201,3
guardsound = s120,0
ground.type = high
air.type = high
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = 0
guard.velocity = 0
air.velocity = -3.8573,-6.5
fall = 0
air.fall = 1
air.recover = 0
yaccel = .5
palfx.time = 30
palfx.add = 240,50,0
palfx.mul = 250,224,120
palfx.sinadd = 110,55,85,10
Palfx.color = 0
palfx.invertall = 1
kill = 0

[State 3816, 27]
type = ChangeState
trigger1 = !animtime
value = 3817
ctrl = 0


;Kyo's Saishuu Kessen Ougi "Mu Shiki" part 2
[Statedef 3817]
type    = S
movetype= A
physics = N
anim = 3818
juggle = 8
velset = 0,0
poweradd = 0
ctrl = 0
sprpriority = 3

[State 3817, 1]
type = PlayerPush
trigger1 = 1
value = 1

[State 3817, 2]
type = ScreenBound
trigger1 = 1
value = 1

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

[State 3817, 4]
type = playsnd
trigger1 = animelem = 2
value = s3810,1
volume = 255

[State 3817, 5]
type = Helper
trigger1 = animelem = 1, = 0
trigger2 = animelem = 1, = 5
trigger3 = animelem = 1, = 10
helpertype = normal
name = "Kyo Shadow 1"
ID = 3830
stateno = 3830
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1

[State 3817, 6]
type = PosAdd
trigger1 = animelem = 3
trigger2 = animelem = 4
trigger3 = animelem = 5
trigger4 = animelem = 6
trigger5 = animelem = 7
trigger6 = animelem = 8
x = 8

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

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

[State 3817, 9]
type = Explod
trigger1 = animelem = 11
anim = 3832
ID = 3832
pos = 97,-76
postype = p1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = 4
ownpal = 1
supermove = 1

[State 3817, 10]
type = HitDef
trigger1 = animelem = 11
attr = S, HA
animtype = Heavy
damage = 21,3
hitflag = MAF
guardflag = MA
pausetime = 12,12
sparkno = s8010
guard.sparkno = s8040
sparkxy = -10,-75
hitsound = s3810,4
guardsound = s120,1
ground.type = low
air.type = Low
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -3.5
guard.velocity = -3.5
air.velocity = -2.5,-4.75
fall = 0
air.fall = 1
air.recover = 0
fall.recover = 0
yaccel = .54688
getpower = 0,0
maxdist = 99999,0
id = 3805
palfx.time = 30
palfx.add = 240,50,0
palfx.mul = 250,224,120
palfx.sinadd = 110,55,85,10
Palfx.color = 0
palfx.invertall = 1
kill = 0

[State 3817, 11]
type = Helper
triggerall = movehit
triggerall = numhelper(9180) < 2
triggerall = p2stateno = 5000 || p2stateno = 5020
trigger1 = 1
name = "Fire"
ID = 9180
stateno = 9180
postype = P1
pos = 0,0
sprpriority = 3
bindtime = 1
ownpal = 1
ignorehitpause = 1
persistent = 1

[State 3817, 12]
type = ChangeState
trigger1 = !animtime
value = 3818
ctrl = 0

;Kyo's Saishuu Kessen Ougi "Mu Shiki" part 3
[Statedef 3818]
type    = S
movetype= A
physics = N
anim = 3820
juggle = 8
velset = 0,0
poweradd = 0
ctrl = 0
sprpriority = 3

[State 3818, 1]
type = PlayerPush
trigger1 = 1
value = 1

[State 3818, 2]
type = ScreenBound
trigger1 = 1
value = 1

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

[State 3818, 4]
type = Helper
trigger1 = animelem = 1, = 0
trigger2 = animelem = 1, = 5
trigger3 = animelem = 1, = 10
helpertype = normal
name = "Kyo Shadow 2"
ID = 3831
stateno = 3831
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1

[State 3818, 5]
type = PosAdd
trigger1 = animelem = 2
trigger2 = animelem = 3
trigger3 = animelem = 4
trigger4 = animelem = 5
trigger5 = animelem = 6
trigger6 = animelem = 7
x = 8

[State 3818, 6]
type = Explod
trigger1 = animelem = 5
anim = 3833
ID = 3833
pos = 88,-73
postype = p1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = 4
ownpal = 1
supermove = 1

[State 3818, 7]
type = HitDef
trigger1 = animelem = 5
attr = S, HA
animtype = Heavy
damage = 21,3
hitflag = MAF
guardflag = MA
pausetime = 12,12
sparkno = s8010
guard.sparkno = s8040
sparkxy = -10,-60
hitsound = s3810,4
guardsound = s120,1
ground.type = low
air.type = Low
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -3.5
guard.velocity = -3.5
air.velocity = -2.5,-4.75
fall = 0
air.fall = 1
air.recover = 0
fall.recover = 0
yaccel = .54688
getpower = 0,0
maxdist = 99999,0
id = 3805
palfx.time = 30
palfx.add = 240,50,0
palfx.mul = 250,224,120
palfx.sinadd = 110,55,85,10
Palfx.color = 0
palfx.invertall = 1
kill = 0

[State 3818, 8]
type = Helper
triggerall = movehit
triggerall = numhelper(9180) < 2
triggerall = p2stateno = 5000 || p2stateno = 5020
trigger1 = 1
name = "Fire"
ID = 9180
stateno = 9180
postype = P1
pos = 0,0
sprpriority = 3
bindtime = 1
ownpal = 1
ignorehitpause = 1
persistent = 1

[State 3818, 9]
type = ChangeState
trigger1 = !animtime
value = 3819
ctrl = 0

; Kyo's Saishuu Kessen Ougi "Mu Shiki" part 4
[Statedef 3819]
type    = S
movetype= A
physics = N
anim = 3821
juggle = 8
velset = 0,0
poweradd = 0
ctrl = 0
sprpriority = 3

[State 3819, 1]
type = PlayerPush
trigger1 = 1
value = 1

[State 3819, 2]
type = ScreenBound
trigger1 = 1
value = 1

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

[State 3819, 4]
type = Helper
trigger1 = animelem = 1, = 0
trigger2 = animelem = 1, = 5
trigger3 = animelem = 1, = 10
helpertype = normal
name = "Kyo Shadow 3"
ID = 3832
stateno = 3832
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1

[State 3819, 5]
type = PosAdd
trigger1 = animelem = 2
x = 8

[State 3819, 6]
type = ChangeState
trigger1 = !animtime
value = 3820
ctrl = 0

; Kyo's Saishuu Kessen Ougi "Mu Shiki" part 5
[Statedef 3820]
type    = A
movetype= A
physics = N
anim = 3823
juggle = 0
velset = 0,0
poweradd = 0
ctrl = 0
sprpriority = 3

[State 3820, 1]
type = PlayerPush
trigger1 = 1
value = 1

[State 3820, 2]
type = ScreenBound
trigger1 = 1
value = 1

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

[State 3820, 4]
type = playsnd
trigger1 = animelem = 4
value = s3810,3

[State 3820, 5]
type = PosAdd
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
x = 8

[State 3820, 6]
type = velset
trigger1 = Animelemtime(1) > 0 && animelemtime(7) < 0
x = (8.7500*exp((-0.1886)*(time)))

[State 3820, 7]
type = velset
trigger1 = Animelemtime(7) >= 0
x = 0

[State 3820, 8]
type = velset
trigger1 = Animelem = 1
y = -7.9375

[State 3820, 9]
type = veladd
trigger1 = Animelemtime(1) > 0
y = .375

[State 3820, 10]
type = Explod
trigger1 = animelem = 4
anim = 3834
ID = 3834
pos = 0,0
postype = p1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = 4
ownpal = 1
supermove = 1

[State 3820, 11]
type = Explod
trigger1 = animelem = 9
anim = 3835
ID = 3835
pos = 0,0
postype = p1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = 4
ownpal = 1
supermove = 1

[State 3820, 12]
type = HitDef
trigger1 = animelem = 1
attr = A,HA
animtype = Heavy
damage = 21,3
hitflag = MAF
guardflag = MA
pausetime = 12,12
sparkno = s8010
guard.sparkno = s8040
sparkxy = -10,-75
hitsound = s3810,4
guardsound = s120,1
ground.type = low
air.type = Low
ground.slidetime = 19
ground.hittime = 20
air.hittime = 20
guard.ctrltime = 17
ground.velocity = -3.0278,-6.75
guard.velocity = -3.5
air.velocity = -3.0278,-6.75
fall = 1
air.fall = 1
air.recover = 0
fall.recover = 0
yaccel = .54688
getpower = 0,0
maxdist = 99999,0
id = 3805
palfx.time = 30
palfx.add = 240,50,0
palfx.mul = 250,224,120
palfx.sinadd = 110,55,85,10
Palfx.color = 0
palfx.invertall = 1

[State 3820, 13]
type = HitDef
trigger1 = animelem = 4
attr = A,HA
animtype = up
damage = 21,3
hitflag = MAF
guardflag = MA
pausetime = 17,17
sparkno = s8010
guard.sparkno = s8040
sparkxy = -10,-80
hitsound = s3810,5
guardsound = s120,1
ground.type = low
air.type = Low
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -4.0278,-10.75
guard.velocity = -3.5
air.velocity = -4.0278,-10.75
fall = 0
air.fall = 1
air.recover = 0
fall.recover = 0
yaccel = .54688
getpower = 0,0
maxdist = 99999,0
id = 3805
palfx.time = 45
palfx.add = 240,50,0
palfx.mul = 250,224,120
palfx.sinadd = 110,55,85,10
Palfx.color = 0
palfx.invertall = 1

[State 3820, 14]
type = Helper
triggerall = movehit
triggerall = numhelper(9180) < 2
triggerall = p2stateno = 5000 || p2stateno = 5020
trigger1 = 1
name = "Fire"
ID = 9180
stateno = 9180
postype = P1
pos = 0,0
sprpriority = 3
bindtime = 1
ownpal = 1
ignorehitpause = 1
persistent = 1

[State 3820, 15]
type = ChangeState
triggerall = animelemtime(1) > 0
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 3821
ctrl = 0

;Kyo's Saishuu Kessen Ougi "Mu Shiki" (land)
[Statedef 3821]
type    = S
movetype= I
physics = S
juggle  = 8
poweradd= 0
anim = 3824
ctrl = 0
sprpriority = 3
velset = 0,0

[State 3821, 1]
type = NotHitBy
trigger1 = 1
value = SCA

[State 3821, 2]
type = PlayerPush
trigger1 = 1
value = 1

[State 3821, 3]
type = ScreenBound
trigger1 = 1
value = 1

[State 3821, 4]
type = PosSet
trigger1 = time = 0
y = 0

[State 3821, 5]
type = PlaySnd
trigger1 = time = 0
value = S47,0

[State 3821, 6]
type = ChangeState
trigger1 = !animtime
value = ifelse(parent, win, 1861, 3840)
ctrl = 0

;---------------------------------------------------------------------------
;Kyo Shadow 1
[Statedef 3830]
type    = S
movetype= A
physics = N
anim = 3817
juggle = 8
velset = 0,0
poweradd = 0
ctrl = 0
sprpriority = 3

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

[State 3830, 2]
type = PlayerPush
trigger1 = 1
value = 1

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

[State 3830, 4]
type = AssertSpecial
trigger1 = time%2
flag = invisible

[State 3830, 5]
type = PosAdd
trigger1 = animelem = 2
trigger2 = animelem = 3
trigger3 = animelem = 4
trigger4 = animelem = 5
trigger5 = animelem = 6
trigger6 = animelem = 7
x = 8

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

[State 3830, 7]
type = PosAdd
trigger1 = animelem = 9
x = 16

[State 3830, 8]
type = HitDef
trigger1 = animelem = 10
attr = S, HA
animtype = Heavy
damage = 21,3
hitflag = MAF
guardflag = MA
pausetime = 0,5
sparkno = s8010
guard.sparkno = s8040
sparkxy = -10,-75
hitsound = s201,3
guardsound = s120,1
ground.type = low
air.type = Low
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -3.5
guard.velocity = -3.5
air.velocity = -2.5,-4.75
fall = 0
air.fall = 1
air.recover = 0
fall.recover = 0
yaccel = .54688
getpower = 0,0
maxdist = 99999,0
id = 3805
palfx.time = 30
palfx.add = 240,50,0
palfx.mul = 250,224,120
palfx.sinadd = 110,55,85,10
Palfx.color = 0
palfx.invertall = 1
kill = 0

[State 3830, 9]
type = Helper
triggerall = movehit
triggerall = numhelper(9180) < 2
triggerall = p2stateno = 5000 || p2stateno = 5020
trigger1 = 1
name = "Fire"
ID = 9180
stateno = 9180
postype = P1
pos = 0,0
sprpriority = 3
bindtime = 1
ownpal = 1
ignorehitpause = 1
persistent = 1

[State 3830, 10]
type = DestroySelf
trigger1 = !animtime

;---------------------------------------------------------------------------
;Kyo Shadow 2
[Statedef 3831]
type    = S
movetype= A
physics = N
anim = 3819
juggle = 8
velset = 0,0
poweradd = 0
ctrl = 0
sprpriority = 3

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

[State 3831, 2]
type = PlayerPush
trigger1 = 1
value = 1

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

[State 3831, 4]
type = AssertSpecial
trigger1 = time%2
flag = invisible

[State 3831, 5]
type = PosAdd
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
trigger5 = animelem = 5
trigger6 = animelem = 6
x = 8

[State 3831, 6]
type = HitDef
trigger1 = animelem = 4
attr = S, HA
animtype = Heavy
damage = 21,3
hitflag = MAF
guardflag = MA
pausetime = 0,5
sparkno = s8010
guard.sparkno = s8040
sparkxy = -10,-60
hitsound = s201,3
guardsound = s120,1
ground.type = low
air.type = Low
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -3.5
guard.velocity = -3.5
air.velocity = -2.5,-4.75
fall = 0
air.fall = 1
air.recover = 0
fall.recover = 0
yaccel = .54688
getpower = 0,0
maxdist = 99999,0
id = 3805
palfx.time = 30
palfx.add = 240,50,0
palfx.mul = 250,224,120
palfx.sinadd = 110,55,85,10
Palfx.color = 0
palfx.invertall = 1
kill = 0

[State 3831, 7]
type = Helper
triggerall = movehit
triggerall = numhelper(9180) < 2
triggerall = p2stateno = 5000 || p2stateno = 5020
trigger1 = 1
name = "Fire"
ID = 9180
stateno = 9180
postype = P1
pos = 0,0
sprpriority = 3
bindtime = 1
ownpal = 1
ignorehitpause = 1
persistent = 1

[State 3831, 8]
type = DestroySelf
trigger1 = !animtime

;---------------------------------------------------------------------------
;Kyo Shadow 3
[Statedef 3832]
type    = A
movetype= A
physics = N
anim = 3822
juggle = 8
velset = 0,0
poweradd = 0
ctrl = 0
sprpriority = 3

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

[State 3832, 2]
type = PlayerPush
trigger1 = 1
value = 1

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

[State 3832, 4]
type = AssertSpecial
trigger1 = time%2
flag = invisible

[State 3832, 5]
type = PosAdd
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
x = 8

[State 3832, 6]
type = velset
trigger1 = Animelemtime(1) > 0
x = (8.7500*exp((-0.1886)*(time)))

[State 3832, 7]
type = velset
trigger1 = Animelem = 1
y = -7.9375

[State 3832, 8]
type = veladd
trigger1 = Animelemtime(1) > 0
y = .375

[State 3832, 9]
type = HitDef
trigger1 = animelem = 1
attr = A,HA
animtype = Heavy
damage = 21,3
hitflag = MAF
guardflag = MA
pausetime = 0,5
sparkno = s8010
guard.sparkno = s8040
sparkxy = -10,-75
hitsound = s201,3
guardsound = s120,1
ground.type = low
air.type = Low
ground.slidetime = 19
ground.hittime = 20
air.hittime = 10
guard.ctrltime = 17
ground.velocity = -3.5
guard.velocity = -3.5
air.velocity = -2.5,-4.75
fall = 0
air.fall = 1
air.recover = 0
fall.recover = 0
yaccel = .54688
getpower = 0,0
maxdist = 99999,0
id = 3805
palfx.time = 30
palfx.add = 240,50,0
palfx.mul = 250,224,120
palfx.sinadd = 110,55,85,10
Palfx.color = 0
palfx.invertall = 1
kill = 0

[State 3832, 10]
type = Helper
triggerall = movehit
triggerall = numhelper(9180) < 2
triggerall = p2stateno = 5000 || p2stateno = 5020
trigger1 = 1
name = "Fire"
ID = 9180
stateno = 9180
postype = P1
pos = 0,0
sprpriority = 3
bindtime = 1
ownpal = 1
ignorehitpause = 1
persistent = 1

[State 3832, 11]
type = DestroySelf
trigger1 = !animtime

;---------------------------------------------------------------------------
;Kyo Leaving the Screen
[Statedef 3840]
type    = S
movetype= I
physics = N
anim = 3826
poweradd = 0
sprpriority = 3

[State 3840, 1]
type = NotHitBy
trigger1 = 1
value = SCA

[State 3840, 2]
type = PlaySnd
triggerall = anim = 3826
trigger1 = animelem = 3
value = S3810,6

[State 3840, 3]
type = ChangeAnim
triggerall = anim = 3826
trigger1 = !animtime
value = 3827

[State 3840, 4]
type = velset
triggerall = anim = 3827
trigger1 = animelem = 2
x = 8
y = -8

[State 3840, 5]
type = StateTypeSet
triggerall = anim = 3827
trigger1 = animelem = 2
statetype = A
physics = N

[State 3840, 6]
type = PlaySnd
triggerall = anim = 3827
trigger1 = animelem = 2
value = s50,2

[State 3840, 7]
type = Destroyself
trigger1 = Frontedgedist < -80 || Backedgedist < 0

;---------------------------------------------------------------------------
;Thrown by Kyo Saishuu Kessen Ougi "Mu Shiki"
[Statedef 3850]
type    = S
movetype= H
physics = S
velset = 0,0

[State 3850, 1]
type = HitFallSet
trigger1 = 1
value = 0

[State 3850, 2]
type = PosSet
trigger1 = !time
y = 0
ignorehitpause = 1

[State 3850, 3]
type = ChangeAnim2
Trigger1 = Time = 0
value = 3850

[State 3850, 4]
type = SelfState
trigger1 = animtime = 0
value = 0
ctrl = 1



;-----------------------------------------------------------------------------------------
; Winscreen
;-----------------------------------------------------------------------------------------
[Statedef 3650]
type    = S
movetype= I
physics = S
anim = 9999
velset = 0,0
poweradd = 0
ctrl = 0
sprpriority = -1

[State 3650, 1]
type = AssertSpecial
trigger1 = time <= 700
flag = roundnotover

[State 3650, 2]
type = EnvColor
trigger1 = !time
value = 248,248,248
time = 4
under = 0
ignorehitpause = 1
persistent = 0

[State 3650, 3]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = noBG
flag3 = noFG
flag4 = nomusic

[State 3650, 4]
type = PlaySnd
trigger1 = !time
value = S1890,10

[State 3650, 5]; BG Screen
type = Explod
triggerall = numexplod(8650) = 0
trigger1 = !time
anim = 8650
ID = 8650
pos = 0,0
postype = left
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,1
pausemovetime = -1
supermovetime = -1
sprpriority = 99990
ownpal = 1
removeongethit = 1
ignorehitpause = 1

[State 3650, 5]; face Box
type = Explod
triggerall = numexplod(8651) = 0
trigger1 = !time
anim = 8651
ID = 8651
pos = 77,0
postype = left
sprpriority = 99991
ownpal = 1
removetime = 999999
scale = 1,1
bindtime = -1

[State 3650, 6]; face Bar 1
type = Explod
triggerall = numexplod(8652) = 0
trigger1 = !time
anim = 8652
ID = 8652
pos = 77,0
postype = left
sprpriority = 99992
ownpal = 1
removetime = 999999
scale = 1,1
bindtime = -1

[State 3650, 7]; face Bar 2
type = Explod
triggerall = numexplod(8653) = 0
trigger1 = !time
anim = 8653
ID = 8653
pos = 77,0
postype = left
sprpriority = 99992
ownpal = 1
removetime = 999999
scale = 1,1
bindtime = -1

[State 3650, 8]; Face
type = Explod
triggerall = numexplod(8654) = 0
trigger1 = !time
anim = 8654
ID = 8654
pos = 77,0
postype = left
sprpriority = 99992
ownpal = 1
removetime = 999999
scale = 1,1
bindtime = -1

[State 3650, 9]; Box
type = Explod
triggerall = numexplod(8655) = 0
trigger1 = time = 10
anim = 8655
ID = 8655
pos = 160,205
postype = left
sprpriority = 99994
ownpal = 1
removetime = 999999
scale = .1,.1
bindtime = -1

[State 3650, 10]
type = ModifyExplod
trigger1 = time = [10,19]
ID = 8655
scale = .1*(time-9),.1*(time-9)


[State 3650, 11]; Box
type = Explod
triggerall = numexplod(8656) = 0
trigger1 = time = 10
anim = 8656
ID = 8656
pos = 160,205
postype = left
sprpriority = 99993
ownpal = 1
removetime = 999999
scale = .1,.1
bindtime = -1

[State 3650, 12]
type = ModifyExplod
trigger1 = time = [10,19]
ID = 8656
scale = .1*(time-9),.1*(time-9)

[State 3650, 13]; Winner
type = Explod
triggerall = numexplod(8657) = 0
trigger1 = time = 30
anim = 8657
ID = 8657
pos = 60,100
postype = Left
facing = 1
vfacing = 1
bindtime = 65
vel = 0,0
accel = 0,0
random = 0,0
removetime = 104
supermovetime = 104
pausemovetime = 104
scale = .6,.6
sprpriority = 99993
ownpal = 1
removeongethit = 0
ignorehitpause = 1
persistent = 1

[State 3650, 14]
type = VarRandom
trigger1 = !time
v = 2
range = 0,4

[State 3650, 15]; Winquotes
type = Explod
triggerall = parent,var(59) = 0
trigger1 = time = 25
anim = 8660+var(2)
ID = 8660
pos = 160,205
postype = left
sprpriority = 99994
ownpal = 0
removetime = 999999
ontop = 1

;Winquote vs Kyo
[State 3650, 16]; Winquotes
type = Explod
triggerall = parent,var(59) = 1
trigger1 = time = 25
anim = 8666
ID = 8666
pos = 160,205
postype = left
sprpriority = 99994
ownpal = 0
removetime = 999999
ontop = 1

;Winquote vs Yagami
[State 3650, 17]; Winquotes
type = Explod
triggerall = parent,var(59) = 2
trigger1 = time = 25
anim = 8665
ID = 8665
pos = 160,205
postype = left
sprpriority = 99994
ownpal = 0
removetime = 999999
ontop = 1


;-----------------------------------------------------------------------------------------
; Super Cancel States
;-----------------------------------------------------------------------------------------
[Statedef 3600]
type    = S
movetype= I
physics = S
anim = 9999
velset = 0,0
poweradd = 0
ctrl = 0
sprpriority = -1

[State 3600, 1]
type = Explod
trigger1 = time = 10
anim = 8500
ID = 8500
pos = 65,66
postype = Left
facing = 1
vfacing = 1
bindtime = 50
vel = 0,0
accel = 0,0
random = 0,0
removetime = 40
supermovetime = 50
pausemovetime = 50
scale = .5,.5
sprpriority = 9998
ownpal = 1
removeongethit = 0
ignorehitpause = 1
persistent = 1

[State 3600, 2]
type = Explod
trigger1 = time = 0
anim = 8505
ID = 8505
pos = -5,65
postype = Left
facing = 1
vfacing = 1
bindtime = 65
vel = 0,0
accel = 0,0
random = 0,0
removetime = 58
supermovetime = 65
pausemovetime = 65
scale = 1.5,1
sprpriority = 9999
ownpal = 1
removeongethit = 0
ignorehitpause = 1
persistent = 1

[State 3600, 3]
type = Explod
trigger1 = time = 0
anim = 8510
ID = 8510
pos = -150,65
postype = Left
facing = 1
vfacing = 1
bindtime = 65
vel = 0,0
accel = 0,0
random = 0,0
removetime = 58
supermovetime = 65
pausemovetime = 65
scale = 1.5,1
sprpriority = 9997
ownpal = 1
trans = addalpha
alpha = 256, 135
removeongethit = 0
ignorehitpause = 1
persistent = 1

[State 3600, 4]
type = DestroySelf
trigger1 = time = 65

;-----------------------------------------------------------------------------------------
; Dream Cancel States
;-----------------------------------------------------------------------------------------
[Statedef 3700]
type    = S
movetype= I
physics = S
anim = 9999
velset = 0,0
poweradd = 0
ctrl = 0
sprpriority = -1

[State 3700, 1]
type = Explod
trigger1 = time = 10
anim = 8600
ID = 8600
pos = -3,68
postype = Left
facing = 1
vfacing = 1
bindtime = 50
vel = 0,0
accel = 0,0
random = 0,0
removetime = 40
supermovetime = 50
pausemovetime = 50
scale = .5,.5
sprpriority = 9998
ownpal = 1
removeongethit = 0
ignorehitpause = 1
persistent = 1

[State 3700, 2]
type = Explod
trigger1 = time = 0
anim = 8605
ID = 8605
pos = -5,65
postype = Left
facing = 1
vfacing = 1
bindtime = 65
vel = 0,0
accel = 0,0
random = 0,0
removetime = 58
supermovetime = 65
pausemovetime = 65
scale = 1.5,1
sprpriority = 9999
ownpal = 1
removeongethit = 0
ignorehitpause = 1
persistent = 1

[State 3700, 3]
type = Explod
trigger1 = time = 0
anim = 8610
ID = 8610
pos = -150,65
postype = Left
facing = 1
vfacing = 1
bindtime = 65
vel = 0,0
accel = 0,0
random = 0,0
removetime = 58
supermovetime = 65
pausemovetime = 65
scale = 1.5,1
sprpriority = 9997
ownpal = 1
trans = addalpha
alpha = 256, 135
removeongethit = 0
ignorehitpause = 1
persistent = 1

[State 3700, 4]
type = DestroySelf
trigger1 = time = 65


;-----------------------------------------------------------------------------------------
; 2002 UM BG States
;-----------------------------------------------------------------------------------------
;BG Effect
[Statedef 3900]
type    = S
movetype= I
physics = S
anim = 9999
velset = 0,0
poweradd = 0
ctrl = 0
sprpriority = -1

[State 3900, 1]
type = AssertSpecial
trigger1 = 1
flag = noBG
flag2 = noFG

[State 3900, 2]
type = Explod
triggerall = numexplod(8415) = 0
trigger1 = !time
anim = 8415
ID = 8415
pos = 0,0
postype = left
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,1
under = 1
pausemovetime = -1
supermovetime = -1
sprpriority = -20
ownpal = 1
removeongethit = 1
ignorehitpause = 1
persistent = 0

[State 3900, 3]
type = Explod
triggerall = numexplod(8415) < 4
trigger1 = !time
trigger2 = timemod = 10, = 0
anim = 8415
ID = 8415
pos = 320,0
postype = left
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,1
under = 1
pausemovetime = -1
supermovetime = -1
sprpriority = -20
ownpal = 1
removeongethit = 1
ignorehitpause = 1

[State 3900, 4]
type = Explod
triggerall = numexplod(8420) = 0
trigger1 = !time
anim = 8420
ID = 8420
pos = 0,0
postype = left
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,1
under = 1
pausemovetime = -1
supermovetime = -1
sprpriority = -20
ownpal = 1
removeongethit = 1
ignorehitpause = 1
persistent = 0

[State 3900, 5]
type = Explod
triggerall = numexplod(8420) < 4
trigger1 = !time
trigger2 = timemod = 20, = 0
anim = 8420
ID = 8420
pos = 320,0
postype = left
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,1
under = 1
pausemovetime = -1
supermovetime = -1
sprpriority = -20
ownpal = 1
removeongethit = 1
ignorehitpause = 1

[State 3900, 6]
type = Explod
triggerall = numexplod(8425) = 0
trigger1 = !time
anim = 8425
ID = 8425
pos = 0,0
postype = left
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,1
under = 1
pausemovetime = -1
supermovetime = -1
sprpriority = -20
ownpal = 1
removeongethit = 1
ignorehitpause = 1
persistent = 0

[State 3900, 7]
type = Explod
triggerall = numexplod(8425) < 4
trigger1 = !time
trigger2 = timemod = 40, = 0
anim = 8425
ID = 8425
pos = 320,0
postype = left
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,1
under = 1
pausemovetime = -1
supermovetime = -1
sprpriority = -20
ownpal = 1
removeongethit = 1
ignorehitpause = 1

[State 3900, 8]
type = Explod
triggerall = numexplod(8430) = 0
trigger1 = !time
anim = 8430
ID = 8430
pos = 0,0
postype = left
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,1
under = 1
pausemovetime = -1
supermovetime = -1
sprpriority = -20
ownpal = 1
removeongethit = 1
ignorehitpause = 1
persistent = 0

[State 3900, 9]
type = Explod
triggerall = numexplod(8430) < 4
trigger1 = !time
trigger2 = timemod = 40, = 0
anim = 8430
ID = 8430
pos = 320,0
postype = left
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,1
under = 1
pausemovetime = -1
supermovetime = -1
sprpriority = -20
ownpal = 1
removeongethit = 1
ignorehitpause = 1

[State 3900, 10]
type = ChangeState
trigger1 = root, stateno != [3800,3810]
trigger2 = root, stateno = 3810 && root, animelem = 72
trigger3 = root, movetype = H
value = 3905
ctrl = 0

;glass
[Statedef 3905]
type    = S
movetype= I
physics = S
anim = 9999
velset = 0,0
poweradd = 0
ctrl = 0
sprpriority = -1

[State 3905, 1]
type = EnvColor
trigger1 = !time
value = 255,255,255
time = 2
under = 1
ignorehitpause = 1
persistent = 0

[State 3905, 2]
type = Explod
triggerall = !numexplod(8435)
trigger1 = time = 2
anim = 8435
ID = 8435
pos = 0,0
postype = left
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,1
under = 1
pausemovetime = -1
supermovetime = -1
sprpriority = -20
ownpal = 1
removeongethit = 1
ignorehitpause = 1

[State 3905, 3]
type = PlaySnd
trigger1 = !time
value = S3905,1

[State 3905, 4]
type = RemoveExplod
trigger1 = !time
id = 8415

[State 3905, 5]
type = RemoveExplod
trigger1 = !time
id = 8420

[State 3905, 6]
type = RemoveExplod
trigger1 = !time
id = 8425

[State 3905, 7]
type = RemoveExplod
trigger1 = !time
id = 8430

[State 3905, 8]
type = DestroySelf
trigger1 = time = 2


;-----------------------------------------------------------------------------------------
; MAX 2 portraits
;-----------------------------------------------------------------------------------------
[Statedef 3910]
type    = S
movetype= I
physics = S
anim = 9999
velset = 0,0
poweradd = 0
ctrl = 0
sprpriority = -1

; P1 Portrait Box
[State 3910, 1]
type = Explod
triggerall = numexplod(8405) = 0
triggerall = teamside = 1
trigger1 = !time
anim = 8405
ID = 8405
pos = 0,80
postype = left
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,1
under = 1
pausemovetime = -1
supermovetime = -1
sprpriority = -19
ownpal = 1
removeongethit = 1
ignorehitpause = 1
removetime = -1

[State 3910, 2]
type = ModifyExplod
trigger1 = time < 10
ID = 8405
scale = 1,(time+1)*.1

[State 3910, 3]
type = ModifyExplod
trigger1 = time > 51
ID = 8405
scale = 1,(1-(.1*(time-51)))

[State 3910, 4]
type = RemoveExplod
trigger1 = time = 62
id = 8405

; P1 Portrait
[State 3910, 5]
type = Explod
triggerall = numexplod(8400) = 0
triggerall = teamside = 1
trigger1 = !time
anim = 8400
ID = 8400
pos = 40,80
postype = left
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,1
under = 1
pausemovetime = -1
supermovetime = -1
sprpriority = -18
ownpal = 1
removeongethit = 1
ignorehitpause = 1
removetime = -1

[State 3910, 6]
type = ModifyExplod
trigger1 = time < 10
ID = 8400
scale = 1,(time+1)*.1

[State 3910, 7]
type = ModifyExplod
trigger1 = time > 51
ID = 8400
scale = 1,1-(.1*(time-51))

[State 3910, 8]
type = RemoveExplod
trigger1 = time = 62
id = 8400

; P2 Portrait Box
[State 3910, 9]
type = Explod
triggerall = numexplod(8410) = 0
triggerall = teamside = 2
trigger1 = !time
anim = 8410
ID = 8410
pos = 0,80
postype = right
facing = -1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,1
under = 1
pausemovetime = -1
supermovetime = -1
sprpriority = -19
ownpal = 1
removeongethit = 1
ignorehitpause = 1
removetime = -1

[State 3910, 10]
type = ModifyExplod
trigger1 = time < 10
ID = 8410
scale = 1,(time+1)*.1

[State 3910, 11]
type = ModifyExplod
trigger1 = time > 51
ID = 8410
scale = 1,(1-(.1*(time-51)))

[State 3910, 12]
type = RemoveExplod
trigger1 = time = 62
id = 8410

; P2 Portrait
[State 3910, 13]
type = Explod
triggerall = numexplod(8400) = 0
triggerall = teamside = 2
trigger1 = !time
anim = 8400
ID = 8400
pos = -40,80
postype = right
facing = -1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
scale = 1,1
under = 1
pausemovetime = -1
supermovetime = -1
sprpriority = -18
ownpal = 1
removeongethit = 1
ignorehitpause = 1
removetime = -1

[State 3910, 14]
type = ModifyExplod
trigger1 = time < 10
ID = 8400
scale = 1,(time+1)*.1

[State 3910, 15]
type = ModifyExplod
trigger1 = time > 51
ID = 8400
scale = 1,1-(.1*(time-51))

[State 3910, 16]
type = RemoveExplod
trigger1 = time = 62
id = 8400

[State 3910, 17]
type = DestroySelf
trigger1 = time = 62



;-----------------------------------------------------------------------------------------
; Guarding KO
;-----------------------------------------------------------------------------------------
[Statedef 8200]
type = S
movetype = I
physics = S
anim = 5800
poweradd = 0
sprpriority = -1
velset = 0,0
ctrl = 0

[State 8200, 1]
type = Changestate
trigger1 = statetype = A
value = 5000
ignorehitpause = 1

[State 8200, 2]
type = NotHitBy
trigger1 = time >= 0
value = SCA

[State 8200, 3]
type = PlayerPush
trigger1 = time >= 0
value = 0

[State 8200, 4]
type = PlaySnd
trigger1 = animelem = 1
value = S5000,1
channel = 0

[State 8200, 5]
type = ChangeState
trigger1 = Animelemtime(8) = 1
value = 5150



;--------------------------------------------------------------------------
; Fire Effect
[statedef 9180]
type = A
movetype = I
physics = N
anim = 9999
velset = 0,0
sprpriority = -1

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

[state 9180, 2]
type = explod
triggerall = numexplod(8070) <= 2
trigger1 = time = 0
trigger2 = time = 5
trigger3 = time = 10
trigger4 = time = 15
trigger5 = time = 20
trigger6 = time = 25
trigger7 = time = 30
trigger8 = time = 35
trigger9 = time = 40
trigger10 = time = 45
trigger11 = time = 50
id = 8070
anim = 8070
postype = p2
pos = 0,-50
random = 60,80
vel = 0,0
accel = 0,0
pausemovetime = 0
supermovetime = 0
sprpriority = 5
bindtime = 1
ownpal = 1
ignorehitpause = 1
persistent = 1

[state 9180, 3]
type = Destroyself
trigger1 = time >= 51

;---------------------------------------------------------------------------
; Override common states (use same number to override) :
;---------------------------------------------------------------------------
; HITA_SHAKE
[Statedef 5020]
type    = A
movetype= H
physics = N
velset = 0,0

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

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

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

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

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

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

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

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


;---------------------------------------------------------------------------
; HITA_RECOV (recovering in air, not falling)
[Statedef 5040]
type    = A
movetype= H
physics = N

[State 5040, 1]
type = ChangeState
trigger1 = !Alive
value = 5050

[State 5040, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim != 5040
trigger2 = Time = 0
trigger2 = Anim != 5035
value = 5040

[State 5040, 3]
type = Nothitby
trigger1 = 1
value = SCA

[State 5040, 4]
type = StateTypeSet
trigger1 = HitOver
movetype = I

[State 5040, 5]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5040, 6]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 52 ;JUMPLAND

;---------------------------------------------------------------------------
; HITA_FALL (knocked up, falling)
[Statedef 5050]
type    = A
movetype= H
physics = N

[State 5050, 1] ;Change anim when done with transition
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim = 5035
trigger2 = Time = 0     ;If no transition anim
trigger2 = Anim != 5035
trigger2 = (Anim != [5051, 5059]) && (Anim != [5061, 5069])
trigger2 = Anim != 5090 ;Not if hit off ground anim
value = 5050

[State 5050, 2] ;Coming down anim
type = ChangeAnim
trigger1 = anim = [5050,5059]
trigger1 = Vel Y >= ifelse(anim = 5050, 1, -2)
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 5050, 3] ;Gravity
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5050, 4] ;Recover near ground
type = ChangeState
triggerall = Vel Y > 0
triggerall = Pos Y >= -40
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery" || command = "z"
value = 5200 ;HITFALL_RECOVER

[State 5050, 5]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= ifelse((anim = [5051,5059]) || (anim = [5061,5069]), 0, 25)
value = 5100 ;HIT_BOUNCE

;---------------------------------------------------------------------------
; HIT_TRIP2 (fall through air)
[Statedef 5071]
type    = A
movetype= H
physics = N

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

[State 5071, 2] ;Acceleration
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5071, 3] ;Hit ground
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 15
type = ChangeState
value = 5100

;---------------------------------------------------------------------------
; HIT_BOUNCE (hit ground)
[Statedef 5100]
type    = L
movetype= H
physics = N

[State 5100, 1]
type = VelSet
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) = 0
trigger1 = vel x > 1
x = 1

[State 5100, EnvShake]
type = FallEnvShake
trigger1 = Time = 0

[State 5100, Var] ;Save fall velocity
type = VarSet
trigger1 = Time = 0
sysvar(1) = floor(vel y)

[State 5100, 2] ;Hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0
trigger1 = (anim != [5051,5059]) && (anim != [5061,5069])
trigger2 = !SelfAnimExist(5100 + (anim % 10))
value = 5100

[State 5100, 3] ;Hit ground anim (for hit up)
type = ChangeAnim
trigger1 = time = 0
trigger1 = (anim = [5051,5059]) || (anim = [5061,5069])
trigger1 = SelfAnimExist(5100 + (anim % 10))
value = 5100 + (anim % 10)

[State 5100, 4]
type = PosSet
trigger1 = Time = 0
y = 0

[State 5100, 5]
type = VelSet
trigger1 = Time = 0
y = 0

[State 5100, 6] ;Reduce speed
type = VelMul
trigger1 = Time = 0
x = 0.75

[State 5100, 7]
type = ChangeState
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) = 0
value = 5110 ;HIT_LIEDOWN

[State 5100, 8]
type = GameMakeAnim
trigger1 = Time = 1
value = 60 + (sysvar(1) > 5) + (sysvar(1) > 14)
pos = 0, 0
under = sysvar(1) <= 14

[State 5100, 9]
type = HitFallDamage
trigger1 = Time = 3

[State 5100, 10]
type = PlaySnd
trigger1 = Time = 1
value = s1220,1

[State 5100, 11]
type = PosFreeze
trigger1 = 1

[State 5100, 12]
type = ChangeState
trigger1 = AnimTime = 0
value = 5101

[State 5100, 13]
type = ForceFeedback
trigger1 = Time = 0
waveform = sinesquare
ampl = 128,-3,-.2,.005
time = 20

;---------------------------------------------------------------------------
; HIT_LIEDOWN
[Statedef 5110]
type    = L
movetype= H
physics = N

[State 5110, 0]
type = Explod
trigger1 = time = 0
anim = 8100
ID = 8100
pos = 10,0
postype = p1
facing = 1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = 2
ownpal = 1

[State 5110, EnvShake]
type = FallEnvShake
trigger1 = Time = 0

[State 5110, 1] ;For hit up/up-diag type (from state 5081)
type = ChangeAnim
persistent = 0
trigger1 = SelfAnimExist(5110 + (anim % 10))
trigger1 = anim = [5081,5089]
value = 5110 + (anim % 10)

[State 5110, 2] ;Hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0
triggerall = anim != [5110,5119] ;Not already changed anim
trigger1 = anim != [5161,5169]
trigger2 = !SelfAnimExist(5170 + (anim % 10))
value = 5170

[State 5110, 3] ;Hit ground anim (for hit up)
type = ChangeAnim
triggerall = time = 0
triggerall = anim != [5110,5119] ;Not already changed anim
trigger1 = anim = [5161,5169]
trigger1 = SelfAnimExist(5170 + (anim % 10))
value = 5170 + (anim % 10)

[State 5110, 4]
type = HitFallDamage
trigger1 = Time = 0

[State 5110, 5]
type = PosSet
trigger1 = Time = 0
y = 0

[State 5110, Var] ;Get fall velocity
type = VarSet
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) != 0
sysvar(1) = floor(vel y)

[State 5110, 6]
type = PlaySnd
trigger1 = Time = 0
trigger1 = !SysVar(0)
value = s1220,1

[State 5110, 7]
type = GameMakeAnim
trigger1 = Time = 0
trigger1 = !SysVar(0)
value = 60 + (sysvar(1) > 5) + (sysvar(1) > 14)
pos = 0, 0
under = sysvar(1) <= 14

[State 5110, 8]
type = VelSet
trigger1 = Time = 0
y = 0

[State 5110, 9] ;For hit up type
type = ChangeAnim
persistent = 0
triggerall = anim = [5171,5179]
triggerall = SelfAnimExist(5110 + (anim % 10))
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground anim
value = 5110 + (anim % 10)

[State 5110, 10] ;For normal
type = ChangeAnim
persistent = 0
triggerall = Anim != [5111,5119]
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground frame
value = 5110

[State 5110, 11] ;If just died
type = ChangeState
triggerall = !alive
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground frame
trigger3 = Anim = [5110,5119]
value = 5150

[State 5110, 12]
type = VarSet
trigger1 = SysVar(0)
trigger1 = Time = 0
sysvar(0) = 0

[State 5110, 13] ;Friction
type = VelMul
trigger1 = 1
x = 0.85

[State 5110, 14]
type = ForceFeedback
trigger1 = alive
trigger1 = Time = 0
time = 8
ampl = 240
waveform = sine

[State 5110, 15]
type = ForceFeedback
trigger1 = !alive
trigger1 = Time = 0
ampl = 200, 7, -.467
time = 30
waveform = sine

;---------------------------------------------------------------------------
; HIT_LIEDEAD
[Statedef 5150]
type    = L
movetype= H
physics = N
sprpriority = -3

[State 5150, 1] ;Normal anim
type = ChangeAnim
triggerall = prevstateno != 8200
triggerall = Time = 0
triggerall = SelfAnimExist(5140)
trigger1 = (anim != [5111,5119]) && (anim != [5171,5179])
trigger2 = !SelfAnimExist(5140 + (anim % 10))
value = 5140

[State 5150, 3] ;Hit up type anim
type = ChangeAnim
triggerall = prevstateno != 8200
trigger1 = Time = 0
trigger1 = (anim = [5111,5119]) || (anim = [5171,5179])
trigger1 = SelfAnimExist(5140 + (anim % 10))
value = 5140 + (anim % 10)

[State 5150, 4] ;Match over anim
type = ChangeAnim
persistent = 0
triggerall = prevstateno != 8200
;trigger1 = Time = 0
trigger1 = MatchOver = 1
trigger1 = Anim = [5140,5149]
trigger1 = SelfAnimExist(anim+10)
value = anim+10

[State 5150, 5] ;Switch to 5110 if liedead anim does not exist
type = ChangeAnim
triggerall = prevstateno != 8200
trigger1 = Time = 0
trigger1 = Anim != [5140,5159]
trigger1 = Anim != [5110,5119]
value = 5110

[State 5150, 6] ;Friction
type = VelMul
trigger1 = 1
x = 0.85

[State 5150, 7] ;Friction
type = VelSet
trigger1 = Vel x < .05
persistent = 0
x = 0

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

;---------------------------------------------------------------------------
; HIT_FALLRECOVER (on the ground)
[Statedef 5201]
type    = S
movetype= I
physics = S
anim = 5200
velset = 0,0

[State 5201, 1]
type = ChangeState
triggerall = command = "holdfwd"
trigger1 = time = 0
value = 5202
ctrl = 0

[State 5201, 0]
type = PlaySnd
trigger1 = animelem = 1
value = S190,0
channel = 0

[state 5201, 2]
type = posset
trigger1 = time = 0
y = 0

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

[State 5201, 4]
type = velset
trigger1 = 1
x = -(9.7500*exp((-0.2076)*(time)))

[State 5201, 5]
type = PlayerPush
trigger1 = AnimElemTime(6) < 0
value = 0

[State 5201, 6]
type = PlaySnd
trigger1 = Time = 1
value = s5200,0
channel = 0
;volume = 255

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

; Recover Forward
[Statedef 5202]
type    = S
movetype= I
physics = S
anim = 5201
velset = 0,0

[State 5202, 0]
type = PlaySnd
trigger1 = animelem = 1
value = S190,0
channel = 0

[state 5202, 1]
type = posset
trigger1 = time = 0
y = 0

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

[State 5202, 3]
type = velset
trigger1 = 1
x = (9.7500*exp((-0.2076)*(time)))

[State 5202, 4]
type = PlayerPush
trigger1 = AnimElemTime(6) < 0
value = 0

[State 5202, 5]
type = PlaySnd
trigger1 = Time = 1
value = s5200,0
channel = 0
;volume = 255

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


;-----------------------------------------------------------------------------------------
; AI Section
;-----------------------------------------------------------------------------------------

; (Credit to ANMC, Bagaliao, and FlowaGirl for the basic helper method concept.)
;
;------------------
; AI Activation Helper State - Primary Version
; (Credit to YongMing for the basic HitPause bugfix concept.)
;
; var(1) - First tick button activation prevention.
; var(2) - Used for pause/superpause and custom state check, basically.
; var(3) - (Super/)Pause & custom state-triggered dir detection disabler.
; var(4) - Persistent direction command detection enabler (due to 2002.04.14).
; var(9) - AutoTurn bug fixer.
; var(10)- Post-custom state buffered dir detection disabler.
; parent's var(57) - Parent's GameTime var, for pause and custom state check.
; parent's var(58) - Parent's primary AI variable.
;
; The code in this state is mostly simply copy/pasteable.
; But if you're using different indices for the parent's variables,
; or if you change your character's basic commands' names, you'll
; of course need to change the code in this state accordingly.

[StateDef 9741]
type = S
movetype = I
physics = N
anim = 9741
ctrl = 0

[State 9741, Safety]; Just in case your opponent is very poorly coded.
type = SelfState
trigger1 = !IsHelper
value = 0

[State 9741, UglyHack]
type = VarSet
trigger1 = !var(1)
var(2) = 2

[State 9741, PauseCheck]
type = VarSet
trigger1 = GameTime > Parent,var(57)
trigger2 = !(Parent,Alive)
trigger3 = RoundState != 2
trigger4 = Parent,var(58)
trigger5 = var(3):=0
var(2) = (var(3):=1)+(var(4):=0)

[State 9741, Facing]
type = Turn
trigger1 = var(9):=(Facing != Parent,Facing)
trigger1 = !(var(4):=0)

[State 9741, DirTurnOnAI]
type = ParentVarSet
triggerall = !(var(3) || var(9))
trigger1 = Parent,command = "holdfwd"
trigger2 = Parent,command = "holdback"
trigger3 = Parent,command = "holdup"
trigger4 = Parent,command = "holddown"
trigger5 = !(var(4):=1)
var(58) = var(4)

[State 9741, DirTurnOffAI]
type = ParentVarSet
triggerall = !var(3)
triggerall = Parent,var(58)
trigger1 = command = "holdfwd"
trigger1 = Parent,command = "holdfwd"
trigger2 = command = "holdback"
trigger2 = Parent,command = "holdback"
trigger3 = command = "holdup"
trigger3 = Parent,command = "holdup"
trigger4 = command = "holddown"
trigger4 = Parent,command = "holddown"
var(58) = var(4):=0

[State 9741, ButtonTurnOnAI]
type = ParentVarSet
triggerall = !var(2)
trigger1 = Parent,command = "a"
trigger2 = Parent,command = "b"
trigger3 = Parent,command = "c"
trigger4 = Parent,command = "x"
trigger5 = Parent,command = "y"
trigger6 = Parent,command = "z"
trigger7 = Parent,command = "start"
var(58) = 1

[State 9741, ButtonTurnOffAI]
type = ParentVarSet
triggerall = !var(2)
trigger1 = command = "a"
trigger1 = Parent,command = "a"
trigger2 = command = "b"
trigger2 = Parent,command = "b"
trigger3 = command = "c"
trigger3 = Parent,command = "c"
trigger4 = command = "x"
trigger4 = Parent,command = "x"
trigger5 = command = "y"
trigger5 = Parent,command = "y"
trigger6 = command = "z"
trigger6 = Parent,command = "z"
trigger7 = command = "start"
trigger7 = Parent,command = "start"
var(58) = -1

[State 9741, UnPauseCheck]
type = VarSet
triggerall = var(2)
trigger1 = Parent,command = "a"
trigger2 = Parent,command = "b"
trigger3 = Parent,command = "c"
trigger4 = Parent,command = "x"
trigger5 = Parent,command = "y"
trigger6 = Parent,command = "z"
trigger7 = Parent,command = "start"
trigger8 = var(2) = 2
trigger8 = var(2):=0
var(2) = 2

[State 9741, Goodbye]
type = DestroySelf
triggerall = var(1):=1
trigger1 = Parent,var(58)
trigger2 = !(Parent,Alive)
trigger3 = RoundState != 2

[State 9741, DTC]
type = DisplayToClipboard
trigger1 = 1
text = "Var(2) = %d, ParentVar(57) = %d, GameTime = %d, Var(3) = %d"
params = var(2), (Parent,var(57)), GameTime, var(3)

;------------------
; AI Activation Helper State - Compatibly Partnered Version
;
; var(1) - First tick dir activation prevention
; var(2) - Used for pause/superpause and custom state check, basically.
; var(3) - (Super/)Pause & custom state-triggered dir detection disabler.
; var(4) - Hitpause check.
; var(5) - No button on previous tick.
; var(6) - Any dir on this tick.
; var(7) - Any button on this tick.
; var(8) - Matching partner button detected.
; var(9) - AutoTurn bug fixer.
; var(10)- Buffered dir detection disabler.
; parent's var(57) - Parent's GameTime var, for pause and custom state check.
; parent's var(58) - Parent's primary AI variable.
;
; The code in this state is mostly simply copy/pasteable.
; But if you're using different indices for the parent's variables,
; or if you change your character's basic commands' names, you'll
; of course need to change the code in this state accordingly.

[StateDef 9742]
type = S
movetype = I
physics = N
anim = 9741
ctrl = 0

[State 9742, Safety]; Just in case your opponent is very poorly coded.
type = SelfState
trigger1 = !IsHelper
value = 0

[State 9742, UglyHack]
type = VarSet
trigger1 = !var(1)
var(2) = var(3):=2

[State 9742, PauseCheck]
type = VarSet
trigger1 = GameTime > Parent,var(57)
trigger2 = !(Parent,Alive)
trigger3 = RoundState != 2
trigger4 = Parent,var(58)
trigger5 = var(3):=0
var(2) = var(3):=1

[State 9742, Facing]
type = Turn
trigger1 = var(9):=(Facing != Parent,Facing)

[State 9742, ParentDirCheck]
type = VarSet
trigger1 = Parent,command = "holdfwd"
trigger2 = Parent,command = "holdback"
trigger3 = Parent,command = "holdup"
trigger4 = Parent,command = "holddown"
trigger5 = var(6):=0
var(6) = 1

[State 9742, BufferCheck]
type = VarSet
trigger1 = var(3) || var(4) || var(10)
var(10) = var(6)

[State 9742, ParentButtonCheck]
type = VarSet
trigger1 = Parent,command = "a"
trigger2 = Parent,command = "b"
trigger3 = Parent,command = "c"
trigger4 = Parent,command = "x"
trigger5 = Parent,command = "y"
trigger6 = Parent,command = "z"
trigger7 = Parent,command = "start"
trigger8 = var(7):=0
var(7) = 1

[State 9742, SameButtonCheck]
type = VarSet
triggerall = var(7)
triggerall = !var(2)
triggerall = NumPartner
trigger1 = Parent,command = "a"
trigger1 = Partner,command = "a"
trigger2 = Parent,command = "b"
trigger2 = Partner,command = "b"
trigger3 = Parent,command = "c"
trigger3 = Partner,command = "c"
trigger4 = Parent,command = "x"
trigger4 = Partner,command = "x"
trigger5 = Parent,command = "y"
trigger5 = Partner,command = "y"
trigger6 = Parent,command = "z"
trigger6 = Partner,command = "z"
trigger7 = Parent,command = "start"
trigger7 = Partner,command = "start"
trigger8 = var(8):=0
var(8) = 1

[State 9742, DirTurnOnAI]
type = ParentVarSet
trigger1 = var(6)
trigger1 = !(var(9) || var(10))
var(58) = 1

[State 9742, DirTurnOffAI]
type = ParentVarSet
triggerall = var(6)
triggerall = !var(3)
triggerall = Parent,var(58)
trigger1 = command = "holdfwd"
trigger1 = Parent,command = "holdfwd"
trigger2 = command = "holdback"
trigger2 = Parent,command = "holdback"
trigger3 = command = "holdup"
trigger3 = Parent,command = "holdup"
trigger4 = command = "holddown"
trigger4 = Parent,command = "holddown"
var(58) = 0

[State 9742, ButtonTurnOnAI]
type = ParentVarSet
trigger1 = var(5) && var(7)
trigger1 = !(var(2) || var(8))
var(58) = 1

[State 9742, ButtonTurnOffAI]
type = ParentVarSet
triggerall = var(7)
triggerall = !(var(2) || var(8))
trigger1 = command = "a"
trigger1 = Parent,command = "a"
trigger2 = command = "b"
trigger2 = Parent,command = "b"
trigger3 = command = "c"
trigger3 = Parent,command = "c"
trigger4 = command = "x"
trigger4 = Parent,command = "x"
trigger5 = command = "y"
trigger5 = Parent,command = "y"
trigger6 = command = "z"
trigger6 = Parent,command = "z"
trigger7 = command = "start"
trigger7 = Parent,command = "start"
var(58) = -1

[State 9742, UnPauseCheck]
type = VarSet
triggerall = var(2)
triggerall = !var(4)
trigger1 = var(7)
trigger2 = var(2) = 2
trigger2 = var(2):=0
var(2) = 2

[State 9742, Goodbye]
type = DestroySelf
trigger1 = Parent,var(58)
trigger2 = !(Parent,Alive)
trigger3 = RoundState != 2

[State 9742, HitPauseCheck]
type = VarSet
trigger1 = var(6) || var(7)
trigger2 = !(Parent,HitPauseTime)
var(4) = Parent,HitPauseTime

[State 9742, Delay]
type = VarSet
trigger1 = var(1):=1
var(5) = !var(7)

[State 9742, DTC]
type = DisplayToClipboard
trigger1 = 1
text = "Var(2) = %d, ParentVar(57) = %d, GameTime = %d, Var(3) = %d"
params = var(2), (Parent,var(57)), GameTime, var(3)


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

; No KO SND for Cheese KO
[State -2, AssertSpecial]
type = AssertSpecial
trigger1 = PrevStateNo = [130,152]
trigger1 = stateno = 5000 || stateno = 5010
trigger1 = statetype != A
flag = Nokosnd
ignorehitpause = 1

; Guarding KO
[State -2, Guarding KO]
type = ChangeState
triggerall = prevstateno = [130,152]
triggerall = !alive
trigger1 = stateno = 5000 || stateno = 5010
value = 8200
ignorehitpause = 1

; Stop Run FWD sound
[State -2, StopSnd]
type = StopSnd
trigger1 = stateno != 100
channel = 2

; Stop Taunt sound
[State -2, StopSnd]
type = StopSnd
trigger1 = stateno != 195
channel = 3

; Remove After Images
[State -2, removeafterimage]
type = AfterImageTime
triggerall = Movetype = H
trigger1 = Time = 0
time = 0

; Baddarkness Demitri M. Bliss
[State -2, ChangeState]
type = ChangeAnim
triggerall = Stateno = 2021 && Selfanimexist(9020)
trigger1 = Numenemy = 1
trigger1 = Enemynear,name = "Demitri"
trigger2 = Numenemy = 2
trigger2 = Enemynear(0),name = "Demitri" || Enemynear(1),name = "Demitri"
value = 9020
elem = 1
ignorehitpause =1

[State -2, ChangeState]
type = ChangeAnim
triggerall = Stateno = 2022 && Selfanimexist(9020)
trigger1 = Numenemy = 1
trigger1 = Enemynear,name = "Demitri"
trigger2 = Numenemy = 2
trigger2 = Enemynear(0),name = "Demitri" || Enemynear(1),name = "Demitri"
value = 9020
elem = 2
ignorehitpause =1

[State -2, ChangeState]
type = ChangeAnim
triggerall = Stateno = 2023 && Selfanimexist(9020)
trigger1 = Numenemy = 1
trigger1 = Enemynear,name = "Demitri"
trigger2 = Numenemy = 2
trigger2 = Enemynear(0),name = "Demitri" || Enemynear(1),name = "Demitri"
value = 9020
elem = 3
ignorehitpause =1

[State -2, ChangeState]
type = ChangeAnim
triggerall = Stateno = 2024 && Selfanimexist(9020)
trigger1 = Numenemy = 1
trigger1 = Enemynear,name = "Demitri"
trigger2 = Numenemy = 2
trigger2 = Enemynear(0),name = "Demitri" || Enemynear(1),name = "Demitri"
value = 9020
elem = 4
ignorehitpause =1

[State -2, ChangeState]
type = ChangeAnim
triggerall = Stateno = 2025 && Selfanimexist(9020)
trigger1 = Numenemy = 1
trigger1 = Enemynear,name = "Demitri"
trigger2 = Numenemy = 2
trigger2 = Enemynear(0),name = "Demitri" || Enemynear(1),name = "Demitri"
value = 9020
elem = 5
ignorehitpause =1

[State -2, ChangeState]
type = ChangeAnim
triggerall = Stateno = 2026 && Selfanimexist(9020)
trigger1 = Numenemy = 1
trigger1 = Enemynear,name = "Demitri"
trigger2 = Numenemy = 2
trigger2 = Enemynear(0),name = "Demitri" || Enemynear(1),name = "Demitri"
value = 9020
elem = 6
ignorehitpause =1

; DisplayToClipboard
[State -2, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text ="p2bodydist x = %f%%, p2bodydist y = %f%%, var(59) = %d, frontedgedist = %d"
params = p2bodydist x, p2bodydist y, var(59), frontedgedist

;---------------------------------------------------------------------------
; AI Section
;---------------------------------------------------------------------------
; Within StateDef -2, none of your own AI-related code should be placed
; above these next two controllers.

[State -2, StopAI]
type = VarSet
triggerall = var(58) > 0 && !IsHelper
trigger1 = RoundState != 2
trigger2 = !Alive
var(58) = -2
IgnoreHitPause = 1

; This controller is optional.  It allows you treat the AI flag as a boolean
; value rather than an integer value, letting you trigger your AI directives
; with "var(0)" instead of "var(58)>0", and letting you make moves usable only
; by humans by using "!var(0)" instead of "var(58)<1", thus slightly improving
; the size and efficiency of your code.
; Another benefit is that it makes it much easier for users to disable your AI,
; if they so choose.
[State -2, Simplifier]
type = VarSet
triggerall = !IsHelper
trigger1 = var(58) = 1
trigger2 = var(0):=0
var(0) = 1	; Another option is to replace 1 with something like MatchNo, if
		; you want to design your AI to have varying levels of difficulty.
IgnoreHitPause = 1

;[State -2, DTC]
;type = DisplayToClipboard
;trigger1 = 1
;text = "var(58) = %d, var(0) = %d, RoundState = %d, IsHomeTeam = %d, var(57) = %d"
;params = var(58), var(0), RoundState, IsHomeTeam, var(57)
;IgnoreHitPause = 1

;[State -2, ATC]
;type = AppendToClipboard
;trigger1 = 1
;text = "\nMatchNo = %d, var(56) = %d"
;params = MatchNo, var(56)
;IgnoreHitPause = 1

; REDFIX
[State -2]
type = Width
trigger1 = movetype!=H
edge = 8,0
ignorehitpause = 1

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

; Hurting Sounds
[State -3, PlaySnd]
type = PlaySnd
triggerall = Alive && Random <= 800
triggerall = StateNo = 5000 || StateNo = 5010   || StateNo = 5020 || StateNo = 5070 || StateNo = 5080
trigger1 = time = 0
value = s5000,0+(random%6)
channel = 0

; Target Sound
[State -3, Target Sound]
type = PlaySnd
triggerall = numtarget(3000) = 1
trigger1 = target(3000), stateno = 3085 && target(3000), movetype = H  && target(3000), statetype = A
trigger1 = target(3000), Vel Y > 0 && target(3000), Pos Y >= 0
value = s2,11
ignorehitpause = 1
persistent = 0

; Winpose VS kyo/Iori controller
[State -3, Wipose VS Kyo/Iori controller]
type = varset
trigger1 = roundstate = 0
var(59) = 0


; Winpose VS kyo
[State -3, Wipose VS Kyo]
type = varset
trigger1 = (P2Name = "Kyo Kusanagi" || P4Name = "Kyo Kusanagi" ) && enemy,authorname = "K.O.D."
trigger2 = (P2Name = "NeoKyo" || P4Name = "NeoKyo" ) && enemy,authorname = "Sander71113"
trigger3 = (P2Name = "Kyo98" || P4Name = "Kyo98" ) && enemy,authorname = "HIro=hiRO"
trigger4 = (P2Name = "kyo98UM" || P4Name = "kyo98UM" ) && enemy,authorname = "beppu"
trigger5 = (P2Name = "Kyo-96" || P4Name = "Kyo-96" ) && enemy,authorname = "Zelgadis"
trigger6 = (P2Name = "KYO" || P4Name = "KYO" ) && enemy,authorname = "The KJ"
trigger7 = (P2Name = "kyo_classic" || P4Name = "kyo_classic" ) && enemy,authorname = "ikaruga"
trigger8 = (P2Name = "KYO" || P4Name = "KYO" ) && enemy,authorname = "The KJ"
trigger9 = (P2Name = "Kyo Kusanagi" || P4Name = "Kyo Kusanagi" ) && enemy,authorname = "K.O.D."
trigger10 = (P2Name = "Kyo Kusanagi" || P4Name = "Kyo Kusanagi" ) && enemy,authorname = "David Demianoff"
trigger11 = (P2Name = "EX-Kyo" || P4Name = "EX-Kyo" ) && enemy,authorname = "jin"
trigger12 = (P2Name = "Kyo Kusanagi" || P4Name = "Kyo Kusanagi" )
var(59) = 1

; Winpose VS Yagami
[State -3, Wipose VS Yagami]
type = varset
trigger1 = (P2Name = "Another Iori" || P4Name = "Another Iori" ) && enemy,authorname = "--4LUC4RD H3L§!NG--"
trigger2 = (P2Name = "Iori yagami" || P4Name = "Iori yagami" ) && enemy,authorname = "Zelgadis"
trigger3 = (P2Name = "d-Yagami" || P4Name = "d-Yagami" ) && enemy,authorname = "jin"
trigger4 = (P2Name = "F-iori" || P4Name = "F-iori" ) && enemy,authorname = "·ç»¨"
trigger5 = (P2Name = "God_Iori" || P4Name = "God_Iori" ) && enemy,authorname = "Zelgadis"
trigger6 = (P2Name = "Iori Yagami" || P4Name = "Iori Yagami" ) && enemy,authorname = "Sander71113"
trigger7 = (P2Name = "Iori-98" || P4Name = "Iori-98" ) && enemy,authorname = "Zelgadis"
trigger8 = (P2Name = "Iori Yagami" || P4Name = "Iori Yagami" ) && enemy,authorname = "huolisi"
trigger9 = (P2Name = "Iori Yagami" || P4Name = "Iori Yagami" ) && enemy,authorname = "[Yagami+ihoo1836]"
trigger10 = (P2Name = "Iori_WLS" || P4Name = "Iori_WLS" ) && enemy,authorname = "Vans"
trigger11 = (P2Name = "Iori yagami" || P4Name = "Iori yagami" ) && enemy,authorname = "Zelgadis"
trigger12 = (P2Name = "iorinbc" || P4Name = "iorinbc" ) && enemy,authorname = "Beppu"
trigger13 = (P2Name = "Iori-type-M" || P4Name = "Iori-type-M" ) && enemy,authorname = "MIT"
trigger14 = (P2Name = "Iori Yagami" || P4Name = "Iori Yagami" ) && enemy,authorname = "Sander71113"
trigger15 = (P2Name = "ioriXI" || P4Name = "ioriXI" ) && enemy,authorname = "Beppu"
trigger16 = (P2Name = "Iori-XM" || P4Name = "Iori-XM" ) && enemy,authorname = "Zelgadis"
trigger17 = (P2Name = "Yazakani Iori" || P4Name = "Yazakani Iori" ) && enemy,authorname = "Kjha435y"
trigger18 = (P2Name = "iorinbc" || P4Name = "iorinbc" ) && enemy,authorname = "Beppu"
trigger19 = (P2Name = "Iori Yagami" || P4Name = "Iori Yagami" ) && enemy,authorname = "[Yagami+ihoo1836]"
trigger20 = (P2Name = "Yagami Iori" || P4Name = "Yagami Iori" ) && enemy,authorname = "E.S.S."
trigger21 = (P2Name = "Yagami-AKOF" || P4Name = "Yagami-AKOF" ) && enemy,authorname = "jin"
trigger22 = (P2Name = "Iori Yagami" || P4Name = "Iori Yagami" )
var(59) = 2


;---------------------------------------------------------------------------
; AI Section
;---------------------------------------------------------------------------

; Kamek and Luchini appear to have been the first ones to use the IsHomeTeam AI
; activation concept.
; Feel free to move this controller to your character's intro state for slightly
; better efficiency.
[State -3, SetAI]
type = VarSet
triggerall = Alive && !IsHelper
triggerall = IsHomeTeam
trigger1 = TeamSide = 2
trigger2 = MatchNo > 1
var(58) = 1

[State -3, AI Helper - Compatibly Partnered Version]
type = Helper
trigger1 = !var(58) && !IsHelper
trigger1 = !NumHelper(9742)
trigger1 = Alive && RoundState = 2
trigger1 = NumPartner
trigger1 = Partner,SelfAnimExist(9741)
HelperType = normal
name = "AI Helper (Simul Version)"
ID = 9742
pos = 9999999,99999
StateNo = 9742
KeyCtrl = 1
PauseMoveTime = 2147483647
SuperMoveTime = 2147483647

; If you want to use the Guard mode, Dummy mode, Distance, or Button jam dummy
; control options in Training mode without activating the dummy's AI while
; working on the character, then all you need to do is temporarily disable
; this controller.  Or, if you want to permanently disable this controller in
; Training mode, then you could use the Training mode detection code available
; from my site ( http://www.mugenguild.net/~winane/ ), and then just add a
; "(var(59)&63)>30" triggerall to this controller.
; Alternatively, you can just set "Dummy control" to "Manual", press a P2 button
; to kill the AI helper, and then set dummy control back to "Cooperative".  (In
; fact, setting dummy control to manual isn't even necessary, if you press the
; P2 button prior to the first time you pause.)
[State -3, AI Helper]
type = Helper
triggerall = !var(58) && !IsHelper
triggerall = !NumHelper(9741)
triggerall = Alive && RoundState = 2
trigger1 = !NumPartner
trigger2 = !(Partner,SelfAnimExist(9741))
HelperType = normal
name = "AI Helper"
ID = 9741
pos = 9999999,99999
StateNo = 9741
KeyCtrl = 1
PauseMoveTime = 2147483647
SuperMoveTime = 2147483647

[State -3, TurnBackOnAI]
type = VarSet
trigger1 = var(58) = -2 && !IsHelper
trigger1 = Alive && RoundState = 2
var(58) = 1

; This method works somewhat in Linux Mugen version 2002.04.14,
; whereas the old humanly-impossible commands method does not.
; It is very important that this controller NOT be moved to State -2.
; Note that this part won't work nearly as well if AI.Cheat is turned off
; in mugen.cfg.
[State -3, XOR]
type = VarSet
triggerall = var(58)!=1 && !IsHelper
triggerall = !var(56)
triggerall = var(57) = GameTime-1
trigger1 = command = "a" ^^ command = "a2"
trigger2 = command = "b" ^^ command = "b2"
trigger3 = command = "c" ^^ command = "c2"
trigger4 = command = "x" ^^ command = "x2"
trigger5 = command = "y" ^^ command = "y2"
trigger6 = command = "z" ^^ command = "z2"
trigger7 = command = "start" ^^ command = "start2"
trigger8 = command = "holda" ^^ command = "holda2"
trigger9 = command = "holdb" ^^ command = "holdb2"
trigger10 = command = "holdc" ^^ command = "holdc2"
trigger11 = command = "holdx" ^^ command = "holdx2"
trigger12 = command = "holdy" ^^ command = "holdy2"
trigger13 = command = "holdz" ^^ command = "holdz2"
trigger14 = command = "holdstart" ^^ command = "holdstart2"
trigger15 = command = "holdfwd" ^^ command = "holdfwd2"
trigger16 = command = "holdback" ^^ command = "holdback2"
trigger17 = command = "holdup" ^^ command = "holdup2"
trigger18 = command = "holddown" ^^ command = "holddown2"
trigger19 = command = "recovery" ^^ command = "recovery2"
;Add more as desired. (See my notes in the CMD.)
var(58) = 1

; These next two controllers must be placed here, after the above XOR
; VarSet controller and before the below GameTime VarSet controller.
[State -3, fiXOR]
type = VarAdd
trigger1 = var(56) > 0 && !IsHelper
var(56) = -1

[State -3, fuXOR]
type = VarSet
trigger1 = var(57) < GameTime-1 && !IsHelper
var(56) = 31
IgnoreHitPause = 1

; It is very important that this controller NOT be moved to State -2, as putting
; it there would defeat the entire purpose of the controller, allowing the
; helper method to erroneously set the AI variable.
; And within State -3, don't put any ChangeState controllers before this
; controller, lest you unnecessarily delay your character's AI activation.
[State -3, GameTimeVar]
type = VarSet
trigger1 = !IsHelper
var(57) = GameTime
IgnoreHitPause = 1

; Within StateDef -3, none of your own AI-related code should come after the code
; provided here (and putting it before the code is also generally a bad idea).
; It's better to use State -1 (or, in special circumstances, State -2) instead.

; And finally, for lack of a better place to put this until I get
; around to writing an actual tutorial to go with the code:
; Many thanks to Roque for extensive testing in Linux Mugen.
; Also thanks to [E] for some help.


