;---------------------------------------------------------------------------
; EX Dashing Puncher
[Statedef 2000]
type = S
movetype = A
physics = N				
velset = 0,0			
ctrl = 0				
anim = 2000				
poweradd = -1000			
sprpriority = 2			
facep2 = 1

[State 12000, 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, Voice]
type = PlaySnd 
trigger1 = AnimElem = 6
value = S1000,0
channel = 0

[State 2000, NotHitBy]
type = NotHitBy
trigger1 = AnimElemTime(10) < 0
value = , AA,AP
ignorehitpause = 1

[State 2000, VelSet]
type = VelSet
trigger1 = AnimElem = 3
x = 24

[State 2000, 1]
type = HitDef
triggerall = IfElse(Var(31) = 0, var(15) < 3, var(15) < 4)
trigger1 = AnimElem = 10
attr = S, SA			
damage = floor(105*fvar(20)), 5
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, 1	
ground.type = High	
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 17
ground.velocity = -2.5,-10.8
guard.velocity = -11.1796875
air.velocity = -2.5,-10.8
air.animtype = Back				
yaccel = 0.5
ground.cornerpush.veloff = 0
givepower = 150
fall = 1
fall.recovertime = 60
getpower = 0

[State 2000, VelSet]
type = VelSet
trigger1 = AnimElem = 10
x = 0

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

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

