
;-------------
; intro
;-------------
[statedef 190]
type=s
anim=190

;---
[state 0]
	type=changestate
	triggerall=p2name="ken"
	trigger1=numpartner=0
	trigger2=numpartner
	trigger2=id<partner,id
	value=191
[state 0]
	type=changestate
	triggerall=!time && numenemy
	trigger1=enemy,name="evilryu" || enemy,name="gouki" || enemy,name="kyo"
	value=192
[state 0]
	type=changestate
	triggerall=!time && numenemy
	trigger1=enemy,name="sagat"
	value=193

;---
[state 0]
	type=changestate
	trigger1=!time && random<500
	value=194 ;; goto_intro 2
;---
[state 0]
	type=playsnd
	trigger1=(animelem=2)
	value=0,30+(random%6)
	channel=0

[state 0]
	type=assertspecial
	trigger1=1
	flag=intro

[state 0]
	type=changestate
	trigger1=animtime=0
	value=0

;-------------------
; vs ken
[statedef 191]
type=s
anim=191

[state 0]
	type=assertspecial
	trigger1=1
	flag=intro
[state 0]
	type=playsnd
	trigger1=(animelem=2)
	value=0,30
	channel=0
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0

;-------------------
; vs strong
[statedef 192]
type=s
anim=192
[state 0]
	type=assertspecial
	trigger1=1
	flag=intro
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0

;-------------------
; vs sagat
[statedef 193]
type=s
anim=193
[state 0]
	type=assertspecial
	trigger1=1
	flag=intro
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0

;-------------------
; with bag
[statedef 194]
type=s
anim=194
[state 0]
	type=assertspecial
	trigger1=1
	flag=intro

;--- bag
[state 0]
	type=projectile
	trigger1=(animelem=4,<0)
	trigger1=1|| var(11):=18 || var(12):=-46 || fvar(1):=1
	trigger2=(animelem=4,>=0) && (animelem=5,<0)
	trigger2=1|| var(11):=-4 || var(12):=-46 || fvar(1):=-1
	trigger3=(animelem=5,>=0) && (animelem=6,<0)
	trigger3=1|| var(11):=-18 || var(12):=-46 || fvar(1):=-1
	projanim=19194
	projsprpriority=2
	postype=p1
	offset=floor(var(11)*const(size.xscale)), floor(var(12)*const(size.yscale))
	projedgebound=800
	projstagebound=800
	projscale=fvar(1)*const(size.xscale), const(size.yscale)
;;op;	projshadow=-1
	projremovetime=1
;--- bag out
[state 0]
	type=projectile
	trigger1=(animelem=6)
	projanim=19194
	projhitanim=19195
	projsprpriority=2
	postype=p1
	offset=floor(var(11)*const(size.xscale)), floor(var(12)*const(size.yscale))
	projedgebound=800
	projstagebound=800
	projscale=const(size.xscale), const(size.yscale)
;;op;	projshadow=-1
	velocity=-1,5

[state 0]
	type=playsnd
	trigger1=(animelem=8) && (random<750)
	value=0,34+(random%2)
	channel=0
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0




;---------------
; win
;---------------
[statedef 180]
type=s
anim=180+(random%4)
ctrl=0

[state 0]
	type=assertspecial
	trigger1=time<180
	flag=roundnotover

;---
[state 0]
	type=playsnd
	trigger1=(animelem=2) && (anim=181)
	value=0,37 ;; ore_no_ka_chi
	channel=0
[state 0]
	type=playsnd
	trigger1=(animelem=4) && (anim=183)
	value=0,35+(random%2) ;; 35: ti_tsu_de_mo / 36: yoshi
	channel=0

;--- leaf
[state 0]
	type=projectile
	trigger1=(time=[46,86]) && (time%8=0) && (anim=180)
	projanim=18180
	projsprpriority=2
	postype=p1
	offset=-60-(random%30), -45-(random%80)
	projedgebound=800
	projstagebound=800
	projscale=ifelse(random<500,1,-1),ifelse(random<500,1,-1)
	projshadow=-1
	projremovetime=40
	velocity=2+(random*0.001), 1+(random*0.001)
	accel=(random*0.0001),-(random*0.0001)






;----------------
; basic

;----------------
; taunt

[statedef 195]
type=s
physics=s
movetype=i
anim=195
sprpriority=1
velset=0,0
ctrl=0

[state 0]
	type=changestate
	trigger1=time=0
	trigger1=(command="holdfwd")||(command="holdback")
	value=1001

[state 0]
	type=playsnd
	trigger1=(animelem=3)
	value=0,32
	channel=0
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0
	ctrl=1





;---------------
; stand light punch

[statedef 200]
type=s
movetype=a
physics=s
anim=ifelse(p2bodydist x<20,205,200)
sprpriority=1
juggle=8
poweradd=10
velset=0,0
ctrl=0
facep2=1

[state 0]
	type=playsnd
	trigger1=time=2 && random<250
	value=0,(random%2)
	channel=0
[state 0]
	type=playsnd
	trigger1=time=2
	value=f200,0
	channel=1

