;==============================================================
; CNS File for Freeza Z2 by Balthazar, Cybaster, Websta, KoopaKoot, JMorphman and XGargoyle
; Normal states : standing, crouching & jumping basics, etc.
;==============================================================

;---------------------------------------------------------------------------
; TAUNT

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

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

[State 200, 1];crack
type = PlaySnd
trigger1 = animelem = 5
trigger2 = animelem = 6
value = 1,1

[State 200, 1];voice
type = PlaySnd
triggerall = var(55)=0		;Voice=Japan
trigger1 = !time
value = 196,(random%3)

[State 200, 1];voice
type = PlaySnd
triggerall = var(55)=1		;Voice=English
trigger1 = !time
value = 195,(random%8)

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

;---------------------------------------------------------------------------
; STAND LIGHT PUNCH

[StateDef 200]
type = S
movetype = A
physics = S
anim = 200
ctrl = 0
velset = 0,0
poweradd = 0
sprpriority = 1
juggle = 7

[State 200, snd]
type = playsnd
triggerall = var(55)=0		;Voice=Japan
trigger1 = animelem=2 && random<200
value = 3,random%3
channel = 0

[State 200, 1];voice
type = PlaySnd
triggerall = var(55)=1		;Voice=English
trigger1 = animelem=2 && random<200
value = 3,100+(random%4)
channel = 0

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

[State 200, 1]
type = HitDef
trigger1 = anim = 200
trigger1 = animelem = 3
attr = S, NA
;damage = 23, 0
damage = ceil(ifElse(fvar(11) * 23 < 7, 7, fvar(11) * 23)), 0
animtype = light
guardflag = MA
hitflag = MAF
priority = 2, Hit
pausetime = 10,10
guard.pausetime = 10,10
sparkno = s7010
guard.sparkno = s7000
sparkxy = 0,-60
hitsound = s5, 0
guardsound = S6,0
ground.type = High
ground.slidetime = 7
ground.hittime  = 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

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

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

;---------------------------------------------------------------------------
; STAND MEDIUM PUNCH

