;#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,B,D,B,x
	time=32
[command]
	name="max2"
	command=~D,B,D,B,y
	time=32
[command]
	name="max2"
	command=~D,B,x+y
[command]
	name="max2"
	command=~D,B,y+z
;---
[command]
	name="hp1"
	command=~18$B,F,B,$F,x
	time=32
[command]
	name="hp1_s"
	command=~18$B,F,B,$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=~18$B,F,B,$F,a
	time=32
[command]
	name="hp2_s"
	command=~18$B,F,B,$F,b
	time=32
[command]
	name="hp2"
	command=~D,F,a+b
[command]
	name="hp2_s"
	command=~D,F,b+c

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

;---
[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="sp3"
	command=~18$B,$F,x
[command]
	name="sp3_s"
	command=~18$B,$F,y
;---
[command]
	name="sp4"
	command=~18$B,$F,a
[command]
	name="sp4_s"
	command=~18$B,$F,b
;---
[command]
	name="sp5"
	command=~18$D,$U,a
[command]
	name="sp5"
	command=~18$D,$U,b
;---
[command]
	name="sp6"
	command=~18$D,$U,x
[command]
	name="sp6"
	command=~18$D,$U,y
;---
[command]
	name="sp7_1"
	command=~D,D,x
[command]
	name="sp7_2"
	command=~D,D,a
[command]
	name="sp7_3"
	command=~D,D,y
[command]
	name="sp7_4"
	command=~D,D,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="x"
	command=x
	time=1
[command]
	name="a"
	command=a
	time=1
[command]
	name="y"
	command=y
	time=1
[command]
	name="b"
	command=b
	time=1
[command]
	name="c"
	command=c
	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]
;--------------



;---
;--- burn_spark
[state 0]
	type=helper
	triggerall=(movehit=1) && numtarget
	triggerall=!numhelper(152200) && !ishelper && (sysfvar(0)>0)
	trigger1=(hitpausetime=2)  && (stateno=1000)
	trigger2=(hitpausetime=12) && (stateno=1105 || stateno=1405)
	trigger3=(hitpausetime=7)  && (stateno=1250 || stateno=1310 || stateno=3105)
	id=152200
	stateno=152200
	size.height=(target,id)*10+1
	ignorehitpause=1

; * vWin: hitpausetime-1

;---
;--- remove-eff
[state 0]
	type=removeexplod
	trigger1=(stateno=52 || stateno=120) && (time<2)
	id=200



;---
;--- 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,(random%5)
	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)) || stateno=230 || (stateno=250 && (anim=255))
	trigger2=stateno=400 || stateno=420 || stateno=430
	var(41)=1



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

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

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

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

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

