;#ADD004BASIC#

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


;--------------------
; hyper/super ; KEZ
;--------------------
[command]
	name="hy1"
	command=~D,F,D,F,x
	time=32
[command]
	name="hy1_s"
	command=~D,F,D,F,y
	time=32
[command]
	name="hy2"
	command=~D,F,D,F,a
	time=32
[command]
	name="hy2_s"
	command=~D,F,D,F,b
	time=32
[command]
	name="hy3"
	command=~D,B,D,B,a
	time=32
[command]
	name="hy3_s"
	command=~D,B,D,B,b
	time=32
[command]
	name="hy4"
	command=~D,F,D,F,s
	time=32
[command]
	name="hy5"
	command=~D,B,D,B,s
	time=32
;---
[command]
	name="hy6"
	command=~x,x,F,a,y
	time=36
[command]
	name="hy6"
	command=~x,x,/$F,a,y
	time=36

;--------------------
; short cut
[command]
	name="hy1"
	command=~D,F,x+y
[command]
	name="hy1_s"
	command=~D,F,y+z
[command]
	name="hy2"
	command=~D,F,a+b
[command]
	name="hy2_s"
	command=~D,F,b+c
[command]
	name="hy3"
	command=~D,B,a+b
[command]
	name="hy3_s"
	command=~D,B,b+c
[command]
	name="hy6"
	command=~D,B,x+y

;--------------------
; special ; KEZ
;--------------------
[command]
	name="sp1"
	command=~F,D,DF,x
	time=20
[command]
	name="sp1_s"
	command=~F,D,DF,y
	time=20
[command]
	name="sp1"
	command=~F,D,F,x
	time=20
[command]
	name="sp1_s"
	command=~F,D,F,y
	time=20

[command]
	name="sp2"
	command=~D,F,x
[command]
	name="sp2_s"
	command=~D,F,y
[command]
	name="sp3"
	command=~D,B,a
[command]
	name="sp3_s"
	command=~D,B,b

[command]
	name="sp3_h"
	command=/a
	time=1
[command]
	name="sp3_h"
	command=/b
	time=1

[command]
	name="sp4_f"
	command=~D,F,s
[command]
	name="sp4_b"
	command=~D,B,s

[command]
	name="sp5"
	command=~D,B,x
[command]
	name="sp5"
	command=~D,B,y

[command]
	name="sp6"
	command=~D,F,a
[command]
	name="sp6"
	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;x+a
	time=1
[command]
	name="recovery"
	command=z
	time=1
[command]
	name="ab"
	command=a+b;y+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="s"
	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]
;--------------------



