; 1. Command definition
; ---------------------

;-| Button Remapping |-----------------------------------------------------
; This section lets you remap the player's buttons (to easily change the
; button configuration). The format is:
;   old_button = new_button
; If new_button is left blank, the button cannot be pressed.
[Remap]
x = x
y = y
z = z
a = a
b = b
c = c
s = s

;-| Default Values |-------------------------------------------------------
[Defaults]
; Default value for the "time" parameter of a Command. Minimum 1.
command.time = 15

; Default value for the "buffer.time" parameter of a Command. Minimum 1,
; maximum 30.
command.buffer.time = 1

;-| Super Motions |--------------------------------------------------------

;No Negative Edge, Normal
[Command]
name = "2QCF_p"
command = ~D, DF, F, D, DF, F, x
time = 30

[Command]
name = "2QCF_p"
command = ~D, DF, F, D, DF, F, y
time = 30

[Command]
name = "2QCF_p"
command = ~D, DF, F, D, DF, F, z
time = 30

[Command]
name = "2QCF_2p"
command = ~D, DF, F, D, DF, F, x+y
time = 30

[Command]
name = "2QCF_2p"
command = ~D, DF, F, D, DF, F, y+z
time = 30

[Command]
name = "2QCF_2p"
command = ~D, DF, F, D, DF, F, x+z
time = 30

[Command]
name = "2QCF_2k"
command = ~D, DF, F, D, DF, F, a+b
time = 30

[Command]
name = "2QCF_2k"
command = ~D, DF, F, D, DF, F, b+c
time = 30

[Command]
name = "2QCF_2k"
command = ~D, DF, F, D, DF, F, a+c
time = 30

[Command]
name = "QCF_HCB_p"
command = ~D, F, $D, B,  x
time = 30

[Command]
name = "QCF_HCB_p"
command = ~D, F, $D, B,  y
time = 30

[Command]
name = "QCF_HCB_p"
command = ~D, F, $D, B,  z
time = 30

[Command]
name = "QCF_HCB_2p"
command = ~D, F, $D, B,  x+y
time = 30

[Command]
name = "QCF_HCB_2p"
command = ~D, F, $D, B,  y+z
time = 30

[Command]
name = "QCF_HCB_2p"
command = ~D, F, $D, B,  x+z
time = 30

[Command]
name = "QCB_HCF_k"
command = ~D, B, $D, F, a
time = 30

[Command]
name = "QCB_HCF_k"
command = ~D, B, $D, F, b
time = 30

[Command]
name = "QCB_HCF_k"
command = ~D, B, $D, F, c
time = 30

[Command]
name = "QCB_HCF_2k"
command = ~D, B, $D, F, a+b
time = 30

[Command]
name = "QCB_HCF_2k"
command = ~D, B, $D, F, b+c
time = 30

[Command]
name = "QCB_HCF_2k"
command = ~D, B, $D, F, a+c
time = 30

[Command]
name = "2QCF_c"
command = ~D, DF, F, D, DF, F, c
time = 30


;No Negative Edge, Reversed
[Command]
name = "2QCB_p"
command = ~D, DB, B, D, DB, B, x
time = 30

[Command]
name = "2QCB_p"
command = ~D, DB, B, D, DB, B, y
time = 30

[Command]
name = "2QCB_p"
command = ~D, DB, B, D, DB, B, z
time = 30

[Command]
name = "2QCB_2p"
command = ~D, DB, B, D, DB, B, x+y
time = 30

[Command]
name = "2QCB_2p"
command = ~D, DB, B, D, DB, B, y+z
time = 30

[Command]
name = "2QCB_2p"
command = ~D, DB, B, D, DB, B, x+z
time = 30

[Command]
name = "2QCB_2k"
command = ~D, DB, B, D, DB, B, a+b
time = 30

[Command]
name = "2QCB_2k"
command = ~D, DB, B, D, DB, B, b+c
time = 30

[Command]
name = "2QCB_2k"
command = ~D, DB, B, D, DB, B, a+c
time = 30

[Command]
name = "QCB_HCF_p"
command = ~D, B, $D, F,x
time = 30

[Command]
name = "QCB_HCF_p"
command = ~D, B, $D, F,y
time = 30

[Command]
name = "QCB_HCF_p"
command = ~D, B, $D, F,z
time = 30

[Command]
name = "QCB_HCF_2p"
command = ~D, B, $D, F,x+y
time = 30

[Command]
name = "QCB_HCF_2p"
command = ~D, B, $D, F,y+z
time = 30

[Command]
name = "QCB_HCF_2p"
command = ~D, B, $D, F,x+z
time = 30

[Command]
name = "QCF_HCB_k"
command = ~D, F, $D, B, a
time = 30

[Command]
name = "QCF_HCB_k"
command = ~D, F, $D, B, b
time = 30

[Command]
name = "QCF_HCB_k"
command = ~D, F, $D, B, c
time = 30

[Command]
name = "QCF_HCB_2k"
command = ~D, F, $D, B, a+b
time = 30

[Command]
name = "QCF_HCB_2k"
command = ~D, F, $D, B, b+c
time = 30

[Command]
name = "QCB_HCF_2k"
command = ~D, F, $D, B, a+c
time = 30

[Command]
name = "2QCB_c"
command = ~D, DB, B, D, DB, B, c
time = 30

;Negative Edge 
[Command]
name = "2QCF_p"
command = ~D, DF, F, D, DF, F, ~x
time = 30

[Command]
name = "2QCF_p"
command = ~D, DF, F, D, DF, F, ~y
time = 30

[Command]
name = "2QCF_p"
command = ~D, DF, F, D, DF, F, ~z
time = 30

[Command]
name = "QCF_HCB_p"
command = ~D, F, $D, B,  ~x
time = 30

[Command]
name = "QCF_HCB_p"
command = ~D, F, $D, B,  ~y
time = 30

[Command]
name = "QCF_HCB_p"
command = ~D, F, $D, B,  ~z
time = 30

[Command]
name = "QCB_HCF_k"
command = ~D, B, $D, F, ~a
time = 30

[Command]
name = "QCB_HCF_k"
command = ~D, B, $D, F, ~b
time = 30

[Command]
name = "QCB_HCF_k"
command = ~D, B, $D, F, ~c
time = 30

[Command]
name = "2QCF_c"
command = ~D, DF, F, D, DF, F, ~c
time = 30


;Negative Edge, Reversed 
[Command]
name = "2QCB_p"
command = ~D, DB, B, D, DB, B, ~x
time = 30

[Command]
name = "2QCB_p"
command = ~D, DB, B, D, DB, B, ~y
time = 30

[Command]
name = "2QCB_p"
command = ~D, DB, B, D, DB, B, ~c
time = 30

[Command]
name = "QCB_HCF_p"
command = ~D, B, $D, F,~x
time = 30

[Command]
name = "QCB_HCF_p"
command = ~D, B, $D, F,~y
time = 30

[Command]
name = "QCB_HCF_p"
command = ~D, B, $D, F,~z
time = 30

[Command]
name = "QCF_HCB_k"
command = ~D, F, $D, B, ~a
time = 30

[Command]
name = "QCF_HCB_k"
command = ~D, F, $D, B, ~b
time = 30

[Command]
name = "QCF_HCB_k"
command = ~D, F, $D, B, ~c
time = 30

[Command]
name = "2QCB_c"
command = ~D, DB, B, D, DB, B, ~c
time = 30

;-| Special Motions |------------------------------------------------------

; No Negative Edge
[Command]
name = "down_up_x"
command = ~30$D, U, x
time = 30

[Command]
name = "down_up_y"
command = ~30$D, U, y
time = 30

[Command]
name = "down_up_z"
command = ~30$D, U, z
time = 30

[Command]
name = "down_up_x"
command = ~30$D, U+x
time = 30

[Command]
name = "down_up_y"
command = ~30$D, U+y
time = 30

[Command]
name = "down_up_z"
command = ~30$D, U+z
time = 30