[State 2000, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; EX Machine Gun Puncher
[Statedef 2005]
type = S
movetype = A
physics = N				
velset = 0,0			
ctrl = 0				
anim = 2005				
poweradd = -1000			
sprpriority = 2			
facep2 = 1

[State 12000, 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, Voice]
type = PlaySnd 
trigger1 = AnimElem = 1
trigger2 = AnimElem = 28
value = S(IfElse((AnimElem = 1), 1005, 1008)),0
channel = 0

[State 2005, VelSet]
type = VelSet
trigger1 = AnimElem = 2
x = 6
ignorehitpause = 1

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

[State 2005, VelSet]
type = VelSet
trigger1 = AnimElem = 26
x = 0
ignorehitpause = 1

[State 2005, Whiff]
type = PlaySnd 
trigger1 = AnimElem = 2
trigger2 = AnimElem = 7
trigger3 = AnimElem = 12
trigger4 = AnimElem = 17
trigger5 = AnimElem = 22
value = S5,6
channel = 1
ignorehitpause = 1

[State 2005, Whiff]
type = PlaySnd 
trigger1 = AnimElem = 29
value = S5,7
channel = 1
ignorehitpause = 1

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

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

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

[State 2005, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 31
movetype = I

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

;---------------------------------------------------------------------------
; EX Puncher Vision (Fwd.)
[Statedef 2010]
type = S
movetype = I
physics = N				
velset = 0,0			
ctrl = 0				
anim = 1010				
poweradd = -1000			
sprpriority = 2			
facep2 = 1

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

[State 2010, Voice]
type = PlaySnd 
trigger1 = AnimElem = 1
value = S1010,0
channel = 0

[State 2010, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

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

[State 2010, VarSet]
type = VarSet
triggerall = AnimElemTime(1) > 1
trigger1 = command = "holdfwd" && command = "x"
trigger1 = AILevel = 0
var(2) = 1

[State 2010, VarSet]
type = VarSet
triggerall = AnimElemTime(1) > 1
trigger1 = command = "holdfwd" && command = "y"
trigger1 = AILevel = 0
var(2) = 2

[State 2010, VarSet]
type = VarSet
triggerall = AnimElemTime(1) > 1
trigger1 = command = "holdback" && command = "x" || command = "holdback" && command = "y"
trigger1 = AILevel = 0
var(2) = 3

[State 2010, VelSet]
type = VelSet
trigger1 = AnimElem = 3
x = 14

[State 2010, VelSet]
type = VelSet
trigger1 = AnimElem = 6
x = 0

[State 2010, ChangeState]
type = ChangeState
triggerall = var(2) > 0
trigger1 = AnimElemTime(4)>=0
value = IfElse(var(2) = 1, 1015, IfElse(var(2) = 2, 1017, 1030))
ctrl = 0

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

;---------------------------------------------------------------------------
; EX Puncher Vision (Back)
[Statedef 2012]
type = S
movetype = I
physics = N				
velset = 0,0			
ctrl = 0				
anim = 1012				
poweradd = -1000			
sprpriority = 2			
facep2 = 1

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

[State 2012, Voice]
type = PlaySnd 
trigger1 = AnimElem = 1
value = S1010,0
channel = 0

[State 2012, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

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

[State 2012, VarSet]
type = VarSet
triggerall = AnimElemTime(1) > 1
trigger1 = command = "holdfwd" && command = "x"
trigger1 = AILevel = 0
var(2) = 1

[State 2012, VarSet]
type = VarSet
triggerall = AnimElemTime(1) > 1
trigger1 = command = "holdfwd" && command = "y"
trigger1 = AILevel = 0
var(2) = 2

[State 2012, VarSet]
type = VarSet
triggerall = AnimElemTime(1) > 1
trigger1 = command = "holdback" && command = "x" || command = "holdback" && command = "y"
trigger1 = AILevel = 0
var(2) = 3

[State 2012, VelSet]
type = VelSet
trigger1 = AnimElem = 3
x = -14

[State 2012, VelSet]
type = VelSet
trigger1 = AnimElem = 6
x = 0

[State 2012, ChangeState]
type = ChangeState
triggerall = var(2) > 0
trigger1 = AnimElemTime(4)>=0
value = IfElse(var(2) = 1, 1015, IfElse(var(2) = 2, 1017, 1030))
ctrl = 0

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

;---------------------------------------------------------------------------
; EX Forbidden Eagle
[Statedef 2020]
type = S
movetype = A
physics = N				
velset = 0,0			
ctrl = 0				
anim = 2020				
poweradd = -1000			
sprpriority = 2			
facep2 = 1

[State 12000, 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, Voice]
type = PlaySnd 
trigger1 = AnimElem = 1
value = S1020,0
channel = 0

[State 2020, Helper]
type = Helper
trigger1 = AnimElem = 1
name = "Eagle Shield"
ID = 22020
stateno = 21020
pos = 0,0
postype = p1   
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0

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

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

[State 2020, 2]
type = HitDef
triggerall = Var(15) < IfElse(var(31) = 0, 3, 4)
trigger1 = AnimElemTime(10) >= 0 && AnimElemTime(15) < 0
attr = S, SA			
damage = floor(100*fvar(20)), 45
animtype = Heavy			
guardflag = MA			
hitflag = MAF
priority = 5, Hit			
pausetime = 7,7
sparkno = S10001
guard.sparkno = S10131				
sparkxy = -10, -75		
hitsound = S5, 5			
guardsound = S6, 1	
ground.type = High	
ground.slidetime = 20
ground.hittime = 20
guard.hittime = 17
ground.velocity = -2.5,-10.8
guard.velocity = -11.1796875
air.velocity = -2.5,-10.8
air.animtype = Back				
yaccel = 0.5
ground.cornerpush.veloff = 0
givepower = 150
fall = 1
fall.recovertime = 60
id = 2020
nochainid = 2020
persistent = 0
getpower = 0

[State 2020, PosAdd]
type = PosAdd
trigger1 = AnimElem = 13
x = 8

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

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

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

;---------------------------------------------------------------------------
;EX Puncher Weaving
[Statedef 2030]
type = S
movetype = I
physics = N				
velset = 0,0			
ctrl = 0				
anim = 2030				
poweradd = -1000			
sprpriority = 2			
facep2 = 1

[State 2030, Voice]
type = PlaySnd 
trigger1 = AnimElem = 1
value = S1030,0
channel = 0
ignorehitpause = 1

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

[State 2030, VarSet]
type = VarSet
trigger1 = !time
var(2) = 0

[State 2030, VarSet]
type = VarSet
trigger1 = !time
var(4) = 0

[State 2030, VarSet]
type = VarSet
trigger1 = Time > 0
var(4) = ifElse(Command = "hold_x" || command = "hold_y", 0, 1)

[State 2030, AfterImage]
type = AfterImage
trigger1 = Animelem = 2
time = 20
length = 4
framegap = 1
timegap = 6
trans = add1
palcontrast = 128,128,128
paladd = 0,0,0
palmul = 1,1,1

[State 2030, Afterimage]
type = AfterImageTime
trigger1 = AnimElemTime(27) < 0
time = 4

[State 2030, VarSet]
type = VarSet
trigger1 = AnimElemTime(1) > 1
trigger1 = command = "holdfwd" && command = "x" || command = "holdfwd" && command = "y"
var(2) = 1

[State 2030, VarSet]
type = VarSet
trigger1 = AnimElemTime(1) > 1
trigger1 = command = "holdback" && command = "x" || command = "holdback" && command = "y"
var(2) = 2

[State 2030, VarSet]
type = VarSet
trigger1 = AnimElemTime(1) > 1
trigger1 = command = "holdfwd" && command = "a" || command = "holdfwd" && command = "b"
var(2) = IfElse(command = "holdfwd" && command = "a", 3, 4)

[State 2030, VarSet]
type = VarSet
trigger1 = AnimElemTime(1) > 1
trigger1 = command = "holdback" && command = "a" || command = "holdback" && command = "b"
var(2) = IfElse(command = "holdback" && command = "a", 5, 6)

[State 2030, ChangeState]
type = ChangeState
triggerall = AnimElemTime(3) >= 0
trigger1 = var(2) = 1
value = 1031
ctrl = 0

[State 2030, ChangeState]
type = ChangeState
triggerall = AnimElemTime(3) >= 0
trigger1 = var(2) = 2
value = 1032
ctrl = 0

[State 2030, ChangeState]
type = ChangeState
triggerall = AnimElemTime(3) >= 0
trigger1 = var(2) = [3,4]
value = IfElse(var(2) = 3, 1010, 1011)
ctrl = 0

[State 2030, ChangeState]
type = ChangeState
triggerall = AnimElemTime(3) >= 0
trigger1 = var(2) = [5,6]
value = IfElse(var(2) = 5, 1012, 1013)
ctrl = 0

[State 2030, end]
type = ChangeState
triggerall = time > 14
trigger1 = command != "hold_x" && var(4)= 1
trigger2 = command != "hold_y" && var(4)= 1
value = 0
ctrl = 1
