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


;-| AvX Motions |--------------------------------------------------------

[Command]
name = "Pause"
command = s
time = 5

[Command]
name = "Taunt"
command = s;~D, DF, F, s
time = 17

[Command]
name = "Taunt"
command = s;~D, DB, B, s
time = 17

[Command]
name = "Down"
command = D
time = 5

[Command]
name = "Up"
command = U
time = 5


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

;Gamma Wave
[Command]
name = "Gamma Wave"
command = ~D, DF, F, x+y

;Gamma Wave
[Command]
name = "Gamma Wave"
command = ~D, DF, F, x+z


;Gamma Wave
[Command]
name = "Gamma Wave"
command = ~D, DF, F, z+y


;Gamma Wave
[Command]
name = "Gamma Wave"
command = ~D, DF, F, x+y+z



;Gamma Crush
[Command]
name = "Gamma Crush"
command = ~D, DB, B, x+y

;Gamma Crush
[Command]
name = "Gamma Crush"
command = ~D, DB, B, x+z

;Gamma Crush
[Command]
name = "Gamma Crush"
command = ~D, DB, B, z+y

;Gamma Crush
[Command]
name = "Gamma Crush"
command = ~D, DB, B, x+y+z


;Gamma Quake
[Command]
name = "Gamma Quake"
command = ~D, DF, F, a+b

;Gamma Quake
[Command]
name = "Gamma Quake"
command = ~D, DF, F, a+c

;Gamma Quake
[Command]
name = "Gamma Quake"
command = ~D, DF, F, c+b

;Gamma Quake
[Command]
name = "Gamma Quake"
command = ~D, DF, F, a+b+c

;Red Rage
[Command]
name = "RedRage"
command = ~D, DB, B, a+b

;Red Rage
[Command]
name = "RedRage"
command = ~D, DB, B, c+b

;Red Rage
[Command]
name = "RedRage"
command = ~D, DB, B, a+c

;Red Rage
[Command]
name = "RedRage"
command = ~D, DB, B, a+b+c


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

;Gamma Charge
[Command]
name = "QCF_x"
command = ~D, DF, F, x

;Gamma Charge
[Command]
name = "QCF_y"
command = ~D, DF, F, y

;Gamma Charge
[Command]
name = "QCF_z"
command = ~D, DF, F, z

;Gamma Charge UF
[Command]
name = "QCF_a"
command = ~D, DF, F, a

;Gamma Charge UF
[Command]
name = "QCF_b"
command = ~D, DF, F, b

;Gamma Charge UF
[Command]
name = "QCF_c"
command = ~D, DF, F, c

;Gamma Tornado
[Command]
name = "QCB_x"
command = ~F, DF, D, DB, B, x
command.time = 20

;Gamma Tornado
[Command]
name = "QCB_x"
command = ~F, D, B, x

;Gamma Tornado
[Command]
name = "QCB_x"
command = ~F, DF, D, DB, B, y
command.time = 20

;Gamma Tornado
[Command]
name = "QCB_x"
command = ~F, D, B, y

;Gamma Tornado
[Command]
name = "QCB_x"
command = ~F, DF, D, DB, B, z
command.time = 20

;Gamma Tornado
[Command]
name = "QCB_x"
command = ~F, D, B, z

;Gamma Charge U
[Command]
name = "DP_x"
command = ~F, D, DF,x

;Gamma Charge U
[Command]
name = "DP_y"
command = ~F, D, DF, y

;Gamma Charge U
[Command]
name = "DP_z"
command = ~F, D, DF, z

;Gamma Wave
[Command]
name = "BF_x"
command = ~B, F, x

;Gamma Wave
[Command]
name = "BF_y"
command = ~B, F, y

;Gamma Wave
[Command]
name = "BF_z"
command = ~B, F, z


[Command]
name = "Counter"
command = /B,c


[Command]
name = "Super Jump"
command = D,$U


;----|Basic Motions|---------------------------------------


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

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

[Command]
name = "recovery";Required (do not remove)
command = y+z
time = 1

[Command]
name = "recovery";Required (do not remove)
command = x+z
time = 1

;-| Dir + Button |---------------------------------------------------------
[Command]
name = "down_a"
command = /$D,a
time = 1

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


;-| Single Button |---------------------------------------------------------
[Command]
name = "a"
command = a
time = 1

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

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

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

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

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

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

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

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

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

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

;---|Hold Buttons|------------------------

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


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

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

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

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

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

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

[Statedef -1]

;===========================================================================
;------|AI Activation|------------------------------------------------------
;===========================================================================

[State -1, AI Activation]
type = varset
triggerall = AILevel > 1
triggerall = (roundstate = 2) && (var(59) = 0)
trigger1 = Random <= (ifelse(AILevel =1,40,(AILevel-2)*100))
v = 59
value = 1

[State -1, AI Deactivation]
type = varset
triggerall = AIlevel < 8
triggerall = var(59) = 1
trigger1 = Random > ((AILevel-2)*100)
trigger2 = roundstate != 2
v = 59
value = 0


[State -1, AI Dampiner]
type = ChangeState
triggerall = (roundstate = 2) && (var(59) != 0)
triggerall = Random > AILevel*100
triggerall = animtime = 0
triggerall = movetype != H
triggerall = ctrl
trigger1 = statetype = S && (stateno != [120,150]) && (stateno != 40)
trigger1 = stateno != [10,12]
value = 0
ctrl = 1


[State -1, Move Miss Reset]
type = VarSet
trigger1 = 1
var(9) = 0

