
; v0 : temp ; 
; v1 : level ; Z
; v2 : power-up
; v4-5 : _b

; v41 : R{ELZEXCb`
; v42,v51 : ai flag
; v55 : score

; v10-19: temp eff-pos x / y
; fv0-5: temp eff-scale / vel


;--------------
;--- 

[statedef 180]
type=s
velset=0,0
ctrl=0

[state 0]
	type=assertspecial
	trigger1=time<231
	flag=roundnotover
[state 0]
	type=varset
	trigger1=!time
	var(0)=(random%4)
[state 0]
	type=changestate
	triggerall=numenemy
	trigger1=enemy,name="sagat"
	value=185
;---
[state 0]
	type=changeanim
	trigger1=!time
	value=181+var(0)
[state 0]
	type=playsnd
	trigger1=(animelem=5) && (var(0)=[0,1])
	value=6,(random%3)
	channel=0
[state 0]
	type=playsnd
	trigger1=(animelem=3) && (var(0)=[2,3])
	value=6,4+(random%3)
	channel=0

; 6,0 :[y!]
; 6,1 :[܂!]
; 6,2 :[ꂪŋ!]
; 6,4 :[[]T!]
; 6,5 :[[]T]
; 6,6 :[]T!]


;--------------
;---  vs. sagat

[statedef 185]
type=s
physics=s
anim=181
velset=0,0
ctrl=0
[state 0]
	type=assertspecial
	trigger1=time<221
	flag=roundnotover
[state 0]
	type=playsnd
	trigger1=(animelem=5)
	value=6,3 ; [A₶!]
	channel=0
; 
[state 0]
	type=explod
	trigger1=(animelem=5)
	trigger1=1|| var(10):=30 || var(11):=-90 || fvar(1):=0 || fvar(2):=0
	trigger2=(animelem=7)||(animelem=9)||(animelem=12)
	trigger2=1|| var(10):=30-(random%10) || var(11):=-92+(random%5) || fvar(1):=-1.5-(random%20)/15.0 || fvar(2):=0.5+((random%100)-50)/100.0
	anim=1640
	sprpriority=7
	ownpal=1
	postype=p1
	pos=floor(var(10)*const(size.xscale)),floor(var(11)*const(size.yscale))
	vel=fvar(1),fvar(2)
	scale=const(size.xscale),const(size.yscale)


;-------------
;--- Cg ; intro

[statedef 191]
type=a
movetype=i
physics=n

[state 0]
	type=changestate
	triggerall=!time && numenemy
	trigger1=enemy,name="sagat"
	value=194
[state 0]
	type=changestate
	triggerall=!time && numenemy
	trigger1=enemy,name="joe"
	value=10195
[state 0]
	type=changestate
	triggerall=!time && numenemy
	trigger1=enemy,name="chang"
	value=10192
[state 0]
	type=changestate
	triggerall=!time && numenemy
	trigger1=enemy,name="yuri"
	value=10196

;;	trigger1=enemy,name="sakura"
;;	value=10197
;;	trigger1=enemy,name="ryu" || enemy,name="ken"
;;	value=10198
;;	trigger1=enemy,name="gouki"
;;	value=10199

[state 0]
	type=changestate
;@	triggerall=!time && numenemy
;@	triggerall=enemy,name="blanka"

;@	trigger1=(enemy,teammode=single) || (enemy,teammode=turns)
;@	trigger1=(teammode=single) || (teammode=turns)
;;@op;	trigger1=!(enemy,teammode=simul)
;;@op;	trigger1=!(teammode=simul)

	triggerall=!time && p2name="blanka"
	trigger1=numpartner=0
	trigger2=numpartner>0
	trigger2=id<partner,id

	value=10200

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

;-------------
[statedef 192]
type=s
anim=190+(var(0):=(random%5))
velset=0,0
ctrl=0

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

[state 0]
	type=playsnd
	trigger1=(animelem=5) && (var(0)=[0,1])
	value=5,(random%2)
; 5,0: [`!]
; 5,1: [[!]

[state 0]
	type=playsnd
	trigger1=(animelem=5) && (var(0)=[2,4])
	value=4,ifelse(var(0)=2,4,2)
	channel=0
; 4,2 : []
; 4,4 : [炨]

[state 0]
	type=posadd
	trigger1=((animelem=6)||(animelem=19)) && (anim=192)
	y=-2
[state 0]
	type=posset
	trigger1=((animelem=16)||(animelem=29)) && (anim=192)
	y=0

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


;-------------
;--- vs. sagat

[statedef 194]
type=s
anim=190
velset=0
ctrl=0

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

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

; 
[state 0]
	type=explod
	trigger1=(animelem=5)
	trigger1=1|| var(10):=30 || var(11):=-90 || fvar(1):=0 || fvar(2):=0
	trigger2=(animelem=7)||(animelem=9)||(animelem=12)
	trigger2=1|| var(10):=30-(random%10) || var(11):=-92+(random%5) || fvar(1):=-1.5-(random%20)/15.0 || fvar(2):=0.5+((random%100)-50)/100.0
	anim=1640
	sprpriority=7
	ownpal=1
	postype=p1
	pos=floor(var(10)*const(size.xscale)),floor(var(11)*const(size.yscale))
	vel=fvar(1),fvar(2)
	scale=const(size.xscale),const(size.yscale)

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


;--------------
;--- vs. chang

[statedef 10192]
type=s
anim=10192
velset=0
ctrl=0

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

[state 0]
	type=playsnd
	trigger1=(animelem=5)
	value=4,4 ; [炨]
	channel=0
[state 0]
	type=playsnd
	trigger1=(animelem=17)
	value=5000,2
	channel=0

[state 0]
	type=playsnd
	trigger1=(animelem=26)
	value=f200,3
[state 0]
	type=playsnd
	trigger1=(animelem=28)
	value=6,6 ; []T!]	
	channel=0

