;#ADD004BASIC#

[remap]
	x=x
	y=y
	z=z
	a=a
	b=b
	c=c
	s=s
[defaults]
	command.time=16
	command.buffer.time=1


;---------------
;---------------
[command]
	name="hp1"
	command=~D,F,D,F,x
	time=32
[command]
	name="hp1_s"
	command=~D,F,D,F,y
	time=32
[command]
	name="hp1"
	command=~D,F,x+y
[command]
	name="hp1_s"
	command=~D,F,y+z
;------
[command]
	name="hp2"
	command=~D,B,D,B,x
	time=32
[command]
	name="hp2_s"
	command=~D,B,D,B,y
	time=32
[command]
	name="hp2"
	command=~D,B,x+y
[command]
	name="hp2_s"
	command=~D,B,y+z
;------
[command]
	name="hp3"
	command=~D,F,D,F,a
	time=32
[command]
	name="hp3_s"
	command=~D,F,D,F,b
	time=32
[command]
	name="hp3"
	command=~D,F,a+b
[command]
	name="hp3_s"
	command=~D,F,b+c
;------
[command]
	name="hp4"
	command=~D,B,D,B,a
	time=32
[command]
	name="hp4_s"
	command=~D,B,D,B,b
	time=32
[command]
	name="hp4"
	command=~D,B,a+b
[command]
	name="hp4_s"
	command=~D,B,b+c



;-----------------
[command]
	name="sp3"
	command=~F,D,F,x
	time=20
[command]
	name="sp3_s"
	command=~F,D,F,y
	time=20
[command]
	name="sp3"
	command=~F,D,DF,x
	time=20
[command]
	name="sp3_s"
	command=~F,D,DF,y
	time=20
;-----
[command]
	name="sp1"
	command=~D,F,x
[command]
	name="sp1_s"
	command=~D,F,y
;------
[command]
	name="sp2"
	command=~D,B,x
[command]
	name="sp2_s"
	command=~D,B,y
;------
[command]
	name="sp4"
	command=~D,F,a
[command]
	name="sp4_s"
	command=~D,F,b
;------
[command]
	name="sp5"
	command=~D,B,a
[command]
	name="sp5_s"
	command=~D,B,b
;------
[command]
	name="sp6"
	command=~F,B,F,x
[command]
	name="sp6_s"
	command=~F,B,F,y
;------
[command]
	name="sp7"
	command=~F,B,D,x
[command]
	name="sp7_s"
	command=~F,B,D,y


;-----------------
[command]
	name="ff"
	command=F,F
	time=10
[command]
	name="bb"
	command=B,B
	time=10

;-----------------
[command]
	name="recovery"
	command=x+y
	time=1
[command]
	name="recovery"
	command=z
	time=1
[command]
	name="ab"
	command=a+b
	time=1
[command]
	name="ab"
	command=c
	time=1

;-----------------
[command]
	name="a"
	command=a
	time=1
[command]
	name="b"
	command=b
	time=1
[command]
	name="c"
	command=c
	time=1
[command]
	name="x"
	command=x
	time=1
[command]
	name="y"
	command=y
	time=1
[command]
	name="z"
	command=z
	time=1
[command]
	name="start"
	command=s
	time=1

;-----------------
[command]
	name="holdfwd"
	command=/$F
	time=1
[command]
	name="holdback"
	command=/$B
	time=1
[command]
	name="holdup"
	command=/$U
	time=1
[command]
	name="holddown"
	command=/$D
	time=1

;-----------------
[command]
	name="holdx"
	command=/x
	time=1
[command]
	name="holdy"
	command=/y
	time=1





;---------------
[statedef -1]
;---------------



;---
;--- shin-karate_mode
[state 0]
	type=varset
	trigger1=!var(15)
	trigger1=matchno>1 && ishometeam=1
	var(15)=1
[state 0]
	type=varset
	trigger1=var(15)
	trigger1=matchno>1 && ishometeam=0
	var(15)=0

