;---------------------------------------------------------------------------
;Shoryuken
[StateDef 1100]
type = S
movetype = A
physics = N
facep2 = 1
poweradd = ifelse(var(15), 0, ifelse(!var(19), 25, ifelse(var(19) = 1, 30, 35)))
ctrl = 0
velset = 0, 0

[State 0, var]
type = varset
trigger1 = !time
var(19) = ifelse(command = "Light Shoryuken", 0, ifelse(command = "Medium Shoryuken", 1, 2))

[State 0, AI]
type = varset
triggerall = AILevel
trigger1 = time = 0
var(19) = ifelse(prevstateno = 5120, 0, 2)

[State 0, anim]
type = changeanim
trigger1 = time = 0
value = ifelse(!var(19), 1100, ifelse(var(19) = 1, 1101, 1102))

[State 0, State]
type = StateTypeSet
trigger1 = AnimElem = 4
statetype = A
physics = N

[State 0, pos]
type = posset
trigger1 = time = 0
y = 0

[State 0, Dust]
type = explod
trigger1 = animelem = 4
vel = 0, 0
anim = 10050
sprpriority = 3
postype = p1
pos = 0, 0
ownpal = 1
scale = 0.5, 0.5
pausemovetime = -1
supermovetime = -1

[State 0, Cheat]
type = NotHitBy
trigger1 = AnimElemtime(2) < 0 && !var(19)
trigger2 = AnimElemTime(3) < 0 && var(19) = 1
trigger3 = AnimElemtime(4) < 0 && var(19) = 2
value = SCA
ignorehitpause = 1

[State 0, Vel]
type = VelSet
trigger1 = AnimElemTime(4) = 0
x = ifelse(!var(19), 4, ifelse(var(19) = 1, 6, 8))
y = ifelse(!var(19), -5, ifelse(var(19) = 1, -7, -9))

[State 0, vel]
type = VelAdd
trigger1 = AnimElemTime(4) > 0
x = ifelse(vel x <= 0, 0, -.5)
y = .5

[State 0, snd]
type = playsnd
trigger1 = AnimElem = 1
value = S51, 3

[State 0, snd]
type = playsnd
trigger1 = AnimElem = 4
value = S40, 0

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

[State 0, hit]
type = HitDef
triggerall = !var(4) && (var(2) < 1 || var(15))
trigger1 = AnimElem = 2
attr = S, SA
damage = ceil(ifelse(fvar(11) * ifelse(!var(19), 70, ifelse(var(19) = 1, 77, 84)) < 7, 7, fvar(11) * ifelse(!var(19),70, ifelse(var(19) = 1, 77, 84)))), 8
getpower = !var(15)*140, !var(15)*35
givepower = 35, 35
animtype = Heavy
air.animtype = back
fall.animtype = back
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = ceil(12*(2-(Var(15)>0))/2),ceil(12*(2-(Var(15)>0))/2)
guard.pausetime = ceil(10*(2-(Var(15)>0))/2),ceil(10*(2-(Var(15)>0))/2)
hitsound = S2, 2
guardsound = S6, 0
ground.type = Low
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 12
ground.velocity = 0
guard.velocity = -5.77*(2-(Var(15)>0))/2
airguard.velocity = -5.33,-1
air.type = High
air.velocity = -2, -7.33334
air.hittime = 120
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
air.fall = 1
fall.recover = 1
fall.recovertime = 120
air.recover = 0
ID = 1005
yaccel = .5
envshake.time = 12
fall.envshake.time = ceil(ifelse(!var(19), 10, ifelse(var(19) = 1, 11, 12)) * (ifelse(var(5), 1.2, 1)))
fall.envshake.freq = 0.0
fall.envshake.ampl = 0
fall.envshake.phase = 0.0
sparkno = S-1 + 0 * (var(33) := 8013)
guard.sparkno = S-1 + 0 * (var(34) := 8001)
sparkxy = -10 + 0 * (var(35) := 35), var(36) := -30

[State 0, hit]
type = HitDef
triggerall = !var(4) && (var(2) < 1 || var(15)) || numtarget(1004) || numtarget(1005)
trigger1 = AnimElem = 3
attr = A, SA
damage = ceil(ifelse(fvar(11) * 28 < 7, 7, fvar(11) * 28)), 3
getpower = !var(15)*140, !var(15)*35
givepower = 35, 35
animtype = heavy
air.animtype = back
fall.animtype = back
Id = 1005
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = ceil(11*(2-(Var(15)>0))/2),ceil(11*(2-(Var(15)>0))/2)
guard.pausetime = ceil(10*(2-(Var(15)>0))/2),ceil(10*(2-(Var(15)>0))/2)
hitsound = S2, 2
guardsound = S6, 0
ground.type = Low
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 12
ground.velocity = 0
guard.velocity = -5.77*(2-(Var(15)>0))/2
airguard.velocity = -5.33,-1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
air.type = Low
air.velocity = -2, -7.33334
air.hittime = 120
air.fall = 1
fall.recover = 1
fall.recovertime = 120
air.recover = 0
yaccel = .5
envshake.time = 12
fall.envshake.time = ceil(9 * (ifelse(var(5), 1.2, 1)))
fall.envshake.freq = 0.0
fall.envshake.ampl = 0
fall.envshake.phase = 0.0
sparkno = S-1 + 0 * (var(33) := 8013)
guard.sparkno = S-1 + 0 * (var(34) := 8001)
sparkxy = -10 + 0 * (var(35) := 35), var(36) := -80

[State 0, hit]
type = HitDef
triggerall = !var(4) && (var(2) < 1 || var(15)) || numtarget(1005)
trigger1 = AnimElem = 4
attr = A, SA
damage = ceil(ifelse(fvar(11) * 21 < 7, 7, fvar(11) * 21)), 3
getpower = !var(15)*140, !var(15)*35
givepower = 35, 35
animtype = Up
Id = 1006
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = ceil(12*(2-(Var(15)>0))/2),ceil(12*(2-(Var(15)>0))/2)
guard.pausetime = ceil(10*(2-(Var(15)>0))/2),ceil(10*(2-(Var(15)>0))/2)
hitsound = S2, 2
guardsound = S6, 0
ground.type = High
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 12
airguard.velocity = -5.33,-1
ground.velocity = -2, -9
guard.velocity = -5.77*(2-(Var(15)>0))/2
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
air.type = High
air.velocity = -2, -8
air.hittime = 120
fall = 1
fall.recover = 1
fall.recovertime = 120
air.recover = 0
yaccel = .5
envshake.time = 12
fall.envshake.time = ceil(3 * (ifelse(var(5), 1.2, 1)))
fall.envshake.freq = 0.0
fall.envshake.ampl = 0
fall.envshake.phase = 0.0
sparkno = S-1 + 0 * (var(33) := 8013)
guard.sparkno = S-1 + 0 * (var(34) := 8001)
sparkxy = -10 + 0 * (var(35) := 21), var(36) := -110

[State 0, AI]
type = changestate
triggerall = AILevel && enemy, life && power >= 1000 && statetype = A
triggerall = AnimElemtime(4) > 0 && (p2bodydist y = [-20, 15]) && enemy, statetype = A
trigger1 = movehit
value = 3050
ignorehitpause = 1

[State 0, idle]
type = statetypeset
trigger1 = AnimElemtime(5) >= 0
movetype = I

[State 0, Change]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 1007
ctrl = 0

;----------------------------------------------------------------------
;Shoryuken landing state
[Statedef 1007]
type = S
movetype = I
physics = S
velset = 0,0
ctrl = 0
anim = 1105

[State 0, Dust]
type = explod
trigger1 = !time
vel = 0, 0
anim = 10055
sprpriority = 0
postype = p1
pos = 0, 0
ownpal = 1
scale = 0.5, 0.5
pausemovetime = -1
supermovetime = -1

[State 0, Pos]
type = PosSet
trigger1 = Time = 0
y = 0

[State 0, snd]
type = playsnd
trigger1 = !time
value = S47, 0

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

;-------------------------------------------------------------------------
;Tatsumaki Senpuu Kyaku
[Statedef 1200]
type = A
movetype = A
physics = N
facep2 = 1
ctrl = 0
poweradd = ifelse(var(15), 0, ifelse(!var(19), 25, ifelse(var(19) = 1, 30, 35)))
velset = 0, 0

[State 0, AI]
type = varset
trigger1 = !time && AILevel
var(19) = ifelse(p2bodydist x < 65, 0, ifelse(random < 750, 2, 1))

[State 0, var]
type = varset
trigger1 = !time && !AILevel
var(19) = ifelse(command = "tatsu light", 0, ifelse(command = "tatsu medium", 1, 2))

[State 0, anim]
type = changeanim
trigger1 = time = 0
value = ifelse(!var(19), 1200, ifelse(var(19) = 1, 1201, 1202))

[State 0, pos]
type = posset
trigger1 = Time = 0
y = 0

[State 0, Vel]
type = VelSet
trigger1 = AnimElem = 2
x = ifelse(!var(19), 2.5,ifelse(var(19) = 1, 3.125, 3.75))
y = -4;-3.625;-4

[State 0, Stay]
type = Velset
trigger1 = AnimElem = 6
Y = 0

