;---------------------------------------------------------------------------
;A Hakki Shou
[StateDef 1000]
type = S
movetype = A
physics = N
anim = 1000
ctrl = 0
velset = 0,0
facep2 = 1
poweradd = 0
sprpriority = 2

[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, HD Meter Decrease]
type = VarAdd
triggerall =  PrevStateNo = [1000,2099]
trigger1 = !Time
var(30) = IfElse(var(31) = 0, -500, -90)
ignorehitpause = 1
persistent = 0

[State 1000, Explod]
type = Explod
trigger1 = AnimElem = 1
anim = 21000
ID = 21000
pos = 0,0
postype = p1  
bindtime = -1
removetime = -2
sprpriority = 3
shadow = 0,0,0
ownpal = 1
removeongethit = 1

[State 1000, Helper]
type = Helper
trigger1 = AnimElem = 7,=0
ID = 11000
pos = 60, -65
postype = p1
stateno = 11000
helpertype = normal
name = "Hakki Shou"
keyctrl = 0
ownpal = 1
supermovetime = 1
size.xscale = 1
size.yscale = 1

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

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

;---------------------------------------------------------------------------
;C Hakki Shou
[StateDef 1001]
type = S
movetype = A
physics = N
anim = 1001
ctrl = 0
velset = 0,0
facep2 = 1
poweradd = 0
sprpriority = 2

[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, HD Meter Decrease]
type = VarAdd
triggerall =  PrevStateNo = [1000,2099]
trigger1 = !Time
var(30) = IfElse(var(31) = 0, -500, -90)
ignorehitpause = 1
persistent = 0

[State 1001, Explod]
type = Explod
trigger1 = AnimElem = 1
anim = 21001
ID = 21000
pos = 0,0
postype = p1  
bindtime = -1
removetime = -2
sprpriority = 3
shadow = 0,0,0
ownpal = 1
removeongethit = 1

[State 1001, Helper]
type = Helper
trigger1 = AnimElem = 7,=0
ID = 11001
pos = 60, -65
postype = p1
stateno = 11000
helpertype = normal
name = "Hakki Shou"
keyctrl = 0
ownpal = 1
supermovetime = 1
size.xscale = 1
size.yscale = 1

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

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

;---------------------------------------------------------------------------
; A Sousou Shin 
[StateDef 1005]
type = S
movetype = A
physics = N
anim = 1005
ctrl = 0
velset = 0,0
facep2 = 1
poweradd = IfElse(var(31) = 0, 100, 0)	
sprpriority = 2

[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, HD Meter Decrease]
type = VarAdd
triggerall =  PrevStateNo = [1000,2099]
trigger1 = !Time
var(30) = IfElse(var(31) = 0, -500, -90)
ignorehitpause = 1
persistent = 0

[State 1005, StateTypeSet]
type = StateTypeSet
trigger1 = Pos Y != 0
statetype = A
ignorehitpause = 1

[State 1005, StateTypeSet]
type = StateTypeSet
trigger1 = Pos Y = 0
statetype = S
ignorehitpause = 1

[State 1005, VelSet]
type = VelSet
trigger1 = AnimElem = 5
x = 6
ignorehitpause = 1

[State 1005, PosAdd]
type = PosAdd
trigger1 = AnimElemTime(5) = [0,4]
y = -6

[State 1005, PosAdd]
type = PosAdd
trigger1 = AnimElemTime(6)>=0 && AnimElemTime(7) < 2
y = 6

[State 1005, 1]
type = HitDef
triggerall = IfElse(Var(31) = 0, var(15) < 2, var(15) < 4)
trigger1 = AnimElem = 6 
trigger2 = AnimElem = 7
trigger3 = AnimElem = 8
trigger4 = AnimElem = 9
attr = S, SA			
damage = floor(15*fvar(20)), 10
animtype = Medium			
guardflag = MA			
hitflag = MAF
priority = 5, Hit			
pausetime = 5,5	
guard.pausetime = 5,7
sparkno = S10001
guard.sparkno = S10131				
sparkxy = -10, -75		
hitsound = S5, 1			
guardsound = S6, 0			
ground.type = High	
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 24
ground.velocity = -2.58765
air.velocity = -2.5,-4.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