;--- change_form
[state 0]
	type=changeanim
	trigger1=(anim=0) && (animelem=9,>=0)
	trigger1=!var(15) ;; normal
	value=anim
	elem=1
[state 0]
	type=changeanim
	trigger1=(anim=0) && (animelem=9,<0)
	trigger1=var(15) ;; shin-karate
	value=anim
	elem=9



;---
;--- get_hit_voice
[state 0]
	type=playsnd
	trigger1=stateno=5000 || stateno=5010 || stateno=5020 || stateno=5070 || stateno=5100
	trigger1=time=1 && alive && random<500
	value=5000,(random%4)
	channel=0
;---
[state 0] ; blocking/just defence
	type=playsnd
	trigger1=stateno=195500 && time=1
	value=0,(random%3)
	channel=0



;---
;---
; combo flag
[state 0]
	type=varset
	trigger1=var(41)
	var(41)=0
[state 0]
	type=varset
	triggerall=movecontact
	triggerall=!var(41)
	triggerall=roundstate=2
	trigger1=stateno=200 || (stateno=220 && anim=225)
	trigger2=stateno=230 || (stateno=250 && anim=255)
	trigger3=stateno=301 || stateno=311
	trigger4=stateno=400 || stateno=420 || stateno=430 || stateno=440
	var(41)=1



;;--- for_debug
;; 1402: Ha/Go_Kyoku_Jin / 1404: Mu_Ei_Jin
;[state 0]
;	type=changestate
;;op1;	value=1404-2*(command="holdfwd")
;	value=1402 + (var(5):=1)*0
;;op1;	triggerall=command="start"
;	triggerall=command="holddown"
;	trigger1=statetype!=a && (ctrl || var(41))



;---------------
; super / hyper
;---------------

; Super - Ran_Bu
; ՗ (max2)
[state 0]
	type=changestate
	value=3600
	triggerall=command="hp1" || command="hp1_s"
	triggerall=var(51)<1
	triggerall=power>=2000
	trigger1=statetype!=a && (ctrl || var(41))

; Super - Ha_O
; e
[state 0]
	type=changestate
	value=3000
	triggerall=command="hp2" || command="hp2_s"
	triggerall=var(51)<1
	triggerall=power>=1000 && !numprojid(91000)
	trigger1=statetype!=a && (ctrl || var(41))

; Super - Ko_Ho
; ɌՖC
[state 0]
	type=changestate
	value=3400
	triggerall=command="hp3" || command="hp3_s"
	triggerall=var(51)<1
	triggerall=power>=1000
	trigger1=statetype!=a && (ctrl || var(41))

; Super - KiShin
; S_
[state 0]
	type=changestate
	value=3100 +(command="hp4_s" && power>=2000)
	triggerall=command="hp4" || command="hp4_s"
	triggerall=var(51)<1
	triggerall=power>=1000
	trigger1=statetype!=a && ctrl && (p2bodydist x=[-32,32]) && (p2statetype=s || p2statetype=c)

;; Super - Koh
;; Ɍ
;[state 0]
;	type=changestate
;	value=1000
;	triggerall=command="hp1" || command="hp1_s"
;	triggerall=var(51)<1
;	triggerall=power>=1000 && !numprojid(91000)
;	trigger1=statetype!=a && (ctrl || var(41))


;---------------
; special
;---------------

; Ko_Ho
; ՖC
[state 0]
	type=changestate
	value=1100
	triggerall=command="sp3" || command="sp3_s"
	triggerall=var(51)<1
	trigger1=statetype!=a && (ctrl || var(41))

;; Ha_O_Shi_Ko (cpu only)
;; e (cpup)
;[state 0]
;	type=changestate
;	value=1600
;	triggerall=command="sp7" || command="sp7_s"
;	triggerall=var(51)<1
;	triggerall=!numprojid(91000)
;	trigger1=statetype!=a && (ctrl || var(41))

; Syo_Ran_kyaku
; ėr
[state 0]
	type=changestate
	value=1500
	triggerall=command="sp5" || command="sp5_s"
	triggerall=var(51)<1
	trigger1=statetype!=a && (ctrl || var(41))

