
; normal

;v05:    temp level
;v06-09: temp

;-------------
; win
[statedef 180]
type=s
velset=0,0
ctrl=0

[state 0]
	type=changestate
	trigger1=!time
	value=181

;-------------
; win-(1-7)
[statedef 181]
type=s
physics=s
anim=180+(random%6)
velset=0,0
ctrl=0

[state 0]
	type=assertspecial
	trigger1=time<280
	flag=roundnotover
;---
[state 0]
	type=playsnd
	trigger1=(animelem=11) && (anim=180)
	value=180,0 ;; "konnatokodane"
	channel=0
;---
[state 0]
	type=playsnd
	trigger1=(animelem=3) && (anim=181)
	value=181,0 ;; "ahaha"
	channel=0
[state 0]
	type=playsnd
	trigger1=(animelem=3) && (anim=181)
	value=f200,0
	channel=1
;---
[state 0]
	type=playsnd
	trigger1=(animelem=3) && (anim=[182,183])
	value=0,1 ;; "da-"
	channel=0
[state 0]
	type=playsnd
	trigger1=(animelem=9) && (anim=[182,183])
	value=0,2 ;; "teya-"
	channel=0
[state 0]
	type=playsnd
	trigger1=(animelem=19) && (anim=[182,183])
	value=3100,1 ;; "tah-"
	channel=0
[state 0]
	type=playsnd
	trigger1=((animelem=3)||(animelem=9)) && (anim=[182,183])
	value=f200,1
	channel=1
[state 0]
	type=playsnd
	trigger1=(animelem=19) && (anim=[182,183])
	value=f200,0
	channel=1
;---
[state 0] ;; shoo1
	type=projectile
	trigger1=(animelem=9) && (anim=183)
	projanim=18180
	projsprpriority=2
	postype=p1
	offset=floor(67*const(size.xscale)),floor(-95*const(size.yscale))
	projedgebound=800
	projstagebound=800
	projscale=const(size.xscale),const(size.yscale)
	projshadow=-1
	projremovetime=68
	velocity=-const(size.xscale), -3.2
	accel=0, 0.1
	persistent=0
[state 0] ;; shoo2
	type=projectile
	trigger1=(animelem=9,=68) && (anim=183)
	projanim=18180
	projhitanim=18181
	projsprpriority=2
	postype=p1
	offset=floor(4*const(size.xscale)),floor(-84*const(size.yscale))
	projedgebound=800
	projstagebound=800
	projscale=const(size.xscale),const(size.yscale)
	projshadow=-1
	velocity=-const(size.xscale), -2.4
	accel=0, 0.1
	persistent=0
[state 0]
	type=changeanim
	trigger1=(animelem=9,=68) && (anim=183)
	value=anim
	elem=19
	persistent=0




;-------------
; intro

[statedef 190]
type=s
physics=s
velset=0,0
ctrl=0

[state 0]
	type=changestate
	triggerall=!time && numenemy
	trigger1=enemy,name="ryu" || enemy,name="ryu3"
	value=19192
[state 0]
	type=changestate
	triggerall=!time && numenemy
	trigger1=enemy,name="yuri"
	value=19191
[state 0]
	type=changestate
	triggerall=!time && numenemy
	trigger1=enemy,name="dan" || enemy,name="karin" || enemy,name="athena"
	value=19190

[state 0]
	type=changestate
	trigger1=!time
	value=191+(random<250)


;-------------
; intro-(1-3)
[statedef 191]
type=s
physics=s
anim=190+(random%3)
velset=0,0
ctrl=0

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

[state 0]
	type=playsnd
	trigger1=(animelem=9) && (anim=[190,191])
	trigger2=(animelem=21) && (anim=192)
	value=190,0 ;; "oshi yikuzo-"
	channel=0
