; _________________________________________
;| Pheromosa  by Vorse_Raidier                |
; ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
;==============================================================================================
;========================================<NORMAL MOVES>========================================
;==============================================================================================

;---------------------------------------------------------------------------
; Standing Light Punch%
[Statedef 200]
type    = S
physics = S
movetype= A
ctrl = 0
velset = 0,0
sprpriority = 1
poweradd = 0
facep2 = 1

[State 200, Anim]
type=changeanim
trigger1=!time
value=200

;ha
[State 40, Snd]
type = playsnd
trigger1 =  animelemtime(2) = 0
trigger1 = random <= 150
value = 12,4
channel = 1 

[State 0, Explod]
type = Explod
trigger1 = animelem = 2
anim = 300
ID = 300
pos = -25,-65
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 9999
removetime = -2
pausemovetime = 0
scale = 1,.5
sprpriority = 0
ontop = 1
ownpal = 0
removeongethit = 1

[State 200,Posset]
type=posset
trigger1=!time
y=0

;player grunt
[State 200, Snd]
type=playsnd
trigger1= !time && random<200
value= 4, ifElse(Random < 500, 0, 1)
channel=0

[State 200, Snd]
type=playsnd
trigger1= !time
value=0,0
channel=3

[State 200, Hit]
type = hitdef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = !Time
forcenofall = !var(20)
attr = S, NA
hitflag = MAF
guardflag = M
damage = ceil(ifelse(fvar(11) * 21 < 0, 0, fvar(11) * 21)), 0
getpower = floor(fvar(11) * 50),floor(fvar(11) * 25)
givepower = floor(fvar(11) * 36),floor(fvar(11) * 36)
pausetime = 6,7
guard.pausetime = 8,8
animtype = Light
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.hittime = 10 + 4 * var(9)
ground.slidetime = 12 + 4 * var(9)
guard.hittime = 10
air.hittime = 120
ground.velocity = -2, 0
ground.cornerpush.veloff = -3
guard.velocity = -2
guard.cornerpush.veloff = -2
air.velocity = -2.155, -3.68
air.cornerPush.velOff = 0
yAccel = 0.2
fall = 0
fall.recover = 1
fall.recovertime = 120
hitsound = s0,6
guardsound = s3,0
sparkno = -1 + 0 * (var(33) := 8010)
guard.sparkno = -1 + 0 * (var(34) := 8000)
sparkxy =-10 + 0 * (var(35) := 75), var(36) := -75
; const(size.mid.pos.x),const(size.head.pos.y)
; (var(35) := const(size.mid.pos.x)), var(36) := const(size.head.pos.y)
;-10 + 0 *
;sparkxy = -10 + 0 * (var(35) := 55), var(36) := -82

[State 200, Type]
type=statetypeset
trigger1= animelemtime(5)>=0
movetype=I

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



;--------------------------------------------------------------------------------------------------
; Standing Light Punch 2
[Statedef 201]
type    = S
physics = S
movetype= A
ctrl = 0
velset = 0,0
sprpriority = 1
poweradd = 0
facep2 = 1

[State 200, Anim]
type=changeanim
trigger1=!time
value=201


[State 0, Explod]
type = Explod
trigger1 = animelem = 1
anim = 301
ID = 301
pos = 10,-85
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 9999
removetime = -2
pausemovetime = 0
scale = .95,.5
sprpriority = 0
ontop = 1
ownpal = 0
removeongethit = 1


[State 0, VelSet]
type = VelSet
trigger1 = animelem =1
x = 5

[State 0, VelSet]
type = VelSet
trigger1 = animelem =3
x = 0


[State 200,Posset]
type=posset
trigger1=!time
y=0

[State 200, Snd]
type=playsnd
trigger1= !time && random<200
value= 4, ifElse(Random < 500, 0, 1)
channel=0

[State 200, Snd]
type=playsnd
trigger1= !time
value=0,1
channel=3

[State 200, Hit]
type = hitdef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = !Time
forcenofall = !var(20)
attr = S, NA
hitflag = MAF
guardflag = M
damage = ceil(ifelse(fvar(11) * 21 < 0, 0, fvar(11) * 21)), 0
getpower = floor(fvar(11) * 50),floor(fvar(11) * 25)
givepower = floor(fvar(11) * 36),floor(fvar(11) * 36)
pausetime = 15,15
guard.pausetime = 8,8
animtype = med
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.hittime = 8;18 + 2 * var(9)
ground.slidetime = 8;13 + 2 * var(9)
guard.hittime = 10
air.hittime = 120
ground.velocity = -2, 0
ground.cornerpush.veloff = -3
guard.velocity = -2
guard.cornerpush.veloff = -2
air.velocity = -2.155, -3.68
air.cornerPush.velOff = 0
yAccel = 0.2
fall = 0
fall.recover = 1
fall.recovertime = 120
hitsound = s0,5
guardsound = s3,1
sparkno = -1 + 0 * (var(33) := 8010)
guard.sparkno = -1 + 0 * (var(34) := 8000)
sparkxy =-10 + 0 * (var(35) := 75), var(36) := -75
; const(size.mid.pos.x),const(size.head.pos.y)
; (var(35) := const(size.mid.pos.x)), var(36) := const(size.head.pos.y)
;-10 + 0 *
;sparkxy = -10 + 0 * (var(35) := 55), var(36) := -82

[State 200, Type]
type=statetypeset
trigger1= animelemtime(3)>=0
movetype=I

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

;--------------------------------------------------------------------------------------------------
; Standing Light Punch 3
[Statedef 202]
type    = S
physics = S
movetype= A
ctrl = 0
velset = 2,0
sprpriority = 1
poweradd = 0
facep2 = 1


[State 0, Explod]
type = Explod
trigger1 = time = 2
anim = 332
ID = 332
pos = 10,-65
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 9999
removetime = -2
pausemovetime = 0
scale = .8,.8
sprpriority = 0
ontop = 1
ownpal = 0
removeongethit = 1

[State 200, Anim]
type=changeanim
trigger1=!time
value=202



[State 0, VelSet]
type = VelSet
trigger1 = movecontact
trigger1 = animelem =3
x = -4

[State 0, VelSet]
type = VelSet
trigger1 = animelemtime(4) >= 0
x =0

[State 200,Posset]
type=posset
trigger1=!time
y=0

[State 200, Snd]
type=playsnd
trigger1= !time && random<200
value= 4, ifElse(Random < 500, 0, 1)
channel=0

[State 200, Snd]
type=playsnd
trigger1= !time
value=0,3
channel=3

[State 200, Hit]
type = hitdef
trigger1 = !var(16) && (var(15) < 1 || var(20))
trigger1 = !Time
forcenofall = !var(20)
attr = S, NA
hitflag = MAF
guardflag = M
damage = ceil(ifelse(fvar(11) * 21 < 15, 15, fvar(11) * 21)), 0
getpower = floor(fvar(11) * 50),floor(fvar(11) * 25)
givepower = floor(fvar(11) * 36),floor(fvar(11) * 36)
pausetime = 15,15
guard.pausetime = 10,8
animtype = med
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.hittime = 25 + 2 * var(9)
ground.slidetime = 20 + 2 * var(9)
guard.hittime = 8
air.hittime = 120
ground.velocity = -6, 0
ground.cornerpush.veloff = -3
guard.velocity = -2
guard.cornerpush.veloff = -2
air.velocity = -2.155, -3.68
air.cornerPush.velOff = 0
yAccel = 0.2
fall = ifelse(var(13) >20,1,0)
fall.recover = 1
fall.recovertime = 120
hitsound = s0,6
guardsound = s3,1
sparkno = -1 + 0 * (var(33) := 8010)
guard.sparkno = -1 + 0 * (var(34) := 8000)
sparkxy =-10 + 0 * (var(35) := 75), var(36) := -75
; const(size.mid.pos.x),const(size.head.pos.y)
; (var(35) := const(size.mid.pos.x)), var(36) := const(size.head.pos.y)
;-10 + 0 *
;sparkxy = -10 + 0 * (var(35) := 55), var(36) := -82

[State 200, Type]
type=statetypeset
trigger1= animelemtime(3)>=0
movetype=I

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

;---------------------------------------------------------------------------
; Standing Med Punch%
[Statedef 210]
type    = S
physics = S
movetype= A
ctrl = 0
velset = 0,0
sprPriority = 1
powerAdd = 25
faceP2 = 1


[State 250, Snd]
type=playsnd
trigger1= animelem = 1 
value= 0,3
channel=0


[State 200,Posset]
type=posset
trigger1=!time
y=0


;Warning spark, attack no longer blockable
[State 0, Explod]
type = Explod
trigger1 =  var(12) = 30
anim = 8210
ID = 5555
pos = -55,-110
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 0
scale = .5,.5
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 0
removeongethit = 0

[State 0, HitOverride]
type = HitOverride
trigger1 = var(12) >= 30
attr = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
stateno = 212
ignorehitpause = 1