[State 0, vel]
type = Veladd
trigger1 = AnimElemTime(6) < 0
trigger2 = !var(19) && AnimElemTime(13) > 0      ;14, 32,37
trigger3 = var(19) = 1 && AnimElemTime(24) > 0
trigger4 = var(19) = 2 && AnimElemTime(30) > 0
y = .375

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

[State 0, Width]
type = Width
trigger1 = 1;time > 0
edge = 25,0
player = 10, 0;10

[State 0, snd]
type = playsnd
trigger1 = Animelem = 1 || AnimElem = 4 || AnimElem = 8
trigger2 = var(19) && (AnimElem = 11 || AnimElem = 14 || AnimElem = 17 || Animelem = 20 || Animelem = 23 || AnimElem = 26)
trigger3 = var(19) = 2 && (AnimElem = 29 || AnimElem = 32)
value = 51, 0

[State 0, push]
type = PlayerPush
trigger1 = abs(P2bodydist Y) > 45
value = 0

[State 0, hit1]
type = HitDef
triggerall = !var(4) && (var(2) < 1 || var(15))
trigger1 = AnimElem = 2
attr = A, SA
damage = ceil(ifelse(fvar(11) * 35 < 7, 7, fvar(11) * 35)), 4
animtype = Up
;air.animtype = back
;fall.animtype = back
guardflag = MA
hitflag = MAF
getpower = !var(15)*70, !var(15)*35
givepower = 35, 35
priority = 7, hit
pausetime = ceil(11*(2-(Var(15)>0))/2),ceil(11*(2-(Var(15)>0))/2)
guard.pausetime = ceil(10*(2-(Var(15)>0))/2),ceil(10*(2-(Var(15)>0))/2)
;sparkno = 10+(random%4)
;guard.sparkno = 41
;sparkxy = -10, -50
hitsound = S2, 5
guardsound = S6, 0
ground.type = Low
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 12
ground.velocity = -4.5, -8.75;-7.5;-8.125
guard.velocity = -5.77*(2-(Var(15)>0))/2
airguard.velocity = -5.33,-1
air.type = High
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
air.velocity = -4.5, -7.75
fall = 1
fall.recover = 1
fall.recovertime = 120
air.hittime = 120
yaccel = .5
id = 1200;ifelse(!var(19), 1200, 1201)
forcestand = 1
envshake.time = 10
fall.envshake.time = ceil(5 * (ifelse(var(5), 1.2, 1)))
fall.envshake.freq = 0.0
fall.envshake.ampl = 0
fall.envshake.phase = 0.0
sparkno = S-1 + 0 * (var(33) := 8013)
guard.sparkno = S-1 + 0 * (var(34) := 8001)
sparkxy = -10 + 0 * (var(35) := 25), var(36) := -50

[State 0, hit2]
type = HitDef
triggerall = !var(4) && var(2) < ifelse(var(19) = 2, 3, 2);!var(4) && (var(2) < 1 || var(15)) || numtarget(1200) || numtarget(1201)
trigger1 = AnimElemtime(8) = 0
trigger2 = AnimElemtime(14) = 0 && var(19)
trigger3 = AnimElemtime(20) = 0 && var(19)
trigger4 = AnimElemtime(26) = 0 && var(19) = 2
trigger5 = AnimElemtime(32) = 0 && var(19) = 2
attr = A, SA
damage = ceil(ifelse(fvar(11) * 42 < 7, 7, fvar(11) * 42)), 5
animtype = up;Hard
;air.animtype = back
;fall.animtype = back
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = ceil(11*(2-(Var(15)>0))/2),ceil(11*(2-(Var(15)>0))/2)
guard.pausetime = ceil(10*(2-(Var(15)>0))/2),ceil(10*(2-(Var(15)>0))/2)
getpower = !var(15)*70, !var(15)*35
givepower = 35, 35
;sparkno = 10+(random%4)
;guard.sparkno = 41
;sparkxy = -10, -70
hitsound = S2, 5
guardsound = S6, 0
ground.type = High
ground.slidetime = 18
guard.hittime = 12
ground.hittime = 19
ground.velocity = -1*ifelse(p2dist x>0,1,-1),-8.5
guard.velocity = -5.77*(2-(Var(15)>0))/2
airguard.velocity = -5.33,-1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
air.type = High
air.velocity = -1*ifelse(p2dist x>0,1,-1),-7.5
fall = 1
fall.recover = 1
fall.recovertime = 120
air.hittime = 120
yaccel = .5
ID = ifelse(numtarget(1200), 1200, 1201)
envshake.time = 15
fall.envshake.time = ceil(3 * (ifelse(var(5), 1.2, 1)))
fall.envshake.freq = 0.0
fall.envshake.ampl = 0
fall.envshake.phase = 0.0
sparkno = S-1 + 0 * (var(33) := 8013)
guard.sparkno = S-1 + 0 * (var(34) := 8001)
sparkxy = -10 + 0 * (var(35) := 58), var(36) := -70

[State 0, var]
type = varset
trigger1 = movehit && !var(19)
trigger2 = movehit && var(19) = 1 && var(2) < 2
var(2) = 0

[State 0, idle]
type = statetypeset
trigger1 = AnimElemtime(11) >= 0 && !var(19)
trigger2 = AnimElemtime(29) >= 0 && var(19) = 1
trigger3 = AnimElemtime(35) >= 0 && var(19) = 2
movetype = I

[State 0, end]
type = ChangeState
triggerall = animelemtime(2) > 0
trigger1 = pos y >= 0 && vel y > 0
value = 1205

;-------------------------------------------------------------------------
;Hurricane land
[Statedef 1205]
type = S
movetype = I
physics = S
ctrl = 0
anim = ifelse(!var(19), 47, 1205)
velset = 0, 0

[State 0, Dust]
type = explod
trigger1 = !time
vel = 0, 0
anim = 10055
sprpriority = 0
postype = p1
pos = 0, 0
ownpal = 1
scale = 0.5, 0.5
pausemovetime = -1
supermovetime = -1

[State 0, pos]
type = posset
trigger1 = Time = 0
y = 0

[State 0, Snd]
type = PlaySnd
trigger1 = Time = 0
value = S47, 0;105, 0

[State 0, AI]
type = changestate
triggerall = AILevel && enemy, life && numtarget
triggerall = p2bodydist x < 30 && (p2bodydist y = [-35, 0]) && enemy, statetype = A
trigger1 = !Animtime
value = ifelse(((power = [500, 999]) && random < 250), 2100, 1100)
ignorehitpause = 1

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

;------------------------------------------------------------------------
;Aerial Tatsumaki
[Statedef 1300]
type = A
movetype = A
physics = N
ctrl = 0
anim = 1025
poweradd = ifelse(var(15), 0, ifelse(!var(19), 25, ifelse(var(19) = 1, 30, 35)))

[State 0, AI]
type = varset
triggerall = AILevel
triggerall = p2bodydist x = [75, 150]
triggerall = random < 150
trigger1 = !time
var(19) = 0

[State 0, AI]
type = varset
triggerall = AILevel
triggerall = p2bodydist x = [55, 120]
triggerall = random < 150
trigger1 = !time
var(19) = 1

[State 0, AI]
type = varset
triggerall = AILevel
triggerall = p2bodydist x < 65
triggerall = random < 350
trigger1 = !time
var(19) = 2

[State 0, var]
type = varset
trigger1 = time = 0
var(19) = ifelse(command = "tatsu light", 0, ifelse(command = "tatsu medium", 1, 2))

[State 0, snd]
type = playsnd
trigger1 = AnimElem = 1
value = S3, 11
channel = 0

[State 0, snd]
type = playsnd
trigger1 = Animelem = 4
trigger2 = AnimElem = 6
trigger3 = AnimElem = 10
trigger4 = AnimElem = 12
value = 51, 0

[State 0, Vel] ;Given to me by Jesuszilla
type = VelAdd
trigger1 = AnimElem = 1
x = ifElse(Vel X >= 0, 1+(Var(19)*0.5), -1-(Var(19)*0.5))

[State 0, Vel] ;Also from Jesuszilla
type = VelAdd
trigger1 = Time > 2
y = .325 ;.125

[state 0, push]
type = playerpush
trigger1 = AnimElemTime(6) > 0
value = 0