[state 0]
	type=hitdef
	trigger1=(animelem=2)
	attr=s,na
	damage=25
	animtype=light
	air.animtype=back
	fall.animtype=back
	air.type=low
	guardflag=ma
	hitflag=maf
	pausetime=9,9
	sparkxy=-10,-ifelse((anim=200),85,91)
	;ad; sparkno=0+(random%4)*10
	;ad; guard.sparkno =40
	hitsound=300,0
	guardsound=40,0
	ground.type=high
	ground.slidetime=10
	ground.hittime=10
	air.hittime=10
	ground.velocity=-6
	air.velocity=   -4,-3
	getpower=20,10
	persistent=0
	;---
	guard.ctrltime=     id +0*(var(31):=0 || var(30):= 510500 +ifelse((anim=200),85,91) )
	fall.envshake.time= id
	fall.envshake.ampl= 0

;---
[state 0]
	type=statetypeset
	trigger1=(animelem=3)
	movetype=i
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0
	ctrl=1


;--------------
; stand hard punch

[statedef 220]
type=s
movetype=a
physics=s
anim=ifelse(p2bodydist x<25,225,226)
sprpriority=1
juggle=8
poweradd=50
velset=0,0
ctrl=0
facep2=1

[state 0]
	type=playsnd
	trigger1=time=3 && random<750
	value=0,2+(random%2)
	channel=0
[state 0]
	type=playsnd
	trigger1=time=4
	value=f200,2
	channel=1

;---
[state 0]
	type=hitdef
	trigger1=(animelem=4) && (anim=226)
	attr=s,na
	damage=80
	animtype=hard
	air.animtype=back
	fall.animtype=back
	air.type=low
	guardflag=ma
	hitflag=maf
	pausetime=13,13
	sparkxy=-10,-67
	;ad; sparkno=2+(random%4)*10
	;ad; guard.sparkno =40
	hitsound=300,2
	guardsound=41,0
	ground.type=high
	ground.slidetime=16
	ground.hittime=18
	air.hittime=18
	ground.velocity=-12
	air.velocity=    -5,-4
	getpower=50,25
	;---
	guard.ctrltime=     id +0*(var(31):=2 || var(30):= 510567 )
	fall.envshake.time= id
	fall.envshake.ampl= 0

[state 0]
	type=hitdef
	trigger1=((animelem=3) || (animelem=4)) && (anim=225)
	attr=s,na
	damage=80
	animtype=hard
	air.animtype=back
	fall.animtype=back
	air.type=low
	guardflag=ma
	hitflag=maf
	pausetime=13,13
	sparkxy=-10,-ifelse((animelem=3),75,108)
	;ad; sparkno=2+(random%4)*10
	;ad; guard.sparkno =40
	hitsound=300,2
	guardsound=41,0
	ground.type=low
	ground.slidetime=12
	ground.hittime=20
	air.hittime=20
	ground.velocity=-4
	air.velocity=   -4,-5
	getpower=50,25
	persistent=0
	;---
	guard.ctrltime=     id +0*(var(31):=2 || var(30):= 510500 +ifelse((animelem=3),75,108) )
	fall.envshake.time= id
	fall.envshake.ampl= 0

;---
[state 0]
	type=statetypeset
	trigger1=(animelem=5)
	movetype=i
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0
	ctrl=1


;--------------
; stand light kick

[statedef 230]
type=s
movetype=a
physics=s
anim=ifelse(p2bodydist x<20,230,240)
sprpriority=1
juggle=8
poweradd=10
velset=0,0
ctrl=0
facep2=1

[state 0]
	type=playsnd
	trigger1=time=2 && random<250
	value=0,(random%2)
	channel=0
[state 0]
	type=playsnd
	trigger1=time=2
	value=f200,1
	channel=1

[state 0]
	type=hitdef
	trigger1=(animelem=3)
	attr=s,na
	damage=25
	animtype=light
	air.animtype=back
	fall.animtype=back
	air.type=low
	guardflag=ma
	hitflag=maf
	pausetime=9,9
	sparkxy=-10,-ifelse((anim=230),30,92)
	;ad; sparkno=0+(random%4)*10
	;ad; guard.sparkno =40
	hitsound=300,1
	guardsound=40,0
	ground.type=low
	ground.slidetime=10
	ground.hittime=10
	air.hittime=10
	ground.velocity=-6
	air.velocity=   -4,-3
	getpower=20,10
	;---
	guard.ctrltime=     id +0*(var(31):=0 || var(30):= 510500 +ifelse((anim=230),30,92) )
	fall.envshake.time= id
	fall.envshake.ampl= 0

;---
[state 0]
	type=statetypeset
	trigger1=(animelem=4)
	movetype=i
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0
	ctrl=1


;---------------
; stand hard kick

[statedef 250]
type=s
movetype=a
physics=s
anim=ifelse(p2bodydist x<25,255,250)
sprpriority=1
juggle=8
poweradd=50
velset=0,0
ctrl=0
facep2=1

[state 0]
	type=playsnd
	trigger1=(animelem=4) && random<750
	value=0,2+(random%2)
	channel=0
[state 0]
	type=playsnd
	trigger1=time=4
	value=f200,3
	channel=1

[state 0]
	type=hitdef
	trigger1=(animelem=5) && (anim=250)
	attr=s,na
	damage=80
	animtype=hard
	air.animtype=back
	fall.animtype=back
	air.type=low
	guardflag=ma
	hitflag=maf
	pausetime=13,13
	sparkxy=-10,-94
	;ad; sparkno=2+(random%4)*10
	;ad; guard.sparkno =40
	hitsound=300,3
	guardsound=41,0
	ground.type=high
	ground.slidetime=16
	ground.hittime=18
	air.hittime=18
	ground.velocity=-12
	air.velocity=    -5,-4
	getpower=50,25
	;---
	guard.ctrltime=     id +0*(var(31):=2 || var(30):= 25510594 )
	fall.envshake.time= id
	fall.envshake.ampl= 0