[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Anim != 210 && command = "hold_y"
value = 210


[State 0, ChangeState]
type = ChangeState
trigger1 = command != "hold_y"
value = ifelse(var(12) <= 30, 211,212)
persistent = 0


[State -1]
type = ChangeState
value = ifelse(var(12)<= 30,211,212)
triggerall = ailevel && numenemy 
triggerall = statetype != A
triggerall = stateno != [5000,5200]
triggerAll = (P2BodyDist x = [0,60]) && (P2Dist y = [-100,0]) 
triggerall = stateno = 210
trigger2 = !((P2StateType = S) && (P2MoveType != A) && (P2StateNo = [120,155])) && Random <= 10 * ifelse(var(12) > 30, 50,5)
trigger1   = p2movetype = A
trigger1   = Random > 600


; Standing slash light%
[Statedef 211]
type = S
physics = S
moveType = A
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 0
facep2 = 1


[State 0, Explod]
type = Explod
trigger1 = animelem = 1
anim = 211
ID = 211
pos = 40,-70
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = 1,1.75
sprpriority = 3
ontop = 1
ownpal = 1
removeongethit = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Anim != 215 
value = 215

[State 250, Hit]
type=hitdef
trigger1=  animelem =1
forcenofall = 0
attr = S,NA
hitflag = MAF
guardflag = H
damage = ceil(ifelse(fvar(11)*45<7, 7, fvar(11)*45))
getpower = ifelse(!var(13),floor(fvar(11) * 70),floor(fvar(11) * 72))*!var(20), floor(fvar(11) * 30)
givepower = ifelse(!var(13),floor(fvar(11) * 36),floor(fvar(11) * 72))*!var(20), floor(fvar(11) * 36)
pausetime = 10, 10
guard.pausetime = 10,8
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.hittime =  25 + 4*var(9)
ground.slidetime = 20 + 4*var(9)
guard.hittime = 20
air.hittime = 240
ground.velocity = -4, 0
ground.cornerPush.velOff = 0
guard.velocity = -4
guard.cornerPush.velOff = 0
air.velocity = -4, -1
air.cornerPush.velOff = 0
yaccel = 0.29
fall =0 ;ifElse(!var(53), 1, 0)
fall.recover = 1
fall.recovertime = 120
hitsound = -1 + 0*(var(31):=5)
guardsound = -1 + 0*(var(32):=0)
sparkno = -1 + 0*(var(33):=8012)
guard.sparkno = -1 + 0*(var(34):=8000)
sparkxy = -10 + 0*(var(35):=81), var(36):=-85
palfx.time = 12*var(9)
palfx.add = 255,255,255
palfx.sinadd= -255,-255,-255,48



[State 200, Type]
type=statetypeset
trigger1= animelemtime(3)>=0
movetype=I

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



; Standing slash hard
[Statedef 212]
type = S
physics = S
moveType = A
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 0
facep2 = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Anim != 215 
value = 215


[State 0, VelSet]
type = VelSet
trigger1 = p2dist x >= 60
trigger1 = animelem = 1
x = 10

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 2
x = 0
 

[State 0, Explod]
type = Explod
trigger1 = animelem = 1
anim = 212
ID = 212
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 9999
removetime = -2
scale = 1.25,1.5
sprpriority = 3
ontop = 1
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = NULL;Explod
trigger1 = animelem = 1
anim = 211
ID = 211
pos = 40,-70
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = 1,1.75
sprpriority = 3
ontop = 1
ownpal = 1
removeongethit = 1


[State 200,Posset]
type=posset
trigger1=!time
y=0

[State 1251,08]
type = NotHitBy
trigger1 = Anim = 215
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 1
 

[State 250, Snd]
type=playsnd
trigger1= animelem=3 && random<500
value= 4, ifelse(random<500, 1, 2)
channel=0

[State 250, Snd]
type=playsnd
trigger1= animelem=3
value=1,5
channel=1


;!var(16) &&
[State 250, Hit]
type=hitdef 
trigger1= !time
attr = S,NA
hitflag = MAFD
guardflag = HA
damage = floor(80 + var(12))
getpower = 50,0
givepower = 10,0
pausetime = 10,20
guard.pausetime = 18 , 20
animtype = Hard
air.animtype = diagup
fall.animtype = Back
ground.type = High
air.type = high
ground.hittime = 40
ground.slidetime = 18 + 4*var(9)
guard.hittime = 30
air.hittime = 450
ground.velocity = 0
ground.cornerPush.velOff = -5
guard.cornerPush.velOff =-7.5
air.velocity = 0, -5
air.cornerPush.velOff = -7.5
yaccel = 0.29
fall = 0
fall.recover = 1
fall.recovertime = 240
hitsound = -1 + 0*(var(31):=5)
guardsound = -1 + 0*(var(32):=0)
sparkno = -1 + 0*(var(33):=8012)
guard.sparkno = -1 + 0*(var(34):=8000)
sparkxy = -10 + 0*(var(35):=81), var(36):=-85
palfx.time = 12*var(9)
palfx.add = 255,255,255
palfx.sinadd= -255,-255,-255,48
forcestand = 1
air.fall = 1


[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = unguardable

[State 0, VarAdd]
type = Varset
trigger1 = animelemtime(2)>=0
v = 12
value = 0

[State 200, Type]
type=statetypeset
trigger1= animelemtime(2)>=0
movetype=I

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


;---------------------------------------------------------------------------
; Bug Buzz
[Statedef 220]
type = S
physics = S
moveType = A
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 20
facep2 = 1

[State 220, Anim]
type=changeanim
trigger1=!time
value=220

[State 220,Posset]
type=posset
trigger1=!time
y=0



[State 220, Snd]
type=playsnd
trigger1= animelem=2
value=20,3
channel=1



;ƒGƒtƒFƒNƒgB
[state ]
type=explod
trigger1=animelemtime(3)=5
id=0
anim=10110
;trans=addalpha
;alpha=256,256
facing=-1
vfacing=1
scale=0.25,0.25
shadow=0,0,0
sprpriority=90
ontop=0
ownpal=1
supermove=0
pausemovetime=0
supermovetime=0
removetime=-2
removeongethit=0
pos=20,-100
postype=p1
random=0,0
bindtime=1
vel=4.8,0
accel=0,0
ignorehitpause=0

;ƒGƒtƒFƒNƒgB
[state ]
type=explod
trigger1=animelemtime(4)=[0,59]
trigger1=animelemtime(4)%5=0
id=0
anim=10110
;trans=addalpha
;alpha=256,256
facing=-1
vfacing=1
scale=0.25,0.25
shadow=0,0,0
sprpriority=90
ontop=0
ownpal=1
supermove=0
pausemovetime=0
supermovetime=0
removetime=-2
removeongethit=0
pos=20,-100
postype=p1
random=0,0
bindtime=1
vel=4.8,0
accel=0,0
ignorehitpause=0

[State 600, Hit]
type=hitdef
trigger1= !var(16) && (Var(44) = [0,3])
trigger1= animelemtime(4)%5=0
forcenofall = 0
attr = S,NA
hitflag = MAF
guardflag = HA
damage = ceil(ifelse(fvar(11)*15<7, 7, fvar(11)*15)), 0
getpower = ifelse(!var(13),floor(fvar(11) * 70),floor(fvar(11) * 62)), floor(fvar(11) * 50)
givepower =floor(fvar(11) * 36) , floor(fvar(11) * 36)
pausetime = 5,6
;ifelse(var(20), 4, 8), ifelse(var(20), 4, 8)
guard.pausetime = 4,4
animtype = Light
air.animtype = back
fall.animtype = Back
ground.type = High
air.type = Low
ground.hittime = 12 + 2*var(9)
ground.slidetime = 12 + 2*var(9)
guard.hittime = 12
air.hittime = 250
airguard.ctrltime = 25
ground.velocity = -2, 0
ground.cornerPush.velOff = 0
guard.velocity = -5
guard.cornerPush.velOff = 0
air.velocity = -.5,-2.5
air.cornerPush.velOff = 0
airguard.velocity = -2.5, 0
airguard.cornerPush.velOff = 0
yAccel = 0.333
fall = 0
fall.recover = 1
fall.recoverTime = 200
hitsound =s0,8
guardsound = s0,10
sparkno = s1
guard.sparkno = s1
sparkxy = -10 + 0*(var(35):=100), var(36):=-110
palfx.time = 12*var(9)
palfx.add = 255,255,255
palfx.sinadd= -255,-255,-255,48

[State 600, Hit]
type=hitdef
triggerall= !var(16) 
trigger1= animelem = 5 || !(Var(44) = [0,3])
forcenofall = 0
attr = S,NA
hitflag = MAF
guardflag = HA
damage = ceil(ifelse(fvar(11)*50<20, 20, fvar(11)*50)), 0
getpower = ifelse(!var(13),floor(fvar(11) * 70),floor(fvar(11) * 62)), floor(fvar(11) * 50)
givepower =floor(fvar(11) * 36) , floor(fvar(11) * 36)
pausetime = 5,5
;ifelse(var(20), 4, 8), ifelse(var(20), 4, 8)
guard.pausetime = 8,2
animtype = Light
air.animtype = back
fall.animtype = Back
ground.type = High
air.type = Low
ground.hittime = 24 + 8*var(9)
ground.slidetime = 24 + 8*var(9)
guard.hittime = 12
air.hittime = 250
airguard.ctrltime = 25
ground.velocity = -15,-4.5
ground.cornerPush.velOff = 0
guard.velocity = -7
guard.cornerPush.velOff = 0
air.velocity = -15,-4.5
air.cornerPush.velOff = 0
airguard.velocity = -8, -2
airguard.cornerPush.velOff = 0
yAccel = 0.33
fall = 1
air.fall = 1
fall.recover = 0
hitsound =s0,7
guardsound = s0,10
sparkno = s1
guard.sparkno = s1
sparkxy = -10 + 0*(var(35):=100), var(36):=-110
palfx.time = 12*var(9)
palfx.add = 255,255,255
palfx.sinadd= -255,-255,-255,48
id = 270
nochainid = 270


[State 0, VarAdd]
type = VarAdd
trigger1 = movehit = 1
v =    44
value = 1

[State -1, Luxirous High kick]
type = ChangeState
value = 100
triggerall = animelem >= 5
trigger1 = command = "QCF"



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


;---------------------------------------------------------------------------
; Standing Light Kick%
[Statedef 230]
type    = S
physics = S
moveType = A
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 0
facep2 = 1


[State 230, Anim]
type=changeanim
trigger1=!time
value=230

[State -1]
Type = VelSet
Trigger1 = prevstateno = 200
Trigger1 = animelem <= 5 
x = 2.5


[State 230,Posset]
type=posset
trigger1=!time
y=0

[State 230, Snd]
type=playsnd
trigger1= !time && random<500
value= 4, ifelse(random<500, 0, 1)
channel=0

[State 230, Snd]
type=playsnd
trigger1= !time
value=0,2
channel=3

[State 230, Hit]
type=hitdef
;trigger1= !var(16) && (var(15)<1 || var(20))
trigger1= !Time
forcenofall = 1;!var(20)
attr = S,NA
hitflag = MAF
guardflag = M
damage = ceil(ifelse(fvar(11)*10<5, 5, fvar(11)*10)), 0
getpower = 1;floor(fvar(11) * 72),floor(fvar(11) * 36)
givepower = 10,10
pausetime =  9,  9
guard.pausetime = 9, 9
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.hittime = 18 + 2*var(9)
ground.slidetime = 15 + 2*var(9)
guard.hittime = 12
air.hittime = 120
ground.velocity = -2.25, 0
ground.cornerPush.velOff = 0
guard.velocity = -2.25
guard.cornerPush.velOff = -8
air.velocity = -3.23, -2.625
air.cornerPush.velOff = 0
yAccel = 0.29
fall = 0
fall.recover = 1
fall.recovertime = 120
hitsound = s0,6
guardsound = s0,10
sparkno = -1 + 0*(var(33):=8010)
guard.sparkno = -1 + 0*(var(34):=8000)
sparkxy = -10 + 0*(var(35):=61), var(36):=-20
palfx.time = 12*var(9)
palfx.add = 255,255,255
palfx.sinadd= -255,-255,-255,48

[State 200, Type]
type=statetypeset
trigger1= animelemtime(4)>=0
movetype=I

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


;---------------------------------------------------------------------------
; Standing Medium Kick
[Statedef 235]
type    = S
physics = S
moveType = A
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 15
faceP2 = 1

[State 240, Anim]
type=changeanim
trigger1=!time
value=235

[State 240,Posset]
type=posset
trigger1=!time
y=0

[State 0, Explod]
type = Explod
trigger1 = animelem = 2
anim = 335
ID = 335
pos = 0,-65
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 9999
removetime = -2
pausemovetime = 0
scale = 1.10,.50
sprpriority = 0
ontop = 1
ownpal = 0
removeongethit = 1



[State 240, Snd]
type=playsnd
trigger1= animelem=3 && random<350
value= 4, ifelse(random<500, 1, 2)
channel=0



[State 240, Hit]
type=hitdef
trigger1= !Time
forcenofall = !var(20)
attr = S,NA
hitflag = MAF
guardflag = ma
damage = ceil(ifelse(fvar(11)*20<10, 7, fvar(11)*20)), 0
getpower = ifelse(!var(13),144,72), 36
givepower = 36, 36
pausetime = ifelse(var(20), 5, 10), ifelse(var(20), 5, 10)
guard.pausetime = ifelse(var(20), 5, 10), ifelse(var(20), 5, 10)
animtype = hard
air.animtype = Back
fall.animtype = Back
ground.type = low
air.type = Low
ground.hittime = 15 + 3*var(9)
ground.slidetime = 25 + 3*var(9)
guard.hittime = 8
air.hittime = 240
ground.velocity = -2, 0
ground.cornerPush.velOff = -7.5
guard.velocity = -5
guard.cornerPush.velOff = 0
air.velocity = -17.5,0
air.cornerPush.velOff = -7.5
yAccel = 0.29
fall = 0
air.fall = 1
fall.recover = 1
fall.recovertime = 120
hitsound = s0,6
guardsound = s0,10
sparkno = -1 + 0*(var(33):=8011)
guard.sparkno = -1 + 0*(var(34):=8000)
sparkxy = -10 + 0*(var(35):=120), var(36):=-80
palfx.time = 12*var(9)
palfx.add = 255,255,255
palfx.sinadd= -255,-255,-255,48

[State 200, Type]
type=statetypeset
trigger1= animelemtime(6)>=0
movetype=I

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













; Standing Medium Kick combo 1%
[Statedef 241]
type    = S
physics = S
moveType = A
ctrl = 0
velSet = 2,0
sprPriority = 1
powerAdd = 0
faceP2 = 1

[State 240, Anim]
type=changeanim
trigger1=!time
value=241

[State 240,Posset]
type=posset
trigger1=animelem <=3
y=0

 

[State 0, VelSet]
type = VelSet
trigger1 = prevstateno =[400,403]
x = 4




[State 240, Snd]
type=playsnd
trigger1= animelem=3 && random<350
value= 4, ifelse(random<500, 1, 2)
channel=0

[State 240, Snd]
type=playsnd
trigger1= animelem=3
value=1,4
channel=1
;!var(16) &&
[State 240, Hit]
type=hitdef
;trigger1=  (var(15)<1 || var(20))
trigger1= !Time
forcenofall = !var(20)
attr = S,NA
hitflag = MAF
guardflag = M
damage = ceil( fvar(11)*28), 0
getpower = floor(fvar(11) * 72), floor(fvar(11) * 50)
givepower = floor(fvar(11) * 36),floor(fvar(11) * 36)
pausetime = 10, 10
guard.pausetime = 10,5 
animtype = Med
air.animtype = Back
fall.animtype = Back
ground.type = low
air.type = Low
ground.hittime = 15 + 3*var(9)
ground.slidetime = 15 + 3*var(9)
guard.hittime = 15
air.hittime = 120
ground.velocity = -3.75, 0
ground.cornerPush.velOff = -5
guard.velocity = -3.75
guard.cornerPush.velOff = 0
air.velocity = -3.23, -2.625
air.cornerPush.velOff = 0
yAccel = 0.29
fall = ifelse(Var(13)>= 15,1,0)
fall.recover = 1
fall.recovertime = 120
hitsound = -1 + 0*(var(31):=4)
guardsound = -1 + 0*(var(32):=0)
sparkno = -1 + 0*(var(33):=8011)
guard.sparkno = -1 + 0*(var(34):=8000)
sparkxy = -10 + 0*(var(35):=85), var(36):=-68
palfx.time = 12*var(9)
palfx.add = 255,255,255
palfx.sinadd= -255,-255,-255,48




[State 240, link to gale2]
type = ChangeState
triggerall = !Ailevel
triggerall = animelem >= 6 || movecontact
;trigger1 = command = "b" && (animelemtime(7)>=2 || movehit)
trigger1 = command = "b" 
trigger2 = var(20) && movecontact
value = 242  
ctrl = 0



[State 240, link to gale2]
type = ChangeState
triggerall = !Ailevel
triggerall = animelem >= 6 || movecontact
;trigger1 = command = "b" && (animelemtime(7)>=2 || movehit)
trigger1 = command = "a" 
trigger2 = var(20) && movecontact
value = 244  
ctrl = 0




[State 240, link to gale2]
type = ChangeState
triggerall = Ailevel
triggerall = animelem >= 6 || movecontact
;trigger1 = command = "b" && (animelemtime(7)>=2 || movehit)
trigger1 = Movehit  ;&& Random < (250 *ifelse(moveguarded, .5,2) * (AILevel ** 2 / 64.0))
value = 242  
ctrl = 0



[State 240, link to gale2]
type = ChangeState
triggerall = Ailevel
triggerall = animelem >= 6 || movecontact
triggerAll = (P2BodyDist x = [0,140]) && P2StateType != A
trigger1 = Moveguarded  && Random < (250 *ifelse(moveguarded, 2,.5) * (AILevel ** 2 / 64.0))
value = 244  
ctrl = 0














[State 200, Type]
type=statetypeset
trigger1= animelemtime(7)>=0
movetype=I

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



; Standing Medium Kick 2%
[Statedef 242]
type    = S
physics = S
moveType = A
ctrl = 0
velSet = 4,0
sprPriority = 1
powerAdd = 0
faceP2 = 1

[State 240, Anim]
type=changeanim
trigger1=!time
value=242


[State 240,Posset]
type=posset
trigger1=!time
y=0

[State 240, Snd]
type=playsnd
trigger1= animelem=3 && random<350
value= 4, ifelse(random<500, 1, 2)
channel=0

[State 240, Snd]
type=playsnd
trigger1= animelem=3
value=1,4
channel=1

[State 240, Hit]
type=hitdef
trigger1= (var(15)<1 || var(20))
;!var(16) && 
trigger1= !Time
forcenofall = !var(20)
attr = S,NA
hitflag = MAF
guardflag = M
damage = ceil(ifelse(fvar(11)*33<7, 7, fvar(11)*33)), 0
getpower = ifelse(!var(13),floor(fvar(11) * 120),floor(fvar(11) * 72))*!var(20), floor(fvar(11) * 36)
givepower = 20, 20
pausetime = 10, 10
guard.pausetime =  10, 10
animtype = Med
air.animtype = Back
fall.animtype = Back
ground.type = low
air.type = Low
ground.hittime = 22 + 3*var(9)
ground.slidetime = 22 + 3*var(9)
guard.hittime = 15
air.hittime = 120
ground.velocity = -3.75, 0
ground.cornerPush.velOff = 0
guard.velocity = -3.75
guard.cornerPush.velOff = 0
air.velocity = -3.23, -2.625
air.cornerPush.velOff = 0
yAccel = 0.29
fall = 0
fall.recover = 1
fall.recovertime = 120
hitsound = s0,2
guardsound = s0,10
sparkno = -1 + 0*(var(33):=8011)
guard.sparkno = -1 + 0*(var(34):=8000)
sparkxy = -10 + 0*(var(35):=85), var(36):=-58
palfx.time = 12*var(9)
palfx.add = 255,255,255
palfx.sinadd= -255,-255,-255,48

[State 200, Type]
type=statetypeset
trigger1= animelemtime(6)>=0
movetype=I


[State 240, link to gale2]
type = ChangeState
triggerall = !Ailevel
triggerall = (animelemtime(7)>=0)  || movecontact
;trigger1 = command = "b" && (animelemtime(7)>=2 || movehit)
trigger1 =  command = "c" && command = "down" 
value = 450
ctrl = 0




[State 240, link to gale2]
type = ChangeState
triggerall = Ailevel
triggerall = (animelemtime(7)>=0)  || movecontact
trigger1 = Movecontact ; && Random < (250 * (AILevel ** 2 / 64.0))
value =ifelse(Random < (250 * (AILevel ** 2 / 64.0)),243, 250 ) 
ctrl = 0





[State 240, link to gale2]
type = ChangeState
triggerall = !Ailevel
triggerall = (animelemtime(7)>=0)  || movecontact
;trigger1 = command = "b" && (animelemtime(7)>=2 || movehit)
trigger1 =  command = "c" && !command = "down" 
value = 250
ctrl = 0



[State 240, link to gale2]
type = ChangeState
triggerall = !Ailevel
triggerall = animelem >= 6 || movecontact
;trigger1 = command = "b" && (animelemtime(7)>=2 || movehit)
trigger1 = command = "b" && command != "holdback" 
value = 243  
ctrl = 0


[State 240, link to gale2]
type = ChangeState
triggerall = !Ailevel
triggerall = animelem >= 6 || movecontact
;trigger1 = command = "b" && (animelemtime(7)>=2 || movehit)
trigger1 = command = "b" && command = "holdback" 
value = 240 
ctrl = 0







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



; Standing Medium Kick 3%
[Statedef 243]
type    = S
physics = S
moveType = A
ctrl = 0
velSet = 1.5,0
sprPriority = 1
powerAdd = 20
faceP2 = 1



[State 0, VelSet]
type = Velset
trigger1 = animelemtime(4) >= 0
x = 12.5
y = 0

[State 0, PlayerPush]
type = PlayerPush
trigger1 = movehit
value = 0



[State 240, Anim]
type=changeanim
trigger1=!time
value=243

[State 240,Posset]
type=posset
trigger1=!time
y=0

[State 240, Snd]
type=playsnd
trigger1= animelem=3 && random<350
value= 4, ifelse(random<500, 1, 2)
channel=0




[State 240, Snd]
type=playsnd
trigger1= animelem=3
value=1,4
channel=1

[State 240, Hit]
type=hitdef
trigger1= (var(15)<4)
;!var(16) &&
trigger1= !Time
forcenofall = !var(20)

attr = S,NA
hitflag = MAF
guardflag = M
damage = ceil(ifelse(fvar(11)*55<7, 7, fvar(11)*55)), 0
getpower = ifelse(!var(13),floor(fvar(11) * 150),floor(fvar(11) * 72))*!var(20), floor(fvar(11) * 50)
givepower = 36, 36
pausetime = 10, 10
guard.pausetime = 10, 10
animtype = Med
air.animtype = Back
fall.animtype = Back
ground.type = low
air.type = Low
ground.hittime = 21 + 3*var(9)
ground.slidetime = 15 + 3*var(9)
guard.hittime = 15
air.hittime = 240
ground.velocity = -3.5, 0
ground.cornerPush.velOff = 0
guard.velocity = -3.5
guard.cornerPush.velOff = 0
air.velocity = -3.23, -2.625
air.cornerPush.velOff = 0
yAccel = 0.29
fall = 1
fall.recover = 1
fall.recovertime = 120
hitsound = -1 + 0*(var(31):=4)
guardsound = -1 + 0*(var(32):=0)
sparkno = -1 + 0*(var(33):=8011)
guard.sparkno = -1 + 0*(var(34):=8000)
sparkxy = -10 + 0*(var(35):=85), var(36):=-58
palfx.time = 12*var(9)
palfx.add = 255,255,255
palfx.sinadd= -255,-255,-255,48

;[State 200, Type]
;type=statetypeset
;trigger1= animelemtime(6)>=0
;movetype=I

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


;---------------------------------------------------------------------------
; Standing Strong Kick%
[Statedef 250]
type = S
physics = S
moveType = A
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 20
faceP2 = 1

[State 250, Anim]
type=changeanim
trigger1=!time
value=ifelse(var(15),260,250)


[State 250,Posset]
type=posset
trigger1=!time
y=0

[State 250, Snd]
type=playsnd
trigger1 = !numexplod(12531)
trigger1= animelem=3 && random<500
value= 12, ifelse(random<500, 1, 2)
channel=0

[State PlaySnd]
type = PlaySnd
trigger1 = Animelem = 3
trigger1 = numexplod(12531)
value = s13,1+random%2
channel = 0


[State 0, Explod]
type = Explod
trigger1 = command = "hold_z" || command = "z"
trigger1 = numexplod(260) = 0
anim = 1
ID = 260
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 9999
pausemovetime = 0
scale = 1,1
sprpriority = 5
removeongethit = 1



[State 250, Snd]
type=playsnd
trigger1= animelem=2
value=0,3
channel=3

[State 0, Offset]
type = Offset
trigger1 = Animelem = 4,>=0
x = 1-random%2

[State 0, ChangeState]
type = ChangeState
TrIggerall=!ailevel
Trigger1 = Animelem = 4,>=0 && Animelem = 5,<0
Trigger1 = command != "hold_b"
value = 251
ctrl = 0

[State 0, ChangeState]
type = ChangeState
TrIgger1=!ailevel
Trigger1 = Animelem = 5,>=0
Trigger1 = command != "hold_b"
Trigger2 = Time >= 100
value =cond(numexplod(260),260,cond(!numexplod(12531),252, cond(numexplod(12531) && power >= 1000,2261,260)))
ctrl = 0

[State PlaySnd]
type = PlaySnd
trigger1 = Animelem = 1
trigger1 = numexplod(12531)
value = s1,30
channel = 4

[State 1050, ExFX]
type = varset
trigger1 = !time
trigger1 = numexplod(12531)
var(25) = 44



[State 0, ChangeState]
type = ChangeState
Triggerall = !numexplod(12531)
Triggerall = ailevel && numenemy
Triggerall = Animelem = 5,>=0
Triggerall = time >= 15 || anim = 260
Trigger1 = Time >= 100 || p2dist y >-100
value = ifelse(enemynear,statetype != a ,260,252)
ctrl = 0

[State 0, ChangeState]
type = ChangeState
Triggerall = numexplod(12531)
TrIggerall = ailevel && numenemy
Triggerall = Animelem = 5,>=0
Triggerall = time >= 15 || anim = 260
Trigger1 = Time >= 100 || p2dist y >-100
value = ifelse(enemynear,statetype != a && power >= 1000,2261,260)
ctrl = 0



[State 0, ChangeState]
type = ChangeState
TrIggerall= ailevel && numenemy
Triggerall = Animelem = 4,>=0 && Animelem = 5,<0
Trigger1 = 0
value = 251
ctrl = 0

; Standing alt Strong Kick
[Statedef 251]
type = S
physics = S
moveType = A
ctrl = 0
velSet = 0,0
sprPriority = 1
faceP2 = 1

[State 250, Anim]
type=changeanim
trigger1=!time
value=251

[State 250,Posset]
type=posset
trigger1=!time
y=0

[State 250, Snd]
type=playsnd
trigger1= animelem=3 && random<500
value= 4, ifelse(random<500, 1, 2)
channel=0

[State 0, VelAdd]
type = Velset
trigger1 = animelem <= 5
x = 3

[State 0, VelAdd]
type = Velset
trigger1 = animelem = 6
x = 0

[State 250, Hit]
type=hitdef
trigger1= var(15)<8
trigger1=  animelem <=3
trigger2= var(15)<10
trigger2= animelem >=4
attr = S,NA
hitflag = MAF
guardflag = H
damage = ceil(ifelse(fvar(11)*30<7, 7, fvar(11)*30))
getpower = ifelse(!var(13),floor(fvar(11) * 70),floor(fvar(11) * 72))*!var(20), floor(fvar(11) * 30)
givepower = ifelse(!var(13),floor(fvar(11) * 36),floor(fvar(11) * 72))*!var(20), floor(fvar(11) * 36)
pausetime = 14, 12
guard.pausetime = 14,12
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.hittime = 20+ 8*var(9)
ground.slidetime = 16 + 8*var(9)
guard.hittime = 20
air.hittime = 240
ground.velocity = -4, 0
ground.cornerPush.velOff = 0
guard.velocity = -4
guard.cornerPush.velOff = 0
air.velocity = -3.23, -5.125 
air.cornerPush.velOff = 0
yaccel = 0.29
fall =0 ;ifElse(!var(53), 1, 0)
fall.recover = 1
air.fall =1
fall.recovertime = 220
hitsound = s0,7
guardsound = s0,10
sparkno = -1 + 0*(var(33):=8012)
guard.sparkno = -1 + 0*(var(34):=8000)
sparkxy = -10 + 0*(var(35):=81), var(36):=-85
palfx.time = 12*var(9)
palfx.add = 255,255,255
palfx.sinadd= -255,-255,-255,48


[State 200, Type]
type=statetypeset
trigger1= animelemtime(6)>=0
movetype=I


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

;Overpoering kick attempt
[Statedef 252]
type     = S
movetype = A
physics  = S
juggle   = 15
poweradd = 20
ctrl     = 0
anim     = 252
sprpriority = 2
facep2 = 1

[State 0, AfterImageTime]
type = AfterImageTime
trigger1 = Animelem = 1
time = 14

[State 挥腿]
type = Helper
trigger1 = AnimElem = 1
name = "slash 256"
stateno = 256
pos = 0,-50
postype = p1
ownpal = 1



[State -2]
Type = Explod
Trigger1 = AnimElem = 4
anim = 8005
sprpriority = 5
posType = p1
pos = 77,7
bindTime = 1
ownpal = 1
scale = 0.7,0.7
facing = -1



[state -2]
type = HitDef
Trigger1 = !MoveContact
animtype = Hard
attr = S,NA
hitflag = MAF
damage = 25,0
guardflag = H
getpower = 0,0
pausetime = 0,0
guard.pausetime = 0,0
sparkno = -1
guard.sparkno = -1
sparkxy = -10,-55
hitsound = -1
guardsound = s100,9
ground.type = High
ground.slidetime = 12
ground.hittime  = 12
ground.velocity = -3
ground.cornerpush.veloff = 0
air.velocity = -3,-10.5
airguard.velocity = -3,-5
guard.velocity = -10
fall.recover = 0
p2facing = 1
p1stateno = 253
P2StateNo = 249
kill=0

[State 切割]
type = Helper
trigger1 = MoveContact = 1
name = "切割(大)"
id = ifelse((movehit),8012,8001)
stateno = ifelse((movehit),8012,8001)
postype = p1
pos = floor(p2dist x),-90
ownpal = 1
ignorehitpause = 1
persistent = 0

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



;overpowered kick
[Statedef 253]
type     = S
movetype = A
physics  = S
juggle   = 0
poweradd = 50
ctrl     = 0
anim     = 253
sprpriority = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 6
value = S12,random%2
channel = 6

[State 0, AfterImageTime]
type = AfterImageTime
trigger1 = Animelem = 1
time = 18

[State 0, Turn]
type = Turn
trigger1 = Animelem = 7

[State 0, Explod]
type = Explod
trigger1 = Numexplod(12531) = 0
trigger1 = animelem = 2
anim = 1
ID = 12531
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = 9999
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 1

[State 0, Explod]
type = Explod
trigger1 = Numexplod(12531) 
trigger1 = Numexplod(12532) = 0
trigger1 = animelem = 1
anim = 1
ID = 12532
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = 9999
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 1


[State 0, TargetState]
type = TargetState
triggerall = NumTarget;()
trigger1 = Animelem = 1
value = 249
ID = -1

[State 0, TargetBind]
type = TargetBind
trigger1 = Animelem = 1,>=0 && Animelem = 6,<0
id = -1
pos = floor(floor(ceil(100*cos(1.5*pi*time/20.0)))), floor(floor(ceil((60*sin(1.5*pi*time/20.0))-69)))

[State 0, TargetLifeAdd]
type = TargetLifeAdd
triggerall = NumTarget;()
trigger1 = Animelem = 1,>=0 && Animelem = 6,<0
trigger1 = time%2 = 0
value = -4
ID = -1
kill = 0
absolute = 0

[State 0, HitAdd]
type = HitAdd
triggerall = NumTarget;()
trigger1 = Animelem = 1,>=0 && Animelem = 6,<0
trigger1 = time%2 = 0
value = 1

[State 0, PlaySnd]
type = PlaySnd
triggerall = NumTarget;()
trigger1 = Animelem = 1,>=0 && Animelem = 6,<0
trigger1 = time%2 = 0
value = S0,4
pan = floor(p2dist x)
volumescale = 80

[State 切割]
type = Helper
triggerall = NumTarget;()
trigger1 = Animelem = 1,>=0 && Animelem = 6,<0
trigger1 = time%2 = 1
name = "strong hit spark"
stateno = 8012
postype = p2
pos = 0,20-random%10
ownpal = 1
[State 切割]
type = Helper
triggerall = NumTarget;()
trigger1 = Animelem = 6
name = "special hit spark"
stateno = 8014
postype = p1
pos = -63,-40
ownpal = 1



;---------------------------------------------------------------------------
[State 特效来着]
type = Helper
trigger1 = Animelem = 8
name = "高抬腿"
stateno = 258
postype = p1
pos = 0,0
ownpal = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 7
value = S100,26

[State 0, TargetState]
type = TargetState
triggerall = NumTarget;()
trigger1 = Animelem = 8
value = 4120
ID = -1
[State -2]
type = HitDef
Trigger1 = !MoveContact
animtype = Hard
attr = ,NA
damage = 50,0
pausetime = 10,4
getpower = 30,30
givepower = 20,20
hitflag = MAF
sparkno = -1
guard.dist = 100
guard.sparkno = -1
sparkxy = -15,-90
hitsound = -1
guardsound = s100,9
ground.type = Low
ground.slidetime = 23
ground.hittime  = 23
ground.velocity = -2,-6
ground.cornerpush.veloff = -10
air.velocity = -2,-6
fall = 1
fall.recover = 0
p2facing = 1
P2StateNo = 1665
yaccel = 0.5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = MoveHit = 1
value = S100,39
pan = p2dist x
ignorehitpause = 1
persistent = 0
[State 0, PlaySnd]
type = PlaySnd
trigger1 = MoveHit = 1
value = S100,20
pan = p2dist x
ignorehitpause = 1
persistent = 0

[State 0, EnvShake]
type = EnvShake
trigger1 = MoveContact = 1
time = 24
ampl = 12
ignorehitpause = 1
persistent = 0

[State 打击]
type = Helper
trigger1 = MoveContact = 1
name = "打击(前超大)"
id = ifelse((movehit),8012,8001)
stateno = ifelse((movehit),8012,8001)
postype = p1
pos = floor(p2dist x),-90
ownpal = 1
supermovetime = 2147483647
pausemovetime = 2147483647
ignorehitpause = 1
persistent = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = Animelem = 10
x = 5
[State 0, PosAdd]
type = PosAdd
trigger1 = Animelem = 11
x = 15
[State 0, PosAdd]
type = PosAdd
trigger1 = Animelem = 12
x = 16

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

;kick slash fx
[Statedef 256]
type    = U                      
movetype= A                     
physics = N                     
velset = 0,0                
ctrl = 0                       
anim = 259             
poweradd = 0                    
sprpriority = 20                  

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time <= 4
value = 259
elem = 1

[State 0, BindToRoot]
type = BindToRoot
trigger1 = Root,StateNo = 252
facing = 0
pos = 50,-50

[State 601, draw]
type = AngleDraw
trigger1 = Root,StateNo = 252
scale = 1.25,1.5
value = -15

[State -2]
type = AfterImage
Trigger1 = AnimElem = 1
time = -1
trans = add
timegap = 1
framegap = 1
length = 11
palbright = 2,2,2
palcontrast = 60,60,60
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 0.9,0.9,0.9
ignorehitpause = 1

[State trans]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256,256

[State 0, ChangeState]
type = ChangeState
trigger1 = Root,StateNo = 253
value = 257

[State 200, 结束]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = root,stateno != [252,253]


[Statedef 257]
type    = U                      
movetype= A                      
physics = N                      
velset = 0,0                 
ctrl = 0                        
;anim = 259             
poweradd = 0                    
sprpriority = 20                  

[State 0, BindToRoot]
type = BindToRoot
trigger1 = Root,StateNo = 253
facing = 0
pos = 15-5*time,-50-5*time

[State 257, draw]
type = AngleDraw
trigger1 = Root,StateNo = 253
scale = 1,1.25
value = -15-15*time

[State 257, after]
type = AfterImage
Trigger1 = AnimElem = 1
time = -1
trans = add
timegap = 1
framegap = 1
length = 11
palbright = 2,2,2
palcontrast = 60,60,60
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 0.9,0.9,0.9
ignorehitpause = 1

[State 257, trans]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256,256

[State 200, gone]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = root,stateno != 253

;---------------------------------------------------------------------------------
[Statedef 258]
type    = U                      ;状态: S-站立, C-蹲, A-空中, L-倒地
movetype= A                      ;招式种类: A-攻击, I-非攻击, H-受击
physics = N                      ;物理: S-站立, C-蹲, A-空中
velset = 0,0                 ;设定速度 (x,y) (不写这行则不改变速度)
ctrl = 0                         ;设定可控与否 (不写这行则不改变ctrl)
anim = 7084             ;改变动作 (不写这行则不改变anim)
poweradd = 0                    ;增加气 (不写这行则不增加气)
sprpriority = 20                  ;设定p1的贴图优先度到2 (在前面)

[State 0, BindToRoot]
type = BindToRoot
trigger1 = root,stateno = 253
facing = 0
pos = 83,-94

[State -2]
type = AfterImage
Trigger1 = AnimElem = 1
time = -1
trans = add
timegap = 1
framegap = 1
length = 11
palbright = 2,2,2
palcontrast = 60,60,60
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 0.9,0.9,0.9
ignorehitpause = 1

[State 透明]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256,256

[State 601, 大小]
type = AngleDraw
trigger1 = 1
scale = .25,.15
value = 10

[State 200, 结束]
type = DestroySelf
trigger1 = AnimTime = 0
trigger2 = root,stateno != 253
;p2
[Statedef 249]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 2

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

[State 0, HitFallSet]
type = HitFallSet
trigger1 = 1
value = 0
ignorehitpause = 1

[State 1830]
type = ChangeAnim2
Trigger1 = Time = 0
value = 249

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = 15*time

[State 1830]
type = SelfState
trigger1 = time = 350
value = 5050
ctrl = 0


;Overpowering stomp attempt
[Statedef 260]
type     = S
movetype = A
physics  = S
juggle   = 15
poweradd = 20
ctrl     = 0
anim     = 252
sprpriority = 2
facep2 = 1

[State 0, AfterImageTime]
type = AfterImageTime
trigger1 = Animelem = 1
time = 14

[State 挥腿]
type = Helper
trigger1 = AnimElem = 1
name = "slash 256"
stateno = 256
pos = 0,-50
postype = p1
ownpal = 1

[State PlaySnd]
type = PlaySnd
trigger1 = Animelem = 1
value = s100,47
volumescale = 40
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 1
value = S100,51
volumescale = 50

[State -2]
Type = Explod
Trigger1 = AnimElem = 4
anim = 8005
sprpriority = 5
posType = p1
pos = 77,7
bindTime = 1
ownpal = 1
scale = 0.7,0.7
facing = -1

[State 240, Hit]
type=hitdef
trigger1=animelem = 3
trigger1 = numexplod(808) = 0
attr = S,SA
hitflag = MAFD
damage = ceil(ifelse(fvar(11)*35<15, 15, fvar(11)*35)), 0
getpower = 144, 10
givepower = 30, 10
animtype = hard
air.animtype = Back
fall.animtype = Back
ground.type = high
air.type = Low


[State 0, HitBy]
type = notHitBy
trigger1 = movehit
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 1
ignorehitpause = 1


[State 0, TargetState]
type = TargetState
triggerall = NumTarget;()
trigger1 =movehit
value =801

[State 0, ChangeState]
type = ChangeState
trigger1 = movehit
value =810
ctrl = 0
ignorehitpause = 1
 


[State 切割]
type = Helper
trigger1 = MoveContact = 1
name = "切割(大)"
id = ifelse((movehit),8012,8001)
stateno = ifelse((movehit),8012,8001)
postype = p1
pos = floor(p2dist x),-90
ownpal = 1
ignorehitpause = 1
persistent = 0

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

;Overpowering kick attempt ex
[Statedef 2261]
type     = S
movetype = A
physics  = S
ctrl     = 0
anim     = 252
sprpriority = 2
facep2 = 1

[State 0, PosSet]
type = PosSet
trigger1 = !time 
y = 0
 
[State 0, PowerAdd]
type = PowerAdd
trigger1 = animelem = 1
value = -1000

[State 1050, ExFX]
type = varset
trigger1 = !time
var(25) = 44

[State 1050, ExFX]
type = explod
trigger1 = !time
anim = 8210
sprpriority = 3
postype = p1
pos = -31, -100
scale = 0.5, 0.5
pausemovetime = -1
supermovetime = -1
ownpal = 1
Id=13


[State 0, AfterImageTime]
type = AfterImageTime
trigger1 = Animelem = 1
time = 14

[State 挥腿]
type = Helper
trigger1 = AnimElem = 1
name = "slash 256"
stateno = 256
pos = 0,-50
postype = p1
ownpal = 1

[State PlaySnd]
type = PlaySnd
trigger1 = Animelem = 1
value = s100,47
volumescale = 40
[State 0, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 1
value = S100,51
volumescale = 50

[State -2]
Type = Explod
Trigger1 = AnimElem = 4
anim = 8005
sprpriority = 5
posType = p1
pos = 77,7
bindTime = 1
ownpal = 1
scale = 0.7,0.7
facing = -1


[state -2]
type = HitDef
Trigger1 = !MoveContact
animtype = Hard
attr = S,NA
hitflag = MAF
damage = 25,0
guardflag = H
getpower = 0,0
pausetime = 0,0
guard.pausetime = 0,0
sparkno = -1
guard.sparkno = -1
sparkxy = -10,-55
hitsound = -1
guardsound = s100,9
ground.type = High
ground.slidetime = 12
ground.hittime  = 12
ground.velocity = -3
ground.cornerpush.veloff = 0
air.velocity = -3,-10.5
airguard.velocity = -3,-5
guard.velocity = -10
fall.recover = 0
p2facing = 1
p1stateno = 253
P2StateNo = 249
kill=0

[State 切割]
type = Helper
trigger1 = MoveContact = 1
name = "切割(大)"
id = ifelse((movehit),8012,8001)
stateno = ifelse((movehit),8012,8001)
postype = p1
pos = floor(p2dist x),-90
ownpal = 1
ignorehitpause = 1
persistent = 0

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








































;--------------------------------------------------------------------------
; launcher kick
[Statedef 480]
type = C
physics = C
moveType = A
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 18 * !var(20)
faceP2 = 1

[State 440, Anim]
type=changeanim
trigger1=!time
value=480

[State 440,Posset]
type=posset
trigger1=!time
y=0

[State 440, Snd]
type=playsnd
trigger1= animelem=2 && random<350
value= 4, ifelse(random<500, 1, 2)
channel=0



[State 200, Snd]
type=playsnd
trigger1= animelem =3
value= 0,3
channel= 3

[State 440, Hit]
type=hitdef
trigger1= !var(16) && var(15)<1
trigger1= !time && !numexplod(14801)
ID = 480
attr = C,NA
hitflag = MAF
guardflag = M
damage = ceil(ifelse(fvar(11)*40<20, 20, fvar(11)*40)), 0
getpower = ifelse(var(9), 80, 30)*!var(20), 36*!var(20)
givepower = 30, 30
pausetime = 8,8
guard.pausetime = 8,4
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = Trip
air.type = Trip
ground.hittime = 18 + 4*var(9)
ground.slidetime = 18 + 4*var(9)
guard.hittime = 4
air.hittime = 120
ground.velocity = -.5, -15
ground.cornerPush.velOff = 0
guard.velocity = -5.25
guard.cornerPush.velOff = 0
air.velocity = -.5, -15
air.cornerPush.velOff = 0
yAccel = 0.338
fall = 1
fall.recover = 1
fall.recoverTime = 120
hitsound = s0,7
guardsound = s0,10
sparkno = -1 + 0*(var(33):=8012)
guard.sparkno = -1 + 0*(var(34):=8000)
sparkxy = -10 + 0*(var(35):=120), var(36):=-50
palfx.time = 12*var(9)
palfx.add = 255,255,255
palfx.sinadd= -255,-255,-255,48


[State 0, TargetState]
type = TargetState
triggerall = NumTarget
trigger1 =movehit
value = 481


[State 0, Explod]
type = Explod
trigger1 = animelem = 2
anim = 485
ID = 485
pos = 20,-20
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 9999
removetime = 12
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 1
ownpal = 0
removeongethit = 1

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 6
x = -8


[State 0, VelSet]
type = VelSet
trigger1 = animelem = 7
x = 0


[State 0, Explod]
type = Explod
trigger1 = movehit
anim = 1
ID = 14801
pos = 0,150
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 9999
removetime = 9999
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit =0
ignorehitpause =1


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

[Statedef 481, launcher]
type    = A
movetype= H
physics = N
facep2 = 1

[State 52, 1]
type = VelSet
trigger1 = time = 0
x = .1
y = -8

[State 52, 2]
type = Veladd
trigger1 = 1
y = .45

[state 5050, Change Animation]
type = changeanim
trigger1 = !animtime && anim = 5035
trigger2 = !time && anim != 5035
trigger2 = (anim != [5051, 5059]) && (anim != [5061, 5069]) && anim != [5090, 5099]
value = 5050

[state 5050, Change Animation]
type = changeanim
trigger1 = anim = [5050, 5059]
trigger1 = vel y >= cond(anim = 5050, const720p(4), const720p(-8))
trigger1 = selfanimexist(anim + 10)
value = anim + 10
persistent = 0


[state 5050, End State]
type = changestate
trigger1 = vel y > 0
trigger1 = pos y >= cond((anim = [5051, 5059]) || (anim = [5061, 5069]), 0, const(movement.air.gethit.groundlevel))
value = 5100



[State 1830]
type = SelfState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 5100



;Crouching Strong Punch%
[statedef 425]
type    = c
movetype= a
physics = c
poweradd = 50
anim = 425
ctrl = 0
sprpriority = 2

[state 200, 1]
type = playsnd
trigger1 = animelem = 2
value = 12,random%3
channel = 1

[State 0, VarSet]
type = VarSet
trigger1 = movehit && p2statetype = l
v = 14   
value = 1

[state 200, 1]
type = playsnd
trigger1 = animelem = 2
value = 0, 3
channel = 3

[State 0, 1]
type = Explod
trigger1 = Animelem = 2
anim = 455
pos = 0,25
postype = p1
bindtime = -1
ID = 455
sprpriority = 5
removeongethit = 1
ignorehitpause = 0
ontop = 1
ownpal = 1 
trans = add




[State 420, Hit]
type=hitdef
trigger1= !var(16) 
trigger1= !Time
attr = C,NA
hitflag = MAFD
guardflag = L
damage = ceil(ifelse(fvar(11)*84<15, 15, fvar(11)*84)), 0
getpower = 72,20
givepower = 10, 10
pausetime =15,10;10,8
guard.pausetime = 12,12
animtype = Hard
ground.type = trip
ground.hittime = 2;4;10
ground.slidetime = 3;6;18 
guard.hittime = 4
air.hittime = 60
ground.velocity = -6, 8
ground.cornerPush.velOff = 0
guard.velocity = -5
guard.cornerPush.velOff = 0
air.velocity = 0, 8
air.cornerPush.velOff = 0
yAccel = 1;0.45
fall = 1
fall.recover = 0
hitsound = s0,7
guardsound = s0,22
sparkno = -1 + 0*(var(33):=8012)
guard.sparkno = -1 + 0*(var(34):=8000)
sparkxy = -10 + 0*(var(35):=80), var(36):=-25
palfx.time = 12*var(9)
palfx.add = 255,255,255
palfx.sinadd= -255,-255,-255,48
forceStand = 0

[State 0, TargetState]
type = TargetState
trigger1 =movehit
value =456

[State 0, VarSet]
type = VarSet
trigger1 = time = 0
v = 14   
value = 1


[State 420, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(5) >= 0
moveType = I

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

;---------------------------------------------------------------------------
; Crouching Light Kick%
[Statedef 430]
type = C
physics = C
moveType = A
ctrl = 0
sprPriority = 1
powerAdd = 0
faceP2 = 1

[State 0, VelSet]
type = VelSet
trigger1 = var(13) <= 0
trigger1 = time = 1
x = 5


[State 430, fx]
type = Helper
trigger1 = AnimElem = 3,=-1
name = "fx 430"
stateno = 431
pos = 0,0
postype = p1
ownpal = 1

[State 0, VelSet]
type = VelSet
trigger1 = var(13) >= 1
trigger1 = time = 1
x = ifelse(var(13) >=5 ,-2,0)


[State 0, VelSet]
type = VelSet
trigger1 = moveguarded
x = 0

[State 430, Anim]
type=changeanim
trigger1=!time
value=430

[State 430,Posset]
type=posset
trigger1=!time
y=0

[State 430, Snd]
type=playsnd
trigger1= !time && random<200
value= 12, ifelse(random<500, 0, 1)
channel=0

[State 430, Snd]
type=playsnd
trigger1= !time
value=0,0
channel=1

[State 430, Hit]
type=hitdef
trigger1= !var(16) && (var(15)<1 || var(20))
trigger1=  !Time
forcenofall = 0
attr = C,NA
hitflag = MAFD
guardflag = L
damage = ceil(ifelse(fvar(11)*10<0, 0, fvar(11)*10)), 0
getpower = 10, 5
givepower = 10, 5
pausetime = 8,8
guard.pausetime = 8,8
animtype = Light
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.hittime = 4 + 5*var(9)
ground.slidetime = 4 + 5*var(9)
guard.hittime = 8
air.hittime = 120
ground.velocity = -2.25, 0
ground.cornerPush.velOff = 0
guard.velocity = -2.25
guard.cornerPush.velOff = 0
air.velocity = -4, -2.75   
air.cornerPush.velOff = 0
yAccel = 0.29
fall = 0
fall.recover = 1
fall.recovertime = 120
hitsound = s0,8
guardsound = s0,10
sparkno = -1 + 0*(var(33):=8010)
guard.sparkno = -1 + 0*(var(34):=8000)
sparkxy = -10 + 0*(var(35):=64), var(36):=-1
palfx.time = 12*var(9)
palfx.add = 255,255,255
palfx.sinadd= -255,-255,-255,48

[State 430, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(4) >= 0
moveType = I

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

;fx 430 helper 
[Statedef 431]
type    = U                      
movetype= I                      
physics = N                      
velset = 0,0                 
ctrl = 0                         
anim = 7074                           
sprpriority = 5                  

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time>1
value = 7074
elem = 2

[State 601, 大小]
type = AngleDraw
trigger1 = root,stateno = 430
trigger1 = root,Animelem = 1,>=0
trigger1 = root,Animelem = 3,<0
scale = .4,.4
value = 70

[State 601, 大小]
type = AngleDraw
trigger1 = root,stateno = 430
trigger1 = root,Animelem = 3,>=0
scale = .45,.6
value = 80

[State 0, BindToRoot]
type = BindToRoot
trigger1 = root,stateno = 430
trigger1 = root,Animelem = 1,>=0
trigger1 = root,Animelem = 3,<0
facing = 0
pos = 40,-10

[State 0, BindToRoot]
type = BindToRoot
trigger1 = root,stateno = 430
trigger1 = root,Animelem = 3,>=0
trigger1 = root,Animelem = 4,<0
facing = 0
pos = 76,-10

[State 透明]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256-32*time,256

[State 200, 结束]
type = DestroySelf
trigger1 = time >= 8
trigger2 = root,stateno != 430



;---------------------------------------------------------------------------
;Crouching med Kick%
[Statedef 440]
type = C
physics = C
moveType = A
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 0
faceP2 = 1



[State 440, Anim]
type=changeanim
trigger1=!time
value=440

[State 0, VelSet]
type = Velset
trigger1 = animelemtime(4) >= 0
x = 3

[State 0, VelSet]
type = Velset
trigger1 = animelemtime(5) = 0
x =0

[State 440,Posset]
type=posset
trigger1=!time
y=0

[State 410, Snd]
type=playsnd
trigger1= !time && random<350
value= 4, ifelse(random<500, 1, 2)
channel=0

[State 410, Snd]
type=playsnd
trigger1= !time
value=1,1
channel=1

[State 410, Hit]
type=hitdef
trigger1=  var(15)<3 && !var(53) 
trigger1= !Time
forcenofall = 0
attr = C,NA
hitflag = MAFD
guardflag = M
damage = ceil(ifelse(fvar(11)*20<10, 10, fvar(11)*20)), 0
getpower = ifelse(!var(13),144,72)*!var(20), 36*!var(20)
givepower = 36, 36
pausetime = 10, 10
guard.pausetime = 10, 10
animtype = up
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = high
ground.hittime = 21 + 3*var(9)
ground.slidetime = 20 + 3*var(9)
guard.hittime = 15
air.hittime = 600
ground.velocity = -1,-10.5 
ground.cornerPush.velOff = 0
guard.velocity = -4
guard.cornerPush.velOff = 0
air.velocity = -1.25, -7.5
air.cornerPush.velOff = 0
yAccel = 0.29
fall = 1
fall.recover = var(53)
fall.recovertime = 250
hitsound = -1 + 0*(var(31):=1)
guardsound = -1 + 0*(var(32):=0)
sparkno = -1 + 0*(var(33):=8011)
guard.sparkno = -1 + 0*(var(34):=8000)
sparkxy = -10 + 0*(var(35):=75), var(36):=-85
palfx.time = 12*var(9)
palfx.add = 255,255,255
palfx.sinadd= -255,-255,-255,48


[State 410, Hit]
type=hitdef
triggerall= !Time
trigger1=  var(15)<5 && (var(53) )
trigger2= prevstateno = 1800 
forcenofall = 0
attr = C,NA
hitflag = MAFD
guardflag = M
damage = ceil(ifelse(fvar(11)*20<10, 10, fvar(11)*20)), 0
getpower = ifelse(!var(13),144,72)*!var(20), 36*!var(20)
givepower = 36, 36
pausetime = 15, 15
guard.pausetime = 10, 10
animtype = up
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = high
ground.hittime = 21 + 3*var(9)
ground.slidetime = 20 + 3*var(9)
guard.hittime = 15
air.hittime = 450
ground.velocity = -1,-10.5 
ground.cornerPush.velOff = 0
guard.velocity = -4
guard.cornerPush.velOff = 0
air.velocity = -1.25, -7.5
air.cornerPush.velOff = 0
yAccel = 0.29
fall = 1
air.fall = 1
fall.recover = 0
fall.recovertime = 240
hitsound = -1 + 0*(var(31):=1)
guardsound = -1 + 0*(var(32):=0)
sparkno = -1 + 0*(var(33):=8011)
guard.sparkno = -1 + 0*(var(34):=8000)
sparkxy = -10 + 0*(var(35):=60), var(36):=-52
palfx.time = 12*var(9)
palfx.add = 255,255,255
palfx.sinadd= -255,-255,-255,48


;anti spam for ai 
[State 0, Explod]
type = Explod
triggerall = ailevel
trigger1 = animelem = 7
trigger1 = !movehit
anim = 2
ID = 440
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0






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




; CROUCHING Medium Kick 2%
[Statedef 490]
type    = C
physics = C
moveType = A
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 0
faceP2 = 1

[State 240, Anim]
type=changeanim
trigger1=!time
value=490

[State 0, Explod]
type = Explod
trigger1 = movehit
anim = 1
ID = 1490
pos = 0,150
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 9999
removetime = 9999
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit =0
ignorehitpause =1



;Crouching Strong Kick 2
[State 490, Crouching Strong Kick 2]
type = ChangeState
value = 491
trigger1 = numexplod(1490)
trigger1 = stateno = 490
trigger1 = time = 0
ignorehitpause = 1

   [State 240, Time Offset]
    type = VarSet
    trigger1 = moveContact = 1
    var(11) = Time
    ignorehitpause = 1
    persistent = 0

    [State 250, Play Anim]
    type = ChangeAnim
    triggerall = AnimElemTime(3) >= 0 && AnimElemTime(4) <= 0
    trigger1 = hitPauseTime = [6,8 - (3 - Var(11))]
    value = anim
    elem = 5
    ignorehitpause = 1

    [State 240, Time Offset]
    type = VarSet
    trigger1 = moveContact = 1
    var(11) = Time
    ignorehitpause = 1
    persistent = 0
    [State 250, Play Anim]
    type = ChangeAnim
    triggerall = AnimElemTime(5) >= 0 && AnimElemTime(7) <= 0
    trigger1 = hitPauseTime = [12,8 - (6 - Var(11))]
    value = anim
    elem = 8
    ignorehitpause = 1



[State 240,Posset]
type=posset
trigger1=!time
y=0

[State 240, Snd]
type=playsnd
trigger1= animelem=3 && random<350
value= 4, ifelse(random<500, 1, 2)
channel=0

[State 240, Snd]
type=playsnd
trigger1= animelem = 2
value=0,2
channel=1

[State 240, Hit]
type=hitdef
trigger1= (var(15)<1 || var(20)) 
trigger1= !Time
forcenofall = 1
attr = S,NA
hitflag = MAF
guardflag = M
damage = ceil(ifelse(fvar(11)*20<10, 10, fvar(11)*20)), 0
getpower = ifelse(!var(13),floor(fvar(11) * 40),floor(fvar(11) * 40))*!var(20), floor(fvar(11) * 36)
givepower = 20, 20
pausetime = 8, 10
guard.pausetime =  8, 4
animtype = Med
air.animtype = Back
fall.animtype = Back
ground.type = low
air.type = Low
ground.hittime = 30;22 + 3*var(9)
ground.slidetime = 22 + 3*var(9)
guard.hittime = 15
air.hittime = 120
ground.velocity = 3.75, 0
ground.cornerPush.velOff = 0
guard.velocity = -3.75
guard.cornerPush.velOff = 0
air.velocity = -3.23, -2.625
air.cornerPush.velOff = 0
yAccel = 0.29
fall = 0
fall.recover = 1
fall.recovertime = 120
hitsound = s0,7
guardsound = s0,10
sparkno = -1 + 0*(var(33):=8011)
guard.sparkno = -1 + 0*(var(34):=8000)
sparkxy = -10 + 0*(var(35):=100), var(36):=-20
palfx.time = 12*var(9)
palfx.add = 255,255,255
palfx.sinadd= -255,-255,-255,48



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

; CROUCHING Medium Kick 2%
[Statedef 491]
type    = C
physics = C
moveType = A
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 0
faceP2 = 1

[State 240, Anim]
type=changeanim
trigger1=!time
value=490


[State 240,Posset]
type=posset
trigger1=!time
y=0

[State 240, Snd]
type=playsnd
trigger1= animelem=3 && random<350
value= 4, ifelse(random<500, 1, 2)
channel=0

[State 240, Snd]
type=playsnd
trigger1= animelem=2
value=0,2
channel=1

[State 240, Hit]
type=hitdef
trigger1= (var(15)<1 || var(20)) 
trigger1= !Time
forcenofall = 1
attr = S,NA
hitflag = MAF
guardflag = M
damage = ceil(ifelse(fvar(11)*20<10, 10, fvar(11)*20)), 0
getpower = ifelse(!var(13),floor(fvar(11) * 40),floor(fvar(11) * 40))*!var(20), floor(fvar(11) * 36)
givepower = 20, 20
pausetime = 8, 10
guard.pausetime =  10, 2
animtype = Med
air.animtype = Back
fall.animtype = Back
ground.type = low
air.type = Low
ground.hittime = 22 + 3*var(9)
ground.slidetime = 22 + 3*var(9)
guard.hittime = 15
air.hittime = 120
ground.velocity = 3.75, 0
ground.cornerPush.velOff = 0
guard.velocity = -3.75
guard.cornerPush.velOff = 0
air.velocity = -3.23, -2.625
air.cornerPush.velOff = 0
yAccel = 0.29
fall = numexplod(1491)
fall.recover = 0
fall.recovertime = 120
hitsound = s0,7
guardsound = s0,10
sparkno = -1 + 0*(var(33):=8011)
guard.sparkno = -1 + 0*(var(34):=8000)
sparkxy = -10 + 0*(var(35):=100), var(36):=-20
palfx.time = 12*var(9)
palfx.add = 255,255,255
palfx.sinadd= -255,-255,-255,48


[State 0, Explod]
type = Explod
triggerall =numexplod(1491) = 0
trigger1 = movehit
trigger2 = ailevel
anim = 1
ID = 1491
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 9999
removetime = 9999
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 1

  [State 250, Play Anim]
    type = ChangeAnim
    triggerall = AnimElemTime(3) >= 0 && AnimElemTime(4) <= 0
    trigger1 = hitPauseTime = [6,8 - (3 - Var(11))]
    value = anim
    elem = 5
    ignorehitpause = 1



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



;---------------------------------------------------------------------------
; Tripped get-hit (shaking)
[Statedef 455]
type    = A
movetype= H
physics = N
velset = 0,0

[State 5070, 1]
type = ChangeAnim
trigger1 = 1
value = 5070

[State 5070, 2]
type = ChangeState
trigger1 = time =0; HitShakeOver
value = 456

[State 5070, 3]
type = null;ForceFeedback
trigger1 = time = 0
time = 1
waveform = sinesquare
ampl = 140


; Tripped get-hit (knocked away)
[Statedef 456]
type    = A
movetype= H
physics = N
velset = 0,0

[State 5071, 2] ;Acceleration
type = VelAdd
trigger1 = time > 0
y = .333;GetHitVar(yaccel)

[State 5071, 3] ;Hit ground
trigger1 = Vel Y > 0
trigger1 = Pos Y >= Const(movement.air.gethit.trip.groundlevel)
type = SelfState
value = 5110


;---------------------------------------------------------------------------
; Jump Light rapid kick
[Statedef 600]  
type = A
physics = a
moveType = A
ctrl = 0
sprPriority = 1
powerAdd = 0

[State 600, Anim]
type=changeanim
trigger1=!time
value=600

[State 600, Snd]
type=playsnd
trigger1= animelem=2 && random<200
value= 4, ifelse(random<500, 0, 1)
channel=0

[State 600, Snd]
type=playsnd
trigger1= animelem=2
value=1,0
channel=1


[State 600, Hit]
type=hitdef
trigger1= !var(16) && (var(15)<1 || var(20))
trigger1 = AnimElem = 2
trigger2 = AnimElem = 4
trigger3 = AnimElem = 6
trigger4 = AnimElem = 8
forcenofall = 0
attr = A,NA
hitflag = MAF
guardflag = HA
damage = ceil(ifelse(fvar(11)*10<5, 5, fvar(11)*10)), 0
getpower = ifelse(!var(13),floor(fvar(11) * 75),floor(fvar(11) * 45)), floor(fvar(11) * 45)
givepower =floor(fvar(11) * 36) , floor(fvar(11) * 36)
pausetime = 14,18
;ifelse(var(20), 4, 8), ifelse(var(20), 4, 8)
guard.pausetime = 8,8
animtype = Light
air.animtype = back
fall.animtype = Back
ground.type = High
air.type = Low
ground.hittime = 12 + 2*var(9)
ground.slidetime = 12 + 2*var(9)
guard.hittime = 12
air.hittime = 250
airguard.ctrltime = 25
ground.velocity = -4.5, 0
ground.cornerPush.velOff = 0
guard.velocity = -4.5
guard.cornerPush.velOff = 0
air.velocity = -.5,-2.5
air.cornerPush.velOff = 0
airguard.velocity = -2.5, 0
airguard.cornerPush.velOff = 0
yAccel = 0.29
fall = 0
fall.recover = 1
fall.recoverTime = 200
hitsound =s0,4
guardsound = s0,10
sparkno = -1 + 0*(var(33):=8010)
guard.sparkno = -1 + 0*(var(34):=8000)
sparkxy = -10 + 0*(var(35):=100), var(36):=-110
palfx.time = 12*var(9)
palfx.add = 255,255,255
palfx.sinadd= -255,-255,-255,48

[State 0, Explod]
type = Explod
trigger1 =numexplod(601) =0 
anim = 601
ID =601
pos =70,-50
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
removetime = -2
pausemovetime = 0
scale = .333,.333
sprpriority = 5
ontop = 1
shadow = 0,0,0
ownpal = 0
removeongethit = 0
trans = add
ignorehitpause =1


[State 600, End]
type=changestate
trigger1= pos y>-vel y
value=52











;---------------------------------------------------------------------------
; Jump knockdown
[Statedef 620] 
type = A
physics  = A
moveType = A
ctrl = 0
sprPriority = 1
powerAdd = 18 * !var(20)

[State 610, Anim]
type=changeanim
trigger1=!time
value=625

[State 0, 1]
type = Explod
trigger1 = Animelem = 2
anim = 626
pos = 0,-8
postype = p1
bindtime = -1
ID = 626
sprpriority = 5
removeongethit = 1
ignorehitpause = 0
ontop = 1
ownpal = 1 
scale = 1,1
trans = add


[State 610, Snd]
type=playsnd
trigger1= animelem=3 && random<350
value= 12, ifelse(random<500, 1, 2)
channel=1

[State 610, Snd]
type=playsnd
trigger1= animelem=3
value=0,3
channel=1

[State 610, Hit]
type=hitdef
trigger1= !time
forcenofall =1; !var(20)
attr = A,NA
hitflag = MAF
guardflag = HA
damage = ceil(ifelse(fvar(11)*20<10, 10, fvar(11)*20)), 0
pausetime = 10, 5
guard.pausetime = 5, 5
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = High
ground.hittime = 30 + 3*var(9)
ground.slidetime = 25 + 3*var(9)
guard.hittime = 15
air.hittime = 240
airguard.ctrltime = 40
ground.velocity = -5, 0
ground.cornerPush.velOff = -2.5
guard.velocity = -2
guard.cornerPush.velOff = -4
air.velocity = -15, 22
air.cornerPush.velOff = 0
airguard.velocity = -2.5, 0
airguard.cornerPush.velOff = 0
yAccel = 0.29
fall = 0
air.fall = 1
fall.recover = 0
fall.recoverTime = 120
hitsound = s0,7
guardsound = s3,2
sparkno = -1 + 0*(var(33):=8011)
guard.sparkno = -1 + 0*(var(34):=8000)
sparkxy = -10 + 0*(var(35):=42), var(36):=-45
palfx.time = 12*var(9)
palfx.add = 255,255,255
palfx.sinadd= -255,-255,-255,48


[State 0, TargetState]
type = TargetState
triggerall = numenemy
triggerall = numexplod(1620) = 0
triggerall = movehit 
trigger1 = enemy, statetype = A
trigger2 = enemy, hitfall
value =1270


[State 610, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(6) >= 0
movetype = I

[State 0, Explod]
type = Explod
trigger1 = numexplod(1620) = 0
trigger1 = movehit 
anim = 1
ID = 1620
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = 9999
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 1



[State 620, End]
type=changestate
trigger1= pos y>-vel y
value=ifelse(movetype = I || movecontact, 52, 621)


;---------------------------------------------------------------------------
; Jump Strong Punch% landing
[Statedef 621] 
type =S
physics  = S
moveType = A
ctrl = 0
sprPriority = 1
powerAdd = 18 * !var(20)

[State 610, Anim]
type=changeanim
trigger1=!time
value=628

[State 52, Pos]
type = posset
trigger1 = 1
y = 0



[State 610, Hit]
type=hitdef
triggerall= !var(53)
trigger1= !time
forcenofall = !var(20)
attr = A,NA
hitflag = MAF
guardflag = HA
damage = ceil(ifelse(fvar(11)*45<7, 7, fvar(11)*45)), 0
pausetime = 10, 5
guard.pausetime = 5, 5
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = High
ground.hittime = 30 + 3*var(9)
ground.slidetime = 25 + 3*var(9)
guard.hittime = 15
air.hittime = 240
airguard.ctrltime = 40
ground.velocity = -5, 0
ground.cornerPush.velOff = -2.5
guard.velocity = -2
guard.cornerPush.velOff = -4
air.velocity = -15, 22
air.cornerPush.velOff = 0
airguard.velocity = -2.5, 0
airguard.cornerPush.velOff = 0
yAccel = 0.29
fall = 0
air.fall = 1
fall.recover = 0
fall.recoverTime = 120
hitsound = s0,7
guardsound = s3,2
sparkno = -1 + 0*(var(33):=8011)
guard.sparkno = -1 + 0*(var(34):=8000)
sparkxy = -10 + 0*(var(35):=42), var(36):=-45
palfx.time = 12*var(9)
palfx.add = 255,255,255
palfx.sinadd= -255,-255,-255,48


[State 610, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(3) >= 0
movetype = I



[State 620, End]
type=changestate
trigger1= !animtime
value = 0
ctrl = 1



;---------------------------------------------------------------------------
; Jump Medium Kick%
[Statedef 640] 
type = A
physics = a
moveType = A
ctrl = 0
sprPriority = 1
powerAdd = 18 


[State 0, VelAdd]
type = VelAdd
trigger1 = command = "fwd"
x = .3



[State 640, Anim]
type=changeanim
trigger1=!time
value=640

[State 0, 1]
type = Explod
trigger1 = Animelem = 2
anim = 645
pos = 0,-8
postype = p1
bindtime = -1
ID = 645
sprpriority = 5
removeongethit = 1
ignorehitpause = 0
ontop = 1
ownpal = 1 
trans = add


[State 640, Snd]
type=playsnd
trigger1= animelem=2 && random<350
value= 12, ifelse(random<500, 0, 2)
channel=0

[State 640, Snd]
type=playsnd
trigger1= animelem=2
value=0,3
channel=1

[State 640, Hit]
type=hitdef
trigger1 = !time
forcenofall = 0
attr = A,NA
hitflag = MAF
guardflag = HA
damage = ceil(ifelse(fvar(11)*20<7, 7, fvar(11)*20)), 0
getpower = ifelse(!var(13),floor(fvar(11) * 150),floor(fvar(11) * 72))*!var(20), floor(fvar(11) * 36)
givepower =floor(fvar(11) * 36) , floor(fvar(11) * 36)
pausetime = 5, 10
guard.pausetime = ifelse(var(20), 5, 10), ifelse(var(20), 5, 10)
animtype = Medium
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.hittime = 34 + 3*var(9)
ground.slidetime = 15 + 3*var(9)
guard.hittime = 15
air.hittime = 250
airguard.ctrltime = 16
ground.velocity = -5, 0
ground.cornerPush.velOff = 0
guard.velocity = -4
guard.cornerPush.velOff = 0
air.velocity = -3, -4
air.cornerPush.velOff = 0
airguard.velocity = -2.5, 0
airguard.cornerPush.velOff = 0
yAccel = .45;0.33
fall = 0
fall.recover = 1
fall.recoverTime = 120
hitsound = s0,6
guardsound = s0,10
sparkno = -1 + 0*(var(33):=8011)
guard.sparkno = -1 + 0*(var(34):=8000)
sparkxy = -10 + 0*(var(35):=54), var(36):=-34
palfx.time = 12*var(9)
palfx.add = 255,255,255
palfx.sinadd= -255,-255,-255,48

[State 240, Time Offset]
    type = VarSet
    trigger1 = moveContact = 1
    var(11) = Time
    ignorehitpause = 1
    persistent = 0

    [State 250, Play Anim]
    type = ChangeAnim
    triggerall = AnimElemTime(3) >= 0 && AnimElemTime(4) <= 0
    trigger1 = hitPauseTime = [7,5 - (6 - Var(11))]
    value = anim
    elem = 5
    ignorehitpause = 1




[State 640, End]
type=changestate
trigger1= !animtime
value=50
ctrl = 1


[State 640, End]
type=changestate
trigger1= pos y>-vel y
value=52

;---------------------------------------------------------------------------
;Jump Heavy kick%
[Statedef 650] 
type = A
physics = A
moveType = A
ctrl = 0
sprPriority = 1
powerAdd = 25 


[State 0, VelAdd]
type = VelAdd
trigger1 = command = "fwd"
x = .3

[State 240, Time Offset]
    type = VarSet
    trigger1 = moveContact = 1
    var(11) = Time
    ignorehitpause = 1
    persistent = 0

    [State 250, Play Anim]
    type = ChangeAnim
    triggerall = AnimElemTime(3) >= 0 && AnimElemTime(5) <= 0
    trigger1 = hitPauseTime = [6,8 - (9 - Var(11))]
    value = anim
    elem = 5
    ignorehitpause = 1

[State 0, 1]
type = Explod
trigger1 = Animelem = 3
anim = 655
pos = 0,50 
postype = p1
bindtime = -1
ID = 655
sprpriority = 5
removeongethit = 1
ignorehitpause = 0
ontop = 1
ownpal = 1 
scale = 1.2,1.2
trans = add

[State 610, Snd]
type=playsnd
trigger1= animelem=2 && random<350
value= 12, ifelse(random<500, 0, 1)
channel=1

[State 610, Snd]
type=playsnd
trigger1= animelem=3
value=1,17
channel=3




[State 650, Anim]
type=changeanim
trigger1=!time
value=650


[State 650, Hit]
type=hitdef
;trigger1=  !var(16)&& (var(15)<5 || var(20))
trigger1= !time
forcenofall = !var(20)
attr = A,NA
hitflag = MAFD
guardflag = HA
damage = ifelse(!var(9),85, ifelse(floor(fvar(11) * 40)< 20,20, floor(fvar(11)* 40))),10
;damage = ceil(ifelse(fvar(11)*55<7, 7, fvar(11)*55)), 0
getpower = 25,25
givepower = 36, 36
pausetime = 10,17
guard.pausetime = 10,6
animtype = Hard
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = Low
ground.hittime = 25+ 4*var(9)
ground.slidetime = 10 + 4*var(9)
guard.hittime = 18
air.hittime = 300
airguard.ctrltime = 55
ground.velocity = 0, 3
ground.cornerPush.velOff = 0
guard.velocity = -2.5
;ifElse(var(20), -4.86, -10.52)
guard.cornerPush.velOff = 0
air.velocity = -2, 2
air.cornerPush.velOff = 0
airguard.velocity = -2.5, 0
airguard.cornerPush.velOff = 0
yAccel = 0.29
fall = 0
fall.recover = 1
fall.recoverTime = 120
hitsound = s0,6
guardsound = s0,10
sparkno = -1 + 0*(var(33):=8012)
guard.sparkno = -1 + 0*(var(34):=8000)
sparkxy = -10 + 0*(var(35):=64), var(36):=-80
palfx.time = 12*var(9)
palfx.add = 255,255,255
palfx.sinadd= -255,-255,-255,48


;[State 650, StateTypeSet: Idle]
;type = StateTypeSet
;trigger1 = AnimElemTime(6) >= 0
;trigger1 = prevstateno !=1001
;moveType = I


[State 640, End]
type=changestate
trigger1= !animtime
value=50
ctrl = 1


[State 640, End]
type=changestate
trigger1= pos y>-vel y
value=52
;------------------------------------------------------------------------------------------------------------

; Jump Light Kick jet




;===========<Throw Attempt>==========

;normal toss attempt
[Statedef 900]
type=S
physics=S
movetype=A
ctrl=0
velset=0,0
sprpriority=1
poweradd=20
facep2=1

[State 800, Anim]
type=changeanim
trigger1=!time
value=900

[State 800,Posset]
type=posset
trigger1=!time
y=0

[State 800, Button]
type=varset
trigger1= !time && !AILevel
var(10)= (command="holdfwd")

[State 800, Button AI]
type=varset
trigger1= !time && AILevel
var(10)= (random<500)

[State 800, Tech Hit]
type = varset
trigger1 = 1
var(19) = 0

[State 800, Tech Hit]
type = varset
trigger1 = numenemy
trigger1 = enemynear, statetype != A
trigger1 = (enemynear, stateno = [0, 999]) && (enemynear, stateno != [100, 119]) && (enemynear, stateno != [200, 799])
var(19) = 7

[State 800, Guard Dist]
type=attackdist
trigger1= 1
value=0

[State 800, Hit]
type=hitdef
trigger1= !time
attr=S,NT
hitflag=M
priority = 1, Miss
getpower=0,0
givepower=0,0
sparkno = -1 +0*(var(33):=0)
guard.sparkno = -1 +0*(var(34):=8000)
sparkxy = -10 + 0*(var(35):=40), var(36):=-50
hitsound = -1 +0*(var(31):=800)
guardsound = -1 +0*(var(32):=0)
fall=1
fall.recover=0
numhits=1
p1stateno = 911
p2stateno = 912


[State 800, Snd]
type=playsnd
trigger1= animelem=2
value=0,11
channel=3


[State 800, End]
type=changestate
trigger1= !animtime
value=0
ctrl=1

;===========<THROW SWITCHING SIDES (TARGET)>==========

;toss target side change
[StateDef 906]
type = S
moveType = H
physics = N
velSet = 0,0
sprPriority = 0

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

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 912

[State 806, Turn]
type = Turn
trigger1 = !Time
trigger1 = NumEnemy
trigger1 = Facing = EnemyNear, Facing
ignoreHitPause = 1

[State 806, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0
moveCamera = 1,1
ignoreHitPause = 1

[State 806, SelfState]
type = SelfState
trigger1 = Time >= 60
value = ifElse(pos y < 0, 5040, 0)
ctrl = 1









[Statedef 911, normal toss (throw success)]
type=S
physics=N
movetype=A
ctrl=0
velset=0,0
sprpriority=3
facep2=1
anim = 911


[State 0, TargetState]
type = TargetState
trigger1 = time = 0
value = 912

[State 0, TargetBind]
type = TargetBind
trigger1 = 1
time = 1
pos = 40,-157 


[State 800, Button]
type=varset
triggerall = anim = 911
trigger1= !AILevel
trigger1 = time <= 8
var(10)= (command="holdback")

[State 810, got ya snd]
type=playsnd
triggerall = anim = 911
trigger1= time = 0
value=0,9
channel=3


[State 0, TargetLifeAdd]
type = TargetLifeAdd
triggerall = anim = 911
trigger1 = time = 0
value = -10
kill = 0
absolute = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = time = 8
value =ifelse(var(10)= 1,915,910)
ctrl = 0


[Statedef 910, normal toss fwd]
type=S
physics=N
movetype=A
ctrl=0
velset=0,0
sprpriority=3
facep2=1
anim = 910

[State 0, SprPriority]
type = SprPriority
trigger1 = anim = 910
value = 3

[State 0, Hitspark Explod]
type = Explod
trigger1 = animelem = 4
anim = (var(33):=8011)
pos = 90, -80
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 5
vel = 0,0
accel = 0,0
random = 0,0
removetime = 5
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1


[State 0, TargetState]
type = TargetState
trigger1 = animelem = 1
value =913

[State 801, TargetBind]
type = TargetBind
trigger1 = animelem = 1 
time = 1
pos = 60, -153

[State 801, TargetBind]
type = TargetBind
trigger1 = animelem = 2
time = 1
pos = 80, -125


[State 801, TargetBind]
type = TargetBind
trigger1 = animelem = 3
time = 1
pos = 90, -120

[State 801, TargetBind]
type = TargetBind
trigger1 = animelemtime(4) = [0,4]
time = 1
pos = 110,-120


[State 0, ChangeState]
type = targetState
trigger1 = animelemtime(4) = 5
value =914

[State 0, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = animelem = 4
value = -80
kill = 1

[State 0, HitAdd]
type = HitAdd
trigger1 = animelem = 4
value = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = S0,6
channel = 3

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




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



[Statedef 915, normal toss back]
type=S
physics=N
movetype=A
ctrl=0
velset=0,0
sprpriority=3
facep2=1
anim = 915


;setup for backwards
[State 0, TargetState]
type = TargetState
trigger1 = animelem = 1
value =918


;911 = base toss 
[State 801, TargetBind]
type = TargetBind
trigger1 = animelem = 1
time = 1
pos = 35, -160

 
[State 801, TargetBind]
type = TargetBind
trigger1 = animelem = 2
time = 1
pos = -15, -159

 [State 0, Turn]
type = Turn
trigger1 = animelem = 3


[State 801, TargetBind]
type = TargetBind
trigger1 = animelem = 3
time = 1
pos = 25, -163

;911 = base toss 
[State 801, TargetBind]
type = TargetBind
trigger1 = animelemtime(4) = 1
time = 1
pos = 120, -185

[State 0, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = animelem = 3
value = -80
kill = 1

[State 0, HitAdd]
type = HitAdd
trigger1 = animelem = 3
value = 1


[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S12,1
channel = 0

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

[State 0, TargetState]
type = TargetState
triggerall = NumTarget
trigger1 =animelem = 4
value =919





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


[Statedef 912, grab base target]
type = A
movetype = H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -5

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 912


[Statedef 913, forward bind]
type=A
physics=N
movetype=H
ctrl=0
velset=0,0
sprpriority=1
facep2=-1

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = 1
value = 877

[Statedef 914, forward away]
type=A
physics=N
movetype=H
ctrl=0
velset=-8,0
sprpriority=1
facep2=-1

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = 1
value = 878

[State 76, 1] ;Gravity
type = VelAdd
trigger1 = 1
y = .4

[State 805, 3] ;Reduce speed
type = VelMul
trigger1 = Time = 0
x = 0.75

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

[Statedef 919, backward toss away]
type=A
physics=N
movetype=H
ctrl=0
sprpriority=1
facep2=-1

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = 1
value = 878

[State 76, 1] ;Gravity
type = Velset 
trigger1 = 1
x = -7

[State 76, 1] ;Gravity
type = VelAdd
trigger1 = 1
y = .4


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



[Statedef 918, backward bind]
type=A
physics=N
movetype=H
ctrl=0
velset=0,0
sprpriority=1
facep2=-1

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 918



[Statedef 810, CUF Main (throw success)]
type=S
physics=N
movetype=A
ctrl=0
velset=0,0
sprpriority=-2
facep2=1
anim = 810

[State 0, Explod]
type = Explod
trigger1 = animelem = 1
anim = 1
ID = 808
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = 9999
pausemovetime = 9999
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 1

[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0
 
[State 800, Button]
type=varset
triggerall = anim = 810
trigger1= !AILevel
trigger1 = time <= 55
var(10)= (command="holdfwd")

[State 810, whoosh snd]
type=playsnd
triggerall = anim = 810
trigger1= animelem = 14
value=0,3
channel=3

[State 610, pericing  hit snd]
type=playsnd
triggerall = anim = 810
trigger1 = animelem= 4
trigger2 = animelem= 7
trigger3 = animelem= 10
trigger4 = animelem= 13
value=s0,6
channel=2

[State 0, HitAdd]
type = HitAdd
triggerall = anim = 810
trigger1 = animelem= 4
trigger2 = animelem= 7
trigger3 = animelem= 10
trigger4 = animelem= 13
trigger5 = animelem= 19
value = 1

[State 0, HitAdd]
type = powerAdd
triggerall = anim = 810
trigger1 = animelem= 4
trigger2 = animelem= 7
trigger3 = animelem= 10
trigger4 = animelem= 13
trigger5 = animelem= 19
value = ceil(var(13) * 5 + 5)

[State 0, HitDef]
type = HitDef
triggerall = anim = 810
trigger1 = animelem= 4
trigger2 = animelem= 7
trigger3 = animelem= 10
trigger4 = animelem= 13
attr = S,NT        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAFD        ;HLAFD+-
animtype = light          ;light,medium,hard,back,up,diagup
air.animtype = light
damage = ifelse(fvar(11)*30<15, 15, fvar(11)*30)
pausetime = 8 ,8
sparkno = -1
guard.sparkno = -1
sparkxy = 0,0
hitsound = S0,6
guardsound = S0,10
ground.type = low      ;Low,Trip,None
ground.slidetime = 10
guard.slidetime = 10
ground.hittime = 10
guard.hittime = 10
air.hittime = 400
ground.velocity = 0,0
guard.velocity = 5
air.velocity = 0,0
fall = 1
fall.yvelocity = -4.5


[State 0, HitDef]
type = HitDef
triggerall = anim = 810
trigger1 = animelem= 19
attr = S,NT        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAFD        ;HLAFD+-
animtype = light          ;light,medium,hard,back,up,diagup
air.animtype = light
damage = 30
pausetime = 8 ,8
sparkno = -1
guard.sparkno = -1
sparkxy = 0,0
hitsound = S0,6
guardsound = S0,10
ground.type = low      ;Low,Trip,None
ground.slidetime = 10
guard.slidetime = 10
ground.hittime = 10
guard.hittime = 10
air.hittime = 400
ground.velocity = 15,-2
guard.velocity = 5
air.velocity = 0,0
fall = 1
fall.yvelocity = -4.5
fall.recover =0



[State 0, TargetLifeAdd]
type = TargetLifeAdd
triggerall = anim = 810
trigger1 = animelem= 4
value = -ceil(ifelse(fvar(11)*25<10, 10, fvar(11)*25))
kill = 0
absolute = 0

[State 0, TargetLifeAdd]
type = TargetLifeAdd
triggerall = anim = 810
trigger1 = animelem= 7
trigger2 = animelem= 10
trigger3 = animelem= 13
value = -ceil(ifelse(fvar(11)*10<5, 10, fvar(11)*10))
kill = 0
absolute = 0

[State 0, TargetLifeAdd]
type = TargetLifeAdd
triggerall = anim = 810
trigger1 = animelem= 19
value = -15
kill = 1
absolute = 0

[State 0, HitAdd]
type = HitAdd
triggerall = anim = 825
trigger1 = animelem= 5
value = 1

[State 0, TargetLifeAdd]
type = TargetLifeAdd
triggerall = anim = 825
trigger1 = animelem = 5
value = -15
kill = 1
absolute = 0


[State -2, Ground Impact Dust]
type = Helper
triggerall = anim = 810
triggerall=!numhelper(8112) && numenemy
trigger1 = animelem = 8
trigger2 = animelem = 11
trigger3 = animelem = 14
stateNo = 8110
ID = 8110
name = "Heavy Ground Impact Dust"
posType = P2
facing = -1
pos = 0,20
ownPal = 1
ignorehitpause=1
persistent = 0

[State -2, heavy Ground Impact Dust]
type = Helper
triggerall = anim = 810
trigger1=animelem =5
stateNo = 8112
ID = 8112
name = "Heavy Ground Impact Dust"
posType = P2
facing = -1
pos = 0,20
ownPal = 0
ignorehitpause=1
persistent = 0
scale = 1,1

;shake the damn ground
[State 810,]
type = EnvShake
triggerall = anim = 810
trigger1 = AnimElem = 5
ampl = 10
freq = 120
time = 10


[State 810, whoosh snd]
type=playsnd
triggerall = anim = 825
trigger1= animelem = 4
value= 12,2
channel=3


[State 810, whoosh snd]
type=playsnd
triggerall = anim = 810
trigger1= animelem = 6
value=13,2
channel=1


[State 0, Hitspark Explod]
type = Explod
triggerall = anim = 810
trigger1 = animelem= 7
trigger2 = animelem= 10
trigger3 = animelem= 13
anim = (var(33):=8011)
pos = 0,-10
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 5
vel = 0,0
accel = 0,0
random = 0,0
removetime = 5
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0

[State 0, Hitspark Explod]
type = Explod
triggerall = anim = 810
trigger1 = animelem = 4
anim = (var(33):=8011)
pos = 0,-10
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 5
vel = 0,0
accel = 0,0
random = 0,0
removetime = 5
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0

;split point self
[State 800, anim]
type=changeanim
triggerall = anim = 810
trigger1 = time = 73
trigger1= var(10) = 1
value = 825


;setup for forwards
[State 0, TargetState]
type = TargetState
triggerall = anim = 825
trigger1 = time = 73
value =803




;release point backwards
[State 0, TargetState]
type = TargetState
triggerall = anim = 810
trigger1 =animelemtime(18) = 2
trigger1= var(10) = 0
value =802


[State 801, TargetBind]
type = TargetBind
triggerall = anim = 810
trigger1 = time = [0,2]
time = 1
pos = 72, -60.0


[State 801, TargetBind]
type = TargetBind
triggerall = anim = 810
trigger1 = time = [3,4]
time = 1
pos = 78, -35.0

[State 801, TargetBind]
type = TargetBind
triggerall = anim = 810
trigger1 = time = [5,6]
time = 1
pos = 72, -18

[State 801, TargetBind]
type = TargetBind
triggerall = anim = 810
trigger1 = time = [7,59]
time = 1
pos = 76, 0

[State 801, TargetBind]
type = TargetBind
triggerall = anim = 810
trigger1 = target,stateno != 802
trigger1 = time = [60,68]
time = 1
pos = 50.0, 0


[State 801, TargetBind]
type = TargetBind
triggerall = anim = 810
trigger1 = target,stateno != 802
trigger1 = time = [69,73]
time = 1
pos = 30, -8


[State 801, TargetBind]
type = null;TargetBind
triggerall = anim = 810
trigger1 = target,stateno != 802
trigger1 = time = [71,72]
time = 1
pos = -15, -8

[State 801, TargetBind]
type = TargetBind
triggerall = anim = 810
trigger1 = target,stateno != 802 
trigger1 = time = [73,79]
time = 1
pos = -25, -10



[State 801, TargetBind]
type = TargetBind
triggerall = anim = 825
trigger1 = time = [72,75];time = [0,3]
time = 1
pos = -30,-15
ignorehitpause = 1


[State 801, TargetBind]
type = TargetBind
triggerall = anim = 825
trigger1 = time = [76,79]; time = [4,7]
time = 1
pos = -50,-30
ignorehitpause = 1

[State 801, TargetBind]
type = TargetBind
triggerall = anim = 825
trigger1 =  time = [80,83];time = [8,11]
time = 1
pos = -83,-55
ignorehitpause = 1

[State 801, TargetBind]
type = TargetBind
triggerall = anim = 825 
trigger1 = time = [84,87]; time = [12,15]
time = 1
pos = -46, -164
ignorehitpause = 1


[State 801, TargetBind]
type = TargetBind
triggerall = anim = 825
trigger1 =  time = [86,89];time = [13,17]
time = 1
pos = 30, -160
ignorehitpause = 1


[State 801, TargetBind]
type = TargetBind
triggerall = anim = 825
trigger1 =  time = [90,92];time = [13,17]
time = 1
pos = 50, -165
ignorehitpause = 1




;release point forwards
[State 0, TargetState]
type = TargetState
triggerall = anim = 825
trigger1 =  time = 93;time = 21
value =804
ignorehitpause = 1

[State 800, End]
type=changestate
trigger1= !animtime
value=0
ctrl=1
















[Statedef 801, CUF B! Target]
type = A
movetype = H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -5

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 820


[State 820, 2]
type =null;  SelfState
trigger1 = !gethitvar(isbound) 
value = 5050


[Statedef 802, CUF B! Target flying away]
type = A
movetype = H
physics = N
ctrl = 0
sprpriority = -5
velset=-15,-5
facep2=1


[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = 1
value = 821

[State 76, 1] ;Gravity
type = VelAdd
trigger1 = 1
y = .33

[State 805, 3] ;Reduce speed
type = VelMul
trigger1 = Time = 0
x = 0.75


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

[Statedef 803, CUF F! Target bound]
type = A
movetype = H
physics = N
ctrl = 0
sprpriority = -5
velset=0,0
facep2= 1


[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 822


[Statedef 804, CUF F! Target flying away]
type = A
movetype = H
physics = N
ctrl = 0
sprpriority = -5
velset=-15,-5
facep2=1


[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = 1
value = 822

[State 76, 1] ;Gravity
type = VelAdd
trigger1 = 1
y = .33

[State 805, 3] ;Reduce speed
type = VelMul
trigger1 = Time = 0
x = 0.75


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


;---TARGET---
[Statedef 806]
type = S
moveType = H
physics = N
velSet = 0,0
sprPriority = 0

[State 806, Turn]
type = Turn
trigger1 = !Time
trigger1 = NumEnemy
trigger1 = Facing = EnemyNear, Facing
ignoreHitPause = 1

[State 806, NHB]
type=nothitby
trigger1= 1
value=SCA
time=1

[State 806, Anim]
type=changeanim2
trigger1= !time
value=806

[State 806, Camera]
type=screenbound
trigger1= 1
value=0
movecamera=1,1
ignoreHitPause = 1

[State 806, Safety]
type=selfstate
trigger1= time>=60
value= ifelse(pos y<0, 5040, 0)
ctrl=1


; HITA_SHAKE
[Statedef 15020]
type    = u
movetype= H
physics = N
;velset = 0,0

[State 5020, 5]
type = SelfState
trigger1 = prevstateno = [150,151]
value = 150 + (HitShakeOver)
ignorehitpause = 1

[State 5020, 5]
type = SelfState
trigger1 = prevstateno = [152,153]
value = 152 + (HitShakeOver)
ignorehitpause = 1

[State 5020, 5]
type = SelfState
trigger1 = prevstateno = [154,155]
value = 154 + (HitShakeOver)
ignorehitpause = 1

[State 5020, 5]
type = SelfState
trigger1 = time = 0
value = 5020
ignorehitpause = 1