;;---
;;---
;;sys::Partner-Assist-Registration way:1
;[state 0]
;	type=varset
;	trigger1=roundstate=1 && time=1
;	sysvar(0)=## ;;<-stateno
;;---
;;---
;;sys::Partner-Assist-Registration way:2
;[state 0]
;	type=null
;	trigger1=stateno=190193
;	trigger1=(sysfvar(0)>0) && playeridexist(floor(sysfvar(0)))
;	trigger1=(playerid(floor(sysfvar(0))),var(0)=90900) && (playerid(floor(sysfvar(0))),var(49)=id)
;	trigger1=1|| playerid(floor(sysfvar(0))),cond(1, var(53+var(49)-sysvar(0)):=## ,0)
;;---
;;---
;sys::Partner-Assist-Registration way:3
; add004pie.exe will add this into chars cmd set by "add004pie-list1.ini"
;[state 0]
;	type=varset
;	trigger1=stateno=190193
;	sysvar(1)=## ;;<-stateno



;;---
;;---
;; hit_spark / guard_spark (v30-32)
;;--- set
;[state 0]
;	type=varset
;	trigger1=(movecontact=1) && (var(32)=-1)
;	var(32)=hitpausetime ;;<- memo hitpausetime to var
;	ignorehitpause=1
;;--- hit_spark_def
;[state 0]
;	type=explod
;	trigger1=(movecontact=1) && (var(32)=hitpausetime) && (sysfvar(0)<=0)
;	trigger1=var(31)>=0 ;; sparkno
;	anim=f0+ifelse(movehit,ifelse(var(31)%10<3, var(31)%10, 3), 40)
;	ownpal=0
;	postype=p2
;	pos=((var(30)/1000)%1000)-500, floor( (500-(var(30)%1000)) *const(size.yscale) -p2dist y)
;	sprpriority=5
;	facing=-1
;	ignorehitpause=1
;[state 0]
;	type=playsnd
;	trigger1=(movecontact=1) && (var(32)=hitpausetime) && (sysfvar(0)<=0)
;	trigger1=var(31)>=0 ;; sparkno
;	value=f5+(movehit=0), ifelse(var(31)%10>4,4,var(31)%10)*(movehit>0)
;	ignorehitpause=1
;;--- reset
;[state 0]
;	type=varset
;	trigger1=(var(32)>-1)
;	var(32)=-1



;---
;--- GW
[state 0]
	type=varadd
	trigger1=var(2)>0
	var(2)=ifelse(var(2)>500,500-var(2),-1)

;--- _b
[state 0]
	type=varadd
	trigger1=var(4) && var(5)
	var(5)=-1
[state 0]
	type=varset
	trigger1=var(4) && (movetype=h)
	var(4)=0
[state 0]
	type=assertspecial
	trigger1=var(4) && var(5)
	flag=nostandguard
	flag2=nocrouchguard
	flag3=noairguard
	ignorehitpause=1
[state 0]
	type=assertspecial
	trigger1=var(4) && var(5)
	flag=nojugglecheck
;;	flag2=unguardable
	ignorehitpause=1
[state 0]
	type=palfx
	trigger1=var(4) && var(5) && (gametime%5=0)
	add=64,64,64
	time=2
	ignorehitpause=1

;--- _bB
[state 0]
	type=changestate
	trigger1=var(4) && var(5)<=0
	trigger1=statetype!=a && ctrl
	value=3602



;---
;--- 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
;---
[state 0] ; blocking/just defence
	type=playsnd
	trigger1=stateno=195500 && time=1
	value=0,ifelse(random<500,0,3)
	channel=0



;---
;--- combo set
[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=260))
	trigger2=stateno=285 || stateno=400 || stateno=420 || stateno=430 || stateno=440
	var(41)=1



