
; Normal

; v05-29: temp
; v30-32: hit-spark
; v41: combo-flag
; v50: ai-flag
; v51: ai-switch
; v55: score-self for sample
; v59: score-default

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

;--------------------
; Win ; 

[statedef 180]
type=s
anim=180+(random%3)
velset=0,0
ctrl=0

[state 0]
	type=playsnd
	trigger1=(time=6) && (anim=[180,181])
	value=5,3+(random%2)
	channel=0
[state 0]
	type=playsnd
	trigger1=(time=32) && (anim=182)
	value=5,5+(random%2)
	channel=0

[state 0]
	type=posset
	trigger1=((animelem=3) || (animelem=6)) && (anim=182)
	y=ifelse((animelem=3),-1,0)

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


;--------------------
; Intro ; Cg

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


;;============
;;============
;; a sample Sctrl for Assist-StateNo Registration.
;;  or override [statedef 195900]

;; p[gi[xXe[go^Tv
;;  邢́A[statedef 195900]Lŏ㏑B

;[state 0] ;; add.set_assist_stno
;	type=varset
;	trigger1=!time && sysvar(4)=0
;	sysvar(0)=1000 ;;<-change "1000" to your chars stateno


;;============
;; a sample Sctrl for SCORE-System
;; Sets player's var(55) for SCOREs

;; XRA(_)pTv
;; v[[ var(55) ϐXRAɎg܂

;;---
;; Sets Add-on's default SCORE
;; AhIɏ_Zbg܂
;[state 0] ;; add.set_score.init
;	type=null
;	trigger1=!time && !ishelper && sysvar(4)=0
;	trigger1=numhelper(90900)
;	trigger1=helper(90900),var(0)=90900 && helper(90900),var(57)<var(55) ;;<-change "var('55')" to your chars var
;	trigger1=helper(90900),cond(1, var(57):= (root,var(55)) ,0)          ;;<-change "root,var('55')" to your cahrs var

;;---
;; use this Sctrl after round for:
;; getting SCOREs from Add-on and carry-over to next round and match
;; see "cmd_maki.txt"

;; SctrlɎgāA
;; AhI_炢Az܂B
;; "cmd_maki.txt"QƂĂ

;[state 0] ;; memo&carry-over
;	type=varset
;	trigger1=sysvar(4)=0
;	trigger1=roundstate>2 ;; round-over
;	trigger1=numhelper(90900)
;	trigger1=!ishelper && gethitvar(isbound)=0
;	trigger1=helper(90900),var(0)=90900 && helper(90900),var(58)>var(55)
;	var(55)=helper(90900),var(58)


;;============
;;============

;---
[state 0]
	type=changestate
	triggerall=!time && roundno=1 && p2name="guy" ;;KC
	trigger1=numpartner=0
	trigger2=numpartner
	trigger2=id<partner,id
	value=19191
[state 0]
	type=changestate
	triggerall=!time && roundno=1 && p2name="rolento" ;;g
	trigger1=numpartner=0
	trigger2=numpartner
	trigger2=id<partner,id
	value=19190
[state 0]
	type=changestate
	triggerall=!time && numenemy
	trigger1=enemy,name="ryuji" ;;R
	value=19192
[state 0]
	type=changestate
	triggerall=!time && numenemy
	trigger1=enemy,name="todo" ;;
	value=19193

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



;--------------------
; Cg - ʏ

[statedef 191]
type=s
anim=190+(random%3)
velset=0,0
ctrl=0

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

;---
; afterimage / c
[state 0]
	type=projectile
	trigger1=(time=[5,30]) && (time%5=0) && (anim=190)
	projanim=1155
	projsprpriority=-1
	postype=p1
	offset=-(30-time)*8,0
	projscale=const(size.xscale),const(size.yscale)
	projshadow=-1
	projremovetime=10
	ownpal=1

[state 0]
	type=playsnd
	trigger1=(animelem=4) && (anim=190)
	value=0,ifelse(random<500,0,13)
	channel=0
	persistent=0
[state 0]
	type=playsnd
	trigger1=(animelem=11,=1) && (anim=[191,192])
	value=5,0
	channel=0
	persistent=0
[state 0]
	type=changeanim
	trigger1=((animelem=3)||(animelem=7)) && (anim=191) && random<250
	value=anim
	elem=11
[state 0]
	type=posset
	trigger1=(!time||(animelem=3)) && (anim=[190,191])
	trigger2=((animelem=5)||(animelem=7)||(animelem=9)||(animelem=11)) && (anim=191)
	y=-(!time||(animelem=5)||(animelem=9))

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


;--------------------
; Special-Intro
;--------------------

; vs g

[statedef 19190]
type=s
anim=19190
velset=0,0
ctrl=0

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

[state 0]
	type=posset
	trigger1=time=60 || time=100
	y=ifelse(time=60,-1,0)

;---
; afterimage / c
[state 0]
	type=projectile
	trigger1=time=60 || time=80
	projanim=ifelse(time=80,10191,10192)
	projsprpriority=-1
	postype=p1
	offset=ifelse(time=80,-70,60),1
	projscale=const(size.xscale),const(size.yscale)
	projshadow=-1
	projremovetime=20
	ownpal=1
;---
[state 0]
	type=playsnd
	trigger1=(time=[60,80]) && (time%20=0)
	value=0,ifelse(random<500, 0, 13)
	channel=0
[state 0]
	type=playsnd
	trigger1=time=100
	value=0,12
	channel=0

[state 0] ; jump land
	type=helper
	trigger1=(time=68 || time=88) && (sysfvar(0)>0)
	id=152000
	stateno=152000
	pos=ifelse(time=88,-70,60), floor(-pos y)

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


;--------------------
; vs KC

[statedef 19191]
type=s
physics=n
anim=19191
velset=0,0
ctrl=0

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

; WL߰
[state 0]
	type=helper
	trigger1=!time
	id=19199
	stateno=19199

[state 0]
	type=posset
	trigger1=time=1 && numenemy
	x=enemy,pos x-100*facing

[state 0]
	type=posadd
	triggerall=(animelem=28,>=0) && (animelem=31,<0)
	trigger1=facing=1  && pos x>var(5)
	trigger2=facing=-1 && pos x<var(5)
	x=-5.15
[state 0]
	type=changeanim
	triggerall=(animelem=30)
	trigger1=facing=1  && pos x<=var(5)
	trigger2=facing=-1 && pos x>=var(5)
	value=anim
	elem=31

[state 0] ; take-off
	type=posadd
	trigger1=(animelem=28)
	y=-2

[state 0] ; landing
	type=posset
	trigger1=(animelem=31)
	x=var(5)
	y=0

[state 0]
	type=playsnd
	trigger1=(animelem=3)||(animelem=7)||(animelem=12)||(animelem=22)
	value=0,(random%3)
	channel=0
[state 0]
	type=playsnd
	trigger1=(animelem=28)
	value=f50,0
[state 0]
	type=playsnd
	trigger1=(animelem=35)
	value=5,0
	channel=0

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


;---------------
; WL (Helper)

[statedef 19199]
type=s
anim=909601 ; empty
velset=0,0
ctrl=0
[state 0]
	type=parentvarset
	trigger1=1
	var(5)=floor(pos x)
[state 0]
	type=destroyself
	trigger1=(parent,anim=19191) && (parent,animelem=31,>0)
	trigger2=(parent,stateno=0) || (parent,ctrl) || (roundstate>=2)

;--------------------
; Cg - vs R

[statedef 19192]
type=s
anim=19192
velset=0,0
ctrl=0

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

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

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


;--------------------
; vs 

[statedef 19193]
type=s
anim=19193
velset=0,0
ctrl=0

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

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

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





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

;--------------------
; Taunt
; 

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

[state 0]
	type=playsnd
	trigger1=(time=2)
	value=0,5
	channel=0

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






;--------------------
; Basic
;--------------------

; SLP / p`

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

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

[state 0]
	type=hitdef
	trigger1=time=0
	attr=s,na
	animtype=light
	air.animtype=back
	fall.animtype=back
	ground.type=low
	air.type=low
	damage=24
	getpower=20,10
	guardflag=m
	hitflag=maf
	pausetime=9,9
	;ad; sparkno=0+(random%4)*10
	;ad; guard.sparkno =40
	sparkxy=-10,-ifelse((anim=200),75,50)
	hitsound=300,0
	guardsound=40,0
	ground.slidetime=10
	ground.hittime=10
	air.hittime=10
	ground.velocity=-6
	air.velocity=   -4,-3
	;---
	guard.ctrltime=     id +0*(var(31):=0 || var(30):= 510500 +ifelse((anim=200),75,50) )
	fall.envshake.time= id
	fall.envshake.ampl= 0
;---
[state 0]
	type=statetypeset
	trigger1=(animelem=4) && (anim=200)
	trigger2=(animelem=5) ;; && (anim=215)
	movetype=i
;---
; AU
; _ - P2
[state 0]
	type=varset
	trigger1=!time
	var(5)=0
[state 0]
	type=varset
	triggerall=movecontact && movetype=a
	trigger1=var(51)<1 && (command="y")
	trigger2=var(51)>0 && sysfvar(4)<1 && roundstate=2
	trigger2=random<760 || (p2bodydist x!=[-10,10])
	var(5)=anim
	ignorehitpause=1
[state 0]
	type=changestate
	trigger1=var(5)
	value=710
;---
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0
	ctrl=1

;--------------------
; SF+LP / O + p`

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

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

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


;--------------------
; SHP / p`

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

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

[state 0]
	type=hitdef
	trigger1=time=0
	attr=s,na
	animtype=hard
	air.animtype=back
	fall.animtype=back
	ground.type=high
	air.type=low
	damage=80
	getpower=50,25
	guardflag=m
	hitflag=maf
	pausetime=13,13
	;ad; sparkno=2+(random%4)*10
	;ad; guard.sparkno =40
	sparkxy=-10,-ifelse((anim=220),55,85)
	hitsound=300,2
	guardsound=41,0
	ground.slidetime=17
	ground.hittime=ifelse((anim=220),17,18)
	ground.velocity=-ifelse((anim=220),12,8)
	air.hittime=18
	air.velocity=   -ifelse((anim=220),5,4),-ifelse((anim=220),4,5)
	;---
	guard.ctrltime=     id +0*(var(31):=2 || var(30):= 510500 +ifelse((anim=220),55,85) )
	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


;--------------------
; SLK / LbN

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

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

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


;--------------------
; SMK / SF+LK / LbN / O + LbN

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

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

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


;--------------------
; SHK / LbN

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

[state 0]
	type=playsnd
	trigger1=time=2 && random<750
	value=0,1+(random%2)
	channel=0
[state 0]
	type=playsnd
	trigger1=time=2
	value=f200,3
	channel=1
[state 0]
	type=posadd
	trigger1=(anim=250)
	trigger1=(animelem=3)||(animelem=4)||(animelem=5)||(animelem=6)||(animelem=7)
	x=4 *const(size.xscale)

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



;--------------------
; CLP / Ⴊݎp`

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

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

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


;--------------------
; CMP / Ⴊݒp` (f?)

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

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

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


;--------------------
; CHP / Ⴊ݋p`

[statedef 420]
type=c
movetype=a
physics=c
anim=420
poweradd=50
juggle=8
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=2
	value=1,2
	channel=1

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


;--------------------
; CLK / ႪݎLbN

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

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

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


;--------------------
; CMK / ႪݒLbN

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

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

[state 0]
	type=posadd
	trigger1=(animelem=2)||(animelem=3)
	x=16*const(size.xscale)

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


;--------------------
; CHK / Ⴊ݋LbN

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

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

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





;--------------------
; JLP / Wvp`

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

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

[state 0]
	type=hitdef
	trigger1=time=0
	attr=a,na
	animtype=light
	air.animtype=back
	fall.animtype=back
	ground.type=high
	air.type=low
	damage=25
	getpower=20,10
	guardflag=ha
	hitflag=maf
	pausetime=9,9
	;ad; sparkno=0+(random%4)*10
	;ad; guard.sparkno =40
	sparkxy=-10,-35
	hitsound=300,0
	guardsound=40,0
	ground.slidetime=10
	ground.hittime=10
	air.hittime=10
	ground.velocity=-5
	air.velocity=   -4,-3
	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=7)
	movetype=i


;--------------------
; JHP / Wvp`

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

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

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


;--------------------
; JLK / WvLbN

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

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


;--------------------
; JHK / WvLbN

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

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

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


;--------------------
; (Dir + Button)
;--------------------

; JD+LP / IƂ( {P)

[statedef 700]
type=a
movetype=a
physics=a
anim=700
juggle=7
poweradd=20
velset=0,0
ctrl=0

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

;---
; afterimage / c
[state 0]
	type=explod
	trigger1=(animelem=3)
	anim=705
	sprpriority=0
	postype=p1
	pos=0,0
	scale=const(size.xscale),const(size.yscale)
	;;removetime=10
	ownpal=1
	removeongethit=1
	ignorehitpause=1
	persistent=0
;---
[state 0]
	type=posfreeze
	trigger1=(animelem=3,<0)
[state 0]
	type=veladd
	trigger1=(animelem=3,>=0)
	y=0.68

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




;--------------------
; _

;--- P(2/4)

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

;---
; afterimage / c
[state 0]
	type=explod
	trigger1=!time && var(5)
	anim=var(5)+1
	sprpriority=-1
	postype=p1
	pos=0,0
	scale=const(size.xscale),const(size.yscale)
	ownpal=1
	removeongethit=1
	ignorehitpause=1
	persistent=0

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

[state 0]
	type=posadd
	trigger1=!time
	x=14 *const(size.xscale)

[state 0] ; dash_dust
	type=helper
	trigger1=(time=1) && (sysfvar(0)>0)
	id=152040
	stateno=152040
	pos=floor(-12*const(size.xscale)),0
	size.xscale=0.35
	size.yscale=0.35

[state 0]
	type=hitdef
	trigger1=time=0
	attr=s,na
	animtype=medium
	air.animtype=back
	fall.animtype=back
	ground.type=low
	air.type=low
	damage=30
	getpower=20,10
	guardflag=m
	hitflag=maf
	pausetime=10,10
	;ad; sparkno=0+(random%4)*10
	;ad; guard.sparkno =40
	sparkxy=-10,-55
	hitsound=300,0
	guardsound=40,0
	ground.slidetime=11
	ground.hittime=11
	air.hittime=11
	ground.velocity=-3
	air.velocity=   -3,-6
	yaccel=0.4
	;---
	guard.ctrltime=     id +0*(var(31):=0 || var(30):= 510555 )
	fall.envshake.time= id
	fall.envshake.ampl= 0
;---
[state 0]
	type=statetypeset
	trigger1=(animelem=3)
	movetype=i
;--- P3
[state 0]
	type=changestate
	triggerall=movecontact && (animelem=2,>0) && (animelem=3,<0)
	trigger1=var(51)<1 && (command="y" || command="b")
	trigger2=var(51)>0 && roundstate=2 && random<800
	value=711
;---
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0
	ctrl=1


;---P(3/4)

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

;---
; afterimage / c
[state 0]
	type=explod
	trigger1=!time
	anim=730
	sprpriority=-1
	postype=p1
	pos=0,0
	scale=const(size.xscale),const(size.yscale)
	ownpal=1
	removeongethit=1
	ignorehitpause=1
	persistent=0

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

[state 0]
	type=posadd
	trigger1=!time
	x=14 *const(size.xscale)

[state 0] ; dash_dust
	type=helper
	trigger1=(time=1) && (sysfvar(0)>0)
	id=152040
	stateno=152040
	pos=floor(-16*const(size.xscale)),0
	size.xscale=0.5
	size.yscale=0.5

[state 0]
	type=hitdef
	trigger1=time=0
	attr=s,na
	animtype=hard
	air.animtype=back
	fall.animtype=back
	ground.type=high
	air.type=low
	damage=30
	getpower=20,10
	guardflag=m
	hitflag=maf
	pausetime=13,13
	;ad; sparkno=2+(random%4)*10
	;ad; guard.sparkno =40
	sparkxy=-10,-85
	hitsound=300,2
	guardsound=41,0
	ground.slidetime=18
	ground.hittime=18
	air.hittime=18
	ground.velocity=-8
	air.velocity=   -3,-6
	yaccel=0.4
	;---
	guard.ctrltime=     id +0*(var(31):=2 || var(30):= 510585 )
	fall.envshake.time= id
	fall.envshake.ampl= 0

;---
[state 0]
	type=statetypeset
	trigger1=(animelem=4)
	movetype=i
;---K/P
[state 0]
	type=changestate
	value=720
	trigger1=(command="y" || command="b") && (command="holddown") && var(51)<1 && movehit
;--- K1/P4
[state 0]
	type=changestate
	value=712
	trigger1=(command="y" || command="b") && var(51)<1 && movecontact
;--- ai
[state 0]
	type=changestate
	trigger1=var(51)>0 && roundstate=2 && movecontact
	value=ifelse(random<250 && movehit, 720, 712)
;---
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0
	ctrl=1


;---K(4/4)

[statedef 712]
type=s
movetype=a
physics=s
anim=712
juggle=7
poweradd=40
velset=0,0
ctrl=0
facep2=1

;---
; afterimage / c
[state 0]
	type=explod
	trigger1=!time
	anim=731
	sprpriority=-1
	postype=p1
	pos=0,0
	scale=const(size.xscale),const(size.yscale)
	ownpal=1
	removeongethit=1
	ignorehitpause=1
	persistent=0

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

[state 0]
	type=posadd
	trigger1=(animelem=3)||(animelem=4)||(animelem=5)||(animelem=6)||(animelem=7)
	x=13 *const(size.xscale)

[state 0] ; dash_dust
	type=helper
	trigger1=(animelem=4) && (sysfvar(0)>0)
	id=152040
	stateno=152040
	pos=floor(6*const(size.xscale)),0
	size.xscale=0.75
	size.yscale=0.75

[state 0]
	type=hitdef
	trigger1=time=0
	attr=s,na
	animtype=back
	air.animtype=back
	fall.animtype=diagup
	ground.type=high
	air.type=low
	damage=40
	getpower=40,20
	guardflag=m
	hitflag=maf
	pausetime=13,13
	;ad; sparkno=2+(random%4)*10
	;ad; guard.sparkno =40
	sparkxy=-10,-85
	hitsound=300,3
	guardsound=41,0
	ground.slidetime=18
	ground.hittime=18
	air.hittime=18
	ground.velocity=-1.5,-11.5
	air.velocity=   -1.5,-11.5
	guard.velocity= -10
	yaccel=0.4
	fall=1
	fall.recover=0
	id=700
	;---
	guard.ctrltime=     id +0*(var(31):=2 || var(30):= 510585 )
	fall.envshake.time= id
	fall.envshake.ampl= 0

;---
[state 0]
	type=statetypeset
	trigger1=(animelem=6)
	movetype=i
;---
; ai goto - jump (normal fwd : 142001) (long fwd : 142011)
[state 0]
	type=changestate
	trigger1=animtime=0 && var(51)>0 && roundstate=2 && numtarget(700)
	trigger1=target(700),statetype=a && random<700
	value=ifelse((sysfvar(0)>0), 142011, 40)
;---
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0
	ctrl=1



;---
;---(+P) (4/4)

[statedef 720]
type=s
movetype=a
physics=s
anim=720
juggle=7
poweradd=100
velset=0,0
ctrl=0
facep2=1

;---
; afterimage / c
[state 0]
	type=explod
	trigger1=!time
	anim=731
	sprpriority=-1
	postype=p1
	pos=0,0
	scale=const(size.xscale),const(size.yscale)
	ownpal=1
	removeongethit=1
	ignorehitpause=1
	persistent=0

[state 0]
	type=posadd
	trigger1=!time
	x=10 *const(size.xscale)

[state 0]
	type=hitdef
	trigger1=time=0 && (p2stateno!=[150,155])
	attr=s,nt
	priority=3,miss
	getpower=0
	hitflag=m
	numhits=1
	hitonce=1
	sparkno=(var(31):=-1)
	p1facing=1
	p2facing=1
	p1stateno=721
	p2stateno=725
	p2getp1state=1
	hitsound=-1
	fall=1
	fall.recover=0
	id=700
;---
[state 0]
	type=statetypeset
	trigger1=(animelem=2)
	movetype=i
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0
	ctrl=1


;---P1

[statedef 721]
type=s
movetype=a
physics=s
anim=721
sprpriority=2
poweradd=0
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(50*const(size.xscale)),floor(-60*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=bindtotarget
	trigger1=!time && numtarget
	pos=target,const(size.ground.front), 0
;---
[state 0]
	type=width
	trigger1=!time
	value=36,36
;---
[state 0]
	type=assertspecial
	trigger1=1
	flag=noautoturn
;---
[state 0]
	type=targetbind
	trigger1=(animelem=2,<0)
	pos=floor(30*const(size.xscale)),0
[state 0]
	type=targetbind
	trigger1=(animelem=6)
	pos=floor(40*const(size.xscale)),0

;---
[state 0]
	type=playsnd
	trigger1=(animelem=5)
	value=0,11
	channel=0
[state 0]
	type=playsnd
	trigger1=(animelem=5)
	value=f200,2
	channel=1
;---
[state 0]
	type=targetlifeadd
	trigger1=(animelem=6)
	value=-136
[state 0]
	type=targetstate
	trigger1=!time
	value=725
[state 0]
	type=targetstate
	trigger1=(animelem=6)
	value=726
;---
;---
; ai goto - jump (normal fwd : 142001) (long fwd : 142011)
[state 0]
	type=changestate
	trigger1=animtime=0 && var(51)>0 && roundstate=2 && random<800
	value=ifelse((sysfvar(0)>0), 142011, 40)
;---
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0
	ctrl=1


;---ꑤ(P2)

[statedef 725]
type=a
movetype=h
physics=n
sprpriority=1
velset=0,0
ctrl=0

[state 0]
	type=afterimagetime
	trigger1=!time
	time=0
[state 0]
	type=posset
	trigger1=!time
	y=0
[state 0]
	type=changeanim2
	trigger1=!time
	value=725

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

[state 0] ; for_safety
	type=selfstate
	trigger1=animtime=0
	value=0
	ctrl=1

;---
[state 0]
	type=screenbound
	trigger1=1
	value=1
	movecamera=0,0
[state 0]
	type=explod
	trigger1=!ishelper
	anim=0
	scale=0,0
	id=920851 ;; ## switch_id
	removetime=1


;---
[statedef 726]
type=a
movetype=h
physics=n
sprpriority=1
velset=-1.5,-15
ctrl=0

[state 0]
	type=changeanim
	trigger1=!time
	value=ifelse(selfanimexist(5051),5051,5050)
	persistent=0
; coming down anim
[state 0]
	type=changeanim
	trigger1=(anim=[5050,5059]) && selfanimexist(anim+10) && (vel y>=0)
	value=anim+10
	persistent=0

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

;---
[state 0]
	type=screenbound
	trigger1=1
	value=1
	movecamera=0,0
[state 0]
	type=explod
	trigger1=!ishelper
	anim=0
	scale=0,0
	id=920851 ;; ## switch_id
	removetime=1





;--------------------
; Throws
;--------------------

; iʏ퓊j

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

[state 0]
	type=varset
	trigger1=!time
	var(5)=(command="b")
[state 0]
	type=varset
	trigger1=!time
	var(6)=(command="holdback")
;---
[state 0]
	type=hitdef
	trigger1=(time=0) && (p2movetype!=h) && (p2stateno!=[150,155])
	attr=s,nt
	priority=3,miss
	getpower=0
	hitflag=m-
	sparkno=(var(31):=-1)
	p1facing=1
	p2facing=1
	p1stateno=810
	p2stateno=820
	p2getp1state=1
	hitsound=-1
;op;	fall=1
	fall.recover=0
	numhits=0
	hitonce=1
	id=800
;---
[state 0]
	type=statetypeset
	trigger1=(animelem=3)
	movetype=i
[state 0]
	type=playsnd
	trigger1=(animelem=3)
	value=0,6
	channel=0
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0
	ctrl=1


;--------------------
; ij

[statedef 810]
type=s
movetype=a
physics=s
anim=810
juggle=15
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(49*const(size.xscale)),floor(-73*const(size.yscale))
	size.xscale=1 ;w
	size.yscale=1 ;h
	size.height=100 ;type
	persistent=0

;---
[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=860

;---
[state 0]
	type=width
	trigger1=!time
	value=36,36
;---
[state 0]
	type=targetbind
	trigger1=(animelem=2,<0)
	pos=floor(50*const(size.xscale)), 0
	time=1
[state 0]
	type=targetbind
	trigger1=(animelem=2)
	pos=floor(46*const(size.xscale)), 0
	time=1
;---
[state 0]
	type=playsnd
	trigger1=(animelem=3)||(animelem=9)
	value=0,(animelem=9)
	channel=0
[state 0]
	type=playsnd
	trigger1=(animelem=5)||(animelem=9)
	value=f300,2+(animelem=9)
	channel=1
;---
[state 0]
	type=velset
	trigger1=(animelem=6)
	x=-4
;---
[state 0]
	type=hitdef
	trigger1=(animelem=5)||(animelem=10)
	attr=s,na
	animtype=hard
	air.animtype=diagup
	fall.animtype=diagup
	ground.type=low ;; high
	air.type=low
	damage=58
	getpower=0,0
	guardflag=m
	hitflag=maf+
	pausetime=9,9
	;ad; sparkno=2+(random%4)*10
	;ad; guard.sparkno =40
	sparkxy=-10,-ifelse((animelem=5),70,88)
	hitsound=300,ifelse((animelem=5),2,3)
	guardsound=41,0
	ground.slidetime=16
	ground.hittime=16
	air.hittime=18
	ground.velocity=-ifelse((animelem=5),0,3),-ifelse((animelem=5),0,7)
	air.velocity=   -ifelse((animelem=5),0,3),-ifelse((animelem=5),5,7)
	fall=ifelse((animelem=5),0,1)
	air.fall=1
	recover=0
	fall.recover=0
	kill=ifelse((animelem=5),0,1)
	id=800
	chainid=800
	;---
	guard.ctrltime=     id +0*(var(31):=2 || var(30):= 20510500 +ifelse((animelem=5),70,88) )
	fall.envshake.time= id
	fall.envshake.ampl= 0

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


;---  - ꑤ - P2

[statedef 820]
type=s
movetype=h
physics=s
sprpriority=1
velset=0,0
ctrl=0

[state 0]
	type=afterimagetime
	trigger1=!time
	time=0
[state 0]
	type=hitvelset
	trigger1=!time
	x=0
	y=0
[state 0]
	type=posset
	trigger1=!time
	y=0
[state 0]
	type=changeanim2
	trigger1=!time
	value=820
[state 0]
	type=selfstate
	trigger1=animtime=0
	value=0
	ctrl=1



;--------------------
; G܂ (K)
;-------------------

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

[state 0]
	type=posfreeze
	trigger1=1

[state 0]
	type=width
	trigger1=!time
	value=36,36
;---
[state 0]
	type=targetbind
	trigger1=1
	pos=floor(45*const(size.xscale)), 0
;---
[state 0]
	type=targetstate
	trigger1=!time
	value=870
[state 0]
	type=targetstate
	trigger1=animtime=0
	value=871
;---
[state 0]
	type=changestate
	trigger1=animtime=0
	value=861


;--- G

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

[state 0]
	type=varset
	trigger1=!time
	var(10)=0
	persistent=0
[state 0]
	type=varset
	trigger1=!time
	var(11)=4 ;; anim-frames
	persistent=0
[state 0]
	type=varset
	trigger1=!time
	var(12)=0
	persistent=0

;--- A
[state 0]
	type=varadd
	trigger1=(command="a")||(command="b")
	var(12)=1
[state 0]
	type=varadd
	trigger1=numtarget
	trigger1=(target,command="a")||(target,command="b")
	var(12)=-1
;---
[state 0]
	type=varadd
	trigger1=var(11)>1 && var(12)>9
	var(11)=-1
[state 0]
	type=varadd
	trigger1=(var(12)!=[0,9])
	var(12)=0
[state 0]
	type=changeanim
	trigger1=(animelemno(0)=[1,5])
	trigger1=(animelemtime(animelemno(0))>var(11)) && (animelemtime(animelemno(0)+1)<0)
	value=anim
	elem=(animelemno(0)+1)

;---
[state 0]
	type=targetstate
	trigger1=(animelem=1)||(animelem=6)
	value=871 ;; start
[state 0]
	type=targetstate
	trigger1=(animelem=3)
	value=872 ;; hit
[state 0]
	type=targetstate
	trigger1=(animelem=4)
	value=873
;---
[state 0]
	type=targetbind
	trigger1=1
	pos=floor(25*const(size.xscale)), -1
	time=1
[state 0]
	type=targetbind
	trigger1=(animelem=3,>=0) && (animelem=6,<0)
	pos=floor(50*const(size.xscale)),floor(-68*const(size.yscale))
	time=1

;---
[state 0]
	type=playsnd
	trigger1=(animelem=2)
	value=0,0
	channel=0
;---
[state 0] ; hit_spark
	type=helper
	trigger1=(animelem=3) && (sysfvar(0)>0)
	id=152100
	stateno=152100
	helpertype=normal
	ownpal=0
	keyctrl=0
	postype=p1
	pos=floor(40*const(size.xscale)),floor(-70*const(size.yscale))
	size.height=2 ;; hit_spark
	facing=-1
;---
[state 0]
	type=playsnd
	trigger1=(animelem=3)
	value=f300,1
;op;	channel=2

[state 0]
	type=hitadd
	trigger1=(animelem=3)
	value=1
[state 0]
	type=targetlifeadd
	trigger1=(animelem=3)
	value=-20
	kill=0
;---
[state 0]
	type=varadd
	trigger1=(animtime=0)
	var(10)=1
[state 0]
	type=changestate
	trigger1=(animtime=0) && (var(10)>abs(10-var(11)*2))
	value=865



;--- Rグ (FINISH)

[statedef 865]
type=s
movetype=a
physics=s
anim=865
juggle=15
velset=0,0
ctrl=0

[state 0]
	type=targetbind
	trigger1=(animelem=2)
	pos=floor(45*const(size.xscale)),-1

[state 0]
	type=targetstate
	trigger1=(animelem=2)
	value=875

[state 0]
	type=playsnd
	trigger1=time=2
	value=0,10
	channel=0

;---
[state 0]
	type=hitdef
	trigger1=(animelem=2)||(animelem=3)
	attr=s,na
	animtype=hard
	air.animtype=diagup
	fall.animtype=diagup
	ground.type=low ;; high
	air.type=low
	damage=20
	getpower=0,0
	guardflag=m
	hitflag=maf
	pausetime=6,6
	;ad; sparkno=2+(random%4)*10
	;ad; guard.sparkno =40
	sparkxy=-10,-ifelse((animelem=2),66,96)
	hitsound=300,3
	guardsound=41,0
	ground.slidetime=16
	ground.hittime=16
	air.hittime=18
	ground.velocity=-3,-7
	air.velocity=   -3,-7
	fall=1
	air.fall=1
	recover=0
	fall.recover=0
	kill=ifelse((animelem=2),0,1)
	id=800
	chainid=800
	;---
	guard.ctrltime=     id +0*(var(31):=2 || var(30):= 20510500 +ifelse((animelem=2),66,96) )
	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


;--------------------
; G܂ - ꑤ - P2

[statedef 870]
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=870

;---
[statedef 871]
type=a
movetype=h
physics=n
velset=0,0
ctrl=0
[state 0]
	type=changeanim2
	trigger1=!time
	value=871

;---
[statedef 872]
type=a
movetype=h
physics=n
velset=0,0
ctrl=0
[state 0]
	type=changeanim2
	trigger1=!time
	value=872

;---
[statedef 873]
type=a
movetype=h
physics=n
velset=0,0
ctrl=0
[state 0]
	type=changeanim2
	trigger1=!time
	value=873

;---
[statedef 875]
type=a
movetype=h
physics=n
anim=5010
velset=0,0
ctrl=0

[state 0]
	type=velset
	trigger1=time>0
	x=-2
	y=-7
[state 0]
	type=selfstate
	trigger1=time>0
	value=5050




;--------------------
; _E
;--------------------

[statedef 5201]
type=s
movetype=i
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=palfx
	trigger1=!time
	time=2
	add=128,128,128

[state 0]
	type=playsnd
	trigger1=time=2
	value=0,13
	channel=0

[state 0]
	type=velset
	trigger1=(animelem=2)
	x=-7
[state 0]
	type=velmul
	trigger1=1
	x=0.9
[state 0]
	type=velset
	trigger1=(animelem=5,>=0)
	x=0

[state 0]
	type=posadd
	trigger1=(animelem=3)||(animelem=5)
	x=-20 *const(size.xscale)

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

[state 0]
	type=changestate
	trigger1=animtime=0
	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=(animelem=4)||(animelem=5)
	x=-16 *const(size.xscale)
[state 0]
	type=selfstate
	trigger1=animtime=0
	value=5110
	ctrl=0




;[EOF]
