;-| Default Values |-------------------------------------------------------
[Defaults]
command.time = 15
command.buffer.time = 3	

;--| CPU Motions |-------------------------
[Command]
Name = "AI0"
Command = a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
Time = 0
[Command]
Name = "AI1"
Command = b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b
Time = 0
[Command]
Name = "AI2"
Command = c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c
Time = 0
[Command]
Name = "AI3"
Command = x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x
Time = 0
[Command]
Name = "AI4"
Command = y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y
Time = 0
[Command]
Name = "AI5"
Command = z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z
Time = 0
[Command]
Name = "AI6"
Command = s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s
Time = 0
[Command]
Name = "AI7"
Command = F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F
Time = 0
[Command]
Name = "AI8"
Command = D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D
Time = 0
[Command]
Name = "AI9"
Command = B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B
Time = 0
[Command]
Name = "AI10"
Command = U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U
Time = 0
[Command]
Name = "AI11"
Command = a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
Time = 0
[Command]
Name = "AI12"
Command = c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c
Time = 0
[Command]
Name = "AI13"
Command = x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x
Time = 0
[Command]
Name = "AI14"
Command = y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y
Time = 0
[Command]
Name = "AI15"
Command = z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z
Time = 0
[Command]
Name = "AI16"
Command = s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s
Time = 0
[Command]
Name = "AI17"
Command = a,B,c,x,y,z,s,B,D,F,U,a,b,c,x,y,z,s,s
Time = 0
[Command]
Name = "AI18"
Command = a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
Time = 0
[Command]
Name = "AI19"
Command = b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b
Time = 0
[Command]
Name = "AI20"
Command = c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c
Time = 0
[Command]
Name = "AI21"
Command = x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x
Time = 0
[Command]
Name = "AI22"
Command = y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y
Time = 0
[Command]
Name = "AI23"
Command = z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z
Time = 0
[Command]
Name = "AI24"
Command = s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s
Time = 0
[Command]
Name = "AI25"
Command = F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F
Time = 0
[Command]
Name = "AI26"
Command = D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D
Time = 0
[Command]
Name = "AI27"
Command = B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B
Time = 0
[Command]
Name = "AI28"
Command = U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U
Time = 0
[Command]
Name = "AI29"
Command = a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
Time = 0
[Command]
Name = "AI30"
Command = c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c
Time = 0
[Command]
Name = "AI31"
Command = x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x
Time = 0
[Command]
Name = "AI32"
Command = y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y
Time = 0
[Command]
Name = "AI33"
Command = z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z
Time = 0
[Command]
Name = "AI34"
Command = s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s
Time = 0
[Command]
Name = "AI35"
Command = z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z
Time = 0
[Command]
Name = "AI36"
Command = z,z,z,z,z,z,a,a,a,z,z,z,z,z,z,z,z,z,z
Time = 0
[Command]
Name = "AI37"
Command = z,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,z,z,z
Time = 0
[Command]
Name = "AI38"
Command = z,z,z,z,z,a,a,a,z,z,z,z,z,a,a,a,z,z,z
Time = 0
[Command]
Name = "AI39"
Command = z,z,z,z,z,a,a,a,z,z,z,z,z,z,a,a,z,z,z
Time = 0
[Command]
Name = "AI40"
Command = z,z,z,z,a,a,a,z,z,z,z,a,z,z,a,a,z,z,z
Time = 0
[Command]
Name = "AI41"
Command = z,z,z,a,z,z,z,z,z,z,z,z,z,a,a,z,z,z,z
Time = 0
[Command]
Name = "AI42"
Command = z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z
Time = 0
[Command]
Name = "AI43"
Command = z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,a,a,z
Time = 0
[Command]
Name = "AI44"
Command = z,z,a,a,a,a,z,z,z,z,z,z,z,z,z,a,a,a,z
Time = 0
[Command]
Name = "AI45"
Command = z,z,z,z,z,z,a,a,z,z,z,z,z,a,a,a,a,z,z
Time = 0
[Command]
Name = "AI46"
Command = z,z,z,z,z,z,z,z,a,a,a,a,a,a,z,z,z,z,z
Time = 0
[Command]
Name = "AI47"
Command = z,z,z,a,a,a,a,z,z,z,z,z,z,z,z,z,z,z,z
Time = 0
[Command]
Name = "AI48"
Command = z,z,z,z,z,a,a,a,z,z,z,a,a,a,z,z,a,z,a
Time = 0
[Command]
Name = "AI49"
Command = z,z,z,z,a,a,a,z,z,z,z,z,a,a,a,z,z,z,z
Time = 0
[Command]
Name = "AI50"
Command = z,z,z,a,a,z,z,z,z,z,z,z,z,z,a,a,z,z,z
Time = 0

----------------------------
[command]
name = "fwd"
command = F
time = 1

[command]
name = "back"
command = B
time = 1

[command]
name = "up"
command = U
time = 1

[command]
name = "down"
command = D
time = 1

----------------------------20000
[Command]
name = "20000"
command = ~D, DF, F, $D, DB, B, z
time = 45

----------------------------16000
[Command]
name = "16000"
command = ~D, DB, B, D, DB, B, z
time = 45

----------------------------15000
[Command]
name = "15000"
command = ~D, DB, B, D, DB, B, c
time = 45

----------------------------14000
[Command]
name = "14000"
command = ~D, DF, F, D, DF, F, z
time = 45

----------------------------13000
[Command]
name = "13000"
command = ~D, DF, F, D, DF, F, c
time = 45

----------------------------12000
[Command]
name = "12000"
command = ~D, DF, F, D, DF, F, x+y
time = 45

----------------------------11000
[Command]
name = "11000"
command = ~D, DB, B, D, DB, B, x+y
time = 45

----------------------------10000
[Command]
name = "10000"
command = ~D, DF, F, D, DF, F, a
time = 45

----------------------------3100
[Command]
name = "3100"
command = ~D, DF, F, $D, DB, B, x
time = 45

[Command]
name = "3100"
command = ~D, DF, F, $D, DB, B, y
time = 45

----------------------------3000
[Command]
name = "3000"
command = ~D, DB, B, D, DB, B, a
time = 45

----------------------------1000
[Command]
name = "1000"
command = ~D, DF, F, y
time = 20

----------------------------1010
[Command]
name = "1010"
command = ~D, DF, F, x
time = 20

----------------------------1060
[Command]
name = "1060"
command = ~D, DF, F, a
time = 20

----------------------------1100
[Command]
name = "1100"
command = ~D, DF, F, b
time = 20

----------------------------1200
[Command]
name = "1200"
command = ~B, $D, F, x
time = 20

[Command]
name = "1200"
command = ~B, $D, F, y
time = 20

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

;-| Double Tap |-----------------------------------------------------------
[Command]
name = "FF"     ;Required (do not remove)
command = F, F
time = 15	;8

[Command]
name = "BB"     ;Required (do not remove)
command = B, B
time = 15	;8

;-| 2/3 Button Combination |-----------------------------------------------
[Command]
name = "recovery";Required (do not remove)
command = B,U,a+b,y,c+y,s,z,D;x+a
time = 1

[Command]
name = "recovery";Required (do not remove)
command = B,U,a+b,y,c+y,s,z,D;z
time = 1

[Command]
name = "900"
command = x+a

[Command]
name = "900"
command = c

[Command]
name = "ay"
command = a+y

[Command]
name = "CD"
command = b+y
time =3