; Mo_Ko
; ҌՖ
[state 0]
	type=changestate
	value=1400
	triggerall=command="sp2" || command="sp2_s"
	triggerall=var(51)<1
	trigger1=statetype!=a && (ctrl || var(41))

; Zan_Retsu
; b
[state 0]
	type=changestate
	value=1300
	triggerall=command="sp6" || command="sp6_s"
	triggerall=var(51)<1
	trigger1=statetype!=a && (ctrl || var(41))

; Hi_En
; 򉍎r
[state 0]
	type=changestate
	value=1200
	triggerall=command="sp4" || command="sp4_s"
	triggerall=var(51)<1
	trigger1=statetype!=a && (ctrl || var(41))

; Koh
; 
[state 0]
	type=changestate
	value=1020
	triggerall=command="sp1" || command="sp1_s"
	triggerall=var(51)<1
	triggerall=!numprojid(91000)
	trigger1=statetype!=a && (ctrl || var(41))


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


;;--- leap
;[state 0]
;	type=changestate
;	value=48
;	triggerall=(sysvar(4)=0) && roundstate=2
;	triggerall=statetype!=a && (ctrl || var(41))
;	triggerall=(sysfvar(0)>id) && playeridexist(floor(sysfvar(0)))
;	triggerall=(playerid(floor(sysfvar(0))),var(0)=90900) && (playerid(floor(sysfvar(0))),var(22)=2)
;	trigger1=(command="x" && command="a") && (command!="holdup") && var(51)<1
;	trigger2=var(51)>0 && sysfvar(4)<1 && (p2bodydist x<82) && random<80

;;--- guard-break
;[state 0]
;	type=changestate
;	value=8210
;	triggerall=(sysvar(4)=0) && power>=1000 && roundstate=2
;	triggerall=statetype!=a && (ctrl || var(41))
;	triggerall=(sysfvar(0)>id) && playeridexist(floor(sysfvar(0)))
;	triggerall=(playerid(floor(sysfvar(0))),var(0)=90900) && (playerid(floor(sysfvar(0))),var(22)=2)
;	trigger1=(command="y" && command="b") && var(51)<1
;	trigger2=var(51)>0 && sysfvar(4)<1 && (p2bodydist x<60) && random<85

;;--- guard-cancel / zero-counter
;[state 0]
;	type=changestate
;	value=8200
;	triggerall=(sysvar(4)=0) && power>=1000 && roundstate=2
;	triggerall=(stateno=150 || stateno=152) && time>1 && alive
;	trigger1=(command="ab") && var(51)<1
;	trigger2=var(51)>0 && sysfvar(4)<1 && (p2bodydist x<82)
;	trigger2=(sysfvar(0)>id) && playeridexist(floor(sysfvar(0)))
;	trigger2=(playerid(floor(sysfvar(0))),var(0)=90900) && random<(roundno+matchno+var(51)+var(51)+var(51))*28
;	trigger2=(random>life*3) || (playerid(floor(sysfvar(0))),var(36)>40) ;;{0,50}

;;--- guard-cancel-escape
;[state 0]
;	type=changestate
;	value=ifelse(command="holdback",115,110)
;	triggerall=(sysvar(4)=0) && power>=500 && roundstate=2
;	triggerall=(stateno=150 || stateno=152) && time>1 && alive
;	trigger1=(command="recovery") && var(51)<1
;	trigger2=var(51)>0 && sysfvar(4)<1 && random<50
;[state 0]
;	type=poweradd
;	triggerall=(sysvar(4)=0)
;	trigger1=(stateno=110 || stateno=115) && time=1
;	trigger1=(prevstateno=150 || prevstateno=152)
;	value=-500

