;#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,y
	time=32
[command]
	name="hp2"
	command=~D,B,D,B,x
	time=32
[command]
	name="hp2_s"
	command=~D,B,y+z
[command]
	name="hp2"
	command=~D,B,x+y
;------
[command]
	name="hp3_s"
	command=~D,B,D,B,b
	time=32
[command]
	name="hp3"
	command=~D,B,D,B,a
	time=32
[command]
	name="hp3_s"
	command=~D,B,b+c
[command]
	name="hp3"
	command=~D,B,a+b


;--------------
[command]
	name="sp1"
	command=~D,D,x
[command]
	name="sp1_s"
	command=~D,D,y
;------
[command]
	name="sp2"
	command=~D,B,x
[command]
	name="sp2_s"
	command=~D,B,y
;------
[command]
	name="sp3"
	command=~D,F,x
[command]
	name="sp3_s"
	command=~D,F,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="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]
;--------------



;---
;--- transform
[state 0]
	type=changeanim
	trigger1=(anim=0) && (animelem=25,<0)
	trigger1=(p2bodydist x<42) || (roundstate=3)
	value=anim
	elem=25
[state 0]
	type=changeanim
	trigger1=(anim=0) && (animelem=24,>1)
	trigger1=(p2bodydist x>=42) && (roundstate<3)
	value=anim
	elem=1



;---
;--- burn_spark
[state 0]
	type=helper
	triggerall=(movehit=1) && numtarget
	triggerall=!numhelper(152200) && !ishelper && (sysfvar(0)>0)
	trigger1=(hitpausetime=12) && (stateno=1000 || stateno=3010 || stateno=3105)
	trigger2=(hitpausetime=17) && (stateno=3200)
	trigger3=(hitpausetime=4) && (stateno=3311)
	id=152200
	stateno=152200
	size.height=(target,id)*10
	ignorehitpause=1

; * vWin: hitpausetime-1

;---
;--- 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%3)
	channel=0
;--- get_hit_sp
[state 0]
	type=changeanim
	trigger1=stateno=5001
	trigger1=time=1 && movetype=h && statetype!=a && gethitvar(isbound)=0 && random<250
	value=15011
	ignorehitpause=1
[state 0]
	type=playsnd
	trigger1=(anim=15011) && (animelem=4)
	value=0,10
	channel=0
;---
[state 0] ; blocking/just defence
	type=playsnd
	trigger1=stateno=195500 && time=1
	value=0,1+(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 && (anim=205)) || (stateno=210 && (anim=215))
	trigger2=(stateno=220 && (anim=225) && ((animelem=6,>0)||var(51)<1) ) || (stateno=230 && (anim=235))
	trigger3=(stateno=300) || (stateno=400) || (stateno=410) || (stateno=420)
	var(41)=1



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

;---
; Jfc@̗
; arashi (max2)
[state 0]
	type=changestate
	value=3300
	triggerall=command="max2"
	triggerall=power>=2000
	triggerall=var(51)<1
	trigger1=statetype!=a && (ctrl || var(41))