[state 0]
	type=hitdef
	trigger1=(animelem=3) && (anim=255)
	attr=s,na
	damage=50
	animtype=hard
	air.animtype=back
	fall.animtype=back
	air.type=low
	guardflag=ma
	hitflag=maf
	pausetime=13,13
	sparkxy=-10,-110
	;ad; sparkno=2+(random%4)*10
	;ad; guard.sparkno =40
	hitsound=300,3
	guardsound=41,0
	ground.type=high
	ground.slidetime=12
	ground.hittime=20
	air.hittime=20
	ground.velocity=-4
	air.velocity=   -4,-5
	getpower=40,20
	;---
	guard.ctrltime=     id +0*(var(31):=2 || var(30):= 60510610 )
	fall.envshake.time= id
	fall.envshake.ampl= 0

[state 0]
	type=hitdef
	trigger1=(animelem=5) && (anim=255)
	attr=s,na
	damage=40
	animtype=hard
	air.animtype=back
	fall.animtype=back
	air.type=low
	guardflag=ma
	hitflag=maf
	pausetime=13,13
	sparkxy=-10,-79
	;ad; sparkno=2+(random%4)*10
	;ad; guard.sparkno =40
	hitsound=300,3
	guardsound=41,0
	ground.type=low
	air.type=low
	ground.slidetime=16
	ground.hittime=20
	air.hittime=20
	ground.velocity=-9
	air.velocity=   -5,-4
	getpower=40,20
	;---
	guard.ctrltime=     id +0*(var(31):=2 || var(30):= 30510579 )
	fall.envshake.time= id
	fall.envshake.ampl= 0

;---
[state 0]
	type=statetypeset
	trigger1=(animelem=6)
	movetype=i
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0
	ctrl=1


;---------------
; sa_kotsu_wari (fwd + LP)
; 
; i

[statedef 300]
type=s
movetype=a
physics=s
anim=300
sprpriority=1
juggle=3
poweradd=20
velset=0,0
ctrl=0
facep2=1

[state 0]
	type=width
	trigger1=1
	value=20,0

[state 0]
	type=playsnd
	trigger1=(animelem=4)
	value=f200,2
	channel=1
[state 0]
	type=playsnd
	trigger1=(animelem=4)
	value=0,1
	channel=0
[state 0]
	type=veladd
	trigger1=(animelem=3)
	x=6 *const(size.xscale)

;---
[state 0]
	type=hitdef
	trigger1=(animelem=4)
	attr=s,na
	damage=25
	animtype=medium
	air.animtype=back
	fall.animtype=back
	air.type=low
	guardflag=ha
	hitflag=maf
	pausetime=11,11
	sparkxy=-10,-82
	;ad; sparkno=0+(random%4)*10
	;ad; guard.sparkno =40
	hitsound=300,0
	guardsound=40,0
	ground.type=high
	ground.slidetime=10
	ground.hittime=15
	air.hittime=15
	ground.velocity=-4
	air.velocity=   -3,-3
	getpower=20,10
	;---
	guard.ctrltime=     id +0*(var(31):=0 || var(30):= 315510582 )
	fall.envshake.time= id
	fall.envshake.ampl= 0

[state 0]
	type=hitdef
	trigger1=(animelem=5)
	attr=s,na
	damage=25
	animtype=medium
	air.animtype=back
	fall.animtype=back
	air.type=low
	guardflag=ha
	hitflag=maf
	pausetime=11,11
	sparkxy=-10,-39
	;ad; sparkno=0+(random%4)*10
	;ad; guard.sparkno =40
	hitsound=300,0
	guardsound=40,0
	ground.type=low
	ground.slidetime=15
	ground.hittime=15
	air.hittime=15
	ground.velocity=-12
	air.velocity=   -4,-3
	getpower=20,10
	;---
	guard.ctrltime=     id +0*(var(31):=0 || var(30):= 315510539 )
	fall.envshake.time= id
	fall.envshake.ampl= 0

;---
[state 0]
	type=statetypeset
	trigger1=(animelem=6)
	movetype=i
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0
	ctrl=1


;--------------
; sa_kotsu_wari - cancel
; Ap

[statedef 301]
type=s
movetype=a
physics=s
anim=301
sprpriority=1
juggle=3
poweradd=0
velset=0,0
ctrl=0
facep2=1

[state 0]
	type=width
	trigger1=1
	value=20,0

[state 0]
	type=playsnd
	trigger1=(animelem=4)
	value=f200,2
	channel=1
[state 0]
	type=playsnd
	trigger1=(animelem=4)
	value=0,1
	channel=0
[state 0]
	type=veladd
	trigger1=(animelem=3)
	x=6 *const(size.xscale)

;---
[state 0]
	type=hitdef
	trigger1=(animelem=4)
	attr=s,na
	damage=18
	animtype=medium
	air.animtype=back
	fall.animtype=back
	air.type=low
	guardflag=ma
	hitflag=maf
	pausetime=9,9
	sparkxy=-10,-82
	;ad; sparkno=0+(random%4)*10
	;ad; guard.sparkno =40
	hitsound=300,0
	guardsound=40,0
	ground.type=high
	ground.slidetime=10
	ground.hittime=23
	air.hittime=23
	ground.velocity=-2
	air.velocity=   -2,-3
	getpower=0,0
	;---
	guard.ctrltime=     id +0*(var(31):=0 || var(30):= 315510582 )
	fall.envshake.time= id
	fall.envshake.ampl= 0

