;==================================================================
; STARBEM GYERON - ULTRA SEVEN
;==================================================================
; CONVERTED BY MATURE4EVR
;==================================================================
; VERSION 0.98
;==================================================================

;==================================================================
; COMMAND FILE
;==================================================================

;-|Button Remapping|-----------------------------------------------

; This section allows you to remap this character's button layout.
; The format is: old_button = new_button. If new_button is left
; blank, it cannot be pressed.

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

;-|Default Values|-------------------------------------------------

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

;-|Single Button|--------------------------------------------------

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

;-|CPU|------------------------------------------------------------

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

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

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

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

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

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

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

[Command]
name = "holdfwd2"
command = /$F
time = 1

[Command]
name = "holdback2"
command = /$B
time = 1

[Command]
name = "holdup2"
command = /$U
time = 1

[Command]
name = "holddown2"
command = /$D
time = 1

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

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

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

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

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

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

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

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

;-|Super Moves|----------------------------------------------------

[Command]
name = "nox_saturation"
command = F, F, x
time = 30

[Command]
name = "ultra_missile"
command = B, B, x
time = 30

[Command]
name = "remnants_og"
command = D, D, x
time = 30

;-|Misc|-----------------------------------------------------------

[Command]
name = "forward_leap"
command = /DF

[Command]
name = "backwards_leap"
command = /DB

;-|Double Tap|-----------------------------------------------------

[Command]
name = "dash_fwd";Required (do not remove)
command = F, F
time = 10

[Command]
name = "dash_back";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

;-|Dir+Button|-----------------------------------------------------

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

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

;------------------------------------------------------------------
; Don't remove the following line. It's required by the CMD
; standard.
[Statedef -1]

[State -1, AI Helper Check]
type = ChangeState
trigger1 = IsHelper(9741)
value = 9741

[State -1, AI Helper Check 2]
type = ChangeState
trigger1 = IsHelper(9742)
value = 9742

;==================================================================
; AI COMMANDS
;==================================================================

;----Remnants of Gieron (AI)----
[State -1, remnants_og]
type = ChangeState
value = 3200
triggerall = var(0) && life <= 300 && (power = 4000)
triggerall = statetype != A && ctrl
trigger1 = (p2bodydist x >= 200) && random <= 50
trigger2 = p2stateno != 130 && p2stateno != 131 && p2stateno != 132 && random <= 50

;----Ultrasonic Missile (AI)----
[State -1, ultra_missile]
type = ChangeState
value = 3100
triggerall = var(0) && power = 4000
triggerall = statetype != A && ctrl
trigger1 = p2statetype != A && random <= 50
trigger2 = stateno = 200 && movehit && random <= 25

;----Noxious Saturation (AI)----
[State -1, nox_saturation]
type = ChangeState
value = 3000
triggerall = var(0) && power = 4000
triggerall = statetype != A && ctrl
trigger1 = p2stateno != 130 && p2stateno != 131 && p2stateno != 132 && random <= 50
trigger2 = stateno = 200 && movehit && random <= 25

;----Ambition Missile (AI)----
[State -1, amb_missile]
type = ChangeState
value = 1200
triggerall = var(0)
triggerall = statetype != A && ctrl
trigger1 = p2statetype != A && random <= 50
trigger2 = (p2bodydist x >= 200) && random <= 50
trigger3 = stateno = 200 && movehit && random <= 25
trigger4 = (p2bodydist x < 75) && stateno = 1070 && movehit && random <= 25

;----Energy Rings (AI)----
[State -1, energy_rings]
type = ChangeState
value = 1100
triggerall = var(0)
triggerall = statetype != A && ctrl
trigger1 = p2statetype != A && random <= 50
trigger2 = (p2bodydist x >= 200) && random <= 50
trigger3 = stateno = 200 && movehit && random <= 25
trigger4 = (p2bodydist x < 75) && stateno = 1070 && movehit && random <= 25

;----Noxious Vapor (Angled)(AI)----
[State -1, noxious_vapor3]
type = ChangeState
value = 1070
triggerall = var(0)
triggerall = statetype != A && ctrl
trigger1 = p2statetype != A && random <= 50
trigger2 = (p2bodydist x < 75) && random <= 50

;----Noxious Vapor (Long-Range)(AI)----
[State -1, noxious_vapor2]
type = ChangeState
value = 1020
triggerall = var(0) && life <= 300
triggerall = statetype != A && ctrl
trigger1 = p2statetype != A && random <= 50
trigger2 = (p2bodydist x <= 100) && random <= 50

;----Noxious Vapor (AI)----
[State -1, noxious_vapor1]
type = ChangeState
value = 1000
triggerall = var(0)
triggerall = statetype != A && ctrl
trigger1 = p2statetype != A && random <= 50
trigger2 = (p2bodydist x < 100) && random <= 50

;----Sidestep (AI)----
[State -1, sidestep]
type = ChangeState
value = 900
triggerall = var(0)
triggerall = statetype != A && ctrl
trigger1 = p2movetype = A && (p2bodydist x < 50) && random <= 200
trigger2 = enemy, NumProj >= 1 && random <= 200

;----Throw 2: Clench & Constrict (AI)----
[State -1, clench_con]
type = ChangeState
value = 815
triggerall = var(0)
triggerall = statetype != A && ctrl
trigger1 = p2movetype != H && (p2bodydist x <= 5) && random <= 100
trigger2 = p2movetype = I && (p2bodydist x <= 5) && random <= 100