[State 0, hit]
type = HitDef
triggerall = !movehit
triggerall = !var(4) && (var(2) < 1 || var(15))
trigger1 = AnimElem = 5
trigger2 = AnimElem = 7
trigger3 = AnimElem = 11
trigger4 = Animelem = 13
attr = A, SA
damage = ceil(ifelse(fvar(11) * 42 < 7, 7, fvar(11) * 42)), 5
animtype = Up;Hard
;air.animtype = back
;fall.animtype = back
guardflag = HA
hitflag = MAF
getpower = !var(15)*140, !var(15)*35
givepower = 35, 35
priority = 7, Hit
pausetime = ceil(10*(2-(Var(15)>0))/2),ceil(10*(2-(Var(15)>0))/2)
guard.pausetime = ceil(10*(2-(Var(15)>0))/2),ceil(10*(2-(Var(15)>0))/2)
;sparkno = 10+(random%4)
;guard.sparkno = 41
;sparkxy = -10, -70
hitsound = S2, 5
guardsound = S6, 0
ground.type = High
ground.slidetime = 17
ground.hittime = 17
ground.velocity = -2, -7;-5.77*(2-(Var(15)>0))/2
guard.velocity = -5.77*(2-(Var(15)>0))/2
airguard.velocity = -5.33,-1
air.type = High
air.velocity = -2, -6
air.hittime = 120
fall = 1
air.recover = 0
fall.recover = 1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
fall.recovertime = 120
yaccel = .5
envshake.time = 12
fall.envshake.time = ceil(7 * (ifelse(var(5), 1.2, 1)))
fall.envshake.freq = 0.0
fall.envshake.ampl = 0
fall.envshake.phase = 0.0
sparkno = S-1 + 0 * (var(33) := 8013)
guard.sparkno = S-1 + 0 * (var(34) := 8001)
sparkxy = -10 + 0 * (var(35) := 58), var(36) := -70

[State 0, var]
type = varset
trigger1 = movehit
var(2) = 0

[State 0, idle]
type = statetypeset
trigger1 = AnimElemtime(14) >= 0
movetype = I

[State 0, end]
type = ChangeState
trigger1 = Pos Y >= 0 & Vel Y > 0
value = 1305
ctrl = 1

;-------------------------------------------------------------------------
;Hurricane land
[Statedef 1305]
type = S
movetype = I
physics = S
ctrl = 0
anim = 47
velset = 0, 0
facep2 = 1

[State 0, pos]
type = posset
trigger1 = Time = 0
y = 0

[State 0, Dust]
type = explod
trigger1 = !time
vel = 0, 0
anim = 10055
sprpriority = 0
postype = p1
pos = 0, 0
ownpal = 1
scale = 0.5, 0.5
pausemovetime = -1
supermovetime = -1

[State 0, Snd]
type = PlaySnd
trigger1 = Time = 0
value = 47, 0

[State 0, AI]
type = changestate
triggerall = AILevel
triggerall = var(9) = [0, 3]
triggerall = p2statetype != A
triggerall = p2statetype != L
triggerall = p2bodydist x = [0, 25]
triggerall = facing = 1
trigger1 = !Animtime && numtarget
value = ifelse(power>=500,2100,1101)

[State 0, AI]
type = changestate
triggerall = AILevel
triggerall = var(9) = [4, 6]
triggerall = p2statetype = S
triggerall = p2bodydist x = [0, 20]
triggerall = facing = 1
trigger1 = !AnimTime && numtarget
value = 210

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

;----------------------------------------------------------------------
;Hadouken
[Statedef 1000]
type = S
movetype = A
Physics = S
velset = 0, 0
ctrl = 0
poweradd = ifelse(var(15), 0, ifelse(!var(19), 25, ifelse(var(19) = 1, 30, 35)))
anim = 1000
facep2 = 1

[State 0, AI]
type = varset
triggerall = AILevel
trigger1 = !time
var(19) = 2

[State 0, varset]
type = varset
trigger1 = time = 0
var(19) = ifelse(command = "Light Hadouken", 0, ifelse(command = "Medium Hadouken", 1, 2))

[State 0, anim]
type = changeanim
trigger1 = time = 0
value = ifelse(!var(19), 1000, ifelse(var(19) = 1, 1001, 1002))

[State 0, Width]
type = Width
trigger1 = Animelemtime(5) = 0
value = 15,0

[State 0, var]
type = varset
trigger1 = AnimElemtime(5) = 0
var(44) = ceil(p2bodydist x)

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

[State 0, snd]
type = playsnd
trigger1= AnimElem = 5
value = S1000, 5

[State 0, Hadouken]
type = helper
trigger1 = animelemtime(5) = 1
helpertype = normal
stateno = 10000
ID = 1000
name = "Hadouken"
postype = p1
pos = 76, -65
size.xscale = 1;0.5
size.yscale = 1;0.5
ownpal = 1
;supermovetime = 40

[State 0, idle]
type = statetypeset
trigger1 = AnimElemtime(12) >= 0
movetype = I

[State 0, AI]
type = changestate
triggerall = AILevel && enemy, life && power >= 1000 && statetype != A && numtarget
triggerall = (p2bodydist y = [-35, 0]) && enemy, statetype != A
trigger1 = AnimElemtime(5) = [2, 8]
value = ifelse(power >= 3000, 3400, 3000)
ignorehitpause = 1

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

;--Zankuu Hadouken
[Statedef 1050]
type = A
physics = A
movetype = A
anim = 1050
ctrl = 0
poweradd = 25+(var(19) * 5)
sprpriority = 1

[State 0, var]
type = varset
trigger1 = !time && !AIlevel
var(19) = ifelse(command = "Light Hadouken", 0, ifelse(command = "Medium Hadouken", 1, 2))

[State 0, var]
type = varset
trigger1 = !time && AIlevel
var(19) = ifelse((p2movetype = H || random < 333), 2, ifelse(random < 500, 1, 0))

[State 0, width]
type = width
trigger1 = animelemtime(2) = -1 || animelemtime(5) = -1
value = 27, 0

[State 0, Hado]
type = helper
trigger1 = animelem = 2 || animelem = 5
helpertype = normal
stateno = 10050
ID = 1055
name = "Hadouken"
postype = p1
pos = ifelse((animelem = 2), 54, 67), ifelse((animelem = 2), -48, -48)
ownpal = 1
size.xscale = 1;0.75
size.yscale = 1;0.75

[State 0, Snd]
type = playsnd
trigger1 = animelem = 2 || animelem = 5
value = 3, 10
channel = 0

[State 0, Snd]
type = playsnd
trigger1 = animelem = 2 || animelem = 5
value = 1000, 5
channel = 1

;----------------------------------------------------------------------
;Hadouken
[Statedef 1600]
type = S
movetype = A
Physics = S
velset = 0, 0
ctrl = 0
poweradd = ifelse(var(15), 0, ifelse(!var(19), 25, ifelse(var(19) = 1, 30, 35)))
anim = 1600

[State 0, varset]
type = varset
trigger1 = time = 0
var(19) = ifelse(command = "sHado", 0, ifelse(command = "sHado2", 1, 2))

[State 0, anim]
type = changeanim
trigger1 = time = 0
value = ifelse(!var(19), 1600, ifelse(var(19) = 1, 1601, 1602))

[State 0, Width]
type = Width
trigger1 = Animelemtime(8) = 0
value = 15,0

[State 0, Aura]
type = helper
trigger1 = animelem = 3
helpertype = normal
stateno = 6000
ID = 6000
postype = p1
ownpal = 1
persistent = 0

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

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

[State 0, Snd]
type = playsnd
trigger1 = animelem = 8
value = 1000, 5

[State 0, Hadouken]
type = helper
trigger1 = animelemtime(8) = 1
helpertype = normal
stateno = 15000
ID = 1000
name = "Hadouken"
postype = p1
pos = 76, -65
size.xscale = 1;0.5
size.yscale = 1;0.5
ownpal = 1
;supermovetime = 40

[State 0, idle]
type = statetypeset
trigger1 = AnimElemtime(12) >= 0
movetype = I

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

;ASHURA SENKUU
[Statedef 1400]
type = S
physics = N
movetype = I
anim = 1400
velset = 0, 0
ctrl = 0
sprpriority = -1
facep2 = 1

[State 0, Strength]
type = varset
trigger1 = !time && !AIlevel
var(19) = ifelse(command = "df3p", 3, ifelse(command = "df3k", 2, ifelse(command = "db3p", -3, -2)))

[State 0, Anim]
type = changeanim
trigger1 = !time && (prevstateno = 195 || prevstateno = 1020 || prevstateno = 1500)
value = 1400
elem = 3

[State 0, afterimage]
type = afterimage
trigger1 = animelem = 3 && !var(15)
time = 2
timegap = 1
framegap = 6
length = ifelse((var(19) = 3 || var(19) = -3), 24, 18)
palbright = 0, 0, 0
paladd = 0, 0, 0
palmul = 0.9, 0.9, 0.9
palcontrast = 160, 160, 160
palpostbright = 0, 0, 0
trans = add1

[State 0, Aura]
type = helper
trigger1 = animelem = 3
helpertype = normal
stateno = 6000
ID = 6000
postype = p1
ownpal = 1
persistent = 0

[State 0, Vel]
type = velset
trigger1 = animelemtime(2) > 0 && animelemtime(6) < 0
x = ifelse(var(19) = 3, -7, ifelse(var(19) = 2, -4, ifelse(var(19) = -3, 7, 4))) * sin((time -2) / 2)

[State 0, Vel]
type = velset
trigger1 = animelem = 6
x = ifelse(var(19) = 3, 14, ifelse(var(19) = 2, 9, ifelse(var(19) = -3, -14, -9)))

[State 0, Vel]
type = velmul
trigger1 = animelemtime(6) > ifelse((var(19) = 3 || var(19) = -3), 16, 9)
x = 0.9

[State 0, Snd]
type = playsnd
trigger1 = animelem = 6
value = 5, 6
persistent = 0

[State 0, Push]
type = playerpush
trigger1 = animelemtime(3) >= 0
value = 0