;--- xK[v
[state 0]
	type=changestate
	value=1600
	triggerall=command="sp7_1" || command="sp7_2" || command="sp7_3" || command="sp7_4"
	triggerall=var(51)<1
	trigger1=statetype!=a && (ctrl || var(41))

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

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

;--- fro[X
[state 0]
	type=changestate
	value=1300
	triggerall=command="sp6"
	triggerall=var(51)<1
	trigger1=statetype!=a && (ctrl || var(41)) || stateno=40

;--- wbhvX
[state 0]
	type=changestate
	value=1200
	triggerall=command="sp5"
	triggerall=var(51)<1
	trigger1=statetype!=a && (ctrl || var(41)) || stateno=40

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

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




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

;--- 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=620
	trigger1=(stateno=58) && (vel y>1.5)

;---
;  (P:fbh[X[)/(K:fX^[)
[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=[-26,26])

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

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

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

;---
; CLP
[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
[state 0]
	type=changestate
	value=420
	triggerall=command="y" && command="holddown"
	triggerall=var(51)<1
	trigger1=statetype=c && ctrl

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

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

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

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

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










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


;--- jump attack
[state 0]
	type=changestate
	value=650
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype=a && ctrl && p2statetype!=l && numenemy
	trigger1=(p2bodydist x<60) && (p2bodydist y<68) && (vel y>0)
	trigger2=(p2bodydist x<60) && (p2bodydist y<52) && (vel y<0) && (enemynear,pos y<0) && (enemynear,vel y<0)
	trigger3=(p2bodydist x=[-8,18]) && (p2bodydist y=[-12,12])

;--- Far_Retrain ; 
[state 0]
	type=changestate
	value=ifelse(random<450,200,400)+(random<500)*30
	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)

;--- jump small/mid_fwd
[state 0]
	type=changestate
	value=142020+(p2bodydist x>88)*10+(p2bodydist x>36)
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && ctrl && p2statetype!=l
	triggerall=(sysfvar(0)>0) && playeridexist(floor(sysfvar(0)))
	triggerall=(playerid(floor(sysfvar(0))),var(0)=90900) && (playerid(floor(sysfvar(0))),var(22)!=2)
	trigger1=(p2bodydist x<128) && p2statetype=c && random<368
[state 0] ; leap
	type=changestate
	value=48
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && ctrl && p2statetype!=l
	triggerall=(sysfvar(0)>0) && playeridexist(floor(sysfvar(0)))
	triggerall=(playerid(floor(sysfvar(0))),var(0)=90900) && (playerid(floor(sysfvar(0))),var(22)=2)
	trigger1=(p2bodydist x=[-32,88]) && p2statetype=c && random<368

;--- roll
[state 0]
	type=changestate
	value=110
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && ctrl && prevstateno!=110 && numenemy
	triggerall=(sysfvar(0)>0) && playeridexist(floor(sysfvar(0)))
	triggerall=(playerid(floor(sysfvar(0))),var(0)=90900) && (playerid(floor(sysfvar(0))),var(22)!=[2,3])
	trigger1=(p2bodydist x=[0,42]) && (p2movetype=a || enemynear,numprojid(91000)>0) && random<400
	trigger2=(p2bodydist x=[0,60]) && p2movetype=a && (backedgebodydist<20) && random<500

;--- stand attack***
[state 0]
	type=changestate
	value=ifelse(random<350,200,220) +(random<450)*30
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && ctrl && p2statetype!=l
	trigger1=(p2bodydist x=[27,45]) && p2statetype!=a && random<230

;--- crouching light attack
[state 0]
	type=changestate
	value=ifelse(random<650,430,400)
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && ctrl && p2statetype!=l
	trigger1=(p2bodydist x<42) && p2movetype!=a && p2statetype=s && random<150

;--- standing closed hard panch / kick
[state 0]
	type=changestate
	value=ifelse(random<650,220,250)
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && (p2bodydist x<28) && p2statetype!=l
	trigger1=stateno=52 && (ctrl || animtime=0) && (prevstateno=[600,699]) && random<750
	trigger2=ctrl && p2movetype!=a && p2statetype!=a && random<350

;--- crouching hard panch
[state 0]
	type=changestate
	value=420
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && p2statetype!=l
	trigger1=stateno=52 && (ctrl || animtime=0) && (prevstateno=[600,699]) && (p2bodydist x<50) && random<750
	trigger2=ctrl && (p2bodydist x=[27,46]) && p2movetype!=a && p2statetype!=a && random<350
;---
;--- ѓ˕Ԃ
[state 0]
	type=changestate
	value=1000
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && ctrl && numenemy
;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)

;--- TCRojbV: 1000
[state 0]
	type=changestate
	value=1000
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && ctrl && p2statetype!=l
	trigger1=(p2bodydist x=[-26,26]) && p2movetype=a && random<450
	trigger2=p2statetype=a && (p2bodydist x=[-30,30]) && (p2bodydist y=[0,45]) && random<350

;--- wbhvX: 1200
;--- fro[X: 1300
[state 0]
	type=changestate
	value=ifelse(random<500,1200,1300)
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && p2statetype!=l && numenemy
	trigger1=ctrl && p2movetype=a && enemynear,numprojid(91000) && random<400
	trigger2=ctrl && p2statetype!=a && enemynear,numprojid(91000)=0 && random<30 && (gametime%200>100)
	trigger3=var(41) && moveguarded && random<25

;--- TCRNbV[ :1400
;--- _uj[vX: 1500
[state 0]
	type=changestate
	value=ifelse(random<500,1400,1500)
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && p2statetype!=l && numenemy
	triggerall=(stateno!=[120,159]) && enemynear,numprojid(91000)=0
	trigger1=ctrl && (prevstateno=[100,105]) && (p2bodydist x=[0,100]) && p2movetype=a && random<550
	trigger2=ctrl && prevstateno=5120 && p2movetype=a && (p2bodydist x=[30,120]) && random<650
	trigger3=ctrl && p2statetype=a && (p2bodydist x=[0,50]) && (p2bodydist y=[0,45]) && random<400
	trigger4=(stateno=220||stateno=250||stateno=420||stateno=430) && var(41) && random<ifelse(movehit,750,350)
	trigger5=var(41) && random<50

;--- TCRCpNg: 1100
[state 0]
	type=changestate
	value=1100
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && p2statetype!=l
	trigger1=(stateno=220||stateno=250||stateno=420||stateno=430) && var(41) && random<500
	trigger2=var(41) && random<55

;--- xK[v: 1600
[state 0]
	type=changestate
	value=1600
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && ctrl && numenemy
	trigger1=(p2bodydist x>220) && random<45
	trigger2=p2movetype=a && (enemynear,hitdefattr=sca,ha,hp) && (p2bodydist x=[0,50]) && random<350
	trigger3=(p2bodydist x=[0,42]) && (p2movetype=a || enemynear,numprojid(91000)>0) && random<250
	trigger4=(p2bodydist x=[0,60]) && p2movetype=a && (backedgebodydist<20) && random<350

;--- KNbV[: 3100
;--- j[vXiCgA: 3000
[state 0]
	type=changestate
	value=ifelse(random<500,3000,3100)
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && power>=1000 && statetype!=a && p2statetype!=l && numenemy
	trigger1=var(41) && random<30
	trigger2=(stateno=220||stateno=250||stateno=420||stateno=430) && var(41) && random<ifelse(movehit,750,300)
	trigger3=ctrl && p2statetype!=a && p2movetype=a && (p2bodydist x>85) && (enemynear,numprojid(91000)=0) && random<260
	trigger4=ctrl && p2statetype=a && (p2bodydist x=[-35,35]) && (p2bodydist y=[-30,0]) && (enemynear,vel y>0) && random<300
	trigger5=ctrl && p2statetype=a && (p2bodydist x=[-45,45]) && (p2bodydist y=[-55,-25]) && (frontedgebodydist<60) && random<360
;--- max2
[state 0]
	type=changestate
	value=3300
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && power>=2000 && statetype!=a && !numhelper(3300) && numenemy
	trigger1=ctrl && (p2bodydist x=[-100,100]) && (enemynear,stateno=190116) ;;dizzy

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


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

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