[State -1, Enemy Y dist]
type = VarSet
trigger1 = 1;var(59)
var(8) = floor(P2Dist Y - (abs(EnemyNear, const(size.mid.pos.y)) - abs(const(size.mid.pos.y))))

[State -1, Enemy Head Pos]
type = VarSet
trigger1 = 1;var(59)
var(7) = abs(enemynear,const(size.head.pos.y))

;===========================================================================
;------|AI Moves|-----------------------------------------------------------
;===========================================================================

;---------------------------------------------------------------------------
[State -1]
type = ChangeState
value = 7500
triggerall = Var(59)
triggerall = statetype != A
triggerall = random < 700
trigger1 = ctrl && (screenpos x = [enemynear(0),screenpos x,enemynear(1),screenpos x])
trigger2 = ctrl && (screenpos x = [enemynear(1),screenpos x,enemynear(0),screenpos x])

;---------------------------------------------------------------------------
[State -1]
type = ChangeState
value = 7500
triggerall = Var(59)
triggerall = statetype != A
trigger1 = stateno = 420 && movecontact

;---------------------------------------------------------------------------
[State -1]
type = ChangeState
value = 105
triggerall = numenemy < 2
triggerall = Var(59)
triggerall = BackEdgeDist > 90
triggerall = stateno != 105
triggerall = p2bodydist x < 100
triggerall = ctrl
triggerall = StateType != A
trigger1 = p2statetype = L && random < 300

;---------------------------------------------------------------------------
[State -1, anti crouch spam]
type = ChangeState
value = 131
triggerall = Var(59)
triggerall = statetype != A
triggerall = p2bodydist x < 80
triggerall = random <= 900
triggerall = p2statetype = A && ctrl
trigger1 = prevstateno = 5120
trigger2 = prevstateno = 52

[State -1, AI Guarding, Easy/Medium AI]
type = ChangeState
triggerall = (roundstate = 2) && (var(59) != 0)
triggerall = AILevel <=5
triggerall = (Ctrl) && (p2movetype = A) && (statetype = S)
trigger1 = (p2bodydist x <= 250) && (random = [200,899]) && (vel x < 0)
trigger2 = (p2bodydist x <= 250) && (random = [800,899]) && (vel x > 0)
trigger3 = (p2bodydist x <= 250) && (random = [400,899]) && (vel x = 0)
trigger4 = (anim = 21)
trigger5 = (prevstateno > 5000) && (random < 200)
value = 130

[State -1, AI Guarding, Easy/Medium AI]
type = ChangeState
triggerall = (roundstate = 2) && (var(59) != 0)
triggerall = AILevel <=5
triggerall = (Ctrl) && (p2movetype = A) && (statetype = C)
trigger1 = (p2bodydist x <= 250) && (random = [500,899])
trigger2 = (prevstateno > 5000) && (random < 200)
value = 131

[State -1, AI Guarding, Easy/Medium AI]
type = ChangeState
triggerall = (roundstate = 2) && (var(59) != 0)
triggerall = AILevel <=5
triggerall = (Ctrl) && (p2movetype = A) && (statetype = A)
trigger1 = (p2bodydist x <= 250) && (random = [700,899])
trigger2 = (anim = 43) || (anim = 46)
trigger3 = (prevstateno > 5000) && (random < 200)
value = 132

[State -1, AI Guarding, Hard AI]
type = ChangeState
triggerall = (var(59) != 0) && Numenemy && (stateno != [120,155])
triggerall = AILevel > 5
triggerall = Random <= (AILevel * 10)
triggerall =!(enemynear,hitdefattr=SCA,AT)
triggerall = inguarddist
trigger1 = ctrl
value = 120

[State -1, AI Guard Push (Standing)]
type = ChangeState
triggerall = Var(59)
triggerall = AILevel >= 4
triggerall = p2bodydist x =[0,40]
triggerall = StateType != A
triggerall = enemynear, HitDefAttr = SCA,NA,NT,NP,SA,ST,SP
trigger1 = stateno = [150,153]
trigger1 = Time >= 5
trigger1 = random < 100+300*(BackEdgeDist < 30)
value = 7610


;---------------------------------------------------------------------------
[State -1, AI Throw]
type = ChangeState
value = 800
triggerall = var(59)
triggerall = p2bodydist X <= 20
triggerall = random < 300
triggerall = statetype = S
trigger1 = p2bodydist y = [-20,20]
trigger1 = ctrl

;---------------------------------------------------------------------------
[State -1, AI Air Throw]
type = ChangeState
value = 920
triggerall = var(59)
triggerall = p2bodydist X <= 20
triggerall = p2bodydist y = [-20,20]
triggerall = random < 300
trigger1 = statetype = A && ctrl 
trigger1 = p2movetype != H
trigger1 = pos Y < -50

;---------------------------------------------------------------------------
[State -1,AI run fwd]
type = ChangeState
value = 100
triggerall = var(59)
triggerall = stateno != 100
triggerall = statetype != A
triggerall = !inguarddist
trigger1 = ctrl
trigger1 = p2movetype != A
trigger1 = p2bodydist X > 100
trigger1 = random <= 50

;---------------------------------------------------------------------------
[State -1,AI run back]
type = ChangeState
value = 105
triggerall = var(59)
triggerall = stateno != 105
triggerall = backedgedist > 70
triggerall = statetype != A
trigger1 = statetype = S && ctrl
trigger1 = p2movetype = A
trigger1 = p2bodydist X < 120
triggerall = random <= 200