;--- roll
[state 0]
	type=changestate
	value=ifelse(command="holdback",115,110)
	triggerall=command="recovery"
	triggerall=statetype!=a && ctrl
	triggerall=var(51)<1 && !var(4)
	trigger1=(sysfvar(0)>id) && playeridexist(floor(sysfvar(0)))
	trigger1=(playerid(floor(sysfvar(0))),var(0)=90900) && (playerid(floor(sysfvar(0))),var(22)!=[2,3])
	trigger2=(sysfvar(0)<=0)

;---
; run
[state 0]
	type=changestate
	value=100
	trigger1=command="ff"
	trigger1=var(51)<1
	trigger1=statetype=s && ctrl && stateno!=100
; backstep
[state 0]
	type=changestate
	value=105
	trigger1=command="bb"
	trigger1=var(51)<1
	trigger1=statetype=s && ctrl && stateno!=105

;---
; leap
; WvU
[state 0]
	type=changestate
	value=650
	trigger1=stateno=58 && vel y>0


;---------------
; throw
; 
[state 0]
	type=changestate
	value=800
	triggerall=(command="y" || command="b") && (command="holdfwd" || command="holdback")
	trigger1=statetype=s && ctrl && (stateno!=[100,101])
	trigger1=p2statetype!=a && p2movetype!=h && p2statetype!=l && (p2bodydist x=[-12,12])


;---------------
; Oni_Kuruma
; S
[state 0]
	type=changestate
	value=300
	triggerall=command="x" && command="holdfwd" && command!="holddown"
	triggerall=var(51)<1
	trigger1=statetype!=a && ctrl

; cancel
; SԁiLZŁj
[state 0]
	type=changestate
	value=301
	triggerall=command="x" && command="holdfwd" && command!="holddown"
	triggerall=var(51)<1
	trigger1=statetype!=a && var(41) && (stateno!=[300,311])
;---
; YiTa_Wari
; 
[state 0]
	type=changestate
	value=310
	triggerall=command="a" && command="holdfwd" && command!="holddown"
	triggerall=var(51)<1
	trigger1=statetype!=a && ctrl

; cancel
; iLZŁj
[state 0]
	type=changestate
	value=311
	triggerall=command="a" && command="holdfwd" && command!="holddown"
	triggerall=var(51)<1
	trigger1=statetype!=a && var(41) && (stateno!=[300,311])


;---------------
; basic
;---------------
; taunt
; 
[state 0]
	type=changestate
	value=195
	triggerall=command="start"
	triggerall=var(51)<1
	trigger1=statetype!=a && ctrl

;---
; SLP ; p`
[state 0]
	type=changestate
	value=200
	triggerall=command="x" && command!="holddown"
	triggerall=var(51)<1
	trigger1=statetype!=a && ctrl
	trigger2=(stateno=200||stateno=230||stateno=400||stateno=430) && (time>4 || movecontact)

; SHP ; p`
[state 0]
	type=changestate
	value=220
	triggerall=command="y" && command!="holddown"
	triggerall=var(51)<1
	trigger1=statetype!=a && ctrl

; SLK ; LbN
[state 0]
	type=changestate
	value=230
	triggerall=command="a" && command!="holddown"
	triggerall=var(51)<1
	trigger1=statetype!=a && ctrl
	trigger2=(stateno=200||stateno=230||stateno=400||stateno=430) && (time>4 || movecontact)

; SHK ; LbN
[state 0]
	type=changestate
	value=250
	triggerall=command="b" && command!="holddown"
	triggerall=var(51)<1
	trigger1=statetype!=a && ctrl

;---
; CLP ; Ⴊݎp`
[state 0]
	type=changestate
	value=400
	triggerall=command="x" && command="holddown"
	triggerall=var(51)<1
	trigger1=statetype!=a && ctrl
	trigger2=(stateno=200||stateno=230||stateno=400||stateno=430) && (time>4 || movecontact)

; CHP ; Ⴊ݋p`
[state 0]
	type=changestate
	value=420
	triggerall=command="y" && command="holddown"
	triggerall=var(51)<1
	trigger1=statetype!=a && ctrl