;---
; 悩Ƃn}[
; hammer (max2)
[state 0]
	type=changestate
	value=3200
	triggerall=command="hp3" || command="hp3_s"
	triggerall=var(51)<1
	triggerall=power>=2000
	trigger1=statetype!=a && (ctrl || var(41))

;---
; ̎n
; tane-uma
[state 0]
	type=changestate
	value=3100
	triggerall=command="hp2" || command="hp2_s"
	triggerall=var(51)<1
	triggerall=power>=1000
	trigger1=statetype!=a && (ctrl || var(41))

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



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

;---
; dΉ-V
; den-ten
[state 0]
	type=changestate
	value=1100
	triggerall=command="sp5" || command="sp5_s"
	triggerall=var(51)<1
	trigger1=statetype!=a && (ctrl || var(41))

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

;---
; KtPr
; gyaku-syu
[state 0]
	type=changestate
	value=1300
	triggerall=command="sp2" || command="sp2_s"
	triggerall=var(51)<1
	trigger1=statetype!=a && (ctrl || var(41))

;---
; 㗴ǂ
; yomi
[state 0]
	type=changestate
	value=1400
	triggerall=command="sp1" || command="sp1_s"
	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
[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=[-12,12])


;--------------
; F + a
[state 0]
	type=changestate
	value=300
	triggerall=command="a" && command="holdfwd"
	triggerall=var(51)<1
	trigger1=statetype=s && (ctrl || var(41)) && stateno!=300
;;---
;; D + x
;[state 0]
;	type=changestate
;	value=320
;	triggerall=command="holddown" && command="y"
;	triggerall=var(51)<1
;	trigger1=statetype!=a && ctrl && p2statetype=l


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

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

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

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

[state 0]
	type=changestate
	value=230
	triggerall=command="b" && command!="holddown"
	triggerall=var(51)<1
	trigger1=ctrl && statetype=s

;---
[state 0]
	type=changestate
	value=480
	triggerall=command="holdfwd" && command="holddown"
	triggerall=var(51)<1
	trigger1=stateno=11 && ctrl

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

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

[state 0]
	type=changestate
	value=420
	triggerall=command="y" && command="holddown"
	triggerall=var(51)<1
	trigger1=ctrl && statetype=c

[state 0]
	type=changestate
	value=430
	triggerall=command="b" && command="holddown"
	triggerall=var(51)<1
	trigger1=ctrl && statetype=c

;---
[state 0]
	type=changestate
	value=680
	triggerall=command="recovery"
	triggerall=var(51)<1
	trigger1=statetype=a && ctrl && (vel x>0)

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

[state 0]
	type=changestate
	value=610
	triggerall=command="a"
	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="b"
	triggerall=var(51)<1
	trigger1=statetype=a && ctrl

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














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

;---
;---
; standing_attack
; SLP:200 / SLK:210 / SHP:220 / SHK:230
[state 0] ; stand attack***
	type=changestate
	value=ifelse(random<300, ifelse(random<850,200,210), ifelse(random<720,220,230))
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && p2statetype!=l && p2movetype!=a && 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) && (prevstateno=[600,699]) && (p2bodydist x=[0,42]) && random<650

;---
; crouching_attack
; CLP:400 / CLK:410 / CHP:420 / CHK:430
[state 0]
	type=changestate
	value=ifelse(random<500, ifelse(random<600,410,400), ifelse(random<500,420,430) )
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && p2statetype!=l && p2movetype!=a && ctrl

	trigger1=ctrl && 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) && p2statetype=s && random<180
	trigger3=(stateno=[100,101]) && (p2bodydist x<26) && p2statetype!=a && random<220
	trigger4=(prevstateno=52) && (p2bodydist x<42) && random<200
;---
; CLP / CLK
[state 0]
	type=changestate
	value=ifelse(random<650,410,400)
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && p2statetype!=l && p2statetype!=a && p2movetype!=a
	trigger1=(stateno=400 || stateno=410) && movecontact && (p2bodydist x=[-32,32]) && random<350
	trigger2=ctrl && (p2bodydist x=[-32,32]) && p2movetype!=a && random<200
	trigger3=stateno=52 && (animtime=0) && (prevstateno=[600,699]) && (p2bodydist x=[-36,36]) && random<300

; CHP
[state 0]
	type=changestate
	value=420
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && p2statetype!=l && p2movetype!=a && numenemy
	trigger1=(stateno=400 || stateno=410) && movecontact && (p2bodydist x=[-16,16]) && random<250
	trigger2=stateno=52 && (animtime=0 || ctrl) && (prevstateno=[600,699]) && (p2bodydist x=[-32,32]) && p2statetype!=a && random<600
	trigger3=ctrl && p2statetype=a && (p2bodydist x=[-30,30]) && (enemynear,vel y>0) && (enemynear,vel x>0) && random<150

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

;---
;---
; air_attack ; 󒆍U
; jump_attack
[state 0]
	type=changestate
	value=ifelse(random<200, ifelse(random<500,600,610), ifelse(random<500,620,630) )
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype=a && p2statetype!=l && p2movetype!=a && ctrl
	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

; jump_hard_attack
[state 0]
	type=changestate
	value=ifelse(random<200 && (p2bodydist x<35), 620, 630)
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype=a && p2statetype!=l && ctrl
	trigger1=(p2bodydist x=[-60,60]) && (p2bodydist y=[-35,60]) && random<760
	trigger2=(p2bodydist x=[-80,80]) && (pos y>-80) && (vel y>0) && random<820

;--------------
; Far_Retrain 
; 
[state 0]
	type=changestate
	value=ifelse(random<450,ifelse(random<500,210,200),ifelse(random<550,410,400))
	trigger1=var(51)>0 && sysfvar(4)<1 && roundstate=2 && 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)

