;==============================================================================================
;=======================================<COMMAND FILE>=========================================
;==============================================================================================

;====================<BUTTON REMAPPING>====================

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

;====================<DEFAULT VALUES>====================

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

;====================<SINGLE BUTTON>====================

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

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

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

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

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

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

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

;==================<HOLD DIRECTION>==================

[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

;====================<HOLD BUTTON>====================

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

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

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

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

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

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

[Command]
name = "holdstart"
command = /s
time = 1

;====================<DIRECTION>====================

[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

;====================<RELEASE DIR>====================

[Command]
name = "rlsfwd"
command = ~$F
time = 1

[Command]
name = "rlsback"
command = ~$B
time = 1

[Command]
name = "rlsup"
command = ~$U
time = 1

[Command]
name = "rlsdown"
command = ~$D
time = 1

;====================<RELEASE BUTTON>====================

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

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

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

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

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

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

;====================<SUPER MOTIONS>====================

[Command]
name = "Beserker Barrage X"
command = ~D, DF, F, D, DF, F, x
time = 32

[Command]
name = "Beserker Barrage X"
command = ~D, DF, F, D, DF, F, y
time = 32

[Command]
name = "Beserker Barrage X"
command = ~D, DF, F, D, DF, F, z
time = 32

[Command]
name = "Beserker Barrage X"
command = ~D, DF, F, D, DF, F, ~x
time = 32

[Command]
name = "Beserker Barrage X"
command = ~D, DF, F, D, DF, F, ~y
time = 32

[Command]
name = "Beserker Barrage X"
command = ~D, DF, F, D, DF, F, ~z
time = 32


[Command]
name = "MAXBeserker Barrage X"
command = ~D, DF, F, D, DF, F, x+y
time = 32

[Command]
name = "MAXBeserker Barrage X"
command = ~D, DF, F, D, DF, F, y+z
time = 32

[Command]
name = "MAXBeserker Barrage X"
command = ~D, DF, F, D, DF, F, x+z
time = 32


[Command]
name = "Fatal Claw"
command = ~D, DF, F, D, DF, F, a
time = 32

[Command]
name = "Fatal Claw"
command = ~D, DF, F, D, DF, F, b
time = 32

[Command]
name = "Fatal Claw"
command = ~D, DF, F, D, DF, F, c
time = 32

[Command]
name = "Fatal Claw"
command = ~D, DF, F, D, DF, F, ~a
time = 32

[Command]
name = "Fatal Claw"
command = ~D, DF, F, D, DF, F, ~b
time = 32

[Command]
name = "Fatal Claw"
command = ~D, DF, F, D, DF, F, ~c
time = 32


[Command]
name = "MAXFatal Claw"
command = ~D, DF, F, D, DF, F, a+b
time = 32

[Command]
name = "MAXFatal Claw"
command = ~D, DF, F, D, DF, F, b+c
time = 32

[Command]
name = "MAXFatal Claw"
command = ~D, DF, F, D, DF, F, a+c
time = 32


[Command]
name = "Beserker Charge"
command = ~D, DB, B, D, DB, B, x
time = 32

[Command]
name = "Beserker Charge"
command = ~D, DB, B, D, DB, B, y
time = 32

[Command]
name = "Beserker Charge"
command = ~D, DB, B, D, DB, B, z
time = 32

[Command]
name = "Beserker Charge"
command = ~D, DB, B, D, DB, B, ~x
time = 32

[Command]
name = "Beserker Charge"
command = ~D, DB, B, D, DB, B, ~y
time = 32

[Command]
name = "Beserker Charge"
command = ~D, DB, B, D, DB, B, ~z
time = 32


[Command]
name = "MAXBeserker Charge"
command = ~D, DB, B, D, DB, B, x+y
time = 32

[Command]
name = "MAXBeserker Charge"
command = ~D, DB, B, D, DB, B, y+z
time = 32

[Command]
name = "MAXBeserker Charge"
command = ~D, DB, B, D, DB, B, x+z
time = 32


[Command]
name = "Healing Factor X"
command = ~D, DB, B, D, DB, B, a
time = 32

[Command]
name = "Healing Factor X"
command = ~D, DB, B, D, DB, B, b
time = 32

[Command]
name = "Healing Factor X"
command = ~D, DB, B, D, DB, B, c
time = 32

[Command]
name = "Healing Factor X"
command = ~D, DB, B, D, DB, B, ~a
time = 32

[Command]
name = "Healing Factor X"
command = ~D, DB, B, D, DB, B, ~b
time = 32

[Command]
name = "Healing Factor X"
command = ~D, DB, B, D, DB, B, ~c
time = 32


[Command]
name = "MAXHealing Factor X"
command = ~D, DB, B, D, DB, B, a+b
time = 32

[Command]
name = "MAXHealing Factor X"
command = ~D, DB, B, D, DB, B, b+c
time = 32

[Command]
name = "MAXHealing Factor X"
command = ~D, DB, B, D, DB, B, a+c
time = 32


[Command]
name = "Weapon X"
command = ~D, DB, B, D, DF, F, x+y
time = 32

[Command]
name = "Weapon X"
command = ~D, DB, B, D, DF, F, y+z
time = 32

[Command]
name = "Weapon X"
command = ~D, DB, B, D, DF, F, x+z
time = 32

;====================<SPECIAL MOTIONS>====================
[Command]
name = "EXBeserker Barrage"
command = ~D, DF, F, x+y
time = 16

[Command]
name = "EXBeserker Barrage"
command = ~D, DF, F, y+z
time = 16

[Command]
name = "EXBeserker Barrage"
command = ~D, DF, F, x+z
time = 16

[Command]
name = "EXTornado Claw"
command = ~F, D, DF, x+z
time = 16

[Command]
name = "EXTornado Claw"
command = ~F, D, DF, y+x
time = 16

[Command]
name = "EXTornado Claw"
command = ~F, D, DF, z+y
time = 16
[Command]
name = "EXBeserker Slash"
command = ~D, DB, B, x+y
time = 16

[Command]
name = "EXBeserker Slash"
command = ~D, DB, B, y+z
time = 16

[Command]
name = "EXBeserker Slash"
command = ~D, DB, B, x+z
time = 16
[Command]
name = "Beserker Barrage"
command = ~D, DF, F, x
time = 16

[Command]
name = "Beserker Barrage"
command = ~D, DF, F, y
time = 16

[Command]
name = "Beserker Barrage"
command = ~D, DF, F, z
time = 16

[Command]
name = "Beserker Barrage"
command = ~D, DF, F, ~x
time = 16

[Command]
name = "Beserker Barrage"
command = ~D, DF, F, ~y
time = 16

[Command]
name = "Beserker Barrage"
command = ~D, DF, F, ~z
time = 16




[Command]
name = "Tornado Claw"
command = ~F, D, DF, x
time = 16

[Command]
name = "Tornado Claw"
command = ~F, D, DF, y
time = 16

[Command]
name = "Tornado Claw"
command = ~F, D, DF, z
time = 16

[Command]
name = "Tornado Claw"
command = ~F, D, DF, ~x
time = 16

[Command]
name = "Tornado Claw"
command = ~F, D, DF, ~y
time = 16

[Command]
name = "Tornado Claw"
command = ~F, D, DF, ~z
time = 16



[Command]
name = "Beserker Slash"
command = ~D, DB, B, x
time = 16

[Command]
name = "Beserker Slash"
command = ~D, DB, B, y
time = 16

[Command]
name = "Beserker Slash"
command = ~D, DB, B, z
time = 16

[Command]
name = "Beserker Slash"
command = ~D, DB, B, ~x
time = 16

[Command]
name = "Beserker Slash"
command = ~D, DB, B, ~y
time = 16

[Command]
name = "Beserker Slash"
command = ~D, DB, B, ~z
time = 16





[Command]
name = "Drill Claw"
command = a+y
time = 16

[Command]
name = "Drill Claw"
command = ~a+y
time = 16


[Command]
name = "412p"
command = ~B, DB, D, x
time = 16

[Command]
name = "412p"
command = ~B, DB, D, y
time = 16

[Command]
name = "412p"
command = ~B, DB, D, z
time = 16

[Command]
name = "412p"
command = ~B, DB, D, ~x
time = 16

[Command]
name = "412p"
command = ~B, DB, D, ~y
time = 16

[Command]
name = "412p"
command = ~B, DB, D, ~z
time = 16


[Command]
name = "412k"
command = ~B, DB, D, a
time = 16

[Command]
name = "412k"
command = ~B, DB, D, b
time = 16

[Command]
name=  "412k"
command = ~B, DB, D, c
time = 16

[Command]
name = "412k"
command = ~B, DB, D, ~a
time = 16

[Command]
name = "412k"
command = ~B, DB, D, ~b
time = 16

[Command]
name = "412k"
command = ~B, DB, D, ~c
time = 16

;====================<OTHER>====================

[Command]
name = "highjump"
command = $D, $U
time = 15
[Command]
name = "DU"
command = D, U
time = 18
[Command]
name = "DU"
command = DB, UF
time = 18
[Command]
name = "DU"
command = DF, UB
time = 18
[Command]
name = "DU"
command = $D, UF
time = 18
[Command]
name = "DU"
command = $D, UB
time = 18
;====================<DOUBLE TAP>====================

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

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

;====================<2/3 BUTTON COMBINATION>====================

[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 = "recovery"
command = a+x
time = 1


[Command]
name = "pp"
command = x+y
time = 1

[Command]
name = "pp"
command = x+z
time = 1

[Command]
name = "pp"
command = y+z
time = 1


[Command]
name = "kk"
command = a+b
time = 1

[Command]
name = "kk"
command = a+c
time = 1

[Command]
name = "kk"
command = b+c
time = 1


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

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

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

;==============================================================================================
;========================================<-1 STATES>===========================================
;==============================================================================================
[StateDef -1]

[State -1, Tick Fix]
type = CtrlSet
triggerAll = !ctrl
trigger1 = (StateNo = 52 || StateNo = 101 || StateNo = 5120) && !AnimTime
trigger2 = (StateNo = [200,499]) && !AnimTime
trigger3 = ((StateNo = [760,762]) || (StateNo = [700,715]) || (StateNo = [900,905])) && !AnimTime
trigger4 = (StateNo = 5001 || StateNo = 5011 || StateNo = 151 || StateNo = 153) && HitOver
value = 1

[State -1, Weapon X]
type = ChangeState;Null;
value = 3300
triggerAll = !AILevel
triggerAll = command = "Weapon X"
triggerAll = RoundState = 2 && StateType != A
triggerAll = power >= 3000 && !var(20) ;&& !var(14)
trigger1 = ctrl || StateNo = 40 || StateNo = 52 || (StateNo = [100,101])
trigger2 = var(7)

[State -1, MAX Healing Factor X]
type = ChangeState
value = 3550
TriggerAll = Life < Const(Data.Life);LifeMax
triggerAll = !AILevel
triggerAll = command = "MAXHealing Factor X"
triggerAll = RoundState = 2 && StateType != A
triggerall = ifelse(var(20) <= 0, power >= 2000, power >= 1000)
trigger1 = ctrl || StateNo = 40 || StateNo = 52 || (StateNo = [100,101])

[State -1, MAX Fatal Claw (Aerial)]
type = ChangeState
value = 3280
triggerAll = !AILevel
triggerAll = command = "MAXFatal Claw"
triggerAll = RoundState = 2 && StateType = A
triggerall = ifelse(var(20) <= 0, power >= 2000, power >= 1000)
trigger1 = ctrl || StateNo = 40 || StateNo = 52 || (StateNo = [100,101])
trigger2 = var(7) || var(8)

[State -1, MAX Fatal Claw]
type = ChangeState
value = 3250
triggerAll = !AILevel
triggerAll = command = "MAXFatal Claw"
triggerAll = RoundState = 2 && StateType != A
triggerall = ifelse(var(20) <= 0, power >= 2000, power >= 1000)
trigger1 = ctrl || StateNo = 40 || StateNo = 52 || (StateNo = [100,101])
trigger2 = var(7) || var(8)

[State -1, MAX Beserker Barrage X]
type = ChangeState
value = 3050
triggerAll = !AILevel
triggerAll = command = "MAXBeserker Barrage X"
triggerAll = RoundState = 2 && StateType != A
triggerall = ifelse(var(20) <= 0, power >= 2000, power >= 1000)
trigger1 = ctrl || StateNo = 40 || StateNo = 52 || (StateNo = [100,101])
trigger2 = var(7) || var(8)

[State -1, Healing Factor X]
type = ChangeState
value = 3500
TriggerAll = Life < Const(Data.Life);LifeMax
triggerAll = !AILevel
triggerAll = command = "Healing Factor X"
triggerAll = RoundState = 2 && StateType != A
triggerall = ifelse(var(20) <= 0, power >= 1000, power >= 500)
trigger1 = ctrl || StateNo = 40 || StateNo = 52 || (StateNo = [100,101])

[State -1, Fatal Claw (Aerial)]
type = ChangeState
value = 3230
triggerAll = !AILevel
triggerAll = command = "Fatal Claw"
triggerAll = RoundState = 2 && StateType = A
triggerall = ifelse(var(20) <= 0, power >= 1000, power >= 0)
trigger1 = ctrl || StateNo = 40 || StateNo = 52 || (StateNo = [100,101])
trigger2 = var(7)

[State -1, Fatal Claw]
type = ChangeState
value = 3200
triggerAll = !AILevel
triggerAll = command = "Fatal Claw"
triggerAll = RoundState = 2 && StateType != A
triggerall = ifelse(var(20) <= 0, power >= 1000, power >= 0)
trigger1 = ctrl || StateNo = 40 || StateNo = 52 || (StateNo = [100,101])
trigger2 = var(7)

[State -1, Beserker Charge]
type = ChangeState
value = 3100
triggerAll = !AILevel
triggerAll = command = "Beserker Charge"
triggerAll = RoundState = 2 && StateType != A
triggerall = ifelse(var(20) <= 0, power >= 1000, power >= 500) && !var(14)
trigger1 = ctrl || StateNo = 40 || StateNo = 52 || (StateNo = [100,101])
trigger2 = var(7)

[State -1, Beserker Barrage X]
type = ChangeState
value = 3000
triggerAll = !AILevel
triggerAll = command = "Beserker Barrage X"
triggerAll = RoundState = 2 && StateType != A
triggerall = ifelse(var(20) <= 0, power >= 1000, power >= 0)
trigger1 = ctrl || StateNo = 40 || StateNo = 52 || (StateNo = [100,101])
trigger2 = var(7)

[State -1, EX Beserker Slash]
type = ChangeState
value = 1250
triggerAll = !AILevel
triggerAll = command = "EXBeserker Slash"
triggerAll = RoundState = 2 && StateType != A
triggerall = ifelse(var(20) <= 0, power >= 500, power >= 0)
trigger1 = ctrl || StateNo = 40 || StateNo = 52 || (StateNo = [100,101])
trigger2 = var(6)

[State -1, EX Tornado Claw]
type = ChangeState
value = 1150
triggerAll = !AILevel
triggerAll = command = "EXTornado Claw"
triggerAll = RoundState = 2 && StateType != A
triggerall = ifelse(var(20) <= 0, power >= 500, power >= 0)
trigger1 = ctrl || StateNo = 40 || StateNo = 52 || (StateNo = [100,101])
trigger2 = var(6)

[State -1, EX Beserker Barrage]
type = ChangeState
value = 1050
triggerAll = !AILevel
triggerAll = command = "EXBeserker Barrage"
triggerAll = RoundState = 2 && StateType != A
triggerall = ifelse(var(20) <= 0, power >= 500, power >= 0)
trigger1 = ctrl || StateNo = 40 || StateNo = 52 || (StateNo = [100,101])
trigger2 = var(6)

[State -1, Aerial Drill Claw 45°]
type = ChangeState
value = 1420
triggerAll = !AILevel
TriggerAll = !var(55)
triggerAll = command = "Drill Claw" && command = "holddown" && command = "holdfwd"
triggerAll = RoundState = 2 && StateType = A
trigger1 = ctrl || StateNo = 40 || StateNo = 52 || (StateNo = [100,101])
trigger2 = var(6)

[State -1, Aerial Drill Claw 45°]
type = ChangeState
value = 1460
triggerAll = !AILevel
TriggerAll = !var(55)
triggerAll = command = "Drill Claw" && command = "holddown" && command = "holdback"
triggerAll = RoundState = 2 && StateType = A
trigger1 = ctrl || StateNo = 40 || StateNo = 52 || (StateNo = [100,101])
trigger2 = var(6)

[State -1, Aerial Drill Claw 45°]
type = ChangeState
value = 1470
triggerAll = !AILevel
TriggerAll = !var(55)
triggerAll = command = "Drill Claw" && command = "holddown"
triggerAll = RoundState = 2 && StateType = A
trigger1 = ctrl || StateNo = 40 || StateNo = 52 || (StateNo = [100,101])
trigger2 = var(6)

[State -1, Aerial Drill Claw 45°]
type = ChangeState
value = 1450
triggerAll = !AILevel
TriggerAll = !var(55)
triggerAll = command = "Drill Claw" && command = "holdup" && command = "holdback"
triggerAll = RoundState = 2 && StateType = A
trigger1 = ctrl || StateNo = 40 || StateNo = 52 || (StateNo = [100,101])
trigger2 = var(6)

[State -1, Aerial Drill Claw 180°]
type = ChangeState
value = 1440
triggerAll = !AILevel
TriggerAll = !var(55)
triggerAll = command = "Drill Claw" && command = "holdback"
triggerAll = RoundState = 2 && StateType = A
trigger1 = ctrl || StateNo = 40 || StateNo = 52 || (StateNo = [100,101])
trigger2 = var(6)

[State -1, Aerial Drill Claw 45°]
type = ChangeState
value = 1410
triggerAll = !AILevel
TriggerAll = !var(55)
triggerAll = command = "Drill Claw" && command = "holdup" && command = "holdfwd"
triggerAll = RoundState = 2 && StateType = A
trigger1 = ctrl || StateNo = 40 || StateNo = 52 || (StateNo = [100,101])
trigger2 = var(6)

[State -1, Aerial Drill Claw 90°]
type = ChangeState
value = 1430
triggerAll = !AILevel
TriggerAll = !var(55)
triggerAll = command = "Drill Claw" && command = "holdup"
triggerAll = RoundState = 2 && StateType = A
trigger1 = ctrl || StateNo = 40 || StateNo = 52 || (StateNo = [100,101])
trigger2 = var(6)

[State -1, Aerial Drill Claw 180°]
type = ChangeState
value = 1400
triggerAll = !AILevel
TriggerAll = !var(55)
triggerAll = command = "Drill Claw"
triggerAll = RoundState = 2 && StateType = A
trigger1 = ctrl || StateNo = 40 || StateNo = 52 || (StateNo = [100,101])
trigger2 = var(6)

[State -1, Ground Drill Claw 45°]
type = ChangeState
value = 1340
triggerAll = !AILevel
triggerAll = command = "Drill Claw" && command = "holdup" && command = "holdback"
triggerAll = RoundState = 2 && StateType != A
trigger1 = ctrl || StateNo = 40 || StateNo = 52 || (StateNo = [100,101])
trigger2 = var(6)

[State -1, Ground Drill Claw 180°]
type = ChangeState
value = 1330
triggerAll = !AILevel
triggerAll = command = "Drill Claw" && command = "holdback"
triggerAll = RoundState = 2 && StateType != A
trigger1 = ctrl || StateNo = 40 || StateNo = 52 || (StateNo = [100,101])
trigger2 = var(6)

[State -1, Ground Drill Claw 45°]
type = ChangeState
value = 1320
triggerAll = !AILevel
triggerAll = command = "Drill Claw" && command = "holdup" && command = "holdfwd"
triggerAll = RoundState = 2 && StateType != A
trigger1 = ctrl || StateNo = 40 || StateNo = 52 || (StateNo = [100,101])
trigger2 = var(6)

[State -1, Ground Drill Claw 90°]
type = ChangeState
value = 1310
triggerAll = !AILevel
triggerAll = command = "Drill Claw" && command = "holdup"
triggerAll = RoundState = 2 && StateType != A
trigger1 = ctrl || StateNo = 40 || StateNo = 52 || (StateNo = [100,101])
trigger2 = var(6)

[State -1, Ground Drill Claw 180°]
type = ChangeState
value = 1300
triggerAll = !AILevel
triggerAll = command = "Drill Claw"
triggerAll = RoundState = 2 && StateType != A
trigger1 = ctrl || StateNo = 40 || StateNo = 52 || (StateNo = [100,101])
trigger2 = var(6)

[State -1, Beserker Slash]
type = ChangeState
value = 1200
triggerAll = !AILevel
triggerAll = command = "Beserker Slash"
triggerAll = RoundState = 2 && StateType != A
trigger1 = ctrl || StateNo = 40 || StateNo = 52 || (StateNo = [100,101])
trigger2 = var(6)

[State -1, Tornado Claw]
type = ChangeState
value = 1100
triggerAll = !AILevel
triggerAll = command = "Tornado Claw"
triggerAll = RoundState = 2 && StateType != A
trigger1 = ctrl || StateNo = 40 || StateNo = 52 || (StateNo = [100,101])
trigger2 = var(6)

[State -1, Beserker Barrage]
type = ChangeState
value = 1000
triggerAll = !AILevel
triggerAll = command = "Beserker Barrage"
triggerAll = RoundState = 2 && StateType != A
trigger1 = ctrl || StateNo = 40 || StateNo = 52 || (StateNo = [100,101])
trigger2 = var(6)

[State -1, Roll Forward]
type = ChangeState
value = 710
triggerAll = !AILevel
triggerAll = command = "a+x"
triggerAll = RoundState = 2 && StateType != A
trigger1 = (ctrl || (StateNo = [100,101])) && command = "holdfwd"

[State -1, Roll Backward]
type = ChangeState
value = 715
triggerAll = !AILevel
triggerAll = command = "a+x"
triggerAll = RoundState = 2 && StateType != A
trigger1 = (ctrl || (StateNo = [100,101])) && command = "holdback"

[State -1, Dodge]
type = ChangeState
value = 700
triggerAll = !AILevel
triggerAll = command = "a+x"
triggerAll = RoundState = 2 && StateType != A
trigger1 = (ctrl || (StateNo = [100,101]))
 
[State -1, MAX Mode]
type = ChangeState
value = 900
triggerAll = !AILevel
triggerall = RoundState = 2 && StateType != A
triggerall = var(20) <= 0 && Power >= 1000
triggerall = command = "c+z"
trigger1 = ctrl || (Stateno = [100,101])
trigger2 = Var(6)
 
[State -1, Throw]
type = ChangeState
value = 800
triggerAll = !AILevel
trigger1 = (command = "holdfwd" || command = "holdback") && (command = "pp" || command = "kk")
trigger1 = RoundState = 2 && StateType = S
trigger1 = ctrl

[State -1, Air Throw]
type = ChangeState
value = 850
triggerAll = !AILevel
triggerAll = RoundState = 2 && StateType = A
triggerAll = ctrl && pos y <= -32
trigger1 = (command = "holdfwd" || command = "holdback") && command = "pp"

[State -1, Zero Counter]
type = ChangeState
value = 750
triggerAll = !AILevel
trigger1 = StateNo = 150 || StateNo = 152
trigger1 = command = "412p" || command = "412k"
trigger1 = RoundState = 2 && StateType != A
trigger1 = power >= 1000 && !var(20)

[State -1, Power Charge]
type = ChangeState
value = 730
triggerAll = !AILevel
trigger1 = command = "holdb" && command = "holdy"
trigger1 = RoundState = 2 && StateType != A
trigger1 = power < const(data.power) && power < PowerMax && !var(20) && !var(14)
trigger1 = ctrl || (StateNo = [100,101])

[State -1, Standing Light Punch]
type = ChangeState
value = 200
triggerAll = !AILevel
triggerAll = command != "holddown" && command = "x"
triggerAll = StateType != A
trigger1 = ctrl || (StateNo = [100,101])
 
[State -1, Standing Medium Punch]
type = ChangeState
value = 210
triggerAll = !AILevel
triggerAll = command != "holddown" && command = "y"
triggerAll = StateType != A
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = ((StateNo = [200,209]) || (StateNo = [230,239]) ||(StateNo = [400,409])||(StateNo =[430,439])) &&Movecontact
 
[State -1, Standing Medium Punch]
type = ChangeState
value = 215
triggerAll = !AILevel
triggerAll = command != "holddown" && command = "y"
triggerAll = StateType != A
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = StateNo = 210 && AnimElemTime(7) < 0

[State -1, Standing Heavy Punch]
type = ChangeState
value = 220
triggerAll = !AILevel
triggerAll = command != "holddown" && command = "z"
triggerAll = StateType != A
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = ((StateNo = [200,219]) || (StateNo = [230,239]) || (StateNo = [400,419]) || (StateNo = [430,439])) &&Movecontact
 
[State -1, Standing Light Kick]
type = ChangeState
value = 230
triggerAll = !AILevel
triggerAll = command != "holddown" && command = "a"
triggerAll = StateType != A
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = (StateNo = [200,209])  &&Movecontact
 


[State -1, Standing Medium Kick]
type = ChangeState
value = 240 + (command = "holdfwd") * 5
triggerAll = !AILevel
triggerAll = command != "holddown" && command = "b"
triggerAll = StateType != A
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = ((StateNo = [200,249]) || (StateNo = [400,449])) &&Movecontact
 [State -1, Standing Heavy Kick]
type = ChangeState
value = 250
triggerAll = !AILevel
triggerAll = command != "holddown" && command = "c"
triggerAll = StateType != A
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = ((StateNo = [200,249]) || (StateNo = [400,449])) &&Movecontact
 
[State -1, Crouching Light Punch]
type = ChangeState
value = 400
triggerAll = !AILevel
triggerAll = command = "holddown" && command = "x"
triggerAll = StateType != A
trigger1 = ctrl || (StateNo = [100,101])
 
[State -1, Crouching Medium Punch]
type = ChangeState
value = 410
triggerAll = !AILevel
triggerAll = command = "holddown" && command = "y"
triggerAll = StateType != A
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = ((StateNo = [200,219]) || (StateNo = [230,239]) || (StateNo = [400,409]) || (StateNo = [430,439]))  &&Movecontact
;trigger3 = var(4) 

[State -1, Crouching Heavy Punch]
type = ChangeState
value = 420 + (command = "holdfwd") * 5
triggerAll = !AILevel
triggerAll = command = "holddown" && command = "z"
triggerAll = StateType != A
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = ((StateNo = [200,219]) || (StateNo = [230,239]) || (StateNo = [400,419]) || (StateNo = [430,439]))  &&Movecontact
;trigger3 = var(4) 

[State -1, Crouching Light Kick]
type = ChangeState
value = 430
triggerAll = !AILevel
triggerAll = command = "holddown" && command = "a"
triggerAll = StateType != A
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = (StateNo = 200 || StateNo = 230) && (MoveContact && AnimElemTime(6) >= 0)
;trigger3 = var(4) 

[State -1, Crouching Medium Kick]
type = ChangeState
value = 440
triggerAll = !AILevel
triggerAll = command = "holddown" && command = "b"
triggerAll = StateType != A
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = ((StateNo = [200,219]) || (StateNo = [230,239]) || (StateNo = [400,419]) || (StateNo = [430,439])) &&Movecontact
;trigger3 = var(4) 

[State -1, Crouching Heavy Kick]
type = ChangeState
value = 450
triggerAll = !AILevel
triggerAll = command = "holddown" && command = "c"
triggerAll = StateType != A
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = ((StateNo = [200,249]) || (StateNo = [400,449])) &&Movecontact

[State -1, Jumping Light Punch]
type = ChangeState
value = 600
triggerAll = !AILevel
triggerAll = command = "x"
triggerAll = StateType = A
trigger1 = ctrl  

[State -1, Jumping Medium Punch]
type = ChangeState
value = 610
triggerAll = !AILevel
triggerAll = command = "y"
triggerAll = StateType = A
trigger1 = ctrl  
trigger2 = (MoveContact = [1,4]) && (var(3) != [1,2]) && (StateNo = 600 || StateNo = 630) && var(47)
;trigger3 = var(4)

[State -1, Jumping Medium Punch]
type = ChangeState
value = 615
triggerAll = !AILevel
triggerAll = command = "y"
triggerAll = StateType = A
trigger1 = ctrl  
trigger2 = (MoveContact = [1,4]) && (var(3) != [1,2]) && (StateNo = 600 || StateNo = 630) && var(47)
trigger3 = StateNo = 610 && AnimElemTime(7) < 0
trigger4 = var(4)

[State -1, Jumping Heavy Punch]
type = ChangeState
value = 620
triggerAll = !AILevel
triggerAll = command = "z"
triggerAll = StateType = A
trigger1 = ctrl  
trigger2 = (MoveContact = [1,4]) && (var(3) != [1,2]) && (StateNo = 600 || StateNo = 610 || StateNo = 620 || StateNo = 630 || StateNo = 640) && var(47)
;trigger3 = var(4)

[State -1, Jumping Light Kick]
type = ChangeState
value = 630
triggerAll = !AILevel
triggerAll = command = "a"
triggerAll = StateType = A
trigger1 = ctrl  
trigger2 = (MoveContact = [1,4]) && (var(3) != [1,2]) && StateNo = 600

[State -1, Jumping Dive Kick]
type = ChangeState
value = 645
triggerAll = !AILevel
triggerAll = command = "holddown" && command = "holdfwd" && command = "b"
triggerAll = StateType = A
trigger1 = ctrl 
trigger2 = (MoveContact = [1,4]) && (var(3) != [1,2]) && (StateNo = 600 || StateNo = 630) && var(47)
;trigger3 = var(4)

[State -1, Jumping Dive Kick]
type = ChangeState
value = 655
triggerAll = !AILevel
triggerAll = command = "holddown" && command = "c"
triggerAll = StateType = A
trigger1 = ctrl  
trigger2 = (MoveContact = [1,4]) && (var(3) != [1,2]) && (StateNo = 600 || StateNo = 610 || StateNo = 620 || StateNo = 630 || StateNo = 640) && var(47)
;trigger3 = var(4)
[State -1, Jumping Medium Kick]
type = ChangeState
value = 640
triggerAll = !AILevel
triggerAll = command = "b"
triggerAll = StateType = A
trigger1 = ctrl  
trigger2 = (MoveContact = [1,4]) && (var(3) != [1,2]) && (StateNo = 600 || StateNo = 630) && var(47)
;trigger3 = var(4)
[State -1, Jumping Heavy Kick]
type = ChangeState
value = 650
triggerAll = !AILevel
triggerAll = command = "c"
triggerAll = StateType = A
trigger1 = ctrl  
trigger2 = (MoveContact = [1,4]) && (var(3) != [1,2]) && (StateNo = 600 || StateNo = 610 || StateNo = 620 || StateNo = 630 || StateNo = 640) && var(47)
;trigger3 = var(4)
[State -1, Taunt]
type = ChangeState
value = 195
triggerAll = !AILevel
triggerAll = command = "start"
triggerAll = StateType != A
triggerAll = StateNo != [200,699]
trigger1 = ctrl || (StateNo = [100,101])

[State -1, Dash Forward/Run]
type = ChangeState
value = 110
triggerAll = !AILevel
trigger1 = command = "FF"
trigger1 = roundstate = 2 && StateType = S
trigger1 = ctrl

[State -1, Dash Backward]
type = ChangeState
value = 105
triggerAll = !AILevel
trigger1 = command = "BB"
trigger1 = RoundState = 2 && StateType = S
trigger1 = ctrl

[State -1, Wall Jump Forward]
type = ChangeState
value = 60
triggerAll = RoundState = 2 && StateType = A
trigger1 = command = "holdup" && command = "holdfwd"
trigger1 = BackEdgeBodyDist <= 0
trigger1 = vel x < 0 && pos y <= -92
trigger2 = command = "holdup" && command = "holdback"
trigger2 = FrontEdgeBodyDist <= 10
trigger2 = vel x > 0 && pos y <= -92
ctrl = 0


;---------------------------------------------------------------------------
[State -1, Idle]
type = changestate
value = 0
triggerall = AIlevel && numenemy&&roundstate = 2 && statetype != A && enemynear, movetype = A && (p2stateno=[5100,5220])
trigger1=ctrl

[State -1, run]
type = changestate
value = 100
trigger1 = AIlevel && numenemy
trigger1 = statetype = S && roundstate = 2 && ctrl && random < (400 * (AIlevel ** 2 / 64.0))
trigger1 = (stateno != [100, 105]) && enemynear, movetype != A && p2bodydist x > 120

[State -1, dash]
type = changestate
value = 105
triggerall = AIlevel && numenemy
triggerall = statetype = S && roundstate = 2 && ctrl
triggerall = (p2bodydist x = [0, 80]) && backedgebodydist > 80 && (stateno != [100, 105])
trigger1 = enemynear, movetype = A && random < (50 * (AIlevel ** 2 / 64.0))
trigger2 = enemynear, stateno = 5120 && enemynear, animtime = -3 && 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,AI Air Guard]
type = ChangeState
value = 132
triggerall = AIlevel && numenemy&& roundstate = 2&&InGuardDist
triggerall = ctrl&&statetype = A
trigger1 = enemynear,numproj
trigger2 = enemynear,HitDefAttr = SCA, NA,SA,HA
trigger2 = random <=ifelse(backedgedist<=10,950,800)

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

[State -1, Guard]
type = ChangeState
value = 120
triggerall= AILevel && numenemy&& (StateNo!=[120,155]) && !(enemynear,ctrl) && random < (600 * (AIlevel ** 2 / 64.0))
triggerall= Ctrl||stateno = 21
triggerall=enemynear,Movetype=A && !(enemynear,hitdefattr=SCA,AT) 
trigger1 = inguarddist
 
[State -1, Zero Counter]
type = changestate
value = 750
trigger1 = AIlevel && numenemy
trigger1 = (p2dist x = [-90, 90]) && stateno = 150 || stateno = 152
trigger1 = roundstate = 2 && power >= 2000 && !var(20) && !var(24) && life < 500 && random < (10 * (AIlevel ** 2 / 64.0))

[State -1, powercharge]
type = changestate
value = 730
trigger1 = AIlevel && numenemy
trigger1 = roundstate = 2 && statetype != A && ctrl
trigger1 = power < const(data.power) && power < powermax && !var(20)
trigger1 = random < (50 * (AIlevel ** 2 / 64.0)) && !inguarddist && p2movetype != A && p2dist x >= 160

[State -1, roll / dodge]
type = changestate
value = ifelse(random < 600, 700, 710)
trigger1 = AIlevel && numenemy
trigger1 = roundstate = 2 && statetype != A && ctrl && random < (50 * (AIlevel ** 2 / 64.0))
trigger1 = enemynear, movetype = A && p2bodydist x < 100

[State -1, airrecover]
type=changestate
value=ifelse((pos y>=-20),5200,5210)
triggerall= AILevel && numenemy
triggerall= roundstate=2 && stateno=5050
trigger1= vel y>-1 && alive && canrecover && random < (250 * (AIlevel ** 2 / 64.0))
;-------------------------------------------------------------------
[State -1, Throw]
type = ChangeState
value = 800
triggerall = AILevel&&random < (500 * (AIlevel ** 2 / 64.0)) && !var(20)
triggerall = roundstate=2&&statetype!=A&& enemynear,statetype!=L&&(enemynear,stateno!=[5120,5201])
triggerall = enemynear,movetype!=H&&enemynear,statetype!=A&&enemynear,Hitover&&(p2bodydist x =[0,30])
triggerall = ctrl||stateno=100||stateno=52
trigger1 = random>=800
trigger2 = enemynear,stateno=[120,155]
trigger2 = random>=500
trigger3 = stateno=100
trigger4=(p2bodydist x=[0,30])&&random<250
trigger5=(p2stateno=[120,155])&&(p2bodydist x=[0,30])&&random<500
;-------------------------------------------------------------------
[State -1, Air Throw]
type = ChangeState
value = 850
triggerall = AILevel&&random < (500 * (AIlevel ** 2 / 64.0)) && !var(20)
triggerall = roundstate=2&&statetype=A&& enemynear,statetype!=L&&(enemynear,stateno!=[5120,5201])
triggerall = enemynear,movetype!=H&&enemynear,statetype=A&&enemynear,Hitover&&(p2bodydist x =[0,30])&&(p2bodydist y =[-50,0])
triggerall = ctrl
trigger1 = random>=800
trigger2 = enemynear,stateno=[120,155]
trigger2 = random>=500
trigger3=(p2bodydist x=[0,30])&&random<250
trigger4=(p2stateno=[120,155])&&(p2bodydist x=[0,30])&&random<500


[State -1, AI 770 MAX Mode]
type = ChangeState
value = 900
trigger1 = ailevel && numenemy
triggerall = RoundState = 2 && StateType != A
triggerall = var(20) <= 0 && Power >= 2000
; condition
trigger1 = ctrl || (Stateno = [100,101])
trigger1 = !inguarddist && p2bodydist x >= const240p(100)
trigger1 = enemynear, gethitvar(fall) || (p2stateno = [5050, 5110])
trigger1 = enemynear, life > enemynear, lifemax / 4.0
trigger1 = power >= 1500
trigger1 = life >= 350
trigger1 = power < 3000
trigger1 = random < (100 * (ailevel ** 2.0 / 64.0))
;------------------------------------------------------------------------
[State -1, Standing Low Punch AI]
type = ChangeState
value = 200
triggerall = AILevel && numenemy&&roundstate=2&&StateType != A
triggerall = (p2bodydist x = [0, 50])&&(p2bodydist y = [-80,5])&&P2statetype != A&&P2statetype != C&&P2statetype != L&& random < (750 * (AIlevel ** 2 / 64.0))
trigger1 = ctrl
trigger2 = (stateno = [100,101]) && random < 750
trigger3 = stateno=200&&movecontact&&random < 100
;---------------------------------------------------------------------------
[State -1, Standing Medium Punch AI]
type = ChangeState
value = 210
triggerall = AILevel && numenemy && roundstate=2 && StateType != A && P2statetype != A && P2statetype != C
triggerall = (p2bodydist x = [0, 50]) && p2statetype != L && !(enemynear, hitfall)
trigger1 = ctrl && random < (450 * (AIlevel ** 2 / 64.0))
trigger2 = ((stateno = [200,209])|| (stateno = [230,239])||(stateno = [400,409])||(stateno = [430,439]))&& movehit
trigger2 = random < 350
;trigger3 = var(4)
;---------------------------------------------------------------------------
[State -1, Standing Medium Punch 2 AI]
type = ChangeState
value = 215
triggerall = AILevel && numenemy && roundstate=2 && StateType != A && P2statetype != A && P2statetype != C
triggerall = (p2bodydist x = [0, 50]) && p2statetype != L && !(enemynear, hitfall)
trigger1 = ctrl && random < (450 * (AIlevel ** 2 / 64.0))
trigger2 = stateno = 210 && AnimElemTime(7) < 0 && movehit
trigger2 = random < 350
;---------------------------------------------------------------------------
[State -1, Standing High Punch AI]
type = ChangeState
value = 220
triggerall = AILevel && numenemy && roundstate=2 && StateType != A
triggerall = (p2bodydist x = [0, 55]) && (p2bodydist y = [ -90, 80]) && p2statetype != L && !(enemynear, hitfall)
trigger1 = ctrl && random < (350 * (AIlevel ** 2 / 64.0))
trigger2 = ((stateno = [210,211])|| (stateno = [245,249])||(stateno = [410,419])||(stateno = [440,449]))&& movehit
trigger2 = random < 750
;trigger3 = var(4)
;---------------------------------------------------------------------------
[State -1, Standing Low Kick AI]
type = ChangeState
value = 230
triggerall = AILevel && numenemy && roundstate=2 && StateType != A && P2statetype != A
triggerall = (p2bodydist x = [0, 50]) && p2statetype != L && !(enemynear, hitfall)
trigger1 = ctrl && random < (500 * (AIlevel ** 2 / 64.0))
trigger2 = ((stateno = [200,209])|| (stateno = [400,409]))&& movehit
trigger2 = random < 300
trigger3 = (stateno = [100,101]) && random < 200
trigger4 = var(4)
;---------------------------------------------------------------------------
[State -1, Standing Medium Kick AI]
type = ChangeState
value = 245
triggerall = AILevel && numenemy && roundstate=2 && StateType != A && P2statetype != A && P2statetype != C
triggerall = (p2bodydist x = [0, 55]) && p2statetype != L && !(enemynear, hitfall)
trigger1 = ctrl && random < (300 * (AIlevel ** 2 / 64.0))
trigger2 = ((stateno = [210,211])|| (stateno = [230,239])||(stateno = [410,419])||(stateno = [430,439]))&& movehit
trigger2 = random < 350
;trigger3 = var(4)
;---------------------------------------------------------------------------
[State -1, Standing High Kick AI]
type = ChangeState
value = 250
triggerall = AILevel && numenemy && roundstate=2 && StateType != A && P2statetype != C
triggerall = (p2bodydist x = [0, 60]) && (p2bodydist y = [ -60, 50]) && p2statetype != L && !(enemynear, hitfall)
trigger1 = ctrl && random < (300 * (AIlevel ** 2 / 64.0))
trigger2 = ((stateno = [245,249])|| (stateno = [440,449]))&& movehit 
trigger2 = random < 800
;trigger3 = var(4)
;---------------------------------------------------------------------------
[State -1, Crouching Low Punch]
type = ChangeState
value = 400
triggerall = AILevel && numenemy && roundstate=2 && StateType != A
triggerall = (p2bodydist x = [0, 40]) &&(p2bodydist y = [-50,25]) && P2statetype != A && P2statetype != L && !(enemynear, hitfall)
trigger1 = ctrl && random < (100 * (AIlevel ** 2 / 64.0))
trigger2 = stateno = [100,101]
;trigger3 = var(4)
;---------------------------------------------------------------------------
[State -1, Crouching Medium Punch]
type = ChangeState
value = 410
triggerall = AILevel && numenemy && roundstate=2 && StateType != A
triggerall = (p2bodydist x = [0, 55]) &&(p2bodydist y = [-50,25]) && P2statetype != A && P2statetype != L && !(enemynear, hitfall)
trigger1 = ctrl && random < (150 * (AIlevel ** 2 / 64.0))
trigger2 = ((stateno = [200,209])|| (stateno = [230,239])||(stateno = [400,409])||(stateno = [430,439]))&& movehit
trigger2 = random < 800
;trigger3 = var(4)
;---------------------------------------------------------------------------
[State -1, Crouching High Punch]
type = ChangeState
value = 420
triggerall = AILevel && numenemy && roundstate=2 && StateType != A
triggerall = (p2bodydist x = [0, 70]) &&(p2bodydist y = [-80,5]) && P2statetype != L && !(enemynear, hitfall)
trigger1 = ctrl && random < (125 * (AIlevel ** 2 / 64.0))
trigger2 = ((stateno = [210,211])|| (stateno = [245,249])||(stateno = [410,419])||(stateno = [440,449]))&& movehit
trigger2 = random < 600
;trigger3 = var(4)

[State -1,CFHP]
type = ChangeState
value = 425
triggerall = AILevel && numenemy && roundstate=2 && StateType != A
triggerall = p2statetype = S && random <= 250
trigger1 = stateno = 440 && animelemtime(3) > 0 && moveguarded
trigger2 = stateno = 210 && animelemtime(3) > 0 && movecontact
trigger3 = stateno = 210 && animelemtime(3) > 0 && moveguarded
;trigger4 = var(4)
;---------------------------------------------------------------------------
[State -1, Crouching Low Kick]
type = ChangeState
value = 430
triggerall = AILevel && numenemy && roundstate=2 && StateType != A
triggerall = (p2bodydist x = [0, 35]) &&(p2bodydist y = [-50,25]) && P2statetype != A && P2statetype != L && !(enemynear, hitfall)
trigger1 = ctrl && random < (50 * (AIlevel ** 2 / 64.0))
trigger2 = ((stateno = [200,209])|| (stateno = [400,409]))&& movehit
;trigger3 = var(4)
;---------------------------------------------------------------------------
[State -1, Crouching Medium Kick]
type = ChangeState
value = 440
triggerall = AILevel && numenemy && roundstate=2 && StateType != A
triggerall = (p2bodydist x = [0, 45]) &&(p2bodydist y = [-50,25]) && P2statetype != A && P2statetype != L && !(enemynear, hitfall)
trigger1 = ctrl && random < (75 * (AIlevel ** 2 / 64.0))
trigger2 = ((stateno = [210,211])|| (stateno = [230,239])||(stateno = [410,419])||(stateno = [430,439]))&& movehit
trigger2 = random < 350
;trigger3 = var(4)
;---------------------------------------------------------------------------
[State -1, Crouching High Kick]
type = ChangeState
value = 450
triggerall = AILevel && numenemy && roundstate=2 && StateType != A && P2statetype != A
triggerall = (p2bodydist x = [0, 55]) && (p2bodydist y = [ -50, 50]) && p2statetype != L && p2statetype = S && !(enemynear, hitfall)
trigger1 = ctrl && random < (100 * (AIlevel ** 2 / 64.0))
trigger2 = ((stateno = [220,229])|| (stateno = [245,249])||(stateno = [420,429])||(stateno = [440,449]))&& movehit
trigger2 = random < 900
;trigger3 = var(4)
;---------------------------------------------------------------------------
[State -1, Jumping Low Punch]
type = ChangeState
value = 600
triggerall = AILevel && numenemy&&roundstate=2&&statetype = A && (p2bodydist x = [0,60]) && (p2bodydist y = [ -50, 50]) && p2statetype != L
trigger1 = ctrl && random < (500 * (AIlevel ** 2 / 64.0))
;trigger2 = var(4)
;---------------------------------------------------------------------------
[State -1, Jumping Medium Punch]
type = ChangeState
value = 610
triggerall = AILevel && numenemy&&roundstate=2&&statetype = A && (p2bodydist x = [0, 70]) && (p2bodydist y = [ -50, 50]) && p2statetype != L 
trigger1 = ctrl && random < (ifelse((vel x > 0 && p2statetype = A), 250, 125) * (AIlevel ** 2 / 64.0)) 
;trigger2 = (stateno = [600,609])&& movehit && random < 750
;trigger3 = (stateno = [630,639])&& movehit && random < 250
;trigger4 = var(4)
;---------------------------------------------------------------------------
[State -1, Jumping Medium Punch 2]
type = ChangeState
value = 615
triggerall = AILevel && numenemy&&roundstate=2&&statetype = A && (p2bodydist x = [0, 70]) && (p2bodydist y = [ -50, 50]) && p2statetype != L 
trigger1 = ctrl && random < (ifelse((vel x > 0 && p2statetype = A), 250, 125) * (AIlevel ** 2 / 64.0)) 
;trigger2 = stateno = 610 && AnimElemTime(7) < 0 && movehit && random < 750
;trigger3 = var(4)
;---------------------------------------------------------------------------
[State -1, Jumping High Punch]
type = ChangeState
value = 620
triggerall = AILevel && numenemy&&roundstate=2&&statetype = A && (p2bodydist x = [0, 100]) && (p2bodydist y = [ -80, 50]) && p2statetype != L 
trigger1 = ctrl && random < (150 * (AIlevel ** 2 / 64.0)) && !(enemynear, hitfall)
;trigger2 = (stateno = [610,619])&& movehit && random < 700
;trigger3 = (stateno = [640,649])&& movehit && random < 200
;trigger4 = var(4)
;---------------------------------------------------------------------------
[State -1, Jumping Low Kick]
type = ChangeState
value = 630
triggerall = AILevel && numenemy&&roundstate=2&&statetype = A && (p2bodydist x = [0, 70]) && (p2bodydist y = [ -50, 50]) && p2statetype != L 
trigger1 = ctrl && random < (50 * (AIlevel ** 2 / 64.0))
;trigger2 = (stateno = [600,609])&& movehit && random < 250
;trigger3 = var(4)
;---------------------------------------------------------------------------
[State -1, Jumping Medium Kick]
type = ChangeState
value = 640
triggerall = AILevel && numenemy&&roundstate=2&&statetype = A && (p2bodydist x = [0, 90]) && (p2bodydist y = [ -50, 50]) && p2statetype != L 
trigger1 = ctrl && random < (250 * (AIlevel ** 2 / 64.0)) && !(enemynear, hitfall)
;trigger2 = (stateno = [610,619])&& movehit && random < 100
;trigger3 = (stateno = [630,639])&& movehit && random < 750
;trigger4 = var(4)
;---------------------------------------------------------------------------
[State -1, Jumping High Kick]
type = ChangeState
value = 650
triggerall = AILevel && numenemy &&roundstate=2&&statetype = A && (p2bodydist x = [0, 130]) && (p2bodydist y = [ -50, 50]) && p2statetype != L 
trigger1 = ctrl && random < (250 * (AIlevel ** 2 / 64.0)) && !(enemynear, hitfall) 
;trigger2 = (stateno = [610,619])&& movehit && random < 250
;
;trigger3 = (stateno = [640,649])&& movehit && random < 750
;trigger4 = var(4)
[State -1, Jumping Dive Kick]
type = ChangeState
value = 645
triggerAll = AILevel && NumEnemy
triggerAll = RoundState = 2 && StateType = A
triggerall = pos y <= -92
trigger1 = ctrl && stateno != 52 && (p2bodydist x = [45,80]) 
trigger1 = random <= 100 
trigger2 = stateno = 615 && animelemtime(3) > 0 && movecontact && p2bodydist y <= 80 
;trigger3 = var(4)

[State -1, Jumping Dive Kick2]
type = ChangeState
value = 655
triggerAll = AILevel && NumEnemy
triggerAll = RoundState = 2 && StateType = A
triggerall = pos y <= -92 && random <= 500 
trigger1 = ctrl && stateno != 52 && (p2bodydist x = [-20,5]) 
trigger2 = var(4)

;======================================================================
[State -1, Weapon X]
type=ChangeState
value=3300
triggerall=AILevel && numenemy && RoundState=2 && StateType != A &&var(20)<=60 && power >= 3000 && random < (450 * (AIlevel ** 2 / 64.0))
triggerall=(enemynear,stateno!=[5030,5220])&&(enemynear,stateno!=[120,155])&&(p2bodydist x =[25,140])&&(p2bodydist y=[-80,5])
triggerall=(enemynear,Statetype!=A) && (enemynear,Statetype!=C)
triggerall=!var(14)
trigger1=ctrl || StateNo=40 || StateNo=52 || (StateNo=[100,101])

;----------------------------------------------------------------------
[State -1, Fatal Claw]
type=ChangeState
value=3250;Ifelse(power>=2000&&random<=750,3250,3200)
triggerall=AILevel && numenemy && RoundState=2 && (stateno!=[3200,3205]) && StateType != A && var(20)<=60 && power >= 1000 && random < (200 * (AIlevel ** 2 / 64.0))
triggerall=(enemynear,statetype != L) &&(enemynear,stateno!=[5100,5220])&&(enemynear,stateno!=[120,155])&&(p2bodydist x =[10,75])&&(p2bodydist y=[-80,5])
triggerall=(enemynear,Statetype!=A) && (enemynear,Statetype!=C)
trigger1=ctrl || StateNo=40 || StateNo=52 || (StateNo=[100,101])
trigger2=var(8)
[State -1, Fatal Claw]
type=ChangeState
value=3200;Ifelse(power>=2000&&random<=750,3250,3200)
triggerall=AILevel && numenemy && RoundState=2 && (stateno!=[3200,3205]) && StateType != A && var(20)<=60 && power >= 1000 && random < (200 * (AIlevel ** 2 / 64.0))
triggerall=(enemynear,statetype != L) &&(enemynear,stateno!=[5100,5220])&&(enemynear,stateno!=[120,155])&&(p2bodydist x =[10,75])&&(p2bodydist y=[-80,5])
triggerall=(enemynear,Statetype!=A) && (enemynear,Statetype!=C)
trigger1=ctrl || StateNo=40 || StateNo=52 || (StateNo=[100,101])
trigger2=var(7)
;----------------------------------------------------------------------
[State -1, Beserker Barrage X]
type=ChangeState
value=3050
triggerall=AILevel && numenemy && RoundState=2 && (stateno!=[3000,3005]) && StateType != A && var(20)<=60 && power >= 1000 && random < (250 * (AIlevel ** 2 / 64.0))
triggerall=(enemynear,statetype != L) &&(enemynear,stateno!=[5100,5220])&&(enemynear,stateno!=[120,155])&&(p2bodydist x =[5,50])&&(p2bodydist y=[-80,5])
triggerall=(enemynear,Statetype!=A) && (enemynear,Statetype!=C)
trigger1=ctrl || StateNo=40 || StateNo=52 || (StateNo=[100,101])
trigger2=var(8)
[State -1, Beserker Barrage X]
type=ChangeState
value=Ifelse(power>=2000&&random<=500,3050,3000)
triggerall=AILevel && numenemy && RoundState=2 && (stateno!=[3000,3005]) && StateType != A && var(20)<=60 && power >= 1000 && random < (250 * (AIlevel ** 2 / 64.0))
triggerall=(enemynear,statetype != L) &&(enemynear,stateno!=[5100,5220])&&(enemynear,stateno!=[120,155])&&(p2bodydist x =[5,50])&&(p2bodydist y=[-80,5])
triggerall=(enemynear,Statetype!=A) && (enemynear,Statetype!=C)
trigger1=ctrl || StateNo=40 || StateNo=52 || (StateNo=[100,101])
trigger2=var(7)
;----------------------------------------------------------------------
[State -1, Healing Factor X]
type=ChangeState
value=Ifelse(power>=2000&&random<=500,3550,3500)
triggerall=AILevel && numenemy && RoundState=2 && (stateno!=3500) && StateType != A && var(20)<=60 && power >= 1000 && random < (100 * (AIlevel ** 2 / 64.0))
triggerall=(enemynear,stateno=[5030,5170])&&(enemynear,stateno!=[120,155])&&(p2bodydist x >=150)
triggerall = life < 500
triggerall=!var(14)
trigger1=ctrl|| StateNo=40 || StateNo=52 || (StateNo=[100,101])
trigger2=var(7)
[State -1, Air Fatal Claw]
type=ChangeState
value=3280;Ifelse(power>=2000&&random<=500,3280,3230)
triggerall=AILevel && numenemy && RoundState=2 && StateType = A && (stateno!=3230) && Pos y<=-15 && var(20) <= 60 && power >= 1000 && random < (150 * (AIlevel ** 2 / 64.0))
triggerall=(enemynear,stateno!=[5120,5220])&&(enemynear,stateno!=[120,155])&&(p2bodydist x =[10,75])&&(p2bodydist y=[-20,255])&&(enemynear,Statetype!=C)
trigger1=ctrl
trigger2=var(8)
trigger3=(stateno=[600,650]) && movecontact

;----------------------------------------------------------------------
[State -1, Air Fatal Claw]
type=ChangeState
value=3230;Ifelse(power>=2000&&random<=500,3280,3230)
triggerall=AILevel && numenemy && RoundState=2 && StateType = A && (stateno!=3230) && Pos y<=-15 && var(20) <= 60 && power >= 1000 && random < (150 * (AIlevel ** 2 / 64.0))
triggerall=(enemynear,stateno!=[5120,5220])&&(enemynear,stateno!=[120,155])&&(p2bodydist x =[10,75])&&(p2bodydist y=[-20,255])&&(enemynear,Statetype!=C)
trigger1=ctrl
trigger2=var(7)
trigger3=(stateno=[600,650]) && movecontact

;----------------------------------------------------------------------
[State -1, Beserker Charge]
type=ChangeState
value=Ifelse(power>=1000&&random<=500,3100,3100)
triggerall=AILevel && numenemy && RoundState=2 && (stateno!=3100) && StateType != A && var(20)<=60 && power >= 1000 && random < (100 * (AIlevel ** 2 / 64.0))
triggerall=(enemynear,statetype != L) &&(enemynear,stateno!=[5100,5220])&&(enemynear,stateno!=[120,155])&&(p2bodydist x =[5,50])&&(p2bodydist y=[-80,5])&&(enemynear,Statetype!=A)
triggerall=!var(14)
trigger1=ctrl|| StateNo=40 || StateNo=52 || (StateNo=[100,101])
trigger2=var(7)

;=======================================================================
[State -1, Tornado Claw]
type=ChangeState
value=Ifelse(power>=500&&random<=250,1150,1100)
triggerall=AILevel && numenemy && RoundState=2 && StateType != A&&(enemynear,statetype != L)&&(enemynear,stateno!=[5100,5220])&&random < (250 * (AIlevel ** 2 / 64.0))
triggerall=(enemynear,stateno!=[120,155])&&(enemynear,statetype!=C) && (p2bodydist x =[5,60])&&(p2bodydist y=[-140,5])
triggerall=var(20) <= 60 && !var(14)
trigger1=ctrl || StateNo=40 || StateNo=52 || (StateNo=[100,101])
trigger2=var(6)
;-----------------------------------------------------------------------
[State -1, Beserker Slash]
type=ChangeState
value=Ifelse(power>=500&&random<=100,1250,1200)
triggerall=AILevel && numenemy && RoundState=2 && StateType != A && (p2bodydist x =[75,125])&&(p2bodydist y=[-80,5])&&random < (200 * (AIlevel ** 2 / 64.0))
triggerall=(enemynear,stateno!=[120,155])&&(enemynear,statetype!=L)&&(enemynear,statetype=S)
triggerall=var(20) <= 60 && !var(14)
trigger1=ctrl || StateNo=40 || StateNo=52 || (StateNo=[100,101])
trigger2=var(6)

;-----------------------------------------------------------------------
[State -1, Beserker Barrage]
type=ChangeState
value=Ifelse(power>=500&&enemynear,statetype != L&&random<=150,1050,1000)
triggerall=AILevel && numenemy && RoundState=2 && StateType != A && (enemynear,stateno!=[5120,5220]) && random < (250 * (AIlevel ** 2 / 64.0))
triggerall=(enemynear,stateno!=[120,155])&&(enemynear,statetype=S) &&(enemynear,Movetype != A) && (p2bodydist x =[5,50])&&(p2bodydist y=[-80,5])
triggerall=var(20) <= 60 && !var(14)
trigger1=ctrl || StateNo=40 || StateNo=52 || (StateNo=[100,101])
trigger2=var(6)
;-----------------------------------------------------------------------
[State -1, Ground Drill Claw 180°]
type=ChangeState
value=Ifelse(power>=0&&random<=100,1300,1300)
triggerall=AILevel && numenemy && RoundState=2 && StateType != A 
triggerall=(enemynear,statetype != A)&&(enemynear,Movetype != A)&&(enemynear,stateno!=[120,155])&&(enemynear,statetype!=C)
triggerall=random < (300 * (AIlevel ** 2 / 64.0)) && (p2bodydist x =[50,150])&&(p2bodydist y=[-40,225])
trigger1=ctrl || StateNo=40 || StateNo=52 || (StateNo=[100,101])
trigger2=var(6)
;-----------------------------------------------------------------------
[State -1, Ground Drill Claw 45°]
type=ChangeState
value=Ifelse(power>=0&&random<=100,1320,1320)
triggerall=AILevel && numenemy && RoundState=2 && StateType != A 
triggerall=(enemynear,statetype = A)&&(enemynear,Movetype != A)&&(enemynear,stateno!=[120,155])&&(enemynear,statetype!=C)
triggerall=random < (300 * (AIlevel ** 2 / 64.0)) && (p2bodydist x =[50,150])&&(p2bodydist y=[-75,-200])
trigger1=ctrl || StateNo=40 || StateNo=52 || (StateNo=[100,101])
trigger2=var(6)
;----------------------------------------------------------------------
[State -1, Aerial Drill Claw 180°]
type=ChangeState
value=Ifelse(power>=0&&random<=50,1400,1400)
triggerall=AILevel && numenemy && RoundState=2 && StateType = A && Pos y<=-25 && (var(3) != [1, 2]) 
triggerall=(enemynear,statetype != C)&&(enemynear,statetype != L)&&(enemynear,stateno!=[5100,5220])&&(enemynear,stateno!=[120,155])
triggerall=random < (250 * (AIlevel ** 2 / 64.0)) && (p2bodydist x =[50,150])&&(p2bodydist y=[-60,125])
trigger1=ctrl
trigger2=var(6)
trigger3=(stateno=[600,650]) && movecontact
;----------------------------------------------------------------------
[State -1, Aerial Drill Claw 45°]
type=ChangeState
value=Ifelse(power>=0&&random<=20,1420,1420)
triggerall=AILevel && numenemy && RoundState=2 && StateType = A && Pos y<=-35 && (var(3) != [1, 2]) 
triggerall=(enemynear,statetype != L)&&(enemynear,stateno!=[5100,5220])&&(enemynear,stateno!=[120,155])&&(enemynear,statetype!=C)
triggerall=random < (250 * (AIlevel ** 2 / 64.0)) && (p2bodydist x <=35)&&(p2bodydist y=[-40,225])
trigger1=ctrl
trigger2=var(6)
trigger3=(stateno=[600,650]) && movecontact