[state 0]
	type=hitdef
	trigger1=(animelem=5)
	attr=s,na
	damage=14
	animtype=hard
	air.animtype=back
	fall.animtype=back
	air.type=low
	guardflag=ma
	hitflag=maf
	pausetime=9,9
	sparkxy=-10,-39
	;ad; sparkno=0+(random%4)*10
	;ad; guard.sparkno =40
	hitsound=300,0
	guardsound=40,0
	ground.type=low
	ground.slidetime=12
	ground.hittime=23
	air.hittime=23
	ground.velocity=-5
	air.velocity=   -4,-3
	getpower=0,0
	;---
	guard.ctrltime=     id +0*(var(31):=0 || var(30):= 315510539 )
	fall.envshake.time= id
	fall.envshake.ampl= 0

;---
[state 0]
	type=statetypeset
	trigger1=(animelem=6)
	movetype=i
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0
	ctrl=1


;-------------
; mizoochi_kudaki (fwd + HP)
; ӂ

[statedef 310]
type=s
movetype=a
physics=s
anim=310
sprpriority=1
juggle=8
poweradd=30
velset=0,0
ctrl=0
facep2=1

[state 0]
	type=width
	trigger1=1
	value=20,0

[state 0]
	type=playsnd
	trigger1=(animelem=6)
	value=0,3
	channel=0
[state 0]
	type=playsnd
	trigger1=(animelem=6)
	value=f200,2
	channel=1

[state 0]
	type=velset
	trigger1=(animelem=4) || (animelem=5)
	x=6

;---
[state 0]
	type=hitdef
	trigger1=(animelem=6) || (animelem=7)
	attr=s,na
	damage=30
	animtype=hard
	air.animtype=back
	fall.animtype=back
	air.type=low
	guardflag=ma
	hitflag=maf
	pausetime=13,13
	sparkxy=-10,-60
	;ad; sparkno=2+(random%4)*10
	;ad; guard.sparkno =40
	hitsound=300,2
	guardsound=41,0
	ground.type=low
	ground.slidetime=12
	ground.hittime=18
	air.hittime=18
	ground.velocity=-4
	air.velocity=   -4,-4
	guard.velocity= -11
	getpower=40,20
	ground.cornerpush.veloff=0
	guard.cornerpush.veloff=0
	air.cornerpush.veloff=0
	;---
	guard.ctrltime=     id +0*(var(31):=2 || var(30):= 510560 )
	fall.envshake.time= id
	fall.envshake.ampl= 0

;---
[state 0]
	type=statetypeset
	trigger1=(animelem=8)
	movetype=i
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0
	ctrl=1


;--------------
; senpuu kyaku (fwd + LK)
; r

[statedef 320]
type=a
movetype=a
physics=n
anim=320
sprpriority=1
juggle=8
poweradd=20
velset=0,0
ctrl=0
facep2=1

[state 0]
	type=playsnd
	trigger1=(animelem=3)
	value=0,0
	channel=0
[state 0]
	type=playsnd
	trigger1=(animelem=5)
	value=f200,3
	channel=1

[state 0]
	type=velset
	trigger1=(animelem=2)
	x= ifelse(prevstateno=100,5,3)
	y=-4.5
[state 0]
	type=gravity
	trigger1=(animelem=2,>0)

[state 0]
	type=hitdef
	trigger1=(animelem=7)
	attr=s,na
	damage=32
	animtype=medium
	air.animtype=back
	fall.animtype=back
	air.type=low
	guardflag=ma
	hitflag=maf
	pausetime=11,11
	sparkxy=-10,-66
	;ad; sparkno=0+(random%4)*10
	;ad; guard.sparkno =40
	hitsound=300,1
	guardsound=40,0
	ground.type=high
	ground.slidetime=11
	ground.hittime=15
	air.hittime=15
	ground.velocity=-4
	air.velocity=   -4,-3
	getpower=30,15
	;---
	guard.ctrltime=     id +0*(var(31):=0 || var(30):= 510566 )
	fall.envshake.time= id
	fall.envshake.ampl= 0

;---
[state 0]
	type=statetypeset
	trigger1=(animelem=8)
	movetype=i
[state 0]
	type=changestate
	trigger1=(pos y+vel y>=0) && (vel y>0)
	value=52


;--------------
; crouch light punch

[statedef 400]
type=c
movetype=a
physics=c
anim=400
sprpriority=1
juggle=8
poweradd=10
velset=0,0
ctrl=0
facep2=1

[state 0]
	type=playsnd
	trigger1=time=2 && random<250
	value=0,(random%2)
	channel=0
[state 0]
	type=playsnd
	trigger1=time=2
	value=f200,0
	channel=1

[state 0]
	type=hitdef
	trigger1=(animelem=2)
	attr=c,na
	damage=25
	animtype=light
	air.animtype=back
	fall.animtype=back
	air.type=low
	guardflag=m
	hitflag=maf
	pausetime=9,9
	sparkxy=-10,-52
	;ad; sparkno=0+(random%4)*10
	;ad; guard.sparkno =40
	hitsound=300,0
	guardsound=40,0
	ground.type=low
	ground.slidetime=10
	ground.hittime=10
	air.hittime=10
	ground.velocity=-6
	air.velocity=   -4,-3
	getpower=20,10
	;---
	guard.ctrltime=     id +0*(var(31):=0 || var(30):= 510552 )
	fall.envshake.time= id
	fall.envshake.ampl= 0