[Command]
name = "CD"
command = z
time =3

;-| Dir + Button |---------------------------------------------------------
[Command]
name = "down_a"
command = /$D,a
time = 1

[Command]
name = "down_b"
command = /$D,b
time = 1

;-| Single Button |---------------------------------------------------------
[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 = "hold_a"
command = /$a
;time = 1
command.buffer.time = 1

[Command]
name = "hold_b"
command = /$b
;time = 1
command.buffer.time = 1

[Command]
name = "hold_c"
command = /$c
;time = 1
command.buffer.time = 1

[Command]
name = "hold_x"
command = /$x
;time = 1
command.buffer.time = 1

[Command]
name = "hold_y"
command = /$y
;time = 1
command.buffer.time = 1

[Command]
name = "hold2_a"
command = ~a
time = 1
command.buffer.time = 1

[Command]
name = "hold2_b"
command = ~b
time = 1
command.buffer.time = 1

[Command]
name = "hold2_x"
command = ~x
time = 1
command.buffer.time = 1

[Command]
name = "hold2_y"
command = ~y
time = 1
command.buffer.time = 1

;-| Hold Dir |--------------------------------------------------------
[Command]
name = "holdfwd";Required (do not remove)
Command = /$F
;time = 1
command.buffer.time = 1

[Command]
name = "holdback";Required (do not remove)
Command = /$B
;time = 1
command.buffer.time = 1

[Command]
name = "holdup";Required (do not remove)
Command = /$U
;time = 1
command.buffer.time = 1

[Command]
name = "holddown";Required (do not remove)
Command = /$D
;time = 1
command.buffer.time = 1

;------------------------ For KOF Series Only
[Command]
name = "holdupfwd"
command = /UF
time = 1

;longjump
[Command]
name = "longjump"
command = D, $U
time = 18

[Statedef -1]

;===========================================================================
;-------------------------------------------------------------------------------
;滚瓢蜡瘤家胶
[State -2]
type = varset
trigger1 = command != "hold_x"
trigger2 = command = "hold2_x"
fvar(0) = 0
ignorehitpause = 1

[State -2]
type = varset
trigger1 = command != "hold_y"
trigger2 = command = "hold2_y"
fvar(39) = 0
ignorehitpause = 1

[State -2]
type = varset
trigger1 = command != "hold_a"
trigger2 = command = "hold2_a"
var(9) = 0
ignorehitpause = 1

[State -2]
type = varset
trigger1 = command != "hold_b"
trigger2 = command = "hold2_b"
var(56) = 0
ignorehitpause = 1

[State -2]
type = varadd
trigger1 = command = "hold_x"
fvar(0) = 1
ignorehitpause = 1

[State -2]
type = varadd
trigger1 = command = "hold_y"
fvar(39) = 1
ignorehitpause = 1

[State -2]
type = varadd
trigger1 = command = "hold_a"
var(9) = 1
ignorehitpause = 1

[State -2]
type = varadd
trigger1 = command = "hold_b"
var(56) = 1
ignorehitpause = 1

[State -2]
type = varset
trigger1 = fvar(0) < 14
trigger2 = fvar(39) < 14
trigger3 = var(9) < 14
trigger4 = var(56) < 14
var(0) = 1
ignorehitpause = 1

[State -2]
type = varset
trigger1 = fvar(0) >= 14
trigger2 = fvar(39) >= 14
trigger3 = var(9) >= 14
trigger4 = var(56) >= 14
var(0) = 0
ignorehitpause = 1

;=======================================================================
;2k2葛靛 牡浇包府1
[State -2]
type = varset
triggerall = stateno != [200,250]
triggerall = stateno != [400,500]
triggerall = stateno != [750,999]
trigger1 = movecontact = 1 && (HitDefAttr = SCA, NA, SA, HA)
trigger2 = movecontact = 1 && (HitDefAttr = SCA, NP, SP, HP)
var(21) = 2
ignorehitpause = 1
persistent = 0

[State -2]
type = VarAdd
trigger1 = var(21) >= 1
var(21) = -1
ignorehitpause = 1

[State -2]
type = varset
trigger1 = var(21) > 2
var(21) =2
ignorehitpause = 1

;2k2葛靛 牡浇包府2
[State -2]
type = varset
trigger1 = movecontact = 1 && (HitDefAttr = SCA, NA, SA, HA)
trigger2 = movecontact = 1 && (HitDefAttr = SCA, NP, SP, HP)
var(23) = 4
ignorehitpause = 1
persistent = 0

[State -2]
type = VarAdd
trigger1 = var(23) >= 1
var(23) = -1
ignorehitpause = 1

[State -2]
type = varset
trigger1 = var(23) > 4
var(23) =4
ignorehitpause = 1

;牡浇包府 扁夯扁率
[State -2]
type = varset
trigger1 = movecontact = 1 && (HitDefAttr = SCA, NA, SA, HA)
trigger2 = movecontact = 1 && (HitDefAttr = SCA, NP, SP, HP)
var(24) = 4
ignorehitpause = 1
persistent = 0

[State -2]
type = VarAdd
trigger1 = var(24) >= 1
var(24) = -1
ignorehitpause = 1

[State -2]
type = varset
trigger1 = var(24) > 4
var(24) =4
ignorehitpause = 1

;--------------------------------------------------------------------------
;ANGEL
[State -1]
type = ChangeState
value = 20000
triggerall = var(20) = 0
triggerall = command = "20000"
triggerall = var(0)
triggerall = life <= 500
triggerall = statetype != A && power >= 5000 
trigger1 = ctrl
trigger2 = (stateno = 100 && time > 3)
trigger3 = AnimElem = 6, >= 1 && AnimElem = 6, <= 4 && anim = 215 && movecontact
trigger4 = AnimElem = 3, >= 1 && AnimElem = 3, <= 3 && stateno = 235 && movecontact
trigger5 = AnimElem = 3, >= 1 && AnimElem = 3, <= 4 && stateno = 250 && movecontact
trigger6 = AnimElem = 2, >= 1 && AnimElem = 3, <= 3 && stateno = 400 && movecontact
trigger7 = AnimElem = 4, >= 1 && AnimElem = 4, <= 2 && stateno = 245 && movecontact
trigger8 = animelem = 4, >= 0 && animelem = 4, <=10 && stateno = 700 && movecontact

;--------------------------------------------------------------------------
;BAHAMUT
[State -1]
type = ChangeState
value = 16000
triggerall = var(20) = 0
triggerall = command = "16000"
triggerall = var(0)
triggerall = statetype != A && power >= 5000 
triggerall = numhelper(16850) = 0
trigger1 = ctrl
trigger2 = (stateno = 100 && time > 3)
trigger3 = AnimElem = 6, >= 1 && AnimElem = 6, <= 4 && anim = 215 && movecontact
trigger4 = AnimElem = 3, >= 1 && AnimElem = 3, <= 3 && stateno = 235 && movecontact
trigger5 = AnimElem = 3, >= 1 && AnimElem = 3, <= 4 && stateno = 250 && movecontact
trigger6 = AnimElem = 2, >= 1 && AnimElem = 3, <= 3 && stateno = 400 && movecontact
trigger7 = AnimElem = 4, >= 1 && AnimElem = 4, <= 2 && stateno = 245 && movecontact
trigger8 = animelem = 4, >= 0 && animelem = 4, <=10 && stateno = 700 && movecontact

;--------------------------------------------------------------------------
;BAHAMUT
[State -1]
type = ChangeState
value = 15000
triggerall = var(20) = 0
triggerall = command = "15000"
triggerall = var(0)
triggerall = statetype != A && power >= 4500 
trigger1 = ctrl
trigger2 = (stateno = 100 && time > 3)
trigger3 = AnimElem = 6, >= 1 && AnimElem = 6, <= 4 && anim = 215 && movecontact
trigger4 = AnimElem = 3, >= 1 && AnimElem = 3, <= 3 && stateno = 235 && movecontact
trigger5 = AnimElem = 3, >= 1 && AnimElem = 3, <= 4 && stateno = 250 && movecontact
trigger6 = AnimElem = 2, >= 1 && AnimElem = 3, <= 3 && stateno = 400 && movecontact
trigger7 = AnimElem = 4, >= 1 && AnimElem = 4, <= 2 && stateno = 245 && movecontact
trigger8 = animelem = 4, >= 0 && animelem = 4, <=10 && stateno = 700 && movecontact

;--------------------------------------------------------------------------
;IFRIT
[State -1]
type = ChangeState
value = 14000
triggerall = var(20) = 0
triggerall = command = "14000"
triggerall = var(0)
triggerall = statetype != A && power >= 3500 
trigger1 = ctrl
trigger2 = (stateno = 100 && time > 3)
trigger3 = AnimElem = 6, >= 1 && AnimElem = 6, <= 4 && anim = 215 && movecontact
trigger4 = AnimElem = 3, >= 1 && AnimElem = 3, <= 3 && stateno = 235 && movecontact
trigger5 = AnimElem = 3, >= 1 && AnimElem = 3, <= 4 && stateno = 250 && movecontact
trigger6 = AnimElem = 2, >= 1 && AnimElem = 3, <= 3 && stateno = 400 && movecontact
trigger7 = AnimElem = 4, >= 1 && AnimElem = 4, <= 2 && stateno = 245 && movecontact
trigger8 = animelem = 4, >= 0 && animelem = 4, <=10 && stateno = 700 && movecontact

;--------------------------------------------------------------------------
;SHIVA
[State -1]
type = ChangeState
value = 13000
triggerall = var(20) = 0
triggerall = command = "13000"
triggerall = var(0)
triggerall = statetype != A && power >= 3500 
trigger1 = ctrl
trigger2 = (stateno = 100 && time > 3)
trigger3 = AnimElem = 6, >= 1 && AnimElem = 6, <= 4 && anim = 215 && movecontact
trigger4 = AnimElem = 3, >= 1 && AnimElem = 3, <= 3 && stateno = 235 && movecontact
trigger5 = AnimElem = 3, >= 1 && AnimElem = 3, <= 4 && stateno = 250 && movecontact
trigger6 = AnimElem = 2, >= 1 && AnimElem = 3, <= 3 && stateno = 400 && movecontact
trigger7 = AnimElem = 4, >= 1 && AnimElem = 4, <= 2 && stateno = 245 && movecontact
trigger8 = animelem = 4, >= 0 && animelem = 4, <=10 && stateno = 700 && movecontact

;--------------------------------------------------------------------------
;神罰
[State -1]
type = ChangeState
value = 12000
triggerall = var(20) = 0
triggerall = command = "12000"
triggerall = var(0)
triggerall = statetype != A && power >= 3000 
trigger1 = ctrl
trigger2 = (stateno = 100 && time > 3)
trigger3 = AnimElem = 6, >= 1 && AnimElem = 6, <= 4 && anim = 215 && movecontact
trigger4 = AnimElem = 3, >= 1 && AnimElem = 3, <= 3 && stateno = 235 && movecontact
trigger5 = AnimElem = 3, >= 1 && AnimElem = 3, <= 4 && stateno = 250 && movecontact
trigger6 = AnimElem = 2, >= 1 && AnimElem = 3, <= 3 && stateno = 400 && movecontact
trigger7 = AnimElem = 4, >= 1 && AnimElem = 4, <= 2 && stateno = 245 && movecontact
trigger8 = animelem = 4, >= 0 && animelem = 4, <=10 && stateno = 700 && movecontact

;--------------------------------------------------------------------------
;wishing star
[State -1]
type = ChangeState
value = 11000
triggerall = var(20) = 0
triggerall = command = "11000"
triggerall = var(0)
triggerall = statetype != A && power >= 3000 
trigger1 = ctrl
trigger2 = (stateno = 100 && time > 3)
trigger3 = AnimElem = 6, >= 1 && AnimElem = 6, <= 4 && anim = 215 && movecontact
trigger4 = AnimElem = 3, >= 1 && AnimElem = 3, <= 3 && stateno = 235 && movecontact
trigger5 = AnimElem = 3, >= 1 && AnimElem = 3, <= 4 && stateno = 250 && movecontact
trigger6 = AnimElem = 2, >= 1 && AnimElem = 3, <= 3 && stateno = 400 && movecontact
trigger7 = AnimElem = 4, >= 1 && AnimElem = 4, <= 2 && stateno = 245 && movecontact
trigger8 = animelem = 4, >= 0 && animelem = 4, <=10 && stateno = 700 && movecontact

;--------------------------------------------------------------------------
;1000 needles
[State -1]
type = ChangeState
value = 10000
triggerall = var(20) = 0
triggerall = command = "10000"
triggerall = var(0)
triggerall = statetype != A && power >= 2000 
trigger1 = ctrl
trigger2 = (stateno = 100 && time > 3)
trigger3 = AnimElem = 6, >= 1 && AnimElem = 6, <= 4 && anim = 215 && movecontact
trigger4 = AnimElem = 3, >= 1 && AnimElem = 3, <= 3 && stateno = 235 && movecontact
trigger5 = AnimElem = 3, >= 1 && AnimElem = 3, <= 4 && stateno = 250 && movecontact
trigger6 = AnimElem = 2, >= 1 && AnimElem = 3, <= 3 && stateno = 400 && movecontact
trigger7 = AnimElem = 4, >= 1 && AnimElem = 4, <= 2 && stateno = 245 && movecontact
trigger8 = animelem = 4, >= 0 && animelem = 4, <=10 && stateno = 700 && movecontact

;乱舞技1段-----------------------------------------------------------------
[State -1]
type = ChangeState
value = 3100
triggerall = var(20) = 0
triggerall = command = "3100"
triggerall = var(0)
triggerall = statetype != A && power >= 1000 
trigger1 = ctrl
trigger2 = (stateno = 100 && time > 3)
trigger3 = AnimElem = 6, >= 1 && AnimElem = 6, <= 4 && anim = 215 && movecontact
trigger4 = AnimElem = 3, >= 1 && AnimElem = 3, <= 3 && stateno = 235 && movecontact
trigger5 = AnimElem = 3, >= 1 && AnimElem = 3, <= 4 && stateno = 250 && movecontact
trigger6 = AnimElem = 2, >= 1 && AnimElem = 3, <= 3 && stateno = 400 && movecontact
trigger7 = AnimElem = 4, >= 1 && AnimElem = 4, <= 2 && stateno = 245 && movecontact
trigger8 = animelem = 4, >= 0 && animelem = 4, <= 10 && stateno = 700 && movecontact
trigger9 = animelem = 6, >= 1 && animelem = 8, <= 3 && stateno = 1000 && movecontact
trigger10 = animelem = 6, >= 1 && animelem = 8, <= 3 && stateno = 1010 && movecontact

;--------------------------------------------------------------------------
;圣剑
[State -1]
type = ChangeState
value = 3000
triggerall = var(20) = 0
triggerall = command = "3000"
triggerall = var(0)
triggerall = statetype != A && power >= 1500 
trigger1 = ctrl
trigger2 = (stateno = 100 && time > 3)
trigger3 = AnimElem = 6, >= 1 && AnimElem = 6, <= 4 && anim = 215 && movecontact
trigger4 = AnimElem = 3, >= 1 && AnimElem = 3, <= 3 && stateno = 235 && movecontact
trigger5 = AnimElem = 3, >= 1 && AnimElem = 3, <= 4 && stateno = 250 && movecontact
trigger6 = AnimElem = 2, >= 1 && AnimElem = 3, <= 3 && stateno = 400 && movecontact
trigger7 = AnimElem = 4, >= 1 && AnimElem = 4, <= 2 && stateno = 245 && movecontact
trigger8 = animelem = 4, >= 0 && animelem = 4, <=10 && stateno = 700 && movecontact

;--------------------------------------------------------------------------
;白鹭飞翔
[State -1]
type = ChangeState
value = 1200
triggerall = var(20) = 0
triggerall = command = "1200"
triggerall = var(0)
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = 100 && time > 3)
trigger3 = AnimElem = 6, >= 1 && AnimElem = 6, <= 4 && anim = 215 && movecontact
trigger4 = AnimElem = 3, >= 1 && AnimElem = 3, <= 3 && stateno = 235 && movecontact
trigger5 = AnimElem = 3, >= 1 && AnimElem = 3, <= 4 && stateno = 250 && movecontact
trigger6 = AnimElem = 2, >= 1 && AnimElem = 3, <= 3 && stateno = 400 && movecontact
trigger7 = AnimElem = 4, >= 1 && AnimElem = 4, <= 2 && stateno = 245 && movecontact
trigger8 = animelem = 4, >= 0 && animelem = 4, <=10 && stateno = 700 && movecontact

