;---------------------------------------------------------------------------
; Queen Straight
[Statedef 1000]
type = S
movetype = A
physics = S				
velset = 12,0		
ctrl = 0								
poweradd = 50			
sprpriority = 2			
facep2 = 1
anim = 1000

[State 1000, NotHitBy]
type = NotHitBy
triggerall = PrevStateNo != [1005,1008]
trigger1 = AnimElemTime(4) < 0
value = SA, AA, AP

[State 1000, Width]
type = Width
trigger1 = Anim = 1000 && AnimElemTime(5)>=0 && AnimElemTime(7) < 0
value = 25,0
ignorehitpause = 1

[State 1000, 1]
type = HitDef
triggerall = Var(15) < 3
trigger1 = AnimElemTime(6) < 0
attr = S, SA			
damage = floor(IfElse(PrevStateNo = 1005, 80, 70)*fvar(20)),10
animtype = Heavy			
guardflag = MA			
hitflag = MAF
priority = 5, Hit			
pausetime = 10,10			
sparkno = 10001
guard.sparkno = 10130				
sparkxy = -20, -55		
hitsound = F5, 2			
guardsound = F6, 0			
ground.type = Low	
air.animtype = Back
ground.slidetime = 20		
ground.hittime = 20
guard.hittime = Cond((PrevStateNo != [1005,1008]), 14, 10)
guard.slidetime = 14
ground.velocity = -10				
air.velocity = -4.5, -6.5		
air.hittime = 18			
yaccel = 0.5
ground.cornerpush.veloff = 0
air.fall = 1
fall.recover = 0
getpower = 50
givepower = 50
id = Anim
persistent = 0