;---
[state 0]
	type=statetypeset
	trigger1=(animelem=3)
	movetype=i
[state 0]
	type=changestate
	trigger1=animtime=0
	value=11
	ctrl=1


;--------------
; crouch hard punch

[statedef 420]
type=c
movetype=a
physics=c
anim=420
sprpriority=1
juggle=8
poweradd=50
velset=0,0
ctrl=0
facep2=1

[state 0]
	type=playsnd
	trigger1=time=3 && random<750
	value=0,2+(random%2)
	channel=0
[state 0]
	type=playsnd
	trigger1=time=4
	value=f200,2
	channel=1

[state 0]
	type=hitdef
	trigger1=(animelem=4)
	attr=c,na
	damage=80
	animtype=hard
	air.animtype=back
	fall.animtype=back
	air.type=low
	guardflag=m
	hitflag=maf
	pausetime=13,13
	sparkxy=-10,-70
	;ad; sparkno=2+(random%4)*10
	;ad; guard.sparkno =40
	hitsound=300,2
	guardsound=41,0
	ground.type=low
	ground.slidetime=12
	ground.hittime=18
	air.hittime=18
	ground.velocity=-6
	air.velocity=   -4,-5
	getpower=50,25
	;---
	guard.ctrltime=     id +0*(var(31):=2 || var(30):= 30510570 )
	fall.envshake.time= id
	fall.envshake.ampl= 0

[state 0]
	type=hitdef
	trigger1=(animelem=5) && (!movecontact)
	attr=s,na
	damage=80
	animtype=hard
	air.animtype=back
	fall.animtype=back
	air.type=low
	guardflag=ma
	hitflag=maf
	pausetime=13,13
	sparkxy=-10,-119
	;ad; sparkno=2+(random%4)*10
	;ad; guard.sparkno =40
	hitsound=300,2
	guardsound=41,0
	ground.type=high
	ground.slidetime=12
	ground.hittime=18
	ground.velocity=-6
	air.velocity=   -5,-4
	getpower=50,25
	;---
	guard.ctrltime=     id +0*(var(31):=2 || var(30):= 60510619 )
	fall.envshake.time= id
	fall.envshake.ampl= 0

;---
[state 0]
	type=statetypeset
	trigger1=(animelem=6)
	movetype=i
[state 0]
	type=changestate
	trigger1=animtime=0
	value=11
	ctrl=1


;--------------
; crouch light kick

[statedef 430]
type=c
movetype=a
physics=c
anim=430
sprpriority=1
juggle=8
poweradd=10
velset=0,0
ctrl=0
facep2=1

[state 0]
	type=playsnd
	trigger1=time=2 && random<250
	value=0,(random%2)
	channel=0
[state 0]
	type=playsnd
	trigger1=time=2
	value=f200,1
	channel=1

[state 0]
	type=hitdef
	trigger1=(animelem=2)
	attr=c,na
	damage=25
	animtype=light
	air.animtype=back
	fall.animtype=back
	air.type=low
	guardflag=l
	hitflag=maf
	pausetime=9,9
	sparkxy=-10,-5
	;ad; sparkno=0+(random%4)*10
	;ad; guard.sparkno =40
	hitsound=300,1
	guardsound=40,0
	ground.type=low
	ground.slidetime=10
	ground.hittime=10
	air.hittime=10
	ground.velocity=-6
	air.velocity=   -4,-3
	getpower=20,10
	;---
	guard.ctrltime=     id +0*(var(31):=0 || var(30):= 510505 )
	fall.envshake.time= id
	fall.envshake.ampl= 0

;---
[state 0]
	type=statetypeset
	trigger1=(animelem=3)
	movetype=i
[state 0]
	type=changestate
	trigger1=animtime=0
	value=11
	ctrl=1


;--------------
; crouch medium kick

[statedef 440]
type=c
movetype=a
physics=c
anim=440
sprpriority=1
juggle=8
poweradd=30
velset=0,0
ctrl=0
facep2=1

[state 0]
	type=playsnd
	trigger1=time=2 && random<500
	value=0,1+(random%2)
	channel=0
[state 0]
	type=playsnd
	trigger1=time=3
	value=f200,1
	channel=1
;---
[state 0]
	type=posadd
	trigger1=(animelem=1)
	x=12 *const(size.xscale)

;---
[state 0]
	type=hitdef
	trigger1=(animelem=4)
	attr=c,na
	damage=32
	animtype=medium
	air.animtype=back
	fall.animtype=back
	air.type=low
	guardflag=l
	hitflag=maf
	pausetime=11,11
	sparkxy=-10,-5
	;ad; sparkno=0+(random%4)*10
	;ad; guard.sparkno =40
	hitsound=300,1
	guardsound=40,0
	ground.type=low
	ground.slidetime=16
	ground.hittime=17
	air.hittime=17
	ground.velocity=-7
	air.velocity=   -4,-3
	getpower=30,15
	;---
	guard.ctrltime=     id +0*(var(31):=0 || var(30):= 510505 )
	fall.envshake.time= id
	fall.envshake.ampl= 0

;---
[state 0]
	type=statetypeset
	trigger1=(animelem=5)
	movetype=i
[state 0]
	type=changestate
	trigger1=animtime=0
	value=11
	ctrl=1


;--------------
; crouch hard kick

[statedef 450]
type=c
movetype=a
physics=c
anim=450
juggle=8
poweradd=50
velset=0,0
ctrl=0
facep2=1