;---------------------------------------------------------------------------
[State -1,AI run fwd stop]
type = ChangeState
value = 0
triggerall = var(59)
triggerall = stateno = 100
trigger1 = p2movetype = A
trigger1 = p2bodydist X <= 105


;===========================================================================
;AI Combo
;===========================================================================

;---------------------------------------------------------------------------
[State -1, AI Stand Strong Kick]
type = ChangeState
value = 320
triggerall = var(59)
triggerall = statetype != A
triggerall = p2bodydist X = [0,20+40*(enemynear,statetype = A)]
triggerall = p2bodydist y = [-150,5]
triggerall = stateno != [200,225]
trigger1 = ctrl && p2movetype != A
trigger1 = p2statetype != L && random < 250

;---------------------------------------------------------------------------
[State -1, AI Stand Strong Punch]
type = ChangeState
value = 220
triggerall = var(59)
triggerall = statetype != A
triggerall = p2bodydist X = [0,180]
triggerall = stateno != [300,320]
trigger1 = ctrl && p2movetype != A
trigger1 = p2statetype != L && random < 200

;---------------------------------------------------------------------------
[State -1, AI Crouch Strong Kick]
type = ChangeState
value = 520
triggerall = var(59)
triggerall = statetype != A
triggerall = p2bodydist X = [0,70]
triggerall =  -75 <= p2bodydist y <= -75+var(7)
triggerall = stateno != [400,425]
trigger1 = p2statetype != L && ctrl  && random < 250 ; && p2movetype = H

;---------------------------------------------------------------------------
[State -1, AI Crouch Strong Punch]
type = ChangeState
value = 420
triggerall = var(59)
triggerall = statetype != A
triggerall = p2bodydist X = [0,90]
triggerall = stateno != [500,525]
trigger1 = p2movetype != A
trigger1 = p2statetype != L && ctrl  && random < 250 ;&& p2movetype = H
trigger2 = stateno = 220 && movehit && time > 16

;---------------------------------------------------------------------------
[State -1, AI Stand Medium Kick]
type = ChangeState
value = 310
triggerall = var(59)
triggerall = statetype != A
triggerall = p2bodydist X = [0,110]
triggerall =  -65 <= p2bodydist y <= -65+var(7)
;triggerall = p2bodydist y = [-5,5]
triggerall = stateno != [200,225]
trigger1 = p2movetype != A && p2statetype != A && p2statetype != L
trigger1 = ctrl
trigger1 = random < 200

;---------------------------------------------------------------------------
[State -1, AI Stand Medium Punch]
type = ChangeState
value = 210
triggerall = var(59)
triggerall = p2bodydist X = [0,130]
triggerall =  -95 <= p2bodydist y <= -95+var(7)
triggerall = statetype != A
triggerall = stateno != [300,320]
trigger1 = ctrl
trigger1 = random < 400
trigger1 = p2movetype != A && p2statetype != A && p2statetype != L

;---------------------------------------------------------------------------
[State -1, AI Crouch Medium Kick]
type = ChangeState
value = 510
triggerall = var(59)
triggerall = statetype != A
triggerall = p2bodydist X = [0,70]
triggerall = stateno != [400,425]
trigger1 = p2bodydist y = [-5,5]
trigger1 = p2statetype != L; && p2statetype != A
trigger1 = ctrl && random < 300

;---------------------------------------------------------------------------
[State -1, AI Crouch Medium Punch]
type = ChangeState
value = 410
triggerall = var(59)
triggerall = Statetype != A
triggerall = p2bodydist X = [0,100]
triggerall = p2bodydist y = [-5,5]
triggerall = stateno != [500,525]
trigger1 = random < 300
trigger1 = p2movetype != A && p2statetype != A && p2statetype != L
trigger1 = ctrl

;---------------------------------------------------------------------------
[State -1, AI Stand Light Kick]
type = ChangeState
value = 300
triggerall = var(59)
triggerall = statetype != A
trigger1 = p2bodydist X = [0,65]
trigger1 = p2bodydist y = [-5,5]
;triggerall =  -70 <= p2bodydist y <= -70+var(7)
triggerall = stateno != [200,225]
trigger1 = ctrl
trigger1 = random < 300
trigger1 = p2statetype != A && p2statetype != L

;---------------------------------------------------------------------------
[State -1,AI Stand Light punch]
type = ChangeState
value = 200
triggerall = var(59)
triggerall = p2bodydist X = [0,90]
triggerall =  -85 <= p2bodydist y <= -85+var(7)
triggerall = statetype != A
triggerall = stateno != [300,320]
trigger1 = ctrl
trigger1 = random < 500
trigger1 = p2statetype != A && p2statetype != L

;---------------------------------------------------------------------------
[State -1, AI Crouch Kick]
type = ChangeState
value = 500
triggerall = var(59)
triggerall = statetype != A
triggerall = stateno != [400,425]
trigger1 = p2bodydist X = [0,75]
trigger1 = p2bodydist y = [-5,5]
trigger1 = p2statetype != A  && ctrl && random < 500

;---------------------------------------------------------------------------
[State -1, AI Crouch Punch]
type = ChangeState
value = 400
triggerall = var(59)
triggerall = p2bodydist X = [0,100]
;triggerall =  -50 <= p2bodydist y <= -50+var(7)
triggerall = p2bodydist y = [-5,5]
triggerall = statetype != A
triggerall = stateno != [500,525]
trigger1 = ctrl
trigger1 = random < 300
trigger1 = p2statetype != A && p2statetype != L