[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 7
poweradd= 10
ctrl = 0
velset = 0,0
anim = ifelse(p2bodydist x<20,215,210)
sprpriority = 1

[State 210, snd]
type = playsnd
triggerall = var(55)=0		;Voice=Japan
trigger1= animelem=2 && random<350
value=3,10+random%3
channel = 0

[State 200, 1];voice
type = PlaySnd
triggerall = var(55)=1		;Voice=English
trigger1= animelem=2 && random<350
value=3,110+(random%6)
channel = 0

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

[State 100, step]
type = playsnd
trigger1 = animelem = 3
value = 40,0
volume = 300

[State 200, wide]
type = width
triggerall = anim=210
trigger1 = 1
value = 20,0
[State 200, pos]
type = PosAdd
triggerall = anim=210
trigger1 = animelemtime(3) = 0
X = 30
[State 200, pos]
type = PosAdd
triggerall = anim=210
trigger1 = animelemtime(7) = 0
X = -30

[State 200, 1]
type = HitDef
triggerall = anim=210
trigger1 = animelem = 5
attr = S, NA
;damage = 30, 0
damage = ceil(ifElse(fvar(11) * 30 < 7, 7, fvar(11) * 30)), 0
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 11, 11
guard.pausetime = 11,11
sparkno = s7020
guard.sparkno = s7000
sparkxy = -15,-63
hitsound = s5, 1
guardsound = S6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 12
ground.velocity = -2
guard.velocity = -6
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

[State 200, 1]
type = HitDef
triggerall = anim=215
trigger1 = animelem = 4
attr = S, NA
;damage = 32, 0
damage = ceil(ifElse(fvar(11) * 32 < 7, 7, fvar(11) * 32)), 0
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 11, 11
guard.pausetime = 11,11
sparkno = s7020
guard.sparkno = s7000
sparkxy = -15,-72
hitsound = s5, 1
guardsound = S6,0
ground.type = High
ground.slidetime = 12;8
ground.hittime  = 12;8
ground.velocity = -2.5   ;-3
guard.velocity = -6
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

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

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

;---------------------------------------------------------------------------
; STAND STRONG PUNCH

[Statedef 220]
type = S
movetype = A
physics = S
anim = ifelse(p2bodydist x<15,225,220)
ctrl = 0
velset = 0,0
poweradd = 20
sprpriority = 1
juggle = 7

[State 220, snd]
type = playsnd
triggerall = var(55)=0		;Voice=Japan
trigger1 = animelem=3 && random<500
value = 3,20+(random%3)
channel = 0

[State 200, 1];voice
type = PlaySnd
triggerall = var(55)=1		;Voice=English
trigger1 = animelem=3 && random<500
value = 3,120+(random%2)
channel = 0

[State 200, tail woosh]
type = PlaySnd
triggerall = anim = 220
trigger1 = animelem = 4
value = 0, 10
channel = 1

[State 200, woosh]
type = PlaySnd
triggerall = anim = 225
trigger1 = animelem = 2
value = 0, 2
channel = 1

[State 200, 1]
type = HitDef
Triggerall = anim = 220
trigger1 = animelem = 5
attr = S, NA
;damage = 47, 0
damage = ceil(ifElse(fvar(11) * 47 < 7, 7, fvar(11) * 47)), 0
animtype = Hard	
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 13,13
guard.pausetime = 13,13
sparkno = s7030
guard.sparkno = s7000
sparkxy = -25,-50
hitsound = s5, 5
guardsound = S6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 24
ground.velocity = -7
guard.velocity = -9
airguard.velocity = -2.5,-1.3
air.type = High	
air.velocity = -4,-4
air.hittime = 12
air.animtype = back
getpower= ifelse(p2movetype=H,40,210), 35
givepower = 35,35
yaccel = 0.5
ID = 1098

[State 200, 1]
type = HitDef
triggerall = anim = 225
trigger1 = animelemno(0) = [4,5]
attr = S, NA
;damage = 47, 0
damage = ceil(ifElse(fvar(11) * 47 < 7, 7, fvar(11) * 47)), 0
animtype = Hard	
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 13,13
guard.pausetime = 13,13
sparkno = s7030
guard.sparkno = s7000
sparkxy = -25,-70
hitsound = s5, 2
guardsound = S6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 24
ground.velocity = -7
guard.velocity = -9
airguard.velocity = -2.5,-1.3
air.type = High	
air.velocity = -4,-4
air.hittime = 12
air.animtype = back
getpower= ifelse(p2movetype=H,40,210), 35
givepower = 35,35
yaccel = 0.5
persistent = 0
ID = 1098

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

[state 17100, Landing Effect]
type=explod
trigger1=anim = 220
trigger1= animelemtime(10) = 0
anim=17100
id=17100
pos=0,0
postype=P1
sprpriority=-3
ownpal=1
supermovetime=-1

[State 240, landing sound]
type = PlaySnd
trigger1 = anim=220
trigger1 = animelemtime(10)=0
value = 40, 0

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

;---------------------------------------------------------------------------
; STAND STRONG PUNCH CLOSE

[Statedef 225]
type = S
movetype = A
physics = S
anim = 225
ctrl = 0
velset = 0,0
poweradd = 20
sprpriority = 1
juggle = 7

[State 220, snd]
type = playsnd
triggerall = var(55)=0		;Voice=Japan
trigger1 = animelem=3 && random<500
value = 3,20+(random%3)
channel = 0

[State 200, 1];voice
type = PlaySnd
triggerall = var(55)=1		;Voice=English
trigger1 = animelem=3 && random<500
value = 3,120+(random%2)
channel = 0

[State 200, woosh]
type = PlaySnd
trigger1 = animelem = 2
value = 0, 2
channel = 1

[State 200, 1]
type = HitDef
trigger1 = animelemno(0) = [4,5]
attr = S, NA
;damage = 47, 0
damage = ceil(ifElse(fvar(11) * 47 < 7, 7, fvar(11) * 47)), 0
animtype = Hard	
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 13,13
guard.pausetime = 13,13
sparkno = s7030
guard.sparkno = s7000
sparkxy = -25,-70
hitsound = s5, 2
guardsound = S6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 24
ground.velocity = -7
guard.velocity = -9
airguard.velocity = -2.5,-1.3
air.type = High	
air.velocity = -4,-4
air.hittime = 12
air.animtype = back
getpower= ifelse(p2movetype=H,40,210), 35
givepower = 35,35
yaccel = 0.5
persistent = 0
ID = 1098

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

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

;---------------------------------------------------------------------------
; STAND LIGHT KICK

[Statedef 230]
type = S
movetype = A
physics = S
anim = 230
ctrl = 0
velset = 0,0
poweradd = 0
sprpriority = 1
juggle = 7

[State 200, snd]
type = playsnd
triggerall = var(55)=0		;Voice=Japan
trigger1 = animelem=3 && random<200
value = 3,random%3
channel = 0

[State 200, 1];voice
type = PlaySnd
triggerall = var(55)=1		;Voice=English
trigger1 = animelem=3 && random<200
value = 3,100+(random%4)
channel = 0

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

[State 230, 2]
type = HitDef
trigger1 = animelem = 4
attr = S, NA
animtype  = Light
;damage    = 26,0
damage = ceil(ifElse(fvar(11) * 26 < 7, 7, fvar(11) * 26)), 0
priority = 2, Hit
guardflag = MA
pausetime = 10,10
guard.pausetime = 10,10
sparkno = s7010
guard.sparkno = s7000
sparkxy = -15,-80
hitsound   = s5,3
guardsound = S6,0
ground.type = Low
ground.slidetime = 8
ground.hittime  = 8
ground.velocity = -2.5
guard.velocity = -4.5
air.velocity = -2,-3
air.animtype = back
getpower= 40,35
givepower = 35,35
yaccel = 0.5
ID = 1098

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

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

;---------------------------------------------------------------------------
; STAND MEDIUM KICK

[Statedef 240]
type    = S
movetype= A
physics = S
juggle  = 7
poweradd= 10
ctrl = 0
velset = 0,0
anim = ifelse(p2bodydist x<20,245,240)
sprpriority = 1

[State 210, snd]
type = playsnd
triggerall = var(55)=0		;Voice=Japan
trigger1= animelem=3 && random<350
value=3,10+random%3
channel = 0

[State 200, 1];voice
type = PlaySnd
triggerall = var(55)=1		;Voice=English
trigger1= animelem=3 && random<350
value=3,110+(random%6)
channel = 0

[State 240, 1]
type = PlaySnd
trigger1 = animelem = 4 && anim = 240
value = 0, 4

[State 240, 1]
type = PlaySnd
trigger1 = animelem = 3 && anim = 245
value = 0, 4

[State 240, 2]
type = HitDef
trigger1 = anim = 240
trigger1 = animelem = 4
attr = S, NA
animtype = Medium
;damage = 35,0
damage = ceil(ifElse(fvar(11) * 35 < 7, 7, fvar(11) * 35)), 0
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 11, 11
guard.pausetime = 11,11
sparkno = s7020
guard.sparkno = s7000
sparkxy = -20,-75
hitsound   = s5,4
guardsound = S6,0
ground.type = High
ground.slidetime = 12;8
ground.hittime  = 12;8
ground.velocity = -3  ;-4
guard.velocity = -6
air.velocity = -3,-3
airguard.velocity = -2,-1.1
air.animtype = back
getpower= ifelse(p2movetype=H,40,140), 35
givepower = 35,35
yaccel = 0.5
ID = 1098

[State 240, 2]
type = HitDef
trigger1 = anim = 245
trigger1 = animelem = 3
attr = S, NA
animtype = Medium
;damage = 28,0
damage = ceil(ifElse(fvar(11) * 28 < 7, 7, fvar(11) * 28)), 0
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 11, 11
guard.pausetime = 11,11
sparkno = s7020
guard.sparkno = s7000
sparkxy = -15,-75
hitsound   = s5,4
guardsound = S6,0
ground.type = Low
ground.slidetime = 12;8
ground.hittime  = 12;8
ground.velocity = -2.5
guard.velocity = -4.5
air.velocity = -2,-2
airguard.velocity = -2,-1.1
air.animtype = back
getpower= ifelse(p2movetype=H,40,140), 35
givepower = 35,35
yaccel = 0.5
ID = 1098

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

[State 240, 5]
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
poweradd = 20
sprpriority = 1
juggle = 7

[State 220, snd]
type = playsnd
triggerall = var(55)=0		;Voice=Japan
trigger1 = animelem=4 && random<500
value = 3,20+(random%3)
channel = 0

[State 200, 1];voice
type = PlaySnd
triggerall = var(55)=1		;Voice=English
trigger1 = animelem=4 && random<500
value = 3,120+(random%2)
channel = 0

[State 250, tail woosh]
type = PlaySnd
trigger1 = AnimElem = 5
value = 0, 10

[State 250, 2]
type = HitDef
trigger1 = AnimElem = 6
trigger2 = AnimElem = 7 & !movecontact
trigger3 = AnimElem = 8 & !movecontact
attr = S, NA
animtype  = Hard
;damage    = 44,0
damage = ceil(ifElse(fvar(11) * 44 < 7, 7, fvar(11) * 44)), 0
priority = 4, Hit
guardflag = MA
pausetime = 13,13
guard.pausetime = 13,13
sparkno = s7030
guard.sparkno = s7000
sparkxy = -20,-80
hitsound   = s5,5
guardsound = S6,0
ground.type = high
ground.slidetime = 15
ground.hittime = 20
ground.velocity = -9
air.velocity = -4,-4
air.animtype = back
getpower= ifelse(p2movetype=H,40,210), 35
givepower = 35,35
yaccel = 0.5
ID = 1098

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

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

;---------------------------------------------------------------------------
; AXE KICK (FORWARD STAND STRONG KICK)

[Statedef 255]
type = S
movetype = A
physics = S
anim = 255
ctrl = 0
velset = 0,0
poweradd = 20
sprpriority = 1
juggle = 7

[State 220, snd]
type = playsnd
triggerall = var(55)=0		;Voice=Japan
trigger1 = animelem=4 && random<500
value = 3,20+(random%3)
channel = 0

[State 200, 1];voice
type = PlaySnd
triggerall = var(55)=1		;Voice=English
trigger1 = animelem=4 && random<500
value = 3,120+(random%2)
channel = 0

[State 250, 1]
type = PlaySnd
trigger1 = AnimElem = 5
value = 0, 5

[State 250, close overhead]
type = HitDef
trigger1 = AnimElem = 6
trigger2 = AnimElem = 8 & !movecontact
attr = S, NA
animtype  = Hard
;damage    = 44,0
damage = ceil(ifElse(fvar(11) * 44 < 7, 7, fvar(11) * 44)), 0
priority = 4, Hit
guardflag = HA
pausetime = 13,13
guard.pausetime = 13,13
sparkno = s7030
guard.sparkno = s7000
sparkxy = -20,-80
hitsound   = s5,5
guardsound = S6,0
ground.type = high
ground.slidetime = 15
ground.hittime = 20
ground.velocity = -9
air.velocity = -4,-4
air.animtype = back
getpower= ifelse(p2movetype=H,40,210), 35
givepower = 35,35
yaccel = 0.5
ID = 1098

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

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

;---------------------------------------------------------------------------
; SUPERIOR DASH

[Statedef 300]
type = S
movetype = A
physics = S
anim = 300
ctrl = 0
velset = 0,0
poweradd = 20
sprpriority = 1
juggle = 7

[State 800, VarSet]
type = VarSet
trigger1 = !time
var(3) = 0
[State 800, VarSet]
type = VarSet
trigger1 = time > 10
trigger1 = command = "qcbx"
var(3) = 1
[State 800, VarSet]
type = VarSet
trigger1 = time > 10
trigger1 = command = "qcby"
var(3) = 2
[State 800, VarSet]
type = VarSet
trigger1 = time > 10
trigger1 = command = "qcbz"
var(3) = 3
[State 800, VarSet]
type = VarSet
trigger1 = time > 10
trigger1 = command = "qcb2p"
var(3) = 4

[State 220, snd]
type = playsnd
triggerall = var(55)=0		;Voice=Japan
trigger1 = animelem=3 && random<500
value = 3,20+(random%3)
channel = 0

[State 200, 1];voice
type = PlaySnd
triggerall = var(55)=1		;Voice=English
trigger1 = animelem=3 && random<500
value = 3,120+(random%2)
channel = 0

[State 250, tail woosh]
type = PlaySnd
trigger1 = AnimElem = 5
value = 0, 10

[State 250, 1]
type = PlaySnd
trigger1 = AnimElem = 5
value = 0, 5

[State 250, 2]
type = HitDef
trigger1 = AnimElem = 6
trigger2 = AnimElem = 8 && !movecontact
attr = S, NA
animtype  = Hard
;damage    = 70,0
damage = ceil(ifElse(fvar(11) * 70 < 7, 7, fvar(11) * 70)), 0
priority = 4, Hit
guardflag = HA
pausetime = 13,13
guard.pausetime = 13,13
sparkno = s7030
guard.sparkno = s7000
sparkxy = -30,-80
hitsound   = s5,5
guardsound = S6,0
ground.type = Low
ground.slidetime = 18
ground.hittime =18
air.hittime = 20
ground.velocity = -9
air.velocity = -4,-4
air.animtype = back
getpower= ifelse(p2movetype=H,40,210), 35
givepower = 35,35
yaccel = 0.5

[State 240, 1]
type = Statetypeset
trigger1 = animelem = 1
physics = N
statetype = A

[State 240, 1]
type = Velset
trigger1 = animelem = 1
X = 8
Y = -3.5

[State 240, 1]
type = PosAdd
trigger1 = animelem = 1
X = 20

[State 240, 1]
type = VelAdd
trigger1 = (animelemtime(10) < 0)
Y = 0.45

[State 240, 1]
type = VelMul
trigger1 = (animelemtime(10) < 0)
X = 0.97

[state 17100, Landing Effect]
type=explod
trigger1= animelemtime(10) = 0
anim=17100
id=17100
pos=0,0
postype=P1
sprpriority=-3
ownpal=1
supermovetime=-1

[State 240, landing sound]
type = PlaySnd
trigger1 = animelemtime(10)=0
value = 40, 0

[State 240, 1]
type = Statetypeset
trigger1 = animelemtime(10) = 0
physics = S
statetype = S

[State 240, 1]
type = Velset
trigger1 = animelem = 10
X = 0
Y = 0
ignorehitpause = 1

[State 1200]
type = PosSet
trigger1 = animelemtime(10) >= 0
Y = 0
ignorehitpause = 1
[State 1200]
type = PosSet
trigger1 = Pos Y >= 0
;trigger1 = Vel Y > 0
Y = 0
ignorehitpause = 1

[State 1000, EX Death Wave]
type = ChangeState
triggerall = roundstate = 2
triggerall = AnimElem = 10, >= 2
triggerall = movecontact
trigger1 = Var(3) = 4
value = ifelse(power>=500,1150,1102)
ctrl = 0
[State 1000, Death Wave 3]
type = ChangeState
triggerall = roundstate = 2
triggerall = AnimElem = 10, >= 2
triggerall = movecontact
trigger1 = Var(3) = 3
value = 1102
ctrl = 0
[State 1000, Death Wave 2]
type = ChangeState
triggerall = roundstate = 2
triggerall = AnimElem = 10, >= 2
triggerall = movecontact
trigger1 = Var(3) = 2
value = 1101
ctrl = 0
[State 1000, Death Wave 1]
type = ChangeState
triggerall = roundstate = 2
triggerall = AnimElem = 10, >= 2
triggerall = movecontact
trigger1 = Var(3) = 1
value = 1100
ctrl = 0

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

;---------------------------------------------------------------------------
; CROUCH LIGHT PUNCH

[Statedef 400]
type = C
movetype = A
physics = C
anim = 400
ctrl = 0
velset = 0,0
poweradd = 0
sprpriority = 1
juggle = 7

[State 200, snd]
type = playsnd
triggerall = var(55)=0		;Voice=Japan
trigger1 = animelem=1 && random<200
value = 3,random%3
channel = 0

[State 200, 1];voice
type = PlaySnd
triggerall = var(55)=1		;Voice=English
trigger1 = animelem=1 && random<200
value = 3,100+(random%4)
channel = 0

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

[State 400, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = C, NA
hitflag = MAF
guardflag = MA
animtype = light
priority = 2, Hit
;damage    = 18,0
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,-33
hitsound   = s5,0
guardsound = S6,0
ground.type = low
ground.slidetime = 8;7
ground.hittime = 8;7
ground.velocity = -2.5  ;-3
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
trigger1 = !NumHelper(15999)
trigger1 = movehit
helpertype = normal
stateno = 15999
ID = 15999
name = "basics"
postype = p1
pos = 0,0
ownpal = 1

[State 400, End]
type = ChangeState
trigger1 = AnimTime = 0
value = 11+random%2
ctrl = 1

;---------------------------------------------------------------------------
; CROUCH MEDIUM PUNCH

[StateDef 410]
type = C
movetype = A
physics = C
anim = 410
ctrl = 0
velset = 0,0
poweradd = 10
sprpriority = 1
juggle = 7

[State 210, snd]
type = playsnd
triggerall = var(55)=0		;Voice=Japan
trigger1= animelem=2 && random<350
value=3,10+random%3
channel = 0

[State 200, 1];voice
type = PlaySnd
triggerall = var(55)=1		;Voice=English
trigger1= animelem=2 && random<350
value=3,110+(random%6)
channel = 0

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

[State 410, 2]
type = HitDef
trigger1 = AnimElem = 4
attr = C, NA
;damage    = 29,0
damage = ceil(ifElse(fvar(11) * 29 < 7, 7, fvar(11) * 29)), 0
animtype  = Medium
priority = 3, Hit
hitflag = MAF
guardflag = MA
pausetime = 12,12
guard.pausetime = 12,12
sparkno = s7020
guard.sparkno = s7000
sparkxy = -20,-45
hitsound   = s5,1
guardsound = S6,0
ground.type = Low
ground.slidetime = 12;8
ground.hittime  = 12;8
ground.velocity = -3  ;-4
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
trigger1 = !NumHelper(15999)
trigger1 = movehit
helpertype = normal
stateno = 15999
ID = 15999
name = "basics"
postype = p1
pos = 0,0
ownpal = 1

[State 100, tail pounce]
type = playsnd
trigger1 = AnimTime = 0
value = 9,1

[State 410, End]
type = ChangeState
trigger1 = AnimTime = 0
value = 11+random%2
ctrl = 1

;---------------------------------------------------------------------------
; CROUCH STRONG PUNCH

[StateDef 420]
type = C
movetype = A
physics = C
anim = 420
ctrl = 0
velset = 0,0
poweradd = 20
sprpriority = 1
juggle = 7

[State 3000, width]
type=width
trigger1 = 1
value = 25,0

[State 220, snd]
type = playsnd
triggerall = var(55)=0		;Voice=Japan
trigger1 = animelem=2 && random<500
value = 3,20+(random%3)
channel = 0

[State 200, 1];voice
type = PlaySnd
triggerall = var(55)=1		;Voice=English
trigger1 = animelem=2 && random<500
value = 3,120+(random%2)
channel = 0

[State 200, tail woosh]
type = PlaySnd
trigger1 = animelem = 3
value = 0, 12
channel = 1

[State 420, 3]
type = HitDef
trigger1 = AnimElem = 4
attr = S, NA
;damage = 44,0
damage = ceil(ifElse(fvar(11) * 44 < 7, 7, fvar(11) * 44)), 0
hitflag = MAF
guardflag = MA
priority = 4, Hit
pausetime = 15,15
guard.pausetime = 15,15
sparkno = s7030
guard.sparkno = s7000
sparkxy = -20,-60
hitsound   = s5, 2
guardsound = S6,0
animtype = Hard
ground.type = Low
ground.slidetime = 16
ground.hittime = 16
ground.velocity = -8,0
air.velocity = -5,-7
airguard.cornerpush.veloff= 0
fall.recover=0
air.animtype = back
getpower= ifelse(p2movetype=H,40,210), 35
givepower = 35,35
yaccel = 0.5
ID = 1098

[State 100, tail pounce]
type = playsnd
trigger1 = AnimTime = 0
value = 9,1

[State 430, End]
type = ChangeState
trigger1 = AnimTime = 0
value = 11+random%2
ctrl = 1

;---------------------------------------------------------------------------
; CROUCH LIGHT KICK

[Statedef 430]
type = C
movetype = A
physics = C
anim = 430
ctrl = 0
velset = 0,0
poweradd = 0
sprpriority = 1
juggle = 7

[State 200, snd]
type = playsnd
triggerall = var(55)=0		;Voice=Japan
trigger1 = animelem=2 && random<200
value = 3,random%3
channel = 0

[State 200, 1];voice
type = PlaySnd
triggerall = var(55)=1		;Voice=English
trigger1 = animelem=2 && random<200
value = 3,100+(random%4)
channel = 0

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

[State 430, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = C, NA
hitflag = MAFD
guardflag = L
;damage    = 16,0
damage = ceil(ifElse(fvar(11) * 16 < 7, 7, fvar(11) * 16)), 0
animtype = light
priority = 2, Hit
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 = 8
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
trigger1 = !NumHelper(15999)
trigger1 = movehit
helpertype = normal
stateno = 15999
ID = 15999
name = "basics"
postype = p1
pos = 0,0
ownpal = 1

[State 430, End]
type = ChangeState
trigger1 = AnimTime = 0
value = 11+random%2
ctrl = 1

;---------------------------------------------------------------------------
; CROUCH MEDIUM KICK

[Statedef 440]
type    = C
movetype= A
physics = C
juggle  = 7
poweradd= 10
ctrl = 0
anim = 440
sprpriority = 1

[State 210, snd]
type = playsnd
triggerall = var(55)=0		;Voice=Japan
trigger1= animelem=2 && random<350
value=3,10+random%3
channel = 0

[State 200, 1];voice
type = PlaySnd
triggerall = var(55)=1		;Voice=English
trigger1= animelem=2 && random<350
value=3,110+(random%6)
channel = 0

[State 250, tail woosh]
type = PlaySnd
trigger1 = AnimElem = 3
value = 0, 10

[State 440, 2]
type = HitDef
trigger1 = AnimElem = 4
attr = C, NA
;damage = 15,0
damage = ceil(ifElse(fvar(11) * 15 < 7, 7, fvar(11) * 15)), 0
animtype  = Medium
hitflag = MAFD
guardflag = L
pausetime = 10,10
guard.pausetime = 10,10
sparkno = s7020
guard.sparkno = s7000
sparkxy = -20,-10
hitsound   = s5,4
guardsound = S6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 12
ground.velocity = -2,0
guard.velocity = -4
air.type = Low
air.velocity = -2,-3
down.velocity = -3,-1
down.hittime = 12
down.cornerpush.veloff = -16
air.cornerpush.veloff = 0
getpower= ifelse(p2movetype=H,40,140), 20
givepower = 20,20
air.animtype = back
air.hittime = 4
yaccel = 0.5
ID = 1098

[State 440, 2]
type = HitDef
trigger1 = AnimElem = 6
attr = C, NA
;damage = 25,0
damage = ceil(ifElse(fvar(11) * 25 < 7, 7, fvar(11) * 25)), 0
animtype  = Medium
hitflag = MAFD
guardflag = L
pausetime = 12,12
guard.pausetime = 12,12
sparkno = s7020
guard.sparkno = s7000
sparkxy = -40,-30
hitsound   = s5,4
guardsound = S6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 12
ground.velocity = -3,0
guard.velocity = -6
air.type = Low
air.velocity = -2,-5
down.velocity = -3,-1
down.hittime = 12
down.cornerpush.veloff = -16
air.cornerpush.veloff = 0
getpower= ifelse(p2movetype=H,0,140), 20
givepower = 20,20
air.animtype = back
air.hittime = 4
yaccel = 0.5
ID = 1098

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

[State 100, tail pounce]
type = playsnd
trigger1 = AnimTime = 0
value = 9,1

[State 440, End]
type = ChangeState
trigger1 = AnimTime = 0
value = 11+random%2
ctrl = 1

;---------------------------------------------------------------------------
; CROUCH STRONG KICK

[Statedef 450]
type = C
movetype = A
physics = C
anim = 450
ctrl = 0
velset = 0,0
poweradd = 20
sprpriority = 1
juggle = 7

[State 220, snd]
type = playsnd
triggerall = var(55)=0		;Voice=Japan
trigger1 = animelem=2 && random<500
value = 3,20+(random%3)
channel = 0

[State 200, 1];voice
type = PlaySnd
triggerall = var(55)=1		;Voice=English
trigger1 = animelem=2 && random<500
value = 3,120+(random%2)
channel = 0

[State 450, deathstar sound (???)]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0, 11

[State 420, 3]
type = HitDef
trigger1 = AnimElem = 3
trigger2 = AnimElem = 8
attr = S, NA
;damage = 10,0
damage = ceil(ifElse(fvar(11) * 10 < 7, 7, fvar(11) * 10)), 0
hitflag = MAF
guardflag = MA
priority = 4, Hit
pausetime = 10,15
guard.pausetime = 10,15
sparkno = s7020
guard.sparkno = s7000
sparkxy = -20,-65
hitsound   = s5, 5
guardsound = S6,0
animtype = Up
ground.type = High
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -1,-4
guard.velocity = -9
air.velocity = ifelse(p2movetype=H,-3,-1),-3
ground.cornerpush.veloff = 0
fall = 1
air.animtype = back
getpower= 40, 20
givepower = 15,15
yaccel = 0.45
ID = 1098

[State 420, 3]
type = HitDef
trigger1 = AnimElem = 12
attr = S, NA
;damage = 30,0
damage = ceil(ifElse(fvar(11) * 30 < 7, 7, fvar(11) * 30)), 0
hitflag = MAF
guardflag = MA
priority = 4, Hit
pausetime = 15,18
guard.pausetime = 15,18
sparkno = s7030
guard.sparkno = s7000
sparkxy = -25,-80
hitsound   = s5, 5
guardsound = S6,0
animtype = Up
ground.type = High
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -1,-11.5
guard.velocity = -9
air.velocity = -1,-11
fall = 1
air.animtype = back
getpower= ifelse(p2movetype=H,40,210), 35
givepower = 20,20
yaccel = 0.45
ID = 1098

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

[State 450, 2]
type = PosAdd
trigger1 = !time
X = 5

[State 450, 2]
type = Velset
trigger1 = AnimElem = 2
X = 2
[State 450, 2]
type = Velset
trigger1 = AnimElem = 15
X = 0

[state 17100, Landing Effect]
type=explod
trigger1= animelemtime(15) = 0
anim=17100
id=17100
pos=0,0
postype=P1
sprpriority=-3
ownpal=1
supermovetime=-1

[State 240, landing sound]
type = PlaySnd
trigger1 = animelemtime(15)=0
value = 40, 0

[State 100, tail pounce]
type = playsnd
trigger1 = Animelemtime(17) = 0
value = 9,1

[State 460, End]
type = ChangeState
trigger1 = AnimTime = 0
value = 11+random%2
ctrl = 1

;---------------------------------------------------------------------------
; JUMP LIGHT PUNCH

[Statedef 600]
type = A
movetype = A
physics = A
anim = 600
ctrl = 0
poweradd = 0
sprpriority = 1
juggle = 2

[State 200, snd]
type = playsnd
triggerall = anim = 600
triggerall = var(55)=0		;Voice=Japan
trigger1 = animelem=1 && random<200
value = 3,random%3
channel = 0

[State 200, 1];voice
type = PlaySnd
triggerall = anim = 600
triggerall = var(55)=1		;Voice=English
trigger1 = animelem=1 && random<200
value = 3,100+(random%4)
channel = 0

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

[State 600, 2]
type = HitDef
trigger1 = AnimElem = 3
trigger2 = AnimElem = 4 && !movecontact
trigger3 = AnimElem = 5 && !movecontact
attr = A, NA
hitflag = MAF
;damage    = 16,0
damage = ceil(ifElse(fvar(11) * 16 < 7, 7, fvar(11) * 16)), 0
guardflag = HA
animtype = Light
priority = 3, Hit
priority = 3
pausetime = 9,11
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
air.velocity = -2,-4
airguard.cornerpush.veloff= 0
getpower= 40, 35
givepower = 35,35
yaccel = 0.5
fall = numhelper(15999)

[State 1400, Hold to stay in LK]
type = ChangeAnim
trigger1 = anim=600 && animelemtime(3)>=3 && command!="hold_x"
value = 601

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

;---------------------------------------------------------------------------
; JUMP MEDIUM PUNCH

[Statedef 610]
type    = A
movetype = A
physics = A
juggle = 2
poweradd = 10
ctrl = 0
anim = 610
sprpriority = 1

[State 210, snd]
type = playsnd
triggerall = var(55)=0		;Voice=Japan
trigger1= animelem=2 && random<350
value=3,10+random%3
channel = 0

[State 200, 1];voice
type = PlaySnd
triggerall = var(55)=1		;Voice=English
trigger1= animelem=2 && random<350
value=3,110+(random%6)
channel = 0

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

[State 610, 2]
type = HitDef
trigger1 = AnimElem = 4
trigger2 = AnimElem = 5 && !movecontact
attr = A, NA
;damage = 30,0
damage = ceil(ifElse(fvar(11) * 30 < 7, 7, fvar(11) * 30)), 0
guardflag = HA
hitflag = MAF
animtype  = Medium
priority = 3,Hit
pausetime = 11,15
sparkno = s7020
guard.sparkno = s7000
sparkxy = -10,-60
hitsound   = s5,1
guardsound = S6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -4   ;-5
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)

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

;---------------------------------------------------------------------------
; JUMP STRONG PUNCH

[Statedef 620]
type = A
movetype = A
physics = A
anim = 620
ctrl = 0
poweradd = 20
sprpriority = 1
juggle = ifelse(p2statetype=A,3,15)

[State 220, snd]
type = playsnd
triggerall = var(55)=0		;Voice=Japan
trigger1 = animelem=3 && random<500
value = 3,20+(random%3)
channel = 0

[State 200, 1];voice
type = PlaySnd
triggerall = var(55)=1		;Voice=English
trigger1 = animelem=3 && random<500
value = 3,120+(random%2)
channel = 0

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

[State 620, 3]
type = HitDef
trigger1 = AnimElem = 4
attr = A, NA
;damage = 65,0
damage = ceil(ifElse(fvar(11) * 65 < 7, 7, fvar(11) * 65)), 0
hitflag = MAF
guardflag = HA
animtype = Hard
priority = 4, Hit
pausetime = 16,16
sparkno = s7030
guard.sparkno = s7000
sparkxy = -30,-50
hitsound   = s5,2
guardsound = S6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
air.velocity = -1.5,10
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)
air.fall = 1
fall.recover = 0

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

;---------------------------------------------------------------------------
; JUMP LIGHT KICK

[Statedef 630]
type = A
movetype = A
physics = A
anim = 630
ctrl = 0
poweradd = 0
sprpriority = 1
juggle = 2

[State 200, snd]
type = playsnd
triggerall = var(55)=0		;Voice=Japan
trigger1 = animelem=2 && random<200
value = 3,random%3
channel = 0

[State 200, 1];voice
type = PlaySnd
triggerall = var(55)=1		;Voice=English
trigger1 = animelem=2 && random<200
value = 3,100+(random%4)
channel = 0

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

[State 630, 2]
type = HitDef
trigger1 = AnimElem = 3
trigger2 = AnimElem = 4 && !movecontact
attr = A, NA
;damage = 20,0
damage = ceil(ifElse(fvar(11) * 20 < 7, 7, fvar(11) * 20)), 0
hitflag = MAF
guardflag = HA
animtype = Light
priority = 3, Hit
pausetime = 9,11
sparkno = s7010
guard.sparkno = s7000
sparkxy = -10,-50
hitsound   = s5,3
guardsound = S6,0
ground.type = High
ground.slidetime = 8  ;6
ground.hittime  = 15
ground.velocity = -3  ;-4
air.velocity = -2,-3
airguard.cornerpush.veloff= 0
getpower= 40, 35
givepower = 35,35
yaccel = 0.5
fall = numhelper(15999)

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

;---------------------------------------------------------------------------
; JUMP MEDIUM KICK

[Statedef 640]
type    = A
movetype = A
physics = A
juggle = 2
poweradd= 10
ctrl = 0
anim = 640
sprpriority = 1

[State 210, snd]
type = playsnd
triggerall = anim=640
triggerall = var(55)=0		;Voice=Japan
trigger1= animelem=2 && random<350
value=3,10+random%3
channel = 0

[State 200, 1];voice
type = PlaySnd
triggerall = anim=640
triggerall = var(55)=1		;Voice=English
trigger1= animelem=2 && random<350
value=3,110+(random%6)
channel = 0

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

[State 640, 2]
type = HitDef
trigger1 = AnimElem = 5
trigger2 = AnimElem = 7 && !movecontact
trigger3 = AnimElem = 15
attr = A, NA
;damage = 29,0
damage = ceil(ifElse(fvar(11) * 29 < 7, 7, fvar(11) * 29)), 0
guardflag = HA
hitflag = MAF
animtype  = Medium
priority = 3,Hit
sparkno = s7020
guard.sparkno = s7000
sparkxy = -20,-50
hitsound   = s5,4
guardsound = S6,0
ground.type = High
pausetime = 11,15
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)