;--------------------------------------------------------------------------
;祝福
[State -1]
type = ChangeState
value = 1060
triggerall = var(20) = 0
triggerall = command = "1060"
triggerall = var(0)
triggerall = statetype != A
triggerall = numhelper(1050) = 0
triggerall = numhelper(1062) = 0
trigger1 = ctrl
trigger2 = (stateno = 100 && time > 3)
trigger3 = AnimElem = 6, >= 1 && AnimElem = 6, <= 4 && anim = 215 && movecontact
trigger4 = AnimElem = 3, >= 1 && AnimElem = 3, <= 3 && stateno = 235 && movecontact
trigger5 = AnimElem = 3, >= 1 && AnimElem = 3, <= 4 && stateno = 250 && movecontact
trigger6 = AnimElem = 2, >= 1 && AnimElem = 3, <= 3 && stateno = 400 && movecontact
trigger7 = AnimElem = 4, >= 1 && AnimElem = 4, <= 2 && stateno = 245 && movecontact
trigger8 = animelem = 4, >= 0 && animelem = 4, <=10 && stateno = 700 && movecontact

;--------------------------------------------------------------------------
;祝福
[State -1]
type = ChangeState
value = 1050
triggerall = var(20) = 0
triggerall = (command = "a")||(command = "b")
triggerall = var(0)
triggerall = statetype != A
triggerall = numhelper(1050) = 0
trigger1 = AnimElem = 6, >= 1 && AnimElem = 8, <= 2 && stateno = 1020 && movecontact
trigger2 = AnimElem = 6, >= 1 && AnimElem = 8, <= 2 && stateno = 1030 && movecontact