;---------------------------------------------------------------------------
[State -1, Gamma Wave Far]
type = ChangeState
value = 1260
triggerall = var(59)
triggerall = var(40) = 0
triggerall = stateno != [1240,1260]
triggerall = statetype != A
trigger1 = ctrl && random < 50 && p2dist x  >100
trigger2 = p2stateno = [5110,5120]

;---------------------------------------------------------------------------
[State -1, AI Gamma Charge H]
type = ChangeState
value = 1450+10*(p2bodydist x = [150,210])+20*(p2bodydist x = [211,270])
triggerall = var(59)
triggerall = statetype != A
triggerall = p2statetype != L
triggerall = p2bodydist X > 50
triggerall = p2bodydist Y > -90
triggerall = random < 100-50*(prevstateno = [1450,1470])
trigger1 = ctrl

;---------------------------------------------------------------------------
[State -1, AI Gamma Charge U]
type = ChangeState
value = 1510+10*(p2bodydist Y/p2bodydist X = [-2,-1.6])+20*(p2bodydist Y/p2bodydist X = [-1.5,-1])
triggerall = var(59)
triggerall = statetype != A
triggerall = p2statetype != L
triggerall = p2bodydist X = [1,90]
triggerall = p2bodydist Y/p2bodydist X = [-340,-1]
triggerall = random < 100-50*(prevstateno = [1510,1530])
trigger1 = ctrl
trigger2 = var(9)
trigger3 = (stateno = [1450,1470]) || (stateno = [1510,1530])
trigger3 = var(39) = 1 && Movecontact && random < 300

;---------------------------------------------------------------------------
[State -1, AI Gamma Charge UF]
type = ChangeState
value = 1480+10*(p2bodydist X = [90,170])+20*(p2bodydist X = [170,270])
triggerall = var(59)
triggerall = statetype != A
triggerall = p2statetype != L
triggerall = p2bodydist X = [1,270]
triggerall = p2bodydist Y/p2bodydist X = [-2,-0.8]
triggerall = random < 100-50*(prevstateno = [1510,1530])
trigger1 = ctrl
trigger2 = var(9)
trigger3 = (stateno = [1450,1470]) || (stateno = [1510,1530])
trigger3 = var(39) = 1 && Movecontact && random < 300

;---------------------------------------------------------------------------
[State -1, AI Gamma Slam]
type = ChangeState
value = 1240+10*(p2bodydist x = [150,210])+20*(p2bodydist x = [211,270])
triggerall = var(59)
triggerall = statetype != A
triggerall = p2statetype != L
triggerall = p2bodydist X > 70
triggerall = p2bodydist Y > -70
;triggerall =  -75 <= p2bodydist y <= -75+var(7)
triggerall = random < 100-50*(prevstateno = [1240,1260])
trigger1 = ctrl
;---------------------------------------------------------------------------
[State -1, AI Jump in]
type = ChangeState
value = ifelse(random < 500,100,631)
triggerall = stateno != 100 || stateno != 631
triggerall = var(59)
trigger1 = p2bodydist X = [120,270]
trigger1 = statetype != A && p2statetype != L
trigger1 = ctrl
trigger1 = random < 100

;-------------------------------------------------------------------------
[State -1, AI Gamma Wave]
type = ChangeState
value = 3000
triggerall = var(29)=0
triggerall = enemynear,life > 300 && NumHelper(21300) = 0
triggerall = Var(59) && (stateno != [7720,7721]) && (stateno != [3000,3500]) 
triggerall = power >= 1000 
triggerall = statetype != A
triggerall = p2bodydist X > 50
triggerall =  p2bodydist y > -120
triggerall = random < 100 + 50*floor(enemynear,backedgedist/50) 
triggerall = p2statetype != L
trigger1 = ctrl

;-------------------------------------------------------------------------
[State -1, AI Tactical Advantage]
type = ChangeState
value = 3100
triggerall = var(29)=1
triggerall = enemynear,life > 300
triggerall = Var(59) && (stateno != [7720,7721]) && (stateno != [3000,3500])
triggerall = power >= 1000
triggerall = statetype != A
triggerall = p2bodydist X > 50
triggerall = ctrl
trigger1 = random < 100 + 50*floor(enemynear,backedgedist/50)
trigger2 = projhit(21240) = 1


;-------------------------------------------------------------------------
[State -1, AI Gamma Crush]
type = ChangeState
value = 3040
triggerall = enemynear,life > 300
triggerall = Var(59) && (stateno != [7720,7721]) && (stateno != [3000,3500]) 
triggerall = power >= 1000
triggerall = statetype != A
triggerall = p2bodydist X > 80
triggerall =  p2bodydist y > -340
triggerall = random < 100; + 100*(enemynear,movetype, = H)
triggerall = p2statetype != L && p2stateno != 5120
trigger1 = ctrl

;-------------------------------------------------------------------------
[State -1, AI Gamma Quake]
type = ChangeState
value = 3080
triggerall = enemynear,life > 300
triggerall = Var(59) && (stateno != [7720,7721]) && (stateno != [3000,3500]) 
triggerall = power >= 1000
triggerall = statetype != A
triggerall = p2bodydist X = [10,150]
triggerall =  p2bodydist y > -240
triggerall = random < 100; + 100*(enemynear,movetype, = H)
triggerall = p2statetype != L && p2stateno != 5120
trigger1 = ctrl