[Command]
name = "back_fwd_x"
command = ~30$B, F, x
time = 30

[Command]
name = "back_fwd_y"
command = ~30$B, F, y
time = 30

[Command]
name = "back_fwd_z"
command = ~30$B, F, z
time = 30

[Command]
name = "back_fwd_x"
command = ~30$B, F+x
time = 30

[Command]
name = "back_fwd_y"
command = ~30$B, F+y
time = 30

[Command]
name = "back_fwd_z"
command = ~30$B, F+z
time = 30

[Command]
name = "back_fwd_a"
command = ~30$B, F, a
time = 30

[Command]
name = "back_fwd_b"
command = ~30$B, F, b
time = 30

[Command]
name = "back_fwd_c"
command = ~30$B, F, c
time = 30

[Command]
name = "back_fwd_a"
command = ~30$B, F+a
time = 30

[Command]
name = "back_fwd_b"
command = ~30$B, F+b
time = 30

[Command]
name = "back_fwd_c"
command = ~30$B, F+c
time = 30

[Command]
name = "QCB_x"
command = ~D, DB, B, x
time = 15

[Command]
name = "QCB_y"
command = ~D, DB, B, y
time = 15

[Command]
name = "QCB_z"
command = ~D, DB, B, z
time = 15

[Command]
name = "QCB_a"
command = ~D, DB, B, a
time = 15

[Command]
name = "QCB_b"
command = ~D, DB, B, b
time = 15

[Command]
name = "QCB_c"
command = ~D, DB, B, c
time = 15

; No Negative Edge, Reversed

[Command]
name = "fwd_back_x"
command = ~30$F, B, x
time = 30

[Command]
name = "fwd_back_y"
command = ~30$F, B, y
time = 30

[Command]
name = "fwd_back_z"
command = ~30$F, B, z
time = 30

[Command]
name = "fwd_back_x"
command = ~30$F, B+x
time = 30

[Command]
name = "fwd_back_y"
command = ~30$F, B+y
time = 30

[Command]
name = "fwd_back_z"
command = ~30$F, B+z
time = 30

[Command]
name = "fwd_back_a"
command = ~30$F, B, a
time = 30

[Command]
name = "fwd_back_b"
command = ~30$F, B, b
time = 30

[Command]
name = "fwd_back_c"
command = ~30$F, B, c
time = 30

[Command]
name = "fwd_back_a"
command = ~30$F, B+a
time = 30

[Command]
name = "fwd_back_b"
command = ~30$F, B+b
time = 30

[Command]
name = "fwd_back_c"
command = ~30$F, B+c
time = 30

[Command]
name = "QCF_x"
command = ~D, DF, F, x
time = 15

[Command]
name = "QCF_y"
command = ~D, DF, F, y
time = 15

[Command]
name = "QCF_z"
command = ~D, DF, F, z
time = 15

[Command]
name = "QCF_a"
command = ~D, DF, F, a
time = 15

[Command]
name = "QCF_b"
command = ~D, DF, F, b
time = 15

[Command]
name = "QCF_c"
command = ~D, DF, F, c
time = 15

;Negative Edge 
[Command]
name = "down_up_x"
command = ~30$D, U, ~x
time = 30

[Command]
name = "down_up_y"
command = ~30$D, U, ~y
time = 30

[Command]
name = "down_up_z"
command = ~30$D, U, ~z
time = 30

[Command]
name = "back_fwd_x"
command = ~30$B, F, ~x
time = 30

[Command]
name = "back_fwd_y"
command = ~30$B, F, ~y
time = 30

[Command]
name = "back_fwd_z"
command = ~30$B, F, ~z
time = 30

[Command]
name = "back_fwd_a"
command = ~30$B, F, ~a
time = 30

[Command]
name = "back_fwd_b"
command = ~30$B, F, ~b
time = 30

[Command]
name = "back_fwd_c"
command = ~30$B, F, ~c
time = 30

[Command]
name = "QCB_x"
command = ~D, DB, B, ~x
time = 15

[Command]
name = "QCB_y"
command = ~D, DB, B, ~y
time = 15

[Command]
name = "QCB_z"
command = ~D, DB, B, ~z
time = 15

[Command]
name = "QCB_a"
command = ~D, DB, B, ~a
time = 15

[Command]
name = "QCB_b"
command = ~D, DB, B, ~b
time = 15

[Command]
name = "QCB_c"
command = ~D, DB, B, ~c
time = 15

; Negative Edge, Reversed

[Command]
name = "fwd_back_x"
command = ~30$F, B, ~x
time = 30

[Command]
name = "fwd_back_y"
command = ~30$F, B, ~y
time = 30

[Command]
name = "fwd_back_z"
command = ~30$F, B, ~z
time = 30

[Command]
name = "fwd_back_a"
command = ~30$F, B, ~a
time = 30

[Command]
name = "fwd_back_b"
command = ~30$F, B, ~b
time = 30

[Command]
name = "fwd_back_c"
command = ~30$F, B, ~c
time = 30

[Command]
name = "QCF_x"
command = ~D, DF, F, ~x
time = 15

[Command]
name = "QCF_y"
command = ~D, DF, F, ~y
time = 15

[Command]
name = "QCF_z"
command = ~D, DF, F, ~z
time = 15

[Command]
name = "QCF_a"
command = ~D, DF, F, ~a
time = 15

[Command]
name = "QCF_b"
command = ~D, DF, F, ~b
time = 15

[Command]
name = "QCF_c"
command = ~D, DF, F, ~c
time = 15

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

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

[Command]
name = "highjump"
command = ~$D, $U
time = 5

[Command]
name = "highjump"
command = ~$D, U
time = 5

[Command]
name = "highjump"
command = $D, ~U
time = 5

[Command]
name = "highjump"
command = ~10$D, U
time = 5

[Command]
name = "highjump"
command = ~10$D, $U
time = 5

[Command]
name = "highjump"
command = ~10$D, ~U
time = 5

;-| 2/3 Button Combination |-----------------------------------------------
[Command]
name = "recovery" ;Required (do not remove)
command = x+y
time = 1

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

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

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

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

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

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

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

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

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

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

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

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

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

;-| Dir + Button |---------------------------------------------------------
[Command]
name = "back_x"
command = /$B,x
time = 1

[Command]
name = "back_y"
command = /$B,y
time = 1

[Command]
name = "back_z"
command = /$B,z
time = 1

[Command]
name = "down_x"
command = /$D,x
time = 1

[Command]
name = "down_y"
command = /$D,y
time = 1

[Command]
name = "down_z"
command = /$D,z
time = 1

[Command]
name = "fwd_x"
command = /$F,x
time = 1

[Command]
name = "fwd_y"
command = /$F,y
time = 1

[Command]
name = "fwd_z"
command = /$F,z
time = 1

[Command]
name = "up_x"
command = /$U,x
time = 1

[Command]
name = "up_y"
command = /$U,y
time = 1

[Command]
name = "up_z"
command = /$U,z
time = 1

[Command]
name = "back_a"
command = /$B,a
time = 1

[Command]
name = "back_b"
command = /$B,b
time = 1

[Command]
name = "back_c"
command = /$B,c
time = 1

[Command]
name = "down_a"
command = /$D,a
time = 1

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

[Command]
name = "down_c"
command = /$D,c
time = 1

[Command]
name = "fwd_a"
command = /$F,a
time = 1

[Command]
name = "fwd_b"
command = /$F,b
time = 1

[Command]
name = "fwd_c"
command = /$F,c
time = 1

[Command]
name = "up_a"
command = /$U,a
time = 1

[Command]
name = "up_b"
command = /$U,b
time = 1

[Command]
name = "up_c"
command = /$U,c
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 = "s"
command = s
time = 1

;-| Single Dir |------------------------------------------------------------
[Command]
name = "fwd" ;Required (do not remove)
command = $F
time = 1

[Command]
name = "downfwd"
command = $DF
time = 1

[Command]
name = "down" ;Required (do not remove)
command = $D
time = 1

