;---------------------------------------------------------------------------
; A Yo no Kaze
[StateDef 1000]
type = S
movetype = A
physics = S
anim = 1000
ctrl = 0
velset = 0,0
facep2 = 1
poweradd = IfElse(!var(31), 100, 0)
sprpriority = 2

[State 1000, Drive Cancel]
type = VarAdd
triggerall = PrevStateNo = [1000,2999]
trigger1 = !Time
var(30) = IfElse(var(31) = 0, -500, -90)
ignorehitpause = 1
persistent = 0

[State 1000, Drive Cancel Helper]
type = Helper
triggerall = PrevStateNo = [1000,2999]
trigger1 = !Time
name = "Drive/HD Cancel"
ID = 12000
stateno = 12000
pos = 0,0
postype = p1  
facing = 1
keyctrl = 0
ownpal = 1

[State 1000, Helper]
type = Helper
trigger1 = AnimElem = 7,=0
ID = 11000
pos = 50,0
postype = p1
stateno = 11000
name = "Yo No Kaze"
keyctrl = 0
ownpal = 1
supermovetime = 1
size.xscale = 1
size.yscale = 1

[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 9,=1
movetype = I

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

;---------------------------------------------------------------------------
; C Yo no Kaze
[StateDef 1001]
type = S
movetype = A
physics = S
anim = 1001
ctrl = 0
velset = 0,0
facep2 = 1
poweradd = IfElse(!var(31), 100, 0)
sprpriority = 2

[State 1001, Drive Cancel]
type = VarAdd
triggerall = PrevStateNo = [1000,2999]
trigger1 = !Time
var(30) = IfElse(var(31) = 0, -500, -90)
ignorehitpause = 1
persistent = 0

[State 1001, Drive Cancel Helper]
type = Helper
triggerall = PrevStateNo = [1000,2999]
trigger1 = !Time
name = "Drive/HD Cancel"
ID = 12000
stateno = 12000
pos = 0,0
postype = p1  
facing = 1
keyctrl = 0
ownpal = 1

[State 1001, Helper]
type = Helper
trigger1 = AnimElem = 7,=0
ID = 11001
pos = 150,0
postype = p1
stateno = 11000
name = "Yo No Kaze"
keyctrl = 0
ownpal = 1
supermovetime = 1
size.xscale = 1
size.yscale = 1

[State 1001, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 9,=1
movetype = I

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

;---------------------------------------------------------------------------
; B Yo no Kaze
[StateDef 1002]
type = S
movetype = A
physics = S
anim = 1002
ctrl = 0
velset = 0,0
facep2 = 1
poweradd = IfElse(!var(31), 100, 0)
sprpriority = 2

[State 1002, Drive Cancel]
type = VarAdd
triggerall = PrevStateNo = [1000,2999]
trigger1 = !Time
var(30) = IfElse(var(31) = 0, -500, -90)
ignorehitpause = 1
persistent = 0

[State 1002, Drive Cancel Helper]
type = Helper
triggerall = PrevStateNo = [1000,2999]
trigger1 = !Time
name = "Drive/HD Cancel"
ID = 12000
stateno = 12000
pos = 0,0
postype = p1  
facing = 1
keyctrl = 0
ownpal = 1

[State 1002, Helper]
type = Helper
trigger1 = AnimElem = 7,=0
ID = 11002
pos = 100,0
postype = p1
stateno = 11000
name = "Yo No Kaze"
keyctrl = 0
ownpal = 1
supermovetime = 1
size.xscale = 1
size.yscale = 1

[State 1002, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 9,=1
movetype = I

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

;---------------------------------------------------------------------------
; D Yo no Kaze
[StateDef 1003]
type = S
movetype = A
physics = S
anim = 1003
ctrl = 0
velset = 0,0
facep2 = 1
poweradd = IfElse(!var(31), 100, 0)
sprpriority = 2

[State 1003, Drive Cancel]
type = VarAdd
triggerall = PrevStateNo = [1000,2999]
trigger1 = !Time
var(30) = IfElse(var(31) = 0, -500, -90)
ignorehitpause = 1
persistent = 0

[State 1003, Drive Cancel Helper]
type = Helper
triggerall = PrevStateNo = [1000,2999]
trigger1 = !Time
name = "Drive/HD Cancel"
ID = 12000
stateno = 12000
pos = 0,0
postype = p1  
facing = 1
keyctrl = 0
ownpal = 1

[State 1003, Helper]
type = Helper
trigger1 = AnimElem = 7,=0
ID = 11003
pos = 200, 0
postype = p1
stateno = 11000
name = "Yo No Kaze"
keyctrl = 0
ownpal = 1
supermovetime = 1
size.xscale = 1
size.yscale = 1

[State 1003, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 9,=1
movetype = I

[State 1003, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; A Shin Aoi Hana: Seiran
[Statedef 1005]
type = S
movetype = A
physics = S
poweradd = IfElse(!var(31), 50, 0)
ctrl = 0
velset = 0,0
anim = 1005
sprpriority = 2			
facep2 = 1

[State 1005, Drive Cancel]
type = VarAdd
triggerall = PrevStateNo = [1000,2999]
trigger1 = !Time
var(30) = IfElse(var(31) = 0, -500, -90)
ignorehitpause = 1
persistent = 0

[State 1005, Drive Cancel Helper]
type = Helper
triggerall = PrevStateNo = [1000,2999]
trigger1 = !Time
name = "Drive/HD Cancel"
ID = 12000
stateno = 12000
pos = 0,0
postype = p1  
facing = 1
keyctrl = 0
ownpal = 1

[State 1005, VarSet]
type = VarSet
trigger1 = !Time
var(2) = 0

[State 1005, Whiff]
type = PlaySnd 
ignorehitpause = 1
trigger1 = AnimElem = 4
value = S1005, 1
channel = 1

[State 1005, Accel]
type = VelSet
trigger1 = AnimElemTime(2) > 0 && animelemtime(6) < 0
x = (8*exp((-0.081345639453952405887342355029362)*(time-8)))

[State 1005, Vel]
type = VelSet
trigger1 = animelem = 6
x = 0

[State 1005, VarSet]
type = VarSet
triggerall = AnimElemTime(6) >= 0
triggerall = AnimElemTime(8) < 0
trigger1 = AILevel = 0
trigger1 = command = "QCB_x" || command = "QCB_y" || command = "QCB_y"
;==
trigger2 = AILevel!=0 && RoundState = 2 
trigger2 = var(16) = [1,2]
trigger2 = P2BodyDist X = [0,70]
trigger2 = IfElse(EnemyNear, StateType != A, abs(P2Bodydist Y)<=60, (abs(P2BodyDist Y) = [30,120]))
trigger2 = IfElse(Var(31) = 0, var(15) < 3, var(15) < 4)
var(2) = 1
ignorehitpause = 1

[State 1005, 1]
type = HitDef
triggerall = IfElse(Var(31) = 0, var(15) < 3, var(15) < 4)
trigger1 = AnimElemTime(6) >= 0
attr = S, SA			
damage = floor(20*fvar(20)), 5
animtype = Medium			
guardflag = MA			
hitflag = MAF
priority = 4, Hit			
pausetime = 0,7	
sparkno = S10011
guard.sparkno = S10131				
sparkxy = -10, -75		
hitsound = S5, 13			
guardsound = S6, 1			
ground.type = High	
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 18
ground.velocity = const240p(-5.8765)
air.velocity = -4.5, -6.5
air.hittime = 20
air.animtype = Back		
yaccel = 0.5
ground.cornerpush.veloff = 0
getpower = IfElse(!var(31), 20, 0), IfElse(!var(31), 20, 0)
givepower = 20
persistent = 0
id = 1005

[State 1005, VarSet]
type = VarSet
triggerall = MoveHit
triggerall = NumTarget
trigger1 = Target, HitFall = 1
var(15) = IfElse(var(15) < 2, 2, 3)
ignorehitpause = 1
persistent = 0

[State 1005, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 8
movetype = I

[State 1005, ChangeState]
type = ChangeState
triggerall = Var(2) > 0
trigger1 = AnimElemTime(7) >= 4
value = 1006
ctrl = 0

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

;---------------------------------------------------------------------------
; A Shin Aoi Hana: Seiran
[Statedef 1006]
type = S
movetype = A
physics = S
poweradd = IfElse(!var(31), 50, 0)
ctrl = 0
velset = 0,0
anim = 1006
sprpriority = 2			

[State 1006, VarSet]
type = VarSet
trigger1 = !Time
var(2) = 0

[State 1006, Whiff]
type = PlaySnd 
ignorehitpause = 1
trigger1 = AnimElem = 3
value = S1005, 1
channel = 1

[State -2, Accel]
type = VelSet
trigger1 = AnimElemTime(1) > 0 && animelemtime(5) < 0
x = (8*exp((-0.081345639453952405887342355029362)*(time-1)))

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

[State 1006, VarSet]
type = VarSet
triggerall = AnimElemTime(5) >= 0
triggerall = AnimElemTime(8) < 0
trigger1 = AILevel = 0
trigger1 = command = "QCB_x" || command = "QCB_y" || command = "QCB_y"
;==
trigger2 = AILevel!=0 && RoundState = 2
trigger2 = var(16) = [1,2]
trigger2 = P2BodyDist X = [0,70]
trigger2 = IfElse(EnemyNear, StateType != A, abs(P2Bodydist Y)<=60, (abs(P2BodyDist Y) = [30,120]))
trigger2 = IfElse(Var(31) = 0, var(15) < 3, var(15) < 4)
var(2) = 1
ignorehitpause = 1

[State 1006, 1]
type = HitDef
triggerall = IfElse(Var(31) = 0, var(15) < 3, var(15) < 4)
trigger1 = AnimElemTime(5) >= 0
attr = S, SA			
damage = floor(20*fvar(20)), 5
animtype = Medium			
guardflag = MA			
hitflag = MAF
priority = 4, Hit			
pausetime = 0,7	
sparkno = S10011
guard.sparkno = S10131				
sparkxy = -10, -75		
hitsound = S5, 13			
guardsound = S6, 1			
ground.type = High	
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 18
ground.velocity = -5.8765
air.velocity = -4.5, -6.5
air.hittime = 20
air.animtype = Back		
yaccel = 0.5
ground.cornerpush.veloff = 0
getpower = IfElse(!var(31), 20, 0), IfElse(!var(31), 20, 0)
givepower = 20
persistent = 0
id = 1006

[State 1006, VarSet]
type = VarSet
triggerall = MoveHit
triggerall = NumTarget
trigger1 = Target, HitFall = 1
var(15) = IfElse(var(15) < 2, 2, 3)
ignorehitpause = 1
persistent = 0

[State 1006, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 7
movetype = I

[State 1006, ChangeState]
type = ChangeState
triggerall = Var(2) > 0
trigger1 = AnimElemTime(6) >= 3
value = 1007
ctrl = 0

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

;---------------------------------------------------------------------------
; A Shin Aoi Hana: Seiran
[Statedef 1007]
type = S
movetype = A
physics = S
poweradd = 0
ctrl = 0
velset = 0,0
anim = 1007
sprpriority = 2			

[State 1007, Whiff]
type = PlaySnd 
ignorehitpause = 1
trigger1 = AnimElem = 6
value = S1007, 1
channel = 1

[State 1007, Accel]
type = VelSet
trigger1 = animelemtime(1) >= 0
x = (5.0703125*exp((-0.081345639453952405887342355029362)*(time)))

[State 1007, 1]
type = HitDef
triggerall = IfElse(Var(31) = 0, var(15) < 3, var(15) < 4)
trigger1 = AnimElem = 8
attr = S, SA			
damage = floor(40*fvar(20)), 15
animtype = Medium			
guardflag = HA			
hitflag = MAF
priority = 4, Hit			
pausetime = 0,11	
sparkno = S10011
guard.sparkno = S10131				
sparkxy = -10, -75		
hitsound = S5, 14			
guardsound = S6, 1			
ground.type = High	
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 18
ground.velocity = -4.5, -7.5
guard.velocity = -11.1796875
air.velocity = -4.5, -7.5
air.hittime = 20
air.animtype = Back	
fall = 1
fall.recover = 0	
yaccel = 0.5
ground.cornerpush.veloff = 0
getpower = IfElse(!var(31), 60, 0), IfElse(!var(31), 60, 0)
givepower = 60
persistent = 0
id = 1007

[State 1007, VarSet]
type = VarSet
triggerall = MoveHit
triggerall = NumTarget
trigger1 = Target, HitFall = 1
var(15) = IfElse(var(15) < 2, 2, 3)
ignorehitpause = 1
persistent = 0

[State 1007, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 10
movetype = I

[State 1007, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; C Shin Aoi Hana: Seiran
[Statedef 1010]
type = S
movetype = A
physics = S
poweradd = IfElse(!var(31), 50, 0)
ctrl = 0
velset = 0,0
anim = 1010
sprpriority = 2			
facep2 = 1

[State 1010, Drive Cancel]
type = VarAdd
triggerall = PrevStateNo = [1000,2999]
trigger1 = !Time
var(30) = IfElse(var(31) = 0, -500, -90)
ignorehitpause = 1
persistent = 0

[State 1010, Drive Cancel Helper]
type = Helper
triggerall = PrevStateNo = [1000,2999]
trigger1 = !Time
name = "Drive/HD Cancel"
ID = 12000
stateno = 12000
pos = 0,0
postype = p1  
facing = 1
keyctrl = 0
ownpal = 1

[State 1010, VarSet]
type = VarSet
trigger1 = !Time
var(2) = 0

[State 1010, Whiff]
type = PlaySnd 
ignorehitpause = 1
trigger1 = AnimElem = 4
value = S1005, 1
channel = 1

[State 1010, Accel]
type = VelSet
trigger1 = AnimElemTime(2) > 0 && animelemtime(6) < 0
x = (10*exp((-0.081345639453952405887342355029362)*(time-8)))

[State 1010, Vel]
type = VelSet
trigger1 = animelem = 6
x = 0

[State 1010, VarSet]
type = VarSet
triggerall = AnimElemTime(6) >= 0
triggerall = AnimElemTime(8) < 0
trigger1 = AILevel = 0
trigger1 = command = "QCB_x" || command = "QCB_y"
;==
trigger2 = AILevel!=0 && RoundState = 2
trigger2 = var(16) = [1,2]
trigger2 = P2BodyDist X = [0,70]
trigger2 = IfElse(EnemyNear, StateType != A, abs(P2Bodydist Y)<=60, (abs(P2BodyDist Y) = [30,120]))
trigger2 = IfElse(Var(31) = 0, var(15) < 3, var(15) < 4)
var(2) = 1
ignorehitpause = 1

[State 1010, 1]
type = HitDef
triggerall = IfElse(Var(31) = 0, var(15) < 3, var(15) < 4)
trigger1 = AnimElemTime(6) >= 0
attr = S, SA			
damage = floor(30*fvar(20)), 5
animtype = Medium			
guardflag = MA			
hitflag = MAF
priority = 4, Hit			
pausetime = 0,7	
sparkno = S10011
guard.sparkno = S10131				
sparkxy = -10, -75		
hitsound = S5, 13			
guardsound = S6, 1			
ground.type = High	
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 18
ground.velocity = const240p(-5.8765)
air.velocity = -4.5, -6.5
air.hittime = 20
air.animtype = Back		
yaccel = 0.5
ground.cornerpush.veloff = 0
getpower = IfElse(!var(31), 20, 0), IfElse(!var(31), 20, 0)
givepower = 20
persistent = 0
id = 1005

[State 1010, VarSet]
type = VarSet
triggerall = MoveHit
triggerall = NumTarget
trigger1 = Target, HitFall = 1
var(15) = IfElse(var(15) < 2, 2, 3)
ignorehitpause = 1
persistent = 0

[State 1010, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 8
movetype = I

[State 1010, ChangeState]
type = ChangeState
triggerall = Var(2) > 0
trigger1 = AnimElemTime(7) >= 4
value = 1011
ctrl = 0

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

;---------------------------------------------------------------------------
; C Shin Aoi Hana: Seiran
[Statedef 1011]
type = S
movetype = A
physics = S
poweradd = IfElse(!var(31), 50, 0)
ctrl = 0
velset = 0,0
anim = 1011
sprpriority = 2

[State 1011, VarSet]
type = VarSet
trigger1 = !Time
var(2) = 0

[State 1011, Whiff]
type = PlaySnd 
ignorehitpause = 1
trigger1 = AnimElem = 3
value = S1006, 1
channel = 1

[State 1011, Accel]
type = VelSet
trigger1 = AnimElemTime(2) > 0 && animelemtime(6) < 0
x = (10*exp((-0.081345639453952405887342355029362)*(time-8)))

[State 1011, Vel]
type = VelSet
trigger1 = animelem = 6
x = 0

[State 1011, VarSet]
type = VarSet
triggerall = AnimElemTime(5) >= 0
triggerall = AnimElemTime(8) < 0
trigger1 = AILevel = 0
trigger1 = command = "QCB_x" || command = "QCB_y"
;==
trigger2 = AILevel!=0 && RoundState = 2
trigger2 = var(16) = [1,2]
trigger2 = P2BodyDist X = [0,70]
trigger2 = IfElse(EnemyNear, StateType != A, abs(P2Bodydist Y)<=60, (abs(P2BodyDist Y) = [30,120]))
trigger2 = IfElse(Var(31) = 0, var(15) < 3, var(15) < 4)
var(2) = 1
ignorehitpause = 1

[State 1011, 1]
type = HitDef
triggerall = IfElse(Var(31) = 0, var(15) < 3, var(15) < 4)
trigger1 = AnimElemTime(5) >= 0
attr = S, SA			
damage = floor(30*fvar(20)), 5
animtype = Medium			
guardflag = MA			
hitflag = MAF
priority = 4, Hit			
pausetime = 0,7	
sparkno = S10011
guard.sparkno = S10131				
sparkxy = -10, -75		
hitsound = S5, 13			
guardsound = S6, 1			
ground.type = High	
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 18
ground.velocity = -5.8765
air.velocity = -4.5, -6.5
air.hittime = 20
air.animtype = Back		
yaccel = 0.5
ground.cornerpush.veloff = 0
getpower = IfElse(!var(31), 20, 0), IfElse(!var(31), 20, 0)
givepower = 100
persistent = 0
id = 1005

[State 1011, VarSet]
type = VarSet
triggerall = MoveHit
triggerall = NumTarget
trigger1 = Target, HitFall = 1
var(15) = IfElse(var(15) < 2, 2, 3)
ignorehitpause = 1
persistent = 0

[State 1011, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 8
movetype = I

[State 1011, ChangeState]
type = ChangeState
triggerall = Var(2) > 0
trigger1 = AnimElemTime(6) >= 3
value = 1012
ctrl = 0

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

;---------------------------------------------------------------------------
; C Shin Aoi Hana: Seiran
[Statedef 1012]
type = S
movetype = A
physics = S
poweradd = 0
ctrl = 0
velset = 0,0
anim = 1012
sprpriority = 2			

[State 1012, Whiff]
type = PlaySnd 
ignorehitpause = 1
trigger1 = AnimElem = 7
value = S1007, 1
channel = 1

[State -2, Accel]
type = VelSet
trigger1 = animelemtime(1) >= 0
x = (7.0703125*exp((-0.081345639453952405887342355029362)*(time)))

[State 1012, 1]
type = HitDef
triggerall = IfElse(Var(31) = 0, var(15) < 3, var(15) < 4)
trigger1 = AnimElem = 8
attr = S, SA			
damage = floor(30*fvar(20)), 20
animtype = Medium			
guardflag = HA			
hitflag = MAF
priority = 4, Hit			
pausetime = 0,11	
sparkno = S10011
guard.sparkno = S10131				
sparkxy = -10, -75		
hitsound = S5, 14			
guardsound = S6, 1			
ground.type = High	
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 18
ground.velocity = -4.5, -7.5
guard.velocity = -11.1796875
air.velocity = -4.5, -7.5
air.hittime = 20
air.animtype = Back	
fall = 1
fall.recover = 0	
yaccel = 0.5
ground.cornerpush.veloff = 0
getpower = IfElse(!var(31), 60, 0), IfElse(!var(31), 60, 0)
givepower = 60
persistent = 0

[State 1012, VarSet]
type = VarSet
triggerall = MoveHit
triggerall = NumTarget
trigger1 = Target, HitFall = 1
var(15) = IfElse(var(15) < 2, 2, 3)
ignorehitpause = 1
persistent = 0

[State 1012, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 9
movetype = I

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

;----------------------------------------
;Hyouga (KOF98 UM)
[Statedef 1015]
type    = S
movetype = I
physics = N
poweradd = IfElse(!var(31), 100, 0)
ctrl = 0
velset = 0
sprpriority = 2
facep2 = 1

[State 1015, Drive Cancel]
type = VarAdd
triggerall = PrevStateNo = [1000,2999]
trigger1 = !Time
var(30) = IfElse(var(31) = 0, -500, -90)
ignorehitpause = 1
persistent = 0

[State 1015, Drive Cancel Helper]
type = Helper
triggerall = PrevStateNo = [1000,2999]
trigger1 = !Time
name = "Drive/HD Cancel"
ID = 12000
stateno = 12000
pos = 0,0
postype = p1  
facing = 1
keyctrl = 0
ownpal = 1

[State -3, Punch Swing 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = S1015,0
channel = 0

[State -3, Punch Swing 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = S1015,1
channel = 1

[State 1015, Hyouga Explod 1]
type = Explod
trigger1 = AnimElem = 2
anim = 11015
ID = 11015
pos = 0,0
postype = p1 
bindtime = 1
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = 5
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1

[State 1015, VarSet]
type = VarSet
trigger1 = Time = 0
var(2) = ifElse(Command = "a",0,1)

[State 1015, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 0
value = 1015 + var(2)

[State -2, Accel]
type = VelSet
trigger1 = anim = 1015
trigger1 = animelemtime(2) > 16 && animelemtime(13) < 0
x = 8

[State -2, Vel]
type = VelSet
trigger1 = anim = 1015
trigger1 = animelem = 13
x = 0

[State 1015, VelSet]
type = VelSet
trigger1 = anim = 1016
trigger1 = animelem = 2, = 17
x = 8
y = -6
persistent = 0

[State 1015, VelAdd]
type = VelAdd
trigger1 = anim = 1016
trigger1 = time > 20
y = 0.5625

[State 1015, StateTypeSet]
type = StateTypeSet
trigger1 = anim = 1016
trigger1 = animelem = 2, = 17
statetype = A

[State 1015, Push]
type = PlayerPush
trigger1 = anim = 1015 && animelemtime(2) > 0 && animelemtime(13) < 0
trigger2 = anim = 1016 && animelemtime(2) > 0
value = 0

[State 1015, NotHitBy]
type = NotHitBy
trigger1 = animelemtime(3) < 0
trigger2 = animelemtime(4) >= 0 && animelemtime(5) < 0
trigger3 = animelemtime(6) >= 0 && animelemtime(7) < 0
trigger4 = animelemtime(8) >= 0 && animelemtime(9) < 0
trigger5 = animelemtime(10) >= 0 && animelemtime(11) < 0
value = SCA
time = 1

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

[State 1015, PlaySnd]
type = PlaySnd
trigger1 = anim = 1015 && animelem = 3
value = 2,12

[State 1015, PlaySnd]
type = PlaySnd
trigger1 = anim = 1016 && animelem = 3
value = 2,4

[State 1015, ChangeState]
type = ChangeState
trigger1 = anim = 1016 && statetype = A
trigger1 = Vel Y + Pos Y >= 0
value = 1017
ctrl = 0

[State 1015, end]
type = ChangeState
trigger1 = anim = 1015 && animtime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Land
[Statedef 1017]
type    = S
movetype= I
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
sprpriority = 2
anim = 1017

[State 1017, Land]
type = PlaySnd
trigger1 = !time
value = S47,0

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

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

;----------------------------------------
;Wanpyou Tokobuse/Mametsu
[Statedef 1020]
type = S
movetype = A
physics = N
poweradd = IfElse(!var(31), 100, 0)
ctrl = 0
velset = 0
sprpriority = 2
facep2 = 1

[State 1020, Drive Cancel]
type = VarAdd
triggerall = PrevStateNo = [1000,2999]
trigger1 = !Time
var(30) = IfElse(var(31) = 0, -500, -90)
ignorehitpause = 1
persistent = 0

[State 1020, Voice]
type = PlaySnd
trigger1 = AnimElem = 8
value = S1020,0
channel = 0

[State 1020, Snap]
type = PlaySnd
trigger1 = AnimElem = 8
value = S1020,2
channel = 2
volumescale = 200

[State 1020, Drive Cancel Helper]
type = Helper
triggerall = PrevStateNo = [1000,2999]
trigger1 = !Time
name = "Drive/HD Cancel"
ID = 12000
stateno = 12000
pos = 0,0
postype = p1  
facing = 1
keyctrl = 0
ownpal = 1

[State 1020, VarSet]
type = VarSet
trigger1 = Time = 0
var(2) = ifElse(AILevel = 0 && Command = "x" || AILevel != 0 && P2StateType != A, 0, 1)

[State 1020, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 0
value = IfElse(var(2) = 0, 1020, 1023)

[State 1020, 1]
type = HitDef
triggerall = Anim = 1020
triggerall = IfElse(Var(31) = 0, var(15) < 3, var(15) < 4)
trigger1 = AnimElem = 9
trigger2 = AnimElem = 15
trigger3 = AnimElem = 21
attr = S, SA			
damage = floor(10*fvar(20)), 5
animtype = Medium			
guardflag = MA			
hitflag = MAF
priority = 4, Hit			
pausetime = 3,3	
sparkno = S10011
guard.sparkno = S10131				
sparkxy = -10, -75		
hitsound = S5, 13			
guardsound = S6, 1			
ground.type = High	
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 18
ground.velocity = -5.8765
air.velocity = -4.5, -6.5
air.hittime = 20
air.animtype = Back		
yaccel = 0.5
ground.cornerpush.veloff = 0
getpower = IfElse(!var(31), 10, 0), IfElse(!var(31), 10, 0)
givepower = 10
air.fall = 1
fall.recovertime = 30
id = 1020

[State 1020, 2]
type = HitDef
triggerall = Anim = 1020
triggerall = IfElse(Var(31) = 0, var(15) < 3, var(15) < 4)
trigger1 = AnimElem = 11
trigger2 = AnimElem = 17
trigger3 = AnimElem = 23
attr = S, SA			
damage = floor(10*fvar(20)), 5
animtype = Medium			
guardflag = MA			
hitflag = MAF
priority = 4, Hit			
pausetime = 3,3	
sparkno = S10011
guard.sparkno = S10131				
sparkxy = -10, -45		
hitsound = S5, 13			
guardsound = S6, 1			
ground.type = High	
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 18
ground.velocity = 0
air.velocity = -4.5, -6.5
air.hittime = 20
air.animtype = Back		
yaccel = 0.5
ground.cornerpush.veloff = 0
getpower = IfElse(!var(31), 10, 0), IfElse(!var(31), 10, 0)
givepower = 10
air.fall = 1
fall.recovertime = 30
id = 1020

[State 1020, 3]
type = HitDef
triggerall = Anim = 1020
triggerall = IfElse(Var(31) = 0, var(15) < 3, var(15) < 4)
trigger1 = AnimElem = 13
trigger2 = AnimElem = 19
attr = S, SA			
damage = floor(10*fvar(20)), 5
animtype = Medium			
guardflag = MA			
hitflag = MAF
priority = 4, Hit			
pausetime = 3,3	
sparkno = S10011
guard.sparkno = S10131				
sparkxy = -10, -25		
hitsound = S5, 13			
guardsound = S6, 1			
ground.type = High	
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 18
ground.velocity = -5.8765
air.velocity = -4.5, -6.5
air.hittime = 20
air.animtype = Back		
yaccel = 0.5
ground.cornerpush.veloff = 0
getpower = IfElse(!var(31), 10, 0), IfElse(!var(31), 10, 0)
givepower = 10
air.fall = 1
fall.recovertime = 30
id = 1020

[State 1020, 4]
type = HitDef
triggerall = Anim = 1020
triggerall = IfElse(Var(31) = 0, var(15) < 3, var(15) < 4)
trigger1 = AnimElem = 25
attr = S, SA			
damage = floor(20*fvar(20)), 5
animtype = Medium			
guardflag = MA			
hitflag = MAF
priority = 4, Hit			
pausetime = 3,3	
sparkno = S10011
guard.sparkno = S10131				
sparkxy = -10, -75		
hitsound = S5, 13			
guardsound = S6, 1			
ground.type = High	
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 18
ground.velocity = -5.8765
air.velocity = -4.5, -6.5
air.hittime = 20
air.animtype = Back		
yaccel = 0.5
ground.cornerpush.veloff = 0
getpower = IfElse(!var(31), 10, 0), IfElse(!var(31), 10, 0)
givepower = 10
air.fall = 1
fall.recovertime = 30
air.fall = 1
fall.recovertime = 30
id = 1020

;== Mametsu HitDefs ==

[State 1020, 5]
type = HitDef
triggerall = Anim = 1023
triggerall = IfElse(Var(31) = 0, var(15) < 3, var(15) < 4)
trigger1 = AnimElem = 7
trigger2 = AnimElem = 12
trigger3 = AnimElem = 17
attr = S, SA			
damage = floor(10*fvar(20)), 5
animtype = Medium			
guardflag = MA			
hitflag = MAF
priority = 4, Hit			
pausetime = 3,3	
sparkno = S10011
guard.sparkno = S10131				
sparkxy = -10, -75		
hitsound = S5, 13			
guardsound = S6, 1			
ground.type = High	
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 18
ground.velocity = 0
air.velocity = -4.5, -6.5
air.hittime = 20
air.animtype = Back		
yaccel = 0.5
ground.cornerpush.veloff = 0
getpower = IfElse(!var(31), 10, 0), IfElse(!var(31), 10, 0)
givepower = 10
id = 1023

[State 1020, 6]
type = HitDef
triggerall = Anim = 1023
triggerall = IfElse(Var(31) = 0, var(15) < 3, var(15) < 4)
trigger1 = AnimElem = 9
trigger2 = AnimElem = 14
trigger3 = AnimElem = 19
attr = S, SA			
damage = floor(10*fvar(20)), 5
animtype = Medium			
guardflag = MA			
hitflag = MAF
priority = 4, Hit			
pausetime = 3,3	
sparkno = S10011
guard.sparkno = S10131				
sparkxy = -10, -75		
hitsound = S5, 13			
guardsound = S6, 1			
ground.type = High	
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 18
ground.velocity = 0
air.velocity = -4.5, -6.5
air.hittime = 20
air.animtype = Back		
yaccel = 0.5
ground.cornerpush.veloff = 0
getpower = IfElse(!var(31), 10, 0), IfElse(!var(31), 10, 0)
givepower = 10
id = 1023

[State 1020, 7]
type = HitDef
triggerall = Anim = 1023
triggerall = IfElse(Var(31) = 0, var(15) < 3, var(15) < 4)
trigger1 = AnimElem = 11
trigger2 = AnimElem = 16
attr = S, SA			
damage = floor(10*fvar(20)), 5
animtype = Medium			
guardflag = MA			
hitflag = MAF
priority = 4, Hit			
pausetime = 3,3	
sparkno = S10011
guard.sparkno = S10131				
sparkxy = -10, -75		
hitsound = S5, 13			
guardsound = S6, 1			
ground.type = High	
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 18
ground.velocity = 0
air.velocity = -4.5, -6.5
air.hittime = 20
air.animtype = Back		
yaccel = 0.5
ground.cornerpush.veloff = 0
getpower = IfElse(!var(31), 10, 0), IfElse(!var(31), 10, 0)
givepower = 10
id = 1023

[State 1020, 8]
type = HitDef
triggerall = Anim = 1023
triggerall = IfElse(Var(31) = 0, var(15) < 3, var(15) < 4)
trigger1 = AnimElem = 21
attr = S, SA			
damage = floor(20*fvar(20)), 5
animtype = Medium			
guardflag = MA			
hitflag = MAF
priority = 4, Hit			
pausetime = 3,3	
sparkno = S10011
guard.sparkno = S10131				
sparkxy = -10, -75		
hitsound = S5, 13			
guardsound = S6, 1			
ground.type = High	
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 18
ground.velocity = -4.5, -6.5
air.velocity = -4.5, -6.5
air.hittime = 20
air.animtype = Back		
yaccel = 0.5
ground.cornerpush.veloff = 0
getpower = IfElse(!var(31), 10, 0), IfElse(!var(31), 10, 0)
givepower = 10
fall = 1
fall.recovertime = 30
id = 1023

;== Explods ==

[State 1020, Projectile]
type = Projectile
triggerall = Anim = 1020 || Anim = 1023
trigger1 = animelem = 9
trigger2 = animelem = 14, = 2
trigger3 = animelem = 20, = 2
trigger4 = animelem = 26, = 2
trigger5 = animelem = 33
ProjID = 11020
projanim = 11020
projremovetime = 8
velocity = 2,-2
projsprpriority = 4
offset = 74,-107 + IfElse(var(2) = 0, 0, -75)
afterimage.time = 999*var(20)
afterimage.length = 10
afterimage.palcolor = 256
afterimage.palbright = -10,-10,-10
afterimage.palcontrast = 255,255,255
afterimage.palpostbright = -145,-155,-115
afterimage.paladd = 0,0,0
afterimage.palmul = .4,.4,.4
afterimage.timegap = 1
afterimage.framegap = 3
afterimage.trans = add

[State 1020, Projectile]
type = Projectile
triggerall = Anim = 1020 || Anim = 1023
trigger1 = animelem = 13, = 2
trigger2 = animelem = 19, = 2
trigger3 = animelem = 25, = 2
trigger4 = animelem = 31, = 2
ProjID = 11020
projanim = 11020
projremovetime = 8
velocity = 2,-2
projsprpriority = 4
offset = 58,-91 + IfElse(var(2) = 0, 0, -75)
afterimage.time = 999*var(20)
afterimage.length = 10
afterimage.palcolor = 256
afterimage.palbright = -10,-10,-10
afterimage.palcontrast = 255,255,255
afterimage.palpostbright = -145,-155,-115
afterimage.paladd = 0,0,0
afterimage.palmul = .4,.4,.4
afterimage.timegap = 1
afterimage.framegap = 3
afterimage.trans = add

[State 1020, Projectile]
type = Projectile
triggerall = Anim = 1020 || Anim = 1023
trigger1 = animelem = 10
trigger2 = animelem = 15, = 2
trigger3 = animelem = 21, = 2
trigger4 = animelem = 27, = 2
ProjID = 10301
projanim = 11021
projremovetime = 8
velocity = 2,2
projsprpriority = 4
offset = 58,-38 + IfElse(var(2) = 0, 0, -75)
afterimage.time = 999*var(20)
afterimage.length = 10
afterimage.palcolor = 256
afterimage.palbright = -10,-10,-10
afterimage.palcontrast = 255,255,255
afterimage.palpostbright = -145,-155,-115
afterimage.paladd = 0,0,0
afterimage.palmul = .4,.4,.4
afterimage.timegap = 1
afterimage.framegap = 3
afterimage.trans = add

[State 1020, Projectile]
type = Projectile
triggerall = Anim = 1020 || Anim = 1023
trigger1 = animelem = 12, = 2
trigger2 = animelem = 18, = 2
trigger3 = animelem = 24, = 2
trigger4 = animelem = 30, = 2
ProjID = 10301
projanim = 11021
projremovetime = 8
velocity = 2,2
projsprpriority = 4
offset = 74,-22 + IfElse(var(2) = 0, 0, -75)
afterimage.time = 999*var(20)
afterimage.length = 10
afterimage.palcolor = 256
afterimage.palbright = -10,-10,-10
afterimage.palcontrast = 255,255,255
afterimage.palpostbright = -145,-155,-115
afterimage.paladd = 0,0,0
afterimage.palmul = .4,.4,.4
afterimage.timegap = 1
afterimage.framegap = 3
afterimage.trans = add

[State 1020, Projectile]
type = Projectile
triggerall = Anim = 1020 || Anim = 1023
trigger1 = animelem = 10, = 2
trigger2 = animelem = 16, = 2
trigger3 = animelem = 22, = 2
trigger4 = animelem = 28, = 2
ProjID = 11020
projanim = 11022
projremovetime = 8
velocity = 4,0
projsprpriority = 4
offset = 100,-64 + IfElse(var(2) = 0, 0, -75)
afterimage.time = 999*var(20)
afterimage.length = 10
afterimage.palcolor = 256
afterimage.palbright = -10,-10,-10
afterimage.palcontrast = 255,255,255
afterimage.palpostbright = -145,-155,-115
afterimage.paladd = 0,0,0
afterimage.palmul = .4,.4,.4
afterimage.timegap = 1
afterimage.framegap = 3
afterimage.trans = add

[State 1020, Projectile]
type = Projectile
triggerall = Anim = 1020 || Anim = 1023
trigger1 = animelem = 11, = 2
trigger2 = animelem = 17, = 2
trigger3 = animelem = 23, = 2
trigger4 = animelem = 29, = 2
ProjID = 11020
projanim = 11022
projremovetime = 8
velocity = 4,0
projsprpriority = 4
offset = 76, -64 + IfElse(var(2) = 0, 0, -75)
afterimage.time = 999*var(20)
afterimage.length = 10
afterimage.palcolor = 256
afterimage.palbright = -10,-10,-10
afterimage.palcontrast = 255,255,255
afterimage.palpostbright = -145,-155,-115
afterimage.paladd = 0,0,0
afterimage.palmul = .4,.4,.4
afterimage.timegap = 1
afterimage.framegap = 3
afterimage.trans = add

;==

[State 1020, PlaySnd]
type = PlaySnd
triggerall = Anim = 1020 || Anim = 1023
trigger1 = animelem = 9
trigger2 = animelem = 11
trigger3 = animelem = 13
trigger4 = animelem = 15
trigger5 = animelem = 17
trigger6 = animelem = 19
trigger7 = animelem = 21
trigger8 = animelem = 23
trigger9 = animelem = 25
trigger10 = animelem = 27
trigger11 = animelem = 29
trigger12 = animelem = 31
trigger13 = animelem = 33
value = S1020,1
channel = 2

[State 1020, ChangeAnim]
type = ChangeAnim
triggerall = Anim = 1020
trigger1 = AnimTime = 0
value = 1021
persistent = 0

[State 1020, ChangeAnim]
type = ChangeAnim
triggerall = Anim = 1023
trigger1 = AnimTime = 0
value = 1024
persistent = 0

[State 1020, end]
type = ChangeState
triggerall = 1021 || Anim = 1024
trigger1 = AnimTime = 0
value = 0
ctrl = 1