;----Throw 1: Headbutt (AI)----
[State -1, headbutt]
type = ChangeState
value = 800
triggerall = var(0)
triggerall = statetype != A && ctrl
trigger1 = p2movetype != H && (p2bodydist x <= 5) && random <= 200
trigger2 = p2movetype = I && (p2bodydist x <= 5) && random <= 200

;----Command Move (AI)----
[State -1, command_move]
type = ChangeState
value = 300
triggerall = var(0)
triggerall = statetype != A && ctrl
trigger1 = (p2bodydist x <= 10) && p2statetype != A && p2statetype != L && random <= 200

;----Basic Attack (AI)----
[State -1, basic_attack]
type = ChangeState
value = 200
triggerall = var(0)
triggerall = statetype != A && ctrl
trigger1 = (p2bodydist x <= 5) && p2statetype != A && p2statetype != L && random <= 200

;----Backwards Leap (AI)----
[State -1, backwards_leap]
type = ChangeState
value = 106
triggerall = var(0)
triggerall = statetype != A && ctrl
trigger1 = (p2bodydist x >= 200) && random <= 200
trigger2 = p2movetype != A && random <= 200

;----Forward Leap (AI)----
[State -1, forward_leap]
type = ChangeState
value = 101
triggerall = var(0)
triggerall = statetype != A && ctrl
trigger1 = (p2bodydist x >= 200) && random <= 200
trigger2 = p2movetype != A && random <= 200

;----Stationary Jump (Ultra Seven)(AI)----
[State -1, jump]
type = ChangeState
value = 30
triggerall = var(0)
triggerall = statetype != A && ctrl
trigger1 = (p2bodydist x >= 200) && random <= 200
trigger2 = p2movetype != A && random <= 200
trigger3 = enemy, NumProj >= 1 && random <= 200

;==================================================================
; HUMAN COMMANDS
;==================================================================

;----Remnants of Gieron----
[State -1, remnants_og]
type = ChangeState
value = 3200
triggerall = !var(0) && command = "remnants_og"
triggerall = life <= 300 && (power = 4000)
trigger1 = statetype != A && ctrl

;----Ultrasonic Missile----
[State -1, ultra_missile]
type = ChangeState
value = 3100
triggerall = !var(0) && command = "ultra_missile"
triggerall = power = 4000
trigger1 = statetype != A && ctrl

;----Noxious Saturation----
[State -1, nox_saturation]
type = ChangeState
value = 3000
triggerall = !var(0) && command = "nox_saturation"
triggerall = power = 4000
trigger1 = statetype != A && ctrl

;----Ambition Missile----
[State -1, amb_missile]
type = ChangeState
value = 1200
triggerall = !var(0) && command = "a" && command = "holdback"
triggerall = power >= 3000
trigger1 = statetype != A && ctrl

;----Energy Rings----
[State -1, energy_rings]
type = ChangeState
value = 1100
triggerall = !var(0) && command = "a" && command = "holddown"
triggerall = power >= 2000
trigger1 = statetype != A && ctrl

;----Noxious Vapor (Angled)----
[State -1, noxious_vapor3]
type = ChangeState
value = 1070
triggerall = !var(0) && command = "a" && command = "holdfwd"
triggerall = (power >= 1000) && p2bodydist x < 75
trigger1 = statetype != A && ctrl

;----Noxious Vapor (Long-Range)----
[State -1, noxious_vapor2]
type = ChangeState
value = 1020
triggerall = !var(0) && command = "a" && command = "holdfwd"
triggerall = (power >= 1000) && life <= 300 && !p2bodydist x < 75 
trigger1 = statetype != A && ctrl

;----Noxious Vapor----
[State -1, noxious_vapor1]
type = ChangeState
value = 1000
triggerall = !var(0) && command = "a" && command = "holdfwd"
triggerall = power >= 1000
trigger1 = statetype != A && ctrl

;----Sidestep----
[State -1, sidestep]
type = ChangeState
value = 900
triggerall = !var(0) && command = "a" && command = "holdup"
triggerall = power >= 500
trigger1 = statetype != A && ctrl

;----Throw 2: Clench & Constrict----
[State -1, clench_con]
type = ChangeState
value = 815
triggerall = !var(0) && command = "b" && command = "holdup"
triggerall = statetype = S && ctrl
trigger1 = p2bodydist x <= 5

;----Throw 1: Headbutt----
[State -1, headbutt]
type = ChangeState
value = 800
triggerall = !var(0) && command = "b"
triggerall = statetype = S && ctrl
trigger1 = command = "holdfwd" && p2bodydist x <= 5
trigger2 = command = "holdback" && p2bodydist x <= 5

;----Command Move----
[State -1, command_move]
type = ChangeState
value = 300
triggerall = !var(0) && command = "b" && command = "holdup"
trigger1 = statetype != A && ctrl
;trigger2 = time > 56

;----Basic Attack----
[State -1, basic_attack]
type = ChangeState
value = 200
triggerall = !var(0) && command = "b" && command != "holddown"
trigger1 = statetype != A && ctrl
;trigger2 = time > 12

;----Backwards Leap----
[State -1, backwards_leap]
type = ChangeState
value = 106
triggerall = !var(0) && command = "backwards_leap"
trigger1 = statetype != A && ctrl
trigger1 = stateno != 106

;----Forward Leap----
[State -1, forward_leap]
type = ChangeState
value = 101
triggerall = !var(0) && command = "forward_leap"
trigger1 = statetype != A && ctrl
trigger1 = stateno != 101

;----Stationary Jump (Ultra Seven)----
[State -1, jump]
type = ChangeState
value = 30
triggerall = !var(0) && command = "y"
trigger1 = statetype != A && ctrl
trigger1 = stateno != 40
