


;--- time-over lost

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

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


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

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

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

;-------------
[statedef 181]
type=s
anim=181+(random%3)
velset=0,0
ctrl=0
;---
[state 0]
	type=assertspecial
	trigger1=time<260
	flag=roundnotover
;---
[state 0]
	type=playsnd
	trigger1=(time=20) && ((anim=181) || (anim=183))
	value=0,24 ;; "Daishizenno_oshiokiyo"
	channel=0
[state 0]
	type=playsnd
	trigger1=(animelem=5) && (anim=183)
	value=1,2
	channel=1
;--- mamahaha
[state 0]
	type=helper
	trigger1=!time && (anim=182) && !numhelper(8000)
	id=8000
	stateno=8000
	postype=p1
	pos=-50,floor(-screenpos y-36)
	helpertype=normal
	keyctrl=0
	ownpal=1
[state 0]
	type=changeanim
	trigger1=(animelem=5,<0) && (anim=182) && !numhelper(8000)
	value=anim
	elem=5
[state 0]
	type=playsnd
	trigger1=(animelem=5) && (anim=182)
	value=0,23 ;; "Arigatou_mamahaha"
	channel=0
[state 0]
	type=playsnd
	trigger1=(animelem=22) && (anim=182)
	value=3,0
	channel=2

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

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

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


;-------------
[statedef 191]
type=s
anim=191+(random%2)
sprpriority=2
velset=0,0
ctrl=0
;---
[state 0]
	type=assertspecial
	trigger1=1
	flag=intro
;---
;---
[state 0]
	type=playsnd
	trigger1=(animelem=3) && (anim=191)
	value=0,15 ;; "Yikuyo_mamahaha"
	channel=0
[state 0]
	type=explod
	trigger1=!time && !numexplod(190) && (anim=191)
	anim=10191 ;; mamahaha
	id=190
	sprpriority=2
	postype=p1
	pos=floor(-10*const(size.xscale)),floor(-78*const(size.yscale))
	scale=const(size.xscale),const(size.yscale)
	persistent=0
;---
;---
[state 0]
	type=playsnd
	trigger1=(animelem=10) && (anim=192)
	value=0,25 ;; "LuLuLuLu...."
;---
;--- mamahaha
[state 0]
	type=helper
	triggerall=!numhelper(8000)
	trigger1=(time=91) && (anim=191)
	trigger1=1|| var(5):=-10 || var(6):=-78
	trigger2=(animelem=11) && (anim=192)
	trigger2=1|| var(5):=-160 || var(6):=-160
	id=8000
	stateno=8000
	postype=p1
	pos=floor(var(5)*const(size.xscale)),floor(var(6)*const(size.yscale))
	helpertype=normal
	keyctrl=0
	ownpal=1
;op;	name="mamahaha"

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






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

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

[state 0]
	type=playsnd
	trigger1=time=2
	value=0,25
	channel=0
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0
	ctrl=1



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

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

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

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

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

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

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

[state 0]
	type=hitdef
	trigger1=!time && (anim=215)
	attr=s,na
	hitflag=maf
	guardflag=ma
	animtype=light
	air.animtype=back
	fall.animtype=back
	air.type=low
	ground.type=low
	damage=25
	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=   -3,-4
	getpower=20,10
	persistent=0
	;---
	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

[statedef 220]
type=s
movetype=a
physics=s
anim=ifelse(p2bodydist x<22,225,226) ;; 220
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%2)+1
	channel=0
[state 0]
	type=playsnd
	trigger1=time=2
	value=1,0
	channel=1
;---
[state 0]
	type=width
	trigger1=(animelem=2) && (anim=220)
	value=40
[state 0]
	type=posadd
	trigger1=(animelem=2) && (anim=220)
	x=40 *const(size.xscale)
[state 0]
	type=posadd
	trigger1=(animelem=3) && (anim=220)
	x=5 *const(size.xscale)

[state 0]
	type=posadd
	trigger1=((animelem=2)||(animelem=16)) && (anim=226)
	x=15 *const(size.xscale) *ifelse((animelem=16),-1,1)

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

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

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