[state 0]
	type=playsnd
	trigger1=(animelem=10) && (anim=190)
	trigger2=(animelem=12) && (anim=191)
	trigger3=(animelem=22) && (anim=192)
	value=f200,0
	channel=1

[state 0]
	type=playsnd
	trigger1=((animelem=4) || (animelem=8)) && (anim=191)
	value=f300,0
	channel=2

[state 0]
	type=posadd
	trigger1=((animelem=3) || (animelem=11)) && (anim=192)
	y=-5
[state 0]
	type=posset
	trigger1=((animelem=9) || (animelem=18)) && (anim=192)
	y=0

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

;-------------
; intro-4 run
[statedef 192]
type=s
physics=n
velset=0,0
ctrl=0

[state 0]
	type=assertspecial
	trigger1=1
	flag=intro
[state 0]
	type=screenbound
	trigger1=1
	value=0
[state 0]
	type=playerpush
	trigger1=1
	value=0
[state 0]
	type=assertspecial
	trigger1=time<=10
	flag=invisible
	ignorehitpause=1

[state 0]
	type=changeanim
	trigger1=time=10
	value=100
[state 0]
	type=changeanim
	trigger1=(anim=100) && time=60
	value=101 ;; stop
[state 0]
	type=posadd
	trigger1=time=10
	x=280 ;; 5*50+30
[state 0]
	type=turn
	trigger1=time=10
[state 0]
	type=turn
	trigger1=(anim=101) && (animtime=0)
	persistent=0
[state 0]
	type=velset
	trigger1=(anim=100) && (animelem=1)
	x=5 ;; 5x50+30
	persistent=0
[state 0]
	type=veladd
	trigger1=(vel x>0) && time>60 ;; 30
	x=-0.25
[state 0]
	type=velset
	trigger1=time=67 ;; 60+ (n:=n+n*0.25)
;;op;	trigger2=(anim=101) && (animtime=0) ;; for_safety
	x=0
[state 0]
	type=changeanim
	trigger1=(animtime=0) && (anim=101)
	value=5
;---
[state 0]
	type=playsnd
	trigger1=(animelem=2) && (anim=100)
	value=193,0 ;; "yisoge- yotto"
	channel=0
[state 0]
	type=playsnd
	trigger1=((animelem=3)||(animelem=6)) && (anim=100)
	value=f100,0
	channel=1
[state 0]
	type=playsnd
	trigger1=(animelem=1) && (anim=101)
	value=f200,1
	channel=1
	persistent=0
;---
[state 0] ; dash_dust
	type=helper
	trigger1=(anim=101) && (animelem=3) && (sysfvar(0)>0)
	id=152040
	stateno=152040
	pos=floor(45*const(size.xscale)),0
	size.xscale=-0.35
	size.yscale= 0.35
	persistent=0

[state 0]
	type=changestate
	trigger1=(animtime=0) && (anim=5)
	value=0




;-------------
; special intro

; vs. karin,dan,athena

[statedef 19190]
type=s
physics=s
anim=19190
velset=0,0
ctrl=0
[state 0]
	type=assertspecial
	trigger1=1
	flag=intro
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0

;-------------
; vs. yuri
[statedef 19191]
type=s
physics=s
anim=19191
velset=0,0
ctrl=0
[state 0]
	type=assertspecial
	trigger1=1
	flag=intro
[state 0]
	type=playsnd
	trigger1=(animelem=23)||(animelem=28)
	value=192,0+(animelem=28) ;; "kotirakoso-yoroshiku-"
	channel=0
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0

;-------------
; vs. ryu
[statedef 19192]
type=s
physics=s
anim=19192
velset=0,0
ctrl=0
[state 0]
	type=assertspecial
	trigger1=1
	flag=intro
[state 0]
	type=playsnd
	trigger1=(animelem=3)
	value=192,1 ;; "yoroshiku-"
	channel=0
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0













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

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

[state 0]
	type=playsnd
	trigger1=(animelem=3)
	value=195,0 ;; "uhuhu"
	channel=0

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

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





