;#ADD004BASIC#

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


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


;-----------------
[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,B,a
[command]
	name="sp4_s"
	command=~D,B,b
;------
[command]
	name="sp5"
	command=~D,F,a
[command]
	name="sp5_s"
	command=~D,F,b


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




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



;---
; sp-partner
;---
; double_super_ha_do
[state 0]
	type=selfstate
	triggerall=stateno=190192 && sysfvar(4)=1 ;;is-partner?
	triggerall=sysfvar(0)>0 && playeridexist(floor(sysfvar(0)))
	triggerall=playerid(floor(sysfvar(0))),var(0)=90900 && playerid(floor(sysfvar(0))),var(49)=id
	triggerall=sysvar(0)>0 && playeridexist(sysvar(0))
	triggerall=playerid(sysvar(0)),sysfvar(4)<1 ;;is-main-player?
	;---
	trigger1=(playerid(sysvar(0)),name="ryu") || (playerid(sysvar(0)),name="evilryu")
	trigger1=(playerid(sysvar(0)),authorname="varo_hades")
	trigger1=(playerid(sysvar(0)),stateno=1900)
;;op;	trigger1=playerid(floor(sysfvar(0))),cond(0,0,var(53-sysvar(0)+var(49)):=1000)
	;---
	value=1900
;---
[state 0]
	type=changestate
	value=1900
	triggerall=command="a" && command="y" && command="holddown"
	triggerall=var(51)<1
	triggerall=power>=1000 && !numprojid(91000)
	triggerall=statetype!=a && (ctrl || var(41))
	;---
	triggerall=sysfvar(0)>0 && playeridexist(floor(sysfvar(0)))
	triggerall=(playerid(floor(sysfvar(0))),var(0)=90900) && playeridexist(playerid(floor(sysfvar(0))),var(49))
	triggerall=(playerid(playerid(floor(sysfvar(0))),var(49)),stateno=190192)
	trigger1=(playerid(playerid(floor(sysfvar(0))),var(49)),name="ryu") || (playerid(playerid(floor(sysfvar(0))),var(49)),name="evilryu")
	trigger1=(playerid(playerid(floor(sysfvar(0))),var(49)),authorname="varo_hades")



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



;---
;---
; combo
[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)) || (stateno=230 && (anim=230)) || ((stateno=250) && (anim=255))
	trigger2=stateno=400 || stateno=420 || stateno=430 || stateno=440
	trigger3=stateno=301 && (var(51)<1 || (var(51)>0 && (animelem=5,>0)))
	trigger4=stateno=310 && (var(51)<1 || (var(51)>0 && (animelem=7,>0)))
	var(41)=1



;--------------------
; hyper / super
;--------------------
; shin_syo_ryo (max2)
[state 0]
	type=changestate
	value=3400
	triggerall=command="max2"
	triggerall=var(51)<1
	triggerall=power>=2000
	trigger1=statetype!=a && (ctrl || var(41))

; shin_ku_tatsu_maki
[state 0]
	type=changestate
	value=3200
	triggerall=command="hp2_s" || command="hp2"
	triggerall=var(51)<1
	triggerall=power>=1000
	trigger1=statetype!=a && (ctrl || var(41))

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


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

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

; fire_ha_do
[state 0]
	type=changestate
	value=1010
	triggerall=command="sp2_s" || command="sp2"
	triggerall=var(51)<1
	triggerall=!numprojid(91000)
	trigger1=statetype!=a && (ctrl || var(41))

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

; air_tatsu_maki
[state 0]
	type=changestate
	value=1210
	triggerall=command="sp4_s" || command="sp4"
	triggerall=var(51)<1
	trigger1=statetype=a
	trigger1=ctrl || (movecontact && (stateno=320 || (stateno=[600,699])))

; keri
[state 0]
	type=changestate
	value=1300
	triggerall=command="sp5_s" || command="sp5"
	triggerall=var(51)<1
	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-attack
[state 0]
	type=changestate
	value=620
	trigger1=stateno=58 && vel y>1

;--------------------
; 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=[-20,20])


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

[state 0]
	type=changestate
	value=195
	triggerall=command="start"
	triggerall=var(51)<1
	trigger1=statetype=s && ctrl