[State 1400, Hold to stay in LK]
type = ChangeAnim
trigger1 = anim=640 && animelemtime(10)>=0 && command!="hold_b"
value = 641

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

;---------------------------------------------------------------------------
; JUMP STRONG KICK - BOOMERANG KICK

[Statedef 650]
type = A
movetype = A
physics = A
anim = 650
ctrl = 0
poweradd = 20
sprpriority = 1
juggle = ifelse(p2statetype=A,3,15)

[State 220, snd]
type = playsnd
triggerall = var(55)=0		;Voice=Japan
trigger1 = animelem=4 && random<500
value = 3,20+(random%3)
channel = 0

[State 200, 1];voice
type = PlaySnd
triggerall = var(55)=1		;Voice=English
trigger1 = animelem=4 && random<500
value = 3,120+(random%2)
channel = 0

[State varset];a.HK juggle limiter
type = VarSet
trigger1 = !time && var(6)>0
var(7) = 1

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

[State 250, 1]
type = PlaySnd
trigger1 = AnimElem = 5
value = 0, 5

[State 650, 3];opponent on ground
type = HitDef
triggerall = p2statetype != A
trigger1 = AnimElem = 6
trigger2 = AnimElem = 8 && !movecontact
attr = A, NA
;damage = 38,0
damage = ceil(ifElse(fvar(11) * 38 < 7, 7, fvar(11) * 38)), 0
hitflag = MAF
guardflag = HA
animtype = Hard
priority = 4, Hit
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,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

