;---------------------------------------------------------------------------
; EX Kikouken
[StateDef 2000]
type = S
movetype = A
physics = N
anim = 2000
ctrl = 0
velset = 0,0
facep2 = 1
poweradd = 0
sprpriority = 2

[State 2000, VarSet]
type = VarSet
trigger1 = !Time 
var(2) = 0
 
[State 2000, VarSet]
type = VarSet
trigger1 = Time = 0
var(2) = IfElse(command = "HCF_x", 0, 1)

[State 2000, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S(StateNo-1000), 0
volumescale = 100
channel = 0

[State 2000, 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 2000, Helper]
type = Helper
trigger1 = AnimElem = 4,=0
ID = 21000
pos = 60, -65
postype = p1
stateno = 11000
name = "Kikouken"
keyctrl = 0
ownpal = 1
supermovetime = 1
size.xscale = 1
size.yscale = 1

[State 2000, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 4,=1
movetype = I

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

;---------------------------------------------------------------------------
; EX Hyakuretsu Start
[StateDef 2005]
type = S
movetype = A
physics = N
ctrl = 0
velset = 0,0
facep2 = 1
poweradd = 0
sprpriority = 2
anim = 2005

[State 2005, PosAdd]
type = PosAdd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
trigger3 = AnimElem = 4
x = 10

[State 2005, 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 2005, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S1005, 0
volumescale = 100
channel = 0

[State 2005, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S5, 9
volumescale = 100
channel = 1

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

;---------------------------------------------------------------------------
; EX Hyakuretsu
[StateDef 2006]
type = S
movetype = A
physics = N
ctrl = 0
velset = 0,0
poweradd = 0
sprpriority = 2
hitcountpersist = 1

[State 2006, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = S(StateNo-1001), 0
volumescale = 100
channel = 0
 
[State 2006, ChangeAnim]
type = ChangeAnim
triggerall = !Time
trigger1 = PrevStateNo = 2005
value = Anim + 1

[State 2006, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = S5, 9
volumescale = 100
channel = 1

[State 2006, 1]
type = HitDef
triggerall = IfElse(var(31) = 0, var(15) < 3, var(15) < 4)
trigger1 = AnimElem = 1
trigger2 = AnimElem = 4
trigger3 = AnimElem = 7
trigger4 = AnimElem = 10
attr = S, SA			
damage = floor(10*fvar(20)),5
animtype = Heavy			
guardflag = MA			
hitflag = MAF
priority = 5, Hit			
pausetime = 2,2		
sparkno = S10001
guard.sparkno = S10131				
sparkxy = -10, -75		
hitsound = S5, 4			
guardsound = S6, 0			
ground.type = High	
ground.slidetime = 14
ground.hittime = 14
guard.hittime = 12
ground.velocity = 0, IfElse(UniqHitCount < 3, 0, -10.8)
guard.velocity = -5.8765
air.velocity = 0, IfElse(UniqHitCount < 3, 0, -10.8)
air.animtype = Back				
yaccel = 0.5
ground.cornerpush.veloff = 0
getpower = 0,0
givepower = 20
fall = IfElse(UniqHitCount < 3, 0, 1)
fall.recover = 0
id = 2005

[State 2006, VarSet]
type = VarSet
triggerall = MoveHit
trigger1 = EnemyNear,HitFall = 1
trigger1 = NumTarget(2005)
var(15) = IfElse(var(15) < 2, 2, 3)
persistent = 0

[State 2006, ChangeState]
type = ChangeState
trigger1 = Anim = 2006 && AnimTime = 0
value = 2007
ctrl = 0
;---------------------------------------------------------------------------
; EX Hyakuretsu End
[StateDef 2007]
type = S
movetype = A
physics = N
ctrl = 0
anim = 2007
velset = 0,0
poweradd = 0
sprpriority = 2

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

;---------------------------------------------------------------------------
; EX Spinning Bird Kick
[StateDef 2010]
type = S
movetype = A
physics = N
ctrl = 0
velset = 0,0
facep2 = 1
poweradd = 0
sprpriority = 2
anim = 2010

[State 2010, 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 2010, VelSet]
type = VelSet
trigger1 = AnimElem = 10
x = 7

[State 2010, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 10
statetype = A

[State 2010, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 10
value = S(StateNo-1000), 0
volumescale = 100
channel = 0

[State 2010, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 10
value = S(StateNo-1000), 1
volumescale = 100
channel = 1

[State 2010, 1]
type = HitDef
triggerall = IfElse(var(31) = 0, var(15) < 3, var(15) < 4)
trigger1 = AnimElem = 12
trigger2 = AnimElem = 16
trigger3 = AnimElem = 20
trigger4 = AnimElem = 24
trigger5 = AnimElem = 28
attr = A, SA			
damage = floor(20*fvar(20)), 10
animtype = Heavy		
guardflag = MA			
hitflag = MAF
priority = 5, Hit			
pausetime = 7,7		
sparkno = S10001
guard.sparkno = S10131				
sparkxy = -10, -75		
hitsound = S5, 4			
guardsound = S6, 0			
ground.type = High	
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 18
ground.velocity = -5.8765
air.velocity = -4.5,-6.5	
air.animtype = Back				
yaccel = 0.5
ground.cornerpush.veloff = 0
getpower = 0,0
givepower = 20
air.fall = 1
fall.recover = 0

[State 2010, 2]
type = HitDef
triggerall = IfElse(var(31) = 0, var(15) < 3, var(15) < 4)
trigger1 = AnimElem = 32
attr = A, SA			
damage = floor(20*fvar(20)), 0
animtype = Heavy			
guardflag = MA			
hitflag = MAF
priority = 5, Hit			
pausetime = 11,11		
sparkno = S10001
guard.sparkno = S10131				
sparkxy = -10, -75		
hitsound = S5, 5			
guardsound = S6, 0			
ground.type = High	
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 18
ground.velocity = -4.5, -7.5
air.velocity = -4.5, -7.5
air.animtype = Back				
yaccel = 0.5
ground.cornerpush.veloff = 0
getpower = 0,0
givepower = 20
fall = 1
fall.recover = 0

[State 2010, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 33
movetype = I

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

[State 2010, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 1012
;---------------------------------------------------------------------------
; EX Hazanshu
[StateDef 2015]
type = S
movetype = A
physics = N
ctrl = 0
velset = 0,0
facep2 = 1
poweradd = 0
sprpriority = 2
anim = 2015

[State 2015, NotHitBy]
type = NotHitBy
trigger1 = AnimElemTime(8) < 1
value = SCA

[State 2015, VelSet]
type = VelSet
trigger1 = AnimElem = 2
x = 9
y = -5

[State 2015, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 2 
statetype = A  

[State 2015, VelAdd]
type = VelAdd
trigger1 = StateType = A
y = 0.5875
   
[State 2015, 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 2015, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 7
value = S200, 2
volumescale = 100
channel = 0

[State 2015, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 7
value = S5, 10
volumescale = 100
channel = 1 

[State 2015, 1]
type = HitDef
triggerall = IfElse(var(31) = 0, var(15) < 3, var(15) < 4)
trigger1 = AnimElem = 8
attr = S, SA			
damage = floor(120*fvar(20)), 0
animtype = Heavy			
guardflag = HA			
hitflag = MAF
priority = 5, Hit			
pausetime = 7,7		
sparkno = S10001
guard.sparkno = S10131				
sparkxy = -10, -75		
hitsound = S5, 5			
guardsound = S6, 0			
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.animtype = Back				
yaccel = 0.5
ground.cornerpush.veloff = 0
getpower = 0,0
fall = 1
fall.recover = 0
givepower = 100
persistent = 0

[State 2015, VelSet]
type = VelSet
trigger1 = AnimElem = 9
x = 0
y = 0

[State 2015, PosSet]
type = PosSet
trigger1 = AnimElem = 9
y = 0

[State 2015, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 9 
statetype = S    

[State 2015, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 12
movetype = I  

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

;---------------------------------------------------------------------------
; EX Tenshou Kyaku
[StateDef 2020]
type = A
movetype = A
physics = N
ctrl = 0
facep2 = 1
poweradd = IfElse(var(31) = 0, 100, 0)	
sprpriority = 2
anim = 2020

[State 2020, 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 2020, VelSet]
type = VelSet
trigger1 = AnimElem = 2
x = 3
y = -3.5

[State 2020, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 2
statetype = A
ignorehitpause = 1

[State 2020, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = S(StateNo-1000), 0
volumescale = 100
channel = 0

[State 2020, NotHitBy]
type = NotHitBy
trigger1 = AnimElemTime(6) < 1
value = SCA
ignorehitpause = 1

[State 2020, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
trigger2 = AnimElem = 8
trigger3 = AnimElem = 12
trigger4 = AnimElem = 16
value = S5, 10
volumescale = 100
channel = 1 

[State 2020, 1]
type = HitDef
triggerall = IfElse(Var(31) = 0, var(15) < 3, var(15) < 4)
trigger1 = AnimElem = 2
attr = A, SA			
damage = floor(20*fvar(20)),10
animtype = Medium			
guardflag = MA			
hitflag = MAF
priority = 5, Hit			
pausetime = 7,7	
sparkno = S10001
guard.sparkno = S10131				
sparkxy = -10, -75		
hitsound = S5, 4			
guardsound = S6, 0			
ground.type = High	
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 18
ground.velocity = -2.5,-10.8
guard.velocity = -5.8765
air.velocity = -2.5,-10.8
air.hittime = 20
air.animtype = Back		
yaccel = 0.5
ground.cornerpush.veloff = 0
getpower = IfElse(!var(31), 50, 0), IfElse(!var(31), 50, 0)
givepower = 50
air.fall = 1
fall.recovertime = 60
persistent = 0

[State 2020, 2]
type = HitDef
triggerall = IfElse(Var(31) = 0, var(15) < 3, var(15) < 4)
trigger1 = AnimElem = 5
trigger2 = AnimElem = 6
attr = A, SA			
damage = floor(20*fvar(20)),10
animtype = Medium			
guardflag = MA			
hitflag = MAF
priority = 5, Hit			
pausetime = 7,7	
sparkno = S10001
guard.sparkno = S10131				
sparkxy = -10, -75		
hitsound = S5, 4			
guardsound = S6, 0			
ground.type = High	
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 18
ground.velocity = -2.5,-10.8
air.velocity = -2.5,-10.8
air.hittime = 20
air.animtype = Back		
yaccel = 0.5
ground.cornerpush.veloff = 0
getpower = IfElse(!var(31), 50, 0), IfElse(!var(31), 50, 0)
givepower = 50
air.fall = 1
fall.recovertime = 60
persistent = 0

[State 2020, 3]
type = HitDef
triggerall = IfElse(Var(31) = 0, var(15) < 3, var(15) < 4)
trigger1 = AnimElem = 8
trigger2 = AnimElem = 10
trigger3 = AnimElem = 12
trigger4 = AnimElem = 14
trigger5 = AnimElem = 16
attr = A, SA			
damage = floor(20*fvar(20)),10
animtype = Medium			
guardflag = MA			
hitflag = MAF
priority = 5, Hit			
pausetime = 7,7	
sparkno = S10001
guard.sparkno = S10131				
sparkxy = -10, -75		
hitsound = S5, 4			
guardsound = S6, 0			
ground.type = High	
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 18
ground.velocity = -2.5,-10.8
air.velocity = -2.5,-6.5
air.hittime = 20
air.animtype = Back		
yaccel = 0.5
ground.cornerpush.veloff = 0
getpower = IfElse(!var(31), 25, 0), IfElse(!var(31), 25, 0)
givepower = 25
fall = 1
fall.recovertime = 60

[State 2020, 4]
type = HitDef
triggerall = IfElse(Var(31) = 0, var(15) < 3, var(15) < 4)
trigger1 = AnimElem = 18
attr = A, SA			
damage = floor(20*fvar(20)),10
animtype = Medium			
guardflag = MA			
hitflag = MAF
priority = 5, Hit			
pausetime = 7,7	
sparkno = S10001
guard.sparkno = S10131				
sparkxy = -10, -75		
hitsound = S5, 5			
guardsound = S6, 0			
ground.type = High	
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 18
ground.velocity = -2.5,-10.8
air.velocity = -2.5,-10.8
air.hittime = 20
air.animtype = Back		
yaccel = 0.5
ground.cornerpush.veloff = 0
getpower = IfElse(!var(31), 25, 0), IfElse(!var(31), 25, 0)
givepower = 25
fall = 1
fall.recover = 0

[State 2020, VelMul]
type = VelMul
trigger1 = Time > 37
x = 0.9875

[State 2020, VelAdd]
type = VelAdd
trigger1 = Time > 37
y = 0.5

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

[State 2020, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 19
movetype = I

[State 2020, end]
type = ChangeState
trigger1 = Vel Y > 0 && Vel Y > -Pos Y
value = 1022
ctrl = 0