[State 0, nhb]
type = nothitby
triggerall = animelemtime(6) <= ifelse((var(19) = 3 || var(19) = -3), 35, 20)
trigger1 = animelemtime(6) < 0
trigger2 = vel x < 0 && backedgebodydist > ifelse((var(19) = 3 || var(19) = -3), 14, 9)
trigger3 = vel x > 0 && frontedgebodydist > ifelse((var(19) = 3 || var(19) = -3), 14, 9)
value = SCA, AA, AP, AT
time = 1
ignorehitpause = 1

[State 0, Turn]
type = turn
trigger1 = animelemtime(6) > 0 && p2dist x < 0

[State 0, End]
type = changestate
trigger1 = animelemtime(6) = ifelse((var(19) = 3 || var(19) = -3), 40, 25)
trigger2 = animelemtime(6) > 0 && vel x < 0 && backedgebodydist <= 0
trigger3 = animelemtime(6) > 0 && vel x > 0 && frontedgebodydist <= 0
value = 0
ctrl = 1

;Roll
[Statedef 1500]
type = S
movetype = I
physics = N
ctrl = 0
velset = 0,0
facep2 = 1
Anim = 1500
poweradd = ifelse(var(15), 0, ifelse(!var(19), 25, ifelse(var(19) = 1, 30, 35)))

[State 0, var]
type = varset
trigger1 = !time
var(19) = ifelse(command = "light roll", 0, ifelse(command = "medium roll", 1, 2))

[State 0, anim]
type = changeanim
trigger1 = !time
value = ifelse(!var(19), 1500, ifelse(var(19) = 1, 1501, 1502))

[State 0, vel]
type = VelSet
trigger1 = AnimElem = 1
x = 4

[State 0, vel]
type = velset
trigger1 = AnimElem = 8
x = 0

[State 0, push]
type = playerpush
trigger1 = AnimElemtime(8) < 0
value = 0

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

;Counter
[Statedef 1700]
type = S
movetype = I
physics = S
ctrl = 0
velset = 0, 0
poweradd = ifelse(var(15), 0, ifelse(!var(19), 25, ifelse(var(19) = 1, 30, 35)))
anim = 1700
facep2 = 1

[State 0, var]
type = varset
trigger1 = !time
var(19) = ifelse(command = "Pcounter", 0, 1)

[State 0, Anim]
type = changeanim
trigger1 = !time && var(19)
value = 1701

[State 0, state]
type = statetypeset
trigger1 = anim = 1701
statetype = C
physics = C

[State 0, Reversal]
type = reversaldef
trigger1 = anim = 1700 && animelem = 3
reversal.attr = SCA, AA
p1stateno = 1705
pausetime = 0, 20
hitsound = s6, 0
sparkno = -1;s7001
sparkxy = 0, 0
numhits = 0

[State 0, Reversal]
type = reversaldef
trigger1 = anim = 1701 && animelem = 3
reversal.attr = SC, AA
p1stateno = 1705
pausetime = 0, 20
hitsound = s6, 0
sparkno = -1;s7001
sparkxy = 0, 0
numhits = 0

[State Idle]
type = statetypeset
trigger1 = animelemtime(4) >= 0
movetype = I

[State 0, End]
type = changestate
trigger1 = !animtime
value = ifelse(anim = 1701, 11, 0)
ctrl = 1

;---------------------------------------------------------------------------
;?V???é?ô?i?­?®j
[Statedef 1705]
type    = A
movetype = A
physics = N
juggle = 0
velset = 0,0
ctrl = 0
anim = 1710

[State 0, snd]
type = PlaySnd
trigger1 = Time = 0
value = 4,13
channel = 0

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

[State 0, Cloth]
type = Helper
trigger1 = Time = 0
ID = 3405
stateno = 3405
postype = p1
pos = 0,0
name = "misogi1"

[State 0, Cloth]
type = Helper
trigger1 = Time = 0
ID = 3406
stateno = 3405
postype = p1
pos = 0,0
name = "misogi2"

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

[State 0, pos]
type = PosAdd
trigger1 = Time = 0
x = (P2dist X)-20
y = -180

[State 0, Vel]
type = VelAdd
trigger1 = time > 0
y = .9

[State 0, hit]
type = HitDef
trigger1 = AnimElem = 2
attr = A, SA
animtype = hard
air.animtype = back
fall.animtype = back
hitflag = MAF
guardflag = HA
priority = 7, Miss
pausetime = 0, 0
guard.pausetime = ceil(12*(2-(var(15)>0))/2),ceil(12*(2-(var(15)>0))/2)
hitsound = S2,2
guardsound = S6,0
damage = ceil(ifelse(fvar(11) * 140 < 7, 7, fvar(11) * 140)), 14
p2facing = 1
ground.type = low
ground.velocity = 0,0
guard.velocity = -8
air.velocity = -5,20
airguard.velocity = -6.67,-1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -11.2
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
ground.slidetime = 20
ground.hittime = 20
guard.ctrltime = 20
envshake.time = 15
envshake.ampl = 4
fall = 1
fall.recover = 0
air.recover = 0
;p2stateno = 5950
getpower = !var(15)*140, !var(15)*35
givepower = 35,35
fall.envshake.time = ceil(20 * (ifelse(var(5), 1.2, 1)))
fall.envshake.freq = 0.0
fall.envshake.ampl = 0
fall.envshake.phase = 0.0
sparkno = S-1 + 0 * (var(33) := 8013)
guard.sparkno = S-1 + 0 * (var(34) := 8001)
sparkxy = -10 + 0 * (var(35) := 58), var(36) := -32

[State 0, target]
type = targetstate
triggerall = var(25) || var(45)
trigger1 = movehit
value = 1750 

[State 0, Change]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 1702

;---------------------------------------------------------------------------
;?V???é?ô?i???nj
[Statedef 1702]
type    = S
physics = S
ctrl = 0
anim = 1715
velset = 0,0

[State 0, Spark]
type = Explod
trigger1 = Time = 0
Anim = 10055
pos = 0, 0
postype = p1
ownpal = 1
sprpriority = -3
;pausemovetime = -1
supermovetime = -1
scale = .5,.5

[State 0, pos]
type = PosSet
trigger1 = Time = 0
y = 0

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

[State 0, Env]
type = EnvShake
trigger1 = Time = 0
time = 12

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

; Cheap KO
[Statedef 1750]
movetype = H
physics = S
ctrl = 0
velset = 0,0
anim = 5030

[State 0, anim]
type = changeanim
triggerall = anim != 5950 && anim != 1750 ;&& anim != 5110
trigger1 = selfanimexist(5950)
value = 5950

[State 0, anim2]
type = changeanim2
trigger1 = anim = 5950 && !Animtime && anim != 1750 ;&& anim != 5110
value = 1750

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

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

[State 0, Change]
type = selfState
trigger1 = (Anim = 1750 && !animtime) || !alive || time > 60
value = ifelse(alive, 5120, 5100)

;
[Statedef 1610]
type = S
movetype = A
physics = S
ctrl = 0
velset = 0, 0
poweradd = ifelse(var(15), 0, 30)
anim = 258
facep2 = 1

[State 0, snd]
type = playsnd
trigger1 = AnimElem = 3
value = S60, 2+(random%7)
channel = 0

[state 0, snd]
type = playsnd
trigger1 = AnimElem = 3
value = S51, 0

[State 0, hit]
type = HitDef
triggerall = !var(4) && (var(2) < 1 || var(15))
trigger1 = AnimElem = 3
attr = S, SA
priority = 7, hit
animtype = Hard
air.animtype = back
fall.animtype = back
damage = ceil(ifelse(fvar(11) * 28 < 7, 7, fvar(11) * 28)), 3
hitflag = MAF
guardflag = MA
getpower = !var(15)*70, !var(15)*35
givepower = 35, 35
pausetime = ceil(11*(2-(Var(15)>0))/2),ceil(11*(2-(Var(15)>0))/2)
guard.pausetime = ceil(10*(2-(Var(15)>0))/2),ceil(10*(2-(Var(15)>0))/2)
hitsound = S2, 5
guardsound = S6,0
ground.type = High
ground.slidetime = 17
ground.hittime = 17
guard.hittime = 13
ground.velocity = -7.66*(2-(Var(15)>0))/2
guard.velocity = -5.77*(2-(Var(15)>0))/2
airguard.velocity = -5.33,-1
air.velocity = -4, -5
Id = 1610
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
air.hittime = 120
air.recover = 0
yaccel = .5
forcestand = 1
envshake.time = 10
fall.envshake.time = ceil(8 * (ifelse(var(5), 1.2, 1)))
fall.envshake.freq = 0.0
fall.envshake.ampl = 0
fall.envshake.phase = 0.0
sparkno = S-1 + 0 * (var(33) := 8013)
guard.sparkno = S-1 + 0 * (var(34) := 8001)
sparkxy = -10 + 0 * (var(35) := 46), var(36) := -75