[state 0]
	type=playsnd
	trigger1=time=3 && random<750
	value=0,2+(random%2)
	channel=0
[state 0]
	type=playsnd
	trigger1=(animelem=3)
	value=f200,3
	channel=1

[state 0]
	type=hitdef
	trigger1=(animelem=5)
	attr=c,na
	damage=80
	animtype=hard
	air.animtype=back
	fall.animtype=back
	air.type=low
	guardflag=l
	hitflag=maf
	pausetime=13,13
	sparkxy=-10,-10
	;ad; sparkno=2+(random%4)*10
	;ad; guard.sparkno =40
	hitsound=300,3
	guardsound=41,0
	ground.type=trip
	ground.slidetime=16
	ground.hittime=18
	air.hittime=18
	ground.velocity=-1,-6
	air.velocity=   -1,-6
	guard.velocity= -12
	getpower=50,25
	yaccel=0.5
	air.fall=1
	fall=1
	fall.recover=1
	air.recover=0
	;---
	guard.ctrltime=     id +0*(var(31):=2 || var(30):= 510510 )
	fall.envshake.time= id
	fall.envshake.ampl= 0

;---
[state 0]
	type=statetypeset
	trigger1=(animelem=6)
	movetype=i
[state 0]
	type=changestate
	trigger1=animtime=0
	value=11
	ctrl=1


;--------------
; air light punch

[statedef 600]
type=a
movetype=a
physics=a
anim=600
sprpriority=1
juggle=8
poweradd=10
ctrl=0

[state 0]
	type=playsnd
	trigger1=time=2 && random<250
	value=0,(random%2)
	channel=0
[state 0]
	type=playsnd
	trigger1=time=2
	value=f200,0
	channel=1

[state 0]
	type=hitdef
	trigger1=!time
	attr=a,na
	damage=25
	animtype=light
	air.animtype=back
	fall.animtype=back
	air.type=low
	guardflag=ha
	hitflag=maf
	pausetime=8,8
	sparkxy=-10,-50
	;ad; sparkno=0+(random%4)*10
	;ad; guard.sparkno =40
	hitsound=300,0
	guardsound=40,0
	ground.type=high
	ground.slidetime=10
	ground.hittime=10
	air.hittime=10
	ground.velocity=-5
	air.velocity=   -4,-3
	getpower=20,10
	persistent=0
	;---
	guard.ctrltime=     id +0*(var(31):=0 || var(30):= 510550 )
	fall.envshake.time= id
	fall.envshake.ampl= 0

;---
[state 0]
	type=statetypeset
	trigger1=(animelem=6)
	movetype=i

;--------------
; air medium punch / +up 2 punch

[statedef 605]
type=a
movetype=a
physics=a
anim=605
sprpriority=1
juggle=2
poweradd=20
ctrl=0

[state 0]
	type=playsnd
	trigger1=time=2 && random<500
	value=0,1+(random%2)
	channel=0
[state 0]
	type=playsnd
	trigger1=time=3
	value=f200,2
	channel=1

[state 0]
	type=hitdef
	trigger1=(animelem=2)
	attr=a,na
	damage=32
	animtype=medium
	air.animtype=back
	fall.animtype=back
	air.type=low
	guardflag=ha
	hitflag=maf
	pausetime=11,11
	sparkxy=-10,-84
	;ad; sparkno=0+(random%4)*10
	;ad; guard.sparkno =40
	hitsound=300,0
	guardsound=40,0
	ground.type=high
	ground.slidetime=15
	ground.hittime=15
	air.hittime=15
	ground.velocity=-3
	air.velocity=   -1,-4
	getpower=30,15
	;---
	guard.ctrltime=     id +0*(var(31):=0 || var(30):= 510584 )
	fall.envshake.time= id
	fall.envshake.ampl= 0

[state 0]
	type=hitdef
	trigger1=(animelem=3)
	attr=a,na
	damage=32
	animtype=medium
	air.animtype=back
	fall.animtype=back
	air.type=low
	guardflag=ha
	hitflag=maf
	pausetime=11,11
	sparkxy=-10,-127
	;ad; sparkno=0+(random%4)*10
	;ad; guard.sparkno =40
	hitsound=300,0
	guardsound=40,0
	ground.type=high
	ground.slidetime=15
	ground.hittime=15
	air.hittime=15
	ground.velocity=-5
	air.velocity=   -4,-4
	getpower=30,15
	;---
	guard.ctrltime=     id +0*(var(31):=0 || var(30):= 45510627 )
	fall.envshake.time= id
	fall.envshake.ampl= 0

;---
[state 0]
	type=statetypeset
	trigger1=(animelem=4)
	movetype=i


;--------------
; air hard punch

[statedef 620]
type=a
movetype=a
physics=a
anim=620
sprpriority=1
juggle=8
poweradd=50
ctrl=0

[state 0]
	type=playsnd
	trigger1=time=3 && random<750
	value=0,2+(random%2)
	channel=0
[state 0]
	type=playsnd
	trigger1=time=3
	value=f200,2
	channel=1