[State 1005, VelSet]
type = VelSet
trigger1 = AnimElem = 9
x = 3
ignorehitpause = 1

[State 1005, VelSet]
type = VelSet
trigger1 = AnimElem = 11
x = 2
ignorehitpause = 1

[State 1005, PosAdd]
type = PosAdd
trigger1 = AnimElemTime(11) = [0,4]
y = -6

[State 1005, PosAdd]
type = PosAdd
triggerall = Pos Y < 0
trigger1 = AnimElemTime(12) = [0,4]
trigger2 = AnimElemTime(13) = [0,1]
y = 6

[State 1005, 2]
type = HitDef
triggerall = IfElse(Var(31) = 0, var(15) < 2, var(15) < 4)
trigger1 = AnimElem = 15
attr = S, SA			
damage = 25,5
animtype = Medium			
guardflag = MA			
hitflag = MAF
priority = 5, Hit			
pausetime = 11,11
guard.pausetime = 11,14
sparkno = S10001
guard.sparkno = S10131				
sparkxy = -10, -75		
hitsound = S5, 2			
guardsound = S6, 0			
ground.type = High	
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 24
ground.velocity = -4.5, -7.5
air.velocity = -4.5, -7.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
fall = 1
fall.recover = 0

[State 1005, VelSet]
type = VelSet
trigger1 = AnimElem = 15
x = 1
ignorehitpause = 1

[State 1005, VelSet]
type = VelMul
trigger1 = AnimElemTime(15) >= 0
x = 0.9
ignorehitpause = 1

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

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

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

;---------------------------------------------------------------------------
; C Sousou Shin 
[StateDef 1006]
type = S
movetype = A
physics = N
anim = 1006
ctrl = 0
velset = 0,0
facep2 = 1
poweradd = IfElse(var(31) = 0, 140, 0)	
sprpriority = 2

[State 1006, 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 1006, HD Meter Decrease]
type = VarAdd
triggerall =  PrevStateNo = [1000,2099]
trigger1 = !Time
var(30) = IfElse(var(31) = 0, -500, -90)
ignorehitpause = 1
persistent = 0

[State 1006, StateTypeSet]
type = StateTypeSet
trigger1 = Pos Y != 0
statetype = A
ignorehitpause = 1

[State 1006, StateTypeSet]
type = StateTypeSet
trigger1 = Pos Y = 0
statetype = S
ignorehitpause = 1

[State 1006, VelSet]
type = VelSet
trigger1 = AnimElem = 5
x = 7
ignorehitpause = 1

[State 1006, PosAdd]
type = PosAdd
trigger1 = AnimElemTime(5) = [0,4]
y = -7

[State 1006, PosAdd]
type = PosAdd
trigger1 = AnimElemTime(6)>=0 && AnimElemTime(7) < 2
y = 7

[State 1006, 1]
type = HitDef
triggerall = IfElse(Var(31) = 0, var(15) < 2, var(15) < 4)
trigger1 = AnimElem = 6 
trigger2 = AnimElem = 7
trigger3 = AnimElem = 8
trigger4 = AnimElem = 9
attr = S, SA			
damage = floor(20*fvar(20)), 10
animtype = Medium			
guardflag = MA			
hitflag = MAF
priority = 5, Hit			
pausetime = 5,5	
sparkno = S10001
guard.sparkno = S10131				
sparkxy = -10, -75		
hitsound = S5, 1			
guardsound = S6, 0			
ground.type = High	
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 20
ground.velocity = -2.58765
air.velocity = -2.5,-4.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

[State 1006, VelSet]
type = VelSet
trigger1 = AnimElem = 9
x = 3
ignorehitpause = 1

[State 1006, VelSet]
type = VelSet
trigger1 = AnimElem = 11
x = 4
ignorehitpause = 1

[State 1006, PosAdd]
type = PosAdd
trigger1 = AnimElemTime(11) = [0,4]
y = -6

[State 1006, PosAdd]
type = PosAdd
triggerall = Pos Y < 0
trigger1 = AnimElemTime(12) = [0,4]
trigger2 = AnimElemTime(13) = [0,1]
y = 6