; CMK ; ႪݒLbN
[state 0]
	type=changestate
	value=440
	triggerall=command="a" && (command="holdfwd" || command="holdback") && command="holddown"
	triggerall=var(51)<1
	trigger1=statetype!=a && ctrl
	trigger2=(stateno=200||stateno=230||stateno=400||stateno=430) && (time>4 || movecontact)

; CLK ; ႪݎLbN
[state 0]
	type=changestate
	value=430
	triggerall=command="a" && command="holddown"
	triggerall=var(51)<1
	trigger1=statetype!=a && ctrl
	trigger2=(stateno=200||stateno=230||stateno=400||stateno=430) && (time>4 || movecontact)

; CHK ; Ⴊ݋LbN
[state 0]
	type=changestate
	value=450
	triggerall=command="b" && command="holddown"
	triggerall=var(51)<1
	trigger1=statetype!=a && ctrl

;---
; JLP ; Wvp`
[state 0]
	type=changestate
	value=600
	triggerall=command="x"
	triggerall=var(51)<1
	trigger1=statetype=a && ctrl

; JHP ; Wvp`
[state 0]
	type=changestate
	value=620
	triggerall=command="y"
	triggerall=var(51)<1
	trigger1=statetype=a && ctrl

; JLK ; WvLbN
[state 0]
	type=changestate
	value=630
	triggerall=command="a"
	triggerall=var(51)<1
	trigger1=statetype=a && ctrl

; JHK ; WvLbN
[state 0]
	type=changestate
	value=650
	triggerall=command="b"
	triggerall=var(51)<1
	trigger1=statetype=a && ctrl







;---------------
; [ai]
;---------------

;---------------
; SLP:200, SLK:230 / SHP:220 SHK:250
[state 0] ; stand attack***
	type=changestate
	value=ifelse(random<200, ifelse(random<500,200,230), ifelse(random<500,220,250))
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && p2statetype!=l && ctrl && numenemy
	triggerall=(prevstateno!=1205)
	;---
	trigger1=sysfvar(0)>0 && playeridexist(floor(sysfvar(0)))
	trigger1=(playerid(floor(sysfvar(0))),var(0)=90900) && playerid(floor(sysfvar(0))),var(18)%10=1
	;---
	trigger2=(p2bodydist x=[-32,32]) && (p2statetype=s) && random<420
	trigger3=(prevstateno=[600,699]) && (p2bodydist x=[-42,42]) && random<560

; SHP:220
[state 0] ; stand attack***
	type=changestate
	value=220
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && p2statetype!=l && ctrl && (gametime%600<200)
	triggerall=(prevstateno!=1205)
	trigger1=(p2bodydist x=[30,65]) && (p2statetype=s) && random<250

;---
; CLP:400 CLK:430 / CHP:420 / CHK:450
[state 0] ; crouching attack
	type=changestate
	value=ifelse(random<500, ifelse(random<600,430,400), ifelse(random<500,420,450) )
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && p2statetype!=l && ctrl && numenemy
	triggerall=(prevstateno!=1205)
	;---
	trigger1=sysfvar(0)>0 && playeridexist(floor(sysfvar(0)))
	trigger1=(playerid(floor(sysfvar(0))),var(0)=90900) && (playerid(floor(sysfvar(0))),var(18)/10)%10=1
	;---
	trigger2=(p2bodydist x<42) && p2movetype!=a && p2statetype=s && random<180
	trigger3=(stateno=[100,101]) && (p2bodydist x<26) && (enemynear,numproj=0) && p2statetype!=a && random<220
	trigger4=(prevstateno=52) && (p2bodydist x<42) && random<200

; CLP:400
[state 0]
	type=changestate
	value=400
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && p2statetype!=a && p2statetype!=l && (p2bodydist x=[-36,36])
	trigger1=(stateno=200 || stateno=230 || stateno=400) && (time>4 || movecontact) && random<160

; CLK:430
[state 0]
	type=changestate
	value=430
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && p2statetype!=a && p2statetype!=l && (p2bodydist x=[-36,36])
	trigger1=(stateno=200 || stateno=230 || stateno=400 || stateno=430) && (time>4 || movecontact) && random<320