[state 0]
	type=posadd
	trigger1=(animelem=7)
	y=-2
[state 0]
	type=posset
	trigger1=(animelem=17)
	y=0

[state 0] ; ground_wave
	type=helper
	trigger1=((animelem=17)||(animelem=21)) && (sysfvar(0)>0)
	id=159005
	stateno=159005
	size.height=2

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


;--------------
;--- vs. joe

[statedef 10195]
type=s
anim=10195
velset=0
ctrl=0

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

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

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


;--------------
;--- vs. yuri

[statedef 10196]
type=s
anim=10196
velset=0
ctrl=0

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

[state 0]
	type=playsnd
	trigger1=(animelem=17)
	value=4,0 ;uȂ߂񂶂ˁ[Iv
	channel=0
[state 0]
	type=playsnd
	trigger1=(animelem=37)
	value=6,4 ; [[]T!]
	channel=0

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


;--------------
;--- vs. blanka

[statedef 10200]
type=s
anim=10200
velset=0,0
ctrl=0
[state 0]
	type=assertspecial
	trigger1=1
	flag=intro

[state 0]
	type=playsnd
	trigger1=(anim=10200)
	trigger1=(animelem=3) || (animelem=24)
	value=f200,2
	channel=1
[state 0]
	type=playsnd
	trigger1=(anim=10200)
	trigger1=(animelem=3) || (animelem=24)
	value=6,(random%3)
	channel=0
[state 0]
	type=changeanim
	trigger1=(anim=10200) && time=191
	value=10201
[state 0]
	type=playsnd
	trigger1=(anim=10201) && (animelem=3)
	value=5000,2
	channel=0

[state 0] ; ground_wave
	type=helper
	trigger1=(anim=10201) && (animelem=3) && (sysfvar(0)>0)
	id=159005
	stateno=159005
	size.height=2

; dizzy sound
[state 0]
	type=playsnd
	trigger1=(anim=10201)
	trigger1=(animelem=5) || (animelem=8) || (animelem=11)
	value=f10400,0
	channel=1

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






;-------------
;--- 

[statedef 195]
type=s
movetype=i
physics=s
anim=195
poweradd=100 +(var(2):=var(2)+200)*0
velset=0,0
ctrl=0
[state 0]
	type=playsnd
	trigger1=(animelem=3)
	value=5,1
	channel=0

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

;-------------
[statedef 196]
type=c
movetype=i
physics=c
anim=196
poweradd=100 +(var(2):=var(2)+200)*0
velset=0,0
ctrl=0

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

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

;-------------
[statedef 197]
type=a
movetype=i
physics=a
anim=197
poweradd=50 +(var(2):=var(2)+100)*0
ctrl=0

[state 0]
	type=playsnd
	trigger1=(animelem=2)
	value=ifelse((gametime%3),4,5), ifelse((gametime%3),(random%2)*3,1)
	channel=0

;--- (4,0)(4,3),(5,1)










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

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

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

[state 0]
	type=hitdef
	trigger1=!time
	attr=s,na
	damage=25,0
	animtype=light
	air.animtype=back
	fall.animtype=back
	guardflag=m
	hitflag=ma
	hitsound=300,0
	guardsound=40,0
	pausetime=9,9
	;ad; sparkno=0+(random%4)*10
	;ad; guard.sparkno =40
	sparkxy=-10,-ifelse((anim=200),86,90)
	ground.type=high
	air.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=200),86,90) )
	fall.envshake.time= id
	fall.envshake.ampl= 0