[State 650, 3];Opponent in air sent to custom bounce state
type = HitDef
triggerall = p2statetype = A && var(7)=0
trigger1 = AnimElem = 6
trigger2 = AnimElem = 8 && !movecontact
attr = A, NA
;damage = 38,0
damage = ceil(ifElse(fvar(11) * 38 < 7, 7, fvar(11) * 38)), 0
hitflag = MAF
guardflag = HA
animtype = Hard
priority = 4, Hit
pausetime = 12,12
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,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.35
;p2stateno = 651

[State 0, TargetState]
type = TargetState
triggerall = p2statetype = A && var(7)=0
trigger1 = movehit = 1
trigger1 = numtarget
trigger1 = !(target, ishelper)
value = 651
ignorehitpause = 1
persistent = 0

[State 650, 3];Opponent in air with bounce juggling limiter
type = HitDef
triggerall = p2statetype=A && var(7)=1
trigger1 = AnimElem = 6
trigger2 = AnimElem = 8 && !movecontact
attr = A, NA
;damage = 38,0
damage = ceil(ifElse(fvar(11) * 38 < 7, 7, fvar(11) * 38)), 0
hitflag = MAF
guardflag = HA
animtype = Hard
priority = 4, Hit
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,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

[State varset]
type = VarSet
trigger1 = p2stateno = 651
var(6) = 1

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