;---
[state 0]
	type=statetypeset
	trigger1=(animelem=5) && (anim=220)
	trigger2=(animelem=9) && (anim=225)
	trigger3=(animelem=10) && (anim=226)
	movetype=i
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0
	ctrl=1


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

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

[state 0]
	type=changestate
	trigger1=!time && (p2bodydist x<22)
	value=235

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

[state 0]
	type=posset
	trigger1=time>0 && (animelem=9,<0)
	y=-2

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

;---
[state 0]
	type=statetypeset
	trigger1=(animelem=7)
	movetype=i
	statetype=a
	physics=a



;---------------
; SHK-near

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

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

;---
[state 0]
	type=statetypeset
	trigger1=(animelem=5)
	statetype=a
	physics=n

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

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

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

;-------------
[statedef 236]
type=a
movetype=i
physics=a
anim=236
velset=0,0
ctrl=0

[state 0]
	type=velset
	trigger1=!time
	x=-2
	y=-4







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

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

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

[state 0]
	type=hitdef
	trigger1=!time
	attr=c,na
	hitflag=maf
	guardflag=ma
	animtype=light
	air.animtype=back
	fall.animtype=back
	air.type=low
	ground.type=low
	damage=25
	pausetime=9,9
	;ad; sparkno=0+(random%4)*10
	;ad; guard.sparkno =40
	sparkxy=-10,-40
	hitsound=300,0
	guardsound=40,0
	ground.slidetime=10
	ground.hittime=10
	air.hittime=10
	ground.velocity=-7
	air.velocity=   -4,-3
	getpower=20,10
	persistent=0
	;---
	guard.ctrltime=     id +0*(var(31):=0 || var(30):= 510540 )
	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 410]
type=c
movetype=a
physics=c
anim=410
sprpriority=2
juggle=8
poweradd=10
ctrl=0
facep2=1

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

[state 0]
	type=hitdef
	trigger1=!time
	attr=c,na
	hitflag=maf
	guardflag=l
	animtype=light
	air.animtype=back
	fall.animtype=back
	air.type=low
	ground.type=low
	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.slidetime=10
	ground.hittime=10
	air.hittime=10
	ground.velocity=-7
	air.velocity=   -4,-3
	getpower=20,10
	persistent=0
	;---
	guard.ctrltime=     id +0*(var(31):=0 || var(30):= 510510 )
	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


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

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

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

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

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

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

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

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


;-------------
; CHP-forward

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

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

;---
[state 0]
	type=velset
	trigger1=(animelem=2,>=0) && (animelem=8,<1)
	x=5

[state 0]
	type=hitdef
	trigger1=(animelem=4)||(animelem=5)||(animelem=6)
	attr=s,na
	hitflag=maf
	guardflag=m
	animtype=hard
	air.animtype=back
	fall.animtype=back
	air.type=low
	ground.type=low
	damage=30
	pausetime=11,11
	;ad; sparkno=6+(random%4)*10
	;ad; guard.sparkno =40
	sparkxy=-10,-40
	hitsound=300,41
	guardsound=41,0
	ground.slidetime=18
	ground.hittime=20
	air.hittime=20
	ground.velocity=-ifelse((animelem=6),15,vel x)
	air.velocity=   -4,-5
	getpower=50,25
	air.fall=1
	;---
	guard.ctrltime=     id +0*(var(31):=6 || var(30):= 510540 )
	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





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

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

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

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

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


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

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

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

[state 0]
	type=hitdef
	trigger1=!time
	attr=a,na
	hitflag=maf
	guardflag=ha
	animtype=light
	air.animtype=back
	fall.animtype=back
	air.type=low
	ground.type=high
	damage=25
	pausetime=10,10
	;ad; sparkno=0+(random%4)*10
	;ad; guard.sparkno =40
	sparkxy=-10,-35
	hitsound=300,1
	guardsound=40,0
	ground.slidetime=10
	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=3)
	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=time=2 && random<500
	value=0,(random%2)+1
	channel=1
