; 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 = 30

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

;-| Super Motions |--------------------------------------------------------
	
	[Command]
	name = "2QCF_p"
	command = ~D, DF, F, D, DF, F, x
	time = 20

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

	[Command]
	name = "2QCF_2p"
	command = ~D, DF, F, D, DF, F, x+y
	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_2p"
	command = ~D, B, $D, F, x+y
	time = 30

	;== Reversed

	[Command]
	name = "2QCB_p"
	command = ~D, DB, B, D, DB, B, x
	time = 20

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

	[Command]
	name = "2QCB_2p"
	command = ~D, DB, B, D, DB, B, x+y
	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_2p"
	command = ~D, F, $D, B, x+y
	time = 30

	
;-| Special Motions |------------------------------------------------------
	
	;== Normal
	
	[Command]
	name = "mash_x"
	command = ~x, x, x
	time = 15
	buffer.time = 3

	[Command]
	name = "mash_y"
	command = ~y, y, y
	time = 15
	buffer.time = 3

	[Command]
	name = "B_F_x"
	command = ~30$B, F, x
	time = 30
	
	[Command]
	name = "B_F_y"
	command = ~30$B, F, y
	time = 30

	[Command]
	name = "B_F_2p"
	command = ~30$B, F, x+y
	time = 30
	
	[Command]
	name = "HCF_x"
	command = ~B, $D, F, x
	time = 20
	
	[Command]
	name = "HCF_y"
	command = ~B, $D, F, y
	time = 20

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

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

	[Command]
	name = "QCF_b"
	command = ~D, DF, F, b
	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 = "QCF_2k"
	command = ~D, DF, F, a+b
	time = 15

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

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

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

	[Command]
	name = "DP_2p"
	command = ~F, D, DF, x+y
	time = 15

	[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_2p"
	command = ~D, DB, B, x+y
	time = 15

	;== Reversed

	[Command]
	name = "F_B_x"
	command = ~30$F, B, x
	time = 30
	
	[Command]
	name = "F_B_y"
	command = ~30$F, B, y
	time = 30

	[Command]
	name = "HCB_x"
	command = ~F, $D, B, x
	time = 20
	
	[Command]
	name = "HCB_y"
	command = ~F, $D, B, y
	time = 20
	
	[Command]
	name = "RDP_x"
	command = ~B, D, DB, x
	time = 15

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

	[Command]
	name = "RDP_2p"
	command = ~B, D, DB, x+y
	time = 15

	[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_2p"
	command = ~D, DF, F, x+y
	time = 15

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

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


;-| 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+a
time = 1

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

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

[Command]
name = "HD"
command = a+y
time = 1

[Command]
name = "HD"
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, HD ON]
type = ChangeState
value = IfElse(StateType != A, 900, 901)
triggerall = var(30) = 1000
triggerall = ctrl || (stateno = [200,650]) && var(16) = 1
trigger1 = command = "HD" 
trigger1 = AILevel = 0
;==
trigger2 = AILevel!=0&&RoundState=2
trigger2 = (random<10*(AILevel**2/64.0)) && var(16) = 1
trigger2 = Power >= 3000
trigger2 = IfElse(var(17) = 1, abs(P2Bodydist X)<=75, abs(P2BodyDist X <= 50))
trigger2 = EnemyNear, StateType != A
trigger2 = var(15) = 0
;---------------------------------------------------------------------------
[State -1, Gaia Gear]
type = ChangeState
value = 3020
triggerall = IfElse(Var(31) = 0, var(30) = 1000 && Power >= 3000, var(30) > 0 && Power >= 2000)
triggerall = StateType != A 
triggerall = ctrl  || Anim = 47 && ctrl = 1 || stateno = 100 || (var(17) = [1,2]) && var(31) = 1 || var(17) = 3
;==
trigger1 = IfElse(P2Dist X >= 0, command = "2QCB_2p", command = "2QCF_2p")
trigger1 = AILevel=0
;==
trigger2 = AILevel!=0 && RoundState = 2 
trigger2 = (EnemyNear, StateNo != [120,155]) 
trigger2 = (random<10*(AILevel**2/64.0)) || ((var(17) = [1,2]) || EnemyNear, MoveType = A) && random<25*(AILevel**2/64.0)
trigger2 = abs(P2Bodydist X)<=30
trigger2 = IfElse(EnemyNear, StateType != A, abs(P2Bodydist Y)<=40, (abs(P2BodyDist Y) = [45,70]))
trigger2 = Var(15) < 4
;==
trigger3 = AILevel!=0 && RoundState = 2
trigger3 = Var(17) = 3
trigger3 = IfElse(StateNo = 3012, AnimElemTime(70 >= 0), (AnimElemTime(183)>= 0))
;===========================================================================
;---------------------------------------------------------------------------
[State -1, EX Crazy Puncher]
type = ChangeState
value = 3015
triggerall = Power >= 2000
triggerall = StateType != A 
triggerall = ctrl  || Anim = 47 && ctrl = 1  || stateno = 100 || (var(17) = [1,2])
trigger1 = IfElse(P2Dist X >= 0, command = "QCB_HCF_2p", command = "QCF_HCB_2p")
trigger1 = AILevel=0
;==
trigger2 = AILevel!=0 && RoundState = 2 
trigger2 = (EnemyNear, StateNo != [120,155]) 
trigger2 = (random<15*(AILevel**2/64.0)) || ((var(17) = [1,2]) || EnemyNear, MoveType = A) && random<25*(AILevel**2/64.0)
trigger2 = abs(P2Bodydist X)<=30
trigger2 = IfElse(EnemyNear, StateType != A, abs(P2Bodydist Y)<=70, (abs(P2BodyDist Y) = [100,150]))
trigger2 = Var(15) < 4
;---------------------------------------------------------------------------
[State -1, Crazy Puncher]
type = ChangeState
value = 3010
triggerall = Power >= 1000
triggerall = StateType != A 
triggerall = ctrl  || Anim = 47 && ctrl = 1  || stateno = 100 || (var(17) = [1,2]) 
trigger1 = IfElse(P2Dist X >= 0, command = "QCB_HCF_p", command = "QCF_HCB_p")
trigger1 = AILevel=0
;==
trigger2 = AILevel!=0 && RoundState = 2 
trigger2 = (EnemyNear, StateNo != [120,155]) 
trigger2 = (random<5*(AILevel**2/64.0)) || ((var(17) = [1,2]) || EnemyNear, MoveType = A) && random<25*(AILevel**2/64.0)
trigger2 = abs(P2Bodydist X)<=30
trigger2 = IfElse(EnemyNear, StateType != A, abs(P2Bodydist Y)<=70, (abs(P2BodyDist Y) = [100,150]))
trigger2 = Var(15) < 4
;---------------------------------------------------------------------------
[State -1, Champion Puncher]
type = ChangeState
value = 3000
triggerall = Power >= 1000
triggerall = StateType != A 
triggerall = ctrl  || Anim = 47 && ctrl = 1  || stateno = 100 || (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, StateNo != [120,155]) 
trigger2 = (random<5*(AILevel**2/64.0)) || (var(16) = 1 || EnemyNear, StateType = C || EnemyNear, MoveType = A) && (random<25*(AILevel**2/64.0))
trigger2 = abs(P2Bodydist X)<=30
trigger2 = EnemyNear, StateType != A
trigger2 = Var(15) = 0
;---------------------------------------------------------------------------
[State -1, AI Defense]
type = ChangeState
triggerall = stateno!= [120,160] 
triggerall = roundstate= 2
triggerall = AILevel != 0
triggerall = InGuardDist
triggerall = StateType != A
trigger1 = ctrl 
value = 120
;===========================================================================
;---------------------------------------------------------------------------
[State -1, EX Forbidden Eagle]
type = ChangeState
value = 2020
triggerall = statetype != A
triggerall = Power >= 1000
triggerall = ctrl  || Anim = 47 && ctrl = 1 || stateno = 100 || (var(17) = [1,2]) && StateNo != 2020
trigger1 = IfElse(P2Dist X >= 0, command = "DP_2p", command = "RDP_2p")
trigger1 = AILevel=0
;==
trigger2 = AILevel!=0 && RoundState = 2 
trigger2 = (EnemyNear, StateNo != [120,155]) 
trigger2 = random<5*(AILevel**2/64.0) || ((var(16) = 1 && var(17)) || EnemyNear, StateType = C || EnemyNear, HitFall = 1) && random<25*(AILevel**2/64.0)
trigger2 = abs(P2Bodydist X)<=30
trigger2 = IfElse(EnemyNear, StateType != A, abs(P2Bodydist Y)<=50, (abs(P2BodyDist Y) = [35,175]))
trigger2 = var(15) < IfElse(var(31) = 0, 3, 4)
;--------------------------------------------------------------------------
[State -1, EX Machine Gun Puncher]
type = ChangeState
value = 2005
triggerall = statetype != A
triggerall = Power >= 1000
triggerall = ctrl || Anim = 47 && ctrl = 1 || stateno = 100 || (var(17) = [1,2]) && StateNo != 2005
trigger1 = IfElse(P2Dist X >= 0, command = "HCF_2p", command = "HCB_2p")
trigger1 = AILevel=0
;==
trigger2 = AILevel!=0 && RoundState = 2 
trigger2 = (EnemyNear,StateNo !=[120,155]) 
trigger2 = EnemyNear,MoveType!=A
trigger2 = random<5*(AILevel**2/64.0) || (var(16) = 1 && var(17) = [1,2]) && (random<25*(AILevel**2/64.0))
trigger2 = abs(P2Bodydist X) <= 40
trigger2 = abs(P2BodyDist Y) <= 35
trigger2 = var(15) < IfElse(var(31) = 0, 3, 4)
;--------------------------------------------------------------------------
[State -1, EX Puncher Vision (Fwd)]
type = ChangeState
value = 2010
triggerall = statetype != A
triggerall = Power >= 1000
triggerall = ctrl || Anim = 47 && ctrl = 1 || stateno = 100 || (var(17) = [1,2]) && StateNo != 2010
trigger1 = IfElse(P2Dist X >= 0, command = "QCF_2k", command = "QCB_2k")
trigger1 = AILevel=0
;==
trigger2 = AILevel!=0 && RoundState = 2 
trigger2 = abs(P2Bodydist X) <= 200
trigger2 = abs(P2BodyDist Y) <= 50
trigger2 = (EnemyNear, MoveType = A || var(17) = [1,2]) && (random<15*(AILevel**2/64.0))
trigger2 = var(15) < IfElse(var(31) = 0, 3, 4)
;--------------------------------------------------------------------------
[State -1, EX Puncher Vision (Back)]
type = ChangeState
value = 2012
triggerall = statetype != A
triggerall = Power >= 1000
triggerall = ctrl || Anim = 47 && ctrl = 1 || stateno = 100 || (var(17) = [1,2]) && StateNo != 2012
trigger1 = IfElse(P2Dist X >= 0, command = "QCB_2k", command = "QCF_2k")
trigger1 = AILevel=0
;==
trigger2 = AILevel!=0 && RoundState = 2 
trigger2 = (random<10*(AILevel**2/64.0)) && EnemyNear, MoveType = A
trigger2 = abs(P2Bodydist X) = [0,100]
trigger2 = abs(P2BodyDist Y) <= 50
trigger2 = var(15) < IfElse(var(31) = 0, 3, 4)
;--------------------------------------------------------------------------
[State -1, EX Dash Puncher]
type = ChangeState
value = 2000
triggerall = statetype != A
triggerall = ctrl || Anim = 47 && ctrl = 1 || stateno = 100 || (var(17) = [1,2]) && StateNo != 2000
triggerall = Power >= 1000
trigger1 = IfElse(P2Dist X >= 0, command = "B_F_2p", command = "F_B_2p")
trigger1 = AILevel=0
;==
trigger2 = AILevel!=0 && RoundState = 2 
trigger2 = (EnemyNear,StateNo !=[120,155]) 
trigger2 = EnemyNear, MoveType != A
trigger2 = (random<20*(AILevel**2/64.0))
trigger2 = abs(P2Bodydist X) = [100,250]
trigger2 = IfElse(Var(15) = 0, EnemyNear,StateType = S, (abs(P2BodyDist Y) = [45,105]))
trigger2 = EnemyNear, StateType != C
trigger2 = var(15) < IfElse(var(31) = 0, 3, 4)
;--------------------------------------------------------------------------
[State -1, EX Puncher Weaving]
type = ChangeState
value = 2030
triggerall = statetype != A
triggerall = ctrl || Anim = 47 && ctrl = 1 || stateno = 100 || (var(17) = [1,2]) && StateNo != 2030 
triggerall = Power >= 1000
trigger1 = IfElse(P2Dist X >= 0, command = "QCB_2p", command = "QCF_2p")
trigger1 = AILevel=0
;==
trigger2 = AILevel!=0 && RoundState = 2 
trigger2 = (EnemyNear,StateNo !=[120,155]) 
trigger2 = (random<5*(AILevel**2/64.0)) || EnemyNear, MoveType = A
trigger2 = abs(P2Bodydist X) <= 30
trigger2 = abs(P2BodyDist Y) <= 35
trigger2 = var(15) < IfElse(var(31) = 0, 3, 4)
;---------------------------------------------------------------------------
[State -1, A Forbidden Eagle]
type = ChangeState
value = 1020
triggerall = statetype != A
triggerall = ctrl  || Anim = 47 && ctrl = 1 || stateno = 100 || (var(17) = [1,2]) && (StateNo != [1020,1021]) && StateNo != 2020
trigger1 = IfElse(P2Dist X >= 0, command = "DP_x", command = "RDP_x")
trigger1 = AILevel=0
;==
trigger2 = AILevel!=0 && RoundState = 2 
trigger2 = (EnemyNear, StateNo != [120,155]) 
trigger2 = random<20*(AILevel**2/64.0) || ((var(16) = 1 && var(17)) || EnemyNear, StateType = C || EnemyNear, HitFall = 1 || EnemyNear, MoveType = A) && random<35*(AILevel**2/64.0)
trigger2 = abs(P2Bodydist X)<=20
trigger2 = IfElse(EnemyNear, StateType != A, abs(P2Bodydist Y)<=50, (abs(P2BodyDist Y) = [20,150]))
trigger2 = var(15) < IfElse(var(31) = 0, 3, 4)
;---------------------------------------------------------------------------
[State -1, C Forbidden Eagle]
type = ChangeState
value = 1021
triggerall = statetype != A
triggerall = ctrl  || Anim = 47 && ctrl = 1 || stateno = 100 || (var(17) = [1,2]) && (StateNo != [1020,1021]) && StateNo != 2020
trigger1 = IfElse(P2Dist X >= 0, command = "DP_y", command = "RDP_y")
trigger1 = AILevel=0
;==
trigger2 = AILevel!=0 && RoundState = 2 
trigger2 = (EnemyNear, StateNo != [120,155]) 
trigger2 = random<20*(AILevel**2/64.0) || ((var(16) = 1 && var(17)) || EnemyNear, StateType = C || EnemyNear, MoveType = A) && random<30*(AILevel**2/64.0)
trigger2 = abs(P2Bodydist X)<=20
trigger2 = IfElse(EnemyNear, StateType != A, abs(P2Bodydist Y)<=50, (abs(P2BodyDist Y) = [50,250]))
trigger2 = var(15) < IfElse(var(31) = 0, 3, 4)
;--------------------------------------------------------------------------
[State -1, AI Puncher Upper Fwd]
type = ChangeState
value = 1015
triggerall = (StateNo = [1010,1011]) || StateNo = 2010
triggerall = IfElse(StateNo = 2010, AnimElemTime(4)>=0, AnimElemTime(6)>=0)
trigger1 = AILevel != 0 
trigger1 = P2Bodydist X = [0,100]
trigger1 = IfElse(Var(15) = 0, abs(P2BodyDist Y)<=60, (abs(P2BodyDist Y) = [50,125]))
trigger1 = IfElse(var(31) = 0, var(15) < 3, var(15) < 4)
;--------------------------------------------------------------------------
[State -1, AI Puncher Upper Back]
type = ChangeState
value = 1015
triggerall = (StateNo = [1012,1013]) || StateNo = 2012
triggerall = IfElse(StateNo = 2010, AnimElemTime(4)>=0, AnimElemTime(6)>=0)
trigger1 = AILevel != 0 
trigger1 = P2Bodydist X = [0,100]
trigger1 = IfElse(Var(15) = 0, abs(P2BodyDist Y)<=60, (abs(P2BodyDist Y) = [50,125]))
trigger1 = IfElse(var(31) = 0, var(15) < 3, var(15) < 4)
;--------------------------------------------------------------------------
[State -1, AI Puncher Straight Fwd]
type = ChangeState
value = 1017
triggerall = (StateNo = [1010,1011]) || StateNo = 2010
triggerall = IfElse(StateNo = 2012, AnimElemTime(4)>=0, AnimElemTime(6)>=0)
trigger1 = AILevel != 0 
trigger1 = P2Bodydist X = [50,150]
trigger1 = IfElse(Var(15) = 0, abs(P2BodyDist Y)<=40, (abs(P2BodyDist Y) = [70,150]))
trigger1 = IfElse(var(31) = 0, var(15) < 3, var(15) < 4)
;--------------------------------------------------------------------------
[State -1, AI Puncher Straight Back]
type = ChangeState
value = 1017
triggerall = (StateNo = [1012,1013]) || StateNo = 2012
triggerall = IfElse(StateNo = 2012, AnimElemTime(4)>=0, AnimElemTime(6)>=0)
trigger1 = AILevel != 0 
trigger1 = P2Bodydist X = [0,150]
trigger1 = IfElse(Var(15) = 0, abs(P2BodyDist Y)<=40, (abs(P2BodyDist Y) = [70,150]))
trigger1 = IfElse(var(31) = 0, var(15) < 3, var(15) < 4)
trigger1 = EnemyNear, StateType = S
;--------------------------------------------------------------------------
[State -1, AI Dash Puncher]
type = ChangeState
value = 1031
triggerall = StateNo = 1030 || StateNo = 2030
triggerall = IfElse(StateNo = 2030, AnimElemTime(3)>=0, AnimElemTime(5)>=0)
trigger1 = AILevel != 0 
trigger1 = P2Bodydist X = [0,100]
trigger1 = IfElse(Var(15) = 0, abs(P2BodyDist Y)<=60, (abs(P2BodyDist Y) = [50,125]))
trigger1 = IfElse(var(31) = 0, var(15) < 3, var(15) < 4)
;trigger1 = FrontEdgeBodyDist <= 50
;--------------------------------------------------------------------------
[State -1, AI Parrying Puncher]
type = ChangeState
value = 1032
triggerall = StateNo = 1030 || StateNo = 2030
triggerall = IfElse(StateNo = 2030, AnimElemTime(3)>=0, AnimElemTime(5)>=0)
trigger1 = AILevel != 0 
trigger1 = P2Bodydist X = [0,100]
trigger1 = EnemyNear, MoveType = A
trigger1 = IfElse(Var(15) = 0, abs(P2BodyDist Y)<=60, (abs(P2BodyDist Y) = [50,125]))
trigger1 = IfElse(var(31) = 0, var(15) < 3, var(15) < 4)
;trigger1 = FrontEdgeBodyDist <= 50
;--------------------------------------------------------------------------
[State -1, A Machine Gun Puncher]
type = ChangeState
value = 1005
triggerall = statetype != A
triggerall = ctrl || Anim = 47 && ctrl = 1 || stateno = 100 || (var(17) = [1,2]) && (StateNo !=[1005, 1008]) && (StateNo != 2005)
trigger1 = IfElse(P2Dist X >= 0, command = "HCF_x", command = "HCB_x")
trigger1 = AILevel=0
;==
trigger2 = AILevel!=0 && RoundState = 2 
trigger2 = (EnemyNear,StateNo !=[120,155]) 
trigger2 = EnemyNear,MoveType!=A
trigger2 = (random<15*(AILevel**2/64.0)) || (var(16) = 1 && var(17)) && (random<30*(AILevel**2/64.0)) 
trigger2 = abs(P2Bodydist X) <= 30
trigger2 = abs(P2BodyDist Y) <= 35
trigger2 = IfElse(var(31) = 0, var(15) < 3, var(15) < 4)
;--------------------------------------------------------------------------
[State -1, C Machine Gun Puncher]
type = ChangeState
value = 1005
triggerall = statetype != A
triggerall = ctrl || Anim = 47 && ctrl = 1 || stateno = 100 || (var(17) = [1,2]) && (StateNo !=[1005, 1008]) && (StateNo != 2005)
trigger1 = IfElse(P2Dist X >= 0, command = "HCF_y", command = "HCB_y")
trigger1 = AILevel=0
;==
trigger2 = AILevel!=0 && RoundState = 2 
trigger2 = (EnemyNear,StateNo !=[120,155]) 
trigger2 = EnemyNear,MoveType!=A
trigger2 = (random<15*(AILevel**2/64.0)) || (var(16) = 1 && var(17)) && (random<30*(AILevel**2/64.0)) 
trigger2 = abs(P2Bodydist X) <= 30
trigger2 = abs(P2BodyDist Y) <= 35
trigger2 = IfElse(var(31) = 0, var(15) < 3, var(15) < 4)
;--------------------------------------------------------------------------
[State -1, B Puncher Vision (Fwd)]
type = ChangeState
value = 1010
triggerall = statetype != A
triggerall = ctrl || Anim = 47 && ctrl = 1 || stateno = 100 || (var(17) = [1,2])
trigger1 = IfElse(P2Dist X >= 0, command = "QCF_a", command = "QCB_a")
trigger1 = AILevel=0
;==
trigger2 = AILevel!=0 && RoundState = 2 
trigger2 = (random<25*(AILevel**2/64.0)) && EnemyNear, MoveType != A
trigger2 = EnemyNear,HitDefAttr != SCA,AT
trigger2 = abs(P2Bodydist X) = [50,150]
trigger2 = FrontEdgeBodyDist >= 50
trigger2 = var(15) < IfElse(var(31) = 0, 3, 4)
;--------------------------------------------------------------------------
[State -1, D Puncher Vision (Fwd)]
type = ChangeState
value = 1011
triggerall = statetype != A
triggerall = ctrl || Anim = 47 && ctrl = 1 || stateno = 100 || (var(17) = [1,2])
trigger1 = IfElse(P2Dist X >= 0, command = "QCF_b", command = "QCB_b")
trigger1 = AILevel=0
;==
trigger2 = AILevel!=0 && RoundState = 2 
trigger2 = (random<25*(AILevel**2/64.0)) && EnemyNear, MoveType != A
trigger2 = EnemyNear,HitDefAttr != SCA,NT,ST,HT
trigger2 = abs(P2Bodydist X) = [50,250]
trigger2 = FrontEdgeBodyDist >= 75
trigger2 = var(15) < IfElse(var(31) = 0, 3, 4)
;--------------------------------------------------------------------------
[State -1, B Puncher Vision (Back)]
type = ChangeState
value = 1012
triggerall = statetype != A
triggerall = ctrl || Anim = 47 && ctrl = 1 || stateno = 100 || (var(17) = [1,2])
trigger1 = IfElse(P2Dist X >= 0, command = "QCB_a", command = "QCF_a")
trigger1 = AILevel=0
;==
trigger2 = AILevel!=0 && RoundState = 2 
trigger2 = (random<15*(AILevel**2/64.0)) || EnemyNear, MoveType = A && random<40*(AILevel**2/64.0) 
trigger2 = EnemyNear, MoveType = A
trigger2 = EnemyNear,HitDefAttr != SCA,NT,ST,HT
trigger2 = abs(P2Bodydist X = [25,50])
trigger2 = BackEdgeBodyDist>= 50
trigger2 = var(15) < IfElse(var(31) = 0, 3, 4)
;--------------------------------------------------------------------------
[State -1, D Puncher Vision (Back)]
type = ChangeState
value = 1013
triggerall = statetype != A
triggerall = ctrl || Anim = 47 && ctrl = 1 || stateno = 100 || (var(17) = [1,2])
trigger1 = IfElse(P2Dist X >= 0, command = "QCB_b", command = "QCF_b")
trigger1 = AILevel=0
;==
trigger2 = AILevel!=0 && RoundState = 2 
trigger2 = (random<15*(AILevel**2/64.0)) || EnemyNear, MoveType = A && random<40*(AILevel**2/64.0)
trigger2 = EnemyNear, MoveType = A
trigger2 = EnemyNear,HitDefAttr != SCA,NT,ST,HT
trigger2 = abs(P2Bodydist X = [25,75])
trigger2 = BackEdgeBodyDist>= 75
trigger2 = var(15) < IfElse(var(31) = 0, 3, 4)
;--------------------------------------------------------------------------
[State -1, A Dash Puncher]
type = ChangeState
value = 1000
triggerall = statetype != A
triggerall = ctrl || Anim = 47 && ctrl = 1 || stateno = 100 || (var(17) = [1,2]) && (StateNo != [1000,1001]) && StateNo != 2000
trigger1 = IfElse(P2Dist X >= 0, command = "B_F_x", command = "F_B_x")
trigger1 = AILevel=0
;==
trigger2 = AILevel!=0 && RoundState = 2 
trigger2 = (EnemyNear,StateNo !=[120,155]) 
trigger2 = EnemyNear, MoveType != A
trigger2 = (random<20*(AILevel**2/64.0))
trigger2 = abs(P2Bodydist X) = [75,150]
trigger2 = IfElse(Var(15) = 0, EnemyNear,StateType = S, (abs(P2BodyDist Y) = [100,175]))
trigger2 = EnemyNear, StateType != C
trigger2 = var(15) < IfElse(var(31) = 0, 3, 4)
;--------------------------------------------------------------------------
[State -1, C Dash Puncher]
type = ChangeState
value = 1001
triggerall = statetype != A
triggerall = ctrl || Anim = 47 && ctrl = 1 || stateno = 100 || (var(17) = [1,2]) && (StateNo != [1000,1001]) && StateNo != 2000
trigger1 = IfElse(P2Dist X >= 0, command = "B_F_y", command = "F_B_y")
trigger1 = AILevel=0
;==
trigger2 = AILevel!=0 && RoundState = 2 
trigger2 = (EnemyNear,StateNo !=[120,155]) 
trigger2 = EnemyNear, MoveType != A
trigger2 = (random<20*(AILevel**2/64.0)) 
trigger2 = abs(P2Bodydist X) = [75,200]
trigger2 = IfElse(Var(15) = 0, EnemyNear,StateType = S, (abs(P2BodyDist Y) = [175,275]))
trigger2 = EnemyNear, StateType != C
trigger2 = var(15) < IfElse(var(31) = 0, 3, 4)

;--------------------------------------------------------------------------
[State -1, Puncher Weaving]
type = ChangeState
value = 1030
triggerall = statetype != A
triggerall = ctrl || Anim = 47 && ctrl = 1 || stateno = 100 || (var(17) = [1,2])
trigger1 = IfElse(P2Dist X >= 0, (command = "QCB_x" || command = "QCB_y"), (command = "QCF_x" || command = "QCF_y"))
trigger1 = AILevel=0
;==
trigger2 = AILevel!=0 && RoundState = 2 
trigger2 = (EnemyNear,StateNo !=[120,155]) 
trigger2 = (random<15*(AILevel**2/64.0)) 
trigger2 = EnemyNear, MoveType = A
trigger2 = abs(P2Bodydist X) <= 30
trigger2 = abs(P2BodyDist Y) <= 35
trigger2 = var(15) < IfElse(var(31) = 0, 3, 4)
;===========================================================================
;---------------------------------------------------------------------------
[State -1, Run Fwd]
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"
;---------------------------------------------------------------------------
[State -1, Guard Cancel Roll Back]
type = ChangeState
value = 701
triggerall = statetype != A
triggerall = stateno = [150,151]
triggerall = Power >= 1000
trigger1 = command = "roll" || command = "z"
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" || command = "z"
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" || command = "z"
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" || command = "z"
;---------------------------------------------------------------------------
[State -1, Throw (AI)]
type = ChangeState
value = IfElse(FrontEdgeDist > 50, 800, 805)
triggerall = var(0) = 0
triggerall = AILevel!=0&&RoundState=2
triggerall = statetype = S
trigger1 = ctrl
trigger1 = abs(P2BodyDist X)<=20
trigger1 = EnemyNear,StateType != A
trigger1 = EnemyNear,MoveType != A
trigger1 = (random<20*(AILevel**2/64.0))
trigger1 = var(15) = 0
;---------------------------------------------------------------------------
[State -1, Throw]
type = ChangeState
value = IfElse(command = "y", 800, 805)
triggerall = var(0) = 0
triggerall = AILevel = 0
triggerall = StateType = S
triggerall = ctrl
triggerall = command = "holdfwd" || command = "holdback"
trigger1 = command = "y"
trigger2 = command = "b"

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

;---------------------------------------------------------------------------
[State -1, One-Two Punch]
type = ChangeState
value = 202
triggerall = command != "holddown"
triggerall = StateType !=A
triggerall = var(18) != 3
triggerall = ctrl || Anim = 47 && ctrl = 1 || (stateno = 100) || (stateno = [200,440]) && var(17) = 1 && StateNo != 250
trigger1 = command = "holdfwd" && command = "x"
trigger1 = AILevel=0
;==
trigger2 = AILevel!=0&&RoundState=2
trigger2 = (random<10*(AILevel**2/64.0)) || EnemyNear,StateType = C || (var(16) = 1 || var(17) = 1)
trigger2 = abs(P2Bodydist X)<=25
trigger2 = EnemyNear, StateType != A
trigger2 = var(15) = 0
trigger2 = EnemyNear,MoveType!=A
;---------------------------------------------------------------------------
[State -1, Guard Cancel CD]
type = ChangeState
value = 251
triggerall = statetype != A
triggerall = stateno = 150
triggerall = Power >= 1000
trigger1 = command = "cd" || command = "c"
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 = EnemyNear,MoveType != A
trigger2 = var(15) = 0
;---------------------------------------------------------------------------
[State -1, st.CD]
type = ChangeState
value = 250
triggerall = command != "holddown"
triggerall = statetype != A
triggerall = ctrl || stateno=40 || Anim = 47 && ctrl = 1 || (stateno = 100) 
trigger1 = command = "cd" || command = "c"
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 = EnemyNear,MoveType != A
trigger2 = var(15) = 0
;---------------------------------------------------------------------------
[State -1, j.CD]
type = ChangeState
value = 650
triggerall = statetype = A && ctrl
trigger1 = command = "cd" || command = "c"
trigger1 = AILevel = 0
;==
trigger2 = AILevel!=0&&RoundState=2
trigger2 = (random<60*(AILevel**2/64.0)) || EnemyNear, StateType = C
trigger2 = P2BodyDist X=[0,80]
trigger2 = enemynear,pos Y-pos Y=[-30,65]
trigger2 = IfElse(var(31) = 0, var(15) <= 2,  var(15) < 4)
trigger2 = EnemyNear,MoveType!=A
;---------------------------------------------------------------------------
[State -1, st.A]
type = ChangeState
value = IfElse(abs(P2BodyDist X) >= 20, 200, 201)
triggerall = command != "holddown"
triggerall = StateType !=A
triggerall = ctrl || Anim = 47 && ctrl = 1 || (stateno = 100) || ( (stateno = [200,201]) || (stateno = [230,231]) || stateno = 400 || stateno = 430 ) && Time > 6
trigger1 = command = "x"
trigger1 = AILevel=0
;==
trigger2 = AILevel!=0&&RoundState=2
trigger2 = (random<60*(AILevel**2/64.0))
trigger2 = abs(P2Bodydist X)<=25
trigger2 = abs(P2Bodydist Y)<=40
trigger2 = var(15) = 0
trigger2 = EnemyNear,MoveType!=A
;---------------------------------------------------------------------------
[State -1, st.C]
type = ChangeState
value = IfElse(abs(P2BodyDist X) >= 20, 210, 211)
triggerall = command != "holddown"
triggerall = StateType !=A
triggerall = ctrl || Anim = 47 && ctrl = 1 || (stateno = 100)
trigger1 = command = "y"
trigger1 = AILevel=0
;==
trigger2 = AILevel!=0&&RoundState=2
trigger2 = (random<60*(AILevel**2/64.0))
trigger2 = abs(P2Bodydist X)<=55
trigger2 = abs(P2Bodydist Y)<=40
trigger2 = var(15) = 0
trigger2 = EnemyNear,StateType != C
trigger2 = EnemyNear,MoveType!=A

;---------------------------------------------------------------------------
[State -1, st.B]
type = ChangeState
value = IfElse(abs(P2BodyDist X) >= 20, 230, 231)
triggerall = command != "holddown"
triggerall = StateType !=A
triggerall = ctrl || Anim = 47 && ctrl = 1 || (stateno = 100) || ( (stateno = [200,201]) || (stateno = [230,231]) || stateno = 400 || stateno = 430 ) && Time > 6
trigger1 = command = "a"
trigger1 = AILevel=0
;==
trigger2 = AILevel!=0&&RoundState=2
trigger2 = (random<60*(AILevel**2/64.0))
trigger2 = abs(P2Bodydist X)<=40
trigger2 = abs(P2Bodydist Y)<=40
trigger2 = var(15) = 0
trigger2 = EnemyNear,MoveType!=A
;---------------------------------------------------------------------------
[State -1, st.D]
type = ChangeState
value = IfElse(abs(P2BodyDist X) >= 20, 240, 241)
triggerall = command != "holddown"
triggerall = StateType !=A
triggerall = ctrl  || Anim = 47 && ctrl = 1 || (stateno = 100)
trigger1 = command = "b"
trigger1 = AILevel=0
;==
trigger2 = AILevel!=0&&RoundState=2
trigger2 = (random<60*(AILevel**2/64.0))
trigger2 = abs(P2Bodydist X)<=30
trigger2 = abs(P2Bodydist Y)<=55
trigger2 = var(15) = 0
trigger2 = EnemyNear,MoveType!=A

;---------------------------------------------------------------------------
[State -1, cr.A]
type = ChangeState
value = 400
triggerall = command = "holddown"
triggerall = statetype != A
triggerall = ctrl || Anim = 47 && ctrl = 1 || (stateno = 100) || ( (stateno = [200,201]) || (stateno = [230,231]) || stateno = 400 || stateno = 430 ) && Time > 6
trigger1 = command = "x"
trigger1 = AILevel=0
;==
trigger2 = AILevel!=0&&RoundState=2
trigger2 = (random<60*(AILevel**2/64.0)) 
trigger2 = abs(P2Bodydist X)<=40
trigger2 = abs(P2Bodydist Y)<=40
trigger2 = var(15) = 0
trigger2 = EnemyNear,MoveType!=A
;---------------------------------------------------------------------------
[State -1, cr.C]
type = ChangeState
value = 410
triggerall = command = "holddown"
triggerall = statetype != A
triggerall = ctrl || Anim = 47 && ctrl = 1 || (stateno = 100)
trigger1 = command = "y"
trigger1 = AILevel=0
;==
trigger2 = AILevel!=0&&RoundState=2
trigger2 = (random<60*(AILevel**2/64.0))
trigger2 = abs(P2Bodydist X)<=40
trigger2 = abs(P2Bodydist Y)<=60
trigger2 = var(15) = 0
;---------------------------------------------------------------------------
[State -1, Sliding Puncher]
type = ChangeState
value = 431
triggerall = command = "holddown"
triggerall = statetype != A
triggerall = ctrl || Anim = 47 && ctrl = 1 || (stateno = 100) || (stateno = [200,440]) && var(17) = 1 && StateNo != 250
triggerall = StateNo != 431
triggerall = StateNo != 202
trigger1 = command = "holdfwd" && command = "a"
trigger1 = AILevel=0
;==
trigger2 = AILevel!=0&&RoundState=2
trigger2 = (random<60*(AILevel**2/64.0)) || EnemyNear,StateType = S || EnemyNear, StateType = S && (EnemyNear, StateNo = [120,150])
trigger2 = abs(P2Bodydist X)<=80
trigger2 = abs(P2Bodydist Y)<=40
trigger2 = var(15) = 0
trigger2 = EnemyNear,MoveType!=A

;---------------------------------------------------------------------------
[State -1, cr.B]
type = ChangeState
value = 430
triggerall = command = "holddown"
triggerall = statetype != A
triggerall = ctrl || Anim = 47 && ctrl = 1 || (stateno = 100) || ( (stateno = [200,201]) || (stateno = [230,231]) || stateno = 400 ) && Time > 6
trigger1 = command = "a"
trigger1 = AILevel=0
;==
trigger2 = AILevel!=0&&RoundState=2
trigger2 = EnemyNear,StateType = S ;(random<350*(AILevel**2/64.0)) || EnemyNear,StateType = S || EnemyNear, StateType = S && (EnemyNear, StateNo = [120,150])
trigger2 = abs(P2Bodydist X)<=50
trigger2 = abs(P2Bodydist Y)<=40
trigger2 = var(15) = 0
trigger2 = EnemyNear,MoveType!=A

;---------------------------------------------------------------------------
[State -1, cr.D]
type = ChangeState
value = 440
triggerall = command = "holddown"
triggerall = statetype != A
triggerall = ctrl || Anim = 47 && ctrl = 1 || (stateno = 100)
trigger1 = command = "b"
trigger1 = AILevel=0
;==
trigger2 = AILevel!=0&&RoundState=2
trigger2 = EnemyNear,StateType = S;(random<350*(AILevel**2/64.0)) || (EnemyNear, StateNo = [120,152]) && EnemyNear,StateType = S  
trigger2 = abs(P2Bodydist X)<=65
trigger2 = abs(P2Bodydist Y)<=40
trigger2 = var(15) = 0
trigger2 = EnemyNear,MoveType!=A

;---------------------------------------------------------------------------
[State -1, j.A]
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)) || EnemyNear,StateType = S || EnemyNear, StateType = S && (EnemyNear, StateNo = [120,150])
trigger2 = P2BodyDist X=[0,40]
trigger2 = enemynear,pos Y-pos Y=[-30,45]
trigger2 = IfElse(var(31) = 0, var(15) <= 2,  var(15) < 4)
trigger2 = EnemyNear,MoveType!=A
;---------------------------------------------------------------------------
[State -1, j.C]
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)) || EnemyNear, StateType = C
trigger2 = P2BodyDist X=[0,40]
trigger2 = enemynear,pos Y-pos Y=[-30,45]
trigger2 = IfElse(var(31) = 0, var(15) <= 2,  var(15) < 4)
trigger2 = EnemyNear,MoveType!=A

;---------------------------------------------------------------------------
[State -1, j.B]
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)) || EnemyNear, StateType = C
trigger2 = P2BodyDist X=[0,40]
trigger2 = enemynear,pos Y-pos Y=[-30,45]
trigger2 = IfElse(var(31) = 0, var(15) <= 2,  var(15) < 4)
trigger2 = EnemyNear,MoveType!=A

;---------------------------------------------------------------------------
[State -1, j.D]
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)) || EnemyNear, StateType = C
trigger2 = P2BodyDist X=[0,40]
trigger2 = enemynear,pos Y-pos Y=[-30,45]
trigger2 = IfElse(var(31) = 0, var(15) <= 2,  var(15) < 4)
trigger2 = EnemyNear,MoveType!=A