[State 0, hit]
type = HitDef
triggerall = !var(4) && (var(2) < 1 || var(15)) || numtarget(1610)
trigger1 = AnimElem = 4
attr = S, SA
priority = 7, hit
animtype = Hard
air.animtype = back
fall.animtype = back
damage = ceil(ifelse(fvar(11) * 63 < 7, 7, fvar(11) * 63)), 7
hitflag = MAF
guardflag = MA
getpower = !var(15)*70, !var(15)*35
givepower = 35, 35
pausetime = ceil(11*(2-(Var(15)>0))/2),ceil(11*(2-(Var(15)>0))/2)
guard.pausetime = ceil(10*(2-(Var(15)>0))/2),ceil(10*(2-(Var(15)>0))/2)
hitsound = S2, 5
guardsound = S6, 0
ground.type = High
ground.slidetime = 16
ground.hittime = 16
guard.hittime = 12
ground.velocity = -8.125*(2-(Var(15)>0))/2
airguard.velocity = -5.33,-1
guard.velocity = -5.77*(2-(Var(15)>0))/2
air.recover = 0
yaccel = .5
forcestand = 1
air.velocity = -4, -5
air.hittime = 120
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
envshake.time = 10
fall.envshake.time = ceil(8 * (ifelse(var(5), 1.2, 1)))
fall.envshake.freq = 0.0
fall.envshake.ampl = 0
fall.envshake.phase = 0.0
sparkno = S-1 + 0 * (var(33) := 8013)
guard.sparkno = S-1 + 0 * (var(34) := 8001)
sparkxy = -10 + 0 * (var(35) := 76), var(36) := -95

[State 0, change]
type = changestate
triggerall = AnimElemtime(3) = 2
trigger1 = command = "holdb"
value = 1650
ignorehitpause = 1

[State 0, idle]
type = statetypeset
trigger1 = AnimElemtime(6) >= 0
movetype = I

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

;---------------------------------------------------------------------------
;Back+Heavy Kick
[Statedef 1620]
type = S
movetype = A
physics = S
ctrl = 0
velset = 0,0
poweradd = ifelse(var(15), 0, 35)
anim = 257
facep2 = 1

[State 0, snd]
type = playsnd
trigger1 = AnimElem = 4
value = S60, 2
channel = 0

[state 0, snd]
type = playsnd
trigger1 = AnimElem = 4
value = S51, 0

[State 0, hit]
type = HitDef
triggerall = !var(4) && (var(2) < 1 || var(15))
trigger1 = AnimElem = 5
attr = S, SA
animtype = Hard
air.animtype = back
fall.animtype = back
priority = 7, hit
damage = ceil(ifelse(fvar(11) * 98 < 7, 7, fvar(11) * 98)), 10
hitflag = MAF
guardflag = MA
getpower = !var(15)*140, !var(15)*35
givepower = 35, 35
pausetime = ceil(12*(2-(Var(15)>0))/2),ceil(12*(2-(Var(15)>0))/2)
guard.pausetime = ceil(10*(2-(Var(15)>0))/2),ceil(10*(2-(Var(15)>0))/2)
;sparkno = 0+(random%4)
;guard.sparkno = 40
;sparkxy = -15, -93
hitsound = S2, 5
guardsound = S6,0
ground.type = High
ground.slidetime = 17
ground.hittime = 17
guard.hittime = 13
ground.velocity = -4, -6
guard.velocity = -5.77*(2-(Var(15)>0))/2
airguard.velocity = -5.33,-1
air.velocity = -4, -6
air.hittime = 120
yaccel = .5
fall = 1
fall.recover = 1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
fall.recovertime = 120
envshake.time = 10
fall.envshake.time = ceil(14 * (ifelse(var(5), 1.2, 1)))
fall.envshake.freq = 0.0
fall.envshake.ampl = 0
fall.envshake.phase = 0.0
sparkno = S-1 + 0 * (var(33) := 8013)
guard.sparkno = S-1 + 0 * (var(34) := 8001)
sparkxy = -10 + 0 * (var(35) := 65), var(36) := -101

[State 0, idle]
type = statetypeset
trigger1 = AnimElemtime(7) >= 0
movetype = I

[State 0, change]
type = changestate
triggerall = AnimElemtime(5) = 2
trigger1 = command = "holdc"
value = 1650
ignorehitpause = 1

[state 0, hit]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;Cancel
[Statedef 1650]
type = S
movetype = A
physics = S
ctrl = 0
velset = 0,0
poweradd = ifelse(var(15), 0, 10)
anim = 1705

[State 0, snd]
type = playsnd
trigger1 = AnimElem = 3
value = S60, 2
channel = 0

[state 0, snd]
type = playsnd
trigger1 = AnimElem = 3
value = S51, 0

[State 0, hit]
type = HitDef
triggerall = !var(4) && (var(2) < 1 || var(15))
trigger1 = AnimElem = 4
attr = S, SA
animtype = Heavy
air.animtype = back
fall.animtype = back
damage = ceil(ifelse(fvar(11) * 70 < 7, 7, fvar(11) * 70)), 7
hitflag = MAF
guardflag = HA
getpower = !var(15)*70, !var(15)*35
givepower = 35, 35
pausetime = ceil(11*(2-(Var(15)>0))/2),ceil(11*(2-(Var(15)>0))/2)
guard.pausetime = ceil(10*(2-(Var(15)>0))/2),ceil(10*(2-(Var(15)>0))/2)
hitsound = S2, 5
guardsound = S6, 0
ground.type = Low
ground.slidetime = 17
ground.hittime = 17
guard.hittime = 13
ground.velocity = -8.125*(2-(Var(15)>0))/2
guard.velocity = -5.77*(2-(Var(15)>0))/2
airguard.velocity = -5.33,-1
air.velocity = -4, -5
air.hittime = 120
envshake.time = 9
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
ID = 200
air.recover = 0
fall.envshake.time = ceil(6 * (ifelse(var(5), 1.2, 1)))
fall.envshake.freq = 0.0
fall.envshake.ampl = 0
fall.envshake.phase = 0.0
sparkno = S-1 + 0 * (var(33) := 8013)
guard.sparkno = S-1 + 0 * (var(34) := 8001)
sparkxy = -10 + 0 * (var(35) := 105), var(36) := -62

[State 0, idle]
type = statetypeset
trigger1 = AnimElemtime(5) >= 0
movetype = I

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

;---------------------------------------------------------------------------
; Punch throw grab
[Statedef 800]
type = S
movetype = A
physics = S
ctrl = 0
velset = 0,0
anim = 800
facep2 = 1

[State 0, voice]
type = playsnd
trigger1 = AnimElem = 3
value = S900, 1
channel = 0

[State 0, HitDef]
type = HitDef
triggerall = p2movetype != H && p2statetype != A
trigger1 = AnimElem = 2
attr = S, NT
hitflag = M
priority = 3, Dodge
pausetime = 0, 0
sparkno = -1
p1facing = 1;ifelse(command = "holdfwd", 1, -1)
p2facing = 1
p1stateno = 810
;p2stateno = 811
guard.dist = 0
numhits = 0

[State 0, end]
type = ChangeState
trigger1 = !MoveHit && !AnimTime
value = 0
ctrl = 1

;--------------------------------------------------------------------------
;punch throw
[Statedef 810]
type = S
movetype = A
physics = N
ctrl = 0
velset = 0, 0
anim = 810
sprpriority = 2

[State 0, Tech Hit]
type = changestate
trigger1 = numtarget && time < 7
trigger1 = (target, command = "holdfwd" || target, command = "holdback") && target, command != "holdup" && target, command != "holddown"
trigger1 = (target, command = "x" || target, command = "a")
trigger2 = (enemy, AILevel) && random < 250
value = 900

[State 0, target]
type = targetstate
trigger1 = !time
value = 811

[State 0, Push]
type = PlayerPush
trigger1 = 1
value = 0

[State 0, snd]
type = playsnd
trigger1 = time = 0
value = S900, 10

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

[State 0, Width]
type = Width;
trigger1 = animelemtime(5) < 0
edge = 50, 50

[State 0, width]
type = width
trigger1 = AnimElemtime(5) >= 0 && AnimElemtime(6) < 0
edge = 75, 75

[State 0, width]
type = width
trigger1 = AnimElemtime(6) >= 0
edge = 100, 100

[State 0, push]
type = playerpush
trigger1 = 1
value = 0

[State 0, Bind]
type = TargetBind
trigger1 = AnimElem = 1
pos = -30, 0
time = -1

[State 0, Bind]
type = TargetBind
trigger1 = AnimElem = 2
pos = -27, -65
time = -1

[State 0, Bind]
type = TargetBind
trigger1 = AnimElem = 3
pos = -5,-80
time = -1

[State 0, Bind]
type = TargetBind
trigger1 = AnimElem = 4
pos = 50, -88
time = -1

[State 0, Bind]
type = TargetBind
trigger1 = AnimElem = 5
pos = 74,-58;100, -40
time = -1

[State 0, Bind]
type = TargetBind
trigger1 = AnimElem = 6
pos = 90, -60 ;110,-40
time = 1

[State 0, ow]
type = TargetLifeAdd
trigger1 = AnimElem = 6
value = -119

[State 0, power]
type = poweradd
trigger1 = AnimElem = 1 && !var(15)
value = 70

[State 0, power]
type = targetpoweradd
trigger1 = AnimElem = 6
value = 35

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

