;#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="hy1"
	command=~D,F,D,F,x
	time=32
[command]
	name="hy1_s"
	command=~D,F,D,F,y
	time=32
[command]
	name="hy1"
	command=~D,F,x+y
[command]
	name="hy1_s"
	command=~D,F,y+z
;---
[command]
	name="hy2"
	command=~D,B,D,B,x
	time=32
[command]
	name="hy2_s"
	command=~D,B,D,B,y
	time=32
[command]
	name="hy2"
	command=~D,B,x+y
[command]
	name="hy2_s"
	command=~D,B,y+z
;---
[command]
	name="hy3"
	command=~D,F,D,F,a
	time=32
[command]
	name="hy3_s"
	command=~D,F,D,F,b
	time=32
[command]
	name="hy3"
	command=~D,F,a+b
[command]
	name="hy3_s"
	command=~D,F,b+c
;---
[command]
	name="hy4"
	command=~D,B,D,B,a
	time=32
[command]
	name="hy4_s"
	command=~D,B,D,B,b
	time=32
[command]
	name="hy4"
	command=~D,B,a+b
[command]
	name="hy4_s"
	command=~D,B,b+c
;---
;---
[command]
	name="hy5"
	command=~D,F,s
;----------------
;----------------
[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=~F,D,DF,a
	time=20
[command]
	name="sp3_s"
	command=~F,D,DF,b
	time=20
[command]
	name="sp3"
	command=~F,D,F,a
	time=20
[command]
	name="sp3_s"
	command=~F,D,F,b
	time=20
;---
[command]
	name="sp4"
	command=~D,F,a
[command]
	name="sp4_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="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]
;-----------------



;---
;--- 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] ; voice_bk_jd
	type=playsnd
	trigger1=stateno=195500 && time=1
	value=0,(random%3)
	channel=0



;---
;--- combo cancel 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
	trigger2=stateno=400||stateno=420||stateno=430
	var(41)=1



;-----------
; hyper  / super
;-----------
; (max2)
; AO[`[W
; Power-Up
[state 0]
	type=changestate
	value=3300
	triggerall=command="hy5"
	triggerall=var(51)<1
	triggerall=power>=2000
	trigger1=statetype!=a && (ctrl || var(41))

;---
; ^CK[WFmTCh
; Tiger Genocide
[state 0]
	type=changestate
	value=3200
	triggerall=command="hy3" || command="hy3_s"
	triggerall=var(51)<1
	triggerall=power>=1000
	trigger1=statetype!=a && (ctrl || var(41))

;---
; ^CK[Ch
; Tiger Raid
[state 0]
	type=changestate
	value=3100
	triggerall=command="hy4" || command="hy4_s"
	triggerall=var(51)<1
	triggerall=power>=1000
	trigger1=statetype!=a && (ctrl || var(41))

;---
; Oh^CK[Lm
; Ground Tiger Cannon
[state 0]
	type=changestate
	value=3050
	triggerall=command="hy2" || command="hy2_s"
	triggerall=var(51)<1
	triggerall=power>=1000 && !numprojid(91000)
	trigger1=statetype!=a && (ctrl || var(41))

;---
; ^CK[Lm
; High Tiger Cannon 
[state 0]
	type=changestate
	value=3000
	triggerall=command="hy1" || command="hy1_s"
	triggerall=var(51)<1
	triggerall=power>=1000 && !numprojid(91000)
	trigger1=statetype!=a && (ctrl || var(41))


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

; ^CK[NbV
; Tiger Crush
[state 0]
	type=changestate
	value=1200
	triggerall=command="sp3" || command="sp3_s"
	triggerall=var(51)<1
	trigger1=statetype!=a && (ctrl || var(41))

; ^CK[Abp[Jbg
; Tiger Uppercut / Tiger Blow
[state 0]
	type=changestate
	value=1100
	triggerall=command="sp1" || command="sp1_s"
	triggerall=var(51)<1
	trigger1=statetype!=a && (ctrl || var(41))

; Oh^CK[Vbg
; Ground Tiger Shot / Tiger Shot-low
[state 0]
	type=changestate
	value=1050
	triggerall=command="sp4" || command="sp4_s"
	triggerall=var(51)<1
	triggerall=!numprojid(91000)
	trigger1=statetype!=a && (ctrl || var(41))

; ^CK[Vbg
; Tiger Shot / Tiger Shot-high
[state 0]
	type=changestate
	value=1000
	triggerall=command="sp2" || command="sp2_s"
	triggerall=var(51)<1
	triggerall=!numprojid(91000)
	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

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

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

;-----------------
;-----------------
; P: ^CK[L[
; P-throw: Tiger Carry
; K: ^CK[CW
; K-throw: Tiger Rage 
[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])


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

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

;--
; SMP-near
; ߋp` / ^CK[tbN
; (SVC-CHAOSł̒iZ)
[state 0]
	type=changestate
	value=210
	triggerall=command="x" && command="holdfwd" && command!="holddown"
	triggerall=var(51)<1
	trigger1=statetype!=a && ctrl

;---
; p`
; 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)

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

; LbN
; SLK
[state 0]
	type=changestate
	value=ifelse(command="holdfwd",240,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)

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

;---
; Ⴊݎp`
; 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)

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

; ႪݎLbN
; 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)

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

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

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

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

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








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

; jump small/mid_fwd
[state 0]
	type=changestate
	value=142021+(p2bodydist x>88)*10
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && ctrl
	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<200 && (gametime%500>300)
; leap
[state 0]
	type=changestate
	value=48
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && ctrl
	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<88) && p2statetype=c && random<200 && (gametime%500<150)
; roll
[state 0]
	type=changestate
	value=110
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && ctrl && stateno!=110 && (prevstateno!=110)
	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<40) && p2movetype=a && random<200
;---
;---
; standing_attack
; SLP:200 / SLK:230 / SHP:220 / SHK:250
[state 0] ; stand attack***
	type=changestate
	value=ifelse(random<300, ifelse(random<600,200,230), ifelse(random<750,220,250))
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && p2statetype!=l && p2movetype!=a && numenemy && prevstateno!=3101
	trigger1=ctrl && (sysfvar(0)>0) && playeridexist(floor(sysfvar(0)))
	trigger1=(playerid(floor(sysfvar(0))),var(0)=90900) && (playerid(floor(sysfvar(0))),var(18)%10=1)
	trigger2=ctrl && (p2bodydist x=[-32,32]) && (enemynear,statetype=s) && random<400
	trigger3=ctrl && (p2bodydist x=[-28,28]) && (enemynear,numprojid(91000)=0) && random<400
	trigger4=stateno=52 && (animtime=0) && (prevstateno=[600,699]) && (p2bodydist x=[0,42]) && random<650
;---
; crouching_attack
; CLP:400 / CLK:430 / CMK:440 / CHP:420 / CHK:450
[state 0]
	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 && p2movetype!=a && numenemy && prevstateno!=3101
	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=ctrl && (p2bodydist x=[-42,42]) && (enemynear,movetype!=a) && (enemynear,statetype=s) && random<180
	trigger3=ctrl && (stateno=[100,101]) && (p2bodydist x=[-26,26]) && (enemynear,numprojid(91000)=0) && (enemynear,statetype!=a) && random<220
	trigger4=stateno=52 && (animtime=0 || ctrl) && (p2bodydist x=[-42,42]) && random<200

; CLP / CLK
[state 0]
	type=changestate
	value=ifelse(random<650,430,400)
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && p2statetype!=l && p2statetype!=a && p2movetype!=a && prevstateno!=3101
	trigger1=(stateno=400 || stateno=430) && movecontact && (p2bodydist x=[-32,32]) && random<350
	trigger2=ctrl && (p2bodydist x=[-32,32]) && p2movetype!=a && random<200
	trigger3=stateno=52 && (animtime=0 || ctrl) && (prevstateno=[600,699]) && (p2bodydist x=[-36,36]) && random<300
; CHP
[state 0]
	type=changestate
	value=ifelse(random<300,240,420)
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && ctrl && p2statetype!=l && prevstateno!=3101
	trigger1=(p2bodydist x=[35,75]) && p2statetype!=a && random<150 && (gametime%850=[350,650])
; CHK
[state 0]
	type=changestate
	value=450
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && ctrl && p2statetype!=l && prevstateno!=3101
	trigger1=(p2bodydist x=[5,55]) && p2movetype!=a && p2statetype!=a && random<125
;---
;---
; air_attack ; 󒆍U
[state 0]
	type=changestate
	value=ifelse(random<150, ifelse(random<250,600,630), ifelse(random<150,620,650) )
	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)
; JHK
[state 0]
	type=changestate
	value=650
	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<300,ifelse(random<750,230,200),ifelse(random<750,430,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)

;--------
;-------- special
; syo_ryu
[state 0]
	type=changestate
	value=1100
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && 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=var(41) && (p2bodydist x=[-26,26]) && movehit && random<460
	trigger3=ctrl && (p2bodydist x=[-32,32]) && (p2bodydist y=[-90,0]) && (p2movetype=a || p2statetype=a) && random<500
	trigger4=ctrl && (p2bodydist x=[-32,50]) && (p2bodydist y=[-80,0]) && p2statetype=a && random<720
	trigger5=stateno=52 && (animtime=0 || ctrl) && (prevstateno=3101) && numtarget && (p2bodydist x=[-42,42]) && (p2bodydist y=[-80,0]) && random<720
	trigger6=ctrl && prevstateno=8200 && numtarget && random<500

; ha_dou / ground_ha_dou
[state 0]
	type=changestate
	value=ifelse(random<500,1000,1050)
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && !numprojid(91000)
	trigger1=ctrl && (p2bodydist x>150) && p2statetype!=a && random<600 && (gametime%200>100)
	trigger2=var(41) && moveguarded && (p2bodydist x>32) && random<500

; crush
[state 0]
	type=changestate
	value=1200
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && p2statetype!=l && p2statetype!=c && (p2stateno!=[5050,5110]) && numenemy
	trigger1=ctrl && (p2bodydist x=[40,60]) && (enemynear,hitdefattr!=sca,sa,ha,sp,hp) && random<200
	trigger2=(stateno=220 || stateno=420) && var(41) && random<ifelse(movehit,750,100)
	trigger3=var(41) && random<ifelse(movehit,300,80)
	trigger4=ctrl && prevstateno=8200 && numtarget && random<320

;-------- super
; super_syo_ryu
[state 0]
	type=changestate
	value=3200
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && power>=1000 && numenemy
	trigger1=ctrl && p2statetype=a && (p2bodydist x=[-36,36]) && (p2bodydist y=[-80,0]) && random<250
	trigger2=ctrl && (p2bodydist x=[-80,90]) && (p2bodydist y=[-30,30]) && (enemynear,stateno=[200,699]) && random<200
	trigger3=var(41) && movehit && random<150
	trigger4=ctrl && prevstateno=8200 && numtarget && random<160

; tiger_raid
[state 0]
	type=changestate
	value=3100
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && power>=1000
	trigger1=ctrl && (p2bodydist x=[-60,60]) && (p2bodydist y=[-45,0]) && p2statetype=s && random<180
	trigger2=var(41) && random<160

; super_hadou / ground_ha_dou
[state 0]
	type=changestate
	value=ifelse(random<500,3000,3050)
	triggerall=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && power>=1000 && numenemy && !numprojid(91000)
	trigger1=var(41) && random<650 && (gametime%200>100)
	trigger2=ctrl && (p2bodydist x>200) && enemynear,numprojid(91000) && random<300

;--------
; 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=[-26,26])
	trigger1=p2statetype!=a && p2movetype!=h && p2statetype!=l && random<(matchno+roundno+1)*88 && random<var(51)*98 ;*ntv

; iU
[state 0]
	type=changestate
	value=210
	trigger1=var(51)>0 && sysfvar(4)<1 && roundstate=2 && statetype!=a && ctrl
	trigger1=p2statetype=c && (p2bodydist x=[-50,50]) && p2statetype!=l && p2movetype!=a && random<100 && random>life*2

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

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