;-------------
; normal
;-------------

; p`
; slp

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

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

[state 0]
	type=hitdef
	trigger1=time=0
	attr=s,na
	hitflag=maf
	guardflag=ma
	animtype=light
	air.animtype=back
	fall.animtype=back
	air.type=low
	damage=25
	pausetime=9,9
	;ad; sparkno =0+(random%4)*10
	;ad; guard.sparkno =40
	sparkxy=-10,-ifelse((anim=200),72,65)
	hitsound=300,0
	guardsound=40,0
	ground.type=high
	ground.slidetime=10
	ground.hittime=11
	air.hittime=11
	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),72,65) )
	fall.envshake.time= id
	fall.envshake.ampl= 0

;---
[state 0]
	type=statetypeset
	trigger1=(animelem=3) && (anim=200)
	trigger2=(animelem=4) && (anim=205)
	movetype=i
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0
	ctrl=1


;-------------
; p`
; slp

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

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

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

;---
[state 0]
	type=statetypeset
	trigger1=(animelem=4) && (anim=220)
	trigger2=(animelem=6) && (anim=225)
	movetype=i
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0
	ctrl=1


;-------------
; LbN
; slk

[statedef 230]
type=s
movetype=a
physics=s
anim=230
juggle=8
poweradd=10
velset=0,0
ctrl=0
facep2=1

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

[state 0]
	type=hitdef
	trigger1=time=0 ;; (animelem=3)
	attr=s,na
	hitflag=maf
	guardflag=ma
	animtype=light
	air.animtype=back
	fall.animtype=back
	air.type=low
	damage=25
	pausetime=9,9
	;ad; sparkno =0+(random%4)*10
	;ad; guard.sparkno =40
	sparkxy=-20,-35
	hitsound=300,1
	guardsound=40,0
	ground.type=low
	ground.slidetime=10
	ground.hittime=11
	air.hittime=11
	ground.velocity=-6
	air.velocity=   -4,-3
	getpower=20,10
	persistent=0
	;---
	guard.ctrltime=     id +0*(var(31):=0 || var(30):= 510535 )
	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


;-------------
; LbN
; shk

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

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

[state 0]
	type=hitdef
	trigger1=time=0 ;;(animelem=3)
	attr=s,na
	hitflag=maf
	guardflag=ma
	animtype=heavy
	air.animtype=back
	fall.animtype=back
	air.type=low
	damage=80
	pausetime=13,13
	;ad; sparkno =2+(random%4)*10
	;ad; guard.sparkno =40
	sparkxy=-20,-62
	hitsound=300,3
	guardsound=41,0
	ground.type=low
	ground.slidetime=16
	ground.hittime=18
	air.hittime=18
	ground.velocity=-ifelse((anim=255),8,11)
	air.velocity=   -5,-4
	getpower=50,25
	persistent=0
	;---
	guard.ctrltime=     id +0*(var(31):=2 || var(30):= 510562 )
	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





;-------------
;-------------
; Ⴊݎp`
; clp

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

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

[state 0]
	type=hitdef
	trigger1=time=0 ;; (animelem=2)
	attr=c,na
	hitflag=maf
	guardflag=ma
	animtype=light
	air.animtype=back
	fall.animtype=back
	air.type=low
	damage=25
	pausetime=9,9
	;ad; sparkno =0+(random%4)*10
	;ad; guard.sparkno =40
	sparkxy=-10,-38
	hitsound=300,0
	guardsound=40,0
	ground.type=low
	ground.slidetime=10
	ground.hittime=11
	air.hittime=11
	ground.velocity=-6
	air.velocity=   -4,-3
	getpower=20,10
	persistent=0
	;---
	guard.ctrltime=     id +0*(var(31):=0 || var(30):= 510538 )
	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


;-------------
; Ⴊ݋p`
; chp

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

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

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

