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

; v05:	level
; v06:	temp
; v30-32:	hit/guard spark
; v41:	cancel switch
; v51:	ai
; v59:	score

; fv0-2: temp

;---------------
; win

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

[state 0]
	type=assertspecial
	trigger1=time<124
	flag=roundnotover
;---
[state 0]
	type=afterimage
	trigger1=(animelem=2) && (anim=180)
	time=abs(animtime)+9
	length=9
	timegap=1
	framegap=4
	palcolor=256
	palbright=1,1,1
	palcontrast=128,128,128
	paladd=0,0,0
	palmul=1,1,1
;afia;	trans=add1

[state 0]
	type=playsnd
	trigger1=(animelem=6) && (anim=181)
	trigger2=(animelem=10) && (anim=180)
	value=0,ifelse(random<750,7+(random%2),0)
	channel=0



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

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

[state 0]
	type=assertspecial
	trigger1=1
	flag=intro
;---
;---
[state 0] ; my_intro
	type=helper
	triggerall=!time && !numhelper(190) && (ishometeam=1) && (matchno>1) && (roundno=1)
	trigger1=!numpartner
	trigger2=numpartner
	trigger2=id<partner,id
	id=190
	stateno=590190
	pos=888,888
;---
;---
[state 0] ; vs. fatals
	type=changeanim
	triggerall=!time && numenemy
	trigger1=enemy,name="terry" || enemy,name="andy" || enemy,name="rock" || enemy,name="billy"
	value=193
[state 0] ; vs. vega
	type=changeanim
	triggerall=!time && p2name="vega"
	trigger1=numpartner=0
	trigger2=numpartner
	trigger2=id<partner,id
	value=192

;---
;---
[state 0]
	type=playsnd
	trigger1=(time=10) && (anim=190)
	value=0,4+(random%2)
	channel=0

; cloth
[state 0]
	type=projectile
	trigger1=(animelem=5) && (anim=190)
	projanim=19190
	projsprpriority=0
	postype=p1
	offset=0,0
	projedgebound=800
	projstagebound=800
	projscale=const(size.xscale),const(size.yscale)
	projshadow=-1
	projremovetime=38
	ownpal=1

;---
[state 0]
	type=playsnd
	trigger1=(animelem=3) && (anim=191)
	trigger2=(animelem=11) && (anim=193) ;; vs. fatals
	value=0,6 ;; "come on"
	channel=0

;--- vs. vega
[state 0]
	type=playsnd
	trigger1=((animelem=4)||(animelem=7)) && (anim=192)
	value=1,0 ;; ex
	channel=1
[state 0]
	type=playsnd
	trigger1=(animelem=3) && (anim=192)
	value=0,11 ;; "double-reppu"
	channel=0

;--- eff
[state 0]
	type=projectile
	trigger1=((animelem=3)||(animelem=8)) && (anim=192)
	projanim=ifelse((animelem=8), 1003, 1002)
	projsprpriority=ifelse((animelem=8), -2, 3)
	postype=p1
	offset=floor(6*const(size.xscale)), floor(-52*const(size.yscale))
	projedgebound=800
	projstagebound=800
	projscale=const(size.yscale)*1.15,const(size.yscale)*1.15
	projremovetime=ifelse((animelem=8), 9, 12)
	ownpal=1
;---
[state 0]
	type=helper
	trigger1=((animelem=4)||(animelem=8)) && (anim=192) && (sysfvar(0)>0)
	id=1000
	size.height=ifelse((animelem=4),20,26);;<-(removetime+options)
	pos=floor(ifelse((animelem=4),60,40)*const(size.xscale)),0
	stateno=91000
	size.head.pos=19192,1006;;<-anim,hitanim
	size.mid.pos=ifelse((animelem=4),0,5000),0;;<-speed_x,y(1/1000)
	size.ground.front=1009;;<-max_hits/miss_time
	size.ground.back=800010;;<-damage hit/guard
	size.air.front=-8800;;<-hit_x(1/1000)
	size.air.back=-5000;;<-hit_y(1/1000)
	size.shadowoffset=2;;<-fall(10=recovery/1=ground/2=air/3=g&a)
	ownpal=1
	size.xscale=1
	size.yscale=1
;---
[state 0]
	type=projectile
	trigger1=((animelem=4)||(animelem=8)) && (anim=192) && (sysfvar(0)<=0)
	projid=91000
	projanim=19192
	projhitanim=1006
	projsprpriority=3
	projscale=1,1
	projremovetime=ifelse((animelem=4),20,26)
	offset=floor(ifelse((animelem=4),60,40)*const(size.xscale)),0
	velocity=ifelse((animelem=4),0,5),0

