;==============================================================
; CNS File for Name by Team Z2
; Normal states : standing, crouching & jumping basics, etc.
;==============================================================
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; Taunt
[Statedef 195]
type = S
movetype = I
physics = S
ctrl = 0
anim = 195
velset = 0,0
sprpriority = 2

[State 195, 1]
type = CtrlSet
trigger1 = Time>=38
value = 1

[State 0, Width]
type = Width
trigger1 = 1
edge = 0,30

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 8
trigger2 = AnimElem = 11
trigger3 = AnimElem = 14
value = 195,0

[State 195, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Stand Light Punch
[Statedef 200]
type    = S           
movetype= A                     
physics = S                      
juggle  = 3                      
velset = 0,0                 
ctrl = 0                        
anim = ifelse(p2bodydist x <= 10, 200, 205)                        
sprpriority = 1 

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time && random<200
value = 200,0 + random%4
channel = 0

  [State 210, 1]
type = PlaySnd
trigger1 = animelemtime(2) = 1
value = 0, 0

[State 200, 1]
type = HitDef
triggerall = !IsHelper
trigger1 = AnimElem = 3
attr = S, NA        
damage = ceil(ifElse(fvar(11) * 21 < 7, 7, fvar(11) * 21)), 0      
animtype = Light       
guardflag = MA           
hitflag = MAF                
priority = 3, Hit              
pausetime = 8, 8    
sparkno = s7010   
guard.sparkno = s7000       
sparkxy = -10, ifelse(p2bodydist x <= 10,-66,-44)      
hitsound = s5, 0
guardsound = S6,0 
ground.type = High       
ground.slidetime = 5  
ground.hittime  = 11 
guard.ctrltime = 5      
ground.velocity = -4        
airguard.velocity = -1.9,-.8   
air.type = High             
air.velocity = -1.4,-3          
air.hittime = 15

[State 3000, basics limiter]
type = Helper
triggerall = !IsHelper
trigger1 = !NumHelper(15999)
trigger1 = movehit
stateno = 15999
ID = 15999
name = "basics"
postype = p1
pos = 0,0
ownpal = 1



[State 0, AttackDist]
type = AttackDist
trigger1 = AnimElemTime(4)>=0
value = 0

[State 200, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Standing Medium Punch
[Statedef 210]
type    = S
movetype= A
physics = N
juggle  = 3
ctrl = 0
velset = 0,0
anim = 210
sprpriority = 1

[State 0, VelSet]
type = VelSet
trigger1 = animelemtime(2) = 0
x = 3
y = 0

[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(2) >= 1 && vel x >= 0.25
x = -0.125

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time && random<350
value = 210,0 + random%3
channel = 0

[State 210, 1]
type = PlaySnd
trigger1 = animelemtime(2) = 1
trigger2 = animelemtime(6) = 1
value = 0, 1

[State 210, 2]
type = HitDef
triggerall = !IsHelper
trigger1 = AnimElem = 3
attr = S, NA
animtype  = Medium
damage = ceil(ifElse(fvar(11) * 14 < 7, 7, fvar(11) * 14)), 0
guardflag = MA
pausetime = 10,10
sparkno = s7020
guard.sparkno = s7000   
sparkxy = -15,-60
hitsound = s5, 1
guardsound = S6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5.5
air.velocity = -2.5,-4
guard.cornerpush.veloff= -7

[State 210, 2]
type = HitDef
triggerall = !IsHelper
trigger1 = AnimElem = 7
attr = S, NA
animtype  = Medium
damage = ceil(ifElse(fvar(11) * 17 < 7, 7, fvar(11) * 17)),0
guardflag = MA
pausetime = 10,10
sparkno = s7020
guard.sparkno = s7000   
sparkxy = -15,-60
hitsound = s5, 1
guardsound = S6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 17
guard.ctrltime = 13
ground.velocity = -4.5
air.velocity = -2.5,-4
ground.cornerpush.veloff= -7
guard.cornerpush.veloff= -7
id = 211

[State 3000, basics limiter]
type = Helper
triggerall = !IsHelper
trigger1 = !NumHelper(15999)
trigger1 = movehit
stateno = 15999
ID = 15999
name = "basics"
postype = p1
pos = 0,0
ownpal = 1



[State 0, AttackDist]
type = AttackDist
trigger1 = AnimElemTime(8)>=0
value = 0

[State 210, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Standing Heavy Punch
[Statedef 220]
type    = S
movetype= A
physics = N
juggle  = 3
ctrl = 0
velset = 0,0
anim = 220
sprpriority = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time && random<500
value = 220,0 + random%4
channel = 0

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = !Time
id = 90000220 

[State 210, 1]
type = PlaySnd
trigger1 = Time = 2
value = 0, 2

[State 210, 2]
type = HitDef
triggerall = !IsHelper
trigger1 = AnimElem = 3
attr = S, NA
animtype  = Medium
damage = ceil(ifElse(fvar(11) * 21 < 7, 7, fvar(11) * 21)),0
guardflag = MA
pausetime = 12,12
sparkno = S7030
guard.sparkno = s7000   
sparkxy = -10,-50
hitsound = s5, 2
guardsound = S6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 18
guard.ctrltime = 14
ground.velocity = -5.5
air.velocity = -2.5,-4
forcenofall = 1
ground.cornerpush.veloff= -10
guard.cornerpush.veloff= -10

[State 0, Width]
type = Width
trigger1 = AnimElemTime(2)<0
player = 20,-20
[State 0, Width]
type = Width
trigger1 = AnimElemTime(2)>=0&&AnimElemTime(6)<0
player = 40,-40
[State 0, Width]
type = Width
trigger1 = AnimElemTime(6)>=0&&AnimElemTime(7)<0
player = 20,-40



[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelemtime(6) >= 1
physics = S      

[State 3000, basics limiter]
type = Helper
triggerall = !IsHelper
trigger1 = !NumHelper(15999)
trigger1 = movehit
stateno = 15999
ID = 15999
name = "basics"
postype = p1
pos = 0,0
ownpal = 1

[State 0, AttackDist]
type = AttackDist
trigger1 = AnimElemTime(5)>=0
value = 0

[State 0, ChangeState]
type = ChangeState
triggerall =  animelemtime(4) >= 1&&animelemtime(6) <= 0
trigger1 = !AILEVEL
trigger1 = (NumExplod(90000220) ||  command = "z") 
trigger2 = AILEVEL>0
trigger2 = random < 250*(AIlevel ** 2 / 64.0)
trigger2 = MoveHit
trigger3 = AILEVEL>0
trigger3 = random < 150*(AIlevel ** 2 / 64.0)
trigger3 = P2BodyDist X = [20,50]
trigger3 = P2StateType !=A || P2StateType !=L
value = 225

[State 210, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Standing Heavy Punch #2
[Statedef 225]
type    = S
movetype= A
physics = N
juggle  = 0
ctrl = 0
velset = 0,0
anim = 225
sprpriority = 1

[State 0, PosAdd]
type = PosAdd
trigger1 = AnimElem = 3
x = 75

[State 0, Width]
type = Width
trigger1 = AnimElemTime(3)<0
player = 20,-20
[State 0, Width]
type = Width
trigger1 = AnimElemTime(3)>=0&&AnimElemTime(4)<0
player = 0,75

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time && random<500
value = 220,0 + random%4
channel = 0

[State 210, 1]
type = PlaySnd
trigger1 = Time = 2
value = 0, 2

[State 210, 2]
type = HitDef
triggerall = !IsHelper
trigger1 = AnimElem = 4
attr = S, NA
animtype  = Heavy
damage = ceil(ifElse(fvar(11) * 23 < 7, 7, fvar(11) * 23)),0
guardflag = MA
pausetime = 12,12
sparkno = S7030
guard.sparkno = s7000   
sparkxy = -10,-50
hitsound = s5, 2
guardsound = S6,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 16
guard.ctrltime = 12 
ground.velocity = -6.5
air.velocity = -7.5,-4
ground.cornerpush.veloff= -15
guard.cornerpush.veloff= -15

[State 0, AttackDist]
type = AttackDist
trigger1 = AnimElemTime(5)>=0
value = 0

[State 210, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------
;STAND LIGHT KICK
[Statedef 230]
type = S
movetype = A
physics = S
anim = ifelse(p2bodydist x <= 10, 235, 230)  
ctrl = 0
velset = 0,0
poweradd= 0
sprpriority = 1
juggle = 3

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time && random<200
value = 200,0 + random%4
channel = 0

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

[State 200, HitDef]
type = HitDef
triggerall = !IsHelper
trigger1 = Anim = 230
trigger1 = AnimElem = 3
attr = S, NA
damage = ceil(ifElse(fvar(11) * 18 < 7,7, fvar(11) * 18)), 0
animtype = light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,10
guard.pausetime = 10,10
sparkno = s7010
guard.sparkno = s7000
sparkxy = -10, -52
hitsound = s5, 3
guardsound = S6,0
ground.type = High
ground.slidetime = 7
ground.hittime  = 11
guard.slidetime = 12
guard.hittime  = 13
guard.ctrltime = 7
ground.velocity = -2.5 ;-3
guard.velocity = -4.5
airguard.velocity = -1.9,-.8	
air.velocity = -2,-2
air.hittime = 12
air.animtype = back
getpower= 40,35
givepower = 35,35
yaccel = 0.5
ID = 1098
fall = NumExplod(1000)

[State 200, HitDef]
type = HitDef
triggerall = !IsHelper
trigger1 = Anim = 235
trigger1 = AnimElem = 3
attr = S, NA
damage = ceil(ifElse(fvar(11) * 18 < 7,7, fvar(11) * 18)), 0
animtype = light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,10
guard.pausetime = 10,10
sparkno = s7010
guard.sparkno = s7000
sparkxy = -10, -52
hitsound = s5, 3
guardsound = S6,0
ground.type = High
ground.slidetime = 7
ground.hittime  = 14
guard.slidetime = 7
guard.hittime  = 14
guard.ctrltime = 10
ground.velocity = -2.5 ;-3
guard.velocity = -4.5
airguard.velocity = -1.9,-.8	
air.velocity = -2,-2
air.hittime = 12
air.animtype = back
getpower= 40,35
givepower = 35,35
yaccel = 0.5
ID = 1098
fall = NumExplod(1000)

[State 3000, basics limiter]
type = Helper
triggerall = !IsHelper
trigger1 = !NumHelper(15999)
trigger1 = movehit
stateno = 15999
ID = 15999
name = "basics"
postype = p1
pos = 0,0
ownpal = 1



[State 0, AttackDist]
type = AttackDist
trigger1 = Anim = 230
trigger1 = AnimElemTime(5)>=0
trigger2 = Anim = 235
trigger2 = AnimElemTime(4)>=0
value = 0

[State 221, finish]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------
;STAND MEDIUM KICK
[Statedef 240]
type = S
movetype = A
physics = S
anim = 240
ctrl = 0
velset = 0,0
sprpriority = 1
juggle = 3


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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time && random<350
value = 210,3 + random%2
channel = 0
 
[State 212, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 0, 4
channel = 1

[State 0, VelSet]
type = VelAdd
trigger1 = PrevStateNo = 200 || PrevStateNo = 230
trigger1 = P2MoveType = H
trigger1 = AnimElemTime(1) = 0
x = 10
y = 0

[State 0, VelSet]
type = VelAdd
trigger1 = AnimElem = 4
x = 5
y = 0

[State 200, HitDef]
type = HitDef
triggerall = !IsHelper
trigger1 = AnimElem = 5
attr = S, NA
damage = ceil(ifElse(fvar(11) * 15 < 7,7, fvar(11) * 15)), 0
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 11, 11
guard.pausetime = 11,11
sparkno = s7020
guard.sparkno = s7000
sparkxy = -10, -62
hitsound = s5, 4
guardsound = S6,0
ground.type = High
ground.slidetime = 12;8
ground.hittime  = 18;8
ground.velocity = -8 ;-3
guard.velocity = -6
guard.ctrltime = 16
airguard.velocity = -2,-1.1
air.type = High	
air.velocity = -3,-3
air.hittime = 12
air.animtype = back
getpower= ifelse(p2movetype=H,40,140), 35
givepower = 35,35
yaccel = 0.5
ID = 1098
fall = NumExplod(1000)

[State 3000, basics limiter]
type = Helper
triggerall = !IsHelper
trigger1 = !NumHelper(15999)
trigger1 = movehit
stateno = 15999
ID = 15999
name = "basics"
postype = p1
pos = 0,0
ownpal = 1

[State 0, VarSet]
type = VarSet
triggerall = AnimElemTime(5) >= 2 && AnimElemTime(9) < 0 
trigger1 = !AILEVEL
trigger1 = NumExplod(90000240) ;&& !(command = "holdback")  
trigger2 = AILEVEL = 8
trigger2 = MoveHit
trigger3 = AILEVEL
trigger3 = random < 600*(AIlevel ** 2 / 64.0)
var(9) = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = var(9)=1 
value = 245
ctrl = 0

[State 0, AttackDist]
type = AttackDist
trigger1 = AnimElemTime(6)>=0
value = 0

[State 251, Landing Sound]
type = PlaySnd
trigger1 = AnimElem = 9 ;Jump land
value = 40, 0

[state 52, Land FX]
type = Helper
triggerall = !IsHelper
trigger1 = AnimElem = 9
name = "LandFX"
helpertype = normal
stateno = 17100
id = 17100
postype = P1
ownpal = 1
keyctrl = 0
supermovetime = 99999
pausemovetime = 99999



[State 221, finish]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------
;STAND MEDIUM KICK 2
[Statedef 245]
type = S
movetype = A
physics = S
anim = 245
ctrl = 0
velset = 7,0
sprpriority = 1
juggle = 1

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time && random<350
value = 210,3 + random%3
channel = 0
 
[State 212, 1]
type = PlaySnd
trigger1 = animelem = 1
value = 0, 4
channel = 1

[State 0, VelAdd]
type = VelAdd
trigger1 = AnimElemTime(4)<0
x = .4

[State 200, HitDef]
type = HitDef
triggerall = !IsHelper
trigger1 = AnimElem = 3
attr = S, NA
damage = ceil(ifElse(fvar(11) * 17 < 7,7, fvar(11) * 17)), 0
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 11, 11
guard.pausetime = 11,11
sparkno = s7020
guard.sparkno = s7000
sparkxy = -10, -62
hitsound = s5, 4
guardsound = S6,0
ground.type = High
ground.slidetime = 12;8
ground.hittime  = Cond(Anim = 341,22,20);8
ground.velocity = -8 ;-3
guard.velocity = -6
guard.slidetime = 12
guard.hittime = 20
guard.ctrltime = 15
airguard.velocity = -2,-1.1
air.type = High	
air.velocity = -3,-3
air.hittime = 12
air.animtype = back
fall.recover = 0
getpower= ifelse(p2movetype=H,40,140), 35
givepower = 35,35
yaccel = 0.5
ID = 1098
fall = NumExplod(1000)

[State 3000, basics limiter]
type = Helper
triggerall = !IsHelper
trigger1 = !NumHelper(15999)
trigger1 = movehit
stateno = 15999
ID = 15999
name = "basics"
postype = p1
pos = 0,0
ownpal = 1

[State 0, AttackDist]
type = AttackDist
trigger1 = AnimElemTime(4)>=0
value = 0

[State 251, Landing Sound]
type = PlaySnd
trigger1 = AnimElemTime(6)=1 ;Jump land
value = 40, 0

[state 52, Land FX]
type = Helper
triggerall = !IsHelper
trigger1 = AnimElemTime(6)=1
name = "LandFX"
stateno = 17100
id = 17100
postype = P1
ownpal = 1
keyctrl = 0
supermovetime = 99999
pausemovetime = 99999



[State 221, finish]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------
;STAND STRONG KICK 
[Statedef 250]
type = S
movetype = A
physics = S
anim = 250
ctrl = 0
velset = 0,0
sprpriority = 1
juggle = 3

[State 0, PosAdd]
type = PosAdd
trigger1 = AnimElemTime(3) >= 0 && AnimElemTime(10) <= 0
x = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time && random<500
value = 220,4 + random%4
channel = 0

[State 221, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 40, 1
channel = 1

[State 221, 1]
type = PlaySnd
trigger1 = animelem = 4
value = 0, 5
channel = 1

[State 200, HitDef]
type = HitDef
triggerall = !IsHelper
trigger1 = AnimElem = 7
attr = S, NA
damage = ceil(ifElse(fvar(11) * 35 < 3,3, fvar(11) * 35)), 0
animtype = Hard	
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 13,13
guard.pausetime = 13,13
sparkno = s7030
guard.sparkno = s7000
sparkxy = -17,-73
hitsound = s5, 5
guardsound = S6,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 24
ground.velocity = -7
guard.velocity = -9
guard.slidetime = 12
guard.hittime = 28
guard.ctrltime = 18
airguard.velocity = -2.5,-1.3
air.type = High	
air.velocity = -4,-4
air.hittime = 82
air.animtype = back
fall.recover = 0
getpower= ifelse(p2movetype=H,40,210), 35
givepower = 35,35
yaccel = 0.5
ID = 1098
fall = NumExplod(1000)

[State 3000, basics limiter]
type = Helper
triggerall = !IsHelper
trigger1 = !NumHelper(15999)
trigger1 = movehit
stateno = 15999
ID = 15999
name = "basics"
postype = p1
pos = 0,0
ownpal = 1

[State 0, AttackDist]
type = AttackDist
trigger1 = AnimElemTime(8)>=0
value = 0

[State 251, Landing Sound]
type = PlaySnd
trigger1 = AnimElem = 10 ;Jump land
value = 40, 0

[state 52, Land FX]
type = Helper
triggerall = !IsHelper
trigger1 = AnimElem = 10
name = "LandFX"
helpertype = normal
stateno = 17100
id = 17100
postype = P1
ownpal = 1
keyctrl = 0
supermovetime = 99999
pausemovetime = 99999



[State 221, finish]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------
;DASH KICK 
[Statedef 270]
type = S
movetype = A
physics = S
anim = 270
ctrl = 0
sprpriority = 1
juggle = 3


[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 3
x = 7

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 3
physics = N         ;A,C,S,N

[State 221, 1]
type = PlaySnd
trigger1 = animelem = 3
value = 0, 5
channel = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time && random<500
value = 220,4 + random%4
channel = 0

[State 200, HitDef]
type = HitDef
triggerall = !IsHelper
trigger1 = AnimElem = 5
attr = S, NA
damage = ceil(ifElse(fvar(11) * 37 < 3,3, fvar(11) * 37)), 0
animtype = Hard	
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 13,13
guard.pausetime = 13,13
sparkno = s7030
guard.sparkno = s7000
sparkxy = -17,-73
hitsound = s5, 5
guardsound = S6,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 24
ground.velocity = -7
guard.velocity = -9
guard.slidetime = 12
guard.hittime = 18
guard.ctrltime = 14
airguard.velocity = -2.5,-1.3
air.type = High	
air.velocity = -4,-4
air.hittime = 82
air.animtype = back
fall.recover = 0
getpower= ifelse(p2movetype=H,40,210), 35
givepower = 35,35
yaccel = 0.5
ID = 1098
fall = NumExplod(1000)

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 7
physics = S         ;A,C,S,N

[State 0, AttackDist]
type = AttackDist
trigger1 = AnimElemTime(6)>=0
value = 0

[State 251, Landing Sound]
type = PlaySnd
trigger1 = AnimElem = 8 ;Jump land
value = 40, 0

[state 52, Land FX]
type = Helper
triggerall = !IsHelper
trigger1 = AnimElem = 8
name = "LandFX"
helpertype = normal
stateno = 17100
id = 17100
postype = P1
ownpal = 1
keyctrl = 0
supermovetime = 99999
pausemovetime = 99999

[State 0, Width]
type = Width
trigger1 = AnimElemTime(3) >= 0
player = 0,30

[State 0, ChangeState]
type = ChangeState
trigger1 = MoveContact
value = 271

[State 221, finish]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------
;DASH KICK Rebound
[Statedef 271]
type = A
movetype = A
physics = A
anim = 271
ctrl = 0
velset = -3,-8
sprpriority = 1
juggle = 3

[State 0, AttackDist]
type = AttackDist
trigger1 = 1
value = 0

[State 0, CtrlSet]
type = CtrlSet
trigger1 = AnimElem = 7
value = 1


;---------------------------------------------------------------------------
; Combo STRONG KICK
[Statedef 260]
type = S
movetype = A
physics = N
anim = 260
ctrl = 0
sprpriority = 1
juggle = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time && random<500
value = 220,4 + random%4
channel = 0

[State 650, 2]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0, 5

    [State 200, Time Offset]
    type = VarSet
    trigger1 = moveContact = 1
    var(15) = Time
    ignorehitpause = 1
    persistent = 0

    [State 200, Play Anim]
    type = ChangeAnim
    triggerall = AnimElemTime(5) >= 0 && AnimElemTime(6) <= 0
    trigger1 = hitPauseTime = [1,16 - (10 - var(15))]
    value = anim
    elem = 6
    ignorehitpause = 1

[State 650, 3]
type = HitDef
triggerall = !IsHelper
triggerall = Var(1) <= 20 && Var(18) = 0 || Var(18) = 1
triggerall = p2statetype != A
trigger1 = AnimElem = 5
attr = A, NA
damage = ceil(ifElse(fvar(11) * 33 < 7, 7, fvar(11) * 33)), 0
hitflag = MAF
guardflag = HA
animtype = Hard
pausetime = 16,16
sparkno = s7030
guard.sparkno = s7000
sparkxy = -30,-55
hitsound   = s5,5
guardsound = S6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 23
guard.ctrltime = 16
ground.velocity = -5
air.velocity = -6,8
envshake.time = 12
envshake.freq = 60
envshake.ampl = 3
fall = 1
fall.recover = 0
p2facing = 1
airguard.cornerpush.veloff= 0
air.animtype = Back
fall.animtype = Back
getpower= ifelse(p2movetype=H,40,140), 35
givepower = 35,35
yaccel = 0.5
fall = 0

[State 650, 3]
type = HitDef
triggerall = !IsHelper
triggerall = Var(1) <= 20 && Var(18) = 0 || Var(18) = 1
triggerall = p2statetype = A 
trigger1 = AnimElem = 5
attr = A, NA
damage = ceil(ifElse(fvar(11) * 33 < 7, 7, fvar(11) * 33)), 0
hitflag = MAF
guardflag = HA
animtype = Hard
pausetime = 16,16
sparkno = s7030
guard.sparkno = s7000
sparkxy = -30,-55
hitsound   = s5,5
guardsound = S6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
air.velocity = -2,10
envshake.time = 12
envshake.freq = 60
envshake.ampl = 3
fall = 1
fall.recover = 0
p2facing = 1
airguard.cornerpush.veloff= 0
air.animtype = Back
fall.animtype = Back
getpower= ifelse(p2movetype=H,40,140), 35
givepower = 35,35
yaccel = 0.5
fall = 0
id = 650

[State 620, Only once - explod] ;only once
type = Explod
triggerall = NumTarget
triggerall = !NumExplod(650)
trigger1 = MoveHit && Target,StateNo = 651
anim = 1	;blank anim
ID = 650
removeongethit = 1
ignorehitpause = 1
removetime = -1



[State 0, TargetState]
type = TargetState
triggerall = !NumExplod(650)
triggerall = NumTarget(650);()
trigger1 = MoveHit = 1 
value = 651
persistent = 0
ignorehitpause = 1

;juggle limit LVL2
[State 0, VarAdd]
type = VarAdd
trigger1 = MoveHit = 1
trigger1 = P2StateType = A
var(1) = 2

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 8
physics = S         ;A,C,S,N

[State 0, AttackDist]
type = AttackDist
trigger1 = AnimElemTime(7)>=0
value = 0

[State 251, Landing Sound]
type = PlaySnd
trigger1 = AnimElem = 8 ;Jump land
value = 40, 0

[state 52, Land FX]
type = Helper
triggerall = !IsHelper
trigger1 = AnimElem = 8
name = "LandFX"
helpertype = normal
stateno = 17100
id = 17100
postype = P1
ownpal = 1
keyctrl = 0
supermovetime = 99999
pausemovetime = 99999

[State 221, finish]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Combo STRONG KICK 2
[Statedef 262]
type = A
movetype = A
physics = N
anim = 262
ctrl = 0
sprpriority = 1
juggle = 0

[State 0, VelSet]
type = VelSet
trigger1 = !Time
x = 5
y = -3

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElemTime(5) >= 0
physics = A    

 [State 0, PosAdd]
type = PosAdd
trigger1 = AnimElemTime(7)>=0&&AnimElemTime(8)<0
x = 5
 [State 0, PosAdd]
type = PosAdd
trigger1 = AnimElemTime(8)>=0&&AnimElemTime(9)<0
x = -8

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time && random<500
value = 220,4 + random%4
channel = 0

[State 650, 2]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0, 5

    [State 200, Time Offset]
    type = VarSet
    trigger1 = moveContact = 1
    var(15) = Time
    ignorehitpause = 1
    persistent = 0

    [State 200, Play Anim]
    type = ChangeAnim
    triggerall = AnimElemTime(5) >= 0 && AnimElemTime(6) <= 0
    trigger1 = hitPauseTime = [1,16 - (10 - var(15))]
    value = anim
    elem = 6
    ignorehitpause = 1

[State 650, 3]
type = HitDef
triggerall = !IsHelper
triggerall = Var(1) <= 20 && Var(18) = 0 || Var(18) = 1
triggerall = p2statetype != A
trigger1 = AnimElem = 5
attr = A, NA
damage = ceil(ifElse(fvar(11) * 33 < 7, 7, fvar(11) * 33)), 0
hitflag = MAF
guardflag = HA
animtype = Hard
pausetime = 16,16
sparkno = s7030
guard.sparkno = s7000
sparkxy = -30,-55
hitsound   = s5,5
guardsound = S6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 24
guard.ctrltime = 16
ground.velocity = -5
air.velocity = -6,8
envshake.time = 12
envshake.freq = 60
envshake.ampl = 3
fall = 1
fall.recover = 0
p2facing = 1
airguard.cornerpush.veloff= 0
air.animtype = Back
fall.animtype = Back
getpower= ifelse(p2movetype=H,40,140), 35
givepower = 35,35
yaccel = 0.5
fall = (numhelper(15999) || NumExplod(52)=3)

[State 650, 3]
type = HitDef
triggerall = !IsHelper
triggerall = Var(1) <= 20 && Var(18) = 0 || Var(18) = 1
triggerall = p2statetype = A && !NumExplod(650)
trigger1 = AnimElem = 5
attr = A, NA
damage = ceil(ifElse(fvar(11) * 33 < 7, 7, fvar(11) * 33)), 0
hitflag = MAF
guardflag = HA
animtype = Hard
pausetime = 16,16
sparkno = s7030
guard.sparkno = s7000
sparkxy = -30,-55
hitsound   = s5,5
guardsound = S6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
air.velocity = -2,10
envshake.time = 12
envshake.freq = 60
envshake.ampl = 3
fall = 1
fall.recover = 0
p2facing = 1
airguard.cornerpush.veloff= 0
air.animtype = Back
fall.animtype = Back
getpower= ifelse(p2movetype=H,40,140), 35
givepower = 35,35
yaccel = 0.5
fall = (numhelper(15999) || NumExplod(52)=3)
id = 650

[State 620, Only once - explod] ;only once
type = Explod
triggerall = NumTarget
triggerall = !NumExplod(650)
trigger1 = MoveHit && Target,StateNo = 651
anim = 1	;blank anim
ID = 650
removeongethit = 1
ignorehitpause = 1
removetime = -1

[State 0, TargetState]
type = TargetState
triggerall = NumTarget(650);()
trigger1 = MoveHit = 1 
value = 651
persistent = 0
ignorehitpause = 1

;juggle limit LVL2
[State 0, VarAdd]
type = VarAdd
trigger1 = MoveHit = 1
trigger1 = P2StateType = A
var(1) = 2

[State 0, AttackDist]
type = AttackDist
trigger1 = AnimElemTime(7)>=0
value = 0

[State 251, Landing Sound]
type = PlaySnd
trigger1 = AnimElem = 8 ;Jump land
value = 40, 0

[State 221, finish]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Combo STRONG PUNCH 
[Statedef 261]
type = S
movetype = A
physics = S
anim = 261
ctrl = 0
sprpriority = 1
juggle = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time && random<500
value = 220,0 + random%4
channel = 0

[State 620, 2]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0, 2

[State 620, 3]
type = HitDef
triggerall = !IsHelper
triggerall = Var(1) <= 20 && Var(18) = 0 || Var(18) = 1
triggerall = !NumTarget(620)
trigger1 = AnimElemTime(5)>=0
trigger1 = P2Dist X >=0
attr = A, NA
damage = ceil(ifElse(fvar(11) * 35 < 7, 7, fvar(11) * 35)), 0
hitflag = MAF
guardflag = MA
animtype = Hard
pausetime = 16,16
sparkno = s7030
guard.sparkno = s7000
sparkxy = -30,-50
hitsound   = s620,0
guardsound = S6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
air.velocity = -7,7
envshake.time = 12
envshake.freq = 60
envshake.ampl = 3
airguard.cornerpush.veloff= 0
air.animtype = Back
fall.animtype = Back
getpower= ifelse(p2movetype=H,40,140), 35
givepower = 35,35
yaccel = 0.5
fall = 1
air.fall = 1
fall.recover = 0
persistent = 0
id = 620

[State 620, 3]
type = HitDef
triggerall = !IsHelper
triggerall = Var(1) <= 20 && Var(18) = 0 || Var(18) = 1
triggerall = !NumTarget(620)
trigger1 = AnimElemTime(5)>=0
trigger1 = P2Dist X <0
attr = A, NA
damage = ceil(ifElse(fvar(11) * 35 < 7, 7, fvar(11) * 35)), 0
hitflag = MAF
guardflag = MA
animtype = Hard
pausetime = 16,16
sparkno = s7030
guard.sparkno = s7000
sparkxy = -30,-50
hitsound   = s5,5
guardsound = S6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = 5
air.velocity = 7,7
envshake.time = 12
envshake.freq = 60
envshake.ampl = 3
airguard.cornerpush.veloff= 0
air.animtype = Back
fall.animtype = Back
getpower= ifelse(p2movetype=H,40,140), 35
givepower = 35,35
yaccel = 0.5
fall = (numhelper(15999) || prevstateno=600 || prevstateno=630 || prevstateno=610 || prevstateno=640 || NumExplod(52)=3)
air.fall = 1
fall.recover = 0
persistent = 0
id = 620

;juggle limit LVL2
[State 0, VarAdd]
type = VarAdd
trigger1 = MoveHit = 1
trigger1 = P2StateType = A
var(1) = 2

[State 0, AttackDist]
type = AttackDist
trigger1 = AnimElemTime(6)>=0
value = 0



[State 1400, EndState]
type = ChangeState
trigger1 = !animtime
value = 50 ;ifelse(vel X >= 0,50,116)
ctrl = 0


;---------------------------------------------------------------------------
; CROUCH LIGHT PUNCH
[Statedef 400]
type = C
movetype = A
physics = C
anim = 400
ctrl = 0
velset = 0,0
sprpriority = 1
juggle = 3

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time && random<200
value = 200,0 + random%4
channel = 0

[State 400, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = 0, 0

[State 400, 2]
type = HitDef
triggerall = !IsHelper
trigger1 = AnimElem = 4
attr = C, NA
hitflag = MAF
guardflag = LA
animtype = light
damage = ceil(ifElse(fvar(11) * 18 < 7, 7, fvar(11) * 18)), 0
pausetime = 10,10
guard.pausetime = 10,10
sparkno = s7010
guard.sparkno = s7000
sparkxy = -10,-53
hitsound   = s5,0
guardsound = S6,0
ground.type = low
ground.slidetime = 8
ground.hittime = 8
guard.ctrltime = 4 
ground.velocity = -2.5  
guard.velocity = -4.5
air.velocity = -2,-2
air.animtype = back
getpower= 40, 35
givepower = 35,35
yaccel = 0.5
ID = 1098

[State 3000, basics limiter]
type = Helper
triggerall = !IsHelper
trigger1 = !NumHelper(15999)
trigger1 = movehit
helpertype = normal
stateno = 15999
ID = 15999
name = "basics"
postype = p1
pos = 0,0
ownpal = 1

[State 0, AttackDist]
type = AttackDist
trigger1 = AnimElemTime(5)>=0
value = 0



[State 221, finish]
type = ChangeState
trigger1 = AnimTime = 0
value = 11+(!NumExplod(90000001) && !NumExplod(90000002) && !NumExplod(90000003))
ctrl = 1

;---------------------------------------------------------------------------
; CROUCH MEDIUM PUNCH
[StateDef 410]
type = C
movetype = A
physics = C
anim = 410
ctrl = 0
velset = 0,0
sprpriority = 1
juggle = 3

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time && random<250
value = 210,0 + random%3
channel = 0

[State 410, 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0, 1

[State 410, 2]
type = HitDef
triggerall = !IsHelper
trigger1 = AnimElem = 2
attr = C, NA
damage = ceil(ifElse(fvar(11) * 28 < 7, 7, fvar(11) * 28)), 0
animtype  = Medium
hitflag = MAF
guardflag = LA
pausetime = 12,12
guard.pausetime = 12,12
sparkno = s7020
guard.sparkno = s7000
sparkxy = -10,-40
hitsound   = s5,1
guardsound = S6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 12
guard.ctrltime = 11
ground.velocity = -3  
guard.velocity = -6
air.velocity = -2,-1.2
air.animtype = back
getpower= ifelse(p2movetype=H,40,140), 35
givepower = 35,35
yaccel = 0.5
ID = 1098

[State 3000, basics limiter]
type = Helper
triggerall = !IsHelper
trigger1 = !NumHelper(15999)
trigger1 = movehit
helpertype = normal
stateno = 15999
ID = 15999
name = "basics"
postype = p1
pos = 0,0
ownpal = 1

[State 0, AttackDist]
type = AttackDist
trigger1 = AnimElemTime(4)>=0
value = 0



[State 221, finish]
type = ChangeState
trigger1 = AnimTime = 0
value = 11+(!NumExplod(90000001) && !NumExplod(90000002) && !NumExplod(90000003))
ctrl = 1

;---------------------------------------------------------------------------
; CROUCH STRONG PUNCH
[Statedef 420]
type = C
movetype = A
physics = S
anim = 420
ctrl = 0
velset = 0,0
sprpriority = 1
juggle = 3

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time && random<500
value = 220,0 + random%4
channel = 0

[State 200, 1]
type = PlaySnd
trigger1 = animelem = 3
value = 420, 0

[State 0, VelSet]
type = VelSet
trigger1 = AnimElem=2
x = 7

[State 420, 3]
type = HitDef
triggerall = !IsHelper
trigger1 = AnimElem = 4
attr = S, NA
damage = ceil(ifElse(fvar(11) * 35 < 7, 7, fvar(11) * 35)), 0
hitflag = MAF
guardflag = MA
pausetime = 15,15
guard.pausetime = 13,15
sparkno = s7030
guard.sparkno = s7000
sparkxy = -20,-75
hitsound   = s420, 1
guardsound = S6,0
animtype = Up
ground.type = High
ground.slidetime = 8
ground.hittime = 14
guard.ctrltime = 14
ground.velocity = -1,-11.5
guard.velocity = -9
air.velocity = ifelse(p2movetype=H,-3,-1),ifelse(p2movetype=H,-5,-10)
fall = 1
fall.recover = 40
air.animtype = back
getpower= ifelse(p2movetype=H,40,210), 35
givepower = 35,35
yaccel = 0.45

[State 0, AttackDist]
type = AttackDist
trigger1 = AnimElemTime(5)>=0
value = 0



[State 251, Landing Sound]
type = PlaySnd
trigger1 = !AnimTime ;Jump land
value = 40, 0

[state 52, Land FX]
type = Helper
triggerall = !IsHelper
trigger1 = !AnimTime
name = "LandFX"
stateno = 17100
id = 17100
postype = P1
ownpal = 1
keyctrl = 0
supermovetime = 99999
pausemovetime = 99999

[State 221, finish]
type = ChangeState
trigger1 = AnimTime = 0
value = 11+(!NumExplod(90000001) && !NumExplod(90000002) && !NumExplod(90000003))
ctrl = 1

;---------------------------------------------------------------------------
; CROUCH LIGHT KICK
[Statedef 430]
type = C
movetype = A
physics = C
anim = 430
ctrl = 0
velset = 0,0
sprpriority = 1
juggle = 3

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time && random<200
value = 200,0 + random%4
channel = 0

[State 430, 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0, 3

[State 430, 2]
type = HitDef
triggerall = !IsHelper
triggerall = Var(1) <= 20 && Var(18) = 0 || Var(18) = 1
trigger1 = AnimElem = 3
attr = C, NA
hitflag = MAFD
guardflag = L
damage = ceil(ifElse(fvar(11) * 16 < 7, 7, fvar(11) * 16)), 0
animtype = light
pausetime = 10,10
guard.pausetime = 10,10
sparkno = s7010
guard.sparkno = s7000
sparkxy = -10,-10
hitsound   = s5,3
guardsound = s6,0
ground.type = low
ground.slidetime = 8
ground.hittime = 10
guard.ctrltime = 7
ground.velocity = -2.5  
guard.velocity = -4.5
air.velocity = -2,-5
air.animtype = back
air.hittime = 4
getpower= 40, 35
givepower = 35,35
yaccel = 0.5
ID = 1098

[State 3000, basics limiter]
type = Helper
triggerall = !IsHelper
trigger1 = !NumHelper(15999)
trigger1 = movehit
helpertype = normal
stateno = 15999
ID = 15999
name = "basics"
postype = p1
pos = 0,0
ownpal = 1

[State 0, AttackDist]
type = AttackDist
trigger1 = AnimElemTime(4)>=0
value = 0



[State 221, finish]
type = ChangeState
trigger1 = AnimTime = 0
value = 11+(!NumExplod(90000001) && !NumExplod(90000002) && !NumExplod(90000003))
ctrl = 1

;---------------------------------------------------------------------------
; CROUCH MEDIUM KICK 
[Statedef 440]
type    = C
movetype= A
physics = C
juggle  = 3
ctrl = 0
anim = 440
sprpriority = 1

[State 0, VarSet]
type = VarSet
trigger1 = !Time
fvar(3) = Vel X

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time && random<350
value = 210,3 + random%3
channel = 0

[State 440, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0, 4

[State 0, VelSet]
type = VelSet
trigger1 = AnimElem=1
x = Cond(PrevStateNo = 400 || PrevStateNo = 430,2.5,1.5+fVar(3))

[State 440, 2]
type = HitDef
triggerall = !NumTarget(440)
triggerall = !IsHelper
triggerall = Var(1) <= 20 && Var(18) = 0 || Var(18) = 1
trigger1 = AnimElem = 5
attr = C, NA
damage = ceil(ifElse(fvar(11) * 23 < 7, 7, fvar(11) * 23)), 0
animtype  = Medium
hitflag = MAFD
guardflag = L
pausetime = 12,12
guard.pausetime = 12,12
sparkno = s7020
guard.sparkno = s7000
sparkxy = -20,-10
hitsound   = s5,4
guardsound = S6,0
ground.type = Low
ground.slidetime = 1
ground.hittime  = 16
guard.ctrltime = 8
ground.velocity = -3  
guard.velocity = -6
air.velocity = -2,-1
down.velocity = -3,0
;down.hittime = 20
getpower= ifelse(p2movetype=H,40,140), 35
givepower = 35,35
fall.recover = 0
air.animtype = back
yaccel = 0.5
ID = Cond(P2StateType = L,440,1098)

[State 3000, basics limiter]
type = Helper
triggerall = !IsHelper
trigger1 = !NumHelper(15999)
trigger1 = movehit
helpertype = normal
stateno = 15999
ID = 15999
name = "basics"
postype = p1
pos = 0,0
ownpal = 1

[State 0, AttackDist]
type = AttackDist
trigger1 = AnimElemTime(6)>=0
value = 0



[State 221, finish]
type = ChangeState
trigger1 = AnimTime = 0
value = 11+(!NumExplod(90000001) && !NumExplod(90000002) && !NumExplod(90000003))
ctrl = 1

;---------------------------------------------------------------------------
; CROUCH STRONG KICK
[Statedef 450]
type = C
movetype = A
physics = C
anim = 450
ctrl = 0
velset = 0,0
sprpriority = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time && random<500
value = 220,4 + random%4
channel = 0

[State 450, 2]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0, 5

[State 450, 3]
type = HitDef
triggerall = !IsHelper
trigger1 = AnimElem = 4
attr = C, NA
animtype = Back
damage = ceil(ifElse(fvar(11) * 43 < 7, 7, fvar(11) * 43)), 0
hitflag = MAF
guardflag = L
pausetime = 13,13
guard.pausetime = 13,13
sparkno = s7030
guard.sparkno = s7000
sparkxy = -20,-10
hitsound   = s5,5
guardsound = S6,0
ground.type = Trip
ground.slidetime = 14
ground.hittime  = 18
guard.ctrltime = 18
ground.velocity = -2,-3
guard.velocity = -9
air.velocity = -3,-1
guard.velocity = -2
getpower= ifelse(p2movetype=H,40,210)
givepower = 35,35
yaccel = 0.5

[State 0, AttackDist]
type = AttackDist
trigger1 = AnimElemTime(6)>=0
value = 0

[State 221, finish]
type = ChangeState
trigger1 = AnimTime = 0
value = 11+(!NumExplod(90000001) && !NumExplod(90000002) && !NumExplod(90000003))
ctrl = 1

;---------------------------------------------------------------------------
; JUMP LIGHT PUNCH
[Statedef 600]
type = A
movetype = A
physics = A
anim = 600
ctrl = 0
sprpriority = 1
juggle = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time && random<200
value = 200,0 + random%4
channel = 0

[State 600, 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0, 0

[State 600, 2]
type = HitDef
triggerall = !IsHelper
triggerall = Vel Y >=0
triggerall = Var(1) <= 20 && Var(18) = 0 || Var(18) = 1
trigger1 = AnimElem = 3
attr = A, NA
hitflag = MAF
damage = ceil(ifElse(fvar(11) * 16 < 7, 7, fvar(11) * 16)), 0
guardflag = HA
animtype = Light
pausetime = 9,11
guard.pausetime = 12,10
sparkno = s7010
guard.sparkno = s7000
sparkxy = -10,-70
hitsound   = s5,0
guardsound = S6,0
ground.type = High
ground.slidetime = 8
ground.hittime  = 15
ground.velocity = -3
guard.ctrltime = 8 
air.velocity = -2,-4
airguard.cornerpush.veloff= 0
getpower= 40, 35
givepower = 35,35
yaccel = 0.5
fall = (numhelper(15999) || NumExplod(52)=3)

[State 600, 2]
type = HitDef
triggerall = !IsHelper
triggerall = Vel Y <0
triggerall = Var(1) <= 20 && Var(18) = 0 || Var(18) = 1
trigger1 = AnimElem = 3
attr = A, NA
hitflag = MAF
damage = ceil(ifElse(fvar(11) * 16 < 7, 7, fvar(11) * 16)), 0
guardflag = MA
animtype = Light
pausetime = 9,11
guard.pausetime = 12,10
sparkno = s7010
guard.sparkno = s7000
sparkxy = -10,-70
hitsound   = s5,0
guardsound = S6,0
ground.type = High
ground.slidetime = 8
ground.hittime  = 15
guard.ctrltime = 14 
ground.velocity = -3
air.velocity = -2,-4
airguard.cornerpush.veloff= 0
getpower= 40, 35
givepower = 35,35
yaccel = 0.5
fall = (numhelper(15999) || NumExplod(52)=3)

;juggle limit LVL2
[State 0, VarAdd]
type = VarAdd
trigger1 = MoveHit = 1
trigger1 = P2StateType = A
var(1) = 2

[State 0, AttackDist]
type = AttackDist
trigger1 = AnimElemTime(4)>=0
value = 0

[State 3000, basics limiter]
type = Helper
triggerall = !IsHelper
trigger1 = !NumHelper(15999)
trigger1 = movehit
helpertype = normal
stateno = 15999
ID = 15999
name = "basics"
postype = p1
pos = 0,0
ownpal = 1



[State 1400, EndState]
type = ChangeState
trigger1 = !animtime
value = 50 ;ifelse(vel X >= 0,50,116)
ctrl = 1

;---------------------------------------------------------------------------
; JUMP MEDIUM PUNCH
[Statedef 610]
type = A
movetype = A
physics = A
juggle = 2
ctrl = 0
anim = 610
sprpriority = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time && random<350
value = 210,0 + random%3
channel = 0

[State 610, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0, 1

[State 610, 2]
type = HitDef
triggerall = !IsHelper
triggerall = Vel Y >=0
triggerall = Var(1) <= 20 && Var(18) = 0 || Var(18) = 1
trigger1 = AnimElem = 4
attr = A, NA
damage = ceil(ifElse(fvar(11) * 25 < 7, 7, fvar(11) * 25)), 0
guardflag = HA
hitflag = MAF
animtype  = Medium
pausetime = 11,15
guard.pausetime = 16,14
sparkno = s7020
guard.sparkno = s7000
sparkxy = -10,-70
hitsound   = s5,1
guardsound = S6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
guard.ctrltime = 7 
ground.velocity = -4   
air.velocity = -2,-4
airguard.cornerpush.veloff= 0
getpower= ifelse(p2movetype=H,40,140), 35
givepower = 35,35
yaccel = 0.5
fall = (numhelper(15999) || prevstateno=600 || prevstateno=630 || NumExplod(52)=3)

[State 610, 2]
type = HitDef
triggerall = !IsHelper
triggerall = Vel Y <0
triggerall = Var(1) <= 20 && Var(18) = 0 || Var(18) = 1
trigger1 = AnimElem = 4
attr = A, NA
damage = ceil(ifElse(fvar(11) * 25 < 7, 7, fvar(11) * 25)), 0
guardflag = MA
hitflag = MAF
animtype  = Medium
pausetime = 11,15
guard.pausetime = 16,14
sparkno = s7020
guard.sparkno = s7000
sparkxy = -10,-70
hitsound   = s5,1
guardsound = S6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
guard.ctrltime = 7 
ground.velocity = -4   
air.velocity = -2,-4
airguard.cornerpush.veloff= 0
getpower= ifelse(p2movetype=H,40,140), 35
givepower = 35,35
yaccel = 0.5
fall = (numhelper(15999) || prevstateno=600 || prevstateno=630 || NumExplod(52)=3)

;juggle limit LVL2
[State 0, VarAdd]
type = VarAdd
trigger1 = MoveHit = 1
trigger1 = P2StateType = A
var(1) = 2

[State 0, AttackDist]
type = AttackDist
trigger1 = AnimElemTime(5)>=0
value = 0



[State 1400, EndState]
type = ChangeState
trigger1 = !animtime
value = 50 ;ifelse(vel X >= 0,50,116)
ctrl = 1

;---------------------------------------------------------------------------
; JUMP STRONG PUNCH 
[Statedef 620]
type = A
movetype = A
physics = A
anim = 620
ctrl = 0
sprpriority = 1
juggle = 2

[State 0, TargetDrop]
type = TargetDrop
trigger1 = NumTarget(620)
trigger1 = !Time

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time && random<500
value = 220,0 + random%4
channel = 0

[State 620, 2]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0, 2

    [State 200, Time Offset]
    type = VarSet
    trigger1 = moveContact = 1
    var(15) = Time
    ignorehitpause = 1
    persistent = 0

    [State 200, Play Anim]
    type = ChangeAnim
    triggerall = AnimElemTime(5) >= 0 && AnimElemTime(6) <= 0
    trigger1 = hitPauseTime = [1,16 - (11 - var(15))]
    value = anim
    elem = 6
    ignorehitpause = 1

[State 620, 3]
type = HitDef
triggerall = !IsHelper
triggerall = Vel Y >=0
triggerall = Var(1) <= 20 && Var(18) = 0 || Var(18) = 1
triggerall = !NumTarget(620)
trigger1 = AnimElemTime(5)>=0
trigger1 = P2Dist X >=0
attr = A, NA
damage = ceil(ifElse(fvar(11) * 41 < 7, 7, fvar(11) * 41)), 0
hitflag = MAF
guardflag = HA
animtype = Hard
pausetime = 16,16
sparkno = s7030
guard.sparkno = s7000
sparkxy = -30,-50
hitsound   = s620,0
guardsound = S6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
air.velocity = -7,-3
envshake.time = 12
envshake.freq = 60
envshake.ampl = 3
airguard.cornerpush.veloff= 0
air.animtype = Back
fall.animtype = Back
getpower= ifelse(p2movetype=H,40,140), 35
givepower = 35,35
yaccel = 0.5
fall = (numhelper(15999) || prevstateno=600 || prevstateno=630 || prevstateno=610 || prevstateno=640 || NumExplod(52)=3)
air.fall = 1
fall.recover = 0
persistent = 0
id = 620

[State 620, 3]
type = HitDef
triggerall = !IsHelper
triggerall = Vel Y <0
triggerall = Var(1) <= 20 && Var(18) = 0 || Var(18) = 1
triggerall = !NumTarget(620)
trigger1 = AnimElemTime(5)>=0
trigger1 = P2Dist X >=0
attr = A, NA
damage = ceil(ifElse(fvar(11) * 41 < 7, 7, fvar(11) * 41)), 0
hitflag = MAF
guardflag = MA
animtype = Hard
pausetime = 16,16
sparkno = s7030
guard.sparkno = s7000
sparkxy = -30,-50
hitsound   = s620,0
guardsound = S6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
air.velocity = -7,-3
envshake.time = 12
envshake.freq = 60
envshake.ampl = 3
airguard.cornerpush.veloff= 0
air.animtype = Back
fall.animtype = Back
getpower= ifelse(p2movetype=H,40,140), 35
givepower = 35,35
yaccel = 0.5
fall = (numhelper(15999) || prevstateno=600 || prevstateno=630 || prevstateno=610 || prevstateno=640 || NumExplod(52)=3)
air.fall = 1
fall.recover = 0
persistent = 0
id = 620

[State 620, 3]
type = HitDef
triggerall = !IsHelper
triggerall = Vel Y >=0
triggerall = Var(1) <= 20 && Var(18) = 0 || Var(18) = 1
triggerall = !NumTarget(620)
trigger1 = AnimElemTime(5)<0
trigger1 = P2Dist X <0
attr = A, NA
damage = ceil(ifElse(fvar(11) * 38 < 7, 7, fvar(11) * 38)), 0
hitflag = MAF
guardflag = HA
animtype = Hard
pausetime = 16,16
sparkno = s7030
guard.sparkno = s7000
sparkxy = -30,-50
hitsound   = s5,5
guardsound = S6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = 5
air.velocity = 7,-1
envshake.time = 12
envshake.freq = 60
envshake.ampl = 3
airguard.cornerpush.veloff= 0
air.animtype = Back
fall.animtype = Back
getpower= ifelse(p2movetype=H,40,140), 35
givepower = 35,35
yaccel = 0.5
fall = (numhelper(15999) || prevstateno=600 || prevstateno=630 || prevstateno=610 || prevstateno=640 || NumExplod(52)=3)
air.fall = 1
fall.recover = 0
persistent = 0
id = 620

[State 620, 3]
type = HitDef
triggerall = !IsHelper
triggerall = Vel Y <0
triggerall = Var(1) <= 20 && Var(18) = 0 || Var(18) = 1
triggerall = !NumTarget(620)
trigger1 = AnimElemTime(5)>=0
trigger1 = P2Dist X <0
attr = A, NA
damage = ceil(ifElse(fvar(11) * 38 < 7, 7, fvar(11) * 38)), 0
hitflag = MAF
guardflag = MA
animtype = Hard
pausetime = 16,16
sparkno = s7030
guard.sparkno = s7000
sparkxy = -30,-50
hitsound   = s5,5
guardsound = S6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = 5
air.velocity = 7,-1
envshake.time = 12
envshake.freq = 60
envshake.ampl = 3
airguard.cornerpush.veloff= 0
air.animtype = Back
fall.animtype = Back
getpower= ifelse(p2movetype=H,40,140), 35
givepower = 35,35
yaccel = 0.5
fall = (numhelper(15999) || prevstateno=600 || prevstateno=630 || prevstateno=610 || prevstateno=640 || NumExplod(52)=3)
air.fall = 1
fall.recover = 0
persistent = 0
id = 620

;juggle limit LVL2
[State 0, VarAdd]
type = VarAdd
trigger1 = MoveHit = 1
trigger1 = P2StateType = A
var(1) = 2

[State 0, AttackDist]
type = AttackDist
trigger1 = AnimElemTime(6)>=0
value = 0



[State 1400, EndState]
type = ChangeState
trigger1 = !animtime
value = 50 ;ifelse(vel X >= 0,50,116)
ctrl = 0

;---------------------------------------------------------------------------
; JUMP LIGHT KICK
[Statedef 630]
type = A
movetype = A
physics = A
anim = 630
ctrl = 0
sprpriority = 1
juggle = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time && random<200
value = 200,0 + random%4
channel = 0

[State 630, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = 0, 3
persistent = 0

[State 630, 2]
type = HitDef
triggerall = !IsHelper
triggerall = Vel Y >=0
triggerall = Var(1) <= 20 && Var(18) = 0 || Var(18) = 1
trigger1 = AnimElem = 3
attr = A, NA
damage = ceil(ifElse(fvar(11) * 20 < 7, 7, fvar(11) * 20)), 0
hitflag = MAF
guardflag = HA
animtype = Light
pausetime = 9,11
guard.pausetime = 12,10
sparkno = s7010
guard.sparkno = s7000
sparkxy = -10,-50
hitsound = s5,3
guardsound = S6,0
ground.type = High
ground.slidetime = 8  
ground.hittime  = 15
guard.ctrltime = 14
ground.velocity = -3  
air.velocity = -2,-3
airguard.cornerpush.veloff= 0
getpower= 40, 35
givepower = 35,35
yaccel = 0.5
fall = (numhelper(15999) || NumExplod(52)=3)
persistent = 0

[State 630, 2]
type = HitDef
triggerall = !IsHelper
triggerall = Vel Y <0
triggerall = Var(1) <= 20 && Var(18) = 0 || Var(18) = 1
trigger1 = AnimElem = 3
attr = A, NA
damage = ceil(ifElse(fvar(11) * 20 < 7, 7, fvar(11) * 20)), 0
hitflag = MAF
guardflag = MA
animtype = Light
pausetime = 9,11
guard.pausetime = 12,10
sparkno = s7010
guard.sparkno = s7000
sparkxy = -10,-50
hitsound = s5,3
guardsound = S6,0
ground.type = High
ground.slidetime = 8  
ground.hittime  = 15
guard.ctrltime = 14
ground.velocity = -3  
air.velocity = -2,-3
airguard.cornerpush.veloff= 0
getpower= 40, 35
givepower = 35,35
yaccel = 0.5
fall = (numhelper(15999) || NumExplod(52)=3)
persistent = 0

;juggle limit LVL2
[State 0, VarAdd]
type = VarAdd
trigger1 = MoveHit = 1
trigger1 = P2StateType = A
var(1) = 2

[State 0, AttackDist]
type = AttackDist
trigger1 = AnimElemTime(5)>=0
value = 0



[State 1400, EndState]
type = ChangeState
trigger1 = !animtime
value = 50
ctrl = 1

;---------------------------------------------------------------------------
; JUMP MEDIUM KICK
[Statedef 640]
type    = A
movetype = A
physics = A
juggle = 2
ctrl = 0
anim = 640
sprpriority = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time && random<350
value = 210,3 + random%3
channel = 0

[State 640, 1]
type = PlaySnd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 6
value = 0, 4

[State 640, 2]
type = HitDef
triggerall = !IsHelper
triggerall = Vel Y >=0
triggerall = Var(1) <= 20 && Var(18) = 0 || Var(18) = 1
trigger1 = AnimElem = 4
attr = A, NA
damage = ceil(ifElse(fvar(11) * 16 < 7, 7, fvar(11) * 16)), 0
guardflag = HA
hitflag = MAF
animtype  = Medium
sparkno = s7020
guard.sparkno = s7000
sparkxy = -30,-90
hitsound   = s5,4
guardsound = S6,0
ground.type = High
pausetime = 5,15
guard.pausetime = 11,12
ground.slidetime = 8
ground.hittime = 15
ground.velocity = -4  ;-8
air.velocity = -2,-2
getpower= ifelse(p2movetype=H,40,140), 35
givepower = 35,35
yaccel = 0.5
fall = (numhelper(15999) || prevstateno=600 || prevstateno=630 || NumExplod(52)=3)

[State 640, 2]
type = HitDef
triggerall = !IsHelper
triggerall = Vel Y <0
triggerall = Var(1) <= 20 && Var(18) = 0 || Var(18) = 1
trigger1 = AnimElem = 4
attr = A, NA
damage = ceil(ifElse(fvar(11) * 16 < 7, 7, fvar(11) * 16)), 0
guardflag = MA
hitflag = MAF
animtype  = Medium
sparkno = s7020
guard.sparkno = s7000
sparkxy = -30,-90
hitsound   = s5,4
guardsound = S6,0
ground.type = High
pausetime = 5,15
guard.pausetime = 11,12
ground.slidetime = 8
ground.hittime = 15
ground.velocity = -4  ;-8
air.velocity = -2,-2
getpower= ifelse(p2movetype=H,40,140), 35
givepower = 35,35
yaccel = 0.5
fall = (numhelper(15999) || prevstateno=600 || prevstateno=630 || NumExplod(52)=3)

[State 640, 2]
type = HitDef
triggerall = !IsHelper
triggerall = Vel Y >=0
triggerall = Var(1) <= 20 && Var(18) = 0 || Var(18) = 1
trigger1 = AnimElem = 7
attr = A, NA
damage = ceil(ifElse(fvar(11) * 20 < 7, 7, fvar(11) * 20)), 0
guardflag = HA
hitflag = MAF
animtype  = Medium
sparkno = s7020
guard.sparkno = s7000
sparkxy = -20,-70
hitsound   = s5,4
guardsound = S6,0
ground.type = High
pausetime = 11,15
guard.pausetime = 11,12
ground.slidetime = 8
ground.hittime = 15
ground.velocity = -4  ;-8
air.velocity = -2,-2
getpower= ifelse(p2movetype=H,40,140), 35
givepower = 35,35
yaccel = 0.5
fall = (numhelper(15999) || prevstateno=600 || prevstateno=630 || NumExplod(52)=3)

[State 640, 2]
type = HitDef
triggerall = !IsHelper
triggerall = Vel Y <0
triggerall = Var(1) <= 20 && Var(18) = 0 || Var(18) = 1
trigger1 = AnimElem = 7
attr = A, NA
damage = ceil(ifElse(fvar(11) * 20 < 7, 7, fvar(11) * 20)), 0
guardflag = MA
hitflag = MAF
animtype  = Medium
sparkno = s7020
guard.sparkno = s7000
sparkxy = -20,-70
hitsound   = s5,4
guardsound = S6,0
ground.type = High
pausetime = 11,15
guard.pausetime = 11,12
ground.slidetime = 8
ground.hittime = 15
ground.velocity = -4  ;-8
air.velocity = -2,-2
getpower= ifelse(p2movetype=H,40,140), 35
givepower = 35,35
yaccel = 0.5
fall = (numhelper(15999) || prevstateno=600 || prevstateno=630 || NumExplod(52)=3)

;juggle limit LVL2
[State 0, VarAdd]
type = VarAdd
trigger1 = MoveHit = 1
trigger1 = P2StateType = A
var(1) = 2

[State 0, AttackDist]
type = AttackDist
trigger1 = AnimElemTime(8)>=0
value = 0



[State 1400, EndState]
type = ChangeState
trigger1 = !animtime
value = 50 ;ifelse(vel X >= 0,50,116)
ctrl = 1

;---------------------------------------------------------------------------
; JUMP STRONG KICK
[Statedef 650]
type = A
movetype = A
physics = A
anim = 650
ctrl = 0
sprpriority = 1
juggle = 2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !Time && random<500
value = 220,4 + random%4
channel = 0

[State 650, 2]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0, 5

    [State 200, Time Offset]
    type = VarSet
    trigger1 = moveContact = 1
    var(15) = Time
    ignorehitpause = 1
    persistent = 0

    [State 200, Play Anim]
    type = ChangeAnim
    triggerall = AnimElemTime(5) >= 0 && AnimElemTime(6) <= 0
    trigger1 = hitPauseTime = [1,16 - (10 - var(15))]
    value = anim
    elem = 6
    ignorehitpause = 1

[State 650, 3]
type = HitDef
triggerall = !IsHelper
triggerall = Vel Y >=0
triggerall = Var(1) <= 20 && Var(18) = 0 || Var(18) = 1
triggerall = p2statetype != A
trigger1 = AnimElem = 5
attr = A, NA
damage = ceil(ifElse(fvar(11) * 40 < 7, 7, fvar(11) * 40)), 0
hitflag = MAF
guardflag = HA
animtype = Hard
pausetime = 16,16
sparkno = s7030
guard.sparkno = s7000
sparkxy = -30,-55
hitsound   = s5,5
guardsound = S6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
air.velocity = -6,8
envshake.time = 12
envshake.freq = 60
envshake.ampl = 3
fall = 1
fall.recover = 0
p2facing = 1
airguard.cornerpush.veloff= 0
air.animtype = Back
fall.animtype = Back
getpower= ifelse(p2movetype=H,40,140), 35
givepower = 35,35
yaccel = 0.5
fall = (numhelper(15999) || NumExplod(52)=3)

[State 650, 3]
type = HitDef
triggerall = !IsHelper
triggerall = Vel Y <0
triggerall = Var(1) <= 20 && Var(18) = 0 || Var(18) = 1
triggerall = p2statetype != A
trigger1 = AnimElem = 5
attr = A, NA
damage = ceil(ifElse(fvar(11) * 40 < 7, 7, fvar(11) * 40)), 0
hitflag = MAF
guardflag = MA
animtype = Hard
pausetime = 16,16
sparkno = s7030
guard.sparkno = s7000
sparkxy = -30,-55
hitsound   = s5,5
guardsound = S6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
air.velocity = -6,8
envshake.time = 12
envshake.freq = 60
envshake.ampl = 3
fall = 1
fall.recover = 0
p2facing = 1
airguard.cornerpush.veloff= 0
air.animtype = Back
fall.animtype = Back
getpower= ifelse(p2movetype=H,40,140), 35
givepower = 35,35
yaccel = 0.5
fall = (numhelper(15999) || NumExplod(52)=3)

[State 650, 3]
type = HitDef
triggerall = !IsHelper
triggerall = Vel Y >=0
triggerall = Var(1) <= 20 && Var(18) = 0 || Var(18) = 1
triggerall = p2statetype = A 
trigger1 = AnimElem = 5
attr = A, NA
damage = ceil(ifElse(fvar(11) * 40 < 7, 7, fvar(11) * 40)), 0
hitflag = MAF
guardflag = HA
animtype = Hard
pausetime = 16,16
sparkno = s7030
guard.sparkno = s7000
sparkxy = -30,-55
hitsound   = s5,5
guardsound = S6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
air.velocity = -2,10
envshake.time = 12
envshake.freq = 60
envshake.ampl = 3
fall = 1
fall.recover = 0
p2facing = 1
airguard.cornerpush.veloff= 0
air.animtype = Back
fall.animtype = Back
getpower= ifelse(p2movetype=H,40,140), 35
givepower = 35,35
yaccel = 0.5
fall = (numhelper(15999) || NumExplod(52)=3)
id = 650

[State 650, 3]
type = HitDef
triggerall = !IsHelper
triggerall = Vel Y <0
triggerall = Var(1) <= 20 && Var(18) = 0 || Var(18) = 1
triggerall = p2statetype = A 
trigger1 = AnimElem = 5
attr = A, NA
damage = ceil(ifElse(fvar(11) * 40 < 7, 7, fvar(11) * 40)), 0
hitflag = MAF
guardflag = MA
animtype = Hard
pausetime = 16,16
sparkno = s7030
guard.sparkno = s7000
sparkxy = -30,-55
hitsound   = s5,5
guardsound = S6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
air.velocity = -2,10
envshake.time = 12
envshake.freq = 60
envshake.ampl = 3
fall = 1
fall.recover = 0
p2facing = 1
airguard.cornerpush.veloff= 0
air.animtype = Back
fall.animtype = Back
getpower= ifelse(p2movetype=H,40,140), 35
givepower = 35,35
yaccel = 0.5
fall = (numhelper(15999) || NumExplod(52)=3)
id = 650

[State 620, Only once - explod] ;only once
type = Explod
triggerall = NumTarget
triggerall = !NumExplod(650)
trigger1 = MoveHit && Target,StateNo = 651
anim = 1	;blank anim
ID = 650
removeongethit = 1
ignorehitpause = 1
removetime = -1

[State 0, TargetState]
type = TargetState
triggerall = !NumExplod(650)
triggerall = NumTarget(650);()
trigger1 = MoveHit = 1 
value = 651
persistent = 0
ignorehitpause = 1

;juggle limit LVL2
[State 0, VarAdd]
type = VarAdd
trigger1 = MoveHit = 1
trigger1 = P2StateType = A
var(1) = 2

[State 0, AttackDist]
type = AttackDist
trigger1 = AnimElemTime(7)>=0
value = 0



[State 1400, EndState]
type = ChangeState
trigger1 = !animtime
value = 50 ;ifelse(vel X >= 0,50,116)
ctrl = 0

;===========================================================================
; <<<<< FORWARD THROW >>>>>
; Grab state : 800
; Gotenks throws : 801
; P2 Throw State : 802
;===========================================================================
;-------------------------------------------------------------------------------

;Forward Throw (Grab)
[Statedef 800]
type = S
movetype = A
physics = S
juggle = 15
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 1
facep2 = 1
poweradd = 0

[State 810, Don't Guard]
type = attackdist
trigger1 = 1
value = 0

[State 0, NotHitBy]
type = NotHitBy
trigger1 = MoveHit = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 15

[State 810, hit]
type = HitDef
triggerall = !IsHelper
trigger1 = Var(0)=0 || enemy, AuthorName != "Team Z2";NEW
trigger1 = animelem=4 && !var(38)
attr = S,NT
hitflag = M-
priority = 1,Miss
sparkno = -1
p1facing = 1
p2facing = 1
guard.dist = 0
fall = 1
fall.recover = 0
hitsound = s800,1
NumHits = 0
id = 802

[State 810, hit]
type = HitDef
triggerall = !IsHelper
trigger1 = animelem=4 && !var(38)
trigger1 = Var(0)>0 ;NEW
attr = S,NT
hitflag = M-
priority = 1,Miss
sparkno = -1
p1facing = 1
p2facing = 1
guard.dist = 0
fall = 1
fall.recover = 0
hitsound = s800,1
id = Cond((enemynear, NumExplod(98000000)),800,801);NEW
NumHits = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = MoveHit
value = Anim
elem = 4 ; change this to animelemno of grab you wish frozen
ignorehitpause = 1
persistent = 0 ;

[State 0, TargetState]
type = TargetState
trigger1 = MoveHit =1
trigger1 = NumTarget(800)
trigger1 = target, StateNo != [800,899]
trigger1 = target, AuthorName = "Team Z2"
value = 899
ignorehitpause = 1
 
[State 0, ChangeState]
type = ChangeState
trigger1 = Var(0)=2
trigger1 = NumTarget(800)
trigger1 = target, time<=5
trigger1 = target, StateNo = 5949
value = 5940
ignorehitpause = 1
persistent = 0
 
[State 0, ChangeState]
type = ChangeState
trigger1 = Var(0)=1
trigger1 = enemynear, StateNo = 950
value = 950
ignorehitpause = 1
persistent = 0
 
[State 0, ChangeState]
type = ChangeState
trigger1 = NumTarget(800)
trigger1 = target, time>=6
trigger1 = target, StateNo = 899
trigger2 = !NumTarget(800) || (NumTarget(800) && enemy, AuthorName != "Team Z2")
trigger2 = MoveHit=1
value = 801
ignorehitpause = 1
persistent = 0

[State 810, 1]
type = PlaySnd
trigger1 = animelem = 5
value = 0, 1

[State 810, missed voice]
type = PlaySnd
trigger1 = animelem = 5
value = 5000,6
channel = 0

[State 0, AttackDist]
type = AttackDist
trigger1 = AnimElemTime(5)>=0
value = 0

[State 810, end]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1

;----------------------------
;FWD Throw
[Statedef 801]
type = S
movetype = A
physics = N
anim = 801
ctrl = 0
sprpriority = 1

[State 0, CtrlSet]
type = CtrlSet
;trigger1 = !NumTarget(800)
;trigger1 = !NumTarget(801)
;trigger1 = !NumTarget(802)
;trigger1 = !NumTarget(830)
;trigger1 = !NumProjID(800)
trigger1 = Var(39) = 2
value = 1

[State 0, VarSet]
type = VarSet
triggerall = Var(39) != 2
trigger1 = NumTarget(800)
trigger2 = NumTarget(801)
trigger3 = NumTarget(802)
trigger4 = NumTarget(830)
;trigger5 = NumProjID(800)
var(39) = 1

[State 0, VarSet]
type = VarSet
trigger1 = !NumTarget(800)
trigger1 = !NumTarget(801)
trigger1 = !NumTarget(802)
trigger1 = !NumTarget(830)
;trigger1 = !NumProjID(800)
var(39) = 2

[State 0, PosAdd]
type = PosAdd
triggerall = AnimElemTime(4)<0
trigger1 = Enemy, BackEdgeBodyDist <= 30
x = -5

[State 220, snd]
type = playsnd
trigger1 = !time
value = 200,0+random%4
channel = 0
volumescale = 300

[State Throw]
type = targetstate
trigger1 = !time
value = 802

[State 820, 1]
type = TargetBind
trigger1 = !Time 
pos = ceil(38 * const(size.xScale)),0

[State 810, power]
type = poweradd
trigger1 = Time = 1
value = 180

[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 3
x = 0
y = -8

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 3
statetype = A       ;S,A,C,L

[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 5
x = 0
y = -1
[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 6
x = 0
y = -.5
[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 7
x = 0
y = 0

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

[State 0, PosSet]
type = PosSet
trigger1 = AnimElemTime(9)>=0
trigger1 = Pos Y >0
y = 0

[State 810, end]
type = changestate
trigger1 = AnimElemTime(9)>=0
trigger1 = Pos Y >=0
value = 52
ctrl = 0

[State 650, 3]
type = HitDef
triggerall = !IsHelper
trigger1 = AnimElem = 9
attr = A, NA
damage = 20
hitflag = MAF
;guardflag = HA
animtype = Hard
pausetime = 1,16
sparkno = s7030
guard.sparkno = s7000
sparkxy = -30,-55
hitsound   = s5,5
guardsound = S6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
air.velocity = -6,8
envshake.time = 12
envshake.freq = 60
envshake.ampl = 3
fall = 0
kill = 0
fall.recover = 0
p2facing = 1
airguard.cornerpush.veloff= 0
air.animtype = Back
fall.animtype = Back
yaccel = 0.5
id = 830
givepower = 35,35

[State 0, VelSet]
type = VelSet
trigger1 = MoveHit = 1
x = -.5
y = -.7


[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 8
value = 804,0
channel = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 19
value = 803,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 19
value = 804,1
channel = 0

[State 0, Helper]
type = Helper
trigger1 = AnimElem = 19
trigger2 = AnimElem = 22
trigger3 = AnimElem = 25
trigger4 = AnimElem = 28
trigger5 = AnimElem = 31
trigger6 = AnimElem = 34
trigger7 = AnimElem = 37
trigger8 = AnimElem = 40
name = "Throw Ki"
ID = 803
stateno = 803
pos = 50,-40
postype = P1    ;P2, Front, Back, Left, Right
ownpal = 1

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 44
physics = A       ;S,A,C,L


;----------------------------
;DC FWD Throw
[Statedef 804]
type = S
movetype = A
physics = N
anim = 801
ctrl = 0
sprpriority = 1

[State 0, PosAdd]
type = PosAdd
triggerall = !Time
trigger1 = Enemy, BackEdgeBodyDist <= 2
x = -40


[State Throw]
type = targetstate
trigger1 = !time
value = 802

[State 820, 1]
type = TargetBind
trigger1 = !Time 
pos = ceil(38 * const(size.xScale)),0

[State 810, power]
type = poweradd
trigger1 = Time = 1
value = 180

[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 3
x = 0
y = -8

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 3
statetype = A       ;S,A,C,L

[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 5
x = 0
y = -1
[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 6
x = 0
y = -.5
[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 7
x = 0
y = 0

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

[State 0, PosSet]
type = PosSet
trigger1 = AnimElemTime(9)>=0
trigger1 = Pos Y >0
y = 0

[State 810, end]
type = changestate
trigger1 = AnimElemTime(9)>=0
trigger1 = Pos Y >=0
value = 52
ctrl = 0

[State 650, 3]
type = HitDef
triggerall = !IsHelper
trigger1 = AnimElem = 9
attr = A, NA
damage = 20
hitflag = MAF
;guardflag = HA
animtype = Hard
pausetime = 1,16
sparkno = s7030
guard.sparkno = s7000
sparkxy = -30,-55
hitsound   = s5,5
guardsound = S6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
air.velocity = -6,8
envshake.time = 12
envshake.freq = 60
envshake.ampl = 3
fall = 0
fall.recover = 0
p2facing = 1
airguard.cornerpush.veloff= 0
air.animtype = Back
fall.animtype = Back
yaccel = 0.5
id = 830
givepower = 35,35

[State 0, VelSet]
type = VelSet
trigger1 = MoveHit = 1
x = -.5
y = -.7

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 19
value = 803,0

[State 0, Helper]
type = Helper
trigger1 = AnimElem = 19
trigger2 = AnimElem = 22
trigger3 = AnimElem = 25
trigger4 = AnimElem = 28
trigger5 = AnimElem = 31
trigger6 = AnimElem = 34
trigger7 = AnimElem = 37
trigger8 = AnimElem = 40
name = "Throw Ki"
ID = 803
stateno = 803
pos = 50,-40
postype = P1    ;P2, Front, Back, Left, Right
ownpal = 1

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = !AnimTime
physics = A       ;S,A,C,L

[State 810, end]
type = changestate
trigger1 = !animtime
value = 50
ctrl = 1

;----------------------------
;P2 Hit by forward Throw
[Statedef 802]
type = S
movetype = H
physics = N
ctrl = 0
sprpriority = 1

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 802

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

[State 0, ChangeState]
type = SelfState
trigger1 = Time = 60
value = 0
ctrl = 1

;===========================================================================
; <<<<< REVERSE THROW >>>>>
; Grab state : 810
; Gotenks throws : 811
; P2 thrown state : 815
;===========================================================================
;-------------------------------------------------------------------------------

;Reverse Throw (Grab)
[Statedef 810]
type = S
movetype = A
physics = S
juggle = 15
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 1
facep2 = 1
poweradd = 0

[State 810, Don't Guard]
type = attackdist
trigger1 = 1
value = 0

[State 0, NotHitBy]
type = NotHitBy
trigger1 = MoveHit = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 15

[State 810, hit]
type = HitDef
triggerall = !IsHelper
trigger1 = Var(0)=0 || enemy, AuthorName != "Team Z2";NEW
trigger1 = animelem=4 && !var(38)
attr = S,NT
hitflag = M-
priority = 1,Miss
sparkno = -1
p1facing = 1
p2facing = 1
guard.dist = 0
fall = 0
fall.recover = 0
hitsound = s800,1
numhits = 0

[State 810, hit]
type = HitDef
triggerall = !IsHelper
trigger1 = animelem=4 && !var(38)
trigger1 = Var(0)>0 ;NEW
attr = S,NT
hitflag = M-
priority = 1,Miss
sparkno = -1
p1facing = 1
p2facing = 1
guard.dist = 0
fall = 0
fall.recover = 0
hitsound = s800,1
id = Cond((enemynear, NumExplod(98000000)),800,801);NEW\
numhits = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = MoveHit
value = Anim
elem = 4 ; change this to animelemno of grab you wish frozen
ignorehitpause = 1
persistent = 0 ;

[State 0, TargetState]
type = TargetState
trigger1 = MoveHit =1
trigger1 = NumTarget(800)
trigger1 = target, StateNo != [800,899]
trigger1 = target, AuthorName = "Team Z2"
value = 899
ignorehitpause = 1
 
[State 0, ChangeState]
type = ChangeState
trigger1 = Var(0)=2
trigger1 = NumTarget(800)
trigger1 = target, time<=5
trigger1 = target, StateNo = 5949
value = 5940
ignorehitpause = 1
persistent = 0
 
[State 0, ChangeState]
type = ChangeState
trigger1 = Var(0)=1
trigger1 = enemynear, StateNo = 950
value = 950
ignorehitpause = 1
persistent = 0
 
[State 0, ChangeState]
type = ChangeState
trigger1 = NumTarget(800)
trigger1 = target, time>=6
trigger1 = target, StateNo = 899
trigger2 = !NumTarget(800) || (NumTarget(800) && enemy, AuthorName != "Team Z2")
trigger2 = MoveHit=1
value = 811
ignorehitpause = 1
persistent = 0

[State 810, 1]
type = PlaySnd
trigger1 = animelem = 5
value = 0, 1

[State 810, missed voice]
type = PlaySnd
trigger1 = animelem = 5
value = 5000,6
channel = 0

[State 0, AttackDist]
type = AttackDist
trigger1 = AnimElemTime(5)>=0
value = 0

[State 810, end]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1

;----------------------------
;Back Throw
[Statedef 811]
type = S
movetype = A
physics = N
anim = 811
ctrl = 0
sprpriority = 2

[State 0, CtrlSet]
type = CtrlSet
trigger1 = !NumTarget
trigger1 = AnimElemTime(14)>0
value = 1

[State 0, PosAdd]
type = PosAdd
triggerall = AnimElem = 12
trigger1 = Enemy, BackEdgeBodyDist <= 12
x = -40

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 4
value = 1000,6

[State 220, snd]
type = playsnd
trigger1 = !time
value = 200,0+random%4
channel = 0
volumescale = 300

  [State 210, 1]
type = PlaySnd
trigger1 = animelemtime(5) = 0
value = 0, 0

[State 210, 1]
type = PlaySnd
trigger1 = animelemtime(13) = 0
value = 210, 0+random%5
channel = 0
[State 210, 1]
type = PlaySnd
trigger1 = animelemtime(14) = 0
value = 0, 2

[State 210, 1]
type = PlaySnd
trigger1 = animelemtime(29) = 0
value = 220, 0+random%7
channel = 0
[State 210, 1]
type = PlaySnd
trigger1 = animelemtime(30) = 0
value = 0, 5

[State Throw]
type = targetstate
trigger1 = !time
value = 812

[State 820, 1]
type = TargetBind
trigger1 = !Time 
pos = ceil(38 * const(size.xScale)),0

[State 810, power]
type = poweradd
trigger1 = Time = 1
value = 180

[State 0, PosAdd]
type = PosAdd
trigger1 = AnimElem = 13
x = 80
;y = -40

[State 0, PosSet]
type = PosSet
trigger1 = AnimElem = 13
y = enemy, const(size.head.pos.y)+50


[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 13
x = -3

[State 0, VelSet]
type = VelSet
trigger1 = MoveHit
x = 0

[State 0, Turn]
type = Turn
trigger1 = AnimElem = 13

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 13
statetype = A       ;S,A,C,L

[State 650, 3]
type = HitDef
triggerall = !IsHelper
trigger1 = AnimElem = 15
attr = A, NA
damage = 20
hitflag = MAF
;guardflag = HA
animtype = Hard
pausetime = 1,16
sparkno = s7030
guard.sparkno = s7000
sparkxy = -30,-55
hitsound   = s5,2
guardsound = S6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
air.velocity = -6,8
envshake.time = 12
envshake.freq = 60
envshake.ampl = 3
kill = 0
fall = 0
fall.recover = 0
p2facing = 1
airguard.cornerpush.veloff= 0
air.animtype = Back
fall.animtype = Back
yaccel = 0.5
id = 831
givepower = 35,35

[State 0, HitDef]
type = HitDef
triggerall = !IsHelper
trigger1 = AnimElem = 32
attr = A,SA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = HA         ;HLA
animtype = hard         ;light,medium,hard,back,up,diagup
air.animtype = hard
damage = 30
pausetime = 12 ,12
sparkno = S7030
guard.sparkno = S7000
sparkxy = -20,-50
hitsound = S1020,0
guardsound = S7000,0
ground.type = High      ;Low,Trip,None
ground.slidetime = 10
ground.hittime = 15
air.hittime = 20
ground.velocity = -5,-6
guard.velocity = -4
air.velocity = -1,-11.5
airguard.velocity = -2,-1
p1getp2facing = 0
fall = 1
fall.yvelocity = -4.5
fall.recover = 0
p2facing = 1
id = 831

[State 0, Projectile]
type = Projectile
trigger1 = NumProjID(910)<6
trigger1 = MoveHit = 1
ProjID = 910
projanim = 1
projremovetime = 40

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = !AnimTime
physics = A       ;S,A,C,L

[State 810, end]
type = changestate
trigger1 = !animtime
value = 50
ctrl = 1

;----------------------------
;P2 Hit by back Throw
[Statedef 812]
type = S
movetype = H
physics = N
ctrl = 0
sprpriority = 1

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 812

[State 0, ChangeState]
type = ChangeState
trigger1 = Time = 6
value = 813
ctrl = 0

;----------------------------
;P2 Attacking P1
[Statedef 813]
type = S
movetype = H
physics = N
ctrl = 0
sprpriority = 2

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = SelfAnimExist(200)
trigger1 = enemy, Anim = 811
trigger1 = enemy, AnimElem = 4
value = 200
persistent = 0
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !SelfAnimExist(200)
trigger1 = enemy, Anim = 811
trigger1 = enemy, AnimElem = 4
value = 100
persistent = 0

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = enemy, Anim = 811
trigger1 = enemy, AnimElem = 14
value = 812

[State 0, ChangeState]
type = SelfState
trigger1 = Time = 80
value = 1
ctrl = 1

;----------------------------
;Enemy Grabbed
[Statedef 899]
type    = S
movetype= H
physics = N
 
[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !Time
value = 899
 
[State 0, PosSet]
type = PosSet
trigger1 = 1
y = 0
 
[State 0, ChangeState]
type = ChangeState
trigger1 = ((NumExplod(90000800))|| (command = "x" && command = "a")) && command != "up"
value = Cond(enemynear,Var(0)=1,950,5940)
 
[State 0, ChangeState]
type = ChangeState
trigger1 = Time >= 6
value = 0
ctrl = 1