;---------------------------------------------------------------------------
[State -1, AI Air Strong Punch]
type = ChangeState
value = 620
triggerall = var(59)
trigger1 = p2bodydist X = [0,90]
trigger1 = statetype = A && ctrl && random < 200
trigger2 = stateno = 710 && movecontact && random = [0,499]

;---------------------------------------------------------------------------
[State -1, AI Air Strong Kick]
type = ChangeState
value = 720
triggerall = var(59)
triggerall = p2bodydist X = [0,90]
trigger1 = statetype = A && ctrl && random < 200
trigger2 = stateno = 710 && movecontact && random = [500,999]

;---------------------------------------------------------------------------
[State -1, AI Air Medium Punch]
type = ChangeState
value = 610
triggerall = var(59)
triggerall = p2bodydist X = [0,90]
trigger1 = statetype = A && ctrl && random < 300
trigger1 = var(8) = [-25,25]
trigger2 = stateno = 700 && movecontact


;---------------------------------------------------------------------------
[State -1, AI Air Medium Kick]
type = ChangeState
value = 710
triggerall = var(59)
trigger1 = statetype = A && ctrl && random < 200
trigger1 = var(8) = [-25,25]
trigger1 = p2bodydist X = [0,90]
trigger2 = stateno = 610 && movecontact

;---------------------------------------------------------------------------
[State -1, AI Air Punch]
type = ChangeState
value = 600
triggerall = var(59)
trigger1 = p2bodydist X <= 80
trigger1 = statetype = A && ctrl
trigger1 = var(8) = [-25,25] ;&& p2statetype = A
trigger1 = random < 400
trigger2 = stateno = 7720 || stateno = 7721
trigger2 = pos y < -150
trigger2 = random = [0,299]

;---------------------------------------------------------------------------
[State -1, AI Air Kick]
type = ChangeState
value = 700
triggerall = var(59)
trigger1 = statetype = A && ctrl && random < 300
trigger1 = var(8) = [-25,25]
trigger1 = p2bodydist X = [0,90]
trigger2 = stateno = 600 && movecontact
trigger3 = stateno = 7720 || stateno = 7721
trigger3 = pos y < -150
trigger3 = random = [300,599]

;===========================================================================
;Player Controls
;===========================================================================

;---------------------------------------------------------------------------

[State -1, Gamma Wave]
type = ChangeState
value = 3000
triggerall = !var(59)
triggerall = var(29) = 0
triggerall = command = "Gamma Wave"
triggerall = power >= 1000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (hitdefattr = SC,NA,NP,SA,SP) && movecontact
trigger3 = stateno = 21275
trigger4 = stateno = [1240,1260]

;---------------------------------------------------------------------------

[State -1, Tactical Advantage]
type = ChangeState
value = 3100
triggerall = !var(59)
triggerall = var(29) = 1
triggerall = command = "Gamma Wave"
triggerall = power >= 1000
triggerall = statetype != A
triggerall = enemynear,stateno!=[5110,5120]
trigger1 = ctrl
trigger2 = (hitdefattr = SC,NA,NP,SA,SP) && movecontact
trigger3 = stateno = 21275
trigger4 = stateno = [1240,1260]


;---------------------------------------------------------------------------

[State -1, Gamma Crush]
type = ChangeState
value = 3040
triggerall = !var(59)
triggerall = command = "Gamma Crush"
triggerall = power >= 1000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (hitdefattr = SC,NA,NP,SA,SP) && movecontact
trigger3 = stateno = 21275
trigger4 = stateno = [1240,1260]


;---------------------------------------------------------------------------

[State -1, Gamma Quake]
type = ChangeState
value = 3080
triggerall = !var(59)
triggerall = command = "Gamma Quake"
triggerall = power >= 1000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (hitdefattr = SC,NA,NP,SA,SP) && movecontact
trigger3 = stateno = 21275
trigger4 = stateno = [1240,1260]

;---------------------------------------------------------------------------

[State -1, Red Rage]
type = ChangeState
value = 3500
triggerall = !var(59)
triggerall = command = "RedRage"
triggerall = power >= 1000
triggerall = statetype != A
triggerall = numexplod(3501)=0
triggerall = var(29)=1
trigger1 = ctrl
trigger2 = (hitdefattr = SC,NA,NP,SA,SP) && movecontact
trigger3 = stateno = 21275
trigger4 = stateno = [1240,1260]

;---------------------------------------------------------------------------
[State -1, Gamma Tornado]
type = ChangeState
value = 1270
triggerall = !var(59)
triggerall = command = "QCB_x"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (hitdefattr = SC,NA,NP) && movecontact

;---------------------------------------------------------------------------
[State -1, Gamma Charge U Near]
type = ChangeState
value = 1510
triggerall = var(39) <3
triggerall = !var(59)
triggerall = command = "DP_x"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (hitdefattr = SC,NA,NP) && movecontact
trigger3 = stateno = 21275

;---------------------------------------------------------------------------
[State -1, Gamma Charge U Near]
type = ChangeState
value = 1510
triggerall = var(39) = 1
trigger1 = stateno = [1450,1530]
trigger1 = AnimElem = 3, >= 0
trigger1 = command = "holdup" && (command = "a" || command = "x")
trigger1 = command != "holdfwd" && command != "holdback"

;---------------------------------------------------------------------------
[State -1, Gamma Charge U Mid]
type = ChangeState
value = 1520
triggerall = var(39) <3
triggerall = !var(59)
triggerall = command = "DP_y"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = var(51)
trigger3 = stateno = 21275