;---------------------------------------------------------------------------
; DIVE KICK

[Statedef 660]
type = A
physics = N
movetype = A
anim = 660
velset = .3*vel x,.3*vel y
ctrl = 0
poweradd = 35
sprpriority = -1

[State 282, vel]
type = velset
trigger1 = animelemtime(4)>0
x = 6
y = 11

[State 220, snd]
type = playsnd
triggerall = var(55)=0		;Voice=Japan
trigger1 = animelem=4
value = 3,20+(random%3)
channel = 0

[State 200, 1];voice
type = PlaySnd
triggerall = var(55)=1		;Voice=English
trigger1 = animelem=4
value = 3,120+(random%2)
channel = 0

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

[State 282, hit]
type = hitdef
trigger1 = !movecontact && !movereversed
attr = A,SA
;damage = 61,8
damage = ceil(ifElse(fvar(11) * 61 < 7, 7, fvar(11) * 61)), 7
animtype = Hard
guardflag = HA
hitflag = MAFD
priority = 4,Hit
pausetime = 12,12
sparkno = s7030
guard.sparkno = s7000
sparkxy = 0,-18
hitsound = s5,5
guardsound = S6,0
ground.type = High
ground.hittime = 17
ground.slidetime = 17
ground.velocity = -4, 0
ground.cornerpush.veloff = -8
guard.velocity = -7.5
guard.cornerpush.veloff = -10
air.type = Low
air.velocity = -5,6
down.hittime = 24
down.velocity = 0,0
air.cornerpush.veloff = 0
getpower = ifelse(p2movetype=H,40,140), 35
givepower = 35,35
yaccel = .5
airguard.velocity = -8, -1.5
airguard.cornerpush.veloff = 0
fall.recover = 0
ID = 1098