[State 1006, 2]
type = HitDef
triggerall = IfElse(Var(31) = 0, var(15) < 2, var(15) < 4)
trigger1 = AnimElem = 15
attr = S, SA			
damage = 20,10
animtype = Medium			
guardflag = MA			
hitflag = MAF
priority = 5, Hit			
pausetime = 11,11		
sparkno = S10001
guard.sparkno = S10131				
sparkxy = -10, -75		
hitsound = S5, 2		
guardsound = S6, 0			
ground.type = High	
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 16
ground.velocity = -4.5, -7.5
air.velocity = -4.5, -7.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.recover = 0

[State 1006, VelSet]
type = VelSet
trigger1 = AnimElem = 15
x = 1
ignorehitpause = 1

[State 1006, VelSet]
type = VelMul
trigger1 = AnimElemTime(15) >= 0
x = 0.9
ignorehitpause = 1

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

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

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

;---------------------------------------------------------------------------
; B Kobi Kyaku 
[StateDef 1010]
type = S
movetype = A
physics = N
anim = 1010
ctrl = 0
velset = 0,0
facep2 = 1
poweradd = IfElse(var(31) = 0, 100, 0)	
sprpriority = 2

[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, HD Meter Decrease]
type = VarAdd
triggerall =  PrevStateNo = [1000,2099]
trigger1 = !Time
var(30) = IfElse(var(31) = 0, -500, -90)
ignorehitpause = 1
persistent = 0

[State 1010, HD Meter Increase]
type = VarAdd
trigger1 = var(31) = 0 && var(30) < 1000 && (PrevStateNo !=[1000,2999])
var(30) = IfElse(MoveHit = 1, 25, 15)
ignorehitpause = 0
persistent = 0

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

[State 1010, VarSet]
type = VarSet
triggerall = AnimElemTime(1) > 1 && AnimElemTime(6) < 0
trigger1 = command = "brake"
trigger2 = AILevel != 0 && MoveContact
;trigger2 = (random<250*(AILevel**2/32.0))
var(1) = 1
persistent = 0

[State 1010, Projectile Killer]
type = Helper
trigger1 = AnimElem = 4
name = "Kobi Kyaku Shield"
ID = 11010
stateno = 11010
pos = 0,0
postype = p1  
facing = 1
keyctrl = 0
ownpal = 1
ignorehitpause = 1

[State 1010, 1]
type = HitDef
triggerall = IfElse(Var(31) = 0, var(15) < 3, var(15) < 4)
trigger1 = AnimElem = 4
trigger2 = AnimElem = 5
attr = S, SA			
damage = floor(80*fvar(20)),10
animtype = Medium			
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 = -2.5,-10.8
guard.velocity = -11.18765
air.velocity = -2.5,-10.8
air.hittime = 20
air.animtype = Back		
yaccel = 0.6
ground.cornerpush.veloff = 0
getpower = IfElse(!var(31), 100, 0), IfElse(!var(31), 100, 0)
givepower = 100
fall = 1
fall.recover = 0
persistent = 0

[State 1010, ChangeAnim]
type = ChangeAnim
trigger1 = Anim = StateNo && var(1) = 1
trigger1 = AnimElemTime(5) >= 2
value = 1012
elem = 1
persistent = 0

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

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

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

;---------------------------------------------------------------------------
; D Kobi Kyaku 
[StateDef 1011]
type = S
movetype = A
physics = N
anim = 1011
ctrl = 0
velset = 0,0
facep2 = 1
poweradd = IfElse(var(31) = 0, 120, 0)	
sprpriority = 2

[State 1011, 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 1011, Projectile Killer]
type = Helper
trigger1 = AnimElem = 4
name = "Kobi Kyaku Shield"
ID = 11011
stateno = 11010
pos = 0,0
postype = p1  
facing = 1
keyctrl = 0
ownpal = 1
ignorehitpause = 1

[State 1011, HD Meter Decrease]
type = VarAdd
triggerall =  PrevStateNo = [1000,2099]
trigger1 = !Time
var(30) = IfElse(var(31) = 0, -500, -90)
ignorehitpause = 1
persistent = 0

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