[state 0]
	type=hitdef
	trigger1=(animelem=3)
	attr=a,na
	damage=80
	animtype=hard
	air.animType=back
	fall.animType=back
	guardflag=ha
	hitflag=maf
	pausetime=13,13
	sparkxy=-10,-52
	;ad; sparkno=2+(random%4)*10
	;ad; guard.sparkno =40
	hitsound=300,2
	guardsound=41,0
	ground.type=high
	air.type=low
	ground.slidetime=16
	ground.hittime=18
	air.hittime=18
	ground.velocity=-7
	air.velocity=   -5,-4
	getpower=50,25
	;---
	guard.ctrltime=     id +0*(var(31):=2 || var(30):= 510552 )
	fall.envshake.time= id
	fall.envshake.ampl= 0

;---
[state 0]
	type=statetypeset
	trigger1=(animelem=4)
	movetype=i


;--------------
; air light kick

[statedef 630]
type=a
movetype=a
physics=a
anim=ifelse(vel x,630,635)
sprpriority=1
juggle=8
poweradd=10
ctrl=0

[state 0]
	type=playsnd
	trigger1=time=2 && random<250
	value=0,(random%2)
	channel=0
[state 0]
	type=playsnd
	trigger1=time=2
	value=f200,1
	channel=1

[state 0]
	type=hitdef
	trigger1=!time
	attr=a,na
	damage=25
	animtype=light
	air.animType=back
	fall.animType=back
	guardflag=ha
	hitflag=maf
	pausetime=9,9
	sparkxy=-10,-ifelse((anim=630),40,105)
	;ad; sparkno=0+(random%4)*10
	;ad; guard.sparkno =40
	hitsound=300,1
	guardsound=40,0
	ground.type=high
	air.type=low
	ground.slidetime=10
	ground.hittime=10
	air.hittime=10
	ground.velocity=-5
	air.velocity=   -4,-3
	getpower=20,10
	persistent=0
	;---
	guard.ctrltime=     id +0*(var(31):=0 || var(30):= 45510500 +ifelse((anim=630),40,105) )
	fall.envshake.time= id
	fall.envshake.ampl= 0

;---
[state 0]
	type=statetypeset
	trigger1=(animelem=6)
	movetype=i


;--------------
; air hard kick

[statedef 650]
type=a
movetype=a
physics=a
anim=ifelse(vel x,650,655)
sprpriority=1
juggle=8
poweradd=50
ctrl=0

[state 0]
	type=playsnd
	trigger1=time=2 && random<750
	value=0,2+(random%2)
	channel=0
[state 0]
	type=playsnd
	trigger1=time=3
	value=f200,3
	channel=1

[state 0]
	type=hitdef
	trigger1=!time
	attr=a,na
	damage=80
	animtype=hard
	air.animtype=back
	fall.animtype=back
	guardflag=ha
	hitflag=maf
	pausetime=13,13
	sparkxy=-10,-55
	;ad; sparkno=2+(random%4)*10
	;ad; guard.sparkno =40
	hitsound=300,3
	guardsound=41,0
	ground.type=high
	air.type=low
	ground.slidetime=16
	ground.hittime=18
	air.hittime=18
	ground.velocity=-8
	air.velocity=   -5,-4
	getpower=50,25
	persistent=0
	;---
	guard.ctrltime=     id +0*(var(31):=2 || var(30):= 510555 )
	fall.envshake.time= id
	fall.envshake.ampl= 0

;---
[state 0]
	type=statetypeset
	trigger1=(animelem=4) && (anim=280)
	trigger2=(animelem=8)
	movetype=i








;--------------
; throws
;--------------

[statedef 800]
type=s
movetype=a
physics=s
anim=800
sprpriority=1
juggle=15;;0
velset=0,0
ctrl=0
facep2=1

[state 0]
	type=varset
	trigger1=!time
	var(10)=(command="b")
[state 0]
	type=varset
	trigger1=!time && var(51)>0
	var(10)=(random<500)

[state 0]
	type=varset
	trigger1=!time
	var(11)=(command="holdfwd")
[state 0]
	type=varset
	trigger1=!time && var(51)>0
	var(11)=(random<500)

[state 0]
	type=hitdef
	trigger1=!time
	attr=s,nt
	hitflag=m-
	priority=3,miss
	sparkno=(var(31):=-1)
	hitsound=-1
	p1facing=1
	p2facing=1
	p1stateno=801
	p2stateno=802
	guard.dist=0
	fall=1
	fall.recover=0
	numhits=0
	hitonce=1

;---
[state 0]
	type=statetypeset
	trigger1=(animelem=3)
	movetype=i
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0
	ctrl=1


;-------------
; t-1 seoi_nage

[statedef 801]
type=s
movetype=a
physics=s
anim=801
velset=0,0
ctrl=0

;---
; grab_spark
[state 0]
	type=helper
	trigger1=(time=1) && (sysfvar(0)>0)
	id=152080
	stateno=152080
	postype=p1
	pos=floor(36*const(size.xscale)),floor(-72*const(size.yscale))
	size.xscale=1 ;w
	size.yscale=1 ;h
	size.height=100 ;type
	persistent=0
;---
; against_throw ; O
[state 0]
	type=changestate
	triggerall=(time=[1,2]) && numtarget
	triggerall=playeridexist(floor(sysfvar(0)))
	triggerall=playerid(floor(sysfvar(0))),stateno=90900 && playerid(floor(sysfvar(0))),var(17)>0
	trigger1=target,command="y"||target,command="b"
	trigger2=target,var(51)>0 && (random%2) && random<target,var(51)*118 ;*at
	value=190130

;---
[state 0]
	type=width
	trigger1=1
	value=46,46

;---
[state 0]
	type=turn
	trigger1=(animelem=1,=11) && var(11)
[state 0]
	type=targetfacing
	trigger1=(animelem=1,=11) && var(11)
	value=-1