; Avoid infinites with a.LP
[State 3000, basics limiter]
type = helper
trigger1 = !NumHelper(15999)
trigger1 = movehit
helpertype = normal
stateno = 15999
ID = 15999
name = "basics"
postype = p1
pos = 0,0
ownpal = 1

[State 282, end]
type = changestate
trigger1 = pos y>=0
value = 52



;===========================================================================
; <<<<< VEGA THROW + AXE KICK (Bwd throw) >>>>>
; Grab state : 800
; Freeza throws : 801
; P2 thrown state : 802
;===========================================================================

[Statedef 800]
type = S
movetype = A
physics = S
juggle = 15
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 1
facep2 = 1
poweradd = 20

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

[State 800, hit]
type = hitdef
trigger1 = animelem=4 && !var(38)
attr = S,NT
hitflag = M- 
priority = 1,Miss 
sparkno = -1
p1facing = 1
p2facing = 1
;p1stateno = 801
guard.dist = 0
fall = 1
fall.recover = 0
hitsound = s800,1
numhits = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = movehit = 1
trigger1 = numtarget
trigger1 = !(target, ishelper)
value = 801
persistent = 1

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

[State 200, 1]
type = PlaySnd
triggerall = var(55)=0		;Voice=Japan
trigger1 = animelem = 5
value = 5000,0
channel = 0