;---------------------------------------------------------------------------
[State -1, Gamma Charge U Mid]
type = ChangeState
value = 1520
triggerall = !var(59)
triggerall = var(39) = 1
trigger1 = stateno = [1450,1530]
trigger1 = AnimElem = 3, >= 0
trigger1 = command = "holdup" && (command = "b" || command = "y")
trigger1 = command != "holdfwd" && command != "holdback"

;---------------------------------------------------------------------------
[State -1, Gamma Charge U Far]
type = ChangeState
value = 1530
triggerall = var(39) <3
triggerall = !var(59)
triggerall = command = "DP_z"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (hitdefattr = SC,NA,NP) && movecontact
trigger3 = stateno = 21275

;---------------------------------------------------------------------------
[State -1, Gamma Charge U Far]
type = ChangeState
value = 1530
triggerall = !var(59)
triggerall = var(39) = 1
trigger1 = stateno = [1450,1530]
trigger1 = AnimElem = 3, >= 0
trigger1 = command = "holdup" && (command = "c" || command = "z")
trigger1 = command != "holdfwd" && command != "holdback"

;---------------------------------------------------------------------------
[State -1, Gamma Charge UB Near]
type = ChangeState
value = 1540
triggerall = var(39) <3
triggerall = !var(59)
triggerall = var(39) = 1
triggerall = AnimElem = 3, >= 0
triggerall = (stateno = [1450,1470]) || (stateno = [1510,1530])
trigger1 = command = "holdback" && command = "holdup" && (command = "a" || command = "x")

;---------------------------------------------------------------------------
[State -1, Gamma Charge UB Mid]
type = ChangeState
value = 1550
triggerall = !var(59)
triggerall = var(39) = 1
triggerall = AnimElem = 3, >= 0
triggerall = (stateno = [1450,1470]) || (stateno = [1510,1530])
trigger1 = command = "holdback" && command = "holdup" && (command = "b" || command = "y")

;---------------------------------------------------------------------------
[State -1, Gamma Charge UB Far]
type = ChangeState
value = 1560
triggerall = !var(59)
triggerall = var(39) = 1
triggerall = AnimElem = 3, >= 0
triggerall = (stateno = [1450,1470]) || (stateno = [1510,1530])
trigger1 = command = "holdback" && command = "holdup" && (command = "c" || command = "z")

;---------------------------------------------------------------------------
[State -1, Gamma Charge B Near]
type = ChangeState
value = 1570
triggerall = !var(59)
triggerall = var(39) = 1 && AnimElem = 3, >= 0
triggerall = (stateno = [1450,1470]) || (stateno = [1510,1530])
trigger1 = command = "holdback" && command != "holdup" && (command = "a" || command = "x")

;---------------------------------------------------------------------------
[State -1, Gamma Charge B Mid]
type = ChangeState
value = 1580
triggerall = !var(59)
triggerall = var(39) = 1 && AnimElem = 3, >= 0
triggerall = (stateno = [1450,1470]) || (stateno = [1510,1530])
trigger1 = command = "holdback" && command != "holdup" && (command = "b" || command = "y")

;---------------------------------------------------------------------------
[State -1, Gamma Charge B Far]
type = ChangeState
value = 1590
triggerall = !var(59)
triggerall = var(39) = 1 && AnimElem = 3, >= 0
triggerall = (stateno = [1450,1470]) || (stateno = [1510,1530])
trigger1 = command = "holdback" && command != "holdup" && (command = "c" || command = "z")

;---------------------------------------------------------------------------
[State -1, Gamma Charge UF Near]
type = ChangeState
value = 1480
triggerall = var(39) <3
triggerall = !var(59)
triggerall = command = "QCF_a"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (hitdefattr = SC,NA,NP) && movecontact
trigger3 = stateno = 21275


;---------------------------------------------------------------------------
[State -1, Gamma Charge UF Near]
type = ChangeState
value = 1480
triggerall = !var(59)
triggerall = var(39) = 1
triggerall = AnimElem = 3, >= 0
trigger1 = stateno = [1450,1530]
trigger1 = command = "holdfwd" && command = "holdup" && (command = "a" || command = "x")

;---------------------------------------------------------------------------
[State -1, Gamma Charge UF Mid]
type = ChangeState
value = 1490
triggerall = var(39) <3
triggerall = !var(59)
triggerall = command = "QCF_b"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (hitdefattr = SC,NA,NP) && movecontact
trigger3 = stateno = 21275

;---------------------------------------------------------------------------
[State -1, Gamma Charge UF Mid]
type = ChangeState
value = 1490
triggerall = !var(59)
triggerall = var(39) = 1
triggerall = AnimElem = 3, >= 0
trigger1 = stateno = [1450,1530]
trigger1 = command = "holdfwd" && command = "holdup" && (command = "b" || command = "y")

;---------------------------------------------------------------------------
[State -1, Gamma Charge UF Far]
type = ChangeState
value = 1500
triggerall = var(39) <3
triggerall = !var(59)
triggerall = command = "QCF_c"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (hitdefattr = SC,NA,NP) && movecontact
trigger3 = stateno = 21275

;---------------------------------------------------------------------------
[State -1, Gamma Charge UF Far]
type = ChangeState
value = 1500
triggerall = !var(59)
triggerall = var(39) = 1
triggerall = AnimElem = 3, >= 0
trigger1 = stateno = [1450,1530]
trigger1 = command = "holdfwd" && command = "holdup" && (command = "c" || command = "z")