[state 0]
	type=changestate
	trigger1=(animelem=1,=11) && var(10)
	value=811

;---
[state 0]
	type=playsnd
	trigger1=(animelem=5)
	value=0,1
	channel=0

;---
[state 0]
	type=targetbind
	trigger1=(animelem=1)
	pos=floor(45 *const(size.xscale)),0
	time=-1
[state 0]
	type=targetbind
	trigger1=(animelem=2)
	pos=floor(16 *const(size.xscale)), 0
	time=-1
[state 0]
	type=targetbind
	trigger1=(animelem=3)
	pos=floor(-15 *const(size.xscale)), floor(-98 *const(size.yscale))
	time=-1
[state 0]
	type=targetbind
	trigger1=(animelem=4)
	pos=floor(-28 *const(size.xscale)), floor(-82 *const(size.yscale))
	time=-1
[state 0]
	type=targetbind
	trigger1=(animelem=5)
	pos=floor(-68 *const(size.xscale)), floor(-82 *const(size.yscale))
	time=1
;---
[state 0]
	type=targetlifeadd
	trigger1=(animelem=5)
	value=-128

;---
[state 0]
	type=targetstate
	trigger1=!time
	value=802
[state 0]
	type=targetstate
	trigger1=(animelem=5)
	value=803
;---
[state 0]
	type=posadd
	trigger1=animtime=0
	x=13 *const(size.xscale)

[state 0]
	type=turn
	trigger1=animtime=0
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0
	ctrl=1

;------------- p2state
[statedef 802]
type=a
movetype=h
physics=n
sprpriority=0
velset=0,0
ctrl=0
[state 0]
	type=afterimagetime
	trigger1=!time
	time=0
[state 0]
	type=changeanim2
	trigger1=time=0
	value=802
;-------------
[statedef 803]
type=a
movetype=h
physics=n
velset=5,-1
ctrl=0
;[state 0]
;	type=nothitby
;	trigger1=1
;	value=sca
;	time=38
[state 0]
	type=selfstate
	trigger1=1
	value=5050


;--------------
; t-2 tomoe_nage

[statedef 811]
type=s
movetype=a
physics=s
anim=811
poweradd=0
velset=0,0
ctrl=0

;---
[state 0]
	type=playsnd
	trigger1=(animelem=5)
	value=0,2
	channel=0

;---
[state 0]
	type=targetbind
	trigger1=(animelem=1)
	pos=floor(45 *const(size.xscale)),0
	time=-1
[state 0]
	type=targetbind
	trigger1=(animelem=2)
	pos=floor(28 *const(size.xscale)),0
	time=-1
[state 0]
	type=targetbind
	trigger1=(animelem=3)
	pos=floor(12 *const(size.xscale)), floor(-70 *const(size.yscale))
	time=-1
[state 0]
	type=targetbind
	trigger1=(animelem=4)
	pos=floor(-20 *const(size.xscale)), floor(-66 *const(size.yscale))
	time=-1
[state 0]
	type=targetbind
	trigger1=(animelem=5)
	pos=floor(-86 *const(size.xscale)), floor(-62 *const(size.yscale))
	time=1
;---
[state 0]
	type=targetlifeadd
	trigger1=(animelem=5)
	value=-128

;---
[state 0]
	type=targetstate
	trigger1=!time
	value=812
[state 0]
	type=targetstate
	trigger1=(animelem=5)
	value=813

;---
[state 0]
	type=turn
	trigger1=(animelem=8)
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0
	ctrl=1

;------------- p2state
[statedef 812]
type=a
movetype=h
physics=n
sprpriority=0
velset=0,0
ctrl=0
[state 0]
	type=changeanim2
	trigger1=time=0
	value=812
[state 0]
	type=angledraw
	trigger1=(animelem=4,>=0)
	value=-90
	ignorehitpause=1

;-------------
[statedef 813]
type=a
movetype=h
physics=n
velset=4,-2
ctrl=0
;[state 0]
;	type=nothitby
;	trigger1=1
;	value=sca
;	time=38
[state 0]
	type=selfstate
	trigger1=1
	value=5050







;-------------------------
; overwrite common1.cns
;-------------------------

; hit_fallrecover(on the ground)

[statedef 5201]
type=s
movetype=i
physics=n
anim=5200
velset=0,0
ctrl=0

[state 0]
	type=posset
	trigger1=!time
	y=0

; turn if not facing opponent
[state 0]
	type=turn
	trigger1=!time && (p2dist x<-6)

[state 0]
	type=velset
	trigger1=time=0
	x=-5
[state 0]
	type=velmul
	trigger1=(animelem=4,>0)
	x=0.85
[state 0]
	type=playsnd
	trigger1=time=1
	value=0,0
	channel=0
[state 0]
	type=palfx
	trigger1=!time
	add=128,128,128
	time=2
[state 0]
	type=nothitby
	trigger1=1
	value=sca
[state 0]
	type=changestate
	trigger1=!animtime
	value=0
	ctrl=1



;-------------------------
; fall-down
;  KO

[statedef 195200]
type=s
movetype=h
physics=s
anim=195200
velset=0,0
ctrl=0
[state 0]
	type=nothitby
	trigger1=1
	value=sca
[state 0]
	type=posadd
	trigger1=animtime=0
	x=-30 *const(size.xscale)
[state 0]
	type=selfstate
	trigger1=animtime=0
	value=5110
	ctrl=0


;[EOF]
