;--------------------------------------------------------------------
;hadoken
[StateDef 1000]
type = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 1000
poweradd=45

[State 900]
type = VarSet
trigger1 = time = 0
v = 10
value = ifelse(command = "QCF_z",2,ifelse(command = "QCF_y",1,0))

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

[State 1000, Dust]
type = Explod
trigger1 = animelem = 5
anim = 10000
ID = 10000
pos = 10,2
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = -.5,0
accel = 0,0
random = 0,0
removetime = -2
supermove = 9999
pausemove = 9999
scale = .5,.8
sprpriority = 4
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause = 1
persistent =0

[State 0, Helper]
type = Helper
trigger1 = animelem = 5
helpertype = normal ;player
name = "hadouken"
ID = 1000
stateno = 10090
pos = 75,-68
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
sprpriority = 5
supermove = 9999
pausemove = 9999
size.xscale = 1.1
size.yscale = 1.1

[State 1000, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;--------------------------------------------------------------------
;air hadoken
[StateDef 1005]
type = A
movetype= A
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim = 1005
poweradd = 50

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

[State 900]
type = VarSet
trigger1 = time = 0
v = 10
value = ifelse(command = "QCF_z",2,ifelse(command = "QCF_y",1,0))

[State 900]
type = VarSet
trigger1 = time = 0
trigger1 = var(59)>=1
v = 10
value = 2

[State 0, Helper]
type = Helper
trigger1 = animelem = 4
helpertype = normal ;player
name = "hadouken"
ID = 1000
stateno = 10090
pos = 78,-79
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
sprpriority = 5
supermove
pausemove
size.xscale = 1.1
size.yscale = 1.1

[State 0, Gravity]
type = Gravity
trigger1 = time >= 25
;ignorehitpause =
;persistent =

[State 1200, 22]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
;-------------------------------------------------------------
;gou air hadouken
[StateDef 1060]
type = A
movetype= A
physics = A
juggle  = 0
;velset = 0,0
ctrl = 0
anim = 1060
poweradd = 50

[State 0, Width]
type = Width
trigger1 = time = 1
player = 15,0

[State 0, VelAdd]
type = VelAdd
trigger1 =  time = 0
y = -1.5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 6
value = S3,2
channel = -1

[State 900]
type = VarSet
trigger1 = time = 0
v = 10
value = ifelse(command = "QCB_z",2,ifelse(command = "QCB_y",1,0))

[State 0, HitDef]
type = HitDef
Trigger1 = !time
sparkno = -1
guard.sparkno = -1
sparkxy = -10,0
attr = S, NA
damage = 80,5
animtype = hard
getpower = 80
guardflag = MA
hitflag = MAF
pausetime = 4,4
ground.type = high
ground.slidetime = 24
ground.hittime = 24
ground.velocity = -6
air.velocity = -3.3, -4
guard.ctrltime = 40
airguard.velocity = -3, -1.5
fall.recover = 0
sparkno = 9999
guard.sparkno = 41
hitsound = -1;s1,9
guardsound = -1;s2,1
fall.recover = 0
envshake.time = 16
envshake.freq = 60
envshake.ampl = 4
fall = 1

[State 0, Helper]
type = Helper
trigger1 = animelem = 6
helpertype = normal ;player
name = "gou hadouken"
ID = 1061
stateno = 1061
pos = 38,-65
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
sprpriority = 5
supermove
pausemove

[State 1200, 22]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 52
;-------------------------------------------------------------
;------------------------------------------------------------
;shoryuuken debil
[StateDef 1100]
type = S
movetype= A
physics = N
juggle  = 4
velset = 0,0
ctrl = 0
anim = 1100
poweradd=30
sprpriority = 2
facep2 = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S1000,1
volume = 0
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
trigger2 = time = 5
value = S0,2
volume = 0
channel = -1

[State 1100, Position]
type = PosSet
trigger1 = Time = 0
y = 0

[State 1200, Position]
type = Posadd
trigger1 = animelemtime(4) = 0
x = 5*const(size.xscale)

[State 1100, StateType]
type = StateTypeSet
trigger1 = AnimElemTime(4) = 0
StateType = A

[State 1100, Velocity]
type = VelSet
trigger1 = AnimElemTime(4) = 0
x = 2.5*const(size.xscale)
y = -7.5*const(size.yscale)

[State 1100, Velocity]
type = VelSet
trigger1 = vel X = [0,0.1]
x = 0

[State 1110, Gravity]
type = Veladd
trigger1 = AnimElemTime(4) >= 0
y = .50*const(size.yscale)

[State 1110, Velocity]
type = VelMul
trigger1 = AnimElemTime(4) >= 0
x = .85

[State 1105, 1]
type = HitDef
trigger1 != time
attr = A, SA
animtype  = up
air.animtype  = up
damage = 70,5
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 12,12
guard.pausetime = 10,9
sparkno = -1 * (var(40):=8020)**0
guard.sparkno = s4101
sparkxy = var(42):=-15, var(43):=-80
hitsound = s1,4
guardsound = s2,0
air.type = High
ground.type = Low
ground.slidetime = 13
ground.hittime  = 17
guard.hittime = 15
guard.slidetime = 13
guard.ctrltime = 15
ground.velocity = -3.5*const(size.xscale),-11.0*const(size.yscale)
guard.velocity = -5.0*const(size.yscale)
air.velocity = -3.5*ifelse(p2dist x>=5,1,-1)*const(size.xscale),-9.6*const(size.yscale)
fall = 1
fall.recover = 0
fall.envshake.time = 12
fall.envshake.freq = 80
fall.envshake.ampl = -4
down.bounce = 1
air.fall = 1
air.recover = 0
yaccel = .60*const(size.yscale)
envshake.time = 5
envshake.freq = 60
envshake.ampl = 3
;envshake.phase =
P2facing = ifelse(p2dist x>=5,1,-1)
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
persistent = 0

[State 1100, ChangeState]
type = ChangeState
triggerall = Pos Y >= 0 && Vel Y > 0
trigger1 = AnimElemTime(4) > 0
value = 1110
;---------------------------------------------------------------------------
;Shouryuu Ken2
[Statedef 1101]
type    = S
movetype= A
physics = N
juggle  = 4
velset = 0,0
ctrl = 0
anim = 1101
poweradd=30
sprpriority = 2
facep2 = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S1000,1
volume = 0
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
trigger2 = time = 5
value = S0,2
volume = 0
channel = -1

[State 1110, Position]
type = PosSet
trigger1 = Time = 0
y = 0

[State 1200, Position]
type = Posadd
trigger1 = animelemtime(4) = 0
x = 5*const(size.xscale)

[State 1110, StateType]
type = StateTypeSet
trigger1 = AnimElemTime(4) = 0
StateType = A

[State 1110, Velocity]
type = VelSet
trigger1 = AnimElemTime(4) = 0
x = 5.8*const(size.xscale)
y = -9.5*const(size.yscale)

[State 1100, Velocity]
type = VelSet
trigger1 = vel X = [0,0.1]
x = 0

[State 1110, Gravity]
type = Veladd
trigger1 = AnimElemTime(4) >= 0
y = .50*const(size.yscale)

[State 1110, Velocity]
type = VelMul
trigger1 = AnimElemTime(4) >= 0
x = .85

[State 1105, 1]
type = HitDef
trigger1 = (AnimElemtime(2) >= 0) && (AnimElemtime(4) < 0)
attr = S, SA
animtype  = hard
air.animtype  = back
damage = 50,2
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 12,12
guard.pausetime = 10,11
sparkno = -1 * (var(40):=8020)**0
guard.sparkno = s4101
sparkxy = var(42):=-15, var(43):=-50
hitsound = s1,4
guardsound = s2,0
ground.type = high
ground.slidetime = 13
ground.hittime  = ifelse(p2statetype=C,19,17)
guard.hittime = 15
guard.slidetime = 13
guard.ctrltime = 15
ground.velocity = -1*const(size.xscale),ifelse(var(22)=1,-11.8,0)*const(size.yscale)
guard.velocity = -5.0*const(size.yscale)
air.type = low
air.velocity = -3.5*const(size.xscale),-10.4*const(size.yscale)
fall = 0
fall.recover = 0
fall.envshake.time = 12
fall.envshake.freq = 80
fall.envshake.ampl = -4
down.bounce = 1
air.fall = 1
air.recover = 0
yaccel = .60*const(size.yscale)
envshake.time = 5
envshake.freq = 60
envshake.ampl = 2
P2facing = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
persistent = 0

[State 1105, 1]
type = HitDef
trigger1  = (AnimElemtime(4) >= 0) && (AnimElemtime(5) < 3)
attr = A, SA
animtype = up
air.animtype = up
damage = 50,2
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 12, 12
sparkno = -1 * (var(40):=8020)**0
guard.sparkno = s4101
sparkxy = var(42):=-10, var(43):=-110
hitsound = s1,4
guardsound = s2,0
ground.type = Low
ground.slidetime = 13
ground.hittime  = 17
guard.hittime = 15
guard.slidetime = 13
guard.ctrltime = 15
ground.velocity = -3.5*const(size.xscale),-12.0*const(size.yscale)
guard.velocity = -5.0*const(size.xscale)
air.velocity = -3.5*ifelse(p2dist x>=5,1,-1),-10.4*const(size.yscale)
fall = 1
fall.recover = 0
fall.envshake.time = 12
fall.envshake.freq = 80
fall.envshake.ampl = -4
down.bounce = 1
air.fall = 1
air.recover = 0
yaccel = .60*const(size.yscale)
envshake.time = 5
envshake.freq = 60
envshake.ampl = 2
P2facing = ifelse(p2dist x>=5,1,-1)
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
persistent = 0

[State 920]
type = StateTypeSet
trigger1 = AnimElemTime(6) >= 0
movetype = I

[State 1110, ChangeState]
type = ChangeState
triggerall = Pos Y >= 0 && Vel Y > 0
trigger1 = AnimElemTime(4) > 0
value = 1110
;---------------------------------------------------------------------------
;Shouryuu Ken3
[Statedef 1102]
type    = S
movetype= A
physics = N
juggle  = 4
velset = 0,0
ctrl = 0
anim = 1102
poweradd=30
sprpriority = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
trigger2 = time = 5
value = S0,2
volume = 0
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S4000,0
volume =255
channel = 1
freqmul=2.0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S1000,1
volume = 0
channel = -1

[State 1120, Position]
type = PosSet
trigger1 = Time = 0
y = 0

[State 1200, Position]
type = Posadd
trigger1 = animelemtime(6) = 0
x = 5*const(size.xscale)

[State 1120, StateType]
type = StateTypeSet
trigger1 = AnimElemTime(6) = 0
StateType = A

[State 1120, Velocity]
type = VelSet
trigger1 = AnimElemTime(6) = 0
x = 9.1*const(size.xscale)
y = -11.5*const(size.yscale)

[State 1100, Velocity]
type = VelSet
trigger1 = vel X = [0,0.1]
x = 0

[State 1110, Gravity]
type = Veladd
trigger1 = AnimElemTime(6) >= 0
y = .50*const(size.yscale)

[State 1110, Velocity]
type = VelMul
trigger1 = AnimElemTime(6) >= 0
x = .85

[State 0, Explod]
type = Explod
trigger1 = time = 0
anim = 1191
ID =  1191
pos = 20,-30
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove
pausemove
scale = .5,.5
sprpriority = 3
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 1
ignorehitpause = 0

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 6
anim = 1190
ID =  11900
pos = 20,-145
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove
pausemove
scale = .25,.3
sprpriority = 3
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 1
ignorehitpause = 0

[State 1105, 1]
type = HitDef
trigger1 = (AnimElemtime(2) >= 0) && (AnimElemtime(4) < 0)
attr = S, SA
animtype  = hard
air.animtype  = back
damage = 40,2
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 15, 15
sparkno = -1 * (var(40):=8020)**0
guard.sparkno = s4101
sparkxy = var(42):=-15, var(43):=-50
hitsound = s1,4
guardsound = s2,0
ground.type = Low
ground.slidetime = 13
ground.hittime  = ifelse(p2statetype=C,19,17)
guard.hittime = 15
guard.slidetime = 13
guard.ctrltime = 15
ground.velocity = -1*const(size.xscale),ifelse(var(22)=1,-13.0,0)*const(size.yscale)
guard.velocity = -5.0*const(size.xscale)
air.velocity = -3.5*const(size.xscale),-11.0*const(size.yscale)
fall =0
fall.recover = 0
fall.envshake.time = 12
fall.envshake.freq = 80
fall.envshake.ampl = -4
down.bounce = 1
air.fall = 1
air.recover = 0
yaccel = .60*const(size.yscale)
envshake.time = 5
envshake.freq = 60
envshake.ampl = 2
P2facing = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
persistent = 0

[State 1105, 1]
type = HitDef
trigger1 = (AnimElemtime(4) >= 0) && (AnimElemtime(6) < 0)
attr = S, NA
damage = 55,2
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 15, 15
sparkno = -1 * (var(40):=8020)**0
guard.sparkno = s4101
sparkxy = var(42):=-15, var(43):=-78
hitsound = s1,4
guardsound = s2,0
ground.type = high
ground.slidetime = 13
ground.hittime  = ifelse(p2statetype=C,19,17)
guard.hittime = 15
guard.slidetime = 13
guard.ctrltime = 15
ground.velocity = -1*const(size.xscale),ifelse(var(22)=1,-13.0,0)*const(size.yscale)
guard.velocity = -5.0*const(size.xscale)
air.type = low
air.velocity = -3.5*const(size.xscale),-11.0*const(size.yscale)
fall = 0
fall.recover = 0
fall.envshake.time = 12
fall.envshake.freq = 80
fall.envshake.ampl = -4
down.bounce = 1
air.fall = 1
air.recover = 0
yaccel = .60*const(size.yscale)
envshake.time = 5
envshake.freq = 60
envshake.ampl = 2
P2facing = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
persistent = 0

[State 1105, 1]
type = HitDef
trigger1 = (AnimElemtime(6) >= 0) && (AnimElemtime(9) < 0)
attr = S, NA
damage = 60,2
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 15, 15
sparkno = -1 * (var(40):=8020)**0
guard.sparkno = s4101
sparkxy = var(42):=-15, var(43):=-100
hitsound = s1,4
guardsound = s2,0
ground.type = Low
ground.slidetime = 13
ground.hittime  = 17
guard.hittime = 15
guard.slidetime = 13
guard.ctrltime = 15
ground.velocity = -3.5*const(size.xscale),-13.0*const(size.yscale)
guard.velocity = -5.0*const(size.xscale)
air.velocity = -3.5*ifelse(p2dist x>=5,1,-1),-11.0*const(size.yscale)
fall = 1
fall.recover = 0
fall.envshake.time = 12
fall.envshake.freq = 80
fall.envshake.ampl = -4
down.bounce = 1
air.fall = 1
air.recover = 0
yaccel = .60*const(size.yscale)
envshake.time = 5
envshake.freq = 60
envshake.ampl = 2
P2facing = ifelse(p2dist x>=5,1,-1)
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
persistent = 0

[State 920]
type = StateTypeSet
trigger1 = AnimElemTime(9) >= 0
movetype = I

[State 1120, ChangeState]
type = ChangeState
triggerall = Pos Y >= 0 && Vel Y > 0
trigger1 = AnimElemTime(6) > 0
value = 1110
;--------------------------------------------------------------------
;shoryuuken aterrizaje
[StateDef 1110]
type = S
movetype= I
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 1110
poweradd = 0; = 0
sprpriority = 2

[State 1150, 1]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0

[State 1150, 2]
type = PosSet
trigger1 = Time = 0
y = 0

[State 1150, 2]
type = PosAdd
trigger1 = Time = 0
x = 10*const(size.xscale)

[State -2, ChangeState]
type = ChangeState
trigger1 = P2dist X < 0
trigger1 = AnimElemTime(4) = 2
value = 0
ctrl = 1

[State 200, Ctrlset]
type = Ctrlset
trigger1 = AnimElemTime(4) >= 2
value = 1

[State 1150, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;--------------------------------------------------------------------
;tatzumaki ryu cerca debil
[StateDef 1200]
type = S
movetype= A
physics = N
juggle  = 4
velset = 0,0
ctrl = 0
anim = 1200
poweradd = 70
sprpriority = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 6
trigger2 = AnimElem = 8
value = S0,0
volume = 0
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S1000,2
volume = 0
channel = -1

[State 1200, Position]
type = PosSet
trigger1 = Time = 0
y = 0

[State 1200, Position]
type = Posadd
trigger1 = animelemtime(2) = 0
x = 16*const(size.xscale)

[State 1200, Position]
type = Posadd
trigger1 = animelemtime(4) = 0
x = 8*const(size.xscale)

[State 1200, Velocity]
type = VelSet
trigger1 = AnimElemtime(4) = 0
x = 5.0*const(size.xscale)
y = -3.0*const(size.yscale)

[State 1200, veladd]
type = veladd
trigger1 = animelemtime(4) >= 0
y = .40*const(size.yscale)

[State 1200, StateType]
type = StateTypeSet
trigger1 = AnimElem = 4
StateType = A

[State 1201, 1]
type = HitDef
trigger1 = AnimElem = 6
trigger2 = AnimElem = 8
attr = S, NA
damage = 90,5
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 9,10
sparkno = -1 * (var(40):=8020)**0
guard.sparkno = s4101
sparkxy = var(42):=-20, var(43):=-60
hitsound = s1,6
guardsound = s2,1
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
guard.ctrltime = 20
ground.velocity = -1.5*ifelse(p2dist x>=0,1,-1),-8
guard.velocity = -9
air.velocity = -1.5*ifelse(p2dist x>=0,1,-1),-6.5
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -12.6
envshake.time = 10
envshake.ampl = 3
fall = 1
fall.recover = 0
air.fall = 1
air.recover = 0
yaccel = .49
persistent = 1

[State 1100, ChangeState]
type = ChangeState
triggerall = Pos Y >= 0 && Vel Y > 0
trigger1 = AnimElemTime(4) > 0
value = 1210
;--------------------------------------------------------------------
;tatzumaki ryu cercamedio
[StateDef 1201]
type = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
ctrl = 0
anim = 1201
poweradd = 70
sprpriority = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 6
trigger2 = AnimElem = 8
trigger3 = AnimElem = 11
trigger4 = AnimElem = 13
value = S0,0
volume = 0
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S1000,2
volume = 0
channel = -1

[State 1200, Position]
type = PosSet
trigger1 = Time = 0
y = 0

[State 1200, Position]
type = Posadd
trigger1 = animelemtime(2) = 0
x = 14*const(size.xscale)

[State 1200, StateType]
type = StateTypeSet
trigger1 = AnimElem = 4
StateType = A
physics = N

[State 1200, 1]
type = VelSet
trigger1 = AnimElem = 4
x = 4
y = -2

[State 1200, 1]
type = VelSet
trigger1 = AnimElem = 6
y = 0

[State 1200, 1]
type = VelSet
trigger1 = AnimElem = 16
y = 6

[State 1201, 1]
type = HitDef
trigger1 = AnimElem = 6
trigger2 = AnimElem = 8
trigger3 = AnimElem = 11
trigger4 = AnimElem = 13
trigger5 = AnimElem = 16
attr = S, NA
damage = (ifelse(movehit>1,25,85)),5
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 9,10
sparkno = -1 * (var(40):=8020)**0
guard.sparkno = s4101
sparkxy = var(42):=-20, var(43):= -60;(enemynear,const(size.mid.pos))
hitsound = s1,6
guardsound = s2,0
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
guard.ctrltime = 20
ground.velocity = -1.5*ifelse(p2dist x>=0,1,-1),-8
guard.velocity = -9
air.velocity = -1.5*ifelse(p2dist x>=0,1,-1),-6.5
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -12.6
envshake.time = 10
envshake.ampl = 3
fall = 1
fall.recover = 0
air.fall = 1
air.recover = 0
yaccel = .49
persistent = 1

[State 1200, 22]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 1210
;--------------------------------------------------------------------
[StateDef 1202]
type = S
movetype= A
physics = N
juggle  = 4
velset = 0,0
ctrl = 0
anim = 1202
poweradd = 70
sprpriority = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 6
trigger2 = AnimElem = 8
trigger3 = AnimElem = 11
trigger4 = AnimElem = 13
trigger5 = AnimElem = 16
value = S0,0
volume = 0
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S1000,2
volume = 0
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
trigger2 = animelem = 9
trigger2 = animelem = 15
value = S1,7
volume = 0
channel = 5

[State 1200, Position]
type = PosSet
trigger1 = Time = 0
y = 0

[State 1200, Position]
type = Posadd
trigger1 = animelemtime(2) = 0
x = 16*const(size.xscale)

[State 1200, Position]
type = Posadd
trigger1 = animelemtime(4) = 0
x = 8*const(size.xscale)

[State 1200, StateType]
type = StateTypeSet
trigger1 = animelemtime(4) = 0
StateType = A

[State 1200, Velocity]
type = VelSet
trigger1 = animelemtime(4) = 0
x = 5.5*const(size.xscale)
y = -1.75*const(size.yscale)

[State 1200, veladd]
type = veladd
trigger1 = animelemtime(4) >= 0
y = .10*const(size.yscale)

[State 0, Explod]
type = Explod
trigger1 = animelem = 4
trigger2 = animelem = 11
trigger3 = animelem = 16
anim = 12901
ID = 12900
pos = 28,-66
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove = 9999
pausemove = 9999
scale = .75,.6
sprpriority = 4
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 1
ignorehitpause = 0

[State 0, Explod]
type = Explod
trigger1= p2stateno = [5000,5999]
trigger1 = movehit = 1
anim = 9996
ID = 9996
pos = 0,200
postype = back  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = 1
supermove = 99999
pausemove = 99999
scale = 1,1
sprpriority = 10
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause = 1
persistent = 0

[State 1201, 1]
type = HitDef
trigger1 = AnimElem = 6
attr = S, NA
damage = (ifelse(movehit>1,25,85)),5
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 9,10
sparkno = -1 * (var(40):=8020)**0
guard.sparkno = s4101
sparkxy = var(42):=-20, var(43):=-60
hitsound = s1,6
guardsound = s2,0
ground.type = High
ground.slidetime = 13
ground.hittime  = 18
guard.hittime = 16
guard.slidetime = 13
guard.ctrltime = 16
ground.velocity = (-2.0-(var(18)>=1)*2.0)*const(size.xscale),(-8.5-(var(18)>=1)*0.3)*const(size.yscale)
guard.velocity = -7.5*const(size.xscale)
air.velocity = (-2.0-(var(18)>=1)*2.0)*const(size.xscale),(-8.5-(var(18)>=1)*0.3)*const(size.yscale)
fall = 1
fall.recover = 0
fall.envshake.time = 12
fall.envshake.freq = 80
fall.envshake.ampl = -4
fall.xvelocity = -1.0
air.fall = 1
yaccel = .60*const(size.yscale)
persistent = 1
envshake.time = 5
envshake.freq = 60
envshake.ampl = 2
;envshake.phase =
forcestand = 1
P2facing = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0

[State 1201, 1]
type = HitDef
trigger1 = AnimElem = 9
attr = S, NA
damage = (ifelse(movehit>1,25,85)),5
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 9,10
sparkno = -1 * (var(40):=8020)**0
guard.sparkno = s4101
sparkxy = var(42):=-20, var(43):=-60
hitsound = s1,6
guardsound = s2,0
ground.type = High
ground.slidetime = 13
ground.hittime  = 18
guard.hittime = 16
guard.slidetime = 13
guard.ctrltime = 16
ground.velocity = (2.0+(var(18)>=1)*2.0)*const(size.xscale),(-8.5-(var(18)>=1)*0.3)*const(size.yscale)
guard.velocity = 7.5*const(size.xscale)
air.velocity = (2.0+(var(18)>=1)*2.0)*const(size.xscale),(-8.5-(var(18)>=1)*0.3)*const(size.yscale)
fall = 1
fall.recover = 0
fall.envshake.time = 12
fall.envshake.freq = 80
fall.envshake.ampl = -4
fall.xvelocity = -1.0
air.fall = 1
yaccel = .60*const(size.yscale)
persistent = 1
envshake.time = 5
envshake.freq = 60
envshake.ampl = 2
;envshake.phase =
forcestand = 1
P2facing = -1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0

[State 1201, 1]
type = HitDef
trigger1 = AnimElem = 12
attr = S, NA
damage = (ifelse(movehit>1,25,85)),5
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 9,10
sparkno = -1 * (var(40):=8020)**0
guard.sparkno = s4101
sparkxy = var(42):=-20, var(43):=-60
hitsound = s1,6
guardsound = s2,0
ground.type = High
ground.slidetime = 13
ground.hittime  = 18
guard.hittime = 16
guard.slidetime = 13
guard.ctrltime = 16
ground.velocity = -4.0*const(size.xscale),-8.8*const(size.yscale)
guard.velocity = -7.5*const(size.xscale)
air.velocity = -4.0*const(size.xscale),-8.8*const(size.yscale)
fall = 1
fall.recover = 0
fall.envshake.time = 12
fall.envshake.freq = 80
fall.envshake.ampl = -4
fall.xvelocity = -1.0
air.fall = 1
yaccel = .60*const(size.yscale)
persistent = 1
envshake.time = 5
envshake.freq = 60
envshake.ampl = 2
;envshake.phase =
forcestand = 1
P2facing = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0

[State 1201, 1]
type = HitDef
trigger1 = AnimElem = 15
attr = S, NA
damage = (ifelse(movehit>1,25,85)),5
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 9,10
sparkno = -1 * (var(40):=8020)**0
guard.sparkno = s4101
sparkxy = var(42):=-20, var(43):=-60
hitsound = s1,6
guardsound = s2,0
ground.type = High
ground.slidetime = 13
ground.hittime  = 18
guard.hittime = 16
guard.slidetime = 13
guard.ctrltime = 16
ground.velocity = 4.0*const(size.xscale),-8.8*const(size.yscale)
guard.velocity = 7.5*const(size.xscale)
air.velocity = 4.0*const(size.xscale),-8.8*const(size.yscale)
fall = 1
fall.recover = 0
fall.envshake.time = 12
fall.envshake.freq = 80
fall.envshake.ampl = -4
fall.xvelocity = -1.0
air.fall = 1
yaccel = .60*const(size.yscale)
persistent = 1
envshake.time = 5
envshake.freq = 60
envshake.ampl = 2
;envshake.phase =
forcestand = 1
P2facing = -1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0

[State 1201, 1]
type = HitDef
trigger1 = AnimElem = 18
attr = S, NA
damage = (ifelse(movehit>1,25,85)),5
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 9,10
sparkno = -1 * (var(40):=8020)**0
guard.sparkno = s4101
sparkxy = var(42):=-20, var(43):=-60
hitsound = s1,6
guardsound = s2,0
ground.type = High
ground.slidetime = 13
ground.hittime  = 18
guard.hittime = 16
guard.slidetime = 13
guard.ctrltime = 16
ground.velocity = (-2.0-(var(18)>=1)*2.0)*const(size.xscale),(-8.5-(var(18)>=1)*0.3)*const(size.yscale)
guard.velocity = -7.5*const(size.xscale)
air.velocity = (-2.0-(var(18)>=1)*2.0)*const(size.xscale),(-8.5-(var(18)>=1)*0.3)*const(size.yscale)
fall = 1
fall.recover = 0
fall.envshake.time = 12
fall.envshake.freq = 80
fall.envshake.ampl = -4
fall.xvelocity = -1.0
air.fall = 1
yaccel = .60*const(size.yscale)
persistent = 1
envshake.time = 5
envshake.freq = 60
envshake.ampl = 2
;envshake.phase =
forcestand = 1
P2facing = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0


[State 1201, 1]
type = HitDef
trigger1 = AnimElem = 21
attr = S, NA
damage = (ifelse(movehit>1,25,85)),5
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 9,10
sparkno = -1 * (var(40):=8020)**0
guard.sparkno = s4101
sparkxy = var(42):=-20, var(43):=-60
hitsound = s1,6
guardsound = s2,0
ground.type = High
ground.slidetime = 13
ground.hittime  = 18
guard.hittime = 16
guard.slidetime = 13
guard.ctrltime = 16
ground.velocity = (2.0+(var(18)>=1)*2.0)*const(size.xscale),(-8.5-(var(18)>=1)*0.3)*const(size.yscale)
guard.velocity = 7.5*const(size.xscale)
air.velocity = (2.0+(var(18)>=1)*2.0)*const(size.xscale),(-8.5-(var(18)>=1)*0.3)*const(size.yscale)
fall = 1
fall.recover = 0
fall.envshake.time = 12
fall.envshake.freq = 80
fall.envshake.ampl = -4
fall.xvelocity = -1.0
air.fall = 1
yaccel = .60*const(size.yscale)
persistent = 1
envshake.time = 5
envshake.freq = 60
envshake.ampl = 2
;envshake.phase =
forcestand = 1
P2facing = -1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0

[State 1200, 22]
type = ChangeState
trigger1 = Pos Y >= 0
trigger1 = Vel Y > 0
value = 1210
;--------------------------------------------------------------------
[StateDef 1210]
type = S
movetype= I
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim = 1210
poweradd = 0
sprpriority = 2

[State 1250, 2]
type = PosAdd
trigger1 = Time = 0
x = 10*const(size.xscale)

[State 1250, 1]
type = VelSet
trigger1 = time = 0
x = 0
y = 0

[State 1250, 2]
type = PosSet
trigger1 = Time = 0
y = 0

[State 200, Ctrlset]
type = Ctrlset
trigger1 = prevstateno = 1200
trigger1 = AnimElemTime(4) >= 0
value = 1

[State 200, Ctrlset]
type = Ctrlset
trigger1 = prevstateno = 1201
trigger1 = AnimElemTime(3) >= 3
value = 1

[State 200, Ctrlset]
type = Ctrlset
trigger1 = prevstateno = 1202 ;|| prevstateno = [1300,1320]
trigger1 = AnimElemTime(4) >= 1
value = 1

[State 1250, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;--------------------------------------------------------------------
;air tatsumaki float
[StateDef 1220]
type = A
movetype= A
physics = A
juggle  = 4
ctrl = 0
anim = 1220
poweradd = 70
sprpriority = 2

[State 900]
type = VarSet
trigger1 = time = 0
v = 10
value = ifelse(command = "HCB_c",2,ifelse(command = "HCB_b",1,0))

[State 900]
type = VarSet
trigger1 = time = 0
trigger1 = var(59)>=1
v = 10
value = 2


[State 1220, 1]
type = VelSet
trigger1  = var(10)=2
trigger1  = time <= 30
x = 4
y = 0

[State 1220, 1]
type = VelSet
trigger1  = var(10)=1
trigger1  = time <= 20
x = 4
y = 0

[State 1220, 1]
type = VelSet
trigger1  = var(10)=0
trigger1  = time <= 10
x = 4
y = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
trigger2 = AnimElem = 7
value = S0,0
volume = 0
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S3,0
volume = 0
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S1,7
volume = 0
channel = -1
persistent = 0

[State 0, Explod]
type = Explod
triggerall = numexplod(12900) <= 1
trigger1 = animelem = 3
anim = 12902
ID = 12900
pos = 25,-66
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove = 9999
pausemove = 9999
scale = .75,.6
sprpriority = 4
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause = 1
persistent = 1

[State 1220, 1]
type = HitDef
trigger1 = AnimElem = 4
trigger2 = AnimElem = 7
attr = S, NA
damage = 25,5
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 4,2
sparkno = -1 * (var(40):=8020)**0
guard.sparkno = s4101
sparkxy = var(42):=-20, var(43):=-60
hitsound = s1,6
guardsound = s2,0
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
guard.ctrltime = 20
ground.velocity = -1.5*ifelse(p2dist x>=0,1,-1),-8
guard.velocity = -9
air.velocity = -1.5*ifelse(p2dist x>=0,1,-1),-6.5
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -12.6
envshake.time = 10
envshake.ampl = 3
fall = 1
fall.recover = 0
air.fall = 1
air.recover = 0
yaccel = .45
fall.recovertime = 30
persistent = 1
;--------------------------------------------------------------------
;air tatsumaki clasico
[StateDef 1225]
type = A
movetype= A
physics = A
juggle  = 4
ctrl = 0
anim = 1220
poweradd = 70
sprpriority = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
trigger2 = AnimElem = 7
value = S0,0
volume = 0
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S3,0
volume = 0
channel = -1

[State 1220, 1]
type = HitDef
trigger1 = AnimElem = 4
trigger2 = AnimElem = 7
attr = S, NA
damage = 25,5
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 4,2
sparkno = -1 * (var(40):=8020)**0
guard.sparkno = s4101
sparkxy = var(42):=-20, var(43):=-60
hitsound = s1,6
guardsound = s2,0
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
guard.ctrltime = 20
ground.velocity = -1.5*ifelse(p2dist x>=0,1,-1),-8
guard.velocity = -9
air.velocity = -1.5*ifelse(p2dist x>=0,1,-1),-6.5
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -12.6
envshake.time = 10
envshake.ampl = 3
fall = 1
fall.recover = 0
air.fall = 1
air.recover = 0
yaccel = .45
fall.recovertime = 30
persistent = 1

[State 1220, 1]
type = VelAdd
trigger1  = time = 1
x = ifelse(Vel X >= 0, 1.4, -1.3)
y = -.4
;--------------------------------------------------------------------
;super kick
[StateDef 1300]
type = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
ctrl = 0
anim = 1300
poweradd = 20
sprpriority = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S3,4
volume = 0
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 5
value = S0,5
volume = 0
channel = -1

[State 1300, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 75,10
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 6, 10
sparkno = -1 * (var(40):=8020)**0
guard.sparkno = s4101
sparkxy = var(42):=-10, var(43):=-76
hitsound = s1,6
guardsound = s2,0
ground.type = high
ground.slidetime = 24
ground.hittime = 24
ground.velocity = -6,-3
air.velocity = -6, -1.5
guard.ctrltime = 40
airguard.velocity = -3, -1.5
fall.recover = 0
fall.recover = 0
envshake.time = 16
envshake.freq = 60
envshake.ampl = 2
fall = 1
p2stateno = 1325
p2facing = 1

[State 1200, Position]
type = Posadd
trigger1 = animelemtime(4) = 0
trigger2 = animelemtime(11) = 0
trigger3 = animelemtime(12) = 0
x = 8*const(size.xscale)

[State 1200, Position]
type = Posadd
trigger1 = animelemtime(5) = 0
x = 20*const(size.xscale)
persistent = 0

[State 1200, Position]
type = Posadd
trigger1 = animelemtime(6) = 0
x = 2*const(size.xscale)
persistent = 0

[State 1200, Position]
type = Posadd
trigger1 = animelemtime(8) = 0
x = 2*const(size.xscale)
persistent = 0

[State 1200, Position]
type = Posadd
trigger1 = animelemtime(13) = 0
x = 12*const(size.xscale)

[State 1200, Position]
type = Posadd
trigger1 = animelemtime(14) = 0
x = -2*const(size.xscale)

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

;------------------
; Hit by Fast Kung Fu Palm - shaking from the hit
; (a custom gethit state)
; See State 1020 for details
[Statedef 1325]
type    = A
movetype= H
physics = N
velset = 0,0

[State 1025, Anim] ;Custom animation
type = ChangeAnim2
trigger1 = 1
value = 1325

[State 1025, State]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 1326

;------------------
; Hit by Fast Kung Fu Palm - flying through the air
; (a custom gethit state)
[Statedef 1326]
type    = A
movetype= H
physics = N

[State 1026, Velocity]
type = VelSet
trigger1 = Time = 0
x = -10
y = -5

[State 1026, Gravity]
type = VelAdd
trigger1 = 1
y = .65

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

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

[State 1026, Hit ground]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100

;------------------
; Hit by Fast Kung Fu Palm - hit wall
; (a custom gethit state)
[Statedef 1327]
type    = A
movetype= H
physics = N

[State 0, EnvShake]
type = EnvShake
trigger1 = time = 0
time = 15
freq = 60
ampl = -8

[State 1027, Turn]
type = Turn
trigger1 = (Time = 0) && (FrontEdgeBodyDist <= 30)

[State 1027, Pos]
type = PosAdd
trigger1 = Time = 0
x = 15 - BackEdgeBodyDist

[State 1027, Stop moving]
type = PosFreeze
trigger1 = 1
x = 1
y = 1

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

[State 1027, Anim]
type = ChangeAnim2
trigger1 = Time = 0
value = 1327

[State 1027, Sound]
type = PlaySnd
trigger1 = Time = 0
value = F7,0

[State 1027, State]
type = ChangeState
trigger1 = AnimTime = 0
value = 1328

;------------------
; Hit by Fast Kung Fu Palm - bounce off wall
; (a custom gethit state)
[Statedef 1328]
type    = A
movetype= H
physics = N

[State 1028, Vel Y]
type = VelSet
trigger1 = Time = 0
y = -3

[State 1028, Vel X]
type = VelSet
trigger1 = Time = 0
x = 1.6

[State 1028, Turn]
type = Turn
trigger1 = (Time = 0) && (BackEdgeDist < 30)

[State 1028, Gravity]
type = VelAdd
trigger1 = 1
y = .35

[State 1028, Anim 5050] ;Self falling animation
type = ChangeAnim
trigger1 = Time = 0
trigger1 = !SelfAnimExist(5052)
value = 5050

[State 1028, Anim 5052] ;Self falling animation (diagup type)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5052)
value = 5052

[State 1028, Anim 5060] ;Coming down - normal
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Anim = 5050
trigger1 = SelfAnimExist(5060)
persistent = 0
value = 5060

[State 1028, Anim 5062] ;Coming down - diagup type
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Anim = 5052
trigger1 = SelfAnimExist(5062)
persistent = 0
value = 5062

[State 1028, Hit ground]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100
;--------------------------------------------------------------------
[StateDef 1301]
type = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
ctrl = 0
anim = 1301
poweradd = 20
sprpriority = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = S3,4
volume = 0
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 6
value = S0,5
volume = 0
channel = -1

[State 1300, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 85,10
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 6, 10
sparkno = -1 * (var(40):=8020)**0
guard.sparkno = s4101
sparkxy = var(42):=-10, var(43):=-76
hitsound = s1,6
guardsound = s2,0
ground.type = high
ground.slidetime = 24
ground.hittime = 24
ground.velocity = -8,-4
air.velocity = -8, -2
guard.ctrltime = 40
airguard.velocity = -3, -1.5
fall.recover = 0
envshake.time = 16
envshake.freq = 60
envshake.ampl = 3
fall = 1
p2stateno = 1335

[State 1200, Position]
type = Posadd
trigger1 = animelemtime(2) = 0
x = 22*const(size.xscale)

[State 1200, Position]
type = Posadd
trigger1 = animelemtime(3) = 0
x = 6*const(size.xscale)

[State 1200, Position]
type = Posadd
trigger1 = animelemtime(4) = 0
trigger2 = animelemtime(6) = 0
trigger3 = animelemtime(13) = 0
trigger4 = animelemtime(14) = 0
x = 8*const(size.xscale)

[State 1200, Position]
type = Posadd
trigger1 = animelemtime(7) = 0
x = 16*const(size.xscale)
persistent = 0

[State 1200, Position]
type = Posadd
trigger1 = animelemtime(8) = 0
x = 2*const(size.xscale)
persistent = 0

[State 1200, Position]
type = Posadd
trigger1 = animelemtime(10) = 0
x = 2*const(size.xscale)
persistent = 0

[State 1200, Position]
type = Posadd
trigger1 = animelemtime(15) = 0
x = 12*const(size.xscale)

[State 1200, Position]
type = Posadd
trigger1 = animelemtime(16) = 0
x = -2*const(size.xscale)

[State 1300, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;------------------
; Hit by Fast Kung Fu Palm - shaking from the hit
; (a custom gethit state)
; See State 1020 for details
[Statedef 1335]
type    = A
movetype= H
physics = N
velset = 0,0

[State 1025, Anim] ;Custom animation
type = ChangeAnim2
trigger1 = 1
value = 1325

[State 1025, State]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 1336

;------------------
; Hit by Fast Kung Fu Palm - flying through the air
; (a custom gethit state)
[Statedef 1336]
type    = A
movetype= H
physics = N

[State 1026, Velocity]
type = VelSet
trigger1 = Time = 0
x = -11
y = -5

[State 1026, Gravity]
type = VelAdd
trigger1 = 1
y = .5

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

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

[State 1026, Hit ground]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100

;------------------
; Hit by Fast Kung Fu Palm - hit wall
; (a custom gethit state)
[Statedef 1337]
type    = A
movetype= H
physics = N

[State 0, EnvShake]
type = EnvShake
trigger1 = time = 0
time = 15
freq = 60
ampl = -8

[State 1027, Turn]
type = Turn
trigger1 = (Time = 0) && (FrontEdgeBodyDist <= 30)

[State 1027, Pos]
type = PosAdd
trigger1 = Time = 0
x = 15 - BackEdgeBodyDist

[State 1027, Stop moving]
type = PosFreeze
trigger1 = 1
x = 1
y = 1

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

[State 1027, Anim]
type = ChangeAnim2
trigger1 = Time = 0
value = 1327

[State 1027, Sound]
type = PlaySnd
trigger1 = Time = 0
value = F7,0

[State 1027, State]
type = ChangeState
trigger1 = AnimTime = 0
value = 1338

;------------------
; Hit by Fast Kung Fu Palm - bounce off wall
; (a custom gethit state)
[Statedef 1338]
type    = A
movetype= H
physics = N

[State 1028, Vel Y]
type = VelSet
trigger1 = Time = 0
y = -4

[State 1028, Vel X]
type = VelSet
trigger1 = Time = 0
x = 1.6

[State 1028, Turn]
type = Turn
trigger1 = (Time = 0) && (BackEdgeDist < 30)

[State 1028, Gravity]
type = VelAdd
trigger1 = 1
y = .35

[State 1028, Anim 5050] ;Self falling animation
type = ChangeAnim
trigger1 = Time = 0
trigger1 = !SelfAnimExist(5052)
value = 5050

[State 1028, Anim 5052] ;Self falling animation (diagup type)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5052)
value = 5052

[State 1028, Anim 5060] ;Coming down - normal
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Anim = 5050
trigger1 = SelfAnimExist(5060)
persistent = 0
value = 5060

[State 1028, Anim 5062] ;Coming down - diagup type
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Anim = 5052
trigger1 = SelfAnimExist(5062)
persistent = 0
value = 5062

[State 1028, Hit ground]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100
;--------------------------------------------------------------------
[StateDef 1302]
type = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
ctrl = 0
anim = 1302
poweradd = 20
sprpriority = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = S3,4
volume = 0
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 6
value = S0,5
volume = 0
channel = -1

[State 1300, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 100,10
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 6, 10
sparkno = -1 * (var(40):=8020)**0
guard.sparkno = s4101
sparkxy = var(42):=-10, var(43):=-76
hitsound = s1,6
guardsound = s2,0
ground.type = high
ground.slidetime = 24
ground.hittime = 24
ground.velocity = -10,-4
air.velocity = -10, -2
guard.ctrltime = 40
airguard.velocity = -3, -1.5
fall.recover = 0
fall.recover = 0
envshake.time = 16
envshake.freq = 60
envshake.ampl = 5
fall = 1
p2stateno = 1345

[State 1200, Position]
type = Posadd
trigger1 = animelemtime(2) = 0
x = 22*const(size.xscale)

[State 1200, Position]
type = Posadd
trigger1 = animelemtime(3) = 0
x = 6*const(size.xscale)

[State 1200, Position]
type = Posadd
trigger1 = animelemtime(4) = 0
trigger2 = animelemtime(4) = 3
trigger3 = animelemtime(6) = 0
trigger4 = animelemtime(13) = 0
trigger5 = animelemtime(14) = 0
x = 8*const(size.xscale)

[State 1200, Position]
type = Posadd
trigger1 = animelemtime(7) = 0
x = 20*const(size.xscale)
persistent = 0

[State 1200, Position]
type = Posadd
trigger1 = animelemtime(8) = 0
x = 2*const(size.xscale)
persistent = 0

[State 1200, Position]
type = Posadd
trigger1 = animelemtime(10) = 0
x = 2*const(size.xscale)
persistent = 0

[State 1200, Position]
type = Posadd
trigger1 = animelemtime(15) = 0
x = 12*const(size.xscale)

[State 1200, Position]
type = Posadd
trigger1 = animelemtime(16) = 0
x = -2*const(size.xscale)

[State 1300, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;------------------
; Hit by Fast Kung Fu Palm - shaking from the hit
; (a custom gethit state)
; See State 1020 for details
[Statedef 1345]
type    = A
movetype= H
physics = N
velset = 0,0

[State 1025, Anim] ;Custom animation
type = ChangeAnim2
trigger1 = 1
value = 1325

[State 1025, State]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 1346

;------------------
; Hit by Fast Kung Fu Palm - flying through the air
; (a custom gethit state)
[Statedef 1346]
type    = A
movetype= H
physics = N

[State 1026, Velocity]
type = VelSet
trigger1 = Time = 0
x = -14
y = -5

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

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

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

[State 1026, Hit ground]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100

;------------------
; Hit by Fast Kung Fu Palm - hit wall
; (a custom gethit state)
[Statedef 1347]
type    = A
movetype= H
physics = N

[State 0, EnvShake]
type = EnvShake
trigger1 = time = 0
time = 15
freq = 60
ampl = -8

[State 1027, Turn]
type = Turn
trigger1 = (Time = 0) && (FrontEdgeBodyDist <= 30)

[State 1027, Pos]
type = PosAdd
trigger1 = Time = 0
x = 15 - BackEdgeBodyDist

[State 1027, Stop moving]
type = PosFreeze
trigger1 = 1
x = 1
y = 1

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

[State 1027, Anim]
type = ChangeAnim2
trigger1 = Time = 0
value = 1327

[State 1027, Sound]
type = PlaySnd
trigger1 = Time = 0
value = F7,0

[State 1027, State]
type = ChangeState
trigger1 = AnimTime = 0
value = 1348

;------------------
; Hit by Fast Kung Fu Palm - bounce off wall
; (a custom gethit state)
[Statedef 1348]
type    = A
movetype= H
physics = N


[State 1028, Vel Y]
type = VelSet
trigger1 = Time = 0
y = -6

[State 1028, Vel X]
type = VelSet
trigger1 = Time = 0
x = 1.6

[State 1028, Turn]
type = Turn
trigger1 = (Time = 0) && (BackEdgeDist < 30)

[State 1028, Gravity]
type = VelAdd
trigger1 = 1
y = .35

[State 1028, Anim 5050] ;Self falling animation
type = ChangeAnim
trigger1 = Time = 0
trigger1 = !SelfAnimExist(5052)
value = 5050

[State 1028, Anim 5052] ;Self falling animation (diagup type)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5052)
value = 5052

[State 1028, Anim 5060] ;Coming down - normal
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Anim = 5050
trigger1 = SelfAnimExist(5060)
persistent = 0
value = 5060

[State 1028, Anim 5062] ;Coming down - diagup type
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Anim = 5052
trigger1 = SelfAnimExist(5062)
persistent = 0
value = 5062

[State 1028, Hit ground]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100
;---------------------------------------------------------------------------
;Jump Light Kick
[Statedef 1350]
type    = A
movetype= H
physics = N
juggle  = 0
poweradd = 0;= 20
ctrl = 0
;anim = 1350
sprpriority =2

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

[State 0, PosAdd]
type = PosAdd
trigger1 = time = 0
y = -2

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

[State 0, VelSet]
type = VelSet
trigger1 = time > 2
trigger1 = backedgebodydist > 5
x = -18
y = -1.5

[State 0, VelSet]
type = VelSet
trigger1 = backedgebodydist <= 5
x = .8
y = -8

[State 0, EnvShake]
type = EnvShake
trigger1 = backedgebodydist <= 5
time = 15
freq = 60
ampl = -4
persistent = 0

[State 0, ChangeState]
type = SelfState
trigger1 = backedgebodydist <= 5
value = 5050
ctrl = 0
;--------------------------------------------------------------------
;Falling kick
[StateDef 1400]
type = A
movetype= A
physics = A
juggle  = 4
velset = 0,0
ctrl = 0
anim = 1400
poweradd = 20
sprpriority = 2

[State 0, PosFreeze]
type = PosFreeze
trigger1 = time = [1,6]
value = 1

[State 0, VelSet]
type = VelSet
trigger1 = time > 7
x = 10
y = 8.5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S0,5
volume = 0
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S3,0
volume = 0
channel = -1

[State 1400, 1]
type = HitDef
trigger1 != time
attr = S, NA
damage = 50
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 8, 10
sparkno = -1 * (var(40):=8020)**0
guard.sparkno = s4101
sparkxy = var(42):=-10, var(43):=-10
hitsound = s1,4
guardsound = s2,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = High
persistent = 0
air.velocity = -1.4,-3
air.hittime = 12
;--------------------------------------------------------------------
;Falling kick2
[StateDef 1401]
type = A
movetype= A
physics = A
juggle  = 4
velset = 0,0
ctrl = 0
anim = 1400
poweradd = 20
sprpriority = 2

[State 0, PosFreeze]
type = PosFreeze
trigger1 = time = [1,6]
value = 1

[State 0, VelSet]
type = VelSet
trigger1 = time > 7
x = 9.7
y = 8.2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S0,5
volume = 0
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S3,0
volume = 0
channel = -1

[State 1400, 1]
type = HitDef
trigger1 != time
attr = S, NA
damage = 60
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 8, 12
sparkno = -1 * (var(40):=8020)**0
guard.sparkno = s4101
sparkxy = var(42):=-10, var(43):=-10
hitsound = s1,4
guardsound = s2,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -4
air.velocity = - 2.5,-2.5
airguard.velocity = -1.9,-.8
air.type = High
persistent = 0
fall = 0
fall.recover = 1
air.fall = 1
air.recover = 0
yaccel = .40
fall.recovertime = 30
;persistent = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = movecontact
value = 1405
ctrl = 0
;--------------------------------------------------------------------
;Falling kick2.5
[StateDef 1405]
type = A
movetype= A
physics = A
juggle  = 0
velset = 0,0
anim = 43
ctrl = 0
poweradd = 20
sprpriority = 2

[State 0, Velset]
type = VelSet
trigger1 = 1
x = -2

[State 0, VelAdd]
type = VelAdd
trigger1 = animelem = 1
y = -4

[State 0, ChangeState]
type = ChangeState
trigger1 = time >= 3
trigger1 = power >=1000
trigger1 = command = "ShinFallingKick"
value = 3500
ctrl = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = time >= 3
trigger1 = command = "QCF_b"
value = 1406
ctrl = 0

[State 50, 3]
type = ChangeAnim
trigger1 = Vel y > -2
trigger1 = SelfAnimExist(anim + 3)
persistent = 0
value = Anim + 3
;--------------------------------------------------------------------
;Falling kick2.6
[StateDef 1406]
type = A
movetype= A
physics = A
juggle  = 0
velset = 0,0
ctrl = 0
anim = 1400
poweradd = 20
sprpriority = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S0,5
volume = 0
channel = -1

[State 0, SuperPause]
type = SuperPause
trigger1 = time = 1
time = 1
move = 1
pos = 9999999
darken = 0

[State 0, PosFreeze]
type = PosFreeze
trigger1 = time = [1,6]
value = 1

[State 0, VelSet]
type = VelSet
trigger1 = time > 7
x = 10.5
y = 9

[State 902]
type = palfx
;triggerall = prevstateno = 1405
trigger1 = !Time
trigger1 = Var(8) < 4
add = 0, 50, 255
sinadd = 0, -50, -255, 60
time = 15

[State 0, PlayerPush]
type = PlayerPush
trigger1 = prevstateno = 1405
value = 0
ignorehitpause = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S9,5
volume = 0
channel = 3

[State 1400, 1]
type = HitDef
trigger1 != time
attr = S, NA
damage = 70
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 10
sparkno = -1 * (var(40):=8020)**0
guard.sparkno = s4101
sparkxy = var(42):=-10, var(43):=-10
hitsound = s1,4
guardsound = s2,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -1,-7
airguard.velocity = -1.9,-.8
air.type = High
persistent = 0
air.velocity = -1,-6
air.hittime = 12
fall = 1
fall.recover = 1
air.fall = 1
air.recover = 0
yaccel = .51
fall.recovertime = 20
;--------------------------------------------------------------------
;Falling kick3
[StateDef 1402]
type = A
movetype= A
physics = A
juggle  = 4
velset = 0,0
ctrl = 0
anim = 1400
poweradd = 20
sprpriority = 2

[State 0, PosFreeze]
type = PosFreeze
trigger1 = time = [1,6]
value = 1

[State 0, VelSet]
type = VelSet
trigger1 = time > 7
x = 10.5
y = 8

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S0,5
volume = 0
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S3,0
volume = 0
channel = -1

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 3
anim = 1490
ID =  1490
pos = 5,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
supermove
pausemove
scale = 1.2,1.3
sprpriority = 3
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 1
ignorehitpause = 0

[State 1400, 1]
type = HitDef
trigger1 = animelem = 3
trigger2 = animelem = 4
trigger3 = animelem = 5
attr = S, NA
damage = 50,5
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 5,5
sparkno = -1 * (var(40):=8020)**0
guard.sparkno = s4101
sparkxy = var(42):=-15, var(43):=-10
hitsound = s1,7
guardsound = s2,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 16
ground.velocity = -6
airguard.velocity = -1.9,-.8
air.type = High
persistent = 1
air.velocity = -1.4,-3
air.hittime = 12
;-------------------------------------------------------------------
;teleport forward short
[Statedef 1600]
type    = S
movetype= I
physics = N
juggle = 0
ctrl = 0
anim = 1690
sprpriority = -1

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

[State 800, 1]
type = NotHitBy
trigger1 = Time
value = CSA,HT,NA,SA,HA,NP,SP,HP

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 13
value = S1100,1
volume = 0
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S3,2
volume = 0
channel = -1

[State 1400, afterimage]
type=afterimage
trigger1=animelem=3
time=2
timegap=1
framegap=6
length=18
palbright=0,0,0
paladd=0,0,0
palmul=.9,.9,.9
palcontrast=160,160,160
palpostbright=0,0,0
trans=add1

[State 1400, vel]
type=velset
trigger1=animelemtime(2)>0&&animelemtime(6)<0
x=-4*sin((time-2)/2)

[State 1400, vel]
type=velset
trigger1=animelem=6
x=7.5

[State 1400, vel]
type=velmul
trigger1=animelemtime(6)>9
x=.9

[State 1400, end]
type=changestate
trigger1=animelemtime(6)=25
trigger2=animelemtime(6)>0&&vel x<0&&backedgebodydist<=const(size.ground.back)
trigger3=animelemtime(6)>0&&vel x>0&&frontedgebodydist<=const(size.ground.front)
value=0
ctrl=1
;-------------------------------------------------------------------
;teleport backward short
[Statedef 1601]
type    = S
movetype= I
physics = N
juggle = 0
ctrl = 0
anim = 1690
sprpriority = -1

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

[State 800, 1]
type = NotHitBy
trigger1 = Time
value = CSA,HT,NA,SA,HA,NP,SP,HP

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 13
value = S1100,1
volume = 0
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S3,2
volume = 0
channel = -1

[State 1400, afterimage]
type=afterimage
trigger1=animelem=3
time=2
timegap=1
framegap=6
length=18
palbright=0,0,0
paladd=0,0,0
palmul=.9,.9,.9
palcontrast=160,160,160
palpostbright=0,0,0
trans=add1

[State 1400, vel]
type=velset
trigger1=animelemtime(2)>0&&animelemtime(6)<0
x=4*sin((time-2)/2)

[State 1400, vel]
type=velset
trigger1=animelem=6
x=-7.5

[State 1400, vel]
type=velmul
trigger1=animelemtime(6)>9
x=.9

[State 1400, end]
type=changestate
trigger1=animelemtime(6)=25
trigger2=animelemtime(6)>0&&vel x<0&&backedgebodydist<=const(size.ground.back)
trigger3=animelemtime(6)>0&&vel x>0&&frontedgebodydist<=const(size.ground.front)
value=0
ctrl=1
;-------------------------------------------------------------------
;teleport forward long
[Statedef 1602]
type    = S
movetype= I
physics = N
juggle = 0
ctrl = 0
anim = 1690
sprpriority = -1

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

[State 800, 1]
type = NotHitBy
trigger1 = Time
value = CSA,HT,NA,SA,HA,NP,SP,HP

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 13
value = S1100,1
volume = 0
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S3,2
volume = 0
channel = -1

[State 1400, afterimage]
type=afterimage
trigger1=animelem=3
time=2
timegap=1
framegap=6
length=24
palbright=0,0,0
paladd=0,0,0
palmul=.9,.9,.9
palcontrast=160,160,160
palpostbright=0,0,0
trans=add1

[State 1400, vel]
type=velset
trigger1=animelemtime(2)>0&&animelemtime(6)<0
x=-7*sin((time-2)/2)

[State 1400, vel]
type=velset
trigger1=animelem=6
x=12

[State 1400, vel]
type=velmul
trigger1=animelemtime(6)>16
x=.9

[State 1400, end]
type=changestate
trigger1=animelemtime(6)=40
trigger2=animelemtime(6)>0&&vel x<0&&backedgebodydist<=const(size.ground.back)
trigger3=animelemtime(6)>0&&vel x>0&&frontedgebodydist<=const(size.ground.front)
value=0
ctrl=1
;-------------------------------------------------------------------
;teleport backward long
[Statedef 1603]
type    = S
movetype= I
physics = N
juggle = 0
ctrl = 0
anim = 1690
sprpriority = -1

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

[State 800, 1]
type = NotHitBy
trigger1 = Time
value = CSA,HT,NA,SA,HA,NP,SP,HP

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 13
value = S1100,1
volume = 0
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S3,2
volume = 0
channel = -1

[State 1400, afterimage]
type=afterimage
trigger1=animelem=3
time=2
timegap=1
framegap=6
length=24
palbright=0,0,0
paladd=0,0,0
palmul=.9,.9,.9
palcontrast=160,160,160
palpostbright=0,0,0
trans=add1

[State 1400, vel]
type=velset
trigger1=animelemtime(2)>0&&animelemtime(6)<0
x=7*sin((time-2)/2)

[State 1400, vel]
type=velset
trigger1=animelem=6
x=-12

[State 1400, vel]
type=velmul
trigger1=animelemtime(6)>16
x=.9

[State 1400, end]
type=changestate
trigger1=animelemtime(6)=35
trigger2=animelemtime(6)>0&&vel x<0&&backedgebodydist<=const(size.ground.back)
trigger3=animelemtime(6)>0&&vel x>0&&frontedgebodydist<=const(size.ground.front)
value=0
ctrl=1
;-------------------------------------------------------
;Hadou Combo
[StateDef 1700]
type = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 1700
poweradd = 30
sprpriority = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S800,0
volume = 0
channel = 7

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = s1100,5
volume = 1
channel = 8

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 45
value = S1100,7
volume = 0
channel = -1
removeongethit = 1

[State 0, VarSet]
type = VarSet
trigger1 = command = "holdp"
v = 29
value = 1

[State 0, VarSet]
type = VarSet
trigger1 = command != "holdp"
v = 29
value = 0

[State 0, Explod]
type = Explod
trigger1 = numexplod(1709) = 0
trigger1 = 1
anim = 1709
ID = 1709
pos = -10,-20
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
supermove
pausemove
scale = 1,1
sprpriority = 3
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 1
;ignorehitpause =
persistent = 0

[State 0, Explod]
type = Explod
trigger1 = numexplod(17090) = 0
trigger1 = 1
anim = 1709
ID = 17090
pos = 35,-10
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
supermove
pausemove
scale = 1,1
sprpriority = 3
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 1
;ignorehitpause =
persistent = 0

[State 1000, 2]
type = ChangeState
triggerall = var(29) = 0
triggerall = anim = 1700 ; && animelem = 3
trigger1 = var(59)<1
trigger1 = Time >= 10 ;,39]
value = 1701

[State 1000, 2]
type = ChangeState
trigger1 = anim = 1700; && animelem = 3
trigger1 = Time = 70 ;,39]
trigger2 = var(59)>=1
trigger2 = Time = 10
value = 1701
;-----------------------------------------------------------
;hadou combo dash
[StateDef 1701]
type = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
ctrl = 0
anim = 1704
poweradd = 0
sprpriority = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S3,2
volume = 0
channel = 7

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S1100,4
volume = 0
channel = 8

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = 1
id = 1709

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = 1
id = 17090

[State 0, Explod]
type = Explod
trigger1 = numexplod(17002) = 0
trigger1 = animelem = 3
anim = 17001
ID = 17002
pos = -5,-5
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove = 9999
pausemove = 9999
scale = 1,1
sprpriority = 3
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 1
;ignorehitpause =
persistent = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = movehit
trigger2 = animelem = 4
id = 17002

[State 0, Explod]
type = Explod
trigger1 = time = 1
anim = 1701
ID = 1701
pos = 10,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
supermove = 9999
pausemove = 9999
scale = 1.5,1.5
sprpriority = 4
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 1

[State 0, Explod]
type = Explod
trigger1 = time = 1
anim = 1703
ID = 1701
pos = 10,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
supermove = 9999
pausemove = 9999
scale = 1.5,1.5
sprpriority = 3
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 1

[State 0, Explod]
type = Explod
trigger1= numexplod(1702) <=4
trigger1= time = [6,22]
anim = 1702
ID = 1702
pos = 20,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
supermove = 9999
pausemove = 9999
scale = 1,1
sprpriority = 3
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
persistent = 1

[State 0, Explod]
type = Explod
trigger1= p2stateno = 1703
trigger1 = movehit = 1
anim = 9996
ID = 9996
pos = 0,200
postype = back  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = 1
supermove = 99999
pausemove = 99999
scale = 1,1
sprpriority = 10
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause = 1
persistent = 0

[State 440, 3]
type = HitDef
trigger1 != time
attr = S, NA
damage    = 0,2
hitflag = MAF
guardflag = MA
pausetime = 10,15
snap = 45,0,0
sparkno = s4407;
sparkxy = 0,-83
hitsound   = s1,6
guardsound = s2,0
guard.sparkno = S4101
ground.type = high
ground.slidetime = 15
ground.hittime = 20
ground.velocity = -1.5,0
air.velocity = -3.3,0
guard.ctrltime = 39
guard.velocity = -10
;fall = 0
;fall.recover = 0
;air.fall = 0
;air.recover = 0
p2facing = 1
;yaccel = .43
envshake.time = 12
envshake.ampl = 3
persistent = 0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
forcestand = 1
;p2stateno = 1703

[State 0, StopSnd]
type = StopSnd
trigger1 = movehit
channel = 8

[State 0, VelSet]
type = Velset
trigger1 = animelem = 3
;trigger1 = time = [3,28]
x = 30
y = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = movehit
value = 1702
ctrl = 0

[State 3900, end]
type = ChangeState
;trigger1 = movehit
;triggerall = anim = 1700
trigger1 = AnimTime = 0
trigger2 = frontedgedist <= 0
value = 0
ctrl = 1
;--------------------------------------------------------------
;golpes de hadou
[StateDef 1702]
type = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 1708
poweradd = 0
sprpriority = 3

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = 1
id = 17002

[State 0, VelSet]
type = VelSet
trigger1 = 1
x = 0
y = 0

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

[State 0, PlaySnd]
type = PlaySnd
triggerall = p2life >= 1
trigger1 = animelem  = 3
trigger2 = animelem  = 5
trigger3 = animelem  = 9
trigger4 = animelem  = 14
value = S0,2
volume = 0
channel = -1
removeongethit =1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem  = 3
trigger2 = animelem  = 5
trigger3 = animelem  = 9
value = S1000,0
volume = 0
channel = 12
removeongethit =1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem  = 14
value = S3,1
volume = 0
channel = 12
removeongethit =1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem  = 3
trigger2 = animelem  = 5
trigger3 = animelem  = 9
trigger4 = animelem  = 14
value = S1100,0
volume = 0
channel = 11
removeongethit =1

[State 440, 3]
type = HitDef
trigger1 = animelem  = 3
attr = C, NA
damage   = 60,5
hitflag = MAF
guardflag = MA
;snap = 15,0,0
pausetime = 7,27
sparkno = s4407
sparkxy = -20,-65
hitsound   = s1,8
guardsound = s2,0
guard.sparkno = S4101
ground.type = low
ground.slidetime = 15
ground.hittime = 20
ground.velocity = -8,0
guard.velocity = -9
air.velocity = -8,-4
guard.ctrltime = 39
animtype = heavy
p2facing = 1
;yaccel = .43
envshake.time = 12
envshake.ampl = 3
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State 440, 3]
type = HitDef
trigger1 = animelem  = 5
attr = C, NA
damage   = 30,5
hitflag = MAF
guardflag = MA
;snap = 15,0,0
pausetime = 7,27
sparkno = s4406
sparkxy = -20,-95
hitsound   = s1,8
guardsound = s2,0
guard.sparkno = S4101
ground.type = high
ground.slidetime = 15
ground.hittime = 20
ground.velocity = -8,0
guard.velocity = -9
air.velocity = -8,-4
guard.ctrltime = 39
animtype = heavy
p2facing = 1
;yaccel = .43
envshake.time = 12
envshake.ampl = 3
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State 440, 3]
type = HitDef
trigger1 = animelem  = 9
attr = C, NA
damage   = 30,5
hitflag = MAF
guardflag = MA
;snap = 15,0,0
pausetime = 7,27
sparkno = s4407
sparkxy = -20,-65
hitsound   = s1,8
guardsound = s2,0
guard.sparkno = S4101
ground.type = low
ground.slidetime = 15
ground.hittime = 20
ground.velocity = -8,0
guard.velocity = -9
air.velocity = -8,-4
guard.ctrltime = 39
animtype = heavy
p2facing = 1
;yaccel = .43
envshake.time = 12
envshake.ampl = 3
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State 440, 3]
type = HitDef
trigger1 = animelem  = 14
attr = S, NA
damage   = 30,5
hitflag = MAF
guardflag = MA
pausetime = 8,9
;snap = 50,0,0
sparkno = s4406
sparkxy = -10,-85
hitsound   = s11,1
guardsound = s2,0
guard.sparkno = S4101
ground.type = high
ground.slidetime = 15
ground.hittime = 20
ground.velocity = -.2*ifelse(p2dist x>=0,1,-1),-8
guard.velocity = -9
air.velocity = -.2*ifelse(p2dist x>=0,1,-1),-8
guard.ctrltime = 39
air.hittime=35
animtype = heavy
persistent = 1
p2facing = 1
;yaccel = .43
envshake.time = 12
envshake.ampl = 3
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State 0, ChangeState]
type = ChangeState
triggerall = time >= 28
trigger1 = movehit && command = "Up"
trigger2 = movehit && command = "holdup"
trigger3 = movehit && (var(59) >=1) &&( random <=200)
value = 40
ctrl = 0