; CHP:420
[state 0]
	type=changestate
	value=420
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && p2statetype!=l
	triggerall=(prevstateno!=1205)
	;;--- ΋
	trigger1=ctrl && p2statetype=a && (p2bodydist x=[0,30]) && (p2bodydist y=[-50,0]) && random<250
	trigger1=sysfvar(0)>0 && playeridexist(floor(sysfvar(0)))
	trigger1=(playerid(floor(sysfvar(0))),var(0)=90900) && (playerid(floor(sysfvar(0))),var(18)/1000)%10=1

	trigger2=stateno=52 && (animtime=0) && (prevstateno=[600,699]) && (p2bodydist x=[0,30]) && random<500

; CMK:440
[state 0] ; crouching attack
	type=changestate
	value=440
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && p2statetype!=l && ctrl && (gametime%850=[350,650])
	triggerall=(prevstateno!=1205)
	trigger1=(p2bodydist x=[35,75]) && p2statetype!=a && random<150
	trigger2=(prevstateno=1000) && (p2bodydist x=[35,75]) && random<220

; CHK:450
[state 0]
	type=changestate
	value=450
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && p2statetype!=l && ctrl
	triggerall=(prevstateno!=1205)
	trigger1=(p2bodydist x=[5,60]) && p2movetype!=a && p2statetype=s && random<125

;---------------
; ALP:600 ALK:630 / AHP:620 AHK:650

[state 0] ; jump attack
	type=changestate
	value=ifelse(random<150, ifelse(random<500,600,630), ifelse(random<350,620,650))
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype=a && ctrl && numenemy
	;---
	trigger1=sysfvar(0)>0 && playeridexist(floor(sysfvar(0)))
	trigger1=(playerid(floor(sysfvar(0))),var(0)=90900) && (playerid(floor(sysfvar(0))),var(18)/100)%10=1
	;---
	trigger2=(pos y>-65) && (vel y>0) && (p2bodydist x=[-35,85]) && random<800

; AHP/AHK
[state 0]
	type=changestate
	value=650
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype=a && ctrl && p2statetype!=l && numenemy
	trigger1=(p2bodydist x=[-50,50]) && (p2bodydist y=[-45,45]) && (enemynear,hitdefattr!=sca,sa,ha) && (enemynear,hitdefattr!=sca,sp,hp) && random<450
	trigger2=(pos y>-75) && (vel y>1) && (enemynear,hitdefattr!=sca,sa,ha) && (enemynear,hitdefattr!=sca,sp,hp) && random<650
	trigger3=(vel y>0) && (pos y=[-100,-60]) && (p2bodydist x=[-60,60]) && random<750

;---------------
; Far_Retrain ; 
[state 0]
	type=changestate
	value=ifelse(random<500,400,200) +(random<500)*30
	trigger1=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && ctrl && (sysfvar(0)>0) && playeridexist(floor(sysfvar(0)))
	trigger1=(prevstateno!=1205)
	trigger1=(playerid(floor(sysfvar(0))),var(0)=90900) && (playerid(floor(sysfvar(0))),var(18)%10=2)

;---------------
; Cancel ; AU(LZ)
[state 0]
	type=changestate
	value=301
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && var(41) && (stateno!=[300,311]) && statetype!=a && p2statetype!=l && p2statetype!=a
	trigger1=(stateno=220 || stateno=250 || stateno=420) && (p2bodydist x=[-52,52]) && random<680
	trigger2=(p2bodydist x=[-30,45]) && random<200