[state 0]
	type=playsnd
	trigger1=time=2
	value=1,0
	channel=0

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

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


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

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

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

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

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



;---------------
; Throw

[statedef 800]
type=s
movetype=a
physics=s
anim=800
juggle=0
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(51)>0
	var(5)=(random<500)
[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)
	sprpriority=-1
	p1facing=1
	p2facing=1
	p1stateno=805
	p2stateno=850
	p2getp1state=1
;op;	fall=1
	fall.recover=0
	hitsound=-1
	guard.dist=0
	numhits=0
	hitonce=1
	id=800
;---
[state 0]
	type=changestate
	trigger1=animtime=0
	value=0
	ctrl=1


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

;---
; against_throw ; O
[state 0]
	type=changestate
	triggerall=(time=[1,2]) && numtarget
	triggerall=playeridexist(floor(sysfvar(0)))
	triggerall=playerid(floor(sysfvar(0))),stateno=90900 && playerid(floor(sysfvar(0))),var(17)>0
	trigger1=target,command="y"||target,command="b"
	trigger2=target,var(51)>0 && (random%2) && random<target,var(51)*118 ;*at
	value=190130

;---
[state 0]
	type=turn
	trigger1=(animelem=2) && var(6)
[state 0]
	type=targetfacing
	trigger1=(animelem=2) && var(6)
	value=-1

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

;---
[state 0]
	type=width
	trigger1=!time
	value=40,40
;---
[state 0]
	type=targetstate
	trigger1=(animelem=8)
	value=851

;---
[state 0]
	type=playsnd
	trigger1=(animelem=7)
	value=1,0
	channel=1
[state 0]
	type=playsnd
	trigger1=(animelem=8)
	value=f300,41

;;--- hit_spark
[state 0] ; hit_spark
	type=helper
	trigger1=(animelem=8) && (sysfvar(0)>0)
	id=152100
	stateno=152100
	helpertype=normal
	ownpal=0
	keyctrl=0
	postype=p1
	pos=floor(16*const(size.xscale)),floor(-18*const(size.xscale))
	size.height=6 ;; hit_spark
	facing=-1

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

[state 0]
	type=sprpriority
	trigger1=(animelem=7)
	value=2

;---
[state 0]
	type=posadd
	trigger1=(animelem=3)
	x=-15 *const(size.xscale)
	y=-25 *const(size.yscale)
[state 0]
	type=posset
	trigger1=(animelem=6)
	y=0

;---
[state 0]
	type=targetbind
	trigger1=(animelem=2,<0)
	pos=floor(45 *const(size.xscale)), 0
	time=1
[state 0]
	type=targetbind
	trigger1=(animelem=2,>=0) && (animelem=3,<0)
	pos=floor(10 *const(size.xscale)), 0
	time=1
[state 0]
	type=targetbind
	trigger1=(animelem=3,>=0) && (animelem=4,<0)
	pos=floor(20 *const(size.xscale)), 0
	time=1
[state 0]
	type=targetbind
	trigger1=(animelem=4,>=0) && (animelem=5,<0)
	pos=0, floor(-70 *const(size.xscale))
	time=1
[state 0]
	type=targetbind
	trigger1=(animelem=5,>=0) && (animelem=6,<0)
	pos=floor(-35 *const(size.xscale)), floor(-45 *const(size.yscale))
	time=1
[state 0]
	type=targetbind
	trigger1=(animelem=6,>=0) && (animelem=7,<0)
	pos=0,0
	time=1

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


;-------------
[statedef 806]
type=a
movetype=i
physics=a
anim=806
velset=-3,-8
ctrl=0

[state 0]
	type=posadd
	trigger1=!time
	x=-15 *const(size.xscale)
	y=-15 *const(size.yscale)


;-------------
; P2

[statedef 850]
type=s
movetype=h
physics=n
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=850
;---
[state 0] ; for_safety
	type=selfstate
	trigger1=(time>128)
	value=5100


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

[state 0]
	type=posset
	trigger1=!time
	y=0