[Command]
name = "downback"
command = $DB
time = 1

[Command]
name = "back" ;Required (do not remove)
command = $B
time = 1

[Command]
name = "upback"
command = $UB
time = 1

[Command]
name = "up" ;Required (do not remove)
command = $U
time = 1

[Command]
name = "upfwd"
command = $UF
time = 1

;-| Hold Button |--------------------------------------------------------------
[Command]
name = "hold_x"
command = /x
time = 1

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

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

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

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

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

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

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

[Command]
name = "holddownfwd"
command = /$DF
time = 1

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

[Command]
name = "holddownback"
command = /$DB
time = 1

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

[Command]
name = "holdupback"
command = /$UB
time = 1

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

[Command]
name = "holdupfwd"
command = /$UF
time = 1

;---------------------------------------------------------------------------
; 2. State entry
; --------------

[Statedef -1]

[State -1, Random Guard Disable]
type= Assertspecial
triggerall = StateNo != [120,160]
trigger1 = AILevel != 0
flag = noairguard
flag2 = nocrouchguard
flag3 = nostandguard
;---------------------------------------------------------------------------
[State -1, AI Defense]
type = ChangeState
triggerall = stateno!= [120,160] 
triggerall = roundstate= 2
triggerall = AILevel != 0
triggerall = InGuardDist
triggerall = StateType != A
trigger1 = random<90*(AILevel**2/64.0)
trigger1 = ctrl = 1
value = 120
;---------------------------------------------------------------------------
[State -1, V-Slasher Revision L.D.M. (Ground)]
type = ChangeState
value = 3040
triggerall = power = 3000
triggerall = statetype != A
triggerall = ctrl || Anim = 47 && ctrl = 1 || (stateno = [100,101]) || (stateno = [200,450]) && (var(17) = [1,2])
trigger1 = IfElse(P2Dist X>= 0, command = "2QCF_c", command = "2QCB_c")
trigger1 = AILevel = 0

;---------------------------------------------------------------------------
[State -1, V-Slasher Revision L.D.M. (Air)]
type = ChangeState
value = 3045
triggerall = power=3000
triggerall = statetype = A
triggerall = ctrl || (stateno = 251 || (stateno = [600,650])) && (var(17) = [1,2])
triggerall = Pos Y <=-30
trigger1 = IfElse(P2Dist X>= 0, command = "2QCF_c", command = "2QCB_c")
trigger1 = AILevel = 0

;===========================================================================
[State -1, Rider Burst]
type = ChangeState
value = 3030
triggerall = power>=2000
triggerall = statetype != A
triggerall = ctrl || Anim = 47 && ctrl = 1 || (stateno = [100,101]) || (var(17) = [1,2])
trigger1 = IfElse(P2Dist X>= 0, command = "2QCF_2k", command = "2QCB_2k")
trigger1 = AILevel = 0
;==
trigger2 = AILevel!=0 && RoundState=2
trigger2 = EnemyNear,MoveType!=A
trigger2 = (random<60*(AILevel**2/64.0))
trigger2 = abs(P2Bodydist X)<=40
trigger2 = EnemyNear,StateType = S
trigger2 = Var(15) < 4
;===========================================================================
[State -1, Lv. 2 V-Slasher (SC)]
type = ChangeState
value = 3005
triggerall = power >=2000
triggerall = var(17) = 2
triggerall = StateType = A
trigger1 = command = "QCF_HCB_2p"
trigger1 = AILevel = 0
;==
trigger2 = AILevel!=0 && RoundState=2
trigger2 = EnemyNear,MoveType!=A
trigger2 = Var(16) = 1 && (random<30*(AILevel**2/64.0))
trigger2 = P2Bodydist X=[0,70]
trigger2 = (P2Bodydist Y>=0)
trigger2 = Pos Y <=-30
trigger2 = Var(15) < 4
;---------------------------------------------------------------------------
[State -1, Lv. 1 V-Slasher (SC)]
type = ChangeState
value = 3000
triggerall = power >=1000
triggerall = var(17) = 2
triggerall = StateType = A
trigger1 = command = "QCF_HCB_p"
trigger1 = AILevel = 0
;==
trigger2 = AILevel!=0 && RoundState=2
trigger2 = EnemyNear,MoveType!=A
trigger2 = Var(16) = 1 && (random<25*(AILevel**2/64.0))
trigger2 = P2Bodydist X=[0,30]
trigger2 = (P2Bodydist Y>=0)
trigger2 = Pos Y <=-30
trigger2 = Var(15) < 4
;---------------------------------------------------------------------------
; Lv. 2 V-Slasher
[State -1, Lv. 2 V-Slasher]
type = ChangeState
value = 3005
triggerall = power>=2000
triggerall = statetype = A
triggerall = ctrl || (stateno = 251 || (stateno = [600,650])) && var(17) = [1,2]
trigger1 = IfElse(P2Dist X>= 0, command = "QCF_HCB_2p", command = "QCB_HCF_2p")
trigger1 = AILevel = 0
;==
trigger2 = AILevel!=0 && RoundState=2
trigger2 = EnemyNear,MoveType!=A
trigger2 = (random<20*(AILevel**2/64.0))
trigger2 = P2Bodydist X=[0,70]
trigger2 = (P2Bodydist Y>=0)
trigger2 = Pos Y <=-30
trigger2 = IfElse(EnemyNear,HitFall = 0, 1, Var(15) < 4 && (EnemyNear,abs(Pos Y)=[30,55]))
;---------------------------------------------------------------------------
; Lv. 1 V-Slasher
[State -1, Lv. 1 V-Slasher]
type = ChangeState
value = 3000
triggerall = power>=1000
triggerall = statetype = A
triggerall = ctrl || (stateno = 251 || (stateno = [600,650])) && var(17) = [1,2]
trigger1 = IfElse(P2Dist X>= 0, command = "QCF_HCB_p", command = "QCB_HCF_p")
trigger1 = AILevel = 0
;==
trigger2 = AILevel!=0 && RoundState=2
trigger2 = EnemyNear,MoveType!=A
trigger2 = (random<15*(AILevel**2/64.0)) || var(16) = 1
trigger2 = P2BodyDist X=[0,30]
trigger2 = (P2Bodydist Y>=0)
trigger2 = Pos Y <=-30
trigger2 = IfElse(EnemyNear,HitFall = 0, 1, Var(15) < 4 && (EnemyNear,abs(Pos Y)=[30,55]))
;---------------------------------------------------------------------------
[State -1, Lv. 2 Rebel Spark (SC)]
type = ChangeState
value = 3015
triggerall = power>=2000
triggerall = statetype != A
triggerall = (StateNo = [1000,1055]) && var(17) = 2 
trigger1 = AILevel = 0
trigger1 = command = "QCB_HCF_2k"
;==
trigger2 = AILevel!=0 && RoundState=2
trigger2 = EnemyNear,MoveType!=A
trigger2 = Var(16) = 1 && (random<25*(AILevel**2/64.0))
trigger2 = P2StateType != A
trigger2 = Var(15) < 4
;---------------------------------------------------------------------------
[State -1, Lv. 1 Rebel Spark (SC)]
type = ChangeState
value = 3010
triggerall = power>=1000
triggerall = statetype != A
triggerall = (StateNo = [1000,1055]) && var(17) = 2 
trigger1 = AILevel = 0
trigger1 = command = "QCB_HCF_k"
;==
trigger2 = AILevel!=0 && RoundState=2
trigger2 = EnemyNear,MoveType!=A
trigger2 = Var(16) = 1 && (random<25*(AILevel**2/64.0))
trigger2 = abs(P2BodyDist X)<=25
trigger2 = P2StateType != A
trigger2 = Var(15) < 4
;---------------------------------------------------------------------------
[State -1, Lv. 2 Rebel Spark]
type = ChangeState
value = 3015
triggerall = power>=2000
triggerall = statetype != A
triggerall = ctrl || Anim = 47 && ctrl = 1 || (stateno = [100,101]) || (var(17) = [1,2])
;==
trigger1 = IfElse(P2Dist X>= 0, command = "QCB_HCF_2k", command = "QCF_HCB_2k")
trigger1 = AILevel = 0
;==
trigger2 = AILevel!=0 && RoundState=2
trigger2 = (random<20*(AILevel**2/64.0)) || var(16) = 1 && var(17) && (var(18) = [2,3]) && (random<25*(AILevel**2/64.0))
trigger2 = abs(P2BodyDist X)<=30
trigger2 = P2StateType != A
trigger2 = Var(15) < 4