;---------------------------------------------------------------------------
; Shoulder Throw Custom State
[Statedef 811]
type = A
movetype = H
physics = N
sprpriority = -1

[State 0, Anim2]
type = ChangeAnim2
trigger1 = !Time
value = 811

[State 0, bound]
type = screenbound
trigger1 = AnimElemTime(5) <= 0
value = 1

[State 0, vel]
type = velset
trigger1 = AnimElem = 6
x = -6
y = -6

[State 0, Vel]
type = VelAdd
trigger1 = AnimElemTime(6) > 0
y = .5

[State 0, Env]
type = EnvShake
trigger1 = Vel Y > 0 && pos Y >= 0
time = 22

[State 0, Explod]
type = Explod
triggerall = AnimElemtime(6) > 0
trigger1 = pos Y >= 0 && vel y > 0
anim = 9999
pos = 0,0
postype = p1
scale = .5, .5
sprpriority = 3
ownpal = 1

[State 0, snd]
type = playsnd
trigger1 = Vel Y > 0 && pos Y >= 0
value = S67, 0

[State 0, turn]
type = turn
triggerall = AnimElemtime(6) > 0
trigger1 = pos y >= 0 && vel y > 0

[State 0, self]
type = SelfState
trigger1 = AnimElemTime(6) > 0
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 5100

;------------------------------------------------------------------------------
; Kick throw attempt
[Statedef 820]
type = S
movetype = A
physics = S
ctrl = 0
velset = 0,0
anim = 800
facep2 = 1

[State 0, voice]
type = playsnd
trigger1 = AnimElemTime(3) = 0
value = S900, 1
channel = 0

[State 0, Hit]
type = HitDef
triggerall = p2statetype != A && p2movetype != H
trigger1 = AnimElem = 2
attr = S, NT
hitflag = M
priority = 3, Dodge
pausetime = 0, 0
sparkno = -1
p1facing = -1
p2facing = 1
p1stateno = 821
;p2stateno = 823
guard.dist = 0
numhits = 0

[State 0, end]
type = ChangeState
trigger1 = !MoveHit && !AnimTime
value = 0
ctrl = 1

;Kick throw itself
[Statedef 821]
type = S
movetype = A
physics = N
velset = 0,0
anim = 821
poweradd = 70

[State 0, target]
type = targetstate
trigger1 = !time
value = 823

[State 0, Tech Hit]
type = changestate
triggerall = numtarget && time < 7
trigger1 = (target, command = "holdfwd" || target, command = "holdback") && target, command != "holdup" && target, command != "holddown"
trigger1 = (target, command = "x" && target, command = "a")
trigger2 = (enemy, AILevel) && random < 250
value = 900

[State 0, Width]
type = Width
trigger1 = animelemtime(5) < 0
edge = 45,45

[State 0, Width]
type = Width
trigger1 = AnimElem = 5
edge = 80,0

[State 0, Width]
type = Width
trigger1 = AnimElem = 6
edge = 125,0

[State 0, push]
type = playerpush
trigger1 = 1
value = 0

[State 0, snd]
type = playsnd
trigger1 = Animelem = 1
value = S900, 1

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

[State 0, Bind]
type = TargetBind
trigger1 = AnimElem = 1
pos = -30, 0
time = -1

[State 0, Bind]
type = TargetBind
trigger1 = AnimElem = 2
pos = -40, -60
time = -1

[State 0, Bind]
type = TargetBind
trigger1 = AnimElem = 3
pos = -25,-70
time = -1

[State 0, Bind]
type = TargetBind
trigger1 = AnimElem = 4
pos = 14,-60
time = 1

[State 0, Bind]
type = targetBind
trigger1 = animelem = 5
pos = 90, -72
time = -1

[State 0, Bind]
type = targetBind
trigger1 = animelem = 6
pos = 100, -54
time = 1

[State 0, ow]
type = TargetLifeAdd
trigger1 = AnimElem = 6
value = -147

[State 0, power]
type = targetpoweradd
trigger1 = AnimElem = 6
value = 35

[State 0, end]
type = changestate
trigger1 = animtime = 0
value = 0 
ctrl = 1

;-----------------------------------------------------------------------------
[Statedef 823]
type = A
movetype = H
physics = N
velset = 0,0
sprpriority = -1