[state 0]
	type=hitdef
	trigger1=(animelem=3) && (!movecontact)
	attr=c,na
	hitflag=maf
	guardflag=ma
	animtype=heavy
	air.animtype=back
	fall.animtype=back
	air.type=low
	damage=80
	pausetime=13,13
	;ad; sparkno =2+(random%4)*10
	;ad; guard.sparkno =40
	sparkxy=-10,-70
	hitsound=300,2
	guardsound=41,0
	ground.type=low
	ground.slidetime=15
	ground.hittime=18
	air.hittime=18
	ground.velocity=-10
	air.velocity=   -4,-5
	getpower=50,25
	persistent=0
	;---
	guard.ctrltime=     id +0*(var(31):=2 || var(30):= 30510570 )
	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


;-------------
; ႪݎLbN
; clk

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

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

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


;-------------
; ႪݒLbN
; cmk

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

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

[state 0]
	type=hitdef
	trigger1=time=0 ;; (animelem=2)
	attr=c,na
	hitflag=maf
	guardflag=l
	animtype=medium
	air.animtype=back
	fall.animtype=back
	air.type=low
	damage=32
	pausetime=11,11
	;ad; sparkno =0+(random%4)*10
	;ad; guard.sparkno =40
	sparkxy=-10,-38
	hitsound=300,1
	guardsound=40,0
	ground.type=low
	ground.slidetime=14
	ground.hittime=16
	air.hittime=16
	ground.velocity=-7
	air.velocity=   -4,-4
	getpower=30,15
	persistent=0
	;---
	guard.ctrltime=     id +0*(var(31):=0 || var(30):= 510538 )
	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


;-------------
; Ⴊ݋LbN
; chk

