[Remap]
x = x
y = y
z = z
a = a
b = b
c = c
s = s

[Defaults]
command.time = 15
command.buffer.time = 1




;--------------------------AI启动用Command----------------------------
[Command]
name = "AI0"
command = a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
time = 1

[Command]
name = "AI1"
command = b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b
time = 1

[Command]
name = "AI2"
command = c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c
time = 1

[Command]
name = "AI3"
command = x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x
time = 1

[Command]
name = "AI4"
command = y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y
time = 1

[Command]
name = "AI5"
command = z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z
time = 1

[Command]
name = "AI6"
command = s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s
time =1

[Command]
name = "AI7"
command = F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F
time = 1

[Command]
name = "AI8"
command = D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D
time = 1

[Command]
name = "AI9"
command = B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B
time = 1

[Command]
name = "AI10"
command = U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U
time = 1

[Command]
name = "AI11"
command = a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
time = 1

[Command]
name = "AI12"
command = c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c
time = 1

[Command]
name = "AI13"
command = x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x
time = 1

[Command]
name = "AI14"
command = y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y
time = 1

[Command]
name = "AI15"
command = z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z
time = 1

[Command]
name = "AI16"
command = s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s
time = 1

[Command]
name = "AI17"
command = a,B,c,x,y,z,s,B,D,F,U,a,b,c,x,y,z,s,s
time = 1

[Command]
name = "AI18"
command = a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
time = 1

[Command]
name = "AI19"
command = b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b
time = 1

[Command]
name = "AI20"
command = c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c
time = 1

[Command]
name = "AI21"
command = x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x
time = 1

[Command]
name = "AI22"
command = y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y
time = 1

[Command]
name = "AI23"
command = z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z
time = 1

[Command]
name = "AI24"
command = s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s
time = 1

[Command]
name = "AI25"
command = F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F
time = 1

[Command]
name = "AI26"
command = D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D
time = 1

[Command]
name = "AI27"
command = B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B
time = 1

[Command]
name = "AI28"
command = U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U
time = 1

[Command]
name = "AI29"
command = a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
time = 1

[Command]
name = "AI30"
command = c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c
time = 1

[Command]
name = "AI31"
command = x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x
time = 1

[Command]
name = "AI32"
command = y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y
time = 1

[Command]
name = "AI33"
command = z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z
time = 1

[Command]
name = "AI34"
command = s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s
time = 1

[Command]
name = "AI35"
command = z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z
time = 1

[Command]
name = "AI36"
command = z,z,z,z,z,z,a,a,a,z,z,z,z,z,z,z,z,z,z
time = 1

[Command]
name = "AI37"
command = z,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,z,z,z
time = 1

[Command]
name = "AI38"
command = z,z,z,z,z,a,a,a,z,z,z,z,z,a,a,a,z,z,z
time = 1

[Command]
name = "AI39"
command = z,z,z,z,z,a,a,a,z,z,z,z,z,z,a,a,z,z,z
time = 1

[Command]
name = "AI40"
command = z,z,z,z,a,a,a,z,z,z,z,a,z,z,a,a,z,z,z
time = 1

[Command]
name = "AI41"
command = z,z,z,a,z,z,z,z,z,z,z,z,z,a,a,z,z,z,z
time = 1

[Command]
name = "AI42"
command = z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z
time = 1

[Command]
name = "AI43"
command = z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,a,a,z
time = 1

[Command]
name = "AI44"
command = z,z,a,a,a,a,z,z,z,z,z,z,z,z,z,a,a,a,z
time = 1

[Command]
name = "AI45"
command = z,z,z,z,z,z,a,a,z,z,z,z,z,a,a,a,a,z,z
time = 1

[Command]
name = "AI46"
command = z,z,z,z,z,z,z,z,a,a,a,a,a,a,z,z,z,z,z
time = 1

[Command]
name = "AI47"
command = z,z,z,a,a,a,a,z,z,z,z,z,z,z,z,z,z,z,z
time = 1

[Command]
name = "AI48"
command = z,z,z,z,z,a,a,a,z,z,z,a,a,a,z,z,a,z,a
time = 1

[Command]
name = "AI49"
command = z,z,z,z,a,a,a,z,z,z,z,z,a,a,a,z,z,z,z
time = 1

[Command]
name = "AI50"
command = z,z,z,a,a,z,z,z,z,z,z,z,z,z,a,a,z,z,z
time = 1





;---------------------------手操用Command---------------------------


[Command]
name = "4124a"
command = ~B, D, DB, B, a
time = 10

[Command]
name = "6236a"
command = ~F, D, DF, F, a
time = 25

[Command]
name = "6236b"
command = ~F, D, DF, F, b
time = 25

[Command]
name = "6236c"
command = ~F, D, DF, F, c
time = 25

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

[Command]
name = "236c"
command = ~D, DF, F, c
time = 20

[Command]
name = "214236x"
command = ~D, B, D, F, x
time = 25

[Command]
name = "214236y"
command = ~D, B, D, F, y
time = 25

[Command]
name = "236214x"
command = ~D, F, D, B, x
time = 25

[Command]
name = "236214y"
command = ~D, F, D, B, y
time = 25

[Command]
name = "24"
command = ~D, B, D, F, c
time = 25

[Command]
name = "25"
command = ~D, B, D, F, z
time = 25