[State 200, 1]
type = PlaySnd
triggerall = var(55)=1		;Voice=English
trigger1 = animelem = 5
value = 5000,100
channel = 0

[State Idle]
type = statetypeset
trigger1 = animelemtime(5)>=0
movetype = I

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

;----------------------------
;Freeza's State
[Statedef 801]
type = S
movetype = A
physics = S
anim = 801
ctrl = 0
sprpriority = 0

[State 220, snd]
type = playsnd
triggerall = var(55)=0		;Voice=Japan
trigger1 = !time
value = 3,20+(random%3)
channel = 0

[State 200, 1];voice
type = PlaySnd
triggerall = var(55)=1		;Voice=English
trigger1 = !time
value = 3,120+(random%2)
channel = 0

[State 1000]
type = width
trigger1 = 1
value = 90,30

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

[State 182, 1]
type = screenbound
trigger1 = 1
movecamera = 1,0
value = 1

[State 810, bind 1]
type=targetbind
trigger1= animelemtime(1)>=0 && animelemtime(4)<0
pos=45,0
[State 810, bind 2]
type=targetbind
trigger1= animelemtime(4)>=0 && animelemtime(5)<0
pos=90,-60
[State 810, bind 2]
type=targetbind
trigger1= animelemtime(5)>=0 && animelemtime(6)<0
pos=60,-90
[State 810, bind 2]
type=targetbind
trigger1= animelemtime(6)>=0 && animelemtime(7)<0
pos=30,-115
[State 810, bind 2]
type=targetbind
trigger1= animelemtime(7)>=0 && animelemtime(8)<0
pos=20,-115
[State 810, bind 2]
type=targetbind
trigger1= animelemtime(8)>=0 && animelemtime(9)<0
pos=10,-110
[State 810, bind 2]
type=targetbind
trigger1= animelemtime(9)>=0 && animelemtime(10)<0
pos=60,-60
[State 810, bind 2]
type=targetbind
trigger1= animelemtime(10)>=0 && animelemtime(11)<0
pos=45,-30

[State 650, hitspark]
type = Explod
trigger1 = animelemtime(4)=0
anim = 7020
pos = 83,-65
postype = p1
ignorehitpause = 1
persistent = 0
sprpriority = 5
ownpal = 1

[State 240, 1];woosh
type = PlaySnd
trigger1 = animelemtime(3)=0
value = 0, 5
[State 650, 2];hitsound
type = PlaySnd
trigger1 = animelemtime(4)=0
value = 5, 5

[State 810, hurt]
type = targetlifeadd
trigger1 = animelemtime(4)=0
value = -30-30*(prevstateno=951)

[State 1000, shake]
type = EnvShake
trigger1 = animelemtime(4)=0
time=23
freq=90
ampl=6

[State 4001, Turn]
type = Turn
trigger1 = AnimElemTime(8) = 0

[State 200, throw sound]
type = PlaySnd
trigger1 = animelemtime(9)=0
value = 801,0
volume = 150

[State 810, hurt]
type = poweradd
trigger1 = animelemtime(9)=0
value = 180

[State 4001, Replace]
type = PosAdd
trigger1 = !AnimTime
X = 15

[State 1400, EndState]
type = ChangeState
trigger1 = !AnimTime
value = 803
ctrl = 0

;----------------------------
;Enemy Thrown State
[Statedef 802]
type = S
movetype = H
physics = N
velset = 0,0
sprpriority = -1

[State 182, 1]
type = screenbound
trigger1 = 1
movecamera = 1,0
value = 1

[State 802, anim]
type = changeanim2
trigger1 = !time
value = 802

[State 801, end]
type = changestate
trigger1 = anim=802 && !animtime
value = 652
ctrl = 0

;----------------------------
;Freeza - Kick Part
[Statedef 803]
type = S
movetype = A
physics = N
ctrl = 0
anim = 803

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

[State 250, Wing Kick SFX]
type = PlaySnd
trigger1 = AnimElem = 1
value = 801,1
volume = 300

[State 250, 1]
type = PlaySnd
trigger1 = AnimElem = 5
value = 0, 5

[State 250, 2]
type = HitDef
trigger1 = AnimElem = 6
attr = S, SA
animtype  = Hard
;damage    = 30,0
damage = ceil(ifElse(fvar(11) * 30 < 7, 7, fvar(11) * 30)), 0
priority = 4, Hit
guardflag = 
pausetime = 16,16
guard.pausetime = 20,20
sparkno = s7030
guard.sparkno = s7000
sparkxy = -15,-80
hitsound   = s5,5
guardsound = S6,1
ground.type = high
ground.slidetime = 15
ground.hittime = 20
ground.velocity = -7
air.velocity = -4,-4
air.animtype = back
getpower = 0,0
givepower = 35,35
yaccel = 0.5
envshake.time = 16
envshake.freq = 60
envshake.ampl = 4
p2facing = 1
numhits = 2
;p2stateno = 804  ; <- Opponent sent to flying state