;--------------------
; X[p[R{
;--------------------

;--- ŋE (max2)
[state 0]
	type=changestate
	value=3800
	triggerall=command="hy6"
	triggerall=var(51)<1 && !var(4)
	triggerall=power>=2000
	trigger1=statetype!=a && (ctrl || var(41))
	trigger2=(stateno=200 || stateno=220 || stateno=230) && !movecontact

;--- _b (max2)
[state 0]
	type=changestate
	value=3700
	triggerall=command="hy5"
	triggerall=var(51)<1 && !var(4)
	triggerall=power>=2000
	trigger1=statetype!=a && (ctrl || var(41))

[state 0]
	type=changestate
	value=ifelse(statetype=s, 3710, ifelse(statetype=c, 3720, 3730))
	triggerall=command="x" || command="y" ||command="a" || command="b" || command="s"
	triggerall=var(51)<1 && var(4)
	trigger1=ctrl

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

;--- k
[state 0]
	type=changestate
	value=3400
	triggerall=(command="hy1") ||(command="hy1_s")
	triggerall=var(51)<1 && !var(4)
	triggerall=power>=1000 && !numprojid(91000)
	trigger1=statetype!=a && (ctrl || var(41))

;--- K
[state 0]
	type=changestate
	value=3300
	triggerall=command="hy3_s"
	triggerall=var(51)<1 && !var(4)
	triggerall=power>=2000
	trigger1=statetype!=a && (ctrl || var(41))

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

;--- 
[state 0]
	type=changestate
	value=3100
	triggerall=command="hy2_s"
	triggerall=var(51)<1 && !var(4)
	triggerall=power>=2000
	trigger1=statetype!=a && (ctrl || var(41))

[state 0]
	type=changestate
	value=3000
	triggerall=command="hy2" || command="hy2_s"
	triggerall=var(51)<1 && !var(4)
	triggerall=power>=1000
	trigger1=statetype!=a && (ctrl || var(41))



;--------------------
; KEZ
;--------------------

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

;--- g
[state 0]
	type=changestate
	value=1100
	triggerall=!numhelper(3400) && !numhelper(1500) && !numhelper(1100)
	triggerall=(command="sp2") || (command="sp2_s")
	triggerall=var(51)<1 && !var(4)
	triggerall=!numprojid(91000)
	trigger1=statetype!=a && (ctrl || var(41))

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

;--- 󒆒f
[state 0]
	type=changestate
	value=1230
	triggerall=(command="sp3") || (command="sp3_s")
	triggerall=var(51)<1 && !var(4)
	trigger1=statetype=a && ctrl

;--- 䓹
[state 0]
	type=changestate
	value=1500
	triggerall=command="sp5"
	triggerall=var(51)<1 && !var(4)
	triggerall=!numprojid(91000)
	trigger1=statetype!=a && (ctrl || var(41))

;--- ꌂK
[state 0]
	type=changestate
	value=1600
	triggerall=command="sp6"
	triggerall=var(51)<1 && !var(4)
	trigger1=statetype!=a && (ctrl || var(41))




;--------------------
; 
;--------------------


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


;---
; WvU
[state 0]
	type=changestate
	value=615
	trigger1=stateno=58 && (vel y>=0)

;--------------------
; 
[state 0]
	type=changestate
	value=800
	triggerall=(command="y" || command="b") && (command="holdfwd" || command="holdback")
	triggerall=var(51)<1 && !var(4)
	trigger1=statetype!=a && ctrl && (stateno!=[100,101])
	trigger1=p2statetype!=a && p2movetype!=h && p2statetype!=l && (p2bodydist x=[-12,12])
;op;	trigger1=(p2stateno!=[150,155])

;--------------------
; 
[state 0]
	type=changestate
	value=1400
	triggerall=(command="sp4_f") || (command="sp4_b")
	triggerall=var(51)<1 && !var(4)
	trigger1=statetype!=a && (ctrl || var(41))

[state 0]
	type=changestate
	value=ifelse(statetype=s, 195, ifelse(statetype=c, 196, 197))
	triggerall=command="s"
	triggerall=var(51)<1 && !var(4)
	trigger1=ctrl


;--------------------
; {
;--------------------

;---
; ip`
[state 0]
	type=changestate
	value=280
	triggerall=command="x" && command="holdfwd"
	triggerall=var(51)<1 && !var(4)
	trigger1=statetype!=a && ctrl
[state 0]
	type=changestate
	value=285
	triggerall=command="x" && command="holdfwd"
	triggerall=var(51)<1 && !var(4)
	trigger1=statetype!=a && var(41) && (stateno!=[280,285])

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

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

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

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

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

; Ⴊ݋p`
[state 0]
	type=changestate
	value=420
	triggerall=command="y" && command="holddown"
	triggerall=var(51)<1 && !var(4)
	trigger1=statetype=c && ctrl
	trigger2=(stateno=400 || stateno=430) && movecontact

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

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

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

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

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

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

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









;--------------------
; [ai]
;--------------------
; v42: flag
[state 0]
	type=varset
	trigger1=!ishelper
	var(42)=var(51)>0 && sysfvar(4)<1 && roundstate=2 && !var(4)

;---
; S- LP200 LK230 HP220 HK250
[state 0]
	type=changestate
	value=ifelse(random<300, ifelse(random<650,200,230), ifelse(random<800,220,250))
	triggerall=var(42) && statetype!=a && ctrl && p2statetype!=l && p2movetype!=a
	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=52 && (animtime=0) && (prevstateno=[600,699]) && (p2bodydist x=[0,42]) && random<650
;---
; C- LP400 LK430 HK450
[state 0] ; crouching attack
	type=changestate
	value=ifelse(random<360, ifelse(random<100,400,430), 450)
	triggerall=var(42) && 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) && p2statetype=s && p2movetype!=a && random<180

; CLP/LK
[state 0]
	type=changestate
	value=ifelse(random<250,400,430)
	triggerall=var(42) && movecontact && (p2bodydist x=[-32,32])
	trigger1=(stateno=200 && random<50) || (stateno=230 && (anim=230) && random<100) || ((stateno=400 || stateno=430) && random<200)
; CHP
[state 0]
	type=changestate
	value=420
	triggerall=var(42) && statetype!=a
	;;--- ΋
	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
	trigger1=(p2bodydist x=[0,30]) && (p2bodydist y>=-80) && random<250
; CMK
[state 0]
	type=changestate
	value=440
	triggerall=var(42) && statetype!=a && p2statetype!=l && (gametime%850=[350,650])
	trigger1=ctrl && (p2bodydist x=[35,75]) && p2statetype!=a && random<150
	trigger2=(stateno=400 || stateno=430) && var(41) && random<500
; CHK
[state 0]
	type=changestate
	value=450
	trigger1=var(42) && statetype!=a && ctrl && p2statetype!=l
	trigger1=(p2bodydist x=[5,60]) && p2movetype!=a && p2statetype=s && random<125

;---
; Air-Attack
[state 0] ; jump attack
	type=changestate
	value=ifelse(random<150, ifelse(random<500,600,630), ifelse(random<500,620,650) )
	triggerall=var(42) && 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)/100)%10=1
	trigger2=(pos y>-65) && (vel y>0) && (p2bodydist x=[-35,85]) && random<800
	trigger3=(p2bodydist x=[-60,60]) && (p2bodydist y=[-35,60]) && random<760
	trigger4=(p2bodydist x=[-80,80]) && (pos y>-80) && (vel y>0) && random<820

;--- combo-AU
[state 0]
	type=changestate
	value=285
	triggerall=var(42) && statetype!=a && var(41) && (stateno!=[280,285]) && (stateno!=440) && p2statetype!=a
	trigger1=(stateno=220 && random<450) || (stateno=200 && random<150) || random<50

;--- Far_Retrain ; 
;; (200,220,230,400,430,440)
[state 0]
	type=changestate
	value=ifelse(random<650, ifelse(random<450,230+(random<350)*200,440), ifelse(random<460, 200+(random<500)*200, 220) )
	trigger1=var(42) && 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)