;---
;---
[state 0]
	type=changeanim
	trigger1=(anim=[190,193]) && (animtime=0)
	value=0
[state 0]
	type=changestate
	trigger1=((anim=[190,191]) && (animtime=0)) || anim=0
	trigger1=!numhelper(190)
	value=0






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

[statedef 195]
type=s
movetype=i
physics=s
anim=195
sprpriority=2
velset=0,0
ctrl=0
[state 0]
	type=playsnd
	trigger1=time=3
	value=0,6
	channel=0
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0
	ctrl=1



;---------------
; SLP

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

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

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

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

;---------------
; SHP

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

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

[state 0]
	type=posadd
	trigger1=(animelem=2) && (anim=225)
	x=10 *const(size.xscale)

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


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

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

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

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


;---------------
; SHK

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

[state 0]
	type=playsnd
	trigger1=((time=3)||((animelem=5)&&(anim=255))) && random<500
	value=0,(random%3)+1
	channel=0
[state 0]
	type=playsnd
	trigger1=(time=4)||((animelem=6)&&(anim=255))
	value=f200,3
	channel=1

;---
[state 0] ; dash_dust
	type=helper
	trigger1=(animelem=2) && (anim=250) && (sysfvar(0)>0)
	id=152040
	stateno=152040
	pos=floor(8*const(size.xscale)),floor(-pos y)
	size.xscale=0.5
	size.yscale=0.5

[state 0]
	type=velset
	trigger1=(animelem=3,=1) && (anim=250)
	x=10

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

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

[state 0]
	type=hitdef
	trigger1=(animelem=6) && (anim=255)
	attr=s,na
	hitflag=maf
	guardflag=ma
	animtype=heavy
	air.animtype=back
	fall.animtype=back
	damage=40
	pausetime=13,14
	guard.pausetime=13,13
	;ad; sparkno=2+(random%4)*10
	;ad; guard.sparkno =40
	sparkxy=-10,-65
	hitsound=300,3
	guardsound=41,0
	ground.type=low
	air.type=low
	ground.slidetime=13
	ground.hittime=15
	air.hittime=15
	ground.velocity=-9
	air.velocity=   -5,-4
	getpower=20,10
	;---
	guard.ctrltime=     id +0*(var(31):=2 || var(30):= 510565 )
	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



;---------------
; CLP

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

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

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


;---------------
; CHP

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

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

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


;---------------
; CLK

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

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

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


;---------------
; CHK

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

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

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



;---------------
; JLP

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

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

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

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


;---------------
; JHP

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

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

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

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


;---------------
; JLK

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

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

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


;---------------
; JHK

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

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

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

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






;---------------
; throw
;  (p:^󓊂 / K:Ew蓊)
;---------------

[statedef 800]
type=s
movetype=a
physics=s
anim=800
sprpriority=1
juggle=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
	attr=s,nt
	hitflag=m-
	priority=3,miss
	sparkno=(var(31):=-1)
	p1facing=1
	p2facing=1
	p1stateno=801
;;op;	p2stateno=805
	guard.dist=0

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


;-------------
; t-1 shin-ku-nage
; ^󓊂

