;---------------------------;
;    Dragon Claw by Reu     ;
; http://www.reubenkee.com/ ;
;---------------------------;

[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 = "QCF_QCF_x"
command = ~D, DF, F, D, DF, x
time = 30
[Command]
name = "QCF_QCF_y"
command = ~D, DF, F, D, DF, y
time = 30
[Command]
name = "QCF_QCF_z"
command = ~D, DF, F, D, DF, z
time = 30

[Command]
name = "QCF_QCF_x"
command = ~D, DF, F, D, DF, ~x
time = 30
[Command]
name = "QCF_QCF_y"
command = ~D, DF, F, D, DF, ~y
time = 30
[Command]
name = "QCF_QCF_z"
command = ~D, DF, F, D, DF, ~z
time = 30

[Command]
name = "QCF_QCF_a"
command = ~D, DF, F, D, DF, a
time = 30
[Command]
name = "QCF_QCF_b"
command = ~D, DF, F, D, DF, b
time = 30
[Command]
name = "QCF_QCF_c"
command = ~D, DF, F, D, DF, c
time = 30

[Command]
name = "QCF_QCF_a"
command = ~D, DF, F, D, DF, ~a
time = 30
[Command]
name = "QCF_QCF_b"
command = ~D, DF, F, D, DF, ~b
time = 30
[Command]
name = "QCF_QCF_c"
command = ~D, DF, F, D, DF, ~c
time = 30

[Command]
name = "QCB_QCB_x"
command = ~D, DB, B, D, DB, x
time = 30
[Command]
name = "QCB_QCB_y"
command = ~D, DB, B, D, DB, y
time = 30
[Command]
name = "QCB_QCB_z"
command = ~D, DB, B, D, DB, z
time = 30

[Command]
name = "QCB_QCB_x"
command = ~D, DB, B, D, DB, ~x
time = 30
[Command]
name = "QCB_QCB_y"
command = ~D, DB, B, D, DB, ~y
time = 30
[Command]
name = "QCB_QCB_z"
command = ~D, DB, B, D, DB, ~z
time = 30

[Command]
name = "QCB_QCB_a"
command = ~D, DB, B, D, DB, a
time = 30
[Command]
name = "QCB_QCB_b"
command = ~D, DB, B, D, DB, b
time = 30
[Command]
name = "QCB_QCB_c"
command = ~D, DB, B, D, DB, c
time = 30

[Command]
name = "QCB_QCB_a"
command = ~D, DB, B, D, DB, ~a
time = 30
[Command]
name = "QCB_QCB_b"
command = ~D, DB, B, D, DB, ~b
time = 30
[Command]
name = "QCB_QCB_c"
command = ~D, DB, B, D, DB, ~c
time = 30

[Command]
name = "DP_x"
command = ~F, D, DF, x
time = 18
[Command]
name = "DP_y"
command = ~F, D, DF, y
time = 18
[Command]
name = "DP_z"
command = ~F, D, DF, z
time = 18

[Command]
name = "DP_x"
command = ~F, D, DF, ~x
time = 18
[Command]
name = "DP_y"
command = ~F, D, DF, ~y
time = 18
[Command]
name = "DP_z"
command = ~F, D, DF, ~z
time = 18

[Command]
name = "QCF_x"
command = ~D, DF, F, x
time = 12
[Command]
name = "QCF_y"
command = ~D, DF, F, y
time = 12
[Command]
name = "QCF_z"
command = ~D, DF, F, z
time = 12

[Command]
name = "QCF_x"
command = ~D, DF, F, ~x
time = 12
[Command]
name = "QCF_y"
command = ~D, DF, F, ~y
time = 12
[Command]
name = "QCF_z"
command = ~D, DF, F, ~z
time = 12

[Command]
name = "QCF_kk"
command = ~D, DF, F, a+b
time = 12
[Command]
name = "QCF_kk"
command = ~D, DF, F, a+c
time = 12
[Command]
name = "QCF_kk"
command = ~D, DF, F, b+c
time = 12

[Command]
name = "QCF_a"
command = ~D, DF, F, a
time = 12
[Command]
name = "QCF_b"
command = ~D, DF, F, b
time = 12
[Command]
name = "QCF_c"
command = ~D, DF, F, c
time = 12

[Command]
name = "QCF_a"
command = ~D, DF, F, ~a
time = 12
[Command]
name = "QCF_b"
command = ~D, DF, F, ~b
time = 12
[Command]
name = "QCF_c"
command = ~D, DF, F, ~c
time = 12

[Command]
name = "QCB_a"
command = ~D, DB, B, a
time = 12
[Command]
name = "QCB_b"
command = ~D, DB, B, b
time = 12
[Command]
name = "QCB_c"
command = ~D, DB, B, c
time = 12

[Command]
name = "QCB_a"
command = ~D, DB, B, ~a
time = 12
[Command]
name = "QCB_b"
command = ~D, DB, B, ~b
time = 12
[Command]
name = "QCB_c"
command = ~D, DB, B, ~c
time = 12

[Command]
name = "QCB_x"
command = ~D, DB, B, x
time = 12
[Command]
name = "QCB_y"
command = ~D, DB, B, y
time = 12
[Command]
name = "QCB_z"
command = ~D, DB, B, z
time = 12

[Command]
name = "QCB_x"
command = ~D, DB, B, ~x
time = 12
[Command]
name = "QCB_y"
command = ~D, DB, B, ~y
time = 12
[Command]
name = "QCB_z"
command = ~D, DB, B, ~z
time = 12

[Command]
name = "FF"
command = F, F
time = 10

[Command]
name = "BB"
command = B, B
time = 10

[Command]
name = "recovery"
command = a+x
time = 1
[Command]
name = "recovery"
command = x+y
time = 1
[Command]
name = "recovery"
command = x+z
time = 1
[Command]
name = "recovery"
command = y+z
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="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

[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

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

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

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

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

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

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

[Command]
name = "high_jump"
command = $D, $U
time = 15


;============================================ HUMAN ===========================================

[Statedef -1]

[State -1, Heaven's Sword]
type = ChangeState
value = 3000
triggerall = !AILevel
triggerall = power >= 1000 && movecontact > 0
triggerall = command = "QCF_QCF_a" || command = "QCF_QCF_b" || command = "QCF_QCF_c"
triggerall = statetype != A
trigger1 = stateno = 2300 && animelemNo(0) >= 26 
trigger2 = stateno = 2310 && animelemNo(0) >= 26 
trigger3 = stateno = 2315 && animelemNo(0) >= 26 
trigger4 = stateno = 2325 && animelemNo(0) >= 26 

[State -1, Heaven's Sword]
type = ChangeState
value = 3002
triggerall = !AILevel
triggerall = power >= 1000
triggerall = command = "QCF_QCF_a" || command = "QCF_QCF_b" || command = "QCF_QCF_c"
triggerall = statetype = A
trigger1 = stateno = 1201 && frontedgedist < 8
trigger2 = stateno = 1211 && frontedgedist < 8
trigger3 = stateno = 1221 && frontedgedist < 8
trigger4 = stateno = 3301 && frontedgedist < 8
trigger5 = stateno = 3302 && frontedgedist < 8
trigger6 = stateno = 3121 && frontedgedist < 8
trigger7 = stateno = 50 && frontedgedist < 8
trigger8 = stateno = 46 && frontedgedist < 8

[State -1, Heaven's Sword]
type = ChangeState
value = 3002
triggerall = !AILevel
triggerall = power >= 1000
triggerall = command = "QCB_QCB_a" || command = "QCB_QCB_b" || command = "QCB_QCB_c"
triggerall = statetype = A
trigger1 = stateno = 50 && backedgedist < 8
trigger2 = stateno = 46 && backedgedist < 8

[State -1, Heaven's Sword]
type = ChangeState
value = 3000
triggerall = !AILevel
triggerall = power >= 1000
triggerall = command = "QCB_QCB_a" || command = "QCB_QCB_b" || command = "QCB_QCB_c"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 200 && (animelemNo(0) >= 3 || prevstateno = 4999)
trigger3 = stateno = 205 && (animelemNo(0) >= 9 || prevstateno = 4999)
trigger4 = stateno = 206 && (animelemNo(0) >= 14 || prevstateno = 4999)
trigger5 = stateno = 207 && (animelemNo(0) >= 11 || prevstateno = 4999)
trigger6 = stateno = 210 && (animelemNo(0) >= 17 || prevstateno = 4999)
trigger7 = stateno = 211 && (animelemNo(0) >= 10 || prevstateno = 4999)
trigger8 = numtarget
trigger8 = stateno = 3004 && target, movetype = H
trigger9 = stateno = 3430 && animelemNo(0) >= 2
trigger10 = stateno = 415 && animelemNo(0) >= 10

[State -1, Full Moon Slash]
type = ChangeState
value = 3100
triggerall = !AILevel
triggerall = power >= 1000 && movecontact > 0
triggerall = command = "QCB_QCB_x" || command = "QCB_QCB_y" || command = "QCB_QCB_z"
trigger1 = stateno = 2300 && animelemNo(0) >= 26 
trigger2 = stateno = 2310 && animelemNo(0) >= 26 
trigger3 = stateno = 2315 && animelemNo(0) >= 26 
trigger4 = stateno = 2325 && animelemNo(0) >= 26 

[State -1, Full Moon Slash]
type = ChangeState
value = 3100
triggerall = !AILevel
triggerall = power >= 1000
triggerall = command = "QCF_QCF_x" || command = "QCF_QCF_y" || command = "QCF_QCF_z"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 200 && (animelemNo(0) >= 3 || prevstateno = 4999)
trigger3 = stateno = 205 && (animelemNo(0) >= 9 || prevstateno = 4999)
trigger4 = stateno = 206 && (animelemNo(0) >= 14 || prevstateno = 4999)
trigger5 = stateno = 207 && (animelemNo(0) >= 11 || prevstateno = 4999)
trigger6 = stateno = 210 && (animelemNo(0) >= 17 || prevstateno = 4999)
trigger7 = stateno = 211 && (animelemNo(0) >= 10 || prevstateno = 4999)
trigger8 = stateno = 3430 && animelemNo(0) >= 2

[State -1, Flash Burst]
type = ChangeState
value = 3400
triggerall = !AILevel
triggerall = power >= 1000
triggerall = command = "QCB_QCB_x" || command = "QCB_QCB_y" || command = "QCB_QCB_z"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 200 && (animelemNo(0) >= 3 || prevstateno = 4999)
trigger3 = stateno = 205 && (animelemNo(0) >= 9 || prevstateno = 4999)
trigger4 = stateno = 206 && (animelemNo(0) >= 14 || prevstateno = 4999)
trigger5 = stateno = 207 && (animelemNo(0) >= 11 || prevstateno = 4999)
trigger6 = stateno = 210 && (animelemNo(0) >= 17 || prevstateno = 4999)
trigger7 = stateno = 211 && (animelemNo(0) >= 10 || prevstateno = 4999)
trigger8 = stateno = 2300 && animelemNo(0) >= 26 
trigger9 = stateno = 2310 && animelemNo(0) >= 26 
trigger10 = stateno = 2315 && animelemNo(0) >= 26 
trigger11 = stateno = 2325 && animelemNo(0) >= 26 
trigger12 = numtarget
trigger12 = stateno = 3004 && target, movetype = H

[State -1, Sun Cry]
type = ChangeState
value = 3300
triggerall = !AILevel
triggerall = power >= 1000
triggerall = command = "QCF_QCF_x" || command = "QCF_QCF_y" || command = "QCF_QCF_z" || command = "QCB_QCB_x" || command = "QCB_QCB_y" || command = "QCB_QCB_z"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = (stateno = [200, 699]) && movecontact >= 1
trigger3 = stateno = 1101 || stateno = 1111 || stateno = 1121 || stateno = 1201 || stateno = 1211 || stateno = 1221
trigger3 = movecontact > 0
trigger4 = stateno = 3006 && movecontact > 0
trigger5 = stateno = 3121
trigger5 = movecontact > 0

[State -1, High Jump]
type = ChangeState
value = 45
triggerall = !AILevel
triggerall = command = "high_jump"
triggerall = StateType != A
trigger1 = ctrl = 1

[State -1, Sun Blast]
type = ChangeState
value = ifelse(command = "QCF_z", 1220, ifelse(command = "QCF_y", 1210, 1200))
triggerall = !AILevel
triggerall = command = "QCF_x" || command = "QCF_y" || command = "QCF_z"
triggerall = var(11) < 2
triggerall = statetype = A
trigger1 = ctrl
trigger2 = (stateno = [200, 699]) && movecontact >= 1

[State -1, Sun Blast]
type = ChangeState
value = ifelse(command = "QCB_z", 1220, ifelse(command = "QCB_y", 1210, 1200))
triggerall = !AILevel
triggerall = command = "QCB_x" || command = "QCB_y" || command = "QCB_z"
triggerall = var(11) < 2
triggerall = statetype = A
trigger1 = ctrl
trigger2 = (stateno = [200, 699]) && movecontact >= 1

[State -1, Homing Flight]
type = ChangeState
value = ifelse(command = "QCB_c", 1020, ifelse(command = "QCB_b", 1010, 1000))
triggerall = !AILevel
triggerall = command = "QCB_a" || command = "QCB_b" || command = "QCB_c"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200, 699]) && movecontact >= 1
trigger2 = stateno != 252

[State -1, Homing Flight]
type = ChangeState
value = ifelse(command = "QCB_c", 1022, ifelse(command = "QCB_b", 1012, 1002))
triggerall = !AILevel
triggerall = command = "QCB_a" || command = "QCB_b" || command = "QCB_c"
triggerall = statetype = A
trigger1 = stateno = 50 && backedgedist < 8
trigger2 = stateno = 46 && backedgedist < 8

[State -1, Homing Flight]
type = ChangeState
value = ifelse(command = "QCF_c", 1022, ifelse(command = "QCF_b", 1012, 1002))
triggerall = !AILevel
triggerall = command = "QCF_a" || command = "QCF_b" || command = "QCF_c"
triggerall = statetype = A
trigger1 = stateno = 50 && frontedgedist < 8
trigger2 = stateno = 46 && frontedgedist < 8

[State -1, Counter Blow]
type = ChangeState
value = ifelse(command = "QCF_kk", 1320, ifelse(command = "QCF_c", 1310, ifelse(command = "QCF_b", 1330, 1300)))
value = 1320
triggerall = !AILevel
triggerall = command = "QCF_a" || command = "QCF_b" || command = "QCF_c" || command = "QCF_kk"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200, 699]) && movecontact >= 1

[State -1, Flash Step]
type = ChangeState
value = ifelse(command = "QCB_z", 2315, ifelse(command = "QCB_y", 2310, 2300))
triggerall = !AILevel
triggerall = command = "QCB_x" || command = "QCB_y" || command = "QCB_z"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 200 && (animelemNo(0) >= 3 || prevstateno = 4999)
trigger3 = stateno = 205 && (animelemNo(0) >= 9 || prevstateno = 4999)
trigger4 = stateno = 206 && (animelemNo(0) >= 14 || prevstateno = 4999)
trigger5 = stateno = 207 && (animelemNo(0) >= 11 || prevstateno = 4999)
trigger6 = stateno = 210 && (animelemNo(0) >= 17 || prevstateno = 4999)
trigger7 = stateno = 211 && (animelemNo(0) >= 10 || prevstateno = 4999)
trigger8 = (stateno = [400, 499]) && movecontact >= 1
trigger9 = stateno = 400 && (animelemNo(0) >= 5 || prevstateno = 4999)
trigger10 = stateno = 430 && (animelemNo(0) >= 6 || prevstateno = 4999)
trigger11 = stateno = 410 && (animelemNo(0) >= 11 || prevstateno = 4999)
trigger12 = stateno = 440 && (animelemNo(0) >= 9 || prevstateno = 4999)
trigger13 = stateno = 415 && (animelemNo(0) >= 12 || prevstateno = 4999)
trigger14 = stateno = 450 && (animelemNo(0) >= 7 || prevstateno = 4999)

[State -1, Crescent Moon Slash]
type = ChangeState
value = ifelse(command = "DP_z", 1120, ifelse(command = "DP_y", 1110, 1100))
triggerall = !AILevel
triggerall = command = "DP_x" || command = "DP_y" || command = "DP_z"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 200 && (animelemNo(0) >= 3 || prevstateno = 4999)
trigger3 = stateno = 205 && (animelemNo(0) >= 9 || prevstateno = 4999)
trigger4 = stateno = 206 && (animelemNo(0) >= 14 || prevstateno = 4999)
trigger5 = stateno = 207 && (animelemNo(0) >= 11 || prevstateno = 4999)
trigger6 = stateno = 210 && (animelemNo(0) >= 17 || prevstateno = 4999)
trigger7 = stateno = 211 && (animelemNo(0) >= 10 || prevstateno = 4999)
trigger8 = (stateno = [400, 499]) && movecontact >= 1
trigger9 = stateno = 400 && (animelemNo(0) >= 5 || prevstateno = 4999)
trigger10 = stateno = 430 && (animelemNo(0) >= 6 || prevstateno = 4999)
trigger11 = stateno = 410 && (animelemNo(0) >= 11 || prevstateno = 4999)
trigger12 = stateno = 440 && (animelemNo(0) >= 9 || prevstateno = 4999)
trigger13 = stateno = 415 && (animelemNo(0) >= 12 || prevstateno = 4999)
trigger14 = stateno = 450 && (animelemNo(0) >= 7 || prevstateno = 4999)

[State -1, Charge]
type = ChangeState
value = 1400
triggerall = !AILevel
triggerall = command = "hold_y"
triggerall = command = "hold_b"
triggerall = var(23) <= 0
triggerall = statetype != A
trigger1 = ctrl

[State -1, Run Fwd]
type = ChangeState
value = 100
triggerall = !AILevel
trigger1 = command = "FF"
trigger1 = statetype != A
trigger1 = ctrl

[State -1, Run Back]
type = ChangeState
value = 105
triggerall = !AILevel
trigger1 = command = "BB"
trigger1 = statetype != A
trigger1 = ctrl

[State -1, Back flip]
type = ChangeState
value = 60
triggerall = !AILevel
triggerall = command = "a"
triggerall = command = "x"
triggerall = command = "holdback"
trigger1 = statetype != A
trigger1 = ctrl

[State -1, Back flip]
type = ChangeState
value = 61
triggerall = !AILevel
triggerall = command = "a"
triggerall = command = "x"
trigger1 = statetype != A
trigger1 = ctrl

[State -1, Throw]
type = ChangeState
value = 800
triggerall = !AILevel
triggerall = (command = "x" + command = "y" + command = "z") >= 2
triggerall = statetype = S
triggerall = stateno != 100
trigger1 = ctrl

[State -1, Throw]
type = ChangeState
value = 900
triggerall = !AILevel
triggerall = (command = "a" + command = "b" + command = "c") >= 2
triggerall = statetype = S
triggerall = ctrl
triggerall = stateno != 100
trigger1 = ctrl

[State -1, Stand Light Punch]
type = ChangeState
value = 205
triggerall = !AILevel
triggerall = command = "x"
triggerall = command = "holdfwd"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 200 && time > 3

[State -1, Stand Light Punch]
type = ChangeState
value = 200
triggerall = !AILevel
triggerall = command = "x"
triggerall = command != "holdfwd"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 200
trigger2 = time > 12 && movecontact = 0
trigger3 = stateno = 230 && movecontact = 1 && prevstateno != 200

[State -1, Stand Light Punch]
type = ChangeState
value = 207
triggerall = !AILevel
triggerall = command = "y"
triggerall = command = "holdfwd"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 206 && time > 20

[State -1, Stand Light Punch]
type = ChangeState
value = 206
triggerall = !AILevel
triggerall = command = "y"
triggerall = command != "holdfwd"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 205 && time > 7

[State -1, Stand Strong Punch]
type = ChangeState
value = 211
triggerall = !AILevel
triggerall = command = "z"
triggerall = command = "holdfwd"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 210 && time > 17

[State -1, Stand Strong Punch]
type = ChangeState
value = 210
triggerall = !AILevel
triggerall = command = "z"
triggerall = command != "holdfwd"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 207 && time > 12

[State -1, Stand Light Kick]
type = ChangeState
value = 250
triggerall = !AILevel
triggerall = command = "a"
triggerall = command = "holdup"
trigger1 = stateno = 241 && movecontact > 0 && animelemno(0) = 15 && var(13) = 6

[State -1, Stand Light Kick]
type = ChangeState
value = 251
triggerall = !AILevel
triggerall = command = "b"
triggerall = command = "holddown"
trigger1 = stateno = 250 && movecontact > 0 && animelemno(0) = 8

[State -1, Stand Light Kick]
type = ChangeState
value = 252
triggerall = !AILevel
triggerall = command = "c"
triggerall = command = "holdup"
trigger1 = stateno = 251 && movecontact > 0 && animelemno(0) = 8

[State -1, Stand Light Kick]
type = ChangeState
value = 235
triggerall = !AILevel
triggerall = command = "a"
triggerall = command = "holdfwd"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 230 && movecontact > 0 && animelemno(0) = 5 && var(13) = 1

[State -1, Stand Light Kick]
type = ChangeState
value = 230
triggerall = !AILevel
triggerall = command = "a"
triggerall = command != "holdfwd"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl

[State -1, Stand Light Kick]
type = ChangeState
value = 237
triggerall = !AILevel
triggerall = command = "b"
triggerall = command = "holdfwd"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 236 && movecontact > 0 && animelemno(0) = 7 && var(13) = 3

[State -1, Stand Light Kick]
type = ChangeState
value = 236
triggerall = !AILevel
triggerall = command = "b"
triggerall = command != "holdfwd"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 235 && movecontact > 0 && animelemno(0) = 5 && var(13) = 2

[State -1, Stand Light Kick]
type = ChangeState
value = 241
triggerall = !AILevel
triggerall = command = "c"
triggerall = command = "holdfwd"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 240 && movecontact > 0 && animelemno(0) = 10 && var(13) = 5

[State -1, Standing Strong Kick]
type = ChangeState
value = 240
triggerall = !AILevel
triggerall = command = "c"
triggerall = command != "holdfwd"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 237 && movecontact > 0 && animelemno(0) = 13 && var(13) = 4

[State -1, Taunt]
type = ChangeState
value = 195
triggerall = !AILevel
triggerall = command = "start"
trigger1 = statetype != A
trigger1 = ctrl

[State -1, Crouching Light Punch]
type = ChangeState
value = 400
triggerall = !AILevel
triggerall = command = "x"
triggerall = command = "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 430 && animelemNo(0) >= 4 && prevstateno != 400

[State -1, Crouching Strong Punch]
type = ChangeState
value = 415
triggerall = !AILevel
triggerall = command = "z"
triggerall = command = "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 400 && animelemNo(0) >= 3
trigger3 = stateno = 410 && animelemNo(0) >= 10
trigger4 = stateno = 430 && animelemNo(0) >= 4

[State -1, Crouching Strong Punch]
type = ChangeState
value = 410
triggerall = !AILevel
triggerall = command = "y"
triggerall = command = "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 400 && animelemNo(0) >= 3
trigger3 = stateno = 430 && animelemNo(0) >= 4

[State -1, Crouching Light Kick]
type = ChangeState
value = 430
triggerall = !AILevel
triggerall = command = "a"
triggerall = command = "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 400 && animelemNo(0) >= 3 && prevstateno != 430

[State -1, Crouching Strong Kick]
type = ChangeState
value = 450
triggerall = !AILevel
triggerall = command = "c"
triggerall = command = "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 400 && animelemNo(0) >= 3
trigger3 = stateno = 430 && animelemNo(0) >= 4
trigger4 = stateno = 440 && animelemNo(0) >= 8

[State -1, Crouching Strong Kick]
type = ChangeState
value = 440
triggerall = !AILevel
triggerall = command = "b"
triggerall = command = "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 400 && animelemNo(0) >= 3
trigger3 = stateno = 430 && animelemNo(0) >= 4

[State -1, Jump Light Punch]
type = ChangeState
value = 605
triggerall = !AILevel
triggerall = command = "y"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 || stateno = 630
trigger2 = movecontact > 0

[State -1, Jump Light Punch]
type = ChangeState
value = 600
triggerall = !AILevel
triggerall = command = "x"
triggerall = statetype = A
trigger1 = ctrl

[State -1, Jump Strong Punch]
type = ChangeState
value = 610
triggerall = !AILevel
triggerall = command = "z"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 || stateno = 605 || stateno = 630 || stateno = 635
trigger2 = movecontact > 0

[State -1, Jump Strong Kick]
type = ChangeState
value = 645
triggerall = !AILevel
triggerall = command = "holddown"
triggerall = command = "b"
triggerall = var(10) < 3
triggerall = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 || stateno = 605 || stateno = 630 || stateno = 635
trigger2 = movecontact > 0

[State -1, Jump Light Kick]
type = ChangeState
value = 635
triggerall = !AILevel
triggerall = command = "b"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 || stateno = 605 || stateno = 630
trigger2 = movecontact > 0

[State -1, Jump Light Kick]
type = ChangeState
value = 630
triggerall = !AILevel
triggerall = command = "a"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600
trigger2 = movecontact > 0

[State -1, Jump Strong Kick 2]
type = ChangeState
value = 641
triggerall = !AILevel
triggerall = command = "c" && command = "holdup"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 || stateno = 605 || stateno = 610 || stateno = 630 || stateno = 635
trigger2 = movecontact > 0

[State -1, Jump Strong Kick]
type = ChangeState
value = 640
triggerall = !AILevel
triggerall = command = "c"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 || stateno = 605 || stateno = 610 || stateno = 630 || stateno = 635
trigger2 = movecontact > 0


;============================================= A.I. ===========================================

[State -1, CHARGE]
type = ChangeState
value = 1400
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype = S
triggerall = ctrl = 1 && var(40) > 30 && stateno != 1400
triggerall = P2movetype != A && power < 3000
triggerall = var(23) <= 0
trigger1 = P2Bodydist x = [100,500]

[State -1, rest]
type = ChangeState
value = 9996
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A
triggerall = ctrl = 1
trigger1 = power >= 3000 && life >= 600 && p2life <= 300

[State -1, rest move]
type = ChangeState
value = 61
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A
triggerall = stateno = 9996 && p2dist x < 0
trigger1 = power >= 3000 && life >= 600 && p2life <= 300

[State -1, flashstep from far]
type = changestate
value = 2315
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = var(41) >= 3
triggerall = statetype != A
triggerall = ctrl && p2movetype = A
trigger1 = p2dist x = [200,250] 

[State -1, jump back sunblast evade cornertrap]
type = changestate
value = 40
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = var(41) >= 3
triggerall = statetype != A
triggerall = ctrl && p2movetype = A
trigger1 = p2dist x = [200,450] 

[State -1, jump back sunblast evade cornertrap]
type = changestate
value = 1210
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = var(41) >= 3
triggerall = statetype = A
triggerall = ctrl && p2movetype = A
trigger1 = pos y < -70 && vel x = 0
trigger1 = p2dist x = [250,450] 

[State -1, Stand Kick Throw]
type = ChangeState
value = 800
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype = S
triggerall = ctrl = 1
triggerall = p2statetype = S
triggerall = P2movetype != H
trigger1 = P2Bodydist x = [0,20]
trigger1 = p2dist y = [-10, 10]
trigger1 = (random < (100 * (AIlevel ** 2 / 64.0))) || (life <= 300 && random < (800 * (AIlevel ** 2 / 64.0)))

[State -1, Stand Kick Throw]
type = ChangeState
value = 900
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype = S
triggerall = ctrl = 1
triggerall = p2statetype = S
triggerall = P2movetype != H
trigger1 = P2Bodydist x = [0,20]
trigger1 = p2dist y = [-10, 10]
trigger1 = (random < (100 * (AIlevel ** 2 / 64.0))) || (life <= 300 && random < (800 * (AIlevel ** 2 / 64.0)))

[State -1, roll]
type = changestate
value = 60
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A
trigger1 = stateno = 800 && animtime = 0
trigger2 = stateno = 900 && animtime = 0

[State -1]
type = ChangeState
value = 3100
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = roundstate = 2
triggerall = random < (500 * (AIlevel ** 2 / 64.0))
trigger1 = stateno = 2315 && movehit && time = 23 && power >= 3000 && p2bodydist x < 100 && time > 27
trigger2 = stateno = 2315 && movehit && time = 23 && power >= 1000 && p2bodydist x < 100 && p2life < 250 && time > 27

[State -1]
type = ChangeState
value = 3400
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = roundstate = 2
trigger1 = stateno = 2315 && movehit && time = 23 && power >= 3000
trigger2 = stateno = 2315 && movehit && time = 23 && power >= 1000 && p2life < 250

[State -1]
type = ChangeState
value = 3300
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = roundstate = 2
trigger1 = stateno = 1221 && movehit && time = 25 && power >= 3000
trigger2 = stateno = 1221 && movehit && time = 25 && power >= 1000 && p2life < 250
trigger3 = stateno = 646 && (p2dist x = [0,80]) && (p2dist y = [-110,70]) && time = 9 && p2life < 100

[State -1, jump null]
type = ChangeState
value = 0
triggerall = var(32) = 1
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A
trigger1 = stateno = 40

[State -1, run in]
type = changestate
value = 100
triggerall = var(32) = 1
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A
triggerall = stateno = 0 && ctrl
trigger1 = p2dist x = [100,550] 

[State -1, roll]
type = changestate
value = 60
triggerall = var(32) = 1
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A
triggerall = random < (300 * (AIlevel ** 2 / 64.0))
triggerall = facing != enemynear, facing
trigger1 = stateno = 230 && animtime = 0 && movehit = 0 && backedgedist >= 30 && random < (500 * (AIlevel ** 2 / 64.0))
trigger2 = stateno = 200 && animtime = 0 && movehit = 0 && backedgedist >= 30 && random < (500 * (AIlevel ** 2 / 64.0))

[State -1, roll]
type = changestate
value = 61
triggerall = var(32) = 1
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A
triggerall = random < (300 * (AIlevel ** 2 / 64.0))
triggerall = facing != enemynear, facing
trigger1 = stateno = 100 && random < (200 * (AIlevel ** 2 / 64.0))
trigger1 = p2dist x = [0,100] 
trigger2 = ctrl && random < (200 * (AIlevel ** 2 / 64.0))
trigger2 = p2dist x = [0,80] 
trigger3 = p2movetype = A && ctrl && random < (800 * (AIlevel ** 2 / 64.0)) 
trigger3 = p2dist x = [0,100] 
trigger4 = stateno = 230 && animtime = 0 && movehit = 0
trigger5 = stateno = 200 && animtime = 0 && movehit = 0

[State -1, kicku]
type = changestate
value = 230
triggerall = var(32) = 1
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A
triggerall = (random < (100 * (AIlevel ** 2 / 64.0))) || (life < 200 && random < (800 * (AIlevel ** 2 / 64.0)))
trigger1 = stateno = 100
trigger1 = p2dist x = [-100,100] 
trigger2 = ctrl
trigger2 = p2dist x = [-80,80] 

[State -1, punchu]
type = changestate
value = 200
triggerall = var(32) = 1
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A
triggerall = random < (400 * (AIlevel ** 2 / 64.0))
trigger1 = stateno = 100
trigger1 = p2dist x = [-100,100] 
trigger2 = ctrl
trigger2 = p2dist x = [-80,80] 

[State -1, Stand Light Punch]
type = ChangeState
value = 205
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = var(32) = 1
triggerall = roundstate = 2 
triggerall = statetype != A
trigger1 = stateno = 200 && time > 9 && movehit > 0

[State -1, Stand Light Punch]
type = ChangeState
value = 207
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = var(32) = 1
triggerall = roundstate = 2 
triggerall = statetype != A
trigger1 = stateno = 206 && time > 26 && movehit > 0

[State -1, Stand Light Punch]
type = ChangeState
value = 206
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = var(32) = 1
triggerall = roundstate = 2 
triggerall = statetype != A
trigger1 = stateno = 205 && time > 15 && movehit > 0

[State -1, Stand Strong Punch]
type = ChangeState
value = 211
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = var(32) = 1
triggerall = roundstate = 2 
triggerall = statetype != A
trigger1 = stateno = 210 && time > 24 && movehit > 0

[State -1, Stand Strong Punch]
type = ChangeState
value = 210
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = var(32) = 1
triggerall = roundstate = 2 
triggerall = statetype != A
trigger1 = stateno = 207 && time > 19 && movehit > 0

[State -1, HEAVY FLASH STEP]
type = ChangeState
value = 2315
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = var(32) = 1
triggerall = roundstate = 2 
triggerall = statetype != A
trigger1 = stateno = 211 && time = 20 && movehit > 0

[State -1, Stand Light Kick]
type = ChangeState
value = 235
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = var(32) = 1
triggerall = roundstate = 2 
trigger1 = stateno = 230 && movehit > 0 && animelemno(0) = 5 && var(13) = 1

[State -1, Stand Light Kick]
type = ChangeState
value = 237
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = var(32) = 1
triggerall = roundstate = 2 
trigger1 = stateno = 236 && movehit > 0 && animelemno(0) = 7 && var(13) = 3

[State -1, Stand Light Kick]
type = ChangeState
value = 236
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = var(32) = 1
triggerall = roundstate = 2 
trigger1 = stateno = 235 && movehit > 0 && animelemno(0) = 5 && var(13) = 2

[State -1, Stand Light Kick]
type = ChangeState
value = 241
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = var(32) = 1
triggerall = roundstate = 2 
trigger1 = stateno = 240 && movehit > 0 && animelemno(0) = 10 && var(13) = 5

[State -1, Standing Strong Kick]
type = ChangeState
value = 240
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = var(32) = 1
triggerall = roundstate = 2 
trigger1 = stateno = 237 && movehit > 0 && animelemno(0) = 13 && var(13) = 4

[State -1, Stand Light Kick]
type = ChangeState
value = 250
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = var(32) = 1
triggerall = roundstate = 2 
trigger1 = stateno = 241 && movehit > 0 && animelemno(0) = 16 && var(13) = 6

[State -1, Stand Light Kick]
type = ChangeState
value = 251
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = var(32) = 1
triggerall = roundstate = 2 
trigger1 = stateno = 250 && movehit> 0 && animelemno(0) = 8

[State -1, Stand Light Kick]
type = ChangeState
value = 252
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = var(32) = 1
triggerall = roundstate = 2 
trigger1 = stateno = 251 && movehit > 0 && animelemno(0) = 8 && p2life < 60

[State -1, jump!]
type = changestate
value = 9997
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = var(32) = 1
triggerall = roundstate = 2 
triggerall = statetype != A
trigger1 = stateno = 1004 && animtime = 0 && (p2bodydist x = [0,70]) && (p2dist y = [-250,-200])

[State -1, Attack chain after counter]
type = changestate
value = 600
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = var(32) = 1
triggerall = roundstate = 2 
triggerall = statetype = A && p2statetype = A && p2movetype = H
trigger1 = stateno = 50 && ctrl && (p2dist x = [0,80]) && (p2dist y = [-110,20]) && time = 8
trigger2 = stateno = 646 && (p2dist x = [-10,80]) && (p2dist y = [-110,70]) && time = 9

[State -1, Attack chain after counter]
type = changestate
value = 630
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = var(32) = 1
triggerall = roundstate = 2 
triggerall = statetype = A
trigger1 = stateno = 600 && movecontact > 0

[State -1, Attack chain after counter]
type = changestate
value = 605
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = var(32) = 1
triggerall = roundstate = 2 
triggerall = statetype = A
trigger1 = stateno = 630 && movecontact > 0

[State -1, Attack chain after counter]
type = changestate
value = 610
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = var(32) = 1
triggerall = roundstate = 2 
triggerall = statetype = A
trigger1 = stateno = 605 && movecontact > 0 && var(10)= 1

[State -1, Attack chain after counter]
type = changestate
value = 635
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = var(32) = 1
triggerall = roundstate = 2 
triggerall = statetype = A
trigger1 = stateno = 605 && movecontact > 0

[State -1, Attack chain after counter]
type = changestate
value = 645
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = var(32) = 1
triggerall = roundstate = 2 
triggerall = statetype = A
trigger1 = stateno = 635 && movecontact > 0 && var(10)= 0 

[State -1, Crouching lk]
type = changestate
value = 430
triggerall = var(32) = 2
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A && stateno != 100
triggerall = ctrl || stateno = 52
triggerall = p2stateno != 5120
trigger1 = p2dist x = [-70,75]
trigger1 = p2dist y = 0

[State -1, Crouching hk]
type = changestate
value = 450
triggerall = var(32) = 2
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A && stateno != 100 && p2movetype != H
triggerall = ctrl || stateno = 52
triggerall = var(44) = 0
trigger1 = p2dist x = [75,170]
trigger1 = p2dist y = 0

[State -1, Crouching hk]
type = changestate
value = 415
triggerall = var(32) = 2
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A
trigger1 = stateno = 430 && movehit = 1

[State -1, homing flight]
type = changestate
value = 1020
triggerall = var(32) = 2
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A
trigger1 = stateno = 415 && movehit = 1

[State -1, sunblast]
type = changestate
value = 1220
triggerall = var(32) = 2
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype = A
trigger1 = stateno = 646 && time = 8 && var(10) = 1
trigger1 = p2dist x <= 200 && p2statetype = A
trigger1 = p2dist y = [-50,50]
trigger2 = stateno = 1221 && time = 26 && var(11) = 1
trigger2 = p2dist x > 70 && p2statetype = A
trigger2 = p2dist y = [-90,90]

[State -1, sunblast]
type = changestate
value = 1200
triggerall = var(32) = 2
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype = A
trigger1 = stateno = 1221 && time = 26 && var(11) = 1
trigger1 = p2dist x <= 70 && p2statetype = A
trigger1 = p2dist y = [-90,90]

[State -1, hk]
type = changestate
value = 640
triggerall = var(32) = 2
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype = A
trigger1 = stateno = 1201 && ctrl
trigger1 = p2dist x <= 150 && p2statetype = A
trigger1 = p2dist y = [-70,70]

[State -1, lp]
type = changestate
value = 600
triggerall = var(32) = 2
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype = A
trigger1 = stateno = 1023
trigger1 = p2dist x <= 150 && p2statetype = A
trigger1 = p2dist y = [-60,60]
trigger2 = stateno = 646 && time = 9 && var(10) = 1
trigger2 = p2dist x <= 100 && p2statetype = A
trigger2 = p2dist y = [-50,50]

[State -1, lk]
type = changestate
value = 630
triggerall = var(32) = 2
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype = A
trigger1 = stateno = 600 && movehit = 1

[State -1,mp]
type = changestate
value = 605
triggerall = var(32) = 2
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype = A
trigger1 = stateno = 630 && movehit = 1

[State -1, mk]
type = changestate
value = 635
triggerall = var(32) = 2
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype = A
trigger1 = stateno = 605 && movehit = 1

[State -1, stomp]
type = changestate
value = 645
triggerall = var(32) = 2
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype = A
trigger1 = stateno = 635 && movehit = 1

[State -1, jump back sunblast evade cornertrap]
type = changestate
value = 1022
triggerall = var(32) = 2
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype = A
triggerall = ctrl && (stateno = 50 || stateno = 46)
trigger1 = backedgedist < 5
trigger1 = p2dist x > 150 && pos y < -70
trigger1 = random < (600 * (AIlevel ** 2 / 64.0))

[State -1, jump back sunblast evade cornertrap]
type = changestate
value = 610
triggerall = var(32) = 2
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype = A
triggerall = stateno = 1023
trigger1 = p2dist x <= 180 && p2statetype != A && p2movetype != H

[State -1, jump back sunblast evade cornertrap]
type = changestate
value = 645
triggerall = var(32) = 2
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype = A
triggerall = stateno = 1023
trigger1 = p2dist x <= 100 && p2statetype != A && p2movetype = H

[State -1, jump back sunblast evade cornertrap]
type = changestate
value = 42
triggerall = var(32) = 2
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A
triggerall = ctrl
trigger1 = backedgedist < 5
trigger1 = p2dist x = [150,250] 
trigger1 = random < (600 * (AIlevel ** 2 / 64.0))

[State -1, jump back sunblast evade cornertrap]
type = changestate
value = 1220
triggerall = var(32) = 2
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype = A && p2movetype != A
triggerall = stateno = 50
trigger1 = pos y < -70 
trigger1 = backedgedist < 5
trigger1 = p2dist x = [150,250] 
trigger1 = random < (600 * (AIlevel ** 2 / 64.0))

[State -1, dashforward evade cornertrap]
type = changestate
value = 100
triggerall = var(32) = 2
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A
triggerall = ctrl
trigger1 = backedgedist < 5
trigger1 = p2dist x = [100,200] 
trigger1 = random < (600 * (AIlevel ** 2 / 64.0))

[State -1, dashforward evade cornertrap]
type = changestate
value = 41
triggerall = var(32) = 2
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A
trigger1 = stateno = 100

[State -1, roll forward evade cornertrap]
type = changestate
value = 61
triggerall = var(32) = 2
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A
triggerall = ctrl && stateno != 100
triggerall = facing != enemynear, facing
trigger1 = backedgedist < 5
trigger1 = p2dist x = [0,100] 
trigger1 = random < (800 * (AIlevel ** 2 / 64.0))

[State -1, rollback]
type = changestate
value = 61
triggerall = var(32) = 2
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A && stateno != 100
triggerall = backedgedist < 5
triggerall = facing != enemynear, facing
trigger1 = stateno = 430 && movehit = 0 && animtime = 0
trigger2 = stateno = 450 && movehit = 0 && animtime = 0

[State -1, dashback1]
type = changestate
value = 42
triggerall = var(32) = 2
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A && p2movetype != A
triggerall = ctrl && stateno != 100
trigger1 = p2dist x = [250,500]
trigger1 = random < (500 * (AIlevel ** 2 / 64.0)) && backedgedist < 5
trigger2 = p2dist x = [250,500] 
trigger2 = random < (200 * (AIlevel ** 2 / 64.0))

[State -1, dashback1]
type = changestate
value = 45
triggerall = var(32) = 2
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A && p2movetype != A
trigger1 = ctrl && stateno != 100
trigger1 = p2dist x = [150,250]
trigger1 = random < (500 * (AIlevel ** 2 / 64.0)) && backedgedist < 5
trigger2 = ctrl && stateno != 100
trigger2 = p2dist x = [150,250] 
trigger2 = random < (200 * (AIlevel ** 2 / 64.0))
trigger3 = stateno= 60 && animtime = 0

[State -1, dashback2]
type = changestate
value = 105
triggerall = var(32) = 2
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A && p2movetype != A
triggerall = ctrl && stateno != 100
trigger1 = p2dist x = [200,500] 
trigger1 = random < (200 * (AIlevel ** 2 / 64.0))

[State -1, rollback]
type = changestate
value = 60
triggerall = var(32) = 2
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A && stateno != 100
triggerall = ctrl || stateno = 20
triggerall = facing != enemynear, facing
trigger1 = p2dist x = [0,100] 
trigger1 = random < (100 * (AIlevel ** 2 / 64.0))
trigger2 = p2dist x = [100,180] 
trigger2 = random < (50 * (AIlevel ** 2 / 64.0))
trigger3 = p2movetype = A && random < (400 * (AIlevel ** 2 / 64.0))

[State -1, rollback]
type = changestate
value = 60
triggerall = var(32) = 2
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A && stateno != 100
triggerall = facing != enemynear, facing
trigger1 = stateno = 450 && movehit = 0 && animtime = 0

[State -1, walk back]
type = changestate
value = 20
triggerall = var(32) = 2
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A && stateno != 100
triggerall = ctrl
trigger1 = p2dist x = [0,500]

[State -1, jump back sunblast evade cornertrap]
type = changestate
value = 2315
triggerall = var(32) = 3
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A
triggerall = ctrl
trigger1 = p2dist x = [200,250] 
trigger1 = random < (200 * (AIlevel ** 2 / 64.0))

[State -1, jump back sunblast evade cornertrap]
type = changestate
value = 2315
triggerall = var(32) = 3
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A
triggerall = ctrl && p2movetype != A
trigger1 = p2dist x = [150,200] 
trigger1 = random < (200 * (AIlevel ** 2 / 64.0))

[State -1, Aaah dun hurt me >_< land]
type = changestate
value = 1320
triggerall = var(32) = 3
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A
triggerall = ctrl && p2movetype = A
triggerall = facing != enemynear, facing
trigger1 = p2dist x = [-20,150] 
trigger1 = p2dist y >= -20

[State -1, Aaah dun hurt me >_< air]
type = changestate
value = 1320
triggerall = var(32) = 3
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A
triggerall = ctrl && p2movetype = A
triggerall = facing != enemynear, facing
trigger1 = p2dist x = [-20,150] 
trigger1 = p2dist y = [-100,-20]
trigger1 = enemynear, vel Y > 0

[State -1, Attack chain after counter]
type = changestate
value = 640
triggerall = var(32) = 3
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype = A && p2statetype != A
trigger1 = stateno = 1322 && ctrl

[State -1, Attack chain after counter]
type = changestate
value = 1200
triggerall = var(32) = 3
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype = A
trigger1 = stateno = 640 && movecontact > 0

[State -1, Attack chain after counter]
type = changestate
value = 610
triggerall = var(32) = 3
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype = A
trigger1 = stateno = 1201 && ctrl

[State -1, Attack chain after counter]
type = changestate
value = 600
triggerall = var(32) = 3
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype = A && p2statetype = A
trigger1 = stateno = 1322 && ctrl

[State -1, Attack chain after counter]
type = changestate
value = 630
triggerall = var(32) = 3
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype = A
trigger1 = stateno = 600 && movecontact > 0

[State -1, Attack chain after counter]
type = changestate
value = 605
triggerall = var(32) = 3
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype = A
trigger1 = stateno = 630 && movecontact > 0

[State -1, Attack chain after counter]
type = changestate
value = 1220
triggerall = var(32) = 3
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype = A && random < (500 * (AIlevel ** 2 / 64.0))
trigger1 = stateno = 605 && movecontact > 0

[State -1, Attack chain after counter]
type = changestate
value = 635
triggerall = var(32) = 3
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype = A
trigger1 = stateno = 605 && movecontact > 0

[State -1, Attack chain after counter]
type = changestate
value = 610
triggerall = var(32) = 3
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype = A
trigger1 = stateno = 635 && movecontact > 0

[State -1, jump back sunblast evade cornertrap]
type = changestate
value = 42
triggerall = var(32) = 3
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A
triggerall = ctrl
trigger1 = backedgedist < 5
trigger1 = p2dist x = [150,250] 
trigger1 = random < (600 * (AIlevel ** 2 / 64.0))

[State -1, jump back sunblast evade cornertrap]
type = changestate
value = 1220
triggerall = var(32) = 3
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype = A && p2movetype != A
triggerall = stateno = 50
trigger1 = pos y < -70 
trigger1 = backedgedist < 5
trigger1 = p2dist x = [150,250] 
trigger1 = random < (600 * (AIlevel ** 2 / 64.0))

[State -1, dashforward evade cornertrap]
type = changestate
value = 100
triggerall = var(32) = 3
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A
triggerall = ctrl
trigger1 = backedgedist < 5
trigger1 = p2dist x = [100,200] 
trigger1 = random < (600 * (AIlevel ** 2 / 64.0))

[State -1, dashforward evade cornertrap]
type = changestate
value = 41
triggerall = var(32) = 3
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A
trigger1 = stateno = 100

[State -1, dashforward evade cornertrap]
type = changestate
value = 61
triggerall = var(32) = 3
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A
triggerall = ctrl && stateno != 100
triggerall = facing != enemynear, facing
trigger1 = backedgedist < 5
trigger1 = p2dist x = [0,100] 
trigger1 = random < (800 * (AIlevel ** 2 / 64.0))

[State -1, dashback]
type = changestate
value = 105
triggerall = var(32) = 3
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A && p2movetype != A
triggerall = ctrl && stateno != 100
triggerall = facing != enemynear, facing
trigger1 = p2dist x = [0,100] 
trigger1 = random < (300 * (AIlevel ** 2 / 64.0))
trigger2 = p2dist x = [100,180] 
trigger2 = random < (50 * (AIlevel ** 2 / 64.0))

[State -1, rollback]
type = changestate
value = 60
triggerall = var(32) = 3
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A && stateno != 100
triggerall = ctrl || stateno = 20
triggerall = facing != enemynear, facing
trigger1 = p2dist x = [0,100] 
trigger1 = random < (300 * (AIlevel ** 2 / 64.0))
trigger2 = p2dist x = [100,180] 
trigger2 = random < (50 * (AIlevel ** 2 / 64.0))

[State -1, walk back]
type = changestate
value = 20
triggerall = var(32) = 3
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A && stateno != 100
triggerall = ctrl
trigger1 = p2dist x = [0,200]

[State -1, walk forward]
type = changestate
value = 21
triggerall = var(32) = 3
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A && stateno != 100
triggerall = ctrl && p2movetype != A
triggerall = enemynear, numproj = 0 && enemynear, numhelper = 0
trigger1 = p2dist x = [230,500]

[State -1, roll]
type = changestate
value = 60
triggerall = var(32) = 4
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A
triggerall = random < (300 * (AIlevel ** 2 / 64.0))
triggerall = facing != enemynear, facing
trigger1 = ctrl && random < (10 * (AIlevel ** 2 / 64.0))

[State -1, roll]
type = changestate
value = 61
triggerall = var(32) = 4
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A
triggerall = random < (300 * (AIlevel ** 2 / 64.0))
triggerall = facing != enemynear, facing
trigger1 = ctrl && random < (100 * (AIlevel ** 2 / 64.0))
trigger1 = p2dist x = [0,80] 
trigger2 = p2movetype = A && ctrl && random < (800 * (AIlevel ** 2 / 64.0)) 
trigger2 = p2dist x = [150,500] 

[State -1, Aaah dun hurt me >_< land]
type = changestate
value = 1320
triggerall = var(32) = 4
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A
triggerall = ctrl && p2movetype = A
triggerall = facing != enemynear, facing
trigger1 = p2dist x = [-20,150] 
trigger1 = p2dist y >= -20

[State -1, Aaah dun hurt me >_< air]
type = changestate
value = 1320
triggerall = var(32) = 4
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A
triggerall = ctrl && p2movetype = A
triggerall = facing != enemynear, facing
trigger1 = p2dist x = [-20,150] 
trigger1 = p2dist y = [-100,-20]
trigger1 = enemynear, vel Y > 0

[State -1, walk forward]
type = changestate
value = 21
triggerall = var(32) = 4
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype != A && stateno != 100
triggerall = ctrl && p2movetype != A
trigger1 = p2dist x = [150,500]

[State -1, Attack chain after counter]
type = changestate
value = 640
triggerall = var(32) = 4
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype = A && p2statetype != A
trigger1 = stateno = 1322 && ctrl

[State -1, Attack chain after counter]
type = changestate
value = 1200
triggerall = var(32) = 4
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype = A
trigger1 = stateno = 640 && movecontact > 0

[State -1, Attack chain after counter]
type = changestate
value = 610
triggerall = var(32) = 4
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype = A
trigger1 = stateno = 1201 && ctrl

[State -1, Attack chain after counter]
type = changestate
value = 600
triggerall = var(32) = 4
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype = A && p2statetype = A
trigger1 = stateno = 1322 && ctrl

[State -1, Attack chain after counter]
type = changestate
value = 630
triggerall = var(32) = 4
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype = A
trigger1 = stateno = 600 && movecontact > 0

[State -1, Attack chain after counter]
type = changestate
value = 605
triggerall = var(32) = 4
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype = A
trigger1 = stateno = 630 && movecontact > 0

[State -1, Attack chain after counter]
type = changestate
value = 1220
triggerall = var(32) = 4
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype = A && random < (500 * (AIlevel ** 2 / 64.0))
trigger1 = stateno = 605 && movecontact > 0

[State -1, Attack chain after counter]
type = changestate
value = 635
triggerall = var(32) = 4
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype = A
trigger1 = stateno = 605 && movecontact > 0

[State -1, Attack chain after counter]
type = changestate
value = 610
triggerall = var(32) = 4
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = statetype = A
trigger1 = stateno = 635 && movecontact > 0

[State -1, Winfreeze]
type = ChangeState
value = 0
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = Win = 1
trigger1 = statetype != A
trigger1 = ctrl

[State -1, Fall Recovery]
type = changestate
value = 5210
trigger1 = AIlevel && numenemy
trigger1 = roundstate = 2 && alive
trigger1 = stateno = 5050 && canrecover
trigger1 = vel y > 0 && pos y < -20
trigger1 = random < (50 * (AIlevel ** 2 / 64.0))

[State -1, Fall Recovery]
type = changestate
value = 5200
trigger1 = AIlevel && numenemy
trigger1 = roundstate = 2 && alive
trigger1 = stateno = 5050 && gethitvar(fall.recover)
trigger1 = vel y > 0 && pos y >= -20
trigger1 = random < (200 * (AIlevel ** 2 / 64.0))

[State -1, Jump]
type = changestate
value = 40
trigger1 = AIlevel && numenemy
trigger1 = roundstate = 2 && statetype != A && ctrl
trigger1 = enemynear, movetype = A && p2bodydist x < 160 && enemynear, hitdefattr = SC, AT

[State -1, Guard]
type = changestate
value = 120
trigger1 = AIlevel && numenemy
trigger1 = roundstate = 2 && inguarddist
trigger1 = ctrl && (stateno != [120, 155])
trigger1 = !(enemynear, hitdefattr = SCA, AT) && (enemynear, time < 120)
trigger1 = statetype != A || p2statetype = A
trigger1 = random < (ifelse((p2stateno = [200, 699]), 100, ifelse((p2stateno = [1000, 2999]), 333, 1000)) * (AIlevel ** 2 / 64.0))

[State -1]
type = ChangeState
value = 3000
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = roundstate = 2 && power >= 1000
triggerall = random < (500 * (AIlevel ** 2 / 64.0))
trigger1 = stateno = 3430 && p2stateno = 3450 && time = 15

[State -1]
type = ChangeState
value = 3100
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = roundstate = 2 && power >= 1000
trigger1 = stateno = 3430 && p2stateno = 5030 && time = 57

[State -1]
type = ChangeState
value = 3300
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = roundstate = 2 && power >= 1000
triggerall = random < (500 * (AIlevel ** 2 / 64.0))
trigger1 = stateno = 3121 && time = 50 && movehit = 1

[State -1]
type = ChangeState
value = 3400
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = roundstate = 2 && power >= 1000
triggerall = numtarget
trigger1 = stateno = 3004 && time > 5 && p2dist y > -60 && target, vel y > 0

[State -1]
type = ChangeState
value = 3300
triggerall = roundstate = 2
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = roundstate = 2 && power >= 1000
trigger1 = stateno = 3006 && time = 15 && movehit = 1

[State -1]
type = ChangeState
value = 3002
triggerall = roundstate = 2
triggerall = AILevel && NumEnemy
triggerall = random < (1000 * (AIlevel ** 2 / 64.0))
triggerall = roundstate = 2 && power >= 1000
trigger1 = stateno = 3302 && frontedgedist < 3 && p2movetype = H && var(9) > 9 && time > 20