;---
; sa_kotsu_wari
[state 0]
	type=changestate
	value=300
	triggerall=command="x" && command="holdfwd"
	triggerall=var(51)<1
	trigger1=statetype=s && ctrl
[state 0]
	type=changestate
	value=301
	triggerall=command="x" && command="holdfwd"
	triggerall=var(51)<1
	trigger1=statetype!=a && var(41) && (stateno!=[300,301]) && (stateno!=310)
; mizoochi_kudaki
[state 0]
	type=changestate
	value=310
	triggerall=command="y" && command="holdfwd"
	triggerall=var(51)<1
	trigger1=statetype!=a && (ctrl || var(41)) && (stateno!=310)
; sen_pu_kyaku
[state 0]
	type=changestate
	value=320
	triggerall=command="a" && command="holdfwd"
	triggerall=var(51)<1
	trigger1=statetype=s && (ctrl || var(41)) && (stateno!=320)

;---
[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)
[state 0]
	type=changestate
	value=220
	triggerall=command="y" && command!="holddown"
	triggerall=var(51)<1
	trigger1=statetype=s && ctrl
[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)
[state 0]
	type=changestate
	value=250
	triggerall=command="b" && command!="holddown"
	triggerall=var(51)<1
	trigger1=statetype=s && ctrl

;---
[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)
[state 0]
	type=changestate
	value=420
	triggerall=command="y" && command="holddown"
	triggerall=var(51)<1
	trigger1=statetype=c && ctrl
	trigger2=(stateno=400 || stateno=430) && movecontact
[state 0]
	type=changestate
	value=440
	triggerall=command="a" && command="holddown" && (command="holdfwd" || command="holdback")
	triggerall=var(51)<1
	trigger1=statetype!=a && ctrl
	trigger2=(stateno=200 || stateno=230 || stateno=400 || stateno=430) && (time>4 || movecontact)
[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)
[state 0]
	type=changestate
	value=450
	triggerall=command="b" && command="holddown"
	triggerall=var(51)<1
	trigger1=statetype=c && ctrl
;---
[state 0]
	type=changestate
	value=605
	triggerall=command="x" && command="holdup"
	triggerall=var(51)<1
	trigger1=statetype=a && ctrl
[state 0]
	type=changestate
	value=600
	triggerall=command="x"
	triggerall=var(51)<1
	trigger1=statetype=a && ctrl
[state 0]
	type=changestate
	value=620
	triggerall=command="y"
	triggerall=var(51)<1
	trigger1=statetype=a && ctrl
[state 0]
	type=changestate
	value=630
	triggerall=command="a"
	triggerall=var(51)<1
	trigger1=statetype=a && ctrl
[state 0]
	type=changestate
	value=650
	triggerall=command="b"
	triggerall=var(51)<1
	trigger1=statetype=a && ctrl











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

; ai trigger
[state 0]
	type=varset
	trigger1=1
	var(50)=(var(51)>0 && sysfvar(4)<1 && roundstate=2)

;-------------------
;-------------------
;   p200, k230 /  p220, k250
[state 0] ; stand attack***
	type=changestate
	value=ifelse(random<350, ifelse(random<500,200,230), ifelse(random<650,220,250) )
	triggerall=var(50) && statetype!=a && p2statetype!=l && ctrl
	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=[0,32]) && p2statetype=s && random<400
	trigger3=(stateno=[100,101]) && (p2bodydist x=[0,26]) && random<400
	trigger4=(stateno=52) && (animtime=0 || ctrl) && (prevstateno=[600,699]) && (p2bodydist x=[-42,42]) && random<400

;   p220, k250
[state 0]
	type=changestate
	value=ifelse(random<750,220,250)
	triggerall=var(50) && statetype!=a && p2statetype!=l && p2movetype!=a
	trigger1=ctrl && (p2bodydist x=[-25,25]) && random<150
	trigger2=(stateno=52) && (animtime=0 || ctrl) && (prevstateno=[600,699]) && (p2bodydist x=[-25,45]) && random<860

;---
;   p400 k430 /  p420 k450
[state 0] ; crouching attack
	type=changestate
	value=ifelse(random<500, ifelse(random<360,400,430), ifelse(random<320,420,450) )
	triggerall=var(50) && statetype!=a && ctrl && p2statetype!=l
	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,42]) && p2movetype!=a && p2statetype=s && random<180
	trigger3=(stateno=[100,101]) && (p2bodydist x=[-26,26]) && (enemynear,numprojid(91000)=0) && p2statetype!=a && random<220
	trigger4=(prevstateno=52) && (p2bodydist x=[-42,42]) && random<200