[State 1011, VarSet]
type = VarSet
triggerall = AnimElemTime(1) > 1 && AnimElemTime(6) < 0
trigger1 = command = "brake"
trigger2 = AILevel != 0 && MoveContact
;trigger2 = (random<250*(AILevel**2/32.0))
var(1) = 1
persistent = 0

[State 1011, 1]
type = HitDef
triggerall = IfElse(Var(31) = 0, var(15) < 3, var(15) < 4)
trigger1 = AnimElem = 4
trigger2 = AnimElem = 5
attr = S, SA			
damage = floor(90*fvar(20)),10
animtype = Medium			
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 = -2.5,-10.8
air.velocity = -2.5,-10.8
air.hittime = 20
air.animtype = Back		
yaccel = 0.6
ground.cornerpush.veloff = 0
getpower = IfElse(!var(31), 125, 0), IfElse(!var(31), 125, 0)
givepower = 125
fall = 1
fall.recover = 0
persistent = 0

[State 1011, ChangeAnim]
type = ChangeAnim
trigger1 = Anim = StateNo && var(1) = 1
trigger1 = AnimElemTime(5) >= 4
value = 1012
elem = 1
persistent = 0

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

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

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

;---------------------------------------------------------------------------
; B Tenshin Shou
[StateDef 1015]
type = S
movetype = A
physics = N
anim = 1015
ctrl = 0
velset = 0,0
facep2 = 1
poweradd = IfElse(var(31) = 0, 100, 0)	
sprpriority = 2

[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 1015, HD Meter Decrease]
type = VarAdd
triggerall =  PrevStateNo = [1000,2099]
trigger1 = !Time
var(30) = IfElse(var(31) = 0, -500, -90)
ignorehitpause = 1
persistent = 0

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

[State 1015, 1]
type = HitDef
triggerall = IfElse(Var(31) = 0, var(15) < 3, var(15) < 4)
trigger1 = AnimElem = 2
attr = S, SA			
damage = floor(25*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 = 0;-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 = 100
air.fall = 1
fall.recovertime = 60
persistent = 0

[State 1015, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 3
statetype = A 
ignorehitpause = 1

[State 1015, VelSet]
type = VelSet
trigger1 = AnimElem = 3
x = 2
y = -3
ignorehitpause = 1

[State 1015, 2]
type = HitDef
triggerall = IfElse(Var(31) = 0, var(15) < 3, var(15) < 4)
trigger1 = AnimElem = 3
trigger2 = AnimElem = 4
trigger3 = AnimElem = 5
trigger4 = AnimElem = 6
trigger5 = AnimElem = 7
trigger6 = AnimElem = 8
attr = S, SA			
damage = floor(50*fvar(20)),10
animtype = Medium			
guardflag = MA			
hitflag = MAF
priority = 5, Hit			
pausetime = 2,2	
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), 50, 0), IfElse(!var(31), 50, 0)
givepower = 50
fall = 1
fall.recover = 0
persistent = 0

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

[State 1015, VelSet]
type = VelAdd
trigger1 = AnimElemTime(9)>=0
y = 0.5

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

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

;---------------------------------------------------------------------------
; D Tenshin Shou
[StateDef 1016]
type = S
movetype = A
physics = N
anim = 1016
ctrl = 0
velset = 0,0
facep2 = 1
poweradd = IfElse(var(31) = 0, 150, 0)	
sprpriority = 2

[State 1016, 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 1016, HD Meter Decrease]
type = VarAdd
triggerall =  PrevStateNo = [1000,2099]
trigger1 = !Time
var(30) = IfElse(var(31) = 0, -500, -90)
ignorehitpause = 1
persistent = 0

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

[State 1016, 1]
type = HitDef
triggerall = IfElse(Var(31) = 0, var(15) < 3, var(15) < 4)
trigger1 = AnimElem = 2
attr = S, SA			
damage = floor(10*fvar(20)),10
animtype = Medium			
guardflag = MA			
hitflag = MAF
priority = 5, Hit			
pausetime = 11,11	
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 = 0;-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
air.fall = 1
fall.recovertime = 60
persistent = 0