;---
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0
	ctrl=1


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

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

[state 0]
	type=playsnd
	trigger1=time=2 && random<500
	value=0,2
	channel=0
[state 0]
	type=playsnd
	trigger1=time=3
	value=f200,2
	channel=1
;---
[state 0]
	type=posadd
	trigger1=(animelem=2) && (anim=225)
	x=12

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

[state 0]
	type=hitdef
	trigger1=(animelem=4) && (anim=220)
	attr=s,na
	damage=80
	animtype=heavy
	air.animtype=back
	fall.animtype=back
	air.type=low
	ground.type=high
	guardflag=m
	hitflag=ma
	hitsound=300,2
	guardsound=41,0
	pausetime=13,13
	;ad; sparkno=2+(random%4)*10
	;ad; guard.sparkno =40
	sparkxy=-10,-36
	ground.slidetime=14
	ground.hittime=18
	air.hittime=18
	ground.velocity=-8
	air.velocity=   -5,-4
	getpower=50,25
;op;	chainid=1
	nochainid=1
	;---
	guard.ctrltime=     id +0*(var(31):=2 || var(30):= 510536 )
	fall.envshake.time= id
	fall.envshake.ampl= 0
;---
[state 0]
	type=hitdef
	trigger1=!time && (anim=225)
	attr=s,na
	damage=80
	animtype=heavy
	air.animtype=back
	fall.animtype=back
	air.type=low
	ground.type=low
	guardflag=m
	hitflag=ma
	hitsound=300,2
	guardsound=41,0
	pausetime=13,13
	;ad; sparkno=2+(random%4)*10
	;ad; guard.sparkno =40
	sparkxy=-10,-56
	ground.slidetime=12
	ground.hittime=20
	air.hittime=20
	ground.velocity=-6
	air.velocity=   -4,-5
	getpower=50,25
	;---
	guard.ctrltime=     id +0*(var(31):=2 || var(30):= 510556 )
	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


;-------------
;--- LbN

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

[state 0]
	type=playsnd
	trigger1=time=2 && random<250
	value=0,0
	channel=0
[state 0]
	type=playsnd
	trigger1=time=2
	value=f200,1
	channel=1
;---
[state 0]
	type=hitdef
	trigger1=!time && (anim=230)
	attr=s,na
	damage=25
	animtype=light
	air.animtype=back
	fall.animtype=back
	ground.type=low
	air.type=low
	guardflag=m
	hitflag=ma
	hitsound=300,1
	guardsound=40,0
	pausetime=9,9
	;ad; sparkno=0+(random%4)*10
	;ad; guard.sparkno =40
	sparkxy=-10,-50
	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):= 510550 )
	fall.envshake.time= id
	fall.envshake.ampl= 0

[state 0]
	type=hitdef
	trigger1=!time && (anim=240)
	attr=s,na
	damage=25
	animtype=light
	air.animtype=back
	fall.animtype=back
	ground.type=high
	air.type=low
	guardflag=m
	hitflag=ma
	hitsound=300,1
	guardsound=40,0
	pausetime=9,9
	;ad; sparkno=0+(random%4)*10
	;ad; guard.sparkno =40
	sparkxy=-10,-82
	ground.slidetime=10
	ground.hittime=10
	air.hittime=10
	ground.velocity=-7.2
	air.velocity=   -4.2,-3.5
	getpower=20,10
	;---
	guard.ctrltime=     id +0*(var(31):=0 || var(30):= 510582 )
	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

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

[state 0]
	type=playsnd
	trigger1=time=2 && random<500
	value=0,4
	channel=0
[state 0]
	type=playsnd
	trigger1=time=3
	value=f200,3
	channel=1
;---
[state 0]
	type=posadd
	trigger1=((animelem=4)||(animelem=5)||(animelem=6)) && (anim=250)
	x=6