;--------------
; wari - cancel
; AU
[state 0]
	type=changestate
	value=300
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && var(41) && (stateno!=300) && statetype!=a && p2statetype!=l && p2statetype!=a
	trigger1=(stateno=220||stateno=230) && (p2bodydist x=[0,50]) && random<600
	trigger2=(p2bodydist x=[30,45]) && random<10


;--------
;-------- special
; syo_ryu
[state 0]
	type=changestate
	value=1000
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && p2statetype!=l && (gametime%160>120)
	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=var(41) && (p2bodydist x=[-20,20]) && random<ifelse(movehit,400,200)
	trigger3=ctrl && prevstateno=5120 && p2movetype=a && (p2bodydist x=[-26,26]) && random<200
	trigger4=(stateno=[100,101]) && (p2movetype=a || p2statetype=a) && (p2bodydist x<25) && random<250
	trigger5=ctrl && (p2bodydist x=[-30,30]) && (prevstateno=52||prevstateno=100||prevstateno=105) && random<250
	trigger6=ctrl && (p2bodydist x=[-32,50]) && (p2bodydist y=[-70,-30]) && p2statetype=a && random<300
	trigger7=ctrl && (p2bodydist x=[-38,38]) && (p2bodydist y>-85) && p2movetype=a && random<350

; ten
[state 0]
	type=changestate
	value=1100
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && p2statetype!=l && p2statetype!=c && (p2stateno!=[5050,5110]) && numenemy
	trigger1=stateno=300 && var(41) && random<ifelse(movehit,50,200)
	trigger2=var(41) && random<ifelse(movehit,100,30)
	trigger3=ctrl && (p2bodydist x=[40,60]) && (enemynear,hitdefattr!=sca,sa,ha,sp,hp) && random<200

; ti
[state 0]
	type=changestate
	value=1200
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && p2statetype!=l
	trigger1=ctrl && (p2bodydist x=[40,95]) && (gametime%180>125) && random<60
	trigger2=stateno=300 && var(41) && random<900
	trigger3=var(41) && random<100

; gyaku
[state 0]
	type=changestate
	value=1300
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && p2statetype!=l
	trigger1=ctrl && (p2bodydist x=[40,95]) && (gametime%180>125) && random<60
	trigger2=var(41) && random<30

; yomi
[state 0]
	type=changestate
	value=1400
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && ctrl && p2statetype!=l
	trigger1=(p2bodydist x=[-32,32]) && (p2bodydist y=[-38,38]) && random<800 && (gametime%360>180)


;-------- super
; max2 - arashi
[state 0]
	type=changestate
	value=3300
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && power>=2000 && statetype!=a && p2statetype!=a && numenemy
	trigger1=ctrl && p2statetype=a && (p2bodydist x=[-42,42]) && (p2bodydist y>=-20) && random<150
	trigger2=stateno=300 && var(41) && movehit && random<500 && life<250

;;***;	trigger3=ctrl && (enemynear(time%numenemy),stateno=190116) ;;dizzy
;;; error in 3x3 or 4x4 mode

	trigger3=ctrl && p2stateno=190116 ;;dizzy

	trigger4=var(41) && (p2bodydist x<40) && (enemynear,backedgebodydist<10) && random<100

; max2 - hammer
[state 0]
	type=changestate
	value=3200
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && power>=2000 && statetype!=a && ctrl && numenemy
	trigger1=p2statetype=a && (p2bodydist x=[0,30]) && (p2bodydist y>=-80) && random<100
	trigger2=((p2movetype=a && backedgebodydist<10) || (enemynear,hitdefattr=sca,np,sp,hp)) && random<120

; super_tane-uma
[state 0]
	type=changestate
	value=3100
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && power>=1000
	trigger1=ctrl && p2statetype=a && (p2bodydist x=[-35,35]) && (p2bodydist y=[-40,40]) && random<500
	trigger2=var(41) && movehit && random<500

; super - explo
[state 0]
	type=changestate
	value=3000
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && power>=1000 && statetype!=a
	trigger1=var(41) && random<20
	trigger2=p2statetype=a && ctrl && (p2bodydist x=[0,32]) && (p2bodydist y=[-38,38]) && random<500
	trigger3=stateno=300 && var(41) && movehit && random<500

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

;--------
; 
[state 0]
	type=changestate
	value=195
	trigger1=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && ctrl
	trigger1=p2movetype=h && (p2bodydist x>200) && random<50


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