;---------------------------------------------------------------------------
[State -1, Gamma Charge H Near]
type = ChangeState
value = 1450
triggerall = var(39) <3
triggerall = !var(59)
triggerall = command = "QCF_x"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (hitdefattr = SC,NA,NP) && movecontact
trigger3 = stateno = 21275

;---------------------------------------------------------------------------
[State -1, Gamma Charge H Near]
type = ChangeState
value = 1450
triggerall = !var(59)
triggerall = var(39) = 1 && AnimElem = 3, >= 0
trigger1 = stateno = [1450,1530]
trigger1 = command = "holdfwd" && command != "holdup" && (command = "a" || command = "x")

;---------------------------------------------------------------------------
[State -1, Gamma Charge H Mid]
type = ChangeState
value = 1460
triggerall = var(39) <3
triggerall = !var(59)
triggerall = command = "QCF_y"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (hitdefattr = SC,NA,NP) && movecontact
trigger3 = stateno = 21275

;---------------------------------------------------------------------------
[State -1, Gamma Charge H Mid]
type = ChangeState
value = 1460
triggerall = !var(59)
triggerall = var(39) = 1 && AnimElem = 3, >= 0
trigger1 = stateno = [1450,1530]
trigger1 = command = "holdfwd" && command != "holdup" && (command = "b" || command = "y")

;---------------------------------------------------------------------------
[State -1, Gamma Charge H Far]
type = ChangeState
value = 1470
triggerall = var(39) <3
triggerall = !var(59)
triggerall = command = "QCF_z"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (hitdefattr = SC,NA,NP) && movecontact
trigger3 = stateno = 21275

;---------------------------------------------------------------------------
[State -1, Gamma Charge H Far]
type = ChangeState
value = 1470
triggerall = !var(59)
triggerall = var(39) = 1 && AnimElem = 3, >= 0
trigger1 = stateno = [1450,1530]
trigger1 = command = "holdfwd" && command != "holdup" && (command = "c" || command = "z")

;---------------------------------------------------------------------------
[State -1, Gamma Wave Near]
type = ChangeState
value = 1240
triggerall = !var(59)
triggerall = var(40) < 1
triggerall = command = "BF_x"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (hitdefattr = SC,NA,NP) && movecontact
trigger3 = stateno = 21275

;---------------------------------------------------------------------------
[State -1, Gamma Wave Mid]
type = ChangeState
value = 1250
triggerall = !var(59)
triggerall = var(40) < 1
triggerall = command = "BF_y"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (hitdefattr = SC,NA,NP) && movecontact
trigger3 = stateno = 21275


;---------------------------------------------------------------------------
[State -1, Gamma Wave Far]
type = ChangeState
value = 1260
triggerall = !var(59)
triggerall = var(40) < 1
triggerall = command = "BF_z"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = (hitdefattr = SC,NA,NP) && movecontact
trigger3 = stateno = 21275

;===========================================================================

;===========================================================================


;---------------------------------------------------------------------------
;Guard Push (Standing)
[State -1, Guard Push]
type = ChangeState
value = 7610
triggerall = !var(59)
triggerall = command = "recovery"
triggerall = statetype != A
triggerall = enemynear, HitDefAttr = SCA,NA,NT,NP,SA,ST,SP
trigger1 = stateno = [150,153]

;---------------------------------------------------------------------------
;Run Back
[State -1, Run Back]
type = ChangeState
value = 105
triggerall = !var(59)
triggerall = Stateno != 105
triggerall = statetype = S
triggerall = ctrl
trigger1 = command = "BB"

;---------------------------------------------------------------------------
;Run Fwd
[State -1, Run Fwd]
type = ChangeState
value = 100
triggerall = !var(59)
triggerall = Stateno != 100
triggerall = statetype = S
triggerall = ctrl
trigger1 = command = "FF"

;---------------------------------------------------------------------------
[State -1,Ground Throw]
type = ChangeState
value = 800
triggerall = !var(59)
triggerall = command = "holdfwd" || command = "holdback"
triggerall = command = "z"
triggerall = P2BodyDist X <= 20
triggerall = ctrl
trigger1 = statetype = S

;---------------------------------------------------------------------------
[State -1,Air Throw]
type = ChangeState
value = 920
triggerall = !var(59)
triggerall = command = "holdfwd" || command = "holdback"
triggerall = enemynear, statetype = A
triggerall = command = "z"
triggerall = P2BodyDist X <= 20
triggerall = p2bodydist y < 50 && p2bodydist y > -50
triggerall = ctrl
trigger1 = statetype = A
trigger1 = pos Y < -50

;---------------------------------------------------------------------------
[State -1, Taunt]
type = ChangeState
value = 195
triggerall = !Var(59)
triggerall = command = "Taunt"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
[State -1, Standing Punch]
type = ChangeState
value = 200
triggerall = !var(59)
triggerall = command = "x"
triggerall = command != "holddown"
triggerall = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
[State -1, Standing Medium Punch]
type = ChangeState
value = 210
triggerall = !var(59)
triggerall = command != "holddown"
triggerall= command = "y"
triggerall = statetype = S
triggerall = stateno != [300,325]
trigger1 = ctrl
trigger2 = stateno = 200 && movecontact

;---------------------------------------------------------------------------
[State -1, Standing Strong Punch]
type = ChangeState
value = 220
triggerall = !var(59)
triggerall = command != "holddown"
triggerall = command = "z"
triggerall = statetype = S
triggerall = stateno != [300,325]
trigger1 = ctrl
trigger2 = (stateno = [200,210]) && movecontact