;---
[state 0]
	type=hitdef
	trigger1=!time && (anim=250)
	attr=s,na
	damage=80
	animtype=heavy
	air.animtype=back
	fall.animtype=back
	ground.type=high
	air.type=low
	guardflag=m
	hitflag=ma
	hitsound=300,3
	guardsound=41,0
	pausetime=13,13
	;ad; sparkno=2+(random%4)*10
	;ad; guard.sparkno =40
	sparkxy=-10,-98
	ground.slidetime=14
	ground.hittime=18
	air.hittime=18
	ground.velocity=-9
	air.velocity=   -5,-4
	getpower=50,25
	;---
	guard.ctrltime=     id +0*(var(31):=2 || var(30):= 510598 )
	fall.envshake.time= id
	fall.envshake.ampl= 0
;---
[state 0]
	type=hitdef
	trigger1=!time && (anim=260)
	attr=s,na
	damage=80
	animtype=heavy
	air.animtype=back
	fall.animtype=back
	ground.type=low
	air.type=low
	guardflag=m
	hitflag=ma
	hitsound=300,3
	guardsound=41,0
	pausetime=13,13
	;ad; sparkno=2+(random%4)*10
	;ad; guard.sparkno =40
	sparkxy=-10,-25
	ground.slidetime=12
	ground.hittime=20
	air.hittime=20
	ground.velocity=-6
	air.velocity=   -4,-5
	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=8)
	movetype=i
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0
	ctrl=1


;-------------
;--- ip`

[statedef 280]
type=s
movetype=a
physics=s
anim=stateno
juggle=8
poweradd=20
velset=0,0
ctrl=0
facep2=1

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

[state 0]
	type=posadd
	trigger1=(animelem=2)
	x=3
[state 0]
	type=posadd
	trigger1=(animelem=7)
	x=10

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

;---
[state 0] ; dash_dust
	type=helper
	trigger1=(animelem=4) && (sysfvar(0)>0)
	id=152040
	stateno=152040
	pos=floor(-12*const(size.xscale)),0
	size.xscale=0.5
	size.yscale=0.5
;---
[state 0]
	type=statetypeset
	trigger1=(animelem=6)
	movetype=i
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0
	ctrl=1


;-------------
;--- ip`(Ap) cancel

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

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

[state 0]
	type=posadd
	trigger1=(animelem=2)
	x=3
[state 0]
	type=posadd
	trigger1=(animelem=7)
	x=10

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

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



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