[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 = "down_a"
command = /$D,a
time = 1

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

[Command]
name = "a"
command = a
time = 1

[Command]
name = "b"
command = b
time = 1

[Command]
name = "c"
command = c
time = 1

[Command]
name = "x"
command = x
time = 1

[Command]
name = "y"
command = y
time = 1

[Command]
name = "z"
command = z
time = 1

[Command]
name = "start"
command = s
time = 1

[Command]
name = "holdfwd"
command = /$F
time = 1

[Command]
name = "holdback"
command = /$B
time = 1

[Command]
name = "holdup"
command = /$U
time = 1

[Command]
name = "holddown"
command = /$D
time = 1

[Statedef -1]
[State AI启动]
type = Varset
triggerall = !ishelper && sysfvar(4) != 2
triggerall = (!var(59) || var(59) = -1) && roundstate < 3
trigger1 = Command = "AI0" || Command = "AI1" || Command = "AI2" || Command = "AI3"
trigger2 = Command = "AI4" || Command = "AI5" || Command = "AI6" || Command = "AI7"
trigger3 = Command = "AI8" || Command = "AI9" || Command = "AI10" || Command = "AI11"
trigger4 = Command = "AI12" || Command = "AI13" || Command = "AI14" || Command = "AI15"
trigger5 = Command = "AI16" || Command = "AI17" || Command = "AI18" || Command = "AI19"
trigger6 = Command = "AI20" || Command = "AI21" || Command = "AI22" || Command = "AI23"
trigger7 = Command = "AI24" || Command = "AI25" || Command = "AI26" || Command = "AI27"
trigger8 = Command = "AI28" || Command = "AI29" || Command = "AI30" || Command = "AI31"
trigger9 = Command = "AI32" || Command = "AI33" || Command = "AI34" || Command = "AI35"
trigger10 = Command = "AI36" || Command = "AI37" || Command = "AI38" || Command = "AI39"
trigger11 = Command = "AI40" || Command = "AI41" || Command = "AI42" || Command = "AI43"
trigger12 = Command = "AI44" || Command = "AI45" || Command = "AI46" || Command = "AI47"
trigger13 = Command = "AI48" || Command = "AI49" || Command = "AI50"
trigger14 = var(59) = -1
;trigger15 = 1
var(59) = 1

[State AI启动2]
type = ParentVarset
triggerall = ishelper 
triggerall = root,sysfvar(4) != 2
triggerall = ishelper(110000) && parent,id = root,id
triggerall = sysvar(0) != -2
triggerall = (!root,var(59) || root,var(59) = -1) && roundstate < 3
trigger1 = Command != "a" && root,command = "a"
trigger2 = Command != "b" && root,command = "b"
trigger3 = Command != "c" && root,command = "c"
trigger4 = Command != "x" && root,command = "x"
trigger5 = Command != "y" && root,command = "y"
trigger6 = Command != "z" && root,command = "z"
trigger7 = Command != "start" && root,command = "start"
trigger8 = Command != "holdup" && root,command = "holdup"
trigger9 = Command != "holddown" && root,command = "holddown"
var(59) = 1

[State AI启动3]
type = Varset
triggerall = ishelper 
triggerall = root,sysfvar(4)
triggerall = (!var(59) || var(59) = -1) && roundstate < 3 && !sysvar(0)
trigger1 = root,Command = "AI0" || root,Command = "AI1" || root,Command = "AI2" || root,Command = "AI3"
trigger2 = root,Command = "AI4" || root,Command = "AI5" || root,Command = "AI6" || root,Command = "AI7"
trigger3 = root,Command = "AI8" || root,Command = "AI9" || root,Command = "AI10" || root,Command = "AI11"
trigger4 = root,Command = "AI12" || root,Command = "AI13" || root,Command = "AI14" || root,Command = "AI15"
trigger5 = root,Command = "AI16" || root,Command = "AI17" || root,Command = "AI18" || root,Command = "AI19"
trigger6 = root,Command = "AI20" || root,Command = "AI21" || root,Command = "AI22" || root,Command = "AI23"
trigger7 = root,Command = "AI24" || root,Command = "AI25" || root,Command = "AI26" || root,Command = "AI27"
trigger8 = root,Command = "AI28" || root,Command = "AI29" || root,Command = "AI30" || root,Command = "AI31"
trigger9 = root,Command = "AI32" || root,Command = "AI33" || root,Command = "AI34" || root,Command = "AI35"
trigger10 = root,Command = "AI36" || root,Command = "AI37" || root,Command = "AI38" || root,Command = "AI39"
trigger11 = root,Command = "AI40" || root,Command = "AI41" || root,Command = "AI42" || root,Command = "AI43"
trigger12 = root,Command = "AI44" || root,Command = "AI45" || root,Command = "AI46" || root,Command = "AI47"
trigger13 = root,Command = "AI48" || root,Command = "AI49" || root,Command = "AI50"
trigger14 = var(59) = -1
var(59) = 1

[State AI启动4]
type = ParentVarset
triggerall = ishelper 
triggerall = root,sysfvar(4)
triggerall = ishelper(110000) && parent,id = root,id
triggerall = sysvar(0) != -2
triggerall = (!root,var(59) || root,var(59) = -1) && roundstate < 3 && !sysvar(0)
trigger1 = Command != "a" && root,command = "a"
trigger2 = Command != "b" && root,command = "b"
trigger3 = Command != "c" && root,command = "c"
trigger4 = Command != "x" && root,command = "x"
trigger5 = Command != "y" && root,command = "y"
trigger6 = Command != "z" && root,command = "z"
trigger7 = Command != "start" && root,command = "start"
trigger8 = Command != "holdup" && root,command = "holdup"
trigger9 = Command != "holddown" && root,command = "holddown"
var(59) = 1

[State ]
type = Varset
triggerall = ishelper 
triggerall = root,sysfvar(4) != 2
triggerall = ishelper(110000) && parent,id = root,id
triggerall = sysvar(0) != -2
triggerall = !root,var(59)
trigger1 = Command = "a" && root,command = "a"
trigger2 = Command = "b" && root,command = "b"
trigger3 = Command = "c" && root,command = "c"
trigger4 = Command = "x" && root,command = "x"
trigger5 = Command = "y" && root,command = "y"
trigger6 = Command = "z" && root,command = "z"
trigger7 = Command = "start" && root,command = "start"
trigger8 = Command = "holdup" && root,command = "holdup"
trigger9 = Command = "holddown" && root,command = "holddown"
sysvar(0) = -2
ignorehitpause = 1

[State ]
type = Varset
triggerall = ishelper 
triggerall = root,sysfvar(4)
triggerall = ishelper(110000) && parent,id = root,id
trigger1 = var(59)
trigger1 = sysvar(0) != 1
sysvar(0) = 1
ignorehitpause = 1

[State ]
type = Varset
triggerall = ishelper 
triggerall = root,sysfvar(4)
triggerall = ishelper(110000) && parent,id = root,id
trigger1 = !var(59) || (var(59) < 0 && roundstate < 3)
trigger1 = sysvar(0) = 1
var(59) = 1
ignorehitpause = 1

[State AI关闭]
type = Varset
triggerall = var(59) && var(59) != -1 
trigger1 = roundstate > 2
trigger2 = !alive ;|| !life
trigger3 = !ishelper && sysfvar(4) = 2
trigger4 = var(5) = 1 && !life
var(59) = -1





[State ]
type = Changestate
triggerall = !var(59)
triggerall = power
triggerall = command = "start"
triggerall = statetype != A
triggerall = var(5) && !var(12)
triggerall = !(floor(fvar(9)) & 4)
triggerall = power / powermax >= life / lifemax
trigger1 = floor(fvar(9)) & 2
trigger1 = ctrl
value = 3500

[State ]
type = Changestate
triggerall = !var(59)
triggerall = power
triggerall = command = "start"
triggerall = statetype != A
triggerall = !var(5)
triggerall = !(floor(fvar(9)) & 4)
triggerall = power * 1.0 / powermax >= life * 1.0 / lifemax
trigger1 = ctrl
value = 3500

[State ]
type = Changestate
triggerall = !var(59)
triggerall = power >= 6500
triggerall = command = "x"
triggerall = command = "y"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = movehit
trigger3 = projhit32009 = 1, < 30
trigger3 = stateno = [3600,3604]
value = ifelse(var(12), 3900, 3700)

[State ]
type = Changestate
triggerall = !var(59)
triggerall = power >= 4000
triggerall = command = "holdback"
triggerall = command = "z"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = movehit
trigger3 = projhit32009 = 1, < 30
trigger3 = stateno = [3600,3604]
trigger4 = stateno = [205,310]
value = 3400

[State ]
type = Changestate
triggerall = !var(59)
triggerall = power >= 4000
triggerall = command = "holdfwd"
triggerall = command = "z"
triggerall = !var(12)
trigger1 = ctrl
trigger2 = movehit
trigger3 = projhit32009 = 1, < 30
trigger3 = stateno = [3600,3604]
value = 3300

[State ]
type = Changestate
triggerall = !var(59)
triggerall = power >= 2000
triggerall = command = "holddown"
triggerall = command = "z"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = movehit
trigger3 = projhit32009 = 1, < 30
trigger3 = stateno = [3600,3604]
trigger4 = stateno = [205,310]
value = 3200

[State ]
type = Changestate
triggerall = !var(59)
triggerall = power >= 2000
triggerall = command = "holddown"
triggerall = command = "y"
triggerall = statetype != A
triggerall = var(12)
trigger1 = ctrl
trigger2 = movehit
trigger3 = projhit32009 = 1, < 30
trigger3 = stateno = [3600,3604]
trigger4 = stateno = [205,310]
value = 4200

[State ]
type = Changestate
triggerall = !var(59)
triggerall = power >= 1000
triggerall = command = "z"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = movehit
trigger3 = projhit32009 = 1, < 30
trigger3 = stateno = [3600,3604]
trigger4 = stateno = [205,310]
value = 3100





[State ]
type = Changestate
triggerall = !var(59)
triggerall = command = "y"
triggerall = command != "holddown" || !var(12)
triggerall = statetype != A
triggerall = var(5)
triggerall = stateno != 3604
trigger1 = ctrl
trigger2 = projcontact32009 = 1, < 30
trigger2 = stateno = [3600,3604]
trigger3 = stateno = 3600 && animelemtime(6) >= 0
trigger4 = stateno = 3601 && animelemtime(7) >= 0
trigger5 = stateno = 3602 && animelemtime(9) >= 0
trigger6 = stateno = 3603 && animelemtime(6) >= 0
value = 3604

[State ]
type = Changestate
triggerall = !var(59)
triggerall = command = "x"
triggerall = statetype != A
triggerall = var(5)
triggerall = stateno != 3603
trigger1 = ctrl
trigger2 = projcontact32009 = 1, < 30
trigger2 = stateno = [3600,3604]
trigger3 = stateno = 3600 && animelemtime(6) >= 0
trigger4 = stateno = 3601 && animelemtime(7) >= 0
trigger5 = stateno = 3602 && animelemtime(9) >= 0
trigger6 = stateno = 3603 && animelemtime(6) >= 0
value = 3603

[State ]
type = Changestate
triggerall = !var(59)
triggerall = command = "c"
triggerall = statetype != A
triggerall = var(5)
triggerall = stateno != 3602
trigger1 = ctrl
trigger2 = projcontact32009 = 1, < 30
trigger2 = stateno = [3600,3604]
trigger3 = stateno = 3600 && animelemtime(6) >= 0
trigger4 = stateno = 3601 && animelemtime(7) >= 0
trigger5 = stateno = 3602 && animelemtime(9) >= 0
trigger6 = stateno = 3603 && animelemtime(6) >= 0
value = 3602

[State ]
type = Changestate
triggerall = !var(59)
triggerall = command = "b"
triggerall = statetype != A
triggerall = var(5)
triggerall = stateno != 3601
trigger1 = ctrl
trigger2 = projcontact32009 = 1, < 30
trigger2 = stateno = [3600,3604]
trigger3 = stateno = 3600 && animelemtime(6) >= 0
trigger4 = stateno = 3601 && animelemtime(7) >= 0
trigger5 = stateno = 3602 && animelemtime(9) >= 0
trigger6 = stateno = 3603 && animelemtime(6) >= 0
value = 3601

[State ]
type = Changestate
triggerall = !var(59)
triggerall = command = "a"
triggerall = statetype != A
triggerall = var(5)
triggerall = stateno != 3600
trigger1 = ctrl
trigger2 = projcontact32009 = 1, < 30
trigger2 = stateno = [3600,3604]
trigger3 = stateno = 3600 && animelemtime(6) >= 0
trigger4 = stateno = 3601 && animelemtime(7) >= 0
trigger5 = stateno = 3602 && animelemtime(9) >= 0
trigger6 = stateno = 3603 && animelemtime(6) >= 0
value = 3600



[State ]
type = Changestate
triggerall = !var(59)
triggerall = command = "y"
triggerall = !var(5)
trigger1 = ctrl
trigger2 = movehit
value = ifelse(statetype = A, 1030, 1080)

[State ]
type = Changestate
triggerall = !var(59)
triggerall = command = "holddown"
triggerall = command = "x"
triggerall = statetype != A
triggerall = !var(5)
trigger1 = ctrl
trigger2 = movehit
trigger3 = stateno = 1000 || stateno = 1001
trigger3 = animelemtime(9) > 0
trigger4 = stateno = 1080
trigger4 = animelemtime(8) > 0
value = 1020

[State ]
type = Changestate
triggerall = !var(59)
triggerall = command = "holdback"
triggerall = command = "x"
triggerall = statetype = A
triggerall = !var(5)
trigger1 = ctrl
trigger2 = movehit
value = 1011

[State ]
type = Changestate
triggerall = !var(59)
triggerall = command = "x"
triggerall = statetype = A
triggerall = !var(5)
trigger1 = ctrl
trigger2 = movehit
value = 1010

[State ]
type = Changestate
triggerall = !var(59)
triggerall = command = "holdback"
triggerall = command = "x"
triggerall = statetype != A
triggerall = !var(5)
trigger1 = ctrl
trigger2 = movehit
value = 1001

[State ]
type = Changestate
triggerall = !var(59)
triggerall = command = "x"
triggerall = statetype != A
triggerall = !var(5)
trigger1 = ctrl
trigger2 = movehit
value = 1000

[State ]
type = Changestate
triggerall = !var(59)
triggerall = command = "a"
triggerall = statetype = C || command = "holddown"
triggerall = !var(5)
trigger1 = ctrl
trigger2 = movehit
value = 310

[State ]
type = Changestate
triggerall = !var(59)
triggerall = command = "holddown"
triggerall = command = "c"
triggerall = statetype != A
triggerall = !var(5)
trigger1 = ctrl
trigger2 = movehit
value = 240

[State ]
type = Changestate
triggerall = !var(59)
triggerall = command = "c"
triggerall = statetype != A
triggerall = !var(5)
trigger1 = ctrl
trigger2 = movehit
value = 215

[State ]
type = Changestate
triggerall = !var(59)
triggerall = command = "b"
triggerall = statetype != A
triggerall = !var(5)
trigger1 = ctrl
trigger2 = movehit
value = 210

[State ]
type = Changestate
triggerall = !var(59)
triggerall = command = "a"
triggerall = statetype != A
triggerall = !var(5)
trigger1 = ctrl
trigger2 = movehit
value = 205

[State ]
type = Changestate
triggerall = !var(59)
triggerall = !var(5)
triggerall = command = "FF"
triggerall = stateno != 100 + 10 * (statetype = A)
trigger1 = ctrl
value = 100 + 10 * (statetype = A)

[State ]
type = Changestate
triggerall = !var(59)
triggerall = !var(5)
triggerall = command = "BB"
triggerall = stateno != 105 + 10 * (statetype = A)
trigger1 = ctrl
value = 105 + 10 * (statetype = A)








;----------------AI部分----------------------

[State ]
type = Changestate
triggerall = var(59) > 0
triggerall = power
triggerall = statetype != A
triggerall = !var(5)
triggerall = !(floor(fvar(9)) & 4)
triggerall = power * 1.0 / powermax >= life * 1.0 / lifemax
triggerall = ctrl
trigger1 = life <= lifemax * 0.3
trigger1 = (power * 0.1)  / (powermax * 0.1) - life / lifemax >= 0.5
trigger1 = enemynear(!enemynear,alive && numenemy > 1),life - life > lifemax * 0.2 || life < lifemax * 0.1
trigger2 = var(13) & 1
trigger2 = fvar(5) = 1 || life < lifemax
trigger2 = power >= powermax * 0.4
trigger3 = var(13) & 8
trigger3 = life <= lifemax * 0.7
trigger4 = life <= lifemax * 0.12
trigger4 = enemy(!enemynear,alive && numenemy > 1),life > life
value = 3500

[State ]
type = Changestate
triggerall = var(59) > 0
triggerall = power
triggerall = statetype != A
triggerall = ctrl
triggerall = var(5) && !var(12)
triggerall = fvar(5) < 9
triggerall = fvar(10) > 1800
trigger1 = var(5) > lifemax * 100 || var(9) > lifemax * 100
trigger1 = floor(fvar(9)) & 2
trigger2 = var(5) > lifemax * 100 || var(9) > lifemax * 100
trigger2 = fvar(10) > 3500 && (abs(gethitvar(damage)) > 2147483640 || abs(gethitvar(fall.damage)) > 2147483640)
trigger3 = var(13) & 16
trigger3 = fvar(10) > 9999
value = 3500

[State ]
type = Changestate
triggerall = var(59) > 0
triggerall = power >= 6500 || (var(11) >= 6500 && var(5))
triggerall = statetype != A
triggerall = p2statetype != L || enemynear,vel y > 0 || var(12)
triggerall = ctrl || movehit > 3 || (stateno = [3600,3603])
triggerall = stateno != [3100,3102]
triggerall = stateno != [3200,3201]
triggerall = stateno != [3400,3401]
triggerall = stateno != [3700,3702]
triggerall = stateno != [3900,3902]
triggerall = stateno != [4200,4201]
triggerall = random % 24 < 1 || !var(12)
trigger1 = p2movetype = H
trigger1 = random % 10 < 2
trigger1 = movehit > 3 || (numtarget && !var(5))
trigger2 = p2movetype = H && life <= lifemax * 0.33
trigger2 = random % 10 < 1 + 2 * (!var(5))
trigger2 = movehit > 3 || (numtarget && !var(5)) || ctrl
trigger3 = var(5) && !var(12)
trigger3 = p2movetype = H || var(5) > lifemax * 2
trigger3 = random % 10 < ifelse(fvar(5) > 8, 2, ifelse(var(5) < lifemax * 4, floor(var(5) / lifemax), 4))
trigger3 = ctrl
trigger4 = projcontact32009 = 1, = 20
trigger4 = stateno =[3600,3603]
trigger4 = p2movetype = H
trigger4 = random % 10 < 2
trigger5 = ctrl || projcontact32009 = 1, = 20
trigger5 = var(5)
trigger5 = life <= lifemax * 0.08
trigger5 = enemynear,life > enemynear,lifemax * 0.6
;trigger5 = power >= 7500
trigger6 = random % 15 < 1
trigger6 = var(12)
trigger7 = !var(12) && var(5)
trigger7 = power >= 8100
trigger7 = var(5) > lifemax * 0.45
trigger7 = ctrl && random % 14 < 1
trigger8 = var(5) && !var(12)
trigger8 = fvar(10) > 3200
trigger8 = random % 10 < floor(fvar(10) / 1500)
value = ifelse(var(12), 3900, 3700)

[State ]
type = Changestate
triggerall = var(59) > 0
triggerall = power >= 4000 || (var(11) >= 4000 && var(5))
triggerall = statetype != A
triggerall = ctrl || movehit || (stateno = [3600,3603]) || (stateno = [205,310])
triggerall = stateno != [3100,3102]
triggerall = stateno != [3200,3201]
triggerall = stateno != [3400,3401]
triggerall = stateno != [3700,3702]
triggerall = stateno != [3900,3902]
triggerall = stateno != [4200,4201]
triggerall = random % 4 < 1 || !var(12)
triggerall = fvar(6)
trigger1 = p2movetype = H && p2statetype = A
trigger1 = random % 10 < 1
trigger1 = movehit > 3
trigger2 = ctrl || movehit || (stateno = [205,310])
trigger2 = p2movetype = A
trigger2 = power >= 6500
trigger2 = random % 10 < 1 + 3 * (!var(5))
trigger3 = p2movetype = H && life < lifemax * 0.3
trigger3 = random % 10 < 1 + 1 * (!var(5))
trigger3 = movehit > 3 
trigger4 = var(5)
trigger4 = random % 10 < 1
trigger4 = p2movetype = H
trigger4 = ctrl
trigger5 = stateno = 3600 && animelemtime(6) >= 0
trigger5 = random % 10 < 1
trigger6 = stateno = 3601 && animelemtime(7) >= 0
trigger6 = random % 10 < 1
trigger7 = stateno = 3602 && animelemtime(9) >= 0
trigger7 = random % 10 < 1
trigger8 = stateno = 3603 && animelemtime(6) >= 0
trigger8 = random % 10 < 1
trigger9 = !sysfvar(4)
trigger9 = projcontact32009 = 1, = 20
trigger9 = stateno =[3600,3603]
trigger9 = p2statetype = A
trigger9 = power >= 8000
trigger9 = random % 10 < 1
value = 3400

[State ]
type = Changestate
triggerall = var(59) > 0
triggerall = power >= 4000 || (var(11) >= 4000 && var(5))
triggerall = ctrl || movehit || (stateno = [3600,3603])
triggerall = stateno != [3100,3102]
triggerall = stateno != [3200,3201]
triggerall = stateno != [3400,3401]
triggerall = stateno != [3700,3702]
triggerall = stateno != [3900,3902]
triggerall = stateno != [4200,4201]
triggerall = stateno != 1020
triggerall = !var(12)
triggerall = fvar(6)
trigger1 = p2movetype = H && p2statetype = A
trigger1 = random % 10 < 1
trigger1 = movehit > 3 
trigger2 = ctrl || movehit
trigger2 = p2movetype = A
trigger2 = power >= 6500
trigger2 = random % 10 < 1 + 3 * (!var(5))
trigger3 = p2movetype = H && life < lifemax * 0.3
trigger3 = random % 10 < 1 + 1 * (!var(5))
trigger3 = movehit > 3 
trigger4 = var(5)
trigger4 = random % 10 < 1
trigger4 = p2movetype = H
trigger4 = ctrl
trigger5 = stateno = 3600 && animelemtime(6) >= 0
trigger5 = random % 10 < 1
trigger6 = stateno = 3601 && animelemtime(7) >= 0
trigger6 = random % 10 < 1
trigger7 = stateno = 3602 && animelemtime(9) >= 0
trigger7 = random % 10 < 1
trigger8 = stateno = 3603 && animelemtime(6) >= 0
trigger8 = random % 10 < 1
trigger9 = !sysfvar(4)
trigger9 = projcontact32009 = 1, = 20
trigger9 = stateno =[3600,3603]
trigger9 = p2statetype = A
trigger9 = power >= 8000
trigger9 = random % 10 < 1
value = 3300

[State ]
type = Changestate
triggerall = var(59) > 0
triggerall = power >= 2000 || (var(11) >= 2000 && var(5))
triggerall = statetype != A
triggerall = p2statetype != L
triggerall = var(12) || p2bodydist x - enemynear,vel x = [-50,200]
triggerall = var(12) || p2bodydist y + enemynear,vel y >= -210
triggerall = ctrl || movehit || (stateno = [3600,3603]) || (stateno = [205,310])
triggerall = stateno != [3100,3102]
triggerall = stateno != [3200,3201]
triggerall = stateno != [3400,3401]
triggerall = stateno != [3700,3702]
triggerall = stateno != [3900,3902]
triggerall = stateno != [4200,4201]
triggerall = random % 3 < 1 || !var(12)
triggerall = fvar(6) > 10 || (var(5) && fvar(6))
trigger1 = p2movetype = H && p2statetype = A
trigger1 = random % 10 < 1
trigger1 = movehit > 3 
trigger2 = ctrl || movehit || (stateno = [205,310])
trigger2 = stateno != 310 || sysvar(3) > 13
trigger2 = p2movetype = A
trigger2 = power >= 5000 || !var(5)
trigger2 = random % 13 < 1 + 3 * (!var(5))
trigger2 = p2bodydist x - enemynear,vel x = [-160,160]
trigger2 = p2bodydist y + enemynear,vel y >= -60
trigger3 = p2movetype = H && life < lifemax * 0.3
trigger3 = random % 10 < 1 + 1 * (!var(5))
trigger3 = movehit > 3
trigger4 = var(5)
trigger4 = random % 10 < 1
trigger4 = p2movetype = H
trigger4 = ctrl
trigger5 = stateno = 3600 && animelemtime(6) >= 0
trigger5 = random % 10 < 1
trigger6 = stateno = 3601 && animelemtime(7) >= 0
trigger6 = random % 10 < 1
trigger7 = stateno = 3602 && animelemtime(9) >= 0
trigger7 = random % 10 < 1
trigger8 = stateno = 3603 && animelemtime(6) >= 0
trigger8 = random % 10 < 1
trigger9 = projcontact32009 = 1, = 20
trigger9 = stateno =[3600,3603]
trigger9 = p2statetype = A
trigger9 = power >= 8000
trigger9 = random % 10 < 1
value = ifelse(var(12), ifelse(random % 4 = 0, 4200, 3200), 3200)

[State ]
type = Changestate
triggerall = var(59) > 0
triggerall = power >= 1000 || (var(11) >= 1000 && var(5))
triggerall = statetype != A
triggerall = p2statetype != L
triggerall = ctrl || movehit || (stateno = [3600,3603]) || (stateno = [205,310])
triggerall = p2bodydist y + enemynear,vel y >= -210
triggerall = stateno != [3100,3102]
triggerall = stateno != [3200,3201]
triggerall = stateno != [3400,3401]
triggerall = stateno != [3700,3702]
triggerall = stateno != [3900,3902]
triggerall = stateno != [4200,4201]
triggerall = random % 4 < 1 || !var(12)
triggerall = fvar(6) > 10 || (var(5) && fvar(6))
trigger1 = p2movetype = H && p2statetype = A
trigger1 = random % 10 < 1
trigger1 = movehit > 3
trigger2 = ctrl || movehit || (stateno = [205,310])
trigger2 = stateno != 310 || sysvar(3) > 13
trigger2 = p2movetype = A
trigger2 = power >= 5000 || !var(5)
trigger2 = random % 10 < 1 + 3 * (!var(5))
trigger2 = p2bodydist x - enemynear,vel x = [-160,160]
trigger2 = p2bodydist y + enemynear,vel y >= -60
trigger3 = p2movetype = H && life < lifemax * 0.3
trigger3 = random % 10 < 1 + 1 * (!var(5))
trigger3 = movehit > 3 
trigger4 = var(5)
trigger4 = random % 10 < 1
trigger4 = p2movetype = H
trigger4 = ctrl
trigger5 = stateno = 3600 && animelemtime(6) >= 0
trigger5 = random % 10 < 1
trigger6 = stateno = 3601 && animelemtime(7) >= 0
trigger6 = random % 10 < 1
trigger7 = stateno = 3602 && animelemtime(9) >= 0
trigger7 = random % 10 < 1
trigger8 = stateno = 3603 && animelemtime(6) >= 0
trigger8 = random % 10 < 1
trigger9 = projcontact32009 = 1, = 20
trigger9 = stateno =[3600,3603]
trigger9 = p2statetype = A
trigger9 = power >= 8000
trigger9 = random % 10 < 1
value = 3100

[State ]
type = Changestate
triggerall = var(59) > 0
triggerall = !var(5)
triggerall = p2statetype != L
triggerall = statetype = A
triggerall = ctrl
triggerall = prevstateno = 1030
trigger1 = p2movetype = A
trigger1 = life <= lifemax * 0.5
trigger2 = p2stateno > 2000
trigger2 = p2movetype = A
trigger2 = life < lifemax * 0.8
value = 1011

[State ]
type = Changestate
triggerall = var(59) > 0
triggerall = !var(5)
triggerall = p2statetype != L
triggerall = statetype = A
triggerall = ctrl
triggerall = prevstateno = 1010
trigger1 = p2movetype = H && p2statetype = A
trigger2 = numhelper(16026)
value = 1030

[State ]
type = Changestate
triggerall = var(59) > 0
triggerall = !var(5)
triggerall = p2statetype != L
triggerall = statetype = A
triggerall = stateno = 1020
triggerall = anim = 1022
triggerall = animelemtime(1) > 2
triggerall = ctrl
trigger1 = p2bodydist x - enemynear,vel x = [-30,200]
trigger1 = p2bodydist y + enemynear,vel y = [-60,40]
trigger1 = p2movetype = H && p2statetype = A
trigger2 = numhelper(16026)
value = 1010

[State ]
type = Changestate
triggerall = var(59) > 0
triggerall = statetype != A
triggerall = !var(5)
triggerall = p2statetype != L
trigger1 = p2bodydist x - enemynear,vel x = [-120,80]
trigger1 = p2bodydist y + enemynear,vel y < -50
trigger1 = stateno = 1000 || stateno = 1001
trigger1 = animelemtime(9) > 0
trigger1 = p2movetype = H && p2statetype = A
trigger1 = prevstateno >= 200
trigger1 = random % 10 < 3 + 2 * (!fvar(6) || p2movetype != H)
trigger2 = p2bodydist x - enemynear,vel x = [-180,220]
trigger2 = stateno = 1080
trigger2 = animelemtime(8) > 2
trigger2 = p2movetype != H && numhelper(16026)
value = 1020


[State ]
type = Changestate
triggerall = var(59) > 0
triggerall = statetype != A
triggerall = var(5)
triggerall = stateno != 3604
triggerall = p2bodydist y + enemynear,vel y >= -180
triggerall = stateno != [3200,3201]
triggerall = stateno != [3400,3401]
triggerall = stateno != [3700,3702]
triggerall = stateno != [3900,3902]
trigger1 = ctrl
trigger1 = p2movetype != H || p2stateno != [5000,5150]
trigger1 = random % 10 < 4
trigger1 = p2bodydist x - enemynear,vel x > 100
trigger2 = p2bodydist x - enemynear,vel x >= 100
trigger2 = projcontact32009 = 1, = 20
trigger2 = stateno = [3600,3604]
trigger2 = random % 10 < 2
trigger3 = stateno = [3600,3604]
trigger3 = ctrl || projcontact32009 = 1, = 20
trigger3 = p2movetype = A
trigger3 = random % 10 < 1
trigger3 = p2bodydist x - enemynear,vel x >= 100
trigger4 = stateno = 3600 && animelemtime(6) >= 0
trigger4 = random % 10 < 1
trigger5 = stateno = 3601 && animelemtime(7) >= 0
trigger5 = random % 10 < 1
trigger6 = stateno = 3602 && animelemtime(9) >= 0
trigger6 = random % 10 < 1
trigger7 = stateno = 3603 && animelemtime(6) >= 0
trigger7 = random % 10 < 1
value = 3604

[State ]
type = Changestate
triggerall = var(59) > 0
triggerall = statetype != A
triggerall = var(5)
triggerall = stateno != 3603
triggerall = p2bodydist x - enemynear,vel x = [-50,200]
triggerall = p2bodydist y + enemynear,vel y >= -180
triggerall = fvar(6)
triggerall = stateno != [3200,3201]
triggerall = stateno != [3400,3401]
triggerall = stateno != [3700,3702]
triggerall = stateno != [3900,3902]
trigger1 = ctrl
trigger1 = p2movetype != H || p2stateno != [5000,5150]
trigger1 = random % 10 < 4
trigger2 = projcontact32009 = 1, = 20
trigger2 = stateno = [3600,3603]
trigger2 = random % 10 < 4
trigger3 = stateno = [3600,3603]
trigger3 = ctrl || projcontact32009 = 1, = 20
trigger3 = p2movetype = A
trigger3 = random % 10 < 4
trigger4 = stateno = 3600 && animelemtime(6) >= 0
trigger4 = random % 10 < 2
trigger5 = stateno = 3601 && animelemtime(7) >= 0
trigger5 = random % 10 < 2
trigger6 = stateno = 3602 && animelemtime(9) >= 0
trigger6 = random % 10 < 2
trigger7 = stateno = 3603 && animelemtime(6) >= 0
trigger7 = random % 10 < 2
value = 3603

[State ]
type = Changestate
triggerall = var(59) > 0
triggerall = statetype != A
triggerall = var(5)
triggerall = stateno != 3602
triggerall = p2bodydist x - enemynear,vel x = [-50,200]
triggerall = p2bodydist y + enemynear,vel y >= -180
triggerall = fvar(6)
triggerall = stateno != [3200,3201]
triggerall = stateno != [3400,3401]
triggerall = stateno != [3700,3702]
triggerall = stateno != [3900,3902]
trigger1 = ctrl
trigger1 = p2movetype != H || p2stateno != [5000,5150]
trigger1 = random % 10 < 4
trigger2 = projcontact32009 = 1, = 20
trigger2 = stateno = [3600,3603]
trigger2 = random % 10 < 4
trigger3 = stateno = [3600,3603]
trigger3 = ctrl || projcontact32009 = 1, = 20
trigger3 = p2movetype = A
trigger3 = random % 10 < 4
trigger4 = stateno = 3600 && animelemtime(6) >= 0
trigger4 = random % 10 < 2
trigger5 = stateno = 3601 && animelemtime(7) >= 0
trigger5 = random % 10 < 2
trigger6 = stateno = 3602 && animelemtime(9) >= 0
trigger6 = random % 10 < 2
trigger7 = 0;stateno = 3603 && animelemtime(6) >= 0
trigger7 = random % 10 < 2
value = 3602

[State ]
type = Changestate
triggerall = var(59) > 0
triggerall = statetype != A
triggerall = var(5)
triggerall = stateno != 3601
triggerall = p2bodydist x - enemynear,vel x = [-50,200]
triggerall = p2bodydist y + enemynear,vel y >= -180
triggerall = fvar(6)
triggerall = stateno != [3200,3201]
triggerall = stateno != [3400,3401]
triggerall = stateno != [3700,3702]
triggerall = stateno != [3900,3902]
trigger1 = ctrl
trigger1 = p2movetype != H || p2stateno != [5000,5150]
trigger1 = random % 10 < 4
trigger2 = projcontact32009 = 1, = 20
trigger2 = stateno = [3600,3603]
trigger2 = random % 10 < 4 || stateno = 3600
trigger3 = stateno = [3600,3603]
trigger3 = ctrl || projcontact32009 = 1, = 20
trigger3 = p2movetype = A
trigger3 = random % 10 < 4
trigger4 = stateno = 3600 && animelemtime(6) >= 0
trigger4 = random % 10 < 2 || stateno = 3600
trigger5 = stateno = 3601 && animelemtime(7) >= 0
trigger5 = random % 10 < 2
trigger6 = stateno = 3602 && animelemtime(9) >= 0
trigger6 = random % 10 < 2
trigger7 = 0;stateno = 3603 && animelemtime(6) >= 0
trigger7 = random % 10 < 2
value = 3601

[State ]
type = Changestate
triggerall = var(59) > 0
triggerall = statetype != A
triggerall = var(5)
triggerall = stateno != 3600
triggerall = p2bodydist x - enemynear,vel x = [-50,200]
triggerall = p2bodydist y + enemynear,vel y >= -180
triggerall = fvar(6)
triggerall = stateno != [3200,3201]
triggerall = stateno != [3400,3401]
triggerall = stateno != [3700,3702]
triggerall = stateno != [3900,3902]
trigger1 = ctrl
trigger1 = p2movetype != H || p2stateno != [5000,5150]
trigger2 = projcontact32009 = 1, = 20
trigger2 = stateno = [3600,3603]
trigger3 = stateno = [3600,3603]
trigger3 = ctrl || projcontact32009 = 1, = 20
trigger3 = p2movetype = A
trigger4 = stateno = 3600 && animelemtime(6) >= 0
trigger4 = random % 10 < 2
trigger5 = stateno = 3601 && animelemtime(7) >= 0
trigger5 = random % 10 < 2
trigger6 = stateno = 3602 && animelemtime(9) >= 0
trigger6 = random % 10 < 2
trigger7 = 0;stateno = 3603 && animelemtime(6) >= 0
trigger7 = random % 10 < 2
value = 3600


[State ]
type = Changestate
triggerall = var(59) > 0
triggerall = statetype != A
triggerall = !var(5)
triggerall = p2statetype != L
triggerall = p2bodydist x - enemynear,vel x = [-10,80]
triggerall = p2bodydist y + enemynear,vel y >= -120
triggerall = fvar(6); || random % 20 = 0
triggerall = stateno != [3200,3201]
triggerall = stateno != [3400,3401]
triggerall = stateno != [3700,3702]
trigger1 = 0
trigger2 = !inguarddist
trigger2 = movehit > 3
trigger2 = stateno != 310
trigger2 = random % 11 < 4 + (2 * p2statetype != A)
trigger3 = p2statetype = A || enemynear(!enemynear,alive && numenemy > 1),statetype = A
trigger3 = p2movetype != H || enemynear,vel y > 0
trigger3 = enemynear,vel x = 0 || (p2movetype = H && p2bodydist x - enemynear,vel x < 75)
trigger3 = p2bodydist y + enemynear,vel y = [-110,-50]
trigger3 = random % 11 < 8
trigger3 = ctrl
value = 310

[State ]
type = Changestate
triggerall = var(59) > 0
triggerall = statetype != A
triggerall = !var(5)
triggerall = !inguarddist
triggerall = p2bodydist x - enemynear,vel x = [-10,75]
triggerall = p2bodydist y + enemynear,vel y >= -70
triggerall = fvar(6); || random % 20 = 0
triggerall = stateno != [3200,3201]
triggerall = stateno != [3400,3401]
triggerall = stateno != [3700,3702]
trigger1 = ctrl || movehit
trigger1 = p2movetype = H
trigger1 = p2statetype = L
trigger1 = p2stateno != 5120
trigger1 = prevstateno = 100 || (enemynear,time < 5 && p2stateno = [5000,5110])
trigger2 = movehit > 3
trigger2 = stateno != 240
trigger2 = random % 11 < 3 + (2 * p2statetype = L)
trigger2 = p2stateno != 5120
value = 240

[State ]
type = Changestate
triggerall = var(59) > 0
triggerall = statetype != A
triggerall = p2statetype != L
triggerall = !var(5)
triggerall = !inguarddist && p2movetype != A
triggerall = p2bodydist x - enemynear,vel x = [-10,80]
triggerall = p2bodydist y + enemynear,vel y >= -70
triggerall = p2statetype != A || enemynear,vel y < 4
triggerall = fvar(6); || random % 20 = 0
triggerall = stateno != [3200,3201]
triggerall = stateno != [3400,3401]
triggerall = stateno != [3700,3702]
trigger1 = ctrl && random % 10 < 2
trigger2 = movehit > 3
trigger2 = stateno != 215
trigger2 = random % 11 < 5
value = 215

[State ]
type = Changestate
triggerall = var(59) > 0
triggerall = statetype != A
triggerall = p2statetype != L
triggerall = !var(5)
triggerall = !inguarddist && p2movetype != A
triggerall = p2bodydist x - enemynear,vel x = [-10,80]
triggerall = p2bodydist y + enemynear,vel y >= -60
triggerall = fvar(6); || random % 20 = 0
triggerall = stateno != [3200,3201]
triggerall = stateno != [3400,3401]
triggerall = stateno != [3700,3702]
trigger1 = ctrl && random % 10 < 1
trigger2 = movehit > 3
trigger2 = stateno != 210
trigger2 = random % 11 < 5 || p2bodydist x - enemynear,vel x > 50
value = 210

[State ]
type = Changestate
triggerall = var(59) > 0
triggerall = statetype != A
triggerall = p2statetype != L
triggerall = !var(5)
triggerall = !inguarddist && p2movetype != A
triggerall = p2bodydist x - enemynear,vel x = [-10,65]
triggerall = p2bodydist y + enemynear,vel y >= -100
triggerall = fvar(6); || random % 20 = 0
triggerall = stateno != [3200,3201]
triggerall = stateno != [3400,3401]
triggerall = stateno != [3700,3702]
trigger1 = ctrl && p2statetype = A
trigger1 = p2movetype = H && enemynear,vel y > 0
trigger1 = p2bodydist y + enemynear,vel y < -40
trigger1 = random % 10 < 4
trigger2 = stateno != 205
trigger2 = movehit > 3
trigger2 = random % 10 < 8
value = 205

[State ]
type = Changestate
triggerall = var(59) > 0
triggerall = !var(5)
triggerall = statetype != A
triggerall = ctrl
trigger1 = p2bodydist x - enemynear,vel x >= 50
trigger1 = ctrl && p2movetype != H
trigger1 = p2statetype != L
trigger1 = random % 10 < 3
trigger2 = p2bodydist x - enemynear,vel x >= 30
trigger2 = p2statetype = L
trigger2 = p2stateno = [5110,5120]
trigger2 = enemynear,time < 4
trigger2 = random % 11 < 3
value = 1080

[State ]
type = Changestate
triggerall = var(59) > 0
triggerall = statetype != A
triggerall = !var(5)
triggerall = p2bodydist x - enemynear,vel x >= -10
triggerall = p2bodydist x - enemynear,vel x <= 180
triggerall = p2bodydist y + enemynear,vel y >= -80
triggerall = stateno != [3200,3201]
triggerall = stateno != [3400,3401]
triggerall = stateno != [3700,3702]
trigger1 = ctrl && p2movetype != H
trigger1 = p2statetype != L
trigger1 = random % 10 < 5
trigger2 = stateno != 1000
trigger2 = movehit > 3
trigger2 = p2movetype = H
trigger2 = p2statetype = A
trigger2 = random % 10 < 5
trigger3 = p2movetype = A
trigger3 = ctrl || movehit
trigger3 = random % 10 < 6
value = 1000

[State ]
type = ChangeState
triggerall = var(59) > 0
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = stateno != 105
;triggerall = abs(pos x) < 120
triggerall = !var(5)
trigger1 = p2bodydist x - enemynear,vel x = [-10,80]
trigger1 = p2bodydist y + enemynear,vel y >= 0
trigger1 = p2movetype = H && p2stateno = [5110,5120]
trigger1 = p2statetype = L
trigger1 = ctrl
value = ifelse(abs(pos x) < 120, 105, 100)

[State ]
type = ChangeState
triggerall = var(59) > 0
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = stateno != 100
triggerall = !var(5)
triggerall = ctrl
trigger1 = p2bodydist x - enemynear,vel x > 50
trigger1 = p2bodydist y + enemynear,vel y < -40
trigger1 = p2movetype = H
trigger2 = p2bodydist x - enemynear,vel x > 200
trigger2 = p2bodydist y + enemynear,vel y >= -40
trigger2 = p2movetype = I
value = 100
ctrl = 0

[State ]
type = ChangeState
triggerall = var(59) > 0
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = stateno != 20
triggerall = stateno != [100,105]
triggerall = var(5)
triggerall = ctrl
trigger1 = p2bodydist x - enemynear,vel x > 50
trigger1 = p2movetype = H
value = 20
ctrl = 1

[State ]
type = ChangeState
triggerall = var(59) > 0
triggerall = alive
triggerall = vel y > -1
triggerall = canrecover
triggerall = stateno = 5050
trigger1 = (p2movetype = A && enemynear,ctrl = 0 && enemynear,time = 0) || p2movetype = H || p2statetype = L
value = 5210

[State 蹲防]
type = ChangeState
value = 131
triggerall = !ishelper
triggerall = var(59) > 0
triggerall = roundstate = 2
triggerall = !var(5)
triggerall = statetype != A
triggerall = enemynear,statetype = C
triggerall = ctrl
triggerall = stateno < 1000
trigger1 = inguarddist
trigger2 = p2bodydist x < 0 && p2movetype = A

[State 站防]
type = ChangeState
value = 130
triggerall = !ishelper
triggerall = var(59) > 0 
triggerall = roundstate = 2
triggerall = !var(5)
triggerall = statetype != A
triggerall = ctrl && enemynear,statetype != C
triggerall = stateno < 1000
trigger1 = inguarddist
trigger2 = p2bodydist x < 0 && p2movetype = A

[State 空防]
type = ChangeState
value = 132
triggerall = !ishelper
triggerall = var(59) > 0 
triggerall = roundstate = 2
triggerall = !var(5)
triggerall = statetype = A
triggerall = ctrl 
triggerall = stateno < 1000
trigger1 = inguarddist
trigger2 = p2bodydist x < 0 && p2movetype = A
trigger2 = prevstateno != 1030

[State ]
type = Changestate
triggerall = var(59)
triggerall = !var(5)
trigger1 = stateno = 20
value = ifelse(pos y < 0, 52, 0)
ctrl = 1

[State ]
type = Changestate
triggerall = var(59)
trigger1 = stateno = 10
value = ifelse(pos y < 0, 52, 0)
ctrl = 1

[State ]
type = Changestate
triggerall = var(59)
trigger1 = roundstate < 3
trigger1 = stateno = 120
value = ifelse(pos y < 0, ifelse(sysvar(4) >= 1000, sysvar(4), 52), 0)
ctrl = 1

[State 禁止跳跃]
type = Changestate
triggerall = var(59)
trigger1 = stateno = 40
value = ifelse(pos y < 0, 52, 0)
ctrl = 1