;---------------------------------------------------------------------------
[State -1, Lv. 1 Rebel Spark]
type = ChangeState
value = 3010
triggerall = power>=1000
triggerall = statetype != A
triggerall = ctrl || Anim = 47 && ctrl = 1 || (stateno = [100,101]) || (var(17) = [1,2])

trigger1 = IfElse(P2Dist X>= 0, command = "QCB_HCF_k", command = "QCF_HCB_k")
trigger1 = AILevel = 0
;=
trigger2 = AILevel!=0 && RoundState=2
trigger2 = (random<15*(AILevel**2/64.0)) || var(16) = 1 && var(17) && (var(18) = [2,3]) && (random<25*(AILevel**2/64.0))
trigger2 = abs(P2BodyDist X)<=25
trigger2 = P2StateType != A
trigger2 = Var(15) < 4

;---------------------------------------------------------------------------
[State -1, Lv. 2 Gravity Storm (SC)]
type = ChangeState
value = 3025
triggerall = power>=2000
triggerall = statetype != A
triggerall = (StateNo = [1000,1055]) && var(17) = 2 
trigger1 = AILevel = 0
trigger1 = command = "2QCF_2p"
;==
trigger2 = AILevel!=0 && RoundState=2
trigger2 = EnemyNear,MoveType!=A
trigger2 = Var(16) = 1 && (random<25*(AILevel**2/64.0))
trigger2 = abs(P2BodyDist Y)<=40
trigger2 = Var(15) < 4
;---------------------------------------------------------------------------
[State -1, Lv. 1 Gravity Storm (SC)]
type = ChangeState
value = 3020
triggerall = power>=1000
triggerall = statetype != A
triggerall = (StateNo = [1000,1055]) && var(17) = 2 
trigger1 = AILevel = 0
trigger1 = command = "2QCF_p"
;==
trigger2 = AILevel!=0 && RoundState=2
trigger2 = EnemyNear,MoveType!=A
trigger2 = Var(16) = 1 && (random<25*(AILevel**2/64.0))
trigger2 = RoundState=2
trigger2 = abs(P2BodyDist Y)<=40
trigger2 = Var(15) < 4
;---------------------------------------------------------------------------
[State -1, Lv. 2 Gravity Storm]
type = ChangeState
value = 3025
triggerall = power>=2000
triggerall = statetype != A
triggerall = ctrl || Anim = 47 && ctrl = 1 || (stateno = [100,101]) || (stateno = [200,650]) && (var(17) = [1,2])

trigger1 = IfElse(P2Dist X>= 0, command = "2QCF_2p", command = "2QCB_2p")
trigger1 = AILevel = 0
;==
trigger2 = AILevel!=0 && RoundState=2
trigger2 = EnemyNear,MoveType!=A
trigger2 = (random<15*(AILevel**2/64.0))
trigger2 = abs(P2Bodydist X)<=40
trigger2 = (EnemyNear,abs(Pos Y) = [40,55]) || (var(16) = 1 && var(17)) && (random<25*(AILevel**2/64.0))

trigger2 = EnemyNear,StateType != C
trigger2 = Var(15) < 4
;---------------------------------------------------------------------------
[State -1, Lv. 1 Gravity Storm]
type = ChangeState
value = 3020
triggerall = power>=1000
triggerall = statetype != A
triggerall = ctrl || Anim = 47 && ctrl = 1 || (stateno = [100,101]) || (stateno = [200,650]) && (var(17) = [1,2])
trigger1 = IfElse(P2Dist X>= 0, command = "2QCF_p", command = "2QCB_p")
trigger1 = AILevel = 0
;==
trigger2 = AILevel!=0 && RoundState=2
trigger2 = EnemyNear,MoveType!=A
trigger2 = (random<10*(AILevel**2/64.0))
trigger2 = abs(P2Bodydist X)<=35
trigger2 = (abs(P2Bodydist Y)=[40,55]) || (var(16) = 1 && var(17)) && (random<25*(AILevel**2/64.0))