[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=(animelem=2,=1)
	value=f200,3
	channel=1
[state 0]
	type=playsnd
	trigger1=(animelem=2,=1)
	value=0,1+(random%2)
	channel=0

[state 0]
	type=hitdef
	trigger1=time=0
	attr=c,na
	hitflag=maf
	guardflag=l
	animtype=heavy
	air.animtype=back
	fall.animtype=back
	air.type=low
	damage=80
	pausetime=13,13
	;ad; sparkno =2+(random%4)*10
	;ad; guard.sparkno =40
	sparkxy=-10,-8
	hitsound=300,3
	guardsound=41,0
	ground.type=trip
	ground.slidetime=16
	ground.hittime=18
	air.hittime=18
	ground.velocity=-2,-5
	air.velocity=   -2,-5
	guard.velocity= -11
	getpower=50,25
	yaccel=0.5
	air.fall=1
	fall=1
	persistent=0
	;---
	guard.ctrltime=     id +0*(var(31):=2 || var(30):= 510508 )
	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=11
	ctrl=1





;-------------
;-------------
; Wvp`
; jlp

[statedef 600]
type=a
movetype=a
physics=a
anim=ifelse(vel x,600,610)
juggle=8
poweradd=10
ctrl=0

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

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

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


;-------------
; Wvp`
; jhp

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

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

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

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


;-------------
; WvLbN
; jlk

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

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

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

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


;-------------
; WvLbN
; jhk

[statedef 650]
type=a
movetype=a
physics=a
anim=650
juggle=8
poweradd=50
ctrl=0

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

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

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



;-------------
; t[LbN
; F+A

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

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

[state 0]
	type=playsnd
	trigger1=(animelem=3)
	value=f200,1
	channel=1
[state 0]
	type=playsnd
	trigger1=(animelem=4)
	value=0,1
	channel=0
;---
[state 0]
	type=width
	trigger1=(animelem=2,<0)
	edge=12,12
;---
[state 0]
	type=posadd
	trigger1=(animelem=1)
	x=15 *const(size.xscale)
[state 0]
	type=posadd
	trigger1=(animelem=2)
	x=10 *const(size.xscale)
[state 0]
	type=posadd
	trigger1=(animelem=3)||(animelem=4)
	x=5 *const(size.xscale)
[state 0]
	type=posadd
	trigger1=(animelem=8)
	x=-15 *const(size.xscale)
[state 0]
	type=posadd
	trigger1=(animelem=9)
	x=-10 *const(size.xscale)
;---
[state 0]
	type=hitdef
	trigger1=(animelem=5) || ((animelem=6) && !movecontact)
	attr=s,na
	hitflag=maf
	guardflag=ha
	animtype=medium
	air.animtype=back
	fall.animtype=back
	air.type=low
	damage=32
	pausetime=11,11
	;ad; sparkno =0+(random%4)*10
	;ad; guard.sparkno =40
	sparkxy=-15,-ifelse((animelem=5),62,35)
	hitsound=300,1
	guardsound=40,0
	ground.type=low
	ground.slidetime=14
	ground.hittime=15
	air.hittime=15
	ground.velocity=-10
	air.velocity=   -4,-4
	getpower=30,15
	;---
	guard.ctrltime=     id +0*(var(31):=0 || var(30):= 515500 +ifelse((animelem=5),62,35) )
	fall.envshake.time= id
	fall.envshake.ampl= 0

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

;-------------
; t[LbN(LZp)
[statedef 301]
type=s
movetype=a
physics=s
anim=301
juggle=0
poweradd=0
velset=0,0
ctrl=0

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

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

[state 0]
	type=playsnd
	trigger1=(animelem=4)
	value=0,1
	channel=0
;---
[state 0]
	type=width
	trigger1=(animelem=2,<0)
	edge=12,12
;---
[state 0]
	type=posadd
	trigger1=(animelem=1)
	x=15 *const(size.xscale)
[state 0]
	type=posadd
	trigger1=(animelem=2)
	x=10 *const(size.xscale)
[state 0]
	type=posadd
	trigger1=(animelem=3)||(animelem=4)
	x=5 *const(size.xscale)
[state 0]
	type=posadd
	trigger1=(animelem=8)
	x=-15 *const(size.xscale)
[state 0]
	type=posadd
	trigger1=(animelem=9)
	x=-10 *const(size.xscale)
;---
[state 0]
	type=hitdef
	trigger1=(animelem=6)
	attr=s,na
	hitflag=maf
	guardflag=ma
	animtype=medium
	air.animtype=back
	fall.animtype=back
	air.type=low
	damage=16
	pausetime=11,11
	;ad; sparkno =0+(random%4)*10
	;ad; guard.sparkno =40
	sparkxy=-15,-35
	hitsound=300,1
	guardsound=40,0
	ground.type=low
	ground.slidetime=13
	ground.hittime=18
	air.hittime=18
	ground.velocity=-7
	air.velocity=   -3,-4
	getpower=0,0
	persistent=0
	;---
	guard.ctrltime=     id +0*(var(31):=0 || var(30):= 515535 )
	fall.envshake.time= id
	fall.envshake.ampl= 0

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





;-------------
; throw
;-------------
; 

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

[state 0]
	type=varset
	trigger1=time=0
	var(5)=(command="b")
[state 0]
	type=varset
	trigger1=time=0
	var(6)=(command="holdback")

[state 0]
	type=hitdef
	trigger1=time=0 && (p2stateno!=[150,155]) && p2movetype!=h
	attr=s,nt
	hitflag=m-
	priority=3,miss
	sparkno=(var(31):=-1)
	p1facing=1
	p2facing=1
	p1stateno=801
;;op;	p2stateno=805
	guard.dist=0
	getpower=0,0
	hitsound=-1
	hitonce=1

[state 0]
	type=playsnd
	trigger1=(animelem=3)
	value=0,10 ;; "are-?"
	channel=0
[state 0]
	type=playsnd
	trigger1=(animelem=4)
	value=f200,0
	channel=1

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


;-------------
; i

[statedef 801]
type=s
movetype=a
physics=n
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(-71*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=turn
	trigger1=(animelem=2) && var(6)
[state 0]
	type=targetfacing
	trigger1=(animelem=2) && var(6)
	value=-1

[state 0]
	type=changestate
	trigger1=(animelem=2) && var(5)
	value=811

;---
[state 0]
	type=targetstate
	trigger1=time=0
	value=805

[state 0]
	type=targetstate
	trigger1=(animelem=7)
	value=807
[state 0]
	type=targetstate
	trigger1=(animelem=11)
	value=806

;---
[state 0]
	type=varset
	trigger1=time=0
	var(33)=0
[state 0]
	type=varadd
	trigger1=(animelem=8)
	var(33)=1

[state 0]
	type=width
	trigger1=time=0
	edge=42,42

[state 0]
	type=playsnd
	trigger1=(animelem=8)
	value=1,0 ;; se
	channel=2
[state 0]
	type=playsnd
	trigger1=(animelem=8)
	value=0,1
	channel=0

;---
[state 0]
	type=bindtotarget
	trigger1=(animelem=2,<0)
	pos=floor(36*const(size.xscale)),0
	time=1
[state 0]
	type=bindtotarget
	trigger1=(animelem=2,>=0) && (animelem=3,<0)
	pos=floor(-26*const(size.xscale)),0
	time=1
[state 0]
	type=bindtotarget
	trigger1=(animelem=3,>=0) && (animelem=4,<0)
	pos=floor(-26*const(size.xscale)),floor(80*const(size.yscale)),head
	time=1

;---
[state 0]
	type=targetlifeadd
	trigger1=(animelem=8)
	value=-15
	kill=0

[state 0]
	type=changestate
	trigger1=(animtime=0) && var(33)>5
	value=802

;-------------
; 
[statedef 802]
type=s
movetype=a
physics=n
anim=802
velset=0,0
ctrl=0

[state 0]
	type=targetstate
	trigger1=(animelem=5)
	value=808

;;--- hit_spark
[state 0] ; hit/guard_spark
	type=helper
	trigger1=(animelem=5) && (sysfvar(0)>0)
	id=152100
	stateno=152100
	helpertype=normal
	ownpal=0
	keyctrl=0
	postype=p1
	pos=floor(-28*const(size.xscale)),floor(-60*const(size.yscale))
	size.height=2 ;; hit/guard_spark
	ignorehitpause=1
	facing=-1

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

[state 0]
	type=veladd
	trigger1=(animelem=6,>=0)
	y=0.45

;---
[state 0]
	type=targetlifeadd
	trigger1=(animelem=5)
	value=-35

[state 0]
	type=turn
	trigger1=(animelem=6,>=0)
	trigger1=(pos y+vel y>=0) && (vel y>0)
[state 0]
	type=changestate
	trigger1=(animelem=6,>=0)
	trigger1=(pos y+vel y>=0) && (vel y>0)
	value=1105 ;; land


;-------------
; i - 
[statedef 805]
type=a
movetype=h
physics=n
sprpriority=-1
velset=0,0
ctrl=0
[state 0]
	type=afterimagetime
	trigger1=!time
	time=0
[state 0]
	type=changeanim2
	trigger1=time=0
	value=805
;-------------
[statedef 806]
type=a
movetype=h
physics=n
sprpriority=-1
velset=0,0
ctrl=0
[state 0]
	type=nothitby
	trigger1=1
	value=sca
[state 0]
	type=changeanim
	trigger1=1
	value=5000
;-------------
[statedef 807]
type=a
movetype=h
physics=n
sprpriority=-1
velset=0,0
ctrl=0
[state 0]
	type=nothitby
	trigger1=1
	value=sca
[state 0]
	type=changeanim
	trigger1=1
	value=5001
;-------------
[statedef 808]
type=a
movetype=h
physics=n
anim=5010
sprpriority=-1
velset=0,0
ctrl=0
[state 0]
	type=nothitby
	trigger1=1
	value=sca
	time=38
[state 0]
	type=posadd
	trigger1=1
	x=4*ifelse(time%2=0,1,-1)
[state 0]
	type=velset
	trigger1=(animtime=0) || time>16
	x= 4
	y=-6
[state 0]
	type=turn
	trigger1=(animtime=0) || time>16
[state 0]
	type=selfstate
	trigger1=(animtime=0) || time>16
	value=5100








;-------------
; Z[[V[g

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

[state 0]
	type=targetstate
	trigger1=time=0
	value=815

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

[state 0]
	type=playsnd
	trigger1=(animelem=5)
	value=0,3 ;; "yo"
	channel=0

;;--- hit_spark
[state 0] ; hit/guard_spark
	type=helper
	trigger1=(animelem=5) && (sysfvar(0)>0)
	id=152100
	stateno=152100
	helpertype=normal
	ownpal=0
	keyctrl=0
	postype=p1
	pos=floor(66*const(size.xscale)),floor(-45*const(size.yscale))
	size.height=2 ;; hit/guard_spark
	ignorehitpause=1
	facing=-1

;---
[state 0]
	type=bindtotarget
	trigger1=(animelem=4,<0)
	pos=floor(18*const(size.xscale)),floor(72*const(size.yscale)),head
	time=1
[state 0]
	type=bindtotarget
	trigger1=(animelem=4,>=0) && (animelem=6,<0)
	pos=floor(20*const(size.xscale)),floor(70*const(size.yscale)),head
	time=1

;---
[state 0]
	type=targetlifeadd
	trigger1=(animelem=6)
	value=-115

[state 0]
	type=velset
	trigger1=(animelem=6)
	x=-4
	y=-5
[state 0]
	type=veladd
	trigger1=(animelem=6,>0)
	y=0.45

[state 0]
	type=changestate
	trigger1=(animelem=6,>0)
	trigger1=(pos y+vel y>=0) && (vel y>0)
	value=1105 ;; land



;-------------
; Z[[V[g-

[statedef 815]
type=a
movetype=h
physics=n
sprpriority=-1
velset=0,0
ctrl=0
[state 0]
	type=afterimagetime
	trigger1=!time
	time=0
[state 0]
	type=changeanim2
	trigger1=time=0
	value=815
[state 0]
	type=nothitby
	trigger1=1
	value=sca
	time=36
[state 0]
	type=velset
	trigger1=animtime=0
	x=-6.5
	y=-3
[state 0]
	type=selfstate
	trigger1=animtime=0
	value=5050








;-------------
; hit_fallrecover(on the ground)
; ^E(n)
;-------------

[statedef 5201]
type=s
movetype=h
physics=n
velset=0,0
ctrl=0

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

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

[state 0]
	type=nothitby
	trigger1=1
	value=sca

[state 0]
	type=palfx
	trigger1=time=0
	time=2
	add=128,128,128

[state 0]
	type=playsnd
	trigger1=time=0
	value=0,5 ;; "makeruka"
	channel=0

[state 0]
	type=changestate
	trigger1=time=0
	value=115


;-------------
; ko
[statedef 195200]
physics=s
movetype=h
anim=195200
velset=0,0
ctrl=0

[state 0]
	type=nothitby
	trigger1=1
	value=sca

[state 0]
	type=posadd
	trigger1=(animelem=2)
	x=15 *const(size.xscale)
[state 0]
	type=posadd
	trigger1=(animelem=8)
	x=-8 *const(size.xscale)
[state 0]
	type=posadd
	trigger1=(animelem=9)
	x=-12 *const(size.xscale)

[state 0]
	type=selfstate
	trigger1=animtime=0
	value=5110 ;; 5150



;[EOF]