[State 3900, end]
type = ChangeState
;trigger1 = movehit
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Hit by hadou combo
[Statedef 1703]
type    = S
movetype= H
physics = S
velset = 0,0
sprpriority = 1

;[State 1703, Turn]
;type = Turn
;trigger1 = P2bodydist x < 0

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = 1
statetype = S       ;S,A,C,L
movetype = H        ;I,A,H
physics = S         ;A,C,S,N

[State 0, HitBy]
type = HitBy
trigger1 = 1
value = SCA,NA;,SA,HA,NP,SP,HP,NT,ST,HT
;value2 = S,NA
time = 1
;ignorehitpause =
;persistent =

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

[State 906, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1

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

[State 0, ChangeState]
type = Selfstate
trigger1 = p2stateno != [1700,1702]
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Throw Forward - Attempt
[Statedef 800]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 800
p2facing = 1
facep2 = 1
sprpriority = 2

[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT
hitflag = M-
priority = 1, Miss
sparkno = -1;s(var(1)+10)
sparkxy = -13, -72
hitsound = -1
sprpriority = 1
p1facing = 1;ifelse (command = "holdback", -1, 1)
p2facing = 1
p1stateno = 801
p2stateno = 820
guard.dist = 0
fall = 1

[State 800, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Throw Forward
[Statedef 801]
type    = S
movetype= A
physics = N
anim = 801
poweradd = 60

[State 801, Grab Sound]
type = PlaySnd
trigger1 = AnimElem = 1
value = s1100, 10

[State 801, Throw Sound]
type = PlaySnd
trigger1 = AnimElem = 9
value = s3,0

[State 810, Playerpush]
type = Playerpush
trigger1 = 1
value = 0

[State 1200, 9]
type = Width
trigger1 = animelemtime(8) >= 0
trigger1 = animelemtime(12) < 0
edge = 100,0

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

[State 801, Bind 1]
type = TargetBind
trigger1 = AnimElem = 1
pos = 60, 0

[State 801, Bind 1]
type = TargetBind
trigger1 = AnimElem = 2
pos = 20, 0

[State 801, Bind 2-4]
type = TargetBind
trigger1 = AnimElem = 3
pos = -20, -0

[State 801, Bind 5]
type = TargetBind
trigger1 = AnimElem = 4
pos = -30, -90

[State 801, Bind 6]
type = TargetBind
trigger1 = AnimElem = 5
pos = -35, -95

[State 801, Bind 8]
type = TargetBind
trigger1 = AnimElem = 6
pos = -40, -96

[State 801, Bind 9]
type = TargetBind
trigger1 = AnimElem = 7
pos = 5, -90

[State 801, Bind 10]
type = TargetBind
trigger1 = AnimElem = 8
pos = 10, -50

[State 801, Bind 11]
type = TargetBind
trigger1 = AnimElem = 9
pos = 15, -40

[State 801, Bind 11]
type = TargetBind
trigger1 = AnimElem = 10
pos = 18, -30

[State 801, Hurt 11]
type = TargetLifeAdd
trigger1 = p2stateno = 5100
value = -70
persistent = 0

[State 0, EnvShake]
type = EnvShake
trigger1 = p2stateno = 5100
time = 10
freq = 60
ampl = -4
persistent = 0

[State 801, 5]
type = PlaySnd
trigger1 = p2stateno = 5100
value = s1,6
persistent = 0

[State 810, posadd]
type = posadd
trigger1 = AnimElem = 12
x = 36*const(size.xscale)

[State 801, State End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Thrown by Throw Forward
[Statedef 820]
type    = A
movetype= H
physics = N
velset = 0,0

[State 820, ScreenBound]
type = ScreenBound
trigger1 = animelemtime(8) < 0
value = 0

[State 820, Vel]
type = Velset
trigger1 = time = 38
y = 10
x = 10

[State 820, Pos]
type = Posadd
trigger1 = Pos Y >= -20 && Vel Y > 0 && time > 38
x = 40

[State 820, Vel]
type = Velset
trigger1 = Pos Y >= -20 && Vel Y > 0 && time > 38
x = 2

[State 820, turn]
type = turn
Trigger1 = time = 13

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

[State 820, End]
type = Selfstate
trigger1 = Pos Y >= -20 && Vel Y > 0 && time > 38
value = 5100
;---------------------------------------------------------------------------
; Throw Forward - Attempt
[Statedef 830]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 800
p2facing = 1
facep2 = 1
sprpriority = 2

[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT
hitflag = M-
priority = 1, Miss
sparkno = -1;s(var(1)+10)
sparkxy = -13, -72
hitsound = -1
sprpriority = 1
p1facing = 1;ifelse (command = "holdback", -1, 1)
p2facing = 1
p1stateno = 831
p2stateno = 832
guard.dist = 0
fall = 1

[State 800, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Throw Back
[Statedef 831]
type    = S
movetype= A
physics = N
anim = 831
poweradd = 60

[State 801, Grab Sound]
type = PlaySnd
trigger1 = AnimElem = 1
value = s1100, 10

[State 801, Throw Sound]
type = PlaySnd
trigger1 = AnimElem = 5
value = s3,2

[State 801, Width 2-11]
type = Width
trigger1 = AnimElem = 2
edge = 2,0

[State 801, Bind 1]
type = TargetBind
trigger1 = AnimElem = 1
pos = 55, 0

[State 801, Bind 1]
type = TargetBind
trigger1 = AnimElem = 2
pos = 40, 0

[State 801, Bind 2-4]
type = TargetBind
trigger1 = AnimElem = 3
pos = 40, 0

[State 801, Bind 5]
type = TargetBind
trigger1 = AnimElem = 4
pos = 40, 0

[State 801, Bind 6]
type = TargetBind
trigger1 = AnimElem = 5
pos = 0, -55

[State 801, Bind 8]
type = TargetBind
trigger1 = AnimElem = 6
pos = -50, -75

[State 0, Turn]
type = Turn
trigger1 = AnimTime = 0

[State 801, Hurt 11]
type = TargetLifeAdd
trigger1 = AnimTime = 0
value = -70
persistent = 0

[State -2, EnvShake]
type = EnvShake
trigger1 = p2stateno = 5100
time = 10
freq = 60
ampl = -4
persistent = 0

[State -2, PlaySnd]
type = PlaySnd
trigger1 = p2stateno = 5100
value = s1,6
persistent = 0

[State 801, State End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Thrown by Throw Back
[Statedef 832]
type    = A
movetype= H
physics = N
velset = 0,0

[State 832, ScreenBound]
type = ScreenBound
trigger1 = animelemtime(7) < 0
value = 0

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

[State 832, Velset]
type = Velset
trigger1 = animelemtime(7) = 0
x = 5.5
y = -6.5

[State 832, Statetype]
type = Statetypeset
trigger1 = animelemtime(7) >= 0
physics = A

[State 832, Vel]
type = Velset
trigger1 = Pos Y >= -20 && Vel Y > 0 && animelemtime(7) > 0
x = 2.0

[State 832, SelfState]
type = Selfstate
trigger1 = Pos Y >= -20 && Vel Y > 0 && animelemtime(7) > 0
value = 5100