;---------------
; upper-cut / ko-ho ; ΋}
[state 0] ; ΋ - 
	type=changestate
	value=1100
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && p2statetype!=l && numenemy
	;---
	trigger1=ctrl && sysfvar(0)>0 && playeridexist(floor(sysfvar(0)))
	trigger1=(playerid(floor(sysfvar(0))),var(0)=90900) && (playerid(floor(sysfvar(0))),var(18)/1000)%10=1
	;---
	trigger2=ctrl && p2movetype=a && (p2bodydist x=[-32,32]) && random<550
	trigger3=ctrl && p2statetype=a && (p2bodydist x=[-36,36]) && (p2bodydist y=[-80,0]) && random<650
	trigger4=stateno=8200 && animtime=0 && movehit && random<500
	trigger5=stateno=0 && ctrl && (prevstateno=5121) && p2movetype=a && (p2bodydist x=[-38,38]) && random<110
	trigger6=stateno=301 && movehit && (p2bodydist x=[-20,20]) && random<340
	trigger7=(stateno=220 || stateno=250 || stateno=420) && var(41) && movehit && (p2bodydist x=[-20,20]) && random<100
	trigger8=(stateno=1205) && animtime=0 && movehit && p2statetype=a && p2movetype=h && random<860

; hadou ; ѓ - ʂ
[state 0]
	type=changestate
	value=1400
	triggerall=var(51)>0 && sysfvar(4)<1 && numenemy && roundstate=2 && statetype!=a && ctrl
;old;	triggerall=enemynear,numproj>=1
;old;	triggerall=p2bodydist x>42
	triggerall=enemynear,numprojid(91000)
	trigger1=(enemynear,numprojid(91010) && random<66) || (enemynear,numprojid(91020) && random<928)
	trigger2=(enemynear,numprojid(91030) && random<82) || (enemynear,numprojid(91040) && random<38)

; hadou ; ѓ - 
[state 0]
	type=changestate
	value=1020
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && numenemy && !numprojid(91000)
	trigger1=ctrl && (p2bodydist x>160) && p2statetype!=a && random<234 && (gametime%600>300)
	trigger2=var(41) && (p2bodydist x>40) && random<ifelse(moveguarded,120,60)
	trigger3=stateno=301 && var(41) && (p2bodydist x>40) && random<500 && ((gametime%225<125) || life<250)
	trigger4=stateno=440 && movecontact && random<500

; big-hadou ; e
[state 0]
	type=changestate
	value=1600
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && numenemy && !numprojid(91000) && var(15)
	trigger1=ctrl && (p2bodydist x>160) && p2statetype!=a && random<300 && (gametime%600=[100,150])

; zan-retsu ; b
[state 0]
	type=changestate
	value=1300
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && p2statetype!=l && numenemy
	trigger1=ctrl && (p2bodydist x=[-50,50]) && random<20
	trigger2=(stateno=1205) && animtime=0 && movehit && p2statetype=a && p2movetype=h && random<900
	trigger3=stateno=301 && var(41) && movehit && (p2bodydist x=[-33,33]) && random<600

; mo_ko ; ҌՖ
[state 0]
	type=changestate
	value=1400
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && p2statetype!=l && numenemy
	trigger1=ctrl && (p2bodydist x=[-50,50]) && random<20
	trigger2=ctrl && p2movetype=a && (enemynear,hitdefattr=sa,na,sa,ha) && (p2bodydist x=[-50,50]) && enemynear,numprojid(91000)=0 && random<500
	trigger3=(stateno=1205) && animtime=0 && movehit && p2statetype=a && p2movetype=h
	trigger4=stateno=301 && var(41) && movehit && (p2bodydist x=[-33,33]) && random<650

; hi-en ; 򉍎r
[state 0]
	type=changestate
	value=1200
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && p2statetype!=c
	triggerall=(prevstateno!=1205)
	trigger1=(stateno=220 || stateno=250 || stateno=420) && var(41) && random<ifelse(movehit, 500, 80)
	trigger2=stateno=301 && var(41) && random<ifelse(movehit, 999, 150)
	trigger3=ctrl && (p2bodydist x=[50,90]) && p2movetype=i && random<15

; syo-ran ; ėr
[state 0]
	type=changestate
	value=1500
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && p2statetype!=l && p2statetype!=a && p2movetype!=a
	triggerall=(prevstateno!=1205)
	trigger1=var(41) && (p2bodydist x=[45,75]) && moveguarded && random<100
	trigger2=(stateno=301) && movecontact && random<ifelse(moveguarded, 300, 50)
	trigger3=ctrl && (p2bodydist x=[50,100]) && random<80