;---
; ΋ - 
[state 0]
	type=changestate
	value=1000
	triggerall=var(42) && 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) && random<420
	trigger3=ctrl && p2statetype=a && (p2bodydist x=[0,30]) && (p2bodydist y=[-80,0]) && random<500
	trigger4=(stateno=8200 || stateno=1030) && (animtime=0) && movehit && random<500
	trigger5=(stateno=0 && ctrl) && (prevstateno=5121) && p2movetype=a && (p2bodydist x=[0,38]) && random<110
	trigger6=(stateno=285) && movehit && (p2bodydist x=[0,36]) && random<150

; ѓ - 
[state 0]
	type=changestate
	value=ifelse(random<360,1500,1100)
	triggerall=var(42) && statetype!=a && !numprojid(91000) && (gametime%600>300)
	trigger1=p2statetype!=a && ctrl && ( ((p2bodydist x>150) && random<234) || ((p2bodydist x>200) && random<456) )
	trigger2=var(41) && random<ifelse(moveguarded,165,77)
	trigger3=(stateno=285) && var(41) && random<500 && ((gametime%225<125) || life<250)
	trigger4=(stateno=420) && var(41) && random<ifelse(moveguarded,600,300)

; f
[state 0]
	type=changestate
	value=1200
	triggerall=var(42) && statetype!=a
	trigger1=ctrl && (p2bodydist x!=[-80,80]) && random<80
	trigger2=(stateno=285) && var(41) && random<500
	trigger3=var(41) && random<100