;   p400 k430
[state 0]
	type=changestate
	value=ifelse(random<350,400,430)
	triggerall=var(50) && statetype!=a && p2statetype!=l && p2statetype!=a
	trigger1=(stateno=200) && (p2bodydist x=[-25,25]) && time>4 && movecontact && random<250
	trigger2=(stateno=400 || stateno=430) && time>5 && (p2bodydist x=[-25,25]) && movecontact && random<650

;   p420
[state 0]
	type=changestate
	value=420
	triggerall=var(50) && statetype!=a && p2statetype!=l
	trigger1=stateno=52 && (animtime=0) && (prevstateno=[600,699]) && (p2bodydist x=[0,28]) && random<500
	trigger2=(stateno=400 || stateno=430) && movecontact && (p2bodydist x=[0,26]) && random<120

	;;--- ΋
	trigger3=ctrl && sysfvar(0)>0 && playeridexist(floor(sysfvar(0)))
	trigger3=playerid(floor(sysfvar(0))),var(0)=90900 && (playerid(floor(sysfvar(0))),var(18)/1000)%10=1
	trigger3=p2statetype=a && (p2bodydist x=[0,30]) && (p2bodydist y>=-80) && ctrl && random<500

;   k440
[state 0]
	type=changestate
	value=440
	triggerall=var(50) && statetype!=a && ctrl && p2statetype!=l && (gametime%850=[350,650])
	trigger1=(p2bodydist x=[35,75]) && (p2bodydist y=[-32,32]) && random<150
	trigger2=(stateno=200 || stateno=230 || stateno=400 || stateno=430) && time>4 && movecontact && random<250

;    k450
[state 0]
	type=changestate
	value=450
	triggerall=var(50) && statetype!=a && p2statetype!=l && ctrl
	trigger1=(p2bodydist x=[5,60]) && p2movetype!=a && (p2bodydist y=[-32,32]) && random<125

;--------------------
; 󒆍U
; lp:600, lk:630, hp:620, hk:650, up+lp:605
[state 0] ; jump attack
	type=changestate
	value=ifelse(random<350, ifelse(random<500,600+(random<500)*5,630), ifelse(random<360,620,650) )
	triggerall=var(50) && 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

;--------------------
; AU
; i 301
[state 0]
	type=changestate
	value=301
	triggerall=var(50) && statetype!=a && var(41) && (stateno!=[300,301]) && (stateno!=310) && p2statetype!=l && p2statetype!=a
	trigger1=((stateno=220 && anim=225) || stateno=310) && (p2bodydist x=[-32,32]) && random<200
	trigger2=(p2bodydist x=[-32,32]) && random<22

;   O p310
[state 0] ; stand attack***
	type=changestate
	value=310
	triggerall=var(50) && statetype!=a && (stateno!=310) && p2statetype!=l
	trigger1=ctrl && (p2bodydist x=[30,65]) && (p2statetype!=a) && (gametime%600<200) && random<250
	trigger2=(stateno=301) && var(41) && (p2bodydist x=[-15,60]) && random<450

;-------------------
; Far_Retrain ; 
[state 0]
	type=changestate
	value=ifelse(random<450,230,200) +(random<600)*200
	triggerall=var(50) && numenemy
	trigger1=(statetype!=a) && ctrl && (sysfvar(0)>0) && playeridexist(floor(sysfvar(0)))
	trigger1=(playerid(floor(sysfvar(0))),var(0)=90900) && playerid(floor(sysfvar(0))),var(18)%10=2

; sen_pu_kyaku
; r 320
[state 0]
	type=changestate
	value=320
	triggerall=var(50) && statetype!=a && (stateno!=320) && p2statetype!=l
	trigger1=ctrl && p2statetype=c && p2movetype!=a && (p2bodydist x=[30,56]) && random<80
	trigger2=(stateno=301 || stateno=310) && var(41) && random<100
	trigger3=var(41) && (p2bodydist x=[0,32]) && random<26

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