[State 1016, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 3
statetype = A 
ignorehitpause = 1

[State 1016, VelSet]
type = VelSet
trigger1 = AnimElem = 3
x = 4
y = -3
ignorehitpause = 1

[State 1016, 2]
type = HitDef
triggerall = IfElse(Var(31) = 0, var(15) < 3, var(15) < 4)
trigger1 = AnimElem = 3
trigger2 = AnimElem = 4
trigger3 = AnimElem = 5
trigger4 = AnimElem = 6
trigger5 = AnimElem = 7
attr = S, SA			
damage = floor(10*fvar(20)),10
animtype = Medium			
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 = 20
ground.hittime = 20
guard.hittime = 18
ground.velocity = -2.5,-4.5
air.velocity = -2.5,-4.5
air.hittime = 20
air.animtype = Back		
yaccel = 0.5
ground.cornerpush.veloff = 0
getpower = IfElse(!var(31), 100, 0), IfElse(!var(31), 100, 0)
givepower = 100
fall = 1
fall.recover = 0

[State 1013, 3]
type = HitDef
triggerall = IfElse(Var(31) = 0, var(15) < 3, var(15) < 4)
trigger1 = AnimElem = 8
attr = S, SA			
damage = 40,10
animtype = Medium			
guardflag = MA			
hitflag = MAF
priority = 5, Hit			
pausetime = 2,2	
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 1016, VelSet]
type = VelSet
trigger1 = AnimElem = 15
x = 0
y = 0

[State 1016, VelSet]
type = VelAdd
trigger1 = AnimElemTime(15)>=0
y = 0.5

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

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

;---------------------------------------------------------------------------
; Tenshin Shou Landing
[StateDef 1017]
type = S
movetype = I
physics = N
ctrl = 0
velset = 0,0
poweradd = 0
sprpriority = 2
movehitpersist = 1

[State 1017, ChangeAnim]
type = ChangeAnim
triggerall = !Time
trigger1 = PrevStateNo = [1015,1016]
trigger2 = PrevStateno = 2015
value = 1017

[State 1017, ChangeAnim]
type = ChangeAnim
triggerall = !Time
trigger1 = PrevStateNo = 1021
trigger2 = PrevStateno = 2021
value = 1022

[State 1017, ChangeAnim]
type = ChangeAnim
triggerall = !Time
trigger1 = PrevStateNo = [1025,1030]
trigger2 = PrevStateno = 2025
trigger3 = PrevStateNo >= 3000
value = IfElse(MoveHit, 1028, 1027)

[State 1017, ChangeAnim]
type = ChangeAnim
triggerall = !Time
trigger1 = PrevStateNo = 3000
value = 3002

[State 1017, ChangeAnim]
type = ChangeAnim
triggerall = !Time
trigger1 = PrevStateNo = [3001,3010]
value = 3012

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