; -f
[state 0]
	type=changestate
	value=1230
	triggerall=var(42) && statetype=a && ctrl
	trigger1=(p2bodydist x=[-80,80]) && random<200
	trigger2=random<20

; hs
[state 0]
	type=changestate
	value=1600
	triggerall=var(42) && statetype!=a && (gametime%800<300)
	trigger1=ctrl && p2statetype!=a && (p2bodydist x=[-76,76]) && (p2stateno=[120,159]) && random<200
	trigger2=var(41) && moveguarded && random<150

;---
; -΋
[state 0]
	type=changestate
	value=ifelse(power>=2000 && (p2bodydist x!=[36,36]),3100,3000) ;; 3000,3100
	triggerall=var(42) && power>=2000 && statetype!=a && p2statetype!=a
	trigger1=var(41) && (p2bodydist x=[-26,26]) && random<50 && life<350
	trigger2=ctrl && p2statetype=a && (p2bodydist x=[-28,28]) && (p2bodydist y=[-32,32]) && random<100
	trigger3=(stateno=8200 || stateno=1030) && (animtime=0) && movehit && random<250

; K
[state 0]
	type=changestate
	value=ifelse(power>=2000,3300,3200)
	triggerall=var(42) && power>=1000 && statetype!=a
	trigger1=(stateno=285) && movehit && random<500
	trigger1=var(41) && movehit && (p2bodydist x=[-26,26]) && random<100 && life<350

; ѓ
[state 0]
	type=changestate
	value=3400
	triggerall=var(42) && power>=1000 && statetype!=a && !numprojid(91000)
	trigger1=ctrl && (p2bodydist x=[68,98]) && random<40
	trigger2=(stateno=285 || stateno=420 || stateno=440) && var(41) && random<80
	trigger3=var(41) && random<20

; ŋE (max2)
[state 0]
	type=changestate
	value=3800
	triggerall=var(42) && power>=2000 && statetype!=a && p2statetype!=a && numenemy
	trigger1=ctrl && (p2bodydist x=[-62,62]) && random<100
	trigger2=var(41) && (p2bodydist x=[-42,42]) && random<80
	trigger3=ctrl && (p2bodydist x=[-160,160]) && (enemynear,stateno=190116) ;;dizzy

;--- _b (max2)
[state 0]
	type=changestate
	value=3700
	trigger1=var(42) && power>=2000
	trigger1=statetype!=a && (ctrl || var(41)) && random<20
[state 0]
	type=changestate
	value=ifelse(statetype=s, 3710, ifelse(statetype=c, 3720, 3730))
	trigger1=var(51)>0 && sysfvar(4)<1 && roundstate=2 && var(4) && p2statetype!=l
	trigger1=(ctrl && (p2bodydist x=[-36,36]) && (p2bodydist y=[-52,52])) || (stateno=[120,159]) || (inguarddist)
	ignorehitpause=1

;--- ` (max2)
[state 0]
	type=changestate
	value=3600
	trigger1=var(42) && power>=2000
	trigger1=statetype!=a && (ctrl || var(41)) && random<20

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

; iU
[state 0]
	type=changestate
	value=280
	trigger1=var(42) && statetype!=a && ctrl
	trigger1=(p2bodydist x=[-30,30]) && p2statetype=c && p2movetype!=a && random<100 && random>life*2

;---
; 
[state 0]
	type=changestate
	value=ifelse(statetype=s, ifelse(random<350,1400,195), ifelse(statetype=c, 196, 197))
	trigger1=var(42)
	trigger1=ctrl && p2movetype!=a && (p2bodydist x!=[-90,90]) && random<200


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