;---------------------------------------------------------------------------
[State -1,  Stand Kick]
type = ChangeState
value = 300
triggerall = !var(59)
triggerall = command = "a"
triggerall = command != "holddown"
triggerall = statetype = S
triggerall = stateno != [200,225]
trigger1 = ctrl

;---------------------------------------------------------------------------
[State -1, Stand Medium Kick]
type = ChangeState
value = 310
triggerall = !var(59)
triggerall = command = "b"
triggerall = command != "holddown"
triggerall = statetype = S
triggerall = stateno != [200,225]
trigger1 = ctrl
trigger2 = stateno = 300 && movecontact

;---------------------------------------------------------------------------
[State -1, Stand Strong Kick]
type = ChangeState
value = 320
triggerall = !var(59)
triggerall = command = "c"
triggerall = command != "holddown"
triggerall = statetype = S
triggerall = stateno != [200,210]
trigger1 = ctrl
trigger2 = (stateno = [300,310]) && movecontact

;---------------------------------------------------------------------------
[State -1, Crouch Punch]
type = ChangeState
value = 400
triggerall = !var(59)
triggerall = command = "x"
triggerall = command = "holddown"
triggerall = statetype != A
triggerall = stateno != [500,525]
trigger1 = ctrl

;---------------------------------------------------------------------------
[State -1, Crouch Medium Punch]
type = ChangeState
value = 410
triggerall = !var(59)
triggerall = command = "y"
triggerall = command = "holddown"
triggerall = statetype != A
triggerall = stateno != [500,525]
trigger1 = ctrl
trigger2 = stateno = 200 && movecontact
trigger3 = stateno = 400 && movecontact

;---------------------------------------------------------------------------
[State -1, Crouch Strong Punch]
type = ChangeState
value = 420
triggerall = !var(59)
triggerall = command = "z"
triggerall = stateno != [500,515]
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 220 && movecontact && time > 16
trigger3 = (stateno = [400,410]) && movecontact && command = "holddown"
trigger4 = (stateno = [200,210]) && movecontact && command = "holddown"
trigger5 = (stateno = 520) && movecontact && command = "holddown"

;---------------------------------------------------------------------------
 [State -1, Crouch Kick]
type = ChangeState
value = 500
triggerall = !var(59)
triggerall = command = "a"
triggerall = command = "holddown"
triggerall = statetype != A
triggerall = stateno != [400,425]
trigger1 = ctrl

;---------------------------------------------------------------------------
[State -1, Crouch Medium Kick]
type = ChangeState
value = 510
triggerall = !var(59)
triggerall = command = "b"
triggerall = command = "holddown"
triggerall = statetype != A
triggerall = stateno != [400,425]
trigger1 = ctrl
trigger2 = stateno = 500 && movecontact
trigger3 = stateno = 300 && movecontact

;---------------------------------------------------------------------------
[State -1, Crouch Strong Kick]
type = ChangeState
value = 520
triggerall = !var(59)
triggerall = command = "c"
triggerall = command = "holddown"
triggerall = statetype != A
triggerall = stateno != [400,425]
trigger1 = ctrl
trigger2 = (stateno = [500,510]) && movecontact
trigger3 = (stateno = [300,310]) && movecontact

;---------------------------------------------------------------------------
[State -1, Air Punch]
type = ChangeState
value = 600
triggerall = !var(59)
triggerall = command = "x"
triggerall = statetype = A
trigger1 = ctrl

;---------------------------------------------------------------------------
[State -1, Air Medium Punch]
type = ChangeState
value = 610
triggerall = !var(59)
triggerall = command = "y"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 && movecontact
trigger3 = stateno = 700 && movecontact

;---------------------------------------------------------------------------
[State -1, Air Strong Punch]
type = ChangeState
value = 620
triggerall = !var(59)
triggerall = command = "z"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = (stateno = [600,610]) && movecontact
trigger3 = (stateno = [700,710]) && movecontact

;---------------------------------------------------------------------------
[State -1, Air Kick]
type = ChangeState
value = 700
triggerall = !var(59)
triggerall = command = "a"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 && movecontact

;---------------------------------------------------------------------------
[State -1, Air Medium Kick]
type = ChangeState
value = 710
triggerall = !var(59)
triggerall = command = "b"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = (stateno = [600,610]) && movecontact
trigger3 = stateno = 700 && movecontact

;---------------------------------------------------------------------------
[State -1, Air Strong Kick]
type = ChangeState
value = 720
triggerall = !var(59)
triggerall = command = "c"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = (stateno = [600,610]) && movecontact
trigger3 = (stateno = [700,710]) && movecontact

;---------------------------------------------------------------------------
[State -1, Super Jump]
type = ChangeState
value = 7710
triggerall = !var(59)
triggerall = statetype != A
trigger1 = command = "Super Jump"
trigger1 = ctrl
trigger2 = command = "Super Jump" || command = "holdup"
trigger2 = MoveHit
trigger2 = stateno = 420

;---------------------------------------------------------------------------
[State -1, Roll recovery foward]
type = null;ChangeState
value = 7800
triggerall = !var(59)
triggerall = stateno = 5100 || stateno = 5110 || stateno = 5120
trigger1 = command = "holdfwd"
trigger1 = Time = 1

;---------------------------------------------------------------------------
[State -1, Roll recovery Backward]
type = null;ChangeState
value = 7801
triggerall = !var(59)
triggerall = stateno = 5100 || stateno = 5110 || stateno = 5120
trigger1 = command = "holdback"
trigger1 = Time = 1