[statedef 801]
type=s
movetype=a
physics=n
anim=801
poweradd=0
sprpriority=2
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(65*const(size.xscale)),floor(-75*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=playsnd
	trigger1=(time=1) || (animelem=9)
	value=0,ifelse(time=1,3,1)
	channel=0
[state 0]
	type=playsnd
	trigger1=(animelem=4)
	value=f200,2
	channel=1

;---
[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=targetbind
	trigger1=(animelem=2,<0)
	pos=floor(64 *const(size.xscale)), 0
	time=1
[state 0]
	type=targetbind
	trigger1=(animelem=2,>=0) && (animelem=3,<0)
	pos=floor(-31 *const(size.xscale)), floor(-108 *const(size.yscale))
	time=1
[state 0]
	type=targetbind
	trigger1=(animelem=3,>=0) && (animelem=4,<0)
	pos=floor(-33 *const(size.xscale)), floor(-123 *const(size.yscale))
	time=1
[state 0]
	type=targetbind
	trigger1=(animelem=4,>=0) && (animelem=5,<0)
	pos=floor(19 *const(size.xscale)), floor(-128 *const(size.yscale))
	time=1
[state 0]
	type=targetbind
	trigger1=(animelem=5,>=0) && (animelem=6,<0)
	pos=floor(42 *const(size.xscale)), floor(-132 *const(size.yscale))
	time=1
[state 0]
	type=targetbind
	trigger1=(animelem=6)
	pos=floor(69 *const(size.xscale)), floor(-136 *const(size.yscale))
	time=1
;---
[state 0]
	type=width
	trigger1=!time
	edge=50,50
;---
[state 0]
	type=targetlifeadd
	trigger1=(animelem=6)
	value=-128
;---
[state 0]
	type=targetstate
	trigger1=!time
	value=805
[state 0]
	type=targetstate
	trigger1=(animelem=6)
	value=806
;---
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0
	ctrl=1

;-------------
; p2state
[statedef 805]
type=a
movetype=h
physics=n
velset=0,0
poweradd=0
ctrl=0
[state 0]
	type=afterimagetime
	trigger1=!time
	time=0
[state 0]
	type=changeanim2
	trigger1=!time
	value=805
[state 0]
	type=selfstate
	trigger1=time>128
	value=5050 ;; for_safety
;-------------
[statedef 806]
type=a
movetype=h
physics=n
velset=-4,-6
ctrl=0
[state 0]
	type=nothitby
	trigger1=!time
	value=sca
	time=16
[state 0]
;;op;	type=gravity
	type=veladd
	trigger1=1
	y=0.41256
[state 0]
	type=turn
	trigger1=(pos y+vel y>-55) && (vel y>0)
[state 0]
	type=selfstate
	trigger1=(pos y+vel y>-55) && (vel y>0)
	value=5100

;---
[state 0]
	type=playerpush
	trigger1=1
	value=0

;[state 0]
;	type=screenbound
;	trigger1=1
;	value=0

;; no screenbound switch
[state 0]
	type=explod
	trigger1=!ishelper
	anim=0
	scale=0,0
	id=920851 ;; ## switch_id
	removetime=1
	ignorehitpause=1



;-------------
; t-2 kata-te-nage
; K:Ew蓊

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

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

;---
[state 0]
	type=targetbind
	trigger1=(animelem=2,<0)
	pos=floor(-39 *const(size.xscale)), 0
	time=1
[state 0]
	type=targetbind
	trigger1=(animelem=2,>=0) && (animelem=3,<0)
	pos=floor(-38 *const(size.xscale)), floor(-119 *const(size.yscale))
	time=1
[state 0]
	type=targetbind
	trigger1=(animelem=3,>=0) && (animelem=4,<0)
	pos=floor(42 *const(size.xscale)), floor(-116 *const(size.yscale))
	time=1
[state 0]
	type=targetbind
	trigger1=(animelem=4,>=0) && (animelem=5,<0)
	pos=floor(49 *const(size.xscale)), floor(-100 *const(size.yscale))
	time=1
[state 0]
	type=targetbind
	trigger1=(animelem=5,>=0) && (animelem=6,<0)
	pos=floor(27 *const(size.xscale)), floor(-125 *const(size.yscale))
	time=1
[state 0]
	type=targetbind
	trigger1=(animelem=6,>=0) && (animelem=6,<8)
	pos=floor(27 *const(size.xscale)), floor(-5 *const(size.yscale))
	time=1

;---
[state 0]
	type=targetlifeadd
	trigger1=(animelem=6)
	value=-128
;---
[state 0] ; ground_wave
	type=helper
	trigger1=(animelem=6)
	pos=floor(45*const(size.xscale)),0
	id=159005
	stateno=159005
	size.height=4

;---
[state 0]
	type=targetstate
	trigger1=(!time)
	value=815
[state 0]
	type=targetstate
	trigger1=(animelem=6,=8)
	value=816
;---
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0
	ctrl=1

;-------------
; p2state
[statedef 815]
type=a
movetype=h
physics=n
velset=0,0
poweradd=0
ctrl=0
[state 0]
	type=afterimagetime
	trigger1=!time
	time=0
[state 0]
	type=changeanim2
	trigger1=!time
	value=815
[state 0]
	type=offset
	trigger1=time>21
	x=ifelse(time%2,1,-1)*2
[state 0]
	type=selfstate
	trigger1=time>128
	value=5050 ;; for_safety
;-------------
[statedef 816]
type=a
movetype=h
physics=n
anim=5160
velset=0,-3
ctrl=0
[state 0]
	type=turn
	trigger1=!time
[state 0]
	type=posset
	trigger1=!time
	y=0
[state 0]
	type=nothitby
	trigger1=1
	value=sca
	time=1
[state 0]
	type=gravity
	trigger1=(time>0)
[state 0]
	type=selfstate
	trigger1=(time>0) && (pos y+vel y>=0) && (vel y>0)
	value=5110





;---------------
; 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
	time=1

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

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



;---------------
; fall-down
; |

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


;[EOF]