trigger2 = EnemyNear,StateType!=C
trigger2 = Var(15) < 4
;===========================================================================
;---------------------------------------------------------------------------
[State -1, Weak I-Slasher]
type = ChangeState
value = 1040
triggerall = var(25) = 0
triggerall = statetype != A
triggerall = ctrl || Anim = 47 && ctrl = 1 || (stateno = [100,101]) || (var(17) = 1)
trigger1 = IfElse(P2Dist X>= 0, command = "QCB_x", command = "QCF_x")
trigger1 = AILevel = 0
;==
trigger2 = AILevel!=0 && RoundState=2
trigger2 = EnemyNear,MoveType!=A
trigger2 = (random<10*(AILevel**2/64.0))
trigger2 = abs(P2Bodydist X)=[120,140)
trigger2 = Var(15) = 0
;---------------------------------------------------------------------------
[State -1, Medium I-Slasher]
type = ChangeState
value = 1042
triggerall = var(25) = 0
triggerall = statetype != A
triggerall = ctrl || Anim = 47 && ctrl = 1 || (stateno = [100,101]) || (var(17) = 1)
trigger1 = IfElse(P2Dist X>= 0, command = "QCB_y", command = "QCF_y")
trigger1 = AILevel = 0
trigger2 = AILevel!=0 && RoundState=2
trigger2 = EnemyNear,MoveType!=A
trigger2 = (random<10*(AILevel**2/64.0))
trigger2 = abs(P2Bodydist X)=[140,160)
trigger2 = Var(15) = 0
;---------------------------------------------------------------------------
[State -1, Strong I-Slasher]
type = ChangeState
value = 1043
triggerall = var(25) = 0
triggerall = statetype != A
triggerall = ctrl || Anim = 47 && ctrl = 1 || (stateno = [100,101]) || (var(17) = 1)
trigger1 = IfElse(P2Dist X>= 0, command = "QCB_z", command = "QCF_z")
trigger1 = AILevel = 0
trigger2 = AILevel!=0 && RoundState=2
trigger2 = EnemyNear,MoveType!=A
trigger2 = (random<10*(AILevel**2/64.0))
trigger2 = abs(P2Bodydist X)=[160,180)
trigger2 = Var(15) = 0
;---------------------------------------------------------------------------
; Weak Earring Bomb
[State -1, Weak Earring Bomb]
type = ChangeState
value = 1050
triggerall = var(25) = 0
triggerall = statetype != A
triggerall = ctrl || Anim = 47 && ctrl = 1 || (stateno = [100,101]) || (var(17) = 1)
trigger1 = IfElse(P2Dist X>= 0, command = "QCB_a", command = "QCF_a")
trigger1 = AILevel = 0
;==
trigger2 = AILevel!=0&&RoundState=2
trigger2 = EnemyNear,MoveType!=A
trigger2 = random<80*(AILevel**2/64.0) || Var(17) = 1 && (Var(18) = [2,3]) && EnemyNear,HitOver = 0
trigger2 = EnemyNear,abs(Pos X)>=150
trigger2 = EnemyNear,abs(Pos Y)<=40
trigger2 = Var(15) = 0
;---------------------------------------------------------------------------
; Medium Earring Bomb
[State -1, Medium Earring Bomb]
type = ChangeState
value = 1051
triggerall = var(25) = 0
triggerall = statetype != A
triggerall = ctrl || Anim = 47 && ctrl = 1 || (stateno = [100,101]) || (var(17) = 1)
trigger1 = IfElse(P2Dist X>= 0, command = "QCB_b", command = "QCF_b")
trigger1 = AILevel = 0
;==
trigger2 = AILevel!=0&&RoundState=2
trigger2 = EnemyNear,MoveType!=A
trigger2 = random<80*(AILevel**2/64.0) || Var(17) = 1 && (Var(18) = [2,3]) && EnemyNear,HitOver = 0
trigger2 = EnemyNear,abs(Pos X)>=150
trigger2 = EnemyNear,abs(Pos Y)<=60
trigger2 = Var(15) = 0
;---------------------------------------------------------------------------
; Strong Earring Bomb
[State -1, Strong Earring Bomb]
type = ChangeState
value = 1052
triggerall = var(25) = 0
triggerall = statetype != A
triggerall = ctrl || Anim = 47 && ctrl = 1 || (stateno = [100,101]) || (var(17) = 1)
trigger1 = IfElse(P2Dist X>= 0, command = "QCB_c", command = "QCF_c")
trigger1 = AILevel = 0
;==
trigger2 = AILevel!=0&&RoundState=2
trigger2 = EnemyNear,MoveType!=A
trigger2 = EnemyNear,MoveType!=A
trigger2 = random<80*(AILevel**2/64.0) || Var(17) = 1 && (Var(18) = [2,3]) && EnemyNear,HitOver = 0
trigger2 = EnemyNear,abs(Pos X)>=150
trigger2 = EnemyNear,abs(Pos Y)<=80
trigger2 = Var(15) = 0
;---------------------------------------------------------------------------
; Weak X-Calibur
[State -1, Weak X-Calibur]
type = ChangeState
value = 1030
triggerall = statetype = A
triggerall = ctrl || (stateno = 251 || (stateno = [600,650])) && (var(16) = [1,2])
trigger1 = IfElse(P2Dist X>= 0, command = "QCB_x", command = "QCF_x")
trigger1 = AILevel = 0
;==
trigger2 = AILevel!=0 && RoundState=2
trigger2 = EnemyNear,MoveType!=A
trigger2 = (random<15*(AILevel**2/64.0)) || var(17) = 1 
trigger2 = P2Bodydist X=[0,10]
trigger2 = abs(P2BodyDist Y)<=15
trigger2 = Var(15) < 2
;---------------------------------------------------------------------------
; Medium X-Calibur
[State -1, Medium X-Calibur]
type = ChangeState
value = 1031
triggerall = statetype = A
triggerall = ctrl || (stateno = 251 || (stateno = [600,650])) && (var(16) = [1,2])
trigger1 = IfElse(P2Dist X>= 0, command = "QCB_y", command = "QCF_y")
trigger1 = AILevel = 0
;==
trigger2 = AILevel!=0 && RoundState=2
trigger2 = EnemyNear,MoveType!=A
trigger2 = (random<15*(AILevel**2/64.0)) || var(17) = 1
trigger2 = P2Bodydist X=[0,20]
trigger2 = abs(P2BodyDist Y)<=35
trigger2 = Var(15) < 2
;---------------------------------------------------------------------------
; Strong X-Calibur
[State -1, Strong X-Calibur]
type = ChangeState
value = 1032
triggerall = statetype = A
triggerall = ctrl || (stateno = 251 || (stateno = [600,650])) && (var(16) = [1,2])
trigger1 = IfElse(P2Dist X>= 0, command = "QCB_z", command = "QCF_z")
trigger1 = AILevel = 0
;==
trigger2 = AILevel!=0 && RoundState=2
trigger2 = EnemyNear,MoveType!=A
trigger2 = (random<15*(AILevel**2/64.0)) || var(17) = 1
trigger2 = P2Bodydist X=[0,30]
trigger2 = abs(P2BodyDist Y)<=45
trigger2 = Var(15) < 2
;---------------------------------------------------------------------------
; Weak Moon Slasher
[State -1, Weak Moon Slasher]
type = ChangeState
value = 1000
triggerall = statetype != A
triggerall = ctrl || stateno = 40 || Anim = 47 && ctrl = 1 || (stateno = [100,101]) || (var(17) = 1)
triggerall = (PrevStateNo!=[1000,1003])
trigger1 = command = "down_up_x"
trigger1 = AILevel = 0
;==
trigger2 = AILevel!=0 && RoundState=2
trigger2 = EnemyNear,MoveType!=A
trigger2 = (random<10*(AILevel**2/64.0)) || var(17) = 1 && (random<20*(AILevel**2/64.0))
trigger2 = abs(P2Bodydist X)<=25
trigger2 = abs(P2BodyDist Y)<=50
trigger2 = EnemyNear,StateType != C
trigger2 = Var(15) < 3
;---------------------------------------------------------------------------
; Medium Moon Slasher
[State -1, Medium Moon Slasher]
type = ChangeState
value = 1001
triggerall = statetype != A
triggerall = ctrl || stateno = 40 || Anim = 47 && ctrl = 1 || (stateno = [100,101]) || (var(17) = 1)
triggerall = (PrevStateNo!=[1000,1003])
trigger1 = command = "down_up_y"
trigger1 = AILevel = 0
;==
trigger2 = AILevel!=0 && RoundState=2
trigger2 = EnemyNear,MoveType!=A
trigger2 = (random<10*(AILevel**2/64.0)) || var(17) = 1 && (random<20*(AILevel**2/64.0))
trigger2 = abs(P2Bodydist X)<=25
trigger2 = abs(P2BodyDist Y)<=50
trigger2 = EnemyNear,StateType != C
trigger2 = Var(15) < 3
;---------------------------------------------------------------------------
; Strong Moon Slasher
[State -1, Strong Moon Slasher]
type = ChangeState
value = 1002
triggerall = statetype != A
triggerall = ctrl || stateno = 40 || Anim = 47 && ctrl = 1 || (stateno = [100,101]) || (var(17) = 1)
triggerall = (PrevStateNo!=[1000,1003])
trigger1 = command = "down_up_z"
trigger1 = AILevel = 0
;==
trigger2 = AILevel!=0 && RoundState=2
trigger2 = EnemyNear,MoveType!=A
trigger2 = (random<10*(AILevel**2/64.0)) || var(17) = 1 && (random<20*(AILevel**2/64.0))
trigger2 = abs(P2Bodydist X)<=25
trigger2 = abs(P2BodyDist Y)<=50
trigger2 = EnemyNear,StateType != C
trigger2 = Var(15) < 3
;---------------------------------------------------------------------------
; Weak Baltic Launcher
[State -1, Weak Baltic Launcher]
type = ChangeState
value = 1010
triggerall = var(25) = 0
triggerall = statetype != A
triggerall = ctrl || Anim = 47 && ctrl = 1 || (stateno = [100,101]) || (var(17) = 1)
trigger1 = IfElse(P2Dist X>= 0, command = "back_fwd_x",command="fwd_back_x")
trigger1 = AILevel = 0
;==
trigger2 = AILevel!=0 && RoundState=2
trigger2 = (random<15*(AILevel**2/64.0))
trigger2 = (abs(P2Bodydist X)=[20,45])
trigger2 = EnemyNear,StateType != C && EnemyNear,abs(Pos Y)<=55
trigger2 = Var(15) < 3
;---------------------------------------------------------------------------
; Medium Baltic Launcher
[State -1, Medium Baltic Launcher]
type = ChangeState
value = 1011
triggerall = var(25) = 0
triggerall = statetype != A
triggerall = ctrl || Anim = 47 && ctrl = 1 || (stateno = [100,101]) || (var(17) = 1)
trigger1 = IfElse(P2Dist X>= 0, command = "back_fwd_y",command="fwd_back_y")
trigger1 = AILevel = 0
;==
trigger2 = AILevel!=0 && RoundState=2
trigger2 = (random<15*(AILevel**2/64.0))
trigger2 = (abs(P2Bodydist X)=[20,45])
trigger2 = EnemyNear,StateType != C && EnemyNear,abs(Pos Y)<=55
trigger2 = Var(15) < 3
;---------------------------------------------------------------------------
; Strong Baltic Launcher
[State -1, Strong Baltic Launcher]
type = ChangeState
value = 1012
triggerall = var(25) = 0
triggerall = statetype != A
triggerall = ctrl || Anim = 47 && ctrl = 1 || (stateno = [100,101]) || (var(17) = 1)
trigger1 = IfElse(P2Dist X>= 0, command = "back_fwd_z",command="fwd_back_z")
trigger1 = AILevel = 0
;==
trigger2 = AILevel!=0 && RoundState=2
trigger2 = (random<10*(AILevel**2/64.0))
trigger2 = (abs(P2Bodydist X)=[40,80])
trigger2 = EnemyNear,StateType != C && EnemyNear,abs(Pos Y)<=55 
trigger2 = Var(15) < 3
;---------------------------------------------------------------------------
; Weak Grand Saber
[State -1, Weak Grand Saber]
type = ChangeState
value = 1020
triggerall = statetype != A
triggerall = ctrl || Anim = 47 && ctrl = 1 || (stateno = [100,101]) || (var(17) = 1)
trigger1 = IfElse(P2Dist X>= 0, command = "back_fwd_a",command="fwd_back_a")
trigger1 = AILevel = 0
;==
trigger2 = AILevel!=0 && RoundState=2
trigger2 = (random<15*(AILevel**2/64.0)) || var(17) && (random<25*(AILevel**2/64.0))
trigger2 = abs(P2Bodydist X) <= 40
trigger2 = EnemyNear,StateType != A
trigger2 = Var(15) = 0
trigger2 = EnemyNear,MoveType!=A
;---------------------------------------------------------------------------
; Medium Grand Saber
[State -1, Medium Grand Saber]
type = ChangeState
value = 1023
triggerall = statetype != A
triggerall = ctrl || Anim = 47 && ctrl = 1 || (stateno = [100,101]) || (var(17) = 1)
trigger1 = IfElse(P2Dist X>= 0, command = "back_fwd_b",command="fwd_back_b")
trigger1 = AILevel = 0
;==
trigger2 = AILevel!=0 && RoundState=2
trigger2 = (random<15*(AILevel**2/64.0)) || var(17) && (random<25*(AILevel**2/64.0))
trigger2 = abs(P2Bodydist X) <= 40
trigger2 = EnemyNear,StateType != A
trigger2 = Var(15) < 3
trigger2 = EnemyNear,MoveType!=A
;---------------------------------------------------------------------------
; Strong Grand Saber
[State -1, Strong Grand Saber]
type = ChangeState
value = 1024
triggerall = statetype != A
triggerall = ctrl || Anim = 47 && ctrl = 1 || (stateno = [100,101]) || (var(17) = 1)
trigger1 = IfElse(P2Dist X>= 0, command = "back_fwd_c",command="fwd_back_c")
trigger1 = AILevel = 0
;==
trigger2 = AILevel!=0 && RoundState=2
trigger2 = (random<15*(AILevel**2/64.0)) || var(17) && (random<25*(AILevel**2/64.0))
trigger2 = abs(P2Bodydist X) <= 55
trigger2 = EnemyNear,StateType != A
trigger2 = Var(15) < 3
trigger2 = EnemyNear,MoveType!=A
;===========================================================================
;---------------------------------------------------------------------------
[State -1, Guard Cancel Roll Back]
type = ChangeState
value = 701
triggerall = statetype != A
triggerall = stateno = [150,151]
triggerall = Power >= 1000
trigger1 = command = "roll" 
trigger1 = command = "holdback"
trigger1 = AILevel = 0
;---------------------------------------------------------------------------
[State -1, Guard Cancel Roll]
type = ChangeState
value = 700
triggerall = statetype != A
triggerall = stateno = [150,151]
triggerall = Power >= 1000
trigger1 = command = "roll" 
trigger1 = AILevel = 0
;---------------------------------------------------------------------------
[State -1, Roll Back]
type = ChangeState
value = 701
triggerall = ctrl || stateno = 100 || StateNo = [150,151]
triggerall = StateType = S
trigger1 = AILevel = 0
trigger1 = command = "roll" 
trigger1 = command = "holdback"
;---------------------------------------------------------------------------
[State -1, Roll Fwd]
type = ChangeState
value = 700
triggerall = ctrl || stateno = 100 || StateNo = [150,151]
triggerall = StateType = S
trigger1 = AILevel = 0
trigger1 = command = "roll" 
;---------------------------------------------------------------------------
[State -1, Run]
type = ChangeState
value = IfElse(P2Dist X < 0, 105, 100)
triggerall= ctrl
triggerall = StateType = S
trigger1 = AILevel = 0
trigger1 = command = "FF"
;---------------------------------------------------------------------------
[State -1, Backhop]
type = ChangeState
value = IfElse(P2Dist X < 0, 100, 105)
triggerall= ctrl
triggerall = StateType = S
trigger1 = AILevel = 0
trigger1 = command = "BB"
;---------------------------------------------------------------------------
; Leona Crush (AI)
[State -1, Leona Crush (AI)]
type = ChangeState
value = 800
triggerall = var(0) = 0
triggerall = AILevel!=0 && RoundState=2
triggerall = statetype = S
trigger1 = ctrl
trigger1 = abs(P2BodyDist X)<=20
trigger1 = EnemyNear,StateType!=A && EnemyNear, StateType != L
trigger1 = EnemyNear,MoveType!=A
trigger1 = (random<60*(AILevel**2/64.0)) || (EnemyNear,StateNo = [130,132])
trigger1 = FrontEdgeBodyDist >= 50
;---------------------------------------------------------------------------
; Order Buckler (AI)
[State -1, Order Buckler (AI)]
type = ChangeState
value = 830
triggerall = var(0) = 0
triggerall = AILevel!=0 && RoundState=2
triggerall = statetype = S
trigger1 = ctrl
trigger1 = abs(P2BodyDist X)<=20
trigger1 = EnemyNear,StateType!=A && EnemyNear, StateType != L
trigger1 = EnemyNear,MoveType!=A
trigger1 = (random<60*(AILevel**2/64.0)) || (EnemyNear,StateNo = [130,132])
trigger1 = FrontEdgeBodyDist < 50
;---------------------------------------------------------------------------
; Heidern Inferno (AI)
[State -1, Heidern Inferno (AI)]
type = ChangeState
value = 860
triggerall = var(0) = 0
triggerall = AILevel!=0 && RoundState=2
triggerall = statetype = A
trigger1 = ctrl
trigger1 = abs(P2BodyDist X)<=20
trigger1 = EnemyNear,StateType=A 
trigger1 = EnemyNear,MoveType!=A
trigger1 = (random<60*(AILevel**2/64.0)) || (EnemyNear,StateNo = [130,132])
trigger1 = FrontEdgeBodyDist > 50
;---------------------------------------------------------------------------
; Leona Crush
[State -1, Leona Crush]
type = ChangeState
value = 800
triggerall = AILevel = 0
triggerall = StateType = S
triggerall = ctrl
trigger1 = command = "throw"
;---------------------------------------------------------------------------
[State -1, Order Buckler]
type = ChangeState
value = 830
triggerall = AILevel = 0
triggerall = StateType = S
triggerall = ctrl
trigger1 = command = "throw2"
;---------------------------------------------------------------------------
[State -1, Heidern Inferno]
type = ChangeState
value = 860
triggerall = AILevel = 0
triggerall = StateType = A
triggerall = ctrl
trigger1 = command = "throw2"
;===========================================================================
;---------------------------------------------------------------------------
; Taunt
[State -1, Taunt]
type = ChangeState
value = 195
triggerall = statetype != A
triggerall = ctrl
trigger1 = command = "s"
trigger1 = AILevel = 0
trigger2 = AILevel != 0 && RoundState = 3 
trigger2 = StateNo!=195
trigger2 = PrevStateNo!=195
trigger2 = (random<60*(AILevel**2/64.0))
;---------------------------------------------------------------------------
; st.LP
[State -1, st.LP]
type = ChangeState
value = IfElse(abs(P2BodyDist X) > 30, 200, 201)
triggerall = command != "holddown"
triggerall = statetype != A
triggerall = ctrl || Anim = 47 && ctrl = 1 || (stateno = [100,101]) || ( (stateno = [200,201]) || (stateno = 231) || stateno = 400 || stateno = 430) && Time > 4
trigger1 = command = "x"
trigger1 = AILevel = 0
;==
trigger2 = AILevel!=0 && RoundState=2
trigger2 = (random<60*(AILevel**2/64.0)) || ctrl && EnemyNear,HitOver = 0 || ctrl && EnemyNear,MoveType = H
trigger2 = abs(P2Bodydist X)=[0,45]
trigger2 = abs(P2BodyDist Y)<=35
trigger2 = EnemyNear,StateType!= C
trigger2 = Var(15) = 0
;---------------------------------------------------------------------------
; st.MP
[State -1, st.MP]
type = ChangeState
value = IfElse(abs(P2BodyDist X) > 30, 210, 211)
triggerall = command != "holddown"
triggerall = statetype != A
triggerall = ctrl || Anim = 47 && ctrl = 1 || (stateno = [100,101]) || ((stateno = [200,201]) && (var(16) = [1,2]))
trigger1 = command = "y"
trigger1 = AILevel = 0
;==
trigger2 = AILevel!=0 && RoundState=2
trigger2 = (random<60*(AILevel**2/64.0)) || ctrl && EnemyNear,HitOver = 0 || ctrl && EnemyNear,MoveType = H
trigger2 = abs(P2Bodydist X)=[0,30]
trigger2 = abs(P2BodyDist Y)<=35
trigger2 = EnemyNear,StateType!=C && EnemyNear,abs(Pos Y)<=45
trigger2 = Var(15) = 0
;---------------------------------------------------------------------------
[State -1, Emergency Blowback]
type = ChangeState
value = 220
triggerall = statetype != A
triggerall = stateno = [150,152]
triggerall = Power >= 1000
trigger1 = command = "blowback" 
trigger1 = AILevel = 0
;==
trigger2 = AILevel!=0 && RoundState=2
trigger2 = (random<60*(AILevel**2/64.0))
trigger2 = abs(P2Bodydist X)<=35
trigger2 = abs(P2BodyDist Y)<=35
trigger2 = EnemyNear,StateType = S 
trigger2 = Var(15) = 0
;---------------------------------------------------------------------------
; st.HP
[State -1, st.HP]
type = ChangeState
value = 220
triggerall = command != "holddown"
triggerall = statetype != A
triggerall = ctrl || stateno=40 || Anim = 47 && ctrl = 1 || (stateno = [100,101]) || ((stateno = [200,201]) && (var(16) = [1,2]))
trigger1 = command = "z"
trigger1 = AILevel = 0
;==
trigger2 = AILevel!=0 && RoundState=2
trigger2 = EnemyNear, MoveType != A
trigger2 = (random<30*(AILevel**2/64.0)) || ctrl && EnemyNear,MoveType = H
trigger2 = abs(P2Bodydist X)=[40,55]
trigger2 = EnemyNear,abs(Pos Y)<=40
trigger2 = Var(15) = 0
;---------------------------------------------------------------------------
; Strike Arch
[State -1, Strike Arch]
type = ChangeState
value = 251
triggerall = command != "holddown"
triggerall = statetype != A
triggerall = ctrl || stateno=40 || Anim = 47 && ctrl = 1 || (stateno = [100,101]) || var(17) = 1
trigger1 =  command = "holdfwd" || command = "holdback" 
trigger1 = command = "a"
trigger1 = AILevel = 0
;==
trigger2 = AILevel!=0 && RoundState=2
trigger2 = (random<60*(AILevel**2/64.0)) || var(17) = 1 && (random<70*(AILevel**2/64.0))
trigger2 = abs(P2Bodydist X)<=35
trigger2 = abs(P2Bodydist Y)<=55
trigger2 = Var(15) = 0
trigger2 = EnemyNear,StateType = C || Anim = 211 && Var(16) = 1 || Anim = 241 && Var(16) = 1
;---------------------------------------------------------------------------
; st.LK
[State -1, st.LK]
type = ChangeState
value = IfElse(abs(P2BodyDist X) > 30, 230, 231)
triggerall = command != "holddown"
triggerall = statetype != A
triggerall = ctrl || stateno=40 || Anim = 47 && ctrl = 1 || (stateno = [100,101]) || ( (stateno = [200,201]) || (stateno = 231) || stateno = 400 || stateno = 430) && Time > 4
trigger1 = command = "a"
trigger1 = AILevel = 0
trigger2 = AILevel!=0 && RoundState=2
trigger2 = (random<60*(AILevel**2/64.0)) || ctrl && EnemyNear,MoveType = H
trigger2 = abs(P2Bodydist X)=[0,35]
trigger2 = abs(P2Bodydist Y)<=45
trigger2 = Var(15) = 0
;---------------------------------------------------------------------------
; st.MK
[State -1, st.MK]
type = ChangeState
value = IfElse(abs(P2BodyDist X) > 30, 240, 241)
triggerall = command != "holddown"
triggerall = statetype != A
triggerall = ctrl || stateno=40 || Anim = 47 && ctrl = 1 ||(stateno = [100,101])
trigger1 = command = "b"
trigger1 = AILevel = 0
;==
trigger2 = AILevel!=0 && RoundState=2
trigger2 = EnemyNear, MoveType != A
trigger2 = (random<60*(AILevel**2/64.0)) || ctrl && EnemyNear,MoveType = H
trigger2 = abs(P2Bodydist X)=[0,30]
trigger2 = abs(P2BodyDist Y)<=35
trigger2 = EnemyNear,StateType != C
trigger2 = Var(15) = 0
;---------------------------------------------------------------------------
; st.HK
[State -1, st.HK]
type = ChangeState
value = 250
triggerall = command != "holddown"
triggerall = statetype = S
triggerall = ctrl || stateno=40 || Anim = 47 && ctrl = 1 || ((stateno=230)&&((var(16) = [1,2])))||(stateno = [100,101])
trigger1 = command = "c"
trigger1 = AILevel = 0
trigger2 = AILevel!=0 && RoundState=2
trigger2 = EnemyNear, MoveType != A
trigger2 = (random<60*(AILevel**2/64.0)) || ctrl && EnemyNear,MoveType = H
trigger2 = abs(P2Bodydist X)=[0,40]
trigger2 = abs(P2BodyDist Y)<=35
trigger2 = EnemyNear,StateType != C
trigger2 = Var(15) = 0
;---------------------------------------------------------------------------
; cr.LP
[State -1, cr.LP]
type = ChangeState
value = 400
triggerall = command = "holddown"
triggerall = statetype !=A
triggerall = ctrl || stateno=40||Anim = 47 && ctrl = 1 ||(stateno = [100,101])||(stateno=200&&Anim=200&&AnimElem=3,>=0)||(stateno=200&&Anim=201&&AnimElem=4,>=0)||(stateno=400&&AnimElem=5,>=0)||(stateno=430&&AnimElem=3,>=0)
trigger1 = command = "x"
trigger1 = AILevel = 0
trigger2 = AILevel!=0 && RoundState=2
trigger2 = (random<60*(AILevel**2/64.0)) || ctrl && EnemyNear,HitOver = 0 || ctrl && EnemyNear,MoveType = H
trigger2 = abs(P2Bodydist X)=[0,35]
trigger2 = EnemyNear,StateType!=A
trigger2 = Var(15) = 0
;---------------------------------------------------------------------------
; cr.MP
[State -1, cr.MP]
type = ChangeState
value = 410
triggerall = command = "holddown"
triggerall = statetype !=A
triggerall = ctrl || stateno=40 || Anim = 47 && ctrl = 1 ||(stateno = [100,101])
trigger1 = command = "y"
trigger1 = AILevel = 0
trigger2 = AILevel!=0 && RoundState=2
trigger2 = (random<60*(AILevel**2/64.0)) || ctrl && EnemyNear,HitOver = 0 || ctrl && EnemyNear,MoveType = H
trigger2 = abs(P2Bodydist X)=[0,45]
trigger2 = EnemyNear,StateType!=A
trigger2 = Var(15) = 0
;---------------------------------------------------------------------------
; cr.HP
[State -1, cr.HP]
type = ChangeState
value = 420
triggerall = command = "holddown"
triggerall = statetype !=A
triggerall = ctrl || stateno=40 || Anim = 47 && ctrl = 1 ||(stateno = [100,101])
trigger1 = command = "z"
trigger1 = AILevel = 0
trigger2 = AILevel!=0 && RoundState=2
trigger2 = (random<60*(AILevel**2/64.0)) || ctrl && EnemyNear,HitOver = 0 || ctrl && EnemyNear,MoveType = H
trigger2 = abs(P2Bodydist X)=[0,45]
trigger2 = abs(P2Bodydist Y)<=55
trigger2 = Var(15) = 0
;---------------------------------------------------------------------------
; cr.LK
[State -1, cr.LK]
type = ChangeState
value = 430
triggerall = command = "holddown"
triggerall = statetype !=A
triggerall = ctrl || stateno=40 || Anim = 47 && ctrl = 1 ||(stateno = [100,101])||(stateno=200&&Anim=200&&AnimElem=3,>=0)||(stateno=200&&Anim=201&&AnimElem=4,>=0)||(stateno=230&&AnimElem=4,>=0)||(stateno=400&&AnimElem=5,>=0)
trigger1 = command = "a"
trigger1 = AILevel = 0
;=
trigger2 = AILevel!=0 && RoundState=2
trigger2 = (random<60*(AILevel**2/64.0)) || ctrl && EnemyNear,MoveType = H
trigger2 = EnemyNear,StateType = S
trigger2 = abs(P2Bodydist X)<=40
trigger2 = Var(15) = 0
;---------------------------------------------------------------------------
; cr.MK
[State -1, cr.MK]
type = ChangeState
value = 440
triggerall = command = "holddown"
triggerall = statetype !=A
triggerall = ctrl || stateno=40 || Anim = 47 && ctrl = 1 ||(stateno = [100,101])
trigger1 = command = "b"
trigger1 = AILevel = 0
;=
trigger2 = AILevel!=0 && RoundState=2
trigger2 = (random<60*(AILevel**2/64.0)) || ctrl && EnemyNear,MoveType = H
trigger2 = EnemyNear,StateType = S 
trigger2 = abs(P2Bodydist X)<=50
trigger2 = Var(15) = 0
;---------------------------------------------------------------------------
; cr.HK
[State -1, cr.HK]
type = ChangeState
value = 450
triggerall = command = "holddown"
triggerall = statetype !=A
triggerall = ctrl || stateno=40 || Anim = 47 && ctrl = 1 ||(stateno = [100,101])
trigger1 = command = "c"
trigger1 = AILevel = 0
;=
trigger2 = AILevel!=0 && RoundState=2
trigger2 = (random<60*(AILevel**2/64.0)) || ctrl && EnemyNear,MoveType = H
trigger2 = EnemyNear,StateType = S
trigger2 = abs(P2Bodydist X)<=55
trigger2 = Var(15) = 0
;---------------------------------------------------------------------------
; j. LP
[State -1, j. LP]
type = ChangeState
value = 600
triggerall = statetype = A && ctrl
trigger1 = command = "x"
trigger1 = AILevel = 0
trigger2 = AILevel!=0 && RoundState=2
trigger2 = (random<60*(AILevel**2/64.0)) || ctrl && EnemyNear,HitOver = 0 || ctrl && EnemyNear,MoveType = H
trigger2 = P2BodyDist X = [0,45]
trigger2 = enemynear,pos Y-pos Y=[-30,45]
trigger2 = Pos Y<=-30
trigger2 = Var(15) < 2
;---------------------------------------------------------------------------
; j. MP
[State -1, j. MP]
type = ChangeState
value = 610
triggerall = statetype = A && ctrl
trigger1 = command = "y"
trigger1 = AILevel = 0
trigger2 = AILevel!=0 && RoundState=2
trigger2 = (random<60*(AILevel**2/64.0)) || ctrl && EnemyNear,HitOver = 0 || ctrl && EnemyNear,MoveType = H
trigger2 = P2BodyDist X = [0,45]
trigger2 = enemynear,pos Y-pos Y=[-30,45]
trigger2 = Pos Y<=-30
trigger2 = Var(15) < 2
;---------------------------------------------------------------------------
; j. HP
[State -1, j. HP]
type = ChangeState
value = 620
triggerall = statetype = A && ctrl
trigger1 = command = "z"
trigger1 = AILevel = 0
trigger2 = AILevel!=0 && RoundState=2
trigger2 = (random<60*(AILevel**2/64.0)) || ctrl && EnemyNear,HitOver = 0 || ctrl && EnemyNear,MoveType = H
trigger2 = P2BodyDist X = [0,45]
trigger2 = enemynear,pos Y-pos Y=[-30,45]
trigger2 = Pos Y<=-30
trigger2 = Var(15) < 2
;---------------------------------------------------------------------------
; Rider Kick
[State -1, Rider Kick]
type = ChangeState
value = 651
triggerall = statetype = A && ctrl
trigger1 = command = "holdfwd"
trigger1 = command = "c"
trigger1 = AILevel = 0
trigger2 = AILevel!=0 && RoundState=2
trigger2 = (random<60*(AILevel**2/64.0)) || ctrl && EnemyNear,HitOver = 0 || ctrl && EnemyNear,MoveType = H
trigger2 = P2BodyDist X = [0,45]
trigger2 = enemynear,pos Y-pos Y=[-30,45]
trigger2 = Pos Y<=-30
trigger2 = Var(15) < 2
;---------------------------------------------------------------------------
; j. LK
[State -1, j. LK]
type = ChangeState
value = 630
triggerall = statetype = A && ctrl
trigger1 = command = "a"
trigger1 = AILevel = 0
trigger2 = AILevel!=0 && RoundState=2
trigger2 = (random<60*(AILevel**2/64.0)) || ctrl && EnemyNear,HitOver = 0 || ctrl && EnemyNear,MoveType = H
trigger2 = P2BodyDist X = [0,45]
trigger2 = enemynear,pos Y-pos Y=[-30,45]
trigger2 = Pos Y<=-30
trigger2 = Var(15) < 2
;---------------------------------------------------------------------------
; j. MK
[State -1, j. MK]
type = ChangeState
value = 640
triggerall = statetype = A && ctrl
trigger1 = command = "b"
trigger1 = AILevel = 0
trigger2 = AILevel!=0 && RoundState=2
trigger2 = (random<60*(AILevel**2/64.0)) || ctrl && EnemyNear,HitOver = 0 || ctrl && EnemyNear,MoveType = H
trigger2 = P2BodyDist X = [0,45]
trigger2 = enemynear,pos Y-pos Y=[-30,45]
trigger2 = Pos Y<=-30
trigger2 = Var(15) < 2
;---------------------------------------------------------------------------
; j. HK
[State -1, j. HK]
type = ChangeState
value = 650
triggerall = statetype = A && ctrl
trigger1 = command = "c"
trigger1 = AILevel = 0
trigger2 = AILevel!=0 && RoundState=2
trigger2 = (random<60*(AILevel**2/64.0)) || ctrl && EnemyNear,HitOver = 0 || ctrl && EnemyNear,MoveType = H
trigger2 = P2BodyDist X = [0,45]
trigger2 = enemynear,pos Y-pos Y=[-30,45]
trigger2 = Pos Y<=-30
trigger2 = Var(15) < 2