[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = IfElse(Anim = 1000, AnimElemTime(7) = 0, AnimElemTime(10) = 0)
movetype = I

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

[State 1000, VarSet]
type = VarSet
trigger1 = Anim = [1000,1001]
var(3) = 0
persistent = 0

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

;---------------------------------------------------------------------------
; Queen Upper
[Statedef 1001]
type = S
movetype = A
physics = S				
velset = 12,0		
ctrl = 0								
poweradd = 50			
sprpriority = 2			
facep2 = 1
anim = 1001

[State 1000, NotHitBy]
type = NotHitBy
triggerall = PrevStateNo != [1005,1008]
trigger1 = AnimElemTime(4) < 0
value = SA, AA, AP

[State 1000, Width]
type = Width
trigger1 = Anim = 1000 && AnimElemTime(5)>=0 && AnimElemTime(7) < 0
value = 25,0
ignorehitpause = 1

[State 1000, 2]
type = HitDef
triggerall = Var(15) < 3
trigger1 = AnimElemTime(8) < 0
attr = S, SA			
damage = floor(IfElse(PrevStateNo = 1005, 80, 70)*fvar(20)),10
animtype = Heavy			
guardflag = MA			
hitflag = MAF
priority = 5, Hit			
pausetime = 10,10			
sparkno = 10001
guard.sparkno = 10130				
sparkxy = -20, -45		
hitsound = F5, 2			
guardsound = F6, 0			
ground.type = Low	
air.animtype = Back
ground.slidetime = 18		
ground.hittime = 18
guard.hittime = Cond((PrevStateNo != [1005,1008]), 14, 10)
guard.slidetime = 14	
ground.velocity = -2.5, -10	
guard.velocity = -10			
air.velocity = -2.5, -10	
air.hittime = 18			
yaccel = 0.5
ground.cornerpush.veloff = 0
fall = 1
fall.recovertime = 0
getpower = 50
givepower = 50
id = Anim
persistent = 0

[State 1000, StateTypeSet]
type = StateTypeSet
trigger1 = IfElse(Anim = 1000, AnimElemTime(7) = 0, AnimElemTime(10) = 0)
movetype = I

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

[State 1000, VarSet]
type = VarSet
trigger1 = Anim = [1000,1001]
var(3) = 0
persistent = 0

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

;---------------------------------------------------------------------------
; C Jack Juke (Fwd)
[Statedef 1005]
type = S
movetype = I
physics = N	
velset = 0,0						
ctrl = 0								
poweradd = 50			
sprpriority = 2			
facep2 = 1
anim = 1005

[State 1005, VarSet]
type = VarSet
trigger1 = Vel X = 0
var(10) = 2
persistent = 1

[State 1005, NotHitBy]
type = Null
trigger1 = AnimElemTime(2) < 0
value = SA, AA, AP

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

[State 1005, VelSet]
type = VelSet
trigger1 = Time = 0
x = 10

[State 1005, VelMul]
type = VelMul
trigger1 = 1
x = 0.85

[State 1005, VarSet]
type = VarSet
triggerall = AnimElemTime(6) < 0
triggerall = AILevel = 0
trigger1 = command = "throw"
var(3) = 5
persistent = 0

[State 1005, VarSet]
type = VarSet
triggerall = AnimElemTime(6) < 0
triggerall = AILevel = 0
triggerall = command != "throw"
triggerall = command = "holddown"
trigger1 = command = "x"
trigger2 = command = "y" 
var(3) = 4
persistent = 0

[State 1005, VarSet]
type = VarSet
triggerall = AnimElemTime(6) < 0
triggerall = AILevel = 0
triggerall = command != "throw"
triggerall = command = "holdfwd"
trigger1 = command = "x"
trigger2 = command = "y" 
var(3) = 3
persistent = 0

[State 1005, VarSet]
type = VarSet
triggerall = AnimElemTime(6) < 0
triggerall = AILevel = 0
triggerall = command != "throw"
triggerall = command != "holdfwd"
triggerall = command != "holddown"
trigger1 = command = "x"
trigger2 = command = "y" 
var(3) = IfElse(command = "x", 1, 2)
persistent = 0

;== AI stuff for this state ==

[State 1005, AI Ace Clinch]
type = VarSet
triggerall = AnimElemTime(6) < 0
triggerall = random < 100*(AILevel**2/64.0)
triggerall = AILevel != 0 && RoundState = 2
triggerall = abs(P2BodyDist X) <= 50
triggerall = EnemyNear, StateType != A
triggerall = EnemyNear, MoveType != A
trigger1 = Var(0) = 0
var(3) = 5
persistent = 0

[State 1005, AI King Sweep]
type = VarSet
triggerall = AnimElemTime(6) < 0
triggerall = AILevel != 0 && RoundState = 2
triggerall = abs(P2BodyDist X) <= 40
triggerall = var(15) < 3 && Enemy, StateType != L
trigger1 = P2StateType != A
var(3) = 4
persistent = 0

[State 1005, AI King Dart]
type = VarSet
triggerall = AnimElemTime(6) < 0
triggerall = AILevel != 0 && RoundState = 2
triggerall = abs(P2BodyDist X) <= 70
triggerall = P2StateType != A
triggerall = var(15) < 3 && Enemy, StateType != L
triggerall = EnemyNear, MoveType != A
trigger1 = P2StateType = C 
var(3) = 3
persistent = 0

[State 1005, AI Queen Straight]
type = VarSet
triggerall = AnimElemTime(6) < 0
triggerall = AILevel != 0 && RoundState = 2
triggerall = abs(P2BodyDist X) <= 100
triggerall = P2StateType != A
triggerall = StateType != A
triggerall = P2StateType != C
triggerall = P2MoveType != A
trigger1 = var(15) < 3
var(3) = 1
persistent = 0

[State 1005, AI Queen Upper]
type = VarSet
triggerall = AnimElemTime(6) < 0
triggerall = AILevel != 0 && RoundState = 2
triggerall = abs(P2BodyDist X) <= 100
triggerall = IfElse(P2StateType != A, abs(P2BodyDist Y) <= 80, abs(P2BodyDist Y) = [20,80]) 
triggerall = StateType != A
triggerall = P2MoveType != A
trigger1 = var(15) < 3
var(3) = 2
persistent = 0

;==

[State 1005, Change to Followup]
type = ChangeState
triggerall = var(3) > 0
trigger1 = AnimElemTime(4) = 1
value = IfElse(var(3) < 3, IfElse(var(3) = 1, 1000, 1001), IfElse(var(3) = 3, 1009, IfElse(var(3) = 4, 1010, 1015)))
ctrl = 0

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

;---------------------------------------------------------------------------
; D Jack Juke (Fwd)
[Statedef 1006]
type = S
movetype = I
physics = N	
velset = 0,0						
ctrl = 0								
poweradd = 50			
sprpriority = 2			
facep2 = 1
anim = 1005

[State 1006, VarSet]
type = VarSet
trigger1 = Vel X = 0
var(10) = 2
persistent = 1

[State 1006, NotHitBy]
type = Null
trigger1 = AnimElemTime(2) < 0
value = SA, AA, AP

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

[State 1006, VelSet]
type = VelSet
trigger1 = Time = 0
x = 11

[State 1006, VelMul]
type = VelMul
trigger1 = 1
x = 0.85

[State 1006, VarSet]
type = VarSet
triggerall = AnimElemTime(6) < 0
triggerall = AILevel = 0
trigger1 = command = "throw"
var(3) = 5
persistent = 0

[State 1006, VarSet]
type = VarSet
triggerall = AnimElemTime(6) < 0
triggerall = AILevel = 0
triggerall = command != "throw"
triggerall = command = "holddown"
trigger1 = command = "x"
trigger2 = command = "y" 
var(3) = 4
persistent = 0

[State 1006, VarSet]
type = VarSet
triggerall = AnimElemTime(6) < 0
triggerall = AILevel = 0
triggerall = command != "throw"
triggerall = command = "holdfwd"
trigger1 = command = "x"
trigger2 = command = "y" 
var(3) = 3
persistent = 0

[State 1006, VarSet]
type = VarSet
triggerall = AnimElemTime(6) < 0
triggerall = AILevel = 0
triggerall = command != "throw"
triggerall = command != "holdfwd"
triggerall = command != "holddown"
trigger1 = command = "x"
trigger2 = command = "y" 
var(3) = IfElse(command = "x", 1, 2)
persistent = 0

;== AI stuff for this state ==

[State 1006, AI Ace Clinch]
type = VarSet
triggerall = AnimElemTime(6) < 0
triggerall = random < 100*(AILevel**2/64.0)
triggerall = AILevel != 0 && RoundState = 2
triggerall = abs(P2BodyDist X) <= 50
triggerall = EnemyNear, StateType != A
triggerall = EnemyNear, MoveType != A
trigger1 = Var(0) = 0
var(3) = 5
persistent = 0

[State 1006, AI King Sweep]
type = VarSet
triggerall = AnimElemTime(6) < 0
triggerall = AILevel != 0 && RoundState = 2
triggerall = abs(P2BodyDist X) <= 40
triggerall = var(15) < 3 && Enemy, StateType != L
trigger1 = P2StateType != A
var(3) = 4
persistent = 0

[State 1006, AI King Dart]
type = VarSet
triggerall = AnimElemTime(6) < 0
triggerall = AILevel != 0 && RoundState = 2
triggerall = abs(P2BodyDist X) <= 70
triggerall = P2StateType != A
triggerall = var(15) < 3 && Enemy, StateType != L
triggerall = EnemyNear, MoveType != A
trigger1 = P2StateType = C 
var(3) = 3
persistent = 0

[State 1006, AI Queen Straight]
type = VarSet
triggerall = AnimElemTime(6) < 0
triggerall = AILevel != 0 && RoundState = 2
triggerall = abs(P2BodyDist X) <= 100
triggerall = P2StateType != A
triggerall = StateType != A
triggerall = P2StateType != C
triggerall = P2MoveType != A
trigger1 = var(15) < 3
var(3) = 1
persistent = 0

[State 1006, AI Queen Upper]
type = VarSet
triggerall = AnimElemTime(6) < 0
triggerall = AILevel != 0 && RoundState = 2
triggerall = abs(P2BodyDist X) <= 100
triggerall = IfElse(P2StateType != A, abs(P2BodyDist Y) <= 80, abs(P2BodyDist Y) = [20,80]) 
triggerall = StateType != A
triggerall = P2MoveType != A
trigger1 = var(15) < 3
var(3) = 2
persistent = 0

;==

[State 1006, Change to Followup]
type = ChangeState
triggerall = var(3) > 0
trigger1 = AnimElemTime(4) = 1
value = IfElse(var(3) < 3, IfElse(var(3) = 1, 1000, 1001), IfElse(var(3) = 3, 1009, IfElse(var(3) = 4, 1010, 1015)))
ctrl = 0

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

;---------------------------------------------------------------------------
; C Jack Juke (Back)
[Statedef 1007]
type = S
movetype = I
physics = N	
velset = 0,0						
ctrl = 0								
poweradd = 50			
sprpriority = 2			
facep2 = 1
anim = 1007

[State 1007, VarSet]
type = VarSet
trigger1 = Vel X = 0
var(10) = 2
persistent = 1

[State 1007, NotHitBy]
type = Null
trigger1 = AnimElemTime(6) < 0
value = SA, AA, AP

[State 1007, VarSet]
type = VarSet
trigger1 = !Time
var(3) = 0
persistent = 0

[State 1007, VelSet]
type = VelSet
trigger1 = Time = 0
x = -6/Cond(PrevStateNo < 200, 1, 2)

[State 1007, VelMul]
type = VelMul
trigger1 = 1
x = 0.9

[State 1007, VarSet]
type = VarSet
triggerall = AnimElemTime(6) < 0
triggerall = AILevel = 0
trigger1 = command = "throw"
var(3) = 5
persistent = 0

[State 1007, VarSet]
type = VarSet
triggerall = AnimElemTime(6) < 0
triggerall = AILevel = 0
triggerall = command != "throw"
triggerall = command = "holddown"
trigger1 = command = "x"
trigger2 = command = "y" 
var(3) = 4
persistent = 0

[State 1007, VarSet]
type = VarSet
triggerall = AnimElemTime(6) < 0
triggerall = AILevel = 0
triggerall = command != "throw"
triggerall = command = "holdfwd"
trigger1 = command = "x"
trigger2 = command = "y" 
var(3) = 3
persistent = 0

[State 1007, VarSet]
type = VarSet
triggerall = AnimElemTime(6) < 0
triggerall = AILevel = 0
triggerall = command != "throw"
triggerall = command != "holdfwd"
triggerall = command != "holddown"
trigger1 = command = "x"
trigger2 = command = "y" 
var(3) = IfElse(command = "x", 1, 2)
persistent = 0

;== AI stuff for this state ==

[State 1007, AI Ace Clinch]
type = VarSet
triggerall = AnimElemTime(6) < 0
triggerall = random < 100*(AILevel**2/64.0)
triggerall = AILevel != 0 && RoundState = 2
triggerall = abs(P2BodyDist X) <= 50
triggerall = EnemyNear, StateType != A
triggerall = EnemyNear, MoveType != A
trigger1 = Var(0) = 0
var(3) = 5
persistent = 0

[State 1007, AI King Sweep]
type = VarSet
triggerall = AnimElemTime(6) < 0
triggerall = AILevel != 0 && RoundState = 2
triggerall = abs(P2BodyDist X) <= 40
triggerall = var(15) < 3 && Enemy, StateType != L
trigger1 = P2StateType != A
var(3) = 4
persistent = 0

[State 1007, AI King Dart]
type = VarSet
triggerall = AnimElemTime(6) < 0
triggerall = AILevel != 0 && RoundState = 2
triggerall = abs(P2BodyDist X) <= 70
triggerall = P2StateType != A
triggerall = var(15) < 3 && Enemy, StateType != L
triggerall = EnemyNear, MoveType != A
trigger1 = P2StateType = C 
var(3) = 3
persistent = 0

[State 1007, AI Queen Straight]
type = VarSet
triggerall = AnimElemTime(6) < 0
triggerall = AILevel != 0 && RoundState = 2
triggerall = abs(P2BodyDist X) <= 100
triggerall = P2StateType != A
triggerall = StateType != A
triggerall = P2StateType != C
triggerall = P2MoveType != A
trigger1 = var(15) < 3
var(3) = 1
persistent = 0

[State 1007, AI Queen Upper]
type = VarSet
triggerall = AnimElemTime(6) < 0
triggerall = AILevel != 0 && RoundState = 2
triggerall = abs(P2BodyDist X) <= 100
triggerall = IfElse(P2StateType != A, abs(P2BodyDist Y) <= 80, abs(P2BodyDist Y) = [20,80]) 
triggerall = StateType != A
triggerall = P2MoveType != A
trigger1 = var(15) < 3
var(3) = 2
persistent = 0

;==

[State 1007, Change to Followup]
type = ChangeState
triggerall = var(3) > 0
trigger1 = AnimElemTime(4) = 1
value = IfElse(var(3) < 3, IfElse(var(3) = 1, 1000, 1001), IfElse(var(3) = 3, 1009, IfElse(var(3) = 4, 1010, 1015)))
ctrl = 0

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

;---------------------------------------------------------------------------
; D Jack Juke (Back)
[Statedef 1008]
type = S
movetype = I
physics = N	
velset = 0,0						
ctrl = 0								
poweradd = 50			
sprpriority = 2			
facep2 = 1
anim = 1007

[State 1008, VarSet]
type = VarSet
trigger1 = Vel X = 0
var(10) = 2
persistent = 1

[State 1008, NotHitBy]
type = Null
trigger1 = AnimElemTime(6) < 0
value = SA, AA, AP

[State 1008, VarSet]
type = VarSet
trigger1 = !Time
var(3) = 0
persistent = 0

[State 1008, VelSet]
type = VelSet
trigger1 = Time = 0
x = -8/Cond(PrevStateNo < 200, 1, 2)

[State 1008, VelMul]
type = VelMul
trigger1 = 1
x = 0.9

[State 1008, VarSet]
type = VarSet
triggerall = AnimElemTime(6) < 0
triggerall = AILevel = 0
trigger1 = command = "throw"
var(3) = 5
persistent = 0

[State 1008, VarSet]
type = VarSet
triggerall = AnimElemTime(6) < 0
triggerall = AILevel = 0
triggerall = command != "throw"
triggerall = command = "holddown"
trigger1 = command = "x"
trigger2 = command = "y" 
var(3) = 4
persistent = 0

[State 1008, VarSet]
type = VarSet
triggerall = AnimElemTime(6) < 0
triggerall = AILevel = 0
triggerall = command != "throw"
triggerall = command = "holdfwd"
trigger1 = command = "x"
trigger2 = command = "y" 
var(3) = 3
persistent = 0

[State 1008, VarSet]
type = VarSet
triggerall = AnimElemTime(6) < 0
triggerall = AILevel = 0
triggerall = command != "throw"
triggerall = command != "holdfwd"
triggerall = command != "holddown"
trigger1 = command = "x"
trigger2 = command = "y" 
var(3) = IfElse(command = "x", 1, 2)
persistent = 0

;== AI stuff for this state ==

[State 1008, AI Ace Clinch]
type = VarSet
triggerall = AnimElemTime(6) < 0
triggerall = random < 100*(AILevel**2/64.0)
triggerall = AILevel != 0 && RoundState = 2
triggerall = abs(P2BodyDist X) <= 50
triggerall = EnemyNear, StateType != A
triggerall = EnemyNear, MoveType != A
trigger1 = Var(0) = 0
var(3) = 5
persistent = 0

[State 1008, AI King Sweep]
type = VarSet
triggerall = AnimElemTime(6) < 0
triggerall = AILevel != 0 && RoundState = 2
triggerall = abs(P2BodyDist X) <= 40
triggerall = var(15) < 3 && Enemy, StateType != L
trigger1 = P2StateType != A
var(3) = 4
persistent = 0

[State 1008, AI King Dart]
type = VarSet
triggerall = AnimElemTime(6) < 0
triggerall = AILevel != 0 && RoundState = 2
triggerall = abs(P2BodyDist X) <= 70
triggerall = P2StateType != A
triggerall = var(15) < 3 && Enemy, StateType != L
triggerall = EnemyNear, MoveType != A
trigger1 = P2StateType = C 
var(3) = 3
persistent = 0

[State 1008, AI Queen Straight]
type = VarSet
triggerall = AnimElemTime(6) < 0
triggerall = AILevel != 0 && RoundState = 2
triggerall = abs(P2BodyDist X) <= 100
triggerall = P2StateType != A
triggerall = StateType != A
triggerall = P2StateType != C
triggerall = P2MoveType != A
trigger1 = var(15) < 3
var(3) = 1
persistent = 0

[State 1008, AI Queen Upper]
type = VarSet
triggerall = AnimElemTime(6) < 0
triggerall = AILevel != 0 && RoundState = 2
triggerall = abs(P2BodyDist X) <= 100
triggerall = IfElse(P2StateType != A, abs(P2BodyDist Y) <= 80, abs(P2BodyDist Y) = [20,80]) 
triggerall = StateType != A
triggerall = P2MoveType != A
trigger1 = var(15) < 3
var(3) = 2
persistent = 0

;==

[State 1008, Change to Followup]
type = ChangeState
triggerall = var(3) > 0
trigger1 = AnimElemTime(4) = 1
value = IfElse(var(3) < 3, IfElse(var(3) = 1, 1000, 1001), IfElse(var(3) = 3, 1009, IfElse(var(3) = 4, 1010, 1015)))
ctrl = 0

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

;---------------------------------------------------------------------------
; King Dart (Juke)
[Statedef 1009]
type = S
movetype = A
physics = S
poweradd = 0
ctrl = 0
velset = 6,0
anim = 1009
sprpriority = 2			
facep2 = 1
movehitpersist = 1

[State 1009, NotHitBy]
type =Null
triggerall = PrevStateNo = [1005,1008]
trigger1 = AnimElemTime(4) < 0
value = SA, AA, AP

[State 1009, 1]
type = HitDef
triggerall = Var(15) < 3
trigger1 = AnimElem = 4
attr = S, SA			
damage = floor(70*fvar(20)), 0
animtype = Heavy			
guardflag = HA			
hitflag = MAF
priority = 4, Hit			
pausetime = 10,10		
sparkno = 10001
guard.sparkno = 10130				
sparkxy = -20, -45		
hitsound = F5, 2			
guardsound = F6, 0			
ground.type = Low		
air.animtype = Back
ground.slidetime = 18		
ground.hittime = 18
guard.hittime = 18		
ground.velocity = -6				
air.velocity = -4.5, -7.5		
air.hittime = 18
getpower = 50,50
givepower = 50			
yaccel = 0.5
ground.cornerpush.veloff = 0
persistent = 0

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

[State 1009, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; King Sweep 
[Statedef 1010]
type = C
movetype = A
physics = C
poweradd = 0
ctrl = 0
anim = 1010
sprpriority = 2			
facep2 = 1
velset = 8,0

[State 1010, NotHitBy]
type =Null
triggerall = PrevStateNo = [1005,1008]
trigger1 = AnimElemTime(2) < 0
value = SA, AA, AP

[State 1010, 1]
type = HitDef
triggerall = Var(25) = 0
triggerall = EnemyNear, StateType = L
trigger1 = AnimElem = 4
attr = C, SA			
damage = floor(60*fvar(20)), 0
animtype = Heavy			
guardflag = LA			
hitflag = MAFD
priority = 4, Hit			
pausetime = 10,10			
sparkno = 10001
guard.sparkno = 10130				
sparkxy = -20, -20	
hitsound = F5, 1		
guardsound = F6, 0			
ground.type = Low	
air.animtype = Back
ground.slidetime = 18	
ground.hittime = 18
guard.hittime = 18		
ground.velocity = -10	
air.velocity = -4.5, -6.5		
air.hittime = 18
getpower = 50,50
givepower = 50				
yaccel = 0.5
ground.cornerpush.veloff = 0
fall = 1
fall.recovertime = 0
id = StateNo

[State 1010, 2]
type = HitDef
triggerall = Var(25) = 1 || EnemyNear, StateType != L
trigger1 = AnimElem = 4
attr = C, SA			
damage = floor(60*fvar(20)), 0
animtype = Heavy			
guardflag = LA			
hitflag = MA
priority = 4, Hit			
pausetime = 10,10			
sparkno = 10001
guard.sparkno = 10130				
sparkxy = -20, -20	
hitsound = F5, 1		
guardsound = F6, 0			
ground.type = Low	
air.animtype = Back
ground.slidetime = 18	
ground.hittime = 18
guard.hittime = 18		
ground.velocity = -10	
air.velocity = -4.5, -6.5		
air.hittime = 18
getpower = 50,50
givepower = 50				
yaccel = 0.5
ground.cornerpush.veloff = 0
forcenofall = 1
id = StateNo

[State 1010, VarSet]
type = VarSet
triggerall = NumTarget(StateNo)
triggerall = Target, StateType = L
trigger1 = MoveHit
var(25) = 1

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

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

;---------------------------------------------------------------------------
; Ace Clinch (Grab)
[Statedef 1015]
type = S
movetype = A
physics = S
velset = 0,0
anim = 1015
ctrl = 0

[State 1015, 1]
type = HitDef
triggerall = var(0) = 0
trigger1 = AnimElem = 1
attr = S, NT          
hitflag = M-          
priority = 1, Miss   
sparkno = -1    
p1facing = 1
p2facing = 1                  
p1stateno = 1016
hitsound = F800,1   
id = 1015
numhits = 0

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

;---------------------------------------------------------------------------
; Ace Clinch
[Statedef 1016]
type = S
movetype = A
physics = N
velset = 0,0
anim = 1016
ctrl = 0
poweradd = 150

[State 1016, VarSet]
type = VarSet
trigger1 = var(15) != 0
var(15) = 0

[State 1016, VarSet]
type = VarSet
trigger1 = !Time
var(20) = 10

[State 1016, TargetState]
type = TargetState
trigger1 = !Time
value = 51016
id = 1015

[State 1016, TargetBind]
type = TargetBind
trigger1 = AnimElemTime(9) < 0
time = 1
id = 1015
pos = 50,0

[State 1016, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = AnimElemTime(6) = 1
trigger2 = AnimElemTime(9) = 1
value = -25
id = 1015
kill = IfElse(AnimElemTime(9) < 0, 0, 1)

[State 1016, HitAdd]
type = HitAdd
trigger1 = AnimElemTime(6) = 1
trigger2 = AnimElemTime(9) = 1
value = 1

[State 1016, Explod]
type = Explod
trigger1 = AnimElemTime(6) = 1
trigger2 = AnimElemTime(9) = 1
anim = F(10001 + (sysvar(3) > Const720p(20)) + (sysvar(3) > Const720p(56)))
pos = 50, -55
sprpriority = 5

[State 1016, PlaySnd]
type = PlaySnd
trigger1 = AnimElemTime(6) = 1
trigger2 = AnimElemTime(9) = 1
value = F5, IfElse(AnimElemTime(9) < 0, 1, 2)

[State 1016, PlaySnd]
type = PlaySnd
trigger1 = AnimElemTime(6) = 1
trigger2 = AnimElemTime(9) = 1
value = F5, IfElse(AnimElemTime(9) < 0, 7, 8)

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