;---------------
; super-hadou ; g
[state 0]
	type=changestate
	value=3000
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && power>=1000 && numenemy && !numprojid(91000) && !var(15)
	trigger1=var(41) && random<50
	trigger2=ctrl && (p2bodydist x>150) && p2statetype!=a && random<50
	trigger3=ctrl && (p2bodydist x>75) && p2movetype=a && p2statetype!=a && random<200
	trigger3=enemynear,numprojid(91000) && !enemynear,numprojid(91010) && !enemynear,numprojid(91020)

; super-upper-cut / super-ko_ho ; ɌՖC
[state 0]
	type=changestate
	value=3400
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && p2statetype!=l && power>=1000
	;---
	trigger1=ctrl && sysfvar(0)>0 && playeridexist(floor(sysfvar(0)))
	trigger1=(playerid(floor(sysfvar(0))),var(0)=90900) && (playerid(floor(sysfvar(0))),var(18)/1000)%10=1
	;---
	trigger2=ctrl && p2movetype=a && (p2bodydist x=[-30,30]) && random<420
	trigger3=ctrl && p2statetype=a && (p2bodydist x=[-30,30]) && (p2bodydist y>=-80) && random<300
	trigger4=var(41) && movehit && (p2bodydist x=[-36,36]) && random<60
	trigger5=stateno=301 && movehit && (p2bodydist x=[-36,36]) && random<160
	trigger6=stateno=8200 && animtime=0 && movehit && random<100
	trigger7=stateno=1205 && animtime=0 && movehit && p2statetype=a && p2movetype=h && random<750

; super-kiShin ; S_
[state 0]
	type=changestate
	value=3100 +(power>=2000 && random<500)
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && p2statetype!=l && power>=1000
	trigger1=ctrl && (p2bodydist x=[-32,32]) && (p2statetype=s || p2statetype=c) && random<120

; max2 ; ՗
[state 0]
	type=changestate
	value=3600
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && power>=2000 && p2statetype!=a && numenemy
	trigger1=var(41) && (p2bodydist x=[-38,38]) && random<80
	trigger2=stateno=301 && movehit && random<life
	trigger3=ctrl && (p2bodydist x=[-42,42]) && (p2bodydist y>=-20) && p2statetype=a && random<100
	trigger4=ctrl && (p2bodydist x=[-120,120]) && enemynear,stateno=190116 ;;dizzy

;---------------
; h() ; throw
[state 0]
	type=changestate
	value=800
	trigger1=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && ctrl && (stateno!=[100,101])
	trigger1=p2statetype!=a && p2movetype!=h && p2statetype!=l && (p2bodydist x=[-12,12])
	trigger1=random<(matchno+roundno+1)*88 && random<var(51)*98 ;*ntv
; YiTa_Wari ; (i)
[state 0]
	type=changestate
	value=310
	trigger1=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && ctrl && p2statetype=c && p2movetype!=a
	trigger1=(p2bodydist x<30) && random<100 && random>life*2

; taunt ; 
[state 0]
	type=changestate
	value=195
	trigger1=var(51)>0 && sysfvar(4)<1 && roundstate=2 && (gametime%300<100)
	trigger1=statetype!=a && ctrl && p2movetype!=a && (p2bodydist x>150) && random<25


;---------------
;---------------
;=========
; AI switch
[state 0]
	type=varset
	trigger1=(sysfvar(0)>0) && playeridexist(floor(sysfvar(0)))
	trigger1=playerid(floor(sysfvar(0))),stateno=90900 && var(51)!=playerid(floor(sysfvar(0))),var(51)
	var(51)=playerid(floor(sysfvar(0))),var(51)
;---
[state 0]
	type=varset
	trigger1=(sysvar(4)=0) && (matchno=1)
	var(51)=ailevel

;=========
;[EOF]