; syo_ryu
; ΋}
[state 0] ; ΋ - 
	type=changestate
	value=1100
	triggerall=var(50) && statetype!=a && p2statetype!=l
	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<420
	trigger3=ctrl && p2statetype=a && (p2bodydist x=[-30,30]) && (p2bodydist y=[-80,80]) && random<500
	trigger4=(stateno=8200) && (animtime=0) && movehit && random<500
	trigger5=(stateno=0 && ctrl) && (prevstateno=5121) && p2movetype=a && (p2bodydist x=[-36,36]) && random<110
	trigger6=(stateno=301) && var(41) && movehit && (p2bodydist x=[-30,30]) && random<150
	trigger7=(stateno=52) && (animtime=0 || ctrl) && (prevstateno=1200 || prevstateno=1210) && (p2bodydist x=[-50,50]) && (p2bodydist y=[-60,60]) && random<150

; proj
; ѓi~TCjU
[state 0]
	type=changestate
	value=1000
	triggerall=var(50) && statetype!=a && !numprojid(91000) && (gametime%600=[222,555])
	trigger1=ctrl && (p2bodydist x>151) && p2statetype!=a && random<550
	trigger2=(stateno=301 || stateno=310 || stateno=420 || stateno=440) && var(41) && random<160
	trigger3=var(41) && random<20 && moveguarded

; tatsu_maki - air
; ()
[state 0]
	type=changestate
	value=1210
	triggerall=var(50) && statetype=a
	trigger1=ctrl && (pos y<-35) && (gametime%500=[100,200]) && random<50
	trigger2=(stateno=320 || (stateno=[600,699])) && movecontact && (vel x>=0) && random<200

; tatsu_maki / soku_to_geri
; (n) / |R/R
[state 0]
	type=changestate
	value=ifelse(random<220,1300,1200)
	triggerall=var(50) && statetype!=a && p2statetype!=l
	trigger1=ctrl && p2movetype!=a && (p2bodydist x=[50,85]) && random<25
	trigger2=(stateno=301 || stateno=310) && var(41) && random<150

;--------------------
; hyper / super ; 
; sin_syo_ryu
; ΋} (max2)
[state 0]
	type=changestate
	value=3400
	triggerall=var(50) && power>=2000 && statetype!=a
	trigger1=ctrl && p2statetype=a && (p2bodydist x=[-28,28]) && (p2bodydist y=[-46,46]) && random<100

; sen_pu_kyaku
; r
[state 0]
	type=changestate
	value=3200
	triggerall=var(50) && power>=1000 && statetype!=a
	trigger1=ctrl && p2statetype=a && (p2bodydist x=[-38,38]) && (p2bodydist y=[-80,80]) && random<150
	trigger2=(stateno=301 || stateno=310) && var(41) && (p2bodydist x=[-46,46]) && random<200
	trigger3=(stateno=52) && (animtime=0 || ctrl) && (prevstateno=1210) && (p2bodydist x=[-42,42]) && random<120
	trigger4=var(41) && random<12

; proj
; ѓ
[state 0]
	type=changestate
	value=3000
	triggerall=var(50) && power>=1000 && statetype!=a && !numprojid(91000)
	trigger1=ctrl && (p2bodydist x>200) && random<85
	trigger2=(stateno=301 || stateno=310 || stateno=420) && var(41) && random<200
	trigger3=var(41) && random<50

;--------------------
; throw
; 
[state 0]
	type=changestate
	value=800
	triggerall=var(50) && statetype!=a && ctrl && (stateno!=[100,101]) && (p2bodydist x=[-18,18])
	trigger1=p2statetype!=a && p2movetype!=h && p2statetype!=l && random<var(51)*98 && random<(matchno+roundno+1)*88

; mid - attack
; iU
[state 0]
	type=changestate
	value=300
	triggerall=var(50) && statetype!=a && ctrl && (stateno!=[300,301])
	trigger1=(p2bodydist x=[10,32]) && p2statetype=c && p2movetype!=a && random<250 && random>life*2

;---
; taunt
; 
[state 0]
	type=changestate
	value=195
	triggerall=var(50) && statetype!=a && ctrl
	trigger1=p2movetype=h && p2bodydist x>200 && random<36


;---------------
;---------------
;;=========
;; 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]