[state 0]
	type=changeanim
	trigger1=time<12
	value=anim
[state 0]
	type=changeanim
	trigger1=time=12
	value=5160
	persistent=0
[state 0]
	type=velset
	trigger1=(anim=5160)
	x=-4
	y=-4
	persistent=0
[state 0]
	type=veladd
	trigger1=(anim=5160)
	y=0.5
[state 0]
	type=nothitby
	trigger1=1
	value=sca
[state 0]
	type=selfstate
	trigger1=(anim=5160) && (pos y+vel y>-6) && (vel y>0)
	value=5100






;--------------
; throw - type 2
;  I `L (--r)

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

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

;---
[state 0]
	type=targetlifeadd
	trigger1=(animelem=3)||(animelem=6)
	value=-40
	kill=0

[state 0]
	type=hitadd
	trigger1=(animelem=3)||(animelem=6)
	value=1

;;---
;[state 0]
;	type=null
;	trigger1=(animelem=3)||(animelem=6)
;	trigger1=numenemy
;	trigger1=enemy,sysfvar(0)>0 && playeridexist(floor(enemy,sysfvar(0)))
;	trigger1=playerid(floor(enemy,sysfvar(0))),var(0)=90900
;	trigger1=1|| playerid(floor(enemy,sysfvar(0))),cond(1, var(11):= var(11)+1 ,0)


;---
[state 0]
	type=playsnd
	trigger1=(animelem=2)||(animelem=5)||(animelem=12)
	value=0,(animelem=12)
	channel=0
[state 0]
	type=playsnd
	trigger1=(animelem=3)||(animelem=6)
	value=f300,1

;---
[state 0]
	type=targetbind
	trigger1=(animelem=13,<0)
	pos=floor(50 *const(size.xscale)),0
	time=1

;;--- hit_spark
[state 0] ; hit_spark
	type=helper
	trigger1=((animelem=3)||(animelem=6)) && (sysfvar(0)>0)
	id=152100
	stateno=152100
	helpertype=normal
	ownpal=0
	keyctrl=0
	postype=p1
	pos=floor(36*const(size.xscale)),floor(-ifelse((animelem=3),60,80)*const(size.xscale))
	size.height=2 ;; hit_spark
	facing=-1

;---
[state 0]
	type=hitdef
	trigger1=(animelem=13)
	attr=a,nt
	hitflag=ma+
	guardflag=-1
	animtype=heavy
	air.animtype=back
	fall.animtype=diagup
	air.type=low
	ground.type=high
	damage=40,0
	pausetime=9,9
	;ad; sparkno=2+(random%4)*10
	;ad; guard.sparkno =41
	sparkxy=-10,-85
	hitsound=300,3
	guardsound=41,0
	ground.slidetime=16
	ground.hittime=18
	air.hittime=18
	ground.velocity=-3,-8
	air.velocity=   -3,-8
	air.fall=1
	fall=1
	fall.recover=0
	yaccel=0.5
	chainid=800
	persistent=0
	;---
	guard.ctrltime=     id +0*(var(31):=2 || var(30):= 315510585 )
	fall.envshake.time= id
	fall.envshake.ampl= 0

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


;-------------
[statedef 811]
type=a
movetype=i
physics=a
anim=811
velset=0,0
ctrl=0

[state 0]
	type=posadd
	trigger1=!time
	x= 30 *const(size.xscale)
	y=-80 *const(size.yscale)
[state 0]
	type=velset
	trigger1=!time
	x=-3
	y=-5


;--------------
; P2

[statedef 860]
type=s
movetype=h
physics=n
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=860
[state 0]
	type=selfstate
	trigger1=animtime=0
	value=0
	ctrl=1







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

[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=nothitby
	trigger1=1
	value=sca
[state 0]
	type=palfx
	trigger1=!time
	time=2
	add=128,128,128

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

[state 0]
	type=velset
	trigger1=(animelem=2)
	x=-8
[state 0]
	type=velmul
	trigger1=time>0
	x=0.9

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


;[EOF]