[State 1017, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; B Shinjou Tai
[Statedef 1020]
type    = S
movetype = A
physics = N
velset = 0,0
ctrl = 0
anim = 1020
poweradd = IfElse(var(31) = 0, 100, 0)	

[State 1020, 1]
type = HitDef
triggerall = var(0) = 0
Trigger1 = AnimElem = 2
attr = S, NT
hitflag = M-
priority = 5, Miss
sparkno = S10800
sparkxy = -10, -75
hitsound = S1020,0
p1facing = 1
p2facing = 1
p1stateno = 1021
id = 1020

[State 1020, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Shinjou Tai Hit
[Statedef 1021]
type = S
movetype = A
physics = N
velset = 0,0
ctrl = 0
anim = 1021
movehitpersist = 0
hitcountpersist = 1

[State 1021, ScreenBound]
type = ScreenBound
trigger1 = AnimElemTime(6) < 0
value = 1
movecamera = 1,0

[State 1021, TargetBind]
type = TargetBind
triggerall = NumTarget(PrevStateNo) = 1
trigger1 = !Time
time = 1
id = PrevStateNo
pos = 50,0

[State 1021, PosAdd]
type = PosAdd
trigger1 = AnimElem = 8
x = 30
y = -25

[State 1021, TargetState]
type = TargetState
triggerall = NumTarget(PrevStateNo) = 1
trigger1 = !Time
value = 51021
ID = PrevStateNo

[State 1021, 1]
type = HitDef
triggerall = IfElse(Var(31) = 0, var(15) < 3, var(15) < 4)
trigger1 = AnimElem = 2
trigger2 = AnimElem = 5
attr = A, ST			
damage = 20,5
animtype = Heavy			
guardflag = MA			
hitflag = MAF
priority = 5, Hit			
pausetime = 0,0	
sparkno = S10001
guard.sparkno = S10131				
sparkxy = -10, -25		
hitsound = S5, 4			
guardsound = S6, 0			
ground.type = Low
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 18
ground.velocity = 0
air.hittime = 20
air.animtype = Back		
yaccel = 0.5
ground.cornerpush.veloff = 0
getpower = 0
kill = 0
givepower = 25
p2stateno = 51022

[State 1021, 2]
type = HitDef
triggerall = IfElse(Var(31) = 0, var(15) < 3, var(15) < 4)
trigger1 = AnimElem = 9
attr = A, ST			
damage = IfElse(PrevStateNo = 1020, 60, IfElse(PrevStateNo = 1022, 70, 90)),10
animtype = Heavy			
guardflag = MA			
hitflag = MAF
priority = 5, Hit			
pausetime = 11,11	
sparkno = S10001
guard.sparkno = S10131				
sparkxy = -10, -25		
hitsound = S5, 5			
guardsound = S6, 0			
ground.type = High	
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 18
ground.velocity = -11
air.velocity = -4.5, -7.5
air.hittime = 20
air.animtype = Back		
yaccel = 0.5
ground.cornerpush.veloff = 0
getpower = 0
givepower = 50
persistent = 0

[State 1021, VelSet]
type = VelSet
trigger1 = AnimElem = 9 = 0
x = -0.5
y = -8
persistent = 0

[State 1021, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(9) >=0
y = 0.4
persistent = 1

[State 1021, VarSet]
type = VarSet
trigger1 = AnimElem = 9
var(15) = 2

[State 1021, VarSet]
type = VarSet
trigger1 = AnimElem = 9
var(17) = 2

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

[State 1021, VarSet]
type = VarSet
trigger1 = AnimElem = 14
var(17) = 0

[State 1021, end]
type = ChangeState
trigger1 = Vel Y > 0 && Vel Y > -Pos Y
value = 1017
ctrl = 0
;---------------------------------------------------------------------------
; D Shinjou Tai
[Statedef 1022]
type    = S
movetype = A
physics = N
velset = 0,0
ctrl = 0
anim = 1020
poweradd = IfElse(var(31) = 0, 120, 0)	

[State 1022, 1]
type = HitDef
triggerall = var(0) = 0
Trigger1 = AnimElem = 2
attr = S, NT
hitflag = M-
priority = 5, Miss
sparkno = S10800
sparkxy = -10, -75
hitsound = S1020,0
p1facing = 1
p2facing = 1
p1stateno = 1021
id = 1022

[State 1022, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; B Rengeki Shou
[StateDef 1025]
type = A
movetype = A
physics = N
anim = 1025
ctrl = 0
velset = 0,0
poweradd = IfElse(var(31) = 0, 100, 0)	
sprpriority = 2

[State 1025, 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 1025, HD Meter Decrease]
type = VarAdd
triggerall =  PrevStateNo = [1000,2099]
trigger1 = !Time
var(30) = IfElse(var(31) = 0, -500, -90)
ignorehitpause = 1
persistent = 0

[State 1025, VelSet]
type = VelSet
triggerall = Anim = 1025
trigger1 = AnimElem = 9
x = 3
y = 5

[State 1025, 1]
type = HitDef
triggerall = IfElse(Var(31) = 0, var(15) < 3, var(15) < 4)
triggerall = Anim = 1025
trigger1 = AnimElem = 9
attr = A, SA			
damage = floor(25*fvar(20)),10
animtype = Medium			
guardflag = MA			
hitflag = MAF
priority = 5, Hit			
pausetime = 7,7	
sparkno = S10001
guard.sparkno = S10131				
sparkxy = -10, -45		
hitsound = S5, 4			
guardsound = S6, 0			
ground.type = High	
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 18
ground.velocity = 0,0
air.velocity = 0,0
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
persistent = 0
kill = 0

[State 1025, ChangeAnim]
type = ChangeAnim
triggerall = Anim = 1025
trigger1 = MoveContact
trigger1 = HitShakeOver = 1
value = 1026
elem = 1
persistent = 0

[State 1025, VelSet]
type = VelSet
triggerall = Anim = 1026
trigger1 = AnimElem = 1
x = 0
y = 0

[State 1025, 2]
type = HitDef
triggerall = IfElse(Var(31) = 0, var(15) < 3, var(15) < 4)
triggerall = Anim = 1026
trigger1 = AnimElem = 2
attr = A, SA			
damage = floor(50*fvar(20)),10
animtype = Medium			
guardflag = MA			
hitflag = MAF
priority = 5, Hit			
pausetime = 7,7	
sparkno = S10001
guard.sparkno = S10131				
sparkxy = -10, -45		
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.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
persistent = 0
fall = 1
fall.recover = 0

[State 1025, VelSet]
type = VelSet
triggerall = Anim = 1026
trigger1 = AnimElem = 5
x = -2
y = -7

[State 1025, VelAdd]
type = VelAdd
triggerall = Anim = 1026
trigger1 = AnimElemTime(5) >= 0
y = 0.4

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

[State 1025, end]
type = ChangeState
trigger1 = Vel Y > 0 && Vel Y > -Pos Y
value = 1017
ctrl = 0
;---------------------------------------------------------------------------
; D Rengeki Shou
[StateDef 1026]
type = A
movetype = A
physics = N
anim = 1025
ctrl = 0
velset = 0,0
poweradd = IfElse(var(31) = 0, 120, 0)	
sprpriority = 2

[State 1025, 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 1025, HD Meter Decrease]
type = VarAdd
triggerall =  PrevStateNo = [1000,2099]
trigger1 = !Time
var(30) = IfElse(var(31) = 0, -500, -90)
ignorehitpause = 1
persistent = 0

[State 1026, VelSet]
type = VelSet
triggerall = Anim = 1025
trigger1 = AnimElem = 9
x = 7
y = 5

[State 1026, 1]
type = HitDef
triggerall = IfElse(Var(31) = 0, var(15) < 3, var(15) < 4)
triggerall = Anim = 1025
trigger1 = AnimElem = 9
attr = A, SA			
damage = floor(25*fvar(20)),10
animtype = Medium			
guardflag = MA			
hitflag = MAF
priority = 5, Hit			
pausetime = 7,7	
sparkno = S10001
guard.sparkno = S10131				
sparkxy = -10, -45		
hitsound = S5, 4			
guardsound = S6, 0			
ground.type = High	
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 18
ground.velocity = 0,0
air.velocity = 0,0
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
persistent = 0
kill = 0

[State 1026, ChangeAnim]
type = ChangeAnim
triggerall = Anim = 1025
trigger1 = MoveContact
trigger1 = HitShakeOver = 1
value = 1026
elem = 1
persistent = 0

[State 1026, VelSet]
type = VelSet
triggerall = Anim = 1026
trigger1 = AnimElem = 1
x = 0
y = 0

[State 1026, 2]
type = HitDef
triggerall = IfElse(Var(31) = 0, var(15) < 3, var(15) < 4)
triggerall = Anim = 1026
trigger1 = AnimElem = 2
attr = A, SA			
damage = floor(70*fvar(20)),10
animtype = Medium			
guardflag = MA			
hitflag = MAF
priority = 5, Hit			
pausetime = 7,7	
sparkno = S10001
guard.sparkno = S10131				
sparkxy = -10, -45		
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.hittime = 20
air.animtype = Back		
yaccel = 0.5
ground.cornerpush.veloff = 0
getpower = IfElse(!var(31), 75, 0), IfElse(!var(31), 75, 0)
givepower = 75
persistent = 0
fall = 1
fall.recover = 0

[State 1026, VelSet]
type = VelSet
triggerall = Anim = 1026
trigger1 = AnimElem = 5
x = -2
y = -7

[State 1026, VelAdd]
type = VelAdd
triggerall = Anim = 1026
trigger1 = AnimElemTime(5) >= 0
y = 0.4

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

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

