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

	; Normal
	[Command]
	name = "QCF_xy"
	command = ~D, DF, F, x+y
	time = 20

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

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

	[Command]
	name = "HCB_yz"
	command = ~F, D, B, y+z
	time = 20

	; Reversed
	[Command]
	name = "QCB_xy"
	command = ~D, DB, B, x+y
	time = 20

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

	[Command]
	name = "HCB_xy"
	command = ~F, D, B, x+y
	time = 20
	
	[Command]
	name = "HCF_yz"
	command = ~B, D, F, y+z
	time = 20
;-| Special Motions |------------------------------------------------------

	; Normal
	[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 = "DP_x"
	command = ~F, D, DF, x
	time = 15

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

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

	[Command]
	name = "DD_x"
	command = ~D, D, x
	time = 15

	[Command]
	name = "DD_y"
	command = ~D, D, y
	time = 15

	[Command]
	name = "DD_z"
	command = ~D, D, z
	time = 15

	[Command]
	name = "HCB_x"
	command = ~F, D, B, x
	time = 15

	[Command]
	name = "HCB_y"
	command = ~F, D, B, y
	time = 15

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

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

	; Reversed	
	[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 = "RDP_x"
	command = ~B, D, DB, x
	time = 15

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

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

	[Command]
	name = "HCF_x"
	command = ~B, D, F, x
	time = 15

	[Command]
	name = "HCF_y"
	command = ~B, D, F, y
	time = 15

	[Command]
	name = "HCF_z"
	command = ~B, D, F, z
	time = 15
	
	[Command]
	name = "QCF_a"
	command = ~D, DF, F, a
	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 = "throw"
command = x+y
time = 1

[Command]
name = "burst"
command = x+a
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

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

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

[Command]
name = "recovery"
command = /z
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]

;===========================================================================
; AI Behavior
;===========================================================================
[State -1, AI Defense]
type = ChangeState
triggerall = stateno!= [120,160] 
triggerall = AILevel != 0 && RoundState = 2
triggerall = ctrl
trigger1 = InGuardDist 
trigger1 = random < 100*(AILevel**2/64.0)
value = 120

;---------------------------------------------------------------------------
[State -1, AI Recovery]
type = ChangeState
triggerall = AILevel != 0 && RoundState = 2
triggerall = HitFall = 1
triggerall = StateNo != [5200,5210]
trigger1 = CanRecover = 1
trigger1 = Random < 30*(AILevel/2**64.0)
value = IfElse(Pos Y < 0, 5210, 5200)

;---------------------------------------------------------------------------
[State -1, AI Jump Cancel]
type = ChangeState
value = 40
triggerall = AILevel != 0 && RoundState = 2
triggerall = StateType != A
triggerall = random < 80*(AILevel**2/64.0)
trigger1 = var(18) < 4 && var(17) = 1 && MoveContact = 1 
trigger1 = StateNo != 200
trigger1 = StateNo != [400,420]
trigger1 = (EnemyNear, StateType = A || var(16) = 2)
trigger2 = StateNo = 1012 && NumTarget(1013) && MoveType = A
trigger3 = StateNo = 1018 && NumTarget(1018) && MoveType = A 

;---------------------------------------------------------------------------
[State -1, AI Air Jump]
type = ChangeState
value = 45
triggerall = AILevel != 0 && RoundState = 2
triggerall = StateNo = 50
triggerall = Time > 13
triggerall = Var(6) = 0
trigger1 = EnemyNear, Pos Y - Pos Y <= -70

;---------------------------------------------------------------------------
[State -1, AI Air Jump Cancel]
type = ChangeState
value = 45
triggerall = AILevel != 0 && RoundState = 2
triggerall = StateType = A
triggerall = var(16) = 1 && MoveHit = 1 && Var(18) < 4
triggerall = StateNo = [600,620]
triggerall = Var(6) = 0
trigger1 = EnemyNear, Pos Y < Pos Y 

;---------------------------------------------------------------------------
[State -1, AI Air Throw]
type = ChangeState
value = IfElse(FrontEdgeBodyDist > 50, 810, 815)
triggerall = AILevel != 0 && RoundState = 2
triggerall = var(1) = 0
triggerall = EnemyNear, StateType = A
triggerall = StateType = A
triggerall = P2BodyDist X = [0,40]
triggerall = P2BodyDist Y = [-5,5]
trigger1 = ctrl 
trigger2 = var(16) = 1 && MoveHit = 1 && var(17) = 1 && MoveContact = 1

;---------------------------------------------------------------------------
[State -1, AI Ground Throw]
type = ChangeState
value = IfElse(FrontEdgeBodyDist > 50, 800, 805)
triggerall = AILevel != 0 && RoundState = 2
triggerall = StateType = S
triggerall = EnemyNear, StateType != A
triggerall = abs(P2BodyDist X) = [0,30]
triggerall = var(0) = 0 && EnemyNear, MoveType != H
trigger1 = (ctrl || stateno = [100,101]) && random < 100*(AILevel**2/64.0)

;---------------------------------------------------------------------------
[State -1, AI 6D]
type = ChangeState
value = 231 
triggerall = AILevel != 0 && RoundState = 2
triggerall = var(15) = 0
triggerall = StateType != A
triggerall = EnemyNear, StateType = A
triggerall = IfElse(var(59) != 1, var(25) = 0, var(25) < 2 )
trigger1 = UniqHitCount > 1 && var(16) = 1 && MoveHit = 1 && var(17) = 1 && MoveContact = 1 && var(18) = [2,3]

;---------------------------------------------------------------------------
[State -1, AI 5D]
type = ChangeState
value = 230
triggerall = AILevel != 0 && RoundState = 2
triggerall = var(15) = 0
triggerall = StateType != A
triggerall = IfElse(var(59) != 1, var(25) = 0, var(25) < 2 )
trigger1 = UniqHitCount > 1 && var(16) = 1 && MoveHit = 1 && var(17) = 1 && MoveContact = 1 && var(18) = [2,3]

;---------------------------------------------------------------------------
[State -1, AI 2D]
type = ChangeState
value = 430 
triggerall = random < 100*(AILevel**2/64.0)
triggerall = AILevel != 0 && RoundState = 2
triggerall = var(15) = 0
triggerall = StateType != A
triggerall = EnemyNear, StateType = A
triggerall = IfElse(var(59) != 1, var(25) = 0, var(25) < 2 )
trigger1 = UniqHitCount > 1 && var(16) = 1 && MoveHit = 1 && var(17) = 1 && MoveContact = 1 && var(18) = [2,3]

;---------------------------------------------------------------------------
[State -1, AI j.D]
type = ChangeState
value = 630
triggerall = AILevel != 0 && RoundState = 2
triggerall = var(15) = 0
triggerall = StateType = A && Pos Y <= -70
triggerall = IfElse(var(59) != 1, var(25) = 0, var(25) < 2 )
trigger1 = UniqHitCount > 1 && var(16) = 1 && MoveHit = 1 && var(17) = 1 && MoveContact = 1 && var(18) = [2,3]

;---------------------------------------------------------------------------
[State -1, AI Seventeen Dissection]
type = ChangeState
value = 3020
triggerall = random < 35*(AILevel**2/64.0)
triggerall = IfElse(var(59) != 1, Power = 3000, Power > 0)
triggerall = AILevel != 0 && RoundState = 2
triggerall = StateType != A
triggerall = abs(P2BodyDist X) <= 75
triggerall = P2BodyDist Y >= -60
triggerall = Var(15) = 0
trigger1 = (ctrl || stateno = [100,101]) 
trigger2 = var(16) = 1 && MoveHit = 1 && (var(17) = [1,2]) 
trigger3 = (ctrl && EnemyNear, MoveType = A) 
trigger4 = stateno = 5120 && time > 6 && P2MoveType = A

;---------------------------------------------------------------------------
[State -1, AI MEoDP: Instant Death]
type = ChangeState
value = 3015
triggerall = random < 35*(AILevel**2/64.0)
triggerall = var(59) = 1
triggerall = Power > 0
triggerall = AILevel != 0 && RoundState = 2
triggerall = StateType != A
triggerall = abs(P2BodyDist X) <= 75
triggerall = P2BodyDist Y >= -45
triggerall = Var(15) = 0
trigger1 = (ctrl || stateno = [100,101]) 
trigger2 = var(16) = 1 && MoveHit = 1 && (var(17) = [1,2]) 
trigger3 = (ctrl && EnemyNear, MoveType = A)
trigger4 = stateno = 5120 && time > 6 && P2MoveType = A

;---------------------------------------------------------------------------
[State -1, AI MEoDP]
type = ChangeState
value = 3010
triggerall = random < 35*(AILevel**2/64.0)
triggerall = var(59) = 0
triggerall = Power >= 2000
triggerall = AILevel != 0 && RoundState = 2
triggerall = StateType != A
triggerall = abs(P2BodyDist X) <= 75
triggerall = P2BodyDist Y >= -45
triggerall = Var(15) = 0
trigger1 = (ctrl || stateno = [100,101])
trigger2 = var(16) = 1 && MoveHit = 1 && (var(17) = [1,2]) 
trigger3 = (ctrl && EnemyNear, MoveType = A) 
trigger4 = stateno = 5120 && time > 6 && P2MoveType = A

;---------------------------------------------------------------------------
[State -1, AI Trump Card Edge No.2]
type = ChangeState
value = 3005
triggerall = random < 35*(AILevel**2/64.0)
triggerall = IfElse(var(59) = 0, Power >= 1000, Power > 0) 
triggerall = AILevel != 0 && RoundState = 2
triggerall = StateType != A
triggerall = abs(P2BodyDist X) <= 90
triggerall = P2StateType != A
triggerall = Var(15) = 0
trigger1 = (ctrl || stateno = [100,101]) 
trigger2 = var(16) = 1 && MoveHit = 1 && (var(17) = [1,2]) 
trigger3 = stateno = 5120 && time > 6 && P2MoveType = A

;---------------------------------------------------------------------------
[State -1, AI Trump Card Edge No.3]
type = ChangeState
value = 3000
triggerall = random < 35*(AILevel**2/64.0)
triggerall = IfElse(var(59) = 0, Power >= 1000, Power > 0) 
triggerall = var(59) != 2
triggerall = AILevel != 0 && RoundState = 2
triggerall = StateType != A
triggerall = abs(P2BodyDist X) <= 75
triggerall = P2BodyDist Y >= -70
triggerall = Var(15) = 0
trigger1 = (ctrl || stateno = [100,101]) 
trigger2 = var(16) = 1 && MoveHit = 1 && (var(17) = [1,2]) 
trigger3 = stateno = 5120 && time > 6 && P2MoveType = A 

;---------------------------------------------------------------------------
[State -1, AI A A Kick Even I Don't Understand]
type = ChangeState
value = 1005
triggerall = random < 60*(AILevel**2/64.0)
triggerall = AILevel != 0 && RoundState = 2
triggerall = StateType != A
triggerall = abs(P2BodyDist X) <= 15
triggerall = P2BodyDist Y >= -70
triggerall = Var(15) = 0
trigger1 = (ctrl || stateno = [100,101])
trigger2 = (ctrl && EnemyNear, MoveType = A)
trigger3 = var(17) = 1 && MoveContact = 1
trigger4 = stateno = 5120 && time > 6 && P2MoveType = A

;---------------------------------------------------------------------------
[State -1, AI B A Kick Even I Don't Understand]
type = ChangeState
value = 1006
triggerall = random < 40*(AILevel**2/64.0)
triggerall = AILevel != 0 && RoundState = 2
triggerall = StateType != A
triggerall = abs(P2BodyDist X) <= 20 
triggerall = P2BodyDist Y >= -90
triggerall = Var(15) = 0
trigger1 = (ctrl || stateno = [100,101])
trigger2 = (ctrl && EnemyNear, MoveType = A)
trigger3 = var(17) = 1 && MoveContact = 1
trigger4 = stateno = 5120 && time > 6 && P2MoveType = A

;---------------------------------------------------------------------------
[State -1, AI C A Kick Even I Don't Understand]
type = ChangeState
value = 1007
triggerall = random < 30*(AILevel**2/64.0)
triggerall = AILevel != 0 && RoundState = 2
triggerall = StateType != A
triggerall = abs(P2BodyDist X) <= 25 
triggerall = P2BodyDist Y >= -105
triggerall = Var(15) = 0
triggerall = IfElse(var(59) = 0, Power >= 500, Power > 0) 
triggerall = var(59) != 2
trigger1 = (ctrl || stateno = [100,101])
trigger2 = (ctrl && EnemyNear, MoveType = A)
trigger3 = var(17) && var(18) < IfElse(var(59) != 1, 6, 7) && StateNo != 1007
trigger4 = (StateNo = [150,155])
trigger5 = stateno = 5120 && time > 6 && P2MoveType = A

;---------------------------------------------------------------------------
[State -1, AI A Trump Card No.3]
type = ChangeState
value = 1000
triggerall = random < 50*(AILevel**2/64.0)
triggerall = AILevel != 0 && RoundState = 2
triggerall = StateType != A 
triggerall = abs(P2BodyDist X) <= 60
triggerall = IfElse(EnemyNear, StateType != A, P2BodyDist Y >= -100, (EnemyNear, Pos Y = [-25,-75]))
triggerall = var(15) = 0
triggerall = EnemyNear, MoveType != A
trigger1 = (ctrl || stateno = [100,101])
trigger2 = var(17) = 1 && MoveContact = 1

;---------------------------------------------------------------------------
[State -1, AI B Trump Card No.3]
type = ChangeState
value = 1001
triggerall = random < 40*(AILevel**2/64.0)
triggerall = AILevel != 0 && RoundState = 2
triggerall = StateType != A 
triggerall = abs(P2BodyDist X) = [65,85]
triggerall = IfElse(EnemyNear, StateType != A, P2BodyDist Y >= -100, (EnemyNear, Pos Y = [-25,-75]))
triggerall = var(15) = 0
triggerall = EnemyNear, MoveType != A
trigger1 = (ctrl || stateno = [100,101]) && random < 45*(AILevel**2/64.0)
trigger2 = var(16) = 1 && MoveHit = 1 && var(17) = 1 && MoveContact = 1

;---------------------------------------------------------------------------
[State -1, AI C Trump Card No.3]
type = ChangeState
value = 1002
triggerall = random < 30*(AILevel**2/64.0)
triggerall = AILevel != 0 && RoundState = 2
triggerall = StateType != A 
triggerall = IfElse(var(59) = 0, Power >= 500, Power > 0) 
triggerall = var(59) != 2
triggerall = abs(P2BodyDist X) <= 115
triggerall = IfElse(EnemyNear, StateType != A, P2BodyDist Y >= -100, (EnemyNear, Pos Y = [-25,-75]))
triggerall = var(15) = 0
triggerall = EnemyNear, MoveType != A
trigger1 = (ctrl || stateno = [100,101])
trigger2 = var(16) = 1 && MoveHit = 1 && var(17) && var(18) < IfElse(var(59) = 0, 6, 7) && StateNo != 1002
trigger3 = (StateNo = [150,155]) 

;---------------------------------------------------------------------------
[State -1, AI A Trump Card No.2]
type = ChangeState
value = 1010
triggerall = random < 100*(AILevel**2/64.0)
triggerall = AILevel != 0 && RoundState = 2
triggerall = StateType != A 
triggerall = abs(P2BodyDist X) <= 50
triggerall = EnemyNear, StateType != A
triggerall = var(15) = 0
triggerall = EnemyNear, MoveType != A
trigger1 = var(16) = 1 && MoveHit = 1 && var(17) = 1

;---------------------------------------------------------------------------
[State -1, AI B Trump Card No.2]
type = ChangeState
value = 1011
triggerall = random < 80*(AILevel**2/64.0)
triggerall = AILevel != 0 && RoundState = 2
triggerall = StateType != A 
triggerall = abs(P2BodyDist X) <= 70
triggerall = EnemyNear, StateType != A
triggerall = var(15) = 0
triggerall = EnemyNear, MoveType != A
trigger1 = var(16) = 1 && MoveHit = 1 && var(17) = 1 && var(18) > 1 

;---------------------------------------------------------------------------
[State -1, AI C Trump Card No.2]
type = ChangeState
value = 1012
triggerall = random < 15*(AILevel**2/64.0)
triggerall = AILevel != 0 && RoundState = 2
triggerall = StateType != A 
triggerall = IfElse(var(59) = 0, Power >= 500, Power > 0) 
triggerall = abs(P2BodyDist X) <= 110
triggerall = EnemyNear, StateType != A
triggerall = var(15) = 0
triggerall = EnemyNear, MoveType != A
trigger1 = var(16) = 1 && MoveHit = 1 && var(17) && var(18) < IfElse(var(59) = 0, 6, 7) && StateNo != 1012 
trigger2 = (StateNo = [150,155])
trigger3 = stateno = 5120 && time > 6

;---------------------------------------------------------------------------
[State -1, A Engrossed Counterattack]
type = ChangeState
value = 1016
triggerall = random < 60*(AILevel**2/64.0)
triggerall = AILevel != 0 && RoundState = 2
triggerall = P2BodyDist X = [0,40]
triggerall = EnemyNear, Pos Y > Pos Y 
triggerall = StateType = A
triggerall = Pos Y <= -50
triggerall = var(15) = 0
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = var(17) = 1 && MoveContact = 1 && var(18) < 6

;---------------------------------------------------------------------------
[State -1, B Engrossed Counterattack]
type = ChangeState
value = 1016
triggerall = random < 60*(AILevel**2/64.0)
triggerall = AILevel != 0 && RoundState = 2
triggerall = P2BodyDist X = [0,50]
triggerall = EnemyNear, Pos Y > Pos Y 
triggerall = StateType = A
triggerall = Pos Y <= -50
triggerall = var(15) = 0
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = var(17) = 1 && MoveContact = 1 && var(18) < 6

;---------------------------------------------------------------------------
[State -1, C Engrossed Counterattack]
type = ChangeState
value = 1017
triggerall = random < 60*(AILevel**2/64.0)
triggerall = AILevel != 0 && RoundState = 2
triggerall = IfElse(var(59) = 0, Power >= 500, Power > 0) 
triggerall = var(59) != 2
triggerall = P2BodyDist X = [0,60]
triggerall = EnemyNear, Pos Y > Pos Y 
triggerall = StateType = A
triggerall = Pos Y <= -50
triggerall = var(15) = 0
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = var(17) && var(18) < IfElse(var(59) = 0, 7, 8) && StateNo != 1022
trigger3 = (StateNo = [150,155])
trigger4 = stateno = 5120 && time > 6

;---------------------------------------------------------------------------
[State -1, AI God Speed Flash]
type = ChangeState
value = 2000
triggerall = random < 50*(AILevel**2/64.0)
triggerall = AILevel != 0 && RoundState = 2
triggerall = StateType != A
triggerall = IfElse(var(59) = 0, Power >= 500, Power > 0) 
triggerall = var(59) != 2
triggerall = IfElse(var(59) != 1, var(25) = 0, var(25) < 2 )
trigger1 = var(16) = 1 && MoveHit = 1 && var(17) && var(18) < 7 && StateNo != 2000 

;---------------------------------------------------------------------------
[State -1, AI God Speed Strike]
type = ChangeState
value = 2005
triggerall = random < 50*(AILevel**2/64.0)
triggerall = AILevel != 0 && RoundState = 2
triggerall = StateType != A
triggerall = IfElse(var(59) = 0, Power >= 500, Power > 0) 
triggerall = var(59) != 2
triggerall = IfElse(var(59) != 1, var(25) = 0, var(25) < 2 )
trigger1 = var(16) = 1 && MoveHit = 1 && var(17) && var(18) < 7 && StateNo != 2005 

;---------------------------------------------------------------------------
[State -1, AI 5A]
type = ChangeState
value = 200 
triggerall = random < 100 * (AILevel**2/64.0)
triggerall = AILevel != 0 && RoundState = 2
triggerall = abs(P2BodyDist X) <= 40
triggerall = P2StateType != A
triggerall = StateType != A
triggerall = var(15) = 0
triggerall = P2MoveType != A
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = (var(17) = 1 && MoveContact = 1 || Time > 4) && (var(18) = 1) 

;---------------------------------------------------------------------------
[State -1, AI 5B]
type = ChangeState
value = 210 
triggerall = random < 100 * (AILevel**2/64.0)
triggerall = AILevel != 0 && RoundState = 2
triggerall = abs(P2BodyDist X) <= 40
triggerall = IfElse(P2StateType != A, abs(P2BodyDist Y) <= 40, abs(P2BodyDist Y) = [20, 40])
triggerall = StateType != A
triggerall = P2StateNo != 5120
triggerall = P2MoveType != A
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = var(17) = 1 && MoveContact = 1 && var(18) < 2

;---------------------------------------------------------------------------
[State -1, AI 6C]
type = ChangeState
value = 221 
triggerall = Random < 100*(AILevel/2**64.0)
triggerall = AILevel != 0 && RoundState = 2
triggerall = abs(P2BodyDist X) <= 55
triggerall = IfElse(P2StateType != A, abs(P2BodyDist Y) <= 30, abs(P2BodyDist Y) = [10,30])
triggerall = StateType != A
triggerall = var(15) = 0
triggerall = P2MoveType != A
trigger1 = (ctrl || (StateNo = [100,101]))
trigger2 = var(16) = 1 && var(17) = 1 && MoveHit = 1 && (var(18) = [2,3]) 

;---------------------------------------------------------------------------
[State -1, AI 5C]
type = ChangeState
value = 220
triggerall = Random < 100*(AILevel/2**64.0)
triggerall = AILevel != 0 && RoundState = 2
triggerall = abs(P2BodyDist X) <= 55
triggerall = IfElse(P2StateType != A, abs(P2BodyDist Y) <= 30, abs(P2BodyDist Y) = [10,30])
triggerall = var(15) = 0
triggerall = P2MoveType != A
triggerall = StateType != A
triggerall = IfElse(var(59) != 1, var(25) = 0, var(25) < 2 )
trigger1 = var(17) = 1 && MoveContact = 1 && var(18) < 4

;---------------------------------------------------------------------------
[State -1, AI 2A]
type = ChangeState
value = 400
triggerall = random < 100 * (AILevel**2/64.0)
triggerall = AILevel != 0 && RoundState = 2
triggerall = abs(P2BodyDist X) <= 40
triggerall = IfElse(P2StateType != A, abs(P2BodyDist Y) <= 30, abs(P2BodyDist Y) = [10,30]) 
triggerall = StateType != A
triggerall = var(15) = 0
triggerall = P2MoveType != A
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = (var(17) = 1 && MoveContact = 1 || Time > 4) && (var(18) = 1)

;---------------------------------------------------------------------------
[State -1, AI 2B]
type = ChangeState
value = 410
triggerall = random < 100 * (AILevel**2/64.0)
triggerall = AILevel != 0 && RoundState = 2
triggerall = abs(P2BodyDist X) <= 50
triggerall = var(15) = 0
triggerall = P2MoveType != A
triggerall = IfElse(P2StateType != A, abs(P2BodyDist Y) <= 40, abs(P2BodyDist Y) = [10, 40])
triggerall = StateType != A
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = var(17) = 1 && MoveContact = 1 && var(18) < 2

;---------------------------------------------------------------------------
[State -1, AI 2C]
type = ChangeState
value = 420
triggerall = random < 100 * (AILevel**2/64.0)
triggerall = AILevel != 0 && RoundState = 2
triggerall = abs(P2BodyDist X) <= 40
triggerall = var(15) = 0
triggerall = P2MoveType != A
triggerall = P2StateType != A
triggerall = StateType != A
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = var(17) = 1 && MoveContact = 1 && var(18) < 3

;---------------------------------------------------------------------------
[State -1, AI j.A]
type = ChangeState
value = 600
triggerall = Random < 100*(AILevel/2**64.0)
triggerall = AILevel != 0 && RoundState = 2
triggerall = P2BodyDist X = [0,60]
triggerall = (P2BodyDist Y = [-75,-25]) 
triggerall = var(15) = 0
triggerall = P2MoveType != A
triggerall = StateType = A
trigger1 = (ctrl || StateNo = 110 && Vel X > 0)

;---------------------------------------------------------------------------
[State -1, AI j.B]
type = ChangeState
value = 610
triggerall = Random < 100*(AILevel/2**64.0)
triggerall = AILevel != 0 && RoundState = 2
triggerall = P2BodyDist X = [0,40]
triggerall = (P2BodyDist Y = [-10,40]) 
triggerall = var(15) = 0
triggerall = P2MoveType != A
triggerall = StateType = A
trigger1 = (ctrl || StateNo = 110 && Vel X > 0)
trigger2 = var(17) = 1 && MoveContact = 1 && var(18) < 2

;---------------------------------------------------------------------------
[State -1, AI j.C]
type = ChangeState
value = 620
triggerall = Random < 100*(AILevel/2**64.0)
triggerall = AILevel != 0 && RoundState = 2
triggerall = P2BodyDist X = [0,60]
triggerall = (P2BodyDist Y = [-40,0]) 
triggerall = var(15) = 0
triggerall = P2MoveType != A
triggerall = StateType = A
trigger1 = (ctrl || StateNo = 110 && Vel X > 0)
trigger2 = var(17) = 1 && MoveContact = 1 && var(18) < 3

;===========================================================================
; Player Behavior
;===========================================================================

;---------------------------------------------------------------------------
[State -1, Seventeen Dissection]
type = ChangeState
value = 3020
triggerall = IfElse(var(59) != 1, Power = 3000, Power > 0)
triggerall = AILevel = 0
triggerall = StateType != A
triggerall = IfElse(P2Dist X >= 0, command = "HCB_yz", command = "HCF_yz")
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = IfElse(var(59) = 0, (var(17) = [1,2]), var(17))
trigger3 = (StateNo = [150,155]) && random < 10*(AILevel**2/64.0)
trigger3 = stateno = 5120 && time > 6

;---------------------------------------------------------------------------
[State -1, MEoDP: Instant Death]
type = ChangeState
value = 3015
triggerall = var(59) = 1
triggerall = Power > 0
triggerall = AILevel = 0
triggerall = StateType != A
triggerall = IfElse(P2Dist X >= 0, command = "HCF_xy", command = "HCB_xy")
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = var(17)
trigger3 = stateno = 5120 && time > 6

;---------------------------------------------------------------------------
[State -1, MEoDP]
type = ChangeState
value = 3010
triggerall = var(59) = 0
triggerall = Power >= 2000
triggerall = AILevel = 0
triggerall = StateType != A
triggerall = IfElse(P2Dist X >= 0, command = "HCF_xy", command = "HCB_xy")
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = var(17) = [1,2]
trigger3 = stateno = 5120 && time > 6

;---------------------------------------------------------------------------
[State -1, Trump Card Edge No.2]
type = ChangeState
value = 3005
triggerall = IfElse(var(59) = 0, Power >= 1000, Power > 0) 
triggerall = var(59) != 2
triggerall = AILevel = 0
triggerall = StateType != A
triggerall = IfElse(P2Dist X >= 0, command = "QCB_xy", command = "QCF_xy")
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = var(17) = [1,2]
trigger3 = stateno = 5120 && time > 6

;---------------------------------------------------------------------------
[State -1, Trump Card Edge No.3]
type = ChangeState
value = 3000
triggerall = IfElse(var(59) = 0, Power >= 1000, Power > 0) 
triggerall = var(59) != 2
triggerall = AILevel = 0
triggerall = StateType != A
triggerall = IfElse(P2Dist X >= 0, command = "QCF_xy", command = "QCB_xy")
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = var(17) = [1,2]
trigger3 = stateno = 5120 && time > 6

;---------------------------------------------------------------------------
[State -1, God Speed Flash]
type = ChangeState
value = 2000
triggerall = AILevel = 0
triggerall = StateType != A
triggerall = IfElse(P2Dist X >= 0, command = "QCF_a", command = "QCB_a")
triggerall = IfElse(var(59) = 0, Power >= 500, Power > 0) 
triggerall = var(59) != 2
triggerall = IfElse(var(59) != 1, var(25) = 0, var(25) < 2 )
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = var(17) && var(18) < 7 && StateNo != 2000
trigger3 = (StateNo = [150,155])
trigger4 = stateno = 5120 && time > 6

;---------------------------------------------------------------------------
[State -1, God Speed Strike]
type = ChangeState
value = 2005
triggerall = AILevel = 0
triggerall = StateType != A
triggerall = IfElse(P2Dist X >= 0, command = "QCB_a", command = "QCF_a")
triggerall = IfElse(var(59) = 0, Power >= 500, Power > 0) 
triggerall = var(59) != 2
triggerall = IfElse(var(59) != 1, var(25) = 0, var(25) < 2 )
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = var(17) && var(18) < 7 && StateNo != 2005
trigger3 = (StateNo = [150,155])
trigger4 = stateno = 5120 && time > 6

;---------------------------------------------------------------------------
[State -1, A A Kick Even I Don't Understand]
type = ChangeState
value = 1005
triggerall = AILevel = 0
triggerall = StateType != A
triggerall = IfElse(P2Dist X >= 0, command = "DP_x", command = "RDP_x")
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = var(17) = 1 && MoveContact = 1
trigger3 = stateno = 5120 && time > 6

;---------------------------------------------------------------------------
[State -1, B A Kick Even I Don't Understand]
type = ChangeState
value = 1006
triggerall = AILevel = 0
triggerall = StateType != A
triggerall = IfElse(P2Dist X >= 0, command = "DP_y", command = "RDP_y")
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = var(17) = 1 && MoveContact = 1
trigger3 = stateno = 5120 && time > 6

;---------------------------------------------------------------------------
[State -1, C A Kick Even I Don't Understand]
type = ChangeState
value = 1007
triggerall = AILevel = 0
triggerall = StateType != A
triggerall = IfElse(P2Dist X >= 0, command = "DP_z", command = "RDP_z")
triggerall = IfElse(var(59) = 0, Power >= 500, Power > 0) 
triggerall = var(59) != 2
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = var(17) && var(18) < IfElse(var(59) != 1, 6, 7) && StateNo != 1007
trigger3 = (StateNo = [150,155])
trigger4 = stateno = 5120 && time > 6

;---------------------------------------------------------------------------
[State -1, A Trump Card No.2]
type = ChangeState
value = 1010
triggerall = AILevel = 0
triggerall = StateType != A 
triggerall = IfElse(P2Dist X >= 0,  command = "QCB_x", command = "QCF_x")
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = var(17) = 1 && MoveContact = 1
trigger3 = stateno = 5120 && time > 6

;---------------------------------------------------------------------------
[State -1, B Trump Card No.2]
type = ChangeState
value = 1011
triggerall = AILevel = 0
triggerall = StateType != A 
triggerall = IfElse(P2Dist X >= 0,  command = "QCB_y", command = "QCF_y")
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = var(17) = 1 && MoveContact = 1
trigger3 = stateno = 5120 && time > 6

;---------------------------------------------------------------------------
[State -1, C Trump Card No.2]
type = ChangeState
value = 1012
triggerall = IfElse(var(59) = 0, Power >= 500, Power > 0) 
triggerall = var(59) != 2
triggerall = AILevel = 0
triggerall = StateType != A 
triggerall = IfElse(P2Dist X >= 0,  command = "QCB_z", command = "QCF_z")
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = var(17) && var(18) < IfElse(var(59) = 0, 6, 7) && StateNo != 1012
trigger3 = (StateNo = [150,155])
trigger4 = stateno = 5120 && time > 6

;---------------------------------------------------------------------------
[State -1, A Trump Card No.3]
type = ChangeState
value = 1000
triggerall = AILevel = 0
triggerall = StateType != A 
triggerall = IfElse(P2Dist X >= 0,  command = "QCF_x", command = "QCB_x")
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = var(17) = 1 && MoveContact = 1
trigger3 = stateno = 5120 && time > 6

;---------------------------------------------------------------------------
[State -1, B Trump Card No.3]
type = ChangeState
value = 1001
triggerall = AILevel = 0
triggerall = StateType != A 
triggerall = IfElse(P2Dist X >= 0, command = "QCF_y", command = "QCB_y")
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = var(17) = 1 && MoveContact = 1
trigger3 = stateno = 5120 && time > 6

;---------------------------------------------------------------------------
[State -1, C Trump Card No.3]
type = ChangeState
value = 1002
triggerall = AILevel = 0
triggerall = IfElse(var(59) = 0, Power >= 500, Power > 0) 
triggerall = var(59) != 2
triggerall = StateType != A 
triggerall = IfElse(P2Dist X >= 0, command = "QCF_z", command = "QCB_z")
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = var(17) && var(18) < IfElse(var(59) = 0, 6, 7) && StateNo != 1002
trigger3 = (StateNo = [150,155])
trigger4 = stateno = 5120 && time > 6

;---------------------------------------------------------------------------
[State -1, A Engrossed Counterattack]
type = ChangeState
value = 1015
triggerall = AILevel = 0
triggerall = command = "DD_x"
triggerall = StateType = A
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = var(17) = 1 && MoveContact = 1 && var(18) < 6
trigger3 = stateno = 5120 && time > 6

;---------------------------------------------------------------------------
[State -1, B Engrossed Counterattack]
type = ChangeState
value = 1016
triggerall = AILevel = 0
triggerall = command = "DD_y"
triggerall = StateType = A
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = var(17) = 1 && MoveContact = 1 && var(18) < 6
trigger3 = stateno = 5120 && time > 6

;---------------------------------------------------------------------------
[State -1, C Engrossed Counterattack]
type = ChangeState
value = 1017
triggerall = AILevel = 0
triggerall = IfElse(var(59) = 0, Power >= 500, Power > 0) 
triggerall = var(59) != 2
triggerall = StateType = A 
triggerall = command = "DD_z"
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = var(17) && var(18) < IfElse(var(59) = 0, 6, 7) && StateNo != 1017
trigger3 = (StateNo = [150,155])
trigger4 = stateno = 5120 && time > 6

;---------------------------------------------------------------------------
[State -1, Burst Engage]
type = ChangeState
value = 700
triggerall = AILevel = 0
triggerall = command = "burst"
triggerall = var(59) = 0
triggerall = Power >= 1000
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = var(17) = 1 && MoveContact = 1
trigger3 = StateNo = [150,155]

;---------------------------------------------------------------------------
[State -1, Jump Cancel]
type = ChangeState
value = 40
triggerall = StateType != A
triggerall = AILevel = 0
triggerall = command = "up"
trigger1 = var(18) < 4 && var(17) = 1 && MoveContact = 1
trigger1 = StateNo != 200
trigger1 = StateNo != [400,420]
trigger2 = StateNo = 1012 && NumTarget(1013) && MoveType = A
trigger3 = StateNo = 1018 && NumTarget(1018) && MoveType = A

;---------------------------------------------------------------------------
[State -1, Air Jump]
type = ChangeState
value = 45
triggerall = AILevel = 0
triggerall = StateNo = 50
triggerall = AILevel = 0
triggerall = Time > 13
triggerall = Var(6) = 0
trigger1 = command = "up"

;---------------------------------------------------------------------------
[State -1, Air Jump Cancel]
type = ChangeState
value = 45
triggerall = AILevel = 0
triggerall = StateType = A
triggerall = var(16) = 1 && MoveHit = 1 && Var(18) < 4
triggerall = StateNo = [600,620]
triggerall = Var(6) = 0
trigger1 = command = "up"

;---------------------------------------------------------------------------
[State -1, Air Dash Cancel]
type = ChangeState
value = 110
triggerall = AILevel = 0
triggerall = StateNo = [600,620]
triggerall = Var(7) = 0
triggerall = command = "FF"
trigger1 = Var(17)

;---------------------------------------------------------------------------
[State -1, Air Dash]
type = ChangeState
value = IfElse(command = "FF", 110, 115)
triggerall = AILevel = 0
triggerall = StateNo = 50
triggerall = Pos Y <= -50
triggerall = Var(7) = 0
triggerall = command = "FF" || command = "BB"
trigger1 = ctrl

;---------------------------------------------------------------------------
[State -1, Run]
type = ChangeState
value = IfElse(P2Dist X < 0, 105, 100)
triggerall = AILevel = 0
triggerall = StateType = S
triggerall = command = "FF"
triggerall = Anim != 702
trigger1 = ctrl

;---------------------------------------------------------------------------
[State -1, Backhop]
type = ChangeState
triggerall = AILevel = 0
value = IfElse(P2Dist X < 0, 100, 105)
triggerall = StateType = S
triggerall = command = "BB"
triggerall = Anim != 702
trigger1 = ctrl

;---------------------------------------------------------------------------
[State -1, Air Throw]
type = ChangeState
value = IfElse(command != "holdback", 810, 815)
triggerall = AILevel = 0
triggerall = StateType = A
triggerall = command = "throw"
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = var(17) = 1 && MoveContact = 1

;---------------------------------------------------------------------------
[State -1, Ground Throw]
type = ChangeState
value = IfElse(command != "holdback", 800, 805)
triggerall = AILevel = 0
triggerall = StateType = S
triggerall = ctrl
trigger1 = command = "throw"

;---------------------------------------------------------------------------
[State -1, 5A]
type = ChangeState
value = 200 
triggerall = AILevel = 0
triggerall = command != "holddown"
triggerall = command = "x"
triggerall = StateType != A
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = StateNo = 400 && var(17)
trigger3 = Time > 4 && (var(18) = 1)

;---------------------------------------------------------------------------
[State -1, 5B]
type = ChangeState
value = 210 
triggerall = AILevel = 0
triggerall = command != "holddown"
triggerall = command = "y"
triggerall = StateType != A
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = var(17) = 1 && MoveContact = 1 && var(18) < 2

;---------------------------------------------------------------------------
[State -1, 6C]
type = ChangeState
value = 221 
triggerall = AILevel = 0
triggerall = command != "holddown"
triggerall = command = "fwd_z"
triggerall = StateType != A
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = (var(17) = 1 && MoveContact = 1) && (var(18) < 4) 

;---------------------------------------------------------------------------
[State -1, 5C]
type = ChangeState
value = 220
triggerall = AILevel = 0
triggerall = command != "holddown"
triggerall = command = "z"
triggerall = StateType != A
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = var(17) = 1 && MoveContact = 1 && var(18) < 3

;---------------------------------------------------------------------------
[State -1, 6D]
type = ChangeState
value = 231 
triggerall = AILevel = 0
triggerall = command != "holddown"
triggerall = command = "fwd_a"
triggerall = StateType != A
triggerall = IfElse(var(59) != 1, var(25) = 0, var(25) < 2 )
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = var(17) = 1 && MoveContact = 1 && var(18) < 4

;---------------------------------------------------------------------------
[State -1, 5D]
type = ChangeState
value = 230 
triggerall = AILevel = 0
triggerall = command != "holddown"
triggerall = command = "a"
triggerall = StateType != A
triggerall = IfElse(var(59) != 1, var(25) = 0, var(25) < 2 )
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = var(17) = 1 && MoveContact = 1 && var(18) < 4

;---------------------------------------------------------------------------
[State -1, 2A]
type = ChangeState
value = 400
triggerall = AILevel = 0
triggerall = command = "holddown"
triggerall = command = "x"
triggerall = StateType != A
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = StateNo = 200 && var(17)
trigger3 = Time > 2 && (var(18) = 1) 

;---------------------------------------------------------------------------
[State -1, 2B]
type = ChangeState
value = 410
triggerall = AILevel = 0
triggerall = command = "holddown"
triggerall = command = "y"
triggerall = StateType != A
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = var(17) = 1 && MoveContact = 1 && var(18) < 2

;---------------------------------------------------------------------------
[State -1, 2C]
type = ChangeState
value = 420
triggerall = AILevel = 0
triggerall = command = "holddown"
triggerall = command = "z"
triggerall = StateType != A
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = var(17) = 1 && MoveContact = 1 && var(18) < 3

;---------------------------------------------------------------------------
[State -1, 2D]
type = ChangeState
value = 430
triggerall = AILevel = 0
triggerall = command = "holddown"
triggerall = command = "a"
triggerall = StateType != A
triggerall = IfElse(var(59) != 1, var(25) = 0, var(25) < 2 )
trigger1 = ctrl || (StateNo = [100,101])
trigger2 = var(17) = 1 && MoveContact = 1 && var(18) < 4

;---------------------------------------------------------------------------
[State -1, j.A]
type = ChangeState
value = 600
triggerall = AILevel = 0
triggerall = command = "x"
triggerall = StateType = A
trigger1 = ctrl || StateNo = 110 && Vel X > 0

;---------------------------------------------------------------------------
[State -1, j.B]
type = ChangeState
value = 610
triggerall = AILevel = 0
triggerall = command = "y"
triggerall = StateType = A
trigger1 = ctrl || StateNo = 110 && Vel X > 0
trigger2 = var(17) = 1 && MoveContact = 1 && var(18) < 2

;---------------------------------------------------------------------------
[State -1, j.C]
type = ChangeState
value = 620
triggerall = AILevel = 0
triggerall = command = "z"
triggerall = StateType = A
trigger1 = ctrl || StateNo = 110 && Vel X > 0 
trigger2 = var(17) = 1 && MoveContact = 1 && var(18) < 3

;---------------------------------------------------------------------------
[State -1, j.D]
type = ChangeState
value = 630
triggerall = AILevel = 0
triggerall = command = "a"
triggerall = StateType = A
triggerall = IfElse(var(59) != 1, var(25) = 0, var(25) < 2 )
trigger1 = ctrl || (StateNo = [100,101]) 
trigger2 = var(17) = 1 && MoveContact = 1 && var(18) < 4