[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 && random<250
	value=0,0
	channel=0
[state 0]
	type=playsnd
	trigger1=time=2
	value=f200,0
	channel=1

[state 0]
	type=hitdef
	trigger1=!time
	attr=c,na
	damage=25
	animtype=light
	air.animtype=back
	fall.animtype=back
	ground.type=low
	air.type=low
	guardflag=ma
	hitflag=ma
	hitsound=300,0
	guardsound=40,0
	pausetime=9,9
	;ad; sparkno=0+(random%4)*10
	;ad; guard.sparkno =40
	sparkxy=-10,-50
	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):= 510550 )
	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`

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

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

[state 0]
	type=hitdef
	trigger1=(animelem=7)
	attr=c,na
	damage=80
	animtype=heavy
	air.animtype=back
	fall.animtype=back
	ground.type=low
	air.type=low
	guardflag=m
	hitflag=ma
	hitsound=300,2
	guardsound=41,0
	pausetime=13,13
	;ad; sparkno=2+(random%4)*10
	;ad; guard.sparkno =40
	sparkxy=-10,-100
	ground.slidetime=16
	ground.hittime=20
	air.hittime=20
	ground.velocity=-9
	air.velocity=   -4,-5
	getpower=50,25
;op;	chainid=1
	nochainid=1
	;---
	guard.ctrltime=     id +0*(var(31):=2 || var(30):= 65510600 )
	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=11
	ctrl=1


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

[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 && random<250
	value=0,0
	channel=0
[state 0]
	type=playsnd
	trigger1=time=2
	value=f200,1
	channel=1

[state 0]
	type=hitdef
	trigger1=!time
	attr=c,na
	damage=25
	animtype=light
	air.animtype=back
	fall.animtype=back
	ground.type=low
	air.type=low
	guardflag=l
	hitflag=ma
	hitsound=300,1
	guardsound=40,0
	pausetime=9,9
	;ad; sparkno=0+(random%4)*10
	;ad; guard.sparkno =40
	sparkxy=-10,-5
	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=4)
	movetype=i
[state 0]
	type=changestate
	trigger1=animtime=0
	value=11
	ctrl=1


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

[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=3 && random<350
	value=0,0
	channel=0
[state 0]
	type=playsnd
	trigger1=time=3
	value=f200,1
	channel=1

[state 0]
	type=posadd
	trigger1=(animelem=3)
	x=8

[state 0]
	type=hitdef
	trigger1=!time
	attr=c,na
	damage=25
	animtype=light
	air.animtype=back
	fall.animtype=back
	air.type=low
	guardflag=l
	hitflag=ma
	hitsound=300,1
	guardsound=40,0
	pausetime=11,11
	;ad; sparkno=0+(random%4)*10
	;ad; guard.sparkno =40
	sparkxy=-10,-5
	ground.type=low
	ground.slidetime=12
	ground.hittime=15
	air.hittime=15
	ground.velocity=-7
	air.velocity=   -4,-4
	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=4)
	movetype=i
[state 0]
	type=changestate
	trigger1=animtime=0
	value=11
	ctrl=1


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

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

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



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

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

[state 0]
	type=playsnd
	trigger1=time=2 && random<250
	value=0,0
	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
	ground.type=high
	air.type=low
	guardflag=ha
	hitflag=maf
	hitsound=300,0
	guardsound=40,0
	pausetime=9,9
	;ad; sparkno=0+(random%4)*10
	;ad; guard.sparkno =40
	sparkxy=-10,-60
	ground.slidetime=12
	ground.hittime=13
	air.hittime=13
	ground.velocity=-5
	air.velocity=   -4,-3
	getpower=20,10
	;---
	guard.ctrltime=     id +0*(var(31):=0 || var(30):= 510560 )
	fall.envshake.time= id
	fall.envshake.ampl= 0

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


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

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

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

[state 0]
	type=hitdef
	trigger1=!time
	attr=a,na
	damage=80
	animtype=heavy
	air.animtype=back
	fall.animtype=back
	ground.type=high
	air.type=low
	guardflag=ha
	hitflag=maf
	hitsound=300,2
	guardsound=41,0
	pausetime=13,13
	;ad; sparkno=2+(random%4)*10
	;ad; guard.sparkno =40
	sparkxy=-10,-50
	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):= 510550 )
	fall.envshake.time= id
	fall.envshake.ampl= 0

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


;-------------
;--- [vA^bN

[statedef 615]
type=a
movetype=a
physics=a
anim=615
poweradd=0
ctrl=0

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

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


;-------------
;--- WvLbN

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

[state 0]
	type=playsnd
	trigger1=time=2 && random<250
	value=0,0
	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
	ground.type=low
	air.type=low
	guardflag=ha
	hitflag=maf
	hitsound=300,1
	guardsound=40,0
	pausetime=9,9
	;ad; sparkno=0+(random%4)*10
	;ad; guard.sparkno =40
	sparkxy=-10,-ifelse((anim=630),40,55)
	ground.slidetime=12
	ground.hittime=13
	air.hittime=13
	ground.velocity=-5
	air.velocity=   -4,-3
	getpower=20,10
	;---
	guard.ctrltime=     id +0*(var(31):=0 || var(30):= 510500 +ifelse((anim=630),40,55) )
	fall.envshake.time= id
	fall.envshake.ampl= 0

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


;-------------
;--- WvLbN

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

[state 0]
	type=playsnd
	trigger1=time=2 && random<500
	value=0,1
	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=heavy
	air.animtype=back
	fall.animtype=back
	ground.type=high
	air.type=low
	guardflag=ha
	hitflag=maf
	hitsound=300,3
	guardsound=41,0
	pausetime=13,13
	;ad; sparkno=2+(random%4)*10
	;ad; guard.sparkno =40
	sparkxy=-10,-50
	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):= 510550 )
	fall.envshake.time= id
	fall.envshake.ampl= 0

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



;-------------
;--- 

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

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

;---
[state 0]
	type=hitdef
	trigger1=!time
	attr=s,nt
	hitflag=m-
	priority=3,miss
	sparkno=(var(31):=-1)
	hitsound=-1
	pausetime=0,0
	p1facing=1
	p2facing=1
	p1stateno=810
	p2stateno=820
	id=800
;---
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0
	ctrl=1

;-------------
[statedef 810]
type=s
movetype=a
physics=n
anim=stateno+var(1)
sprpriority=2
poweradd=0
velset=0,0
ctrl=0

;---
[state 0] ; grab_spark
	type=helper
	trigger1=(time=1) && (sysfvar(0)>0)
	id=152080
	stateno=152080
	postype=p1
	pos=floor(33*const(size.xscale)),floor(-67*const(size.yscale))
	size.xscale=1 ;w
	size.yscale=1 ;h
	size.height=100 ;type
	persistent=0

[state 0] ; against_throw O
	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(0)
[state 0]
	type=targetfacing
	trigger1=(animelem=2) && var(0)
	value=-1
	id=800

;---
[state 0]
	type=width
	trigger1=!time
	value=30,30
[state 0]
	type=width
	trigger1=(animelem=5,>=0) && (animelem=6,<0)
	value=50+time*3,0

;---
[state 0]
	type=targetbind
	trigger1=(animelem=2,<0)
	pos=floor(28*const(size.xscale)),0
	id=800
[state 0]
	type=targetbind
	trigger1=(animelem=2,>=0) && (animelem=3,<0)
	pos=floor(-26*const(size.xscale)),floor(-70*const(size.yscale))
	id=800
[state 0]
	type=targetbind
	trigger1=(animelem=3,>=0) && (animelem=4,<0)
	pos=floor(26*const(size.xscale)),floor(-102*const(size.yscale))
	id=800
[state 0]
	type=targetbind
	trigger1=(animelem=4,>=0) && (animelem=5,<0)
	pos=floor(43*const(size.xscale)),floor(-84*const(size.yscale))
	id=800
[state 0]
	type=targetbind
	trigger1=(animelem=5)
	pos=floor(54*const(size.xscale)),floor(-60*const(size.yscale))
	id=800

;---
[state 0]
	type=targetstate
	trigger1=(animelem=5)
	value=821
	id=800

[state 0]
	type=playsnd
	trigger1=(animelem=5)
	value=0,(random%7) ; 2 ; [0-7]
	channel=0
[state 0]
	type=playsnd
	trigger1=(animelem=13) && (anim=810)
	value=5,1
	channel=0
[state 0]
	type=playsnd
	trigger1=(animelem=13) && (anim=811)
	value=4,0
	channel=0

; GW
[state 0]
	type=varadd
	trigger1=(animelem=12)
	var(2)=200
[state 0]
	type=changestate
	trigger1=animtime=0
	value=11*(anim=811)
	ctrl=1


;-------------
; p2state ; 鑤

[statedef 820]
type=a
movetype=h
physics=n
velset=0,0
ctrl=0

[state 0]
	type=afterimagetime
	trigger1=!time
	time=0

[state 0]
	type=changeanim2
	trigger1=!time
	value=stateno

[state 0] ; for_safety
	type=selfstate
	trigger1=time>128
	value=5050

;-------------
[statedef 821]
type=a
movetype=h
physics=n
anim=5160
velset=-5,-4
ctrl=0

[state 0]
	type=turn
	trigger1=!time
[state 0]
	type=gravity
	trigger1=1
[state 0]
	type=nothitby
	trigger1=1
	value=sca

[state 0]
	type=lifeadd
	trigger1=time=10
	value=-128

[state 0]
	type=selfstate
	trigger1=(pos y+vel y>=0) && (vel y>0)
	value=5100

;[state 0]
;	type=selfstate
;	triggerall=time>10
;	trigger1=(command="a") || (command="b") || (command="c") || (command="x") || (command="y") || (command="z")
;;	trigger2=random<999;debug
;	value=5210







;--------------
; override common1.cns
;--------------

;--------------
; hit_fallrecover(on the ground)
; ^E(n)
;--------------
[statedef 5201]
type=s
movetype=h
physics=n
anim=5200
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
	y=0
[state 0]
	type=nothitby
	trigger1=1
	value=sca

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

[state 0]
	type=playsnd
	trigger1=time=1
	value=6,6;u]Tv
	channel=0

[state 0]
	type=velset
	trigger1=(animelem=5,<0)
	x=-4
[state 0]
	type=velset
	trigger1=(animelem=5,>=0)
	x=0

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



;--------------
;--- 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=(animelem=10)
	x=36
[state 0]
	type=posadd
	trigger1=(animelem=11)
	x=11
[state 0]
	type=changeanim
	trigger1=animtime=0
	value=5111
[state 0]
	type=selfstate
	trigger1=anim=5111
	value=5110





;--------------
;[EOF]