[State 0, TargetState]
type = TargetState
trigger1 = movehit = 1
trigger1 = numtarget
trigger1 = !(target, ishelper)
value = 804
ignorehitpause = 1
persistent = 0

[State 240, 1]
type = PosAdd
trigger1 = animelem = 1
X = 20

[state 17100, Landing Effect]
type=explod
trigger1= animelemtime(10) = 0
anim=17100
id=17100
pos=-16,0
postype=P1
sprpriority=-3
ownpal=1
supermovetime=-1

[State 240, landing sound]
type = PlaySnd
trigger1 = animelemtime(10)=0
value = 40, 0

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

;----------------------------
;P2 custom state, sent away
[Statedef 804]
type = A
movetype = H
physics = N
anim = ifelse(selfanimexist(5052),5052,5030)
ctrl = 0
velset = -10, -5
facep2 = 1

[State 9011, VelAdd]
type = VelAdd
trigger1 = (Pos Y < 0)
y = 0.35
 
[State 9011, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
 
[State 9011, ChangeState]
type = SelfState
trigger1 = (Pos Y >= 0) && (Vel Y > 0)
value = 5100


;===========================================================================
; <<<<< MULTI KNEE (Fwd Throw) >>>>>
; Grab state : 820
; Freeza throws : 821
; P2 thrown state : 822
;===========================================================================

[Statedef 820]
type = S
movetype = A
physics = S
juggle = 15
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 1
facep2 = 1
poweradd = 20

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

[State 800, hit]
type = hitdef
trigger1 = animelem=4 && !var(38)
attr = S,NT
hitflag = M- 
priority = 1,Miss 
sparkno = -1
p1facing = 1
p2facing = 1
;p1stateno = 821
guard.dist = 0
fall = 1
fall.recover = 0
hitsound = s800,1

[State 0, ChangeState]
type = ChangeState
trigger1 = movehit = 1
trigger1 = numtarget
trigger1 = !(target, ishelper)
value = 821
persistent = 1

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

[State 200, 1]
type = PlaySnd
triggerall = var(55)=0		;Voice=Japan
trigger1 = animelem = 5
value = 5000,0
channel = 0

[State 200, 1]
type = PlaySnd
triggerall = var(55)=1		;Voice=English
trigger1 = animelem = 5
value = 5000,100
channel = 0

[State Idle]
type = statetypeset
trigger1 = animelemtime(5)>=0
movetype = I

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

;----------------------------
;Freeza's state
[Statedef 821]
type = S
movetype = A
physics = S
anim = 821
ctrl = 0
sprpriority = 1

[State 220, snd]
type = playsnd
triggerall = var(55)=0		;Voice=Japan
trigger1 = !time
value = 3,20+(random%3)
channel = 0

[State 200, 1];voice
type = PlaySnd
triggerall = var(55)=1		;Voice=English
trigger1 = !time
value = 3,120+(random%2)
channel = 0

[State smash]
type = varset
trigger1 = !time
var(4) = 0
[State numhits]
type = varset
trigger1 = !time
var(5) = 0

[State smash]
type = varadd
triggerall = animelemtime(6)<0 && var(5)<2
trigger1 = random<100*(AILevel+1)
var(4) = 1
[State numhits]
type = varadd
trigger1 = animelemtime(2) = 1
var(5) = 1

[State 1000]
type = width
trigger1 = anim = 821
value = 45,0

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

[State 182, 1]
type = screenbound
trigger1 = 1
movecamera = 1,0
value = 1

[State 810, Bind]
type = TargetBind
trigger1 = 1
pos = 45, 0

[State 650, 2]
type = Explod
trigger1 = animelemtime(6)=0
anim = 7010
pos = 40,-65
postype = p1
ignorehitpause = 1
persistent = 1
sprpriority = 5
ownpal = 1

[State 650, 2]
type = EnvShake
trigger1 = animelemtime(6)=0
time = 10
ampl = 4
freq = 200

[State 650, 2];hitsound
type = PlaySnd
trigger1 = animelemtime(6)=0
value = 5, 4

[State 810, hurt]
type = targetlifeadd
trigger1 = animelem = 6
value = -12-6*(var(5)>4)
[State 810, hurt]
type = targetpoweradd
trigger1 = animelem = 6
value = 7

[State 810, hurt]
type = poweradd
trigger1 = animelem = 6
value = 35

[State 810, combo counter]
type = hitadd
trigger1 = animelem = 6 && var(5)>1
value = 1

[State 801, end]
type = changeanim
trigger1 = !animtime
trigger1 = var(5)<5 && (var(4)/2.0)>var(5)
value = 821
elem = 2

[State 801, end]
type = changestate
trigger1 = !animtime
trigger1 = var(5)>=5 || var(4)<=var(5)
value = 823
ctrl = 0

;----------------------------
;Enemy Thrown State (knee throw)
[Statedef 822]
type = S
movetype = H
physics = N
velset = 0,0
sprpriority = 0

[State 802, anim]
type = changeanim2
trigger1 = !time
value = 822

[State 820, 2]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5050

;----------------------------
;Freeza's state - Kick P2
[Statedef 823]
type = S
movetype = A
physics = S
anim = 823
ctrl = 0
sprpriority = 1

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

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

[State 182, 1]
type = screenbound
trigger1 = 1
movecamera = 1,0
value = 1

[State 810, Bind]
type = TargetBind
trigger1 = animelemtime(3)<0
pos = 45, 0

[State 650, 3]
type = HitDef
trigger1 = AnimElem = 3
attr = A, NA
;damage = 30,0
damage = ceil(ifElse(fvar(11) * 30 < 7, 7, fvar(11) * 30)), 0
hitflag = MAF
animtype = Hard
priority = 4, Hit
pausetime = 16,16
sparkno = s7030
guard.sparkno = s7000
sparkxy = -10,-65
hitsound   = s5,5
guardsound = S6,1
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5,-5
air.velocity = -7,-7
;fall = 1
fall.recover = 0
airguard.cornerpush.veloff= 0
air.animtype = Back
fall.animtype = Back
getpower= 0,0
givepower = 35,35
yaccel = 0.5
envshake.time = 16
envshake.freq = 60
envshake.ampl = 4
kill = 0
;p2stateno = 763 ; <- Opponent sent to flying state

[State 0, TargetState]
type = TargetState
trigger1 = movehit = 1
trigger1 = numtarget
trigger1 = !(target, ishelper)
value = 763
ignorehitpause = 1
persistent = 0

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

;----------------------------
;Enemy Thrown State 2 (knee throw)
[Statedef 824]
type = S
movetype = H
physics = N
velset = 0,0
sprpriority = 0

[State 802, anim]
type = changeanim2
trigger1 = !time
value = 824

[State 820, 2]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5050