;--------------------------------------------------------------------------
;半月斩
[State -1]
type = ChangeState
value = 1100
triggerall = var(20) = 0
triggerall = command = "1100"
triggerall = var(0)
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = 100 && time > 3)
trigger3 = AnimElem = 6, >= 1 && AnimElem = 6, <= 4 && anim = 215 && movecontact
trigger4 = AnimElem = 3, >= 1 && AnimElem = 3, <= 3 && stateno = 235 && movecontact
trigger5 = AnimElem = 3, >= 1 && AnimElem = 3, <= 4 && stateno = 250 && movecontact
trigger6 = AnimElem = 2, >= 1 && AnimElem = 3, <= 3 && stateno = 400 && movecontact
trigger7 = animelem = 6, >= 1 && animelem = 8, <= 3 && stateno = 245 && movecontact
trigger8 = animelem = 4, >= 0 && animelem = 4, <=10 && stateno = 700 && movecontact

;--------------------------------------------------------------------------
;空中半月斩
[State -1]
type = ChangeState
value = 1150
triggerall = var(20) = 0
triggerall = command = "1100"
triggerall = var(0)
triggerall = statetype = A
trigger1 = ctrl
trigger2 = movecontact && stateno = [600,699]

;--------------------------------------------------------------------------
;沙鹰(站)
[State -1]
type = ChangeState
value = 1000
triggerall = var(20) = 0
triggerall = command = "1000"
triggerall = var(0)
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = 100 && time > 3)
trigger3 = AnimElem = 6, >= 1 && AnimElem = 6, <= 4 && anim = 215 && movecontact
trigger4 = AnimElem = 3, >= 1 && AnimElem = 3, <= 3 && stateno = 235 && movecontact
trigger5 = AnimElem = 3, >= 1 && AnimElem = 3, <= 4 && stateno = 250 && movecontact
trigger6 = AnimElem = 2, >= 1 && AnimElem = 3, <= 3 && stateno = 400 && movecontact
trigger7 = animelem = 6, >= 1 && animelem = 8, <= 3 && stateno = 245 && movecontact
trigger8 = animelem = 4, >= 0 && animelem = 4, <=10 && stateno = 700 && movecontact

;--------------------------------------------------------------------------
;沙鹰(蹲)
[State -1]
type = ChangeState
value = 1010
triggerall = var(20) = 0
triggerall = command = "1010"
triggerall = var(0)
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = 100 && time > 3)
trigger3 = AnimElem = 6, >= 1 && AnimElem = 6, <= 4 && anim = 215 && movecontact
trigger4 = AnimElem = 3, >= 1 && AnimElem = 3, <= 3 && stateno = 235 && movecontact
trigger5 = AnimElem = 3, >= 1 && AnimElem = 3, <= 4 && stateno = 250 && movecontact
trigger6 = AnimElem = 2, >= 1 && AnimElem = 3, <= 3 && stateno = 400 && movecontact
trigger7 = AnimElem = 4, >= 1 && AnimElem = 4, <= 2 && stateno = 245 && movecontact
trigger8 = animelem = 4, >= 0 && animelem = 4, <=10 && stateno = 700 && movecontact

;--------------------------------------------------------------------------
;沙鹰(站)连续
[State -1]
type = ChangeState
value = 1020
triggerall = var(20) = 0
triggerall = var(0)
triggerall = command = "1000"
triggerall = statetype != A
trigger1 = stateno = 1000 && movecontact
trigger1 = animelem = 6,>=1
trigger1 = animelem = 8,<=3
trigger2 = stateno = 1010 && movecontact
trigger2 = animelem = 6,>=1
trigger2 = animelem = 8,<=3