[State 0, anim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 823

[State 0, bound]
type = screenbound
trigger1 = AnimElemTime(6) <= 0
value = 1

[State 0, Vel]
type = VelSet
trigger1 = AnimElem = 6
x = -5.5
y = -6.5

[State 0, Vel]
type = veladd
trigger1 = AnimElemTime(6) > 0
y = .5

[State 0, EnvShake]
type = EnvShake
trigger1 = Vel Y > 0 && pos y >= 0
time = 20

[State 0, Explod]
type = Explod
triggerall = AnimElemtime(6) > 0
trigger1 = pos Y >= 0 && vel y > 0
anim = 9999
pos = 0,0
postype = p1
scale = .5, .5
sprpriority = 3
ownpal = 1

[State 0, turn]
type = turn
triggerall = AnimElemtime(6) > 0
trigger1 = pos y >= 0 && vel y > 0

[State 0, self]
type = SelfState
trigger1 = AnimElemTime(4) > 0
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 5100

;===========< Target Escaped >==========
[Statedef 900]
type = S
physics = N
movetype = I
anim = 5945
ctrl = 0
velset = 0, 0
sprpriority = 1

[State 0, Bind]
type = targetbind
trigger1 = !time && numtarget
pos = 0, 0

[State 0, p2state]
type = targetstate
trigger1 = !time && numtarget
value = 895

[State 0, Throw]
type = targetfacing
trigger1 = !time && numtarget
value = -1

[State 0, Pos]
type = posadd
trigger1 = !time
x = 24

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

[State 0, Push]
type = playerpush
trigger1 = 1
value = 0

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

[State 0, Vel]
type = velset
trigger1 = 1
x = -1.425
y = 0

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

[State 0, FX]
type = playsnd
trigger1 = !time
value = S4850, 0

[State 0, FX]
type = helper
trigger1 = !time
helpertype = normal
stateno = 8000
ID = 8000
name = "Spark"
postype = p1
pos = 0, -48
facing = -1
ownpal = 1
size.xscale = 0.5
size.yscale = 0.5
pausemovetime = 65535
supermovetime = 65535

[State 0, End]
type = changestate
trigger1 = time >= 27
value = 0
ctrl = 1

;--- TARGET ---
[Statedef 895]
type = S
physics = N
movetype = I
ctrl = 0
velset = 0, 0
sprpriority = 1

[State 895, Anim]
type = changeanim
trigger1 = !time
value = ifelse(selfanimexist(5945), 5945, 130)
[State 895, Anim]
type = changeanim
trigger1 = !time && !selfanimexist(5945) && selfanimexist(5910)
value = 5910
[State 895, Anim]
type = changeanim
trigger1 = time >= 20 && anim = 130
value = 140

[State 895, NHB]
type = nothitby
trigger1 = 1
value = SCA
time = 1
[State 895, Push]
type = playerpush
trigger1 = 1
value = 0

[State 895, Pos]
type = posset
trigger1 = !time
y = 0
[State 895, Vel]
type = velset
trigger1 = 1
x = -1.425
y = 0

[State 895, End]
type = selfstate
trigger1 = time >= 27
value = 0
ctrl = 1

;===========< Target Escaped Midair >==========
[Statedef 892]
type = A
physics = N
movetype = I
anim = 892
ctrl = 0
velset = 0, 0
sprpriority = 1

[State 892, Bind]
type = targetbind
trigger1 = !time && numtarget
pos = 48, 0
[State 892, p2state]
type = targetstate
trigger1 = !time && numtarget
value = 897
[State 892, Throw]
type = targetfacing
trigger1 = !time && numtarget
value = -1

[State 892, Pos]
type = posadd
trigger1 = !time
x = 24

[State 892, NHB]
type = nothitby
trigger1 = 1
value = SCA
time = 1
[State 892, Push]
type = playerpush
trigger1 = 1
value = 0

[State 892, Freeze]
type = posfreeze
trigger1 = time < 18
value = 1

[State 892, Vel]
type = velset
trigger1 = time = 18
x = -2
y = -4
[State 892, Vel]
type = veladd
trigger1 = time > 18
y = 0.5

[State 892, Snd]
type = playsnd
trigger1 = animelem = 2
value = 5000, 2
channel = 0

[State 892, FX]
type = playsnd
trigger1 = !time
value = 3, 0

[State 892, FX]
type = helper
trigger1 = !time
helpertype = normal
stateno = 8000
ID = 8000
name = "Spark"
postype = p1
pos = 24, -64
facing = -1
ownpal = 1
size.xscale = 0.5
size.yscale = 0.5
pausemovetime = 65535
supermovetime = 65535

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

;--- TARGET ---
[Statedef 897]
type = A
physics = N
movetype = I
ctrl = 0
velset = 0, 0
sprpriority = 1

[State 897, Anim]
type = changeanim
trigger1 = !time
value = 152
[State 897, Anim]
type = changeanim
trigger1 = time = 18
value = 142

[State 897, NHB]
type = nothitby
trigger1 = 1
value = SCA
time = 1
[State 897, Push]
type = playerpush
trigger1 = 1
value = 0

[State 897, Freeze]
type = posfreeze
trigger1 = time < 18
value = 1

[State 897, Vel]
type = velset
trigger1 = time = 18
x = -2
y = -4
[State 897, Vel]
type = veladd
trigger1 = time >= 18
y = 0.5

[State 897, End]
type = selfstate
trigger1 = vel y > 0
trigger1 = pos y > -vel y
value = 52

;--------------------------------------------------------------------------
;Parry
[Statedef 700]
type = S
movetype = I
physics = S
anim = 700
velset = 0, 0
ctrl = 0
sprpriority = 2
poweradd = 70
facep2 = 1

[State 0, pos]
type = posset
trigger1 = time = 0
y = 0

[State 0, NHB]
type = hitby
trigger1 = 1
value = SCA, AT
time = 1

[State 0, Pause]
type = pause
trigger1 = !time
time = 15
movetime = 15
endcmdbuftime = 15

[State 0, freeze]
type = posfreeze
trigger1 = 1
value = 1

[State 0, Flash]
type = palfx
trigger1 = !time
add = 0, 64, 255
sinadd = 0, -64, -255, 60
time = 15

[State 0, snd]
type = playsnd
trigger1 = AnimElem = 2
value = S180, 4
channel = 0

[State 0, snd]
type = playsnd
trigger1 = AnimElem = 2
value = S4850, 0

[State 0, Spark]
type = explod
trigger1 = animelem = 2
anim = 48500
ID = 4852
sprpriority = 3
postype = p1
pos = 32,-62;36, -67
pausemovetime = 60
ownpal = 1
scale = .5, .5

[State 0, Shake]
type = envshake
trigger1 = !time
time = 0
ampl = 0

[State 0, nowalk]
type = assertspecial
trigger1 = 1
flag= nowalk

[State 0, Change]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;--------------------------------------------------------------------------
;Crouching Parry
[Statedef 701]
type = C
movetype = I
physics = C
anim = 701
velset = 0, 0
ctrl = 0
sprpriority = 2
poweradd = 70
facep2 = 1

[State 0, pos]
type = posset
trigger1 = time = 0
y = 0

[State 0, NHB]
type = hitby
trigger1 = 1
value = SCA, AT
time = 1

[State 0, Pause]
type = pause
trigger1 = !time
time = 15
movetime = 15
endcmdbuftime = 15

[State 0, Stop]
type = posfreeze
trigger1 = 1
value = 1

[State 0, voice]
type = playsnd
trigger1 = AnimElem = 2
value = S180, 4
channel = 0

[State 0, snd]
type = playsnd
trigger1 = AnimElem = 2
value = S4850, 0

[State 0, Flash]
type = palfx
trigger1 = !time
add = 0, 64, 255
sinadd = 0, -64, -255, 60
time = 15

[State 0, Spark]
type = explod
trigger1 = animelem = 2
anim = 48500
ID = 4852
sprpriority = 3
postype = p1
pos = 40, -15;20,-20
pausemovetime = 60
ownpal = 1
scale = .5, .5

[State 0, nowalk]
type = assertspecial
trigger1 = 1
flag= nowalk

[State 0, Change]
type = changestate
trigger1 = animtime = 0
value = 11
ctrl = 1

;--------------------------------------------------------------------------
;Parry
[Statedef 702]
type = A
movetype = I
physics = A
anim = 702
velset = 0, 0
ctrl = 0
sprpriority = 2
poweradd = 70
facep2 = 1

[State 0, Flash]
type = palfx
trigger1 = !time
add = 0, 64, 255
sinadd = 0, -64, -255, 60
time = 15

[State 0, NHB]
type = hitby
trigger1 = 1
value = SCA, AT
time = 1

[State 0, Pause]
type = pause
trigger1 = !time
time = 15
movetime = 15
endcmdbuftime = 15

[State 0, Stop]
type = posfreeze
trigger1 = 1
value = 1

[State 0, snd]
type = playsnd
trigger1 = AnimElem = 2
value = S180, 4
channel = 0

[State 0, snd]
type = playsnd
trigger1 = AnimElem = 2
value = S4850, 0

[State 0, Spark]
type = explod
trigger1 = animelem = 2
anim = 48500
ID = 4852
sprpriority = 3
postype = p1
pos = 40, -65
pausemovetime = 60
ownpal = 1
scale = .5, .5

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

[Statedef 703]
type = A
physics = N
movetype = I
anim = 703
ctrl = 1

[State 703, Vel]
type = velset
trigger1 = !time
x = ifelse(vel x > 2, 2, ifelse(vel x < -2, -2, vel x))
y = ifelse(vel y < -2, vel y, -2)

[State 703, Accel]
type = gravity
trigger1 = 1

[State 703, Land]
type = changestate
trigger1 = vel y > 0 && pos y >= 0
value = 52

;--- HELPER ---
[Statedef 705]
type = A
physics = N
movetype = I
anim = ifelse(root, statetype = C, 706, ifelse(root, statetype = A, 707, 705))
velset = 0, 0
ctrl = 0

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

[State 705, Bind]
type = bindtoroot
trigger1 = 1
time = -1

[State 705, Anim]
type = changeanim
triggerall = !time
trigger1 = !(root, AIlevel) && root, command = "down"
trigger2 = root, AIlevel && (root, statetype != A) && p2statetype = C
value = 706

[State 705, Anim]
type = changeanim
triggerall = !time
trigger1 = !(root, AIlevel) && root, command = "fwd"
trigger2 = root, AIlevel && anim != 706
value = ifelse((root, statetype = A), 707, 705)

[State 705, Anim]
type = changeanim
trigger1 = anim = 705 || anim = 707
value = ifelse((root, statetype = A), 707, 705)

[State 705, Disable]
type = varset
trigger1 = time >= ifelse((root, statetype = A), 7, 8)
trigger2 = facing != (root, facing)
trigger3 = !(root, ctrl)
trigger3 = (root, stateno != [700, 702]) && (root, stateno != 5120)
var(0) = 1

[State 705, Disable]
type = varset
triggerall = !(root, AIlevel)
trigger1 = (root, command = "holdback")
trigger2 = time < 4 && (root, command = "holdfwd" + root, command = "holddown") > 1
trigger3 = time >= 4 && (root, command = "holdfwd" || root, command = "holddown")
trigger4 = time >= 1 && (((anim = 705 || anim = 707) && root, command = "fwd") || (anim = 706 && root, command = "down"))
var(0) = 1

[State 705, Disable]
type = changeanim
trigger1 = var(0) = 1
value = 9741

[State 705, Standing /air]
type = reversaldef
trigger1 = !var(0) && (anim = 705 || anim = 707)
trigger1 = (root, stateno != 5120) || !(root, animtime)
reversal.attr = SCA, AA
p1stateno = 706
pausetime = 0, 0
sparkno = -1
numhits = 0

[State 705, Crouching]
type = reversaldef
trigger1 = !var(0) && anim = 706
reversal.attr = SC, AA
p1stateno = 706
pausetime = 0, 0
sparkno = -1
numhits = 0

[State 705, Disable]
type = reversaldef
trigger1 = var(0) = 1
reversal.attr =
pausetime = 0, 0
sparkno = -1
numhits = 0

[State 705, End]
type = destroyself
trigger1 = time >= 18
trigger2 = (root, movetype != I)
trigger3 = !(root, ctrl) && (root, stateno != [700, 702]) && (root, stateno != 5120)
trigger4 = (root, stateno = [700, 702]) && (root, time <= 1)

;--- Success ---
[Statedef 706]
movetype = I
ctrl = 0

[State 706, Disable]
type = varset
trigger1 = 1
var(0) = 1

[State 706, End]
type = destroyself
trigger1 = root, stateno = [700, 702]
trigger2 = time >= 2


;====================<CUSTOM COMBO>====================
;---GROUND---
[Statedef 910]
type = S
physics = S
movetype = A
anim = 900
velset = 0,0
ctrl = 0
sprpriority = 2
poweradd = -3000

;[State 900, Corner Push]
;type=varset
;trigger1= time=4
;fvar(5)= 0

[State 0, Unguardable]
type = varset
trigger1 = time = 4 && numenemy
trigger1 = (enemynear,stateno!=[120,155])
var(17) = 30

[State 0, NHB]
type = nothitby
trigger1 = !time
value = SCA
time = 38

[State 0, Stop]
type = posfreeze
trigger1 = 1
value = 1

[State 0, Var]
type = varset
trigger1 = time >= 4
var(15) = 334

[State 0, Snd]
type = playsnd
trigger1 = time = 4
value = S3000,0
channel = 0

[State 0, SuperPause FX]
type = helper
trigger1 = time = 4
helpertype = normal
stateno = 8400
ID = 8400
name = "Custom Combo Startup"
postype = p1
pos = ceil(15 * const(size.xscale)), ceil(-60 * const(size.yscale))
supermovetime = 255
size.xscale = 1
size.yscale = 1
ownpal = 1

[State 0, Super Pause]
type = superpause
trigger1 = time = 4
time = 30
movetime = 30
anim = -1
sound = s0,900
p2defmul = 1
darken = 0

[State 0, AfterImage]
type = afterimage
trigger1 = !animtime
time = 999
timegap = 1
framegap = 4
length = 13
palbright = 0,0,0
palcontrast = 64,128,192
palpostbright = 0,0,0
paladd = 0,0,0
palmul = .75,.75,.75
trans = add1

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

;---AIR---
[Statedef 915]
type = A
physics = N
movetype = A
anim = 905
ctrl = 0
sprpriority = 2
poweradd = -3000

;[State 0, Corner Push]
;type = varset
;trigger1 = time = 4
;fvar(5) = 0

[State 0, Unguardable]
type = varset
trigger1 = time = 4 && numenemy
trigger1 = (enemynear,stateno!=[120,155])
var(17) = 30

[State 0, NHB]
type = nothitby
trigger1 = !time
value = SCA
time = 38

[State 0, Stop]
type = posfreeze
trigger1 = 1
value = 1

[State 0, Var]
type = varset
trigger1 = time >= 4
var(15) = 334

[State 0, Snd]
type = playsnd
trigger1 = time = 4
value = S3000, 0
channel = 0

[State 0, SuperPause FX]
type = helper
trigger1 = time = 4
helpertype = normal
stateno = 8400
ID = 8400
name = "Custom Combo Startup"
postype = p1
pos = ceil(5 * const(size.xscale)), ceil(-65 * const(size.yscale))
supermovetime = 255
size.xscale = 1
size.yscale = 1
ownpal = 1

[State 0, Pause]
type = superpause
trigger1 = time = 4
time = 30
movetime = 30
anim = -1
sound = s0,900
p2defmul = 1
darken = 0

[State 0, AfterImage]
type = afterimage
trigger1 = !animtime
time = 999
timegap = 1
framegap = 4
length = 13
palbright = 0,0,0
palcontrast = 64,128,192
palpostbright = 0,0,0
paladd = 0,0,0
palmul = .75,.75,.75
trans = add1

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

[Statedef 916]
type = A
physics = A
movetype = I
anim = 703
ctrl = 1

;[State 0, Grav]
;type=gravity
;trigger1= 1

[State 0, Land]
type=changestate
trigger1 = pos y >= 0 && vel y > 0
value = 52

;--------------------
;-Alpha counter
[Statedef 950]
type = S
physics = S
movetype = I
anim = 950
velset = 0, 0
ctrl = 0
sprpriority = 2
poweradd = -1000
facep2 = 1

[State 0, var]
type = varset
triggerall = !AILevel
trigger1 = !time
var(19) = ifelse(command = "Alpha_p", 0, 1)
ignorehitpause = 1

[State 0, var]
type = varset
triggerall = !AILevel
trigger1 = !time
var(19) = ifelse((p2statetype = A), 0, ifelse((p2statetype = C), 1, ifelse(random < 500, 0, 1)))
ignorehitpause = 1

[State 0, cheat]
type = nothitby
trigger1 = 1
value = SCA
time = 1

[State 0, Stop]
type = posfreeze
trigger1 = 1
value = 1

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

[State 0, Super Pause FX]
type = helper
trigger1 = !time
helpertype = normal
stateno = 8350
ID = 8350
name = "Zero Counter"
postype = p1
pos = ceil(42 * const(size.xscale)), ceil(-71 * const(size.yscale))
supermovetime = 255
ownpal = 1

[State 0, Super Pause]
type = superpause
trigger1 = !time
time = 15
movetime = 15
p2defmul = 1
anim = -1
sound = s0, 750
darken = 0

[State 0, End]
type = changestate
trigger1 = time >= 15
value = ifelse(!var(19), 955, 960)

;---------------------------------------------------------------------------
; Alpha Counter Punch
[Statedef 955]
type = S
movetype = A
physics = S
anim = 1004
velset = 0,0
poweradd = 0
ctrl = 0
facep2 = 1

[State 0, Dust]
type = explod
trigger1 = animelem = 4
vel = 0, 0
anim = 10050
sprpriority = 3
postype = p1
pos = 0, 0
ownpal = 1
scale = 0.5, 0.5
pausemovetime = -1
supermovetime = -1

[State 0, State]
type = StateTypeSet
trigger1 = AnimElem = 4
statetype = A
movetype = A
physics = N

[State 0, pos]
type = posset
trigger1 = time = 0
y = 0

[State 0, Cheat]
type = NotHitBy
trigger1 = AnimElemtime(5) < 0
value = SCA
ignorehitpause = 1

[State 0, Vel]
type = VelSet
trigger1 = AnimElemtime(4) = 0
x = 4
y = -5

[State 0, Vel]
type = VelSet
trigger1 = AnimElemtime(6) = 1 && !var(19) ;4=7;(AnimElemtime(4) > 0 && vel x <= 0) || AnimElem = 5
x = 0

[State 0, vel]
type = velset
trigger1 = AnimElemtime(7) = 0 && !var(19)
y = 0

[State 0, vel]
type = VelAdd
trigger1 = AnimElemTime(4) > 0
x = ifElse(Vel X <= 0, 0, -.5)
y = .5

[State 0, snd]
type = playsnd
trigger1 = AnimElem = 2
value = S1100, 0
channel = 0

[State 0, snd]
type = playsnd
trigger1 = AnimElem = 4
value = S40, 0

[State 0, hit]
type = HitDef
triggerall = !var(4) && (var(2) < 1 || var(15))
trigger1 = AnimElem = 3
attr = S, SA
damage = ceil(ifelse(fvar(11) * 42 < 7, 7, fvar(11) * 42)), 7
animtype = Diagup
air.animtype = Diagup
fall.animtype = Diagup
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = ceil(12*(2-(Var(15)>0))/2),ceil(12*(2-(Var(15)>0))/2)
guard.pausetime = ceil(10*(2-(Var(15)>0))/2),ceil(10*(2-(Var(15)>0))/2)
;sparkno = 0+(random%4)
;guard.sparkno = 40
;sparkxy = -15, -70
hitsound = S2, 2
guardsound = S6, 0
ground.type = Low
ground.slidetime = 17+(Var(5)*4)
ground.hittime = 17+(Var(5)*4)
ground.velocity = -6.5, -6
guard.velocity = -12.65*(2-(Var(15)>0))/2
air.type = High
guard.hittime = 13
air.velocity = -6.5, -6
air.hittime = 120
fall = 1
fall.recover = 1
fall.recovertime = 120
getpower = 0
givepower = 35, 35
air.recover = 0
yaccel = .5
id = 200
envshake.time = 10
fall.envshake.time = 0;ceil(ifelse(var(15), 0, 11) * ifelse(var(5), 1.25, 1))
fall.envshake.freq = 0.0
fall.envshake.ampl = 0
fall.envshake.phase = 0.0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
sparkno = S-1 + 0 * (var(33) := 8012)
guard.sparkno = S-1 + 0 * (var(34) := 8000)
sparkxy = -10 + 0 * (var(35) := 36), var(36) := -80

[State 0, end]
type = ChangeState
trigger1 = pos y >= 0 && vel y > 0
value = 1007
ctrl = 1

;---------------------------------------------------------------------------
; Alpha Counter kick
[Statedef 960]
type = C
movetype = A
physics = C
ctrl = 0
anim = 450
poweradd = 0;ifelse(var(15), 0,15)
velset = 0,0
facep2 = 1

[State 0, snd]
type = playsnd
trigger1 = AnimElem = 2
value = S75, 0+(random%7)
channel = 0

[state 0, snd]
type = playsnd
trigger1 = AnimElem = 2
value = S60, 0

[State 0, hit]
type = HitDef
triggerall = !var(4) && (var(2) < 1 || var(15))
trigger1 = AnimElem = 3
attr = C, SA
damage = ceil(ifelse(fvar(11) * 42 < 7, 7, fvar(11) * 42)), 7
animtype = Diagup
air.animtype = Diagup
fall.animtype = Diagup
hitflag = MAF
guardflag = L
pausetime = ceil(12*(2-(Var(15)>0))/2),ceil(12*(2-(Var(15)>0))/2)
guard.pausetime = ceil(10*(2-(Var(15)>0))/2),ceil(10*(2-(Var(15)>0))/2)
;sparkno = 0+(random%4)
;guard.sparkno = 40
;sparkxy = -45, 0
hitsound = S2, 5
guardsound = S6, 0
ground.type = Heavy
ground.slidetime = 17+(Var(5)*4)
ground.hittime = 17+(Var(5)*4)
guard.hittime = 13
ground.velocity = -8, -6
guard.velocity = -12.65*(2-(Var(15)>0))/2
air.velocity = -8, -6
air.hittime = 120
yaccel = .5
ID = 200
fall = 1
air.recover = 0
fall.recover = 1
fall.recovertime = 120
getpower = 0
givepower = 35, 35
envshake.time = 8
fall.envshake.time = 0;ceil(ifelse(var(15), 0, 9) * ifelse(var(5), 1.25, 1))
fall.envshake.freq = 0.0
fall.envshake.ampl = 0
fall.envshake.phase = 0.0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
sparkno = S-1 + 0 * (var(33) := 8012)
guard.sparkno = S-1 + 0 * (var(34) := 8000)
sparkxy = -10 + 0 * (var(35) := 72), var(36) := 0

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