;--------------------------------------------------------------------------
;沙鹰(蹲)连续
[State -1]
type = ChangeState
value = 1030
triggerall = var(20) = 0
triggerall = var(0)
triggerall = command = "1010"
triggerall = statetype != A
trigger1 = stateno = 1000 && movecontact
trigger1 = animelem = 6,>=1
trigger1 = animelem = 8,<=3
trigger2 = stateno = 1010 && movecontact
trigger2 = animelem = 6,>=1
trigger2 = animelem = 8,<=3

;--------------------------------------------------------------------------
;突进连续中
[State -1]
type = ChangeState
value = 700
triggerall = var(20) = 0
triggerall = var(0)
triggerall = statetype = S
triggerall = command = "x"
triggerall = command = "holdfwd"
triggerall = command != "holddown" && command != "holdup"
trigger1 = AnimElem = 6, >= 1 && AnimElem = 6, <= 4 && anim = 215 && movecontact
trigger2 = AnimElem = 3, >= 1 && AnimElem = 3, <= 3 && stateno = 235 && movecontact
trigger3 = AnimElem = 3, >= 1 && AnimElem = 3, <= 4 && stateno = 250 && movecontact
trigger4 = AnimElem = 2, >= 1 && AnimElem = 3, <= 3 && stateno = 400 && movecontact
trigger5 = AnimElem = 4, >= 1 && AnimElem = 4, <= 2 && stateno = 245 && movecontact

;--------------------------------------------------------------------------
;挣脱技
[State -1]
type = ChangeState
value = 770
triggerall = var(20) = 0
triggerall = alive
triggerall = var(0)
triggerall = command = "ay"
triggerall = power >= 500
triggerall = ctrl = 0
trigger1 = movetype = H
trigger1 = stateno = [5000,5070]
trigger1 = life<= 500

;--------------------------------------------------------------------------
;突進
[State -1]
type = ChangeState
value = 710
triggerall = var(20) = 0
triggerall = var(0)
triggerall = statetype = S
triggerall = command = "x" && command = "holdfwd"
triggerall = command != "holddown" && command != "holdup"
trigger1 = ctrl

;--------------------------------------------------------------------------
;前翻滾
[State -1]
type = ChangeState
value = 900
triggerall = var(20) = 0
triggerall = command = "900"	;(var(26) = [900,905])
triggerall = Command != "holdback" && StateType = S && stateno != 100 && (command != "holddown")
trigger1 = ctrl

;前沖翻滾
[State -1]
type = ChangeState
value = 910
triggerall = var(20) = 0
triggerall = command = "900"	
triggerall = Command != "holdback" && StateType = S && (command != "holddown")
trigger1 = (stateno = 100 && time > 3)

;防禦中翻滾
[State -1]
type = ChangeState
value = 930
triggerall = var(20) = 0
triggerall = command = "900"	;(var(26) = [900,905]) || command = "900"
triggerall = statetype != A && power >= 1000
triggerall = stateno = [0,799]
trigger1 = var(24) > 0

;---------------------------------------------------------------------
;後翻滾
[State -1]
type = ChangeState
value = 950
triggerall = var(20) = 0
triggerall = command = "900"	;(var(26) = [900,905])
triggerall = Command != "holdfwd" && StateType = S && (command != "holddown")
trigger1 = Ctrl

;---------------------------------------------------------------------------
;前跑
[State -1, Run Fwd]
type = ChangeState
value = 100
triggerall = var(20) = 0
trigger1 = command = "FF" && (stateno != [100,101]) && statetype != A && (ctrl || stateno = 1990)

;---------------------------------------------------------------------------
;急退
[State -1, Run Back]
type = ChangeState
value = 105
triggerall = var(20) = 0
trigger1 = command = "BB" && statetype != A && ctrl

;===========================================================================

;CD(站立)
[State -1]
type = ChangeState
value = 250
triggerall = var(20) = 0
triggerall = command = "CD" && (command != "holddown")
triggerall = statetype != A && var(20) = 0
trigger1 = ctrl || (stateno = 100 && time > 3)

;防禦中CD
[State -1]
type = ChangeState
value = 260
triggerall = var(20) = 0
triggerall = command = "CD"	
triggerall = statetype != A && power >= 1000
triggerall = stateno = [0,799]
trigger1 = var(24) > 0

;
;空中CD
[State -1]
type = ChangeState
value = 650
triggerall = var(20) = 0
triggerall = command = "CD" 		;(var(26) = [250,253]) || (var(26) = [900,903])
triggerall = statetype = A && var(20) = 0
trigger1 = ctrl

;---------------------------------------------------------------------------
;挑衅
[State -1, Taunt]
type = ChangeState
value = 195
triggerall = var(20) = 0
triggerall = command = "start" && statetype != A && (stateno != [195,196]) && var(20) = 0
trigger1 = ctrl

;---------------------------------------------------------------------------
;A
[State -1, Stand Light Punch]
type = ChangeState
value = 200+ifelse(statetype = A,400,ifelse(command = "holddown",200,ifelse(P2dist X <= 56 && P2dist X >= -56,5,0)))
triggerall = var(20) = 0
triggerall = command = "x"	
trigger1 = ctrl || (stateno = 100 && time > 3)
trigger2 = animtime >= -4 && (stateno = 230 || stateno = 235)
;---------------------------------------------------------------------------
;B
[State -1, Stand Light Kick]
type = ChangeState
value = 230+ifelse(statetype = A,400,ifelse(command = "holddown",200,ifelse(P2dist X <= 58 && P2dist X >= -58,5,0)))
triggerall = var(20) = 0
triggerall = command = "a"	
trigger1 = ctrl || (stateno = 100 && time > 3)
trigger2 = animtime >= -4 && (stateno = 230 || stateno = 235)
;---------------------------------------------------------------------------
;C
[State -1, Stand Strong Punch]
type = ChangeState
value = 210+ifelse(statetype = A,400,ifelse(command = "holddown",200,ifelse(P2dist X <= 56 && P2dist X >= -56,5,0)))
triggerall = var(20) = 0
triggerall = command = "y"	
trigger1 = ctrl || (stateno = 100 && time > 3)

;---------------------------------------------------------------------------
;D
[State -1, Standing Strong Kick]
type = ChangeState
value = 240+ifelse(statetype = A,400,ifelse(command = "holddown",200,ifelse(P2dist X <= 54 && P2dist X >= -54,5,0)))
triggerall = var(20) = 0
triggerall = command = "b"	
trigger1 = ctrl || (stateno = 100 && time > 3)
;===========================================================================
[State -2]
type = varset
trigger1 = anim != [5,6]
trigger1 = P2dist X >= 0
fvar(37) = 0
ignorehitpause = 1

[State -2]
type = varset
trigger1 = anim != [5,6]
trigger1 = P2dist X < 0
fvar(37) = 1
ignorehitpause = 1


;--------------------------------------------------------------------------
;   AI action
;--------------------------------------------------------------------------
[State -3, AI]     
type=helper
Trigger1=!NumHelper(9990)          
Trigger1=RoundState=2
Trigger1=alive
Trigger1=var(20)=0
Trigger1=(PrevStateNo=[191,194])||PrevStateNo=5900            
Trigger1=ctrl&&stateno=0
helpertype=normal
name="AI"
stateno=9990
ID=9990
pos=9999,9999            
keyctrl=1                
pausemovetime=2147483647          
supermovetime=2147483647           
persistent = 0               


[State -3,9990]
type=changestate                  
Trigger1= ishelper(9990)        
Trigger1= stateno!=9990
value=9990

[State -2, 0]  
type = varset
TriggerAll = !var(20)
TriggerAll = RoundState = [1,2]      
Trigger1  = Command = "AI0"  || Command = "AI1"  || Command = "AI2"
Trigger2  = Command = "AI3"  || Command = "AI4"  || Command = "AI5"
Trigger3  = Command = "AI6"  || Command = "AI7"  || Command = "AI8"
Trigger4  = Command = "AI9"  || Command = "AI10" || Command = "AI11"
Trigger5  = Command = "AI12" || Command = "AI13" || Command = "AI14"
Trigger6  = Command = "AI15" || Command = "AI16" || Command = "AI17"
Trigger7  = Command = "AI18" || Command = "AI19" || Command = "AI20"
Trigger8  = Command = "AI21" || Command = "AI22" || Command = "AI23"
Trigger9  = Command = "AI24" || Command = "AI25" || Command = "AI26"
Trigger10 = Command = "AI27" || Command = "AI28" || Command = "AI29"
Trigger11 = Command = "AI30" || Command = "AI31" || Command = "AI32"
Trigger12 = Command = "AI33" || Command = "AI34" || Command = "AI35"
Trigger13 = Command = "AI36" || Command = "AI37" || Command = "AI38"
Trigger14 = Command = "AI39" || Command = "AI40" || Command = "AI41"
Trigger15 = Command = "AI42" || Command = "AI43" || Command = "AI44"
Trigger16 = Command = "AI45" || Command = "AI46" || Command = "AI47"
Trigger17 = Command = "AI48" || Command = "AI49" || Command = "AI50"
Trigger18 = numhelper(9990)               
Trigger18 = helper(9990),var(20)          
var(20) = 1             
ignorehitpause = 1

; win, stop moving
[State -2]
type = ChangeState
value = 0
triggerall = (var(20) = 1) && (statetype != A) && ctrl
trigger1 = Win = 1

[State -2,落地AB]
type = ChangeState
value = 5200
triggerall = var(20) = 1
triggerall = Vel Y > 0
triggerall = alive
trigger1 = Pos Y >= -10
trigger1 = stateno = 5050
trigger1 = canrecover
trigger2 = Pos Y >= -20
trigger2 = stateno = 5071

[state -2,亂舞技]
type = ChangeState
value = 3100
triggerall = var(20) = 1
triggerall = (statetype != A) && (P2StateType != L)
triggerall = (P2Stateno != 5120)
trigger1 = (stateno=1000 || stateno=1010) && movehit && (animelem=6,5) && power>=2000 && random<=400
trigger2 = var(33)>0 && (p2dist Y = [-130,-110]) && power>=2000 && random<=600 && ctrl
trigger3 = var(33)>0 && (p2dist Y = [-130,-110]) && power>=2000 && random<=600 && stateno=100 && time>3
trigger4 = P2Stateno=1230 && (p2dist Y = [-120,-110]) && power>=2000 && random<=600  && ctrl
trigger5 = P2Statetype=A && P2movetype=H && (p2dist Y = [-120,-110]) && ctrl && power>=2000 && random<=200 && p2dist X>120
trigger6 = (p2dist Y > -100) && power>=1000 && random<=50 && (p2dist X > 140) && ctrl && (p2stateno=[200,499])
trigger7 = FrontEdgeDist<=80 && var(40)>0 && p2dist Y < -30 && ctrl && random<=600

[state -2,前跑]
type = ChangeState
value = 100
triggerall = (var(20) = 1) && (statetype != A) && ctrl
triggerall = (stateno != 40) && (prevstateno != 100)
triggerall = (p2stateno != 5120) && (p2statetype != L)
trigger1 = (ifelse(NumEnemy=1,p2dist X,(enemynear(0),p2dist X)) >= 90) && (P2MoveType != A) && (P2StateNo = [0,4999]) && random <= 500
trigger2 = p2movetype != A && p2dist X >= 80 && random <= 200
trigger3 = p2dist X >= 80 && random <= 10

[state -2,急退]
type = ChangeState
value = 105
triggerall = var(20) = 1 && statetype != A && ctrl
trigger1 = (p2stateno = 5120) || (p2statetype = L)
trigger1 = p2dist x=[-50,50]
trigger2 = (NumEnemy = 2) && ((enemynear(1),p2dist X)=[-70,70])
trigger2 = ((enemynear(1),statetype = L)||(enemynear(1),stateno = 5120))||((enemynear(0),statetype = L)||(enemynear(0),stateno = 5120))

[state -2,站立C]
type = ChangeState
value = 215
triggerall = var(20) = 1
triggerall = (statetype != A) && (P2StateType != L) && (P2StateType != A); && (P2moveType != A)
triggerall = p2dist X > 0 && p2dist X < 56
triggerall = (P2Stateno != [5030,5999]) && (P2Stateno != 5120)
triggerall = ctrl
trigger1 = random<=600
trigger2 = P2stateno = [200,499]
trigger2 = random<=400
trigger3 = (p2movetype = H) && (random<=500)
trigger4 = (p2movetype = I) && (random<=500)

[state -2,蹲下B]
type = ChangeState
value = 430
triggerall = var(20) = 1
triggerall = (statetype != A) && (P2StateType != L) && (P2StateType != A)
triggerall = p2dist X > 0 && p2dist X < 75
triggerall = (P2Stateno != [5030,5999]) && (P2Stateno != 5120)
triggerall = ctrl
trigger1 = P2stateno = [200,499]
trigger1 = random<=400
trigger2 = (p2movetype = H) && (random<=600)
trigger3 = (p2movetype = I) && (random<=600)
trigger4 = random<=400

[state -2,白鷺飛翔]
type = ChangeState
value = 1200
triggerall = var(20) = 1
triggerall = (statetype != A) && (P2StateType != L) && (P2StateType != A)
triggerall = (P2Stateno != [5030,5999]) && (P2Stateno != 5120)
triggerall = P2dist X=[0,80]
trigger1 = stateno=700 && movehit && animelem = 4, >= 0 && animelem = 4, <=10 && random<300
trigger2 = stateno=100 && time>3 && random<=200 
trigger3 = (p2stateno=[200,499]) && random<=400 && power<=2000 && ctrl
trigger4 = (p2stateno=[6000,99999]) && random<=400 && power<=2000 && p2movetype=I && ctrl

[state -2,1000 NEEDLES]
type = ChangeState
value = 10000
triggerall = var(20) = 1
triggerall = (statetype != A) && (P2StateType != L)
triggerall = (P2Stateno != [5100,5999]) && (P2Stateno != 5120)
triggerall = ctrl
triggerall = power>=2000
trigger1 = (p2dist X>=150)&& p2movetype=A && (p2stateno=[6000,99999]) && random<=400
trigger2 = (enemy,numhelper + enemy,NumProj)>1 && random<=400 && (p2dist X>=120)

[state -2,ANGEL]
type = ChangeState
value = 20000
triggerall = var(20) = 1
triggerall = (statetype != A) && (P2StateType != L)
triggerall = (P2Stateno != [5100,5999]) && (P2Stateno != 5120)
triggerall = ctrl
triggerall = power>=5000
triggerall = life <= 500
triggerall = (teammode=single)||(teammode=turns)
trigger1 = (enemy,numhelper + enemy,NumProj)>2 && random<=400
trigger2 = random<=50

[state -2,ANGEL]
type = ChangeState
value = 20000
triggerall = var(20) = 1
triggerall = (statetype != A) && (P2StateType != L)
triggerall = (P2Stateno != [5100,5999]) && (P2Stateno != 5120)
triggerall = ctrl
triggerall = power>=5000
triggerall = teammode=simul
trigger1 = (enemy,numhelper + enemy,NumProj)>2 && random<=500
trigger2 = random<=100
trigger2 = (partner,life<=800) && random<=500
trigger3 = (partner,movetype=H) && (enemynear(0),movetype=A) && random<=200 && (partner,life<=1000)
trigger4 = (partner,movetype=H) && (enemynear(0),movetype=A) && (enemynear(1),movetype=A) && random<=500 && (partner,life<=1000)
trigger5 = (enemynear(0),movetype=H) && (enemynear(1),movetype=H) && (random=[0,199])

[state -2,ANIMA]
type = ChangeState
value = 16000
triggerall = var(20) = 1
triggerall = (statetype != A) && (P2StateType != L)
triggerall = (P2Stateno != [5100,5999]) && (P2Stateno != 5120)
triggerall = ctrl
triggerall = power>=5000
triggerall = life <= 600
triggerall = (teammode=single)||(teammode=turns)
trigger1 = (enemy,numhelper + enemy,NumProj)>2 && random<=400

[state -2,ANIMA]
type = ChangeState
value = 16000
triggerall = var(20) = 1
triggerall = (statetype != A) && (P2StateType != L)
triggerall = (P2Stateno != [5100,5999]) && (P2Stateno != 5120)
triggerall = ctrl
triggerall = power>=5000
triggerall = teammode=simul
trigger1 = (enemy,numhelper + enemy,NumProj)>2 && random<=500
trigger2 = (partner,life<=600) && random<=500
trigger3 = (partner,movetype=H) && (enemynear(0),movetype=A) && random<=200 && (partner,life<=1100)
trigger4 = (partner,movetype=H) && (enemynear(0),movetype=A) && (enemynear(1),movetype=A) && random<=500 && (partner,life<=1100)
trigger5 = (enemynear(0),movetype=H) && (enemynear(1),movetype=H) && (random=[200,399])

[state -2,BAHAMUT]
type = ChangeState
value = 15000
triggerall = var(20) = 1
triggerall = (statetype != A) && (P2StateType != L)
triggerall = (P2Stateno != [5100,5999]) && (P2Stateno != 5120)
triggerall = ctrl
triggerall = power>=4500
triggerall = life <= 850
triggerall = (teammode=single)||(teammode=turns)
trigger1 = (enemy,numhelper + enemy,NumProj)>2 && random<=400

[state -2,BAHAMUT]
type = ChangeState
value = 15000
triggerall = var(20) = 1
triggerall = (statetype != A) && (P2StateType != L)
triggerall = (P2Stateno != [5100,5999]) && (P2Stateno != 5120)
triggerall = ctrl
triggerall = power>=4500
triggerall = teammode=simul
trigger1 = (enemy,numhelper + enemy,NumProj)>2 && random<=400
trigger2 = (partner,life<=700) && random<=500
trigger3 = (partner,movetype=H) && (enemynear(0),movetype=A) && random<=200 && (partner,life<=1200)
trigger4 = (partner,movetype=H) && (enemynear(0),movetype=A) && (enemynear(1),movetype=A) && random<=500 && (partner,life<=1200)
trigger5 = (enemynear(0),movetype=H) && (enemynear(1),movetype=H) && (random=[400,599])

[state -2,IFRIT]
type = ChangeState
value = 14000
triggerall = var(20) = 1
triggerall = (statetype != A) && (P2StateType != L)
triggerall = (P2Stateno != [5100,5999]) && (P2Stateno != 5120)
triggerall = ctrl
triggerall = power>=3500
triggerall = life <= 1000
triggerall = (teammode=single)||(teammode=turns)
trigger1 = (enemy,numhelper + enemy,NumProj)>2 && random<=400

[state -2,IFRIT]
type = ChangeState
value = 14000
triggerall = var(20) = 1
triggerall = (statetype != A) && (P2StateType != L)
triggerall = (P2Stateno != [5100,5999]) && (P2Stateno != 5120)
triggerall = ctrl
triggerall = power>=3500
triggerall = teammode=simul
trigger1 = (enemy,numhelper + enemy,NumProj)>2 && random<=500
trigger2 = (partner,life<=800) && random<=500
trigger3 = (partner,movetype=H) && (enemynear(0),movetype=A) && random<=200 && (partner,life<=1500)
trigger4 = (partner,movetype=H) && (enemynear(0),movetype=A) && (enemynear(1),movetype=A) && random<=500 && (partner,life<=1500)
trigger5 = (enemynear(0),movetype=H) && (enemynear(1),movetype=H) && (random=[600,799])

[state -2,SHIVA]
type = ChangeState
value = 13000
triggerall = var(20) = 1
triggerall = (statetype != A) && (P2StateType != L)
triggerall = (P2Stateno != [5100,5999]) && (P2Stateno != 5120)
triggerall = ctrl
triggerall = power>=3500
triggerall = life <= 1000
triggerall = (teammode=single)||(teammode=turns)
trigger1 = (enemy,numhelper + enemy,NumProj)>2 && random<=400

[state -2,SHIVA]
type = ChangeState
value = 13000
triggerall = var(20) = 1
triggerall = (statetype != A) && (P2StateType != L)
triggerall = (P2Stateno != [5100,5999]) && (P2Stateno != 5120)
triggerall = ctrl
triggerall = power>=3500
triggerall = teammode=simul
trigger1 = (enemy,numhelper + enemy,NumProj)>2 && random<=500
trigger2 = (partner,life<=800) && random<=500
trigger3 = (partner,movetype=H) && (enemynear(0),movetype=A) && random<=200 && (partner,life<=1500)
trigger4 = (partner,movetype=H) && (enemynear(0),movetype=A) && (enemynear(1),movetype=A) && random<=500 && (partner,life<=1500)
trigger5 = (enemynear(0),movetype=H) && (enemynear(1),movetype=H) && (random=[800,999])

[state -2,神罰]
type = ChangeState
value = 12000
triggerall = var(20) = 1
triggerall = (statetype != A) && (P2StateType != L)
triggerall = (P2Stateno != [5100,5999]) && (P2Stateno != 5120)
triggerall = ctrl
triggerall = power>=3000
triggerall = (teammode=single)||(teammode=turns)
trigger1 = (enemy,numhelper + enemy,NumProj)>2 && random<=700 && life<=1500 && p2dist X<=120
trigger2 = (enemy,numhelper + enemy,NumProj)>1 && random<=400 && life<=600

[state -2,神罰]
type = ChangeState
value = 12000
triggerall = var(20) = 1
triggerall = (statetype != A) && (P2StateType != L)
triggerall = (P2Stateno != [5100,5999]) && (P2Stateno != 5120)
triggerall = ctrl
triggerall = power>=3000
triggerall = teammode=simul
trigger1 = (enemy,numhelper + enemy,NumProj)>2 && random<=700 && life<=2000 && p2dist X<=120
trigger2 = (enemy,numhelper + enemy,NumProj)>1 && random<=400 && life<=1100

[state -2,WISHING STAR]
type = ChangeState
value = 11000
triggerall = var(20) = 1
triggerall = (statetype != A) && (P2StateType != L)
triggerall = (P2Stateno != [5100,5999]) && (P2Stateno != 5120)
triggerall = ctrl
triggerall = power>=3000
trigger1 = (enemy,numhelper + enemy,NumProj)>3 && random<=200
trigger2 = (p2dist X>=200)&& p2movetype=A && (p2stateno=[6000,99999]) && random<=400

[state -2,聖劍]
type = ChangeState
value = 3000
triggerall = var(20) = 1
triggerall = (statetype != A)
triggerall = (P2Stateno != [5100,5999])
triggerall = ctrl
triggerall = power>=1500
trigger1 = (p2dist X>=80)&& random<=400 && life<=500
trigger2 = (enemy,numhelper + enemy,NumProj)>1 && life<=500 && random<=700 

[state -2,半月斬]
type = ChangeState
value = 1100
triggerall = var(20) = 1
triggerall = (statetype != A) && (P2StateType != L) && (P2moveType != I)
triggerall = p2dist X > 0 && p2dist X < 90
triggerall = p2dist Y < 100 && p2dist Y > -70
triggerall = (P2Stateno != [5100,5999]) && (P2Stateno != 5120)
trigger1 = random<=200 && ctrl
trigger2 = (p2movetype = H) && (p2statetype = A) && (random<=400) && ctrl
trigger3 = (p2movetype = A) && (random<=600) && ctrl
trigger4 = (p2movetype = H) && (random<=400) && (p2dist X >=75) && ctrl
trigger5 = stateno = 100 && time > 3 && random<=300
trigger6 = (P2Stateno=[5000,5099]) && (random<=400) && ctrl
trigger7 = FrontEdgeDist<=80 && var(40)>0 && p2dist Y < -30 && ctrl

[state -2,半月斬]
type = ChangeState
value = 1100
triggerall = var(20) = 1
triggerall = (statetype != A) && (P2StateType != L) && (P2moveType != I)
triggerall = p2dist X > 0 && p2dist X < 90
triggerall = p2dist Y < 100 && p2dist Y > -100
triggerall = ctrl
trigger1 = P2Stateno=1230

[state -2,空中半月斬]
type = ChangeState
value = 1150
triggerall = var(20) = 1
triggerall = (statetype = A) && (P2StateType != L) && (P2moveType != I)
triggerall = p2dist X > 0 && p2dist X < 90
triggerall = p2dist Y < 100 && p2dist Y > -100
triggerall = (P2Stateno != [5100,5999]) && (P2Stateno != 5120)
triggerall = ctrl
trigger1 = random<=400
trigger2 = (p2movetype = H) && (p2statetype = A) && (random<=400)
trigger3 = (p2movetype = A) && (random<=600)
trigger4 = (p2movetype = H) && (random<=400) && (p2dist X >=75)
trigger5 = (P2Stateno=[5000,5099]) && (random<=400)

[state -2,空中半月斬]
type = ChangeState
value = 1150
triggerall = var(20) = 1
triggerall = (statetype = A) && (P2StateType != L) && (P2moveType != I)
triggerall = p2dist X > 0 && p2dist X < 90
triggerall = p2dist Y < 100 && p2dist Y > -100
triggerall = ctrl
trigger1 = P2Stateno=1230

[state -2,空中CD]
type = ChangeState
value = 650
triggerall = var(20) = 1
triggerall = (statetype = A) && (P2StateType != L)
triggerall = p2dist X > 0 && p2dist X < 68
triggerall = p2dist Y < 0 && p2dist Y > -50
triggerall = (P2Stateno != [5030,5999]) && (P2Stateno != 5120)
triggerall = ctrl
trigger1 = random<=400
trigger2 = (p2movetype = A) && (P2stateno = [200,699]) && (random<=500)
trigger3 = (p2movetype = H) && (random<=400)

[state -2,祝福]
type = ChangeState
value = 1060
triggerall = var(20) = 1
triggerall = (statetype != A) && (P2StateType != L) && (P2moveType != A)
triggerall = p2dist X > 150
triggerall = ctrl
triggerall = numhelper(1050) = 0
triggerall = numhelper(1062) = 0
trigger1 = random<=200

[state -2,突進(連續中)]
type = ChangeState
value = 700
triggerall = var(20) = 1
triggerall = (statetype != A) && (P2StateType != L)
triggerall = (P2Stateno != [5030,5999]) && (P2Stateno != 5120)
trigger1 = stateno=215 && movecontact && (animelem=6,2)

[state -2,手槍射擊(站立姿勢)]
type = ChangeState
value = 1000
triggerall = var(20) = 1
triggerall = (statetype != A) && (P2StateType != L)
triggerall = (P2Stateno != [5030,5999]) && (P2Stateno != 5120)
trigger1 = stateno=700 && movecontact && animelem = 4, >= 0 && animelem = 4, <=10 && (random=[300,599])

[state -2,手槍射擊(蹲下姿勢)]
type = ChangeState
value = 1010
triggerall = var(20) = 1
triggerall = (statetype != A) && (P2StateType != L)
triggerall = (P2Stateno != [5030,5999]) && (P2Stateno != 5120)
trigger1 = stateno=700 && movecontact && animelem = 4, >= 0 && animelem = 4, <=10 && (random=[600,999])

[state -2,手槍射擊(站立姿勢)(連續中)]
type = ChangeState
value = 1020
triggerall = var(20) = 1
triggerall = (statetype != A) && (P2StateType != L)
trigger1 = stateno=1000 && movecontact && (animelem=6,0) && (random=[0,499])
trigger2 = stateno=1010 && movecontact && (animelem=6,0) && (random=[0,499])

[state -2,手槍射擊(蹲下姿勢)(連續中)]
type = ChangeState
value = 1030
triggerall = var(20) = 1
triggerall = (statetype != A) && (P2StateType != L)
trigger1 = stateno=1000 && movecontact && (animelem=6,0) && (random=[500,999])
trigger2 = stateno=1010 && movecontact && (animelem=6,0) && (random=[500,999])

[state -2,祝福(連續中)]
type = ChangeState
value = 1050
triggerall = var(20) = 1
triggerall = (statetype != A) && (P2StateType != L)
triggerall = numhelper(1050) = 0
trigger1 = stateno=1020 && movecontact && (animelem=6,0)
trigger2 = stateno=1030 && movecontact && (animelem=6,0)

[state -2,防禦中CD]
type = ChangeState
value = 260
triggerall = var(20) = 1
triggerall = (statetype != A) && (P2StateType != L)
triggerall = p2dist X > 0 && p2dist X < 90
triggerall = p2dist Y < 100 && p2dist Y > -70
triggerall = (P2Stateno != [5100,5999]) && (P2Stateno != 5120)
triggerall = power>=1000
triggerall = (stateno!=930) && (stateno!=960)
triggerall = (stateno=150 || stateno=151 || stateno=153) &&time=1
trigger1 = FrontEdgeDist<=80 && p2dist X<50  && (random<=300)

[State -1,掙脫技]
type = ChangeState
value = 770
triggerall = var(20) = 1
triggerall = alive
triggerall = power >= 500
triggerall = ctrl = 0
;triggerall = statetype = A
trigger1 = movetype = H
trigger1 = stateno = [5000,5070]
trigger1 = life<= 100
trigger1 = random<=500

[State -1,防御]
type = ChangeState
value = 120
triggerall = var(20) = 1
triggerall = ctrl
triggerall = statetype != A
Trigger1 = Enemy,NumHelper
Trigger1 = InGuardDist

