;+-----------------------+
;¦--------Comandos-------¦
;¦Template by Thunderbert¦
;+-----------------------+
;
; O CMD é dividido em duas partes:
; 1. Definições de comandos
; 2. Entrada dos states
;
; 1. Definições de comandos
; ---------------------
; OBS: Os comandos e seus nomes possuem CASO SENSITIVO (detecta letras maiúsculas e minúsculas)
; As oito direções são:
;   B, DB, D, DF, F, UF, U, UB     (todos MAIÚSCULOS)
;   Correspondendo a Trás, Baixo-Trás, Baixo, Baixo-Frente, Frente, Cima-Frente, Cima, Cima-Trás
; Os seis botões são:
;   a, b, c, x, y, z               (todos minúsculos)
;   Em uma configuração padrão, abc são os botões de baixo e xyz são os de cima
;   Para personagens que usem apenas 2 botões, é recomendado usar ab
;   Para personagens que usem 6 botões, use abc pra chutes e xyz para socos
;
; Cada Seção [Command] define um comando que será usando em uma entrada de state ou no CNS
; As seções [Command] devem ser assim:
;
;   [Command]
;   name = "?"
;   command = ?
;   time = ?
;
; - name
;   Um nome para o comando. Você irá usar esse nome nas Entradas de States e tambpem no CNS.
;   Possui CASO SENSITIVO (QCB_a não é a mesma coisa que Qcb_a ou QCB_A).
;   Deve ser escrito entre aspas (").
;
; - command
;   Lista de botões e direções separados por vírgulas (,).
;   Direções e botões podem ser precedidos por caracteres especiais:
;   	barra (/) - Significa que a tecla ser segurada
;          	    EX: command = /D	  ;Segure pra baixo
;               	command = /DB, a  ;Segure baixo-tras enquanto aperta a.
;   	til (~) - Detecta quando o botão é solto
;         	  EX: command = ~a        ;Solte o botão a
;              	      command = ~D, F, a  ;Solte pra baixo, aperte F e depois a.
;          	  Se você quer detectar "movimentos carregáveis", você pode especificar o tempo
;          	  que a tecla deve ficar segurada (tempo em game-ticks)
;                 EX: command = ~30a      ;Segure o botão a por pelos menos 30 ticks e depois solte
;       dólar ($) - Apenas para direção: detecta direções semelhantes
;                 EX: command = $D        ;Detecta se D, DB ou DF está apertado
;                     command = $B        ;Detecta se B, DB ou UB está apertado
;   	mais (+) - Apenas botões: detecta botões apertados simultâneamentes
;          	  EX: command = a+b       ;Aperte a e b ao mesmo tempo
;                     command = x+y+z     ;Aperte x, y e z ao mesmo tempo
;       Você também pode combiná-los:
;     		  EX: command = ~30$D, a+b;Segure D, DB ou DF por 30 ticks, solte e depois aperte a e b juntos
;
; - time (opcional)
;   Tempo permitido para realizar o comando em game-ticks. Padrão é 15 se omitido.
;
; Se você tem 2 ou mais comandos com o mesmo nome, todos eles vão funcionar.
; Você pode usar isso para possibilitar múltiplos comandos para o mesmo movimento.

;-| Remapeamento de botões |-----------------------------------------------
; Está seção permite remapear os botões do jogador (para mudar facilmente as configurações de botõs).
; O formato é:
;   botão_antigo = novo_botão
; Se novo_botão for deixado em branco, o botão não poderá ser apertado
[Remap]
x = x
y = y
z = z
a = a
b = b
c = c
s = s

;-| Valores padrões |------------------------------------------------------
[Defaults]
; Valor padrão para o parâmetro "time" de um comando. Mínimo é 1.
command.time = 30

; Valor padrão para o parâmetro "buffer.time" de um comando. Mínimo é 1 e máximo é 30.
command.buffer.time = 1

;-| Super Motions |--------------------------------------------------------
[Command]
Name = "Extreme_Speed"
Command = ~D, B, D, F, a
Time = 30

[Command]
Name = "Extreme_Speed"
Command = ~D, DB, B, D, DF, F, a
Time = 30

[Command]
Name = "Extreme_Speed"
Command = ~D, B, D, F, b
Time = 30

[Command]
Name = "Extreme_Speed"
Command = ~D, DB, B, D, DF, F, b
Time = 30

[Command]
Name = "Close_Combat"
Command = ~D, B, D, B, x
Time = 30

[Command]
Name = "Close_Combat"
Command = ~D, DB, B, D, DB, B, x
Time = 30

[Command]
Name = "Close_Combat"
Command = ~D, B, D, B, y
Time = 30

[Command]
Name = "Close_Combat"
Command = ~D, DB, B, D, DB, B, y
Time = 30

[Command]
Name = "Aura_Storm"
Command = ~D, F, D, F, x
Time = 30

[Command]
Name = "Aura_Storm"
Command = ~D, DF, F, D, DF, F, x
Time = 30

[Command]
Name = "Aura_Storm"
Command = ~D, F, D, F, y
Time = 30

[Command]
Name = "Aura_Storm"
Command = ~D, DF, F, D, DF, F, y
Time = 30

[Command]
Name = "Super_Aura_Storm"
Command = ~D, F, D, F, x+y
Time = 30

[Command]
Name = "Super_Aura_Storm"
Command = ~D, DF, F, D, DF, F, x+y
Time = 30

;-| Special Motions |------------------------------------------------------
[Command]
Name = "Aura_Sphere_x"
Command = ~D, F, x
Time = 15

[Command]
Name = "Aura_Sphere_x"
Command = ~D, DF, F, x
Time = 15

[Command]
Name = "Aura_Sphere_y"
Command = ~D, F, y
Time = 15

[Command]
Name = "Aura_Sphere_y"
Command = ~D, DF, F, y
Time = 15

[Command]
Name = "Force_Palm_x"
Command = ~D, B, x
Time = 15

[Command]
Name = "Force_Palm_x"
Command = ~D, DB, B, x
Time = 15

[Command]
Name = "Force_Palm_y"
Command = ~D, B, y
Time = 15

[Command]
Name = "Force_Palm_y"
Command = ~D, DB, B, y
Time = 15

[Command]
Name = "Metal_Claw_x"
Command = ~F, D, DF, x
Time = 15

[Command]
Name = "Metal_Claw_x"
Command = ~F, DF, D, DF, x
Time = 15

[Command]
Name = "Metal_Claw_y"
Command = ~F, D, DF, y
Time = 15

[Command]
Name = "Metal_Claw_y"
Command = ~F, DF, D, DF, y
Time = 15

[Command]
Name = "Iron_Tail_a"
Command = ~D, B, a
Time = 15

[Command]
Name = "Iron_Tail_a"
Command = ~D, DB, B, a
Time = 15

[Command]
Name = "Iron_Tail_b"
Command = ~D, B, b
Time = 15

[Command]
Name = "Iron_Tail_b"
Command = ~D, DB, B, b
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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[Command]
name = "up_c"
command = /$U,c
time = 1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

;---------------------------------------------------------------------------
; 2. Entrada dos states
; --------------
; Aqui é aonde você define para qual state cada comando irá levar
;
; Formato básico:
;   [State -1, ?]           	;Mude ? para qualquer nome que você deseje usar para identificar o state.
;   Type = ChangeState          ;Não mude isso
;   Value = ?
;   Trigger1 = Command = "?"
;   . . .  (Triggers adicionais)
;
; - Value é o número do state para qual o char irá
; - Command = "?" - Substitue ? pelo nome do comando
; - Triggers adicionais úteis:
;   - StateType
;       S, C ou A : Tipo de State atual do char (Em pé, Agaichado, No Ar)
;   - Ctrl
;       0 ou 1 : 1 se o jogador puder controlar o char. Coloque 0 apenas se for possível interromper algum outro movimento
;   - StateNo
;       Número do State atual do char, bom para interromper o movimento
;   - MoveContact
;       0 ou 1 : 1 se o último ataque encostou no inimigo. Útil para interromper um movimento e criar combos
;
; OBS: A ordem das entradas dos states é importante.
;   Entradas com certos tipos de comandos devem vir antes de outros  
;   Por exemplo, o comando "fwd_a" deve ser listado antes do "a", e "fwd_ab" deve vir antes dos outros dois.
;
;
;---------------------------------------------------------------------------
; State executado uma vez a cada game-tick
;---------------------------------------------------------------------------
[Statedef -1]	;Não remova essa linha!

;===========================================================================
;---------------------------------------------------------------------------
;+-----------------------+
;¦-----------AI----------¦
;¦Template by Thunderbert¦
;+-----------------------+

;---------------------------------------------------------------------------
; AI Random
[State -1, AI Random]
Type = VarRandom
Trigger1 = AILevel
Trigger1 = RoundState = 2
V = 58
Range = 0,999

;---------------------------------------------------------------------------
; AI Extreme Speed
[State -1, AI Extreme Speed]
Type = ChangeState
Value = 2500
TriggerAll = Pos Y = 0
TriggerAll = AILevel
TriggerAll = RoundState = 2
TriggerAll = Power >= 3000
TriggerAll = Var(58) <= (Ceil((150.0/8.0)*AILevel))-1.0
TriggerAll = P2StateType != L
Trigger1 = StateType = S
Trigger1 = Ctrl = 1
Trigger1 = StateNO != 100

;---------------------------------------------------------------------------
; AI Air Super Aura Storm
[State -1, AI Air Super Aura Storm]
Type = ChangeState
Value = 2100
TriggerAll = Pos Y < 0
TriggerAll = AILevel
TriggerAll = RoundState = 2
TriggerAll = Power >= 2000
TriggerAll = P2StateType != L
Trigger1 = StateType = A
Trigger1 = Ctrl = 1
Trigger1 = P2BodyDist X >= 100
Trigger1 = Var(58) <= (Ceil((100.0/8.0)*AILevel))-1.0
Trigger1 = StateNO != 100

;---------------------------------------------------------------------------
; AI Super Aura Storm
[State -1, AI Super Aura Storm]
Type = ChangeState
Value = 2000
TriggerAll = Pos Y = 0
TriggerAll = AILevel
TriggerAll = RoundState = 2
TriggerAll = Power >= 2000
TriggerAll = P2StateType != L
Trigger1 = StateType = S
Trigger1 = Ctrl = 1
Trigger1 = P2BodyDist X >= 100
Trigger1 = Var(58) <= (Ceil((100.0/8.0)*AILevel))-1.0
Trigger1 = StateNO != 100

;---------------------------------------------------------------------------
; AI Close Combat
[State -1, AI Close Combat]
Type = ChangeState
Value = 1000
TriggerAll = Pos Y = 0
TriggerAll = AILevel
TriggerAll = RoundState = 2
TriggerAll = Power >= 1000
TriggerAll = Var(58) <= (Ceil((50.0/8.0)*AILevel))-1.0
TriggerAll = P2StateType != L
Trigger1 = StateType = S
Trigger1 = Ctrl = 1
Trigger1 = P2BodyDist X <= 50
Trigger2 = StateNO = 205
Trigger2 = MoveContact
Trigger3 = StateNO = 215
Trigger3 = MoveContact
Trigger4 = StateNO = 220
Trigger4 = MoveContact
Trigger5 = StateNO = 230
Trigger5 = MoveContact
Trigger6 = StateNO = 240
Trigger6 = MoveContact
Trigger7 = StateNO = 250
Trigger7 = MoveContact
Trigger8 = StateNO = 260
Trigger8 = MoveContact
Trigger8 = P2StateNo != [5030,5120]
Trigger9 = StateNO = 270
Trigger9 = MoveContact
Trigger9 = P2StateNo != [5030,5120]

; AI Aura Storm
[State -1, AI Aura Storm]
Type = ChangeState
Value = 1500
TriggerAll = Pos Y = 0
TriggerAll = AILevel
TriggerAll = RoundState = 2
TriggerAll = Power >= 1000
TriggerAll = P2StateType != L
Trigger1 = StateType = S
Trigger1 = Ctrl = 1
Trigger1 = P2BodyDist X >= 100
Trigger1 = Var(58) <= (Ceil((50.0/8.0)*AILevel))-1.0
Trigger1 = StateNO != 100

; AI Call Helper
[State -1, AI Call Helper]
Type = ChangeState
Value = 510
TriggerAll = Pos Y = 0
TriggerAll = AILevel
TriggerAll = RoundState = 2
TriggerAll = Ctrl = 1
TriggerAll = StateType = S
TriggerAll = P2StateType != L
TriggerAll = Var(58) <= (Ceil((16.0/8.0)*AILevel))-1.0
TriggerAll = NumHelper(510) = 0
TriggerAll = NumHelper(511) = 0
Trigger1 = Var(0) = 1
Trigger1 = Power >= 500
Trigger2 = Var(0) = 2
Trigger2 = Power >= 1000
Trigger3 = Var(0) = 3
Trigger3 = Power >= 1000

; AI Crouch
[State -1, AI Crouch]
Type = ChangeState
Value = 10
TriggerAll = Pos Y = 0
TriggerAll = AILevel
TriggerAll = RoundState = 2
TriggerAll = Ctrl = 1
TriggerAll = StateType = S
Trigger1 = P2StateType = L
Trigger1 = P2BodyDist X <= 50
Trigger1 = Var(58) <= (Ceil((500.0/8.0)*AILevel))-1.0
Trigger1 = StateNO != [10,12]
Trigger2 = P2BodyDist X <= 50
Trigger2 = Var(58) <= (Ceil((25.0/8.0)*AILevel))-1.0
Trigger2 = StateNO != [10,12]
Trigger2 = StateNO != 100

; AI Guard
[State -1, AI Guard]
Type = ChangeState
Value = 120
Trigger1 = AILevel
Trigger1 = RoundState = 2
Trigger1 = Ctrl = 1
Trigger1 = P2MoveType = A
Trigger1 = InGuardDist
Trigger1 = Var(58) <= (Ceil((250.0/8.0)*AILevel))-1.0
Trigger1 = StateNO != [120,155]

; AI Advancing Guard
[State -1, AI Advancing Guard]
Type = ChangeState
Value = 350
TriggerAll = Pos Y = 0
TriggerAll = AILevel
TriggerAll = Power >= 40
Trigger1 = StateType = S || StateType = C
Trigger1 = Ctrl = 1
Trigger1 = P2MoveType = A
Trigger1 = InGuardDist
Trigger1 = Power >= 40
Trigger1 = Var(58) <= (Ceil((50.0/8.0)*AILevel))-1.0
Trigger2 = StateNO = [150, 153]
Trigger2 = Var(58) <= (Ceil((500.0/8.0)*AILevel))-1.0

; AI Aura Sphere 1
[State -1, AI Aura Sphere 1]
Type = ChangeState
Value = 400
TriggerAll = Pos Y = 0
Trigger1 = AILevel
Trigger1 = RoundState = 2
Trigger1 = StateType = S
Trigger1 = P2StateType != L
Trigger1 = Ctrl = 1
Trigger1 = P2BodyDist X >= 100
Trigger1 = Var(58) <= (Ceil((20.0/8.0)*AILevel))-1.0
Trigger1 = StateNO != 100

; AI Aura Sphere 2
[State -1, AI Aura Sphere 2]
Type = ChangeState
Value = 410
TriggerAll = Pos Y = 0
Trigger1 = AILevel
Trigger1 = RoundState = 2
Trigger1 = StateType = S
Trigger1 = P2StateType != L
Trigger1 = Ctrl = 1
Trigger1 = P2BodyDist X >= 100
Trigger1 = Var(58) <= (Ceil((40.0/8.0)*AILevel))-1.0
Trigger1 = StateNO != 100

; AI Run Fwd
[State -1, AI Run Fwd]
Type = ChangeState
Value = 100
TriggerAll = Pos Y = 0
Trigger1 = AILevel
Trigger1 = RoundState = 2
Trigger1 = StateType = S
Trigger1 = Ctrl = 1
Trigger1 = P2BodyDist X >= 150
Trigger1 = Var(58) <= (Ceil((100.0/8.0)*AILevel))-1.0
Trigger1 = StateNO != 100

; AI Light Punch 1
[State -1, AI Light Punch 1]
Type = ChangeState
Value = 200
TriggerAll = Pos Y = 0
Trigger1 = AILevel
Trigger1 = RoundState = 2
Trigger1 = StateType = S
Trigger1 = P2StateType != L
Trigger1 = Ctrl = 1
Trigger1 = P2BodyDist X <= 50
Trigger1 = Var(58) <= (Ceil((125.0/8.0)*AILevel))-1.0

; AI Light Punch 2
[State -1, AI Light Punch 2]
Type = ChangeState
Value = 201
TriggerAll = Pos Y = 0
Trigger1 = AILevel
Trigger1 = RoundState = 2
Trigger1 = StateNO = 200
Trigger1 = MoveContact
Trigger1 = Var(58) <= (Ceil((500.0/8.0)*AILevel))-1.0

; AI Cotovelada
[State -1, AI Cotovelada]
Type = ChangeState
Value = 205
TriggerAll = Pos Y = 0
TriggerAll = AILevel
TriggerAll = RoundState = 2
Trigger1 = StateType = S
Trigger1 = P2StateType != L
Trigger1 = Ctrl = 1
Trigger1 = P2BodyDist X = (50,100]
Trigger1 = Var(58) <= (Ceil((125.0/8.0)*AILevel))-1.0
Trigger2 = StateNO = 201
Trigger2 = MoveContact
Trigger2 = Var(58) <= (Ceil((500.0/8.0)*AILevel))-1.0


; AI Strong Punch
[State -1, AI Strong Punch]
Type = ChangeState
Value = 210
TriggerAll = Pos Y = 0
Trigger1 = AILevel
Trigger1 = RoundState = 2
Trigger1 = StateType = S
Trigger1 = P2StateType != L
Trigger1 = Ctrl = 1
Trigger1 = P2BodyDist X <= 50
Trigger1 = Var(58) <= (Ceil((250.0/8.0)*AILevel))-1.0

; AI Push
[State -1, AI Push]
Type = ChangeState
Value = 215
TriggerAll = Pos Y = 0
TriggerAll = AILevel
TriggerAll = RoundState = 2
Trigger1 = StateType = S
Trigger1 = P2StateType != L
Trigger1 = Ctrl = 1
Trigger1 = P2BodyDist X = (50,100]
Trigger1 = Var(58) <= (Ceil((250.0/8.0)*AILevel))-1.0
Trigger2 = StateNO = 210
Trigger2 = MoveContact
Trigger2 = Var(58) <= (Ceil((500.0/8.0)*AILevel))-1.0

; AI Light Kick
[State -1, AI Light Kick]
Type = ChangeState
Value = 220
TriggerAll = Pos Y = 0
Trigger1 = AILevel
Trigger1 = RoundState = 2
Trigger1 = StateType = S
Trigger1 = P2StateType != L
Trigger1 = Ctrl = 1
Trigger1 = P2BodyDist X <= 50
Trigger1 = Var(58) <= (Ceil((375.0/8.0)*AILevel))-1.0

; AI Light Kick 2
[State -1, AI Light Kick 2]
Type = ChangeState
Value = 225
TriggerAll = Pos Y = 0
TriggerAll = AILevel
TriggerAll = RoundState = 2
Trigger1 = StateType = S
Trigger1 = P2StateType != L
Trigger1 = Ctrl = 1
Trigger1 = P2BodyDist X = (50,100]
Trigger1 = Var(58) <= (Ceil((375.0/8.0)*AILevel))-1.0
Trigger2 = StateNO = 220
Trigger2 = MoveContact
Trigger2 = Var(58) <= (Ceil((100.0/8.0)*AILevel))-1.0

; AI Strong Kick
[State -1, AI Strong Kick]
Type = ChangeState
Value = 230
TriggerAll = Pos Y = 0
Trigger1 = AILevel
Trigger1 = RoundState = 2
Trigger1 = StateType = S
Trigger1 = P2StateType != L
Trigger1 = Ctrl = 1
Trigger1 = P2BodyDist X <= 50
Trigger1 = Var(58) <= (Ceil((500.0/8.0)*AILevel))-1.0

; AI Double Kick
[State -1, AI Double Kick]
Type = ChangeState
Value = 235
TriggerAll = Pos Y = 0
TriggerAll = AILevel
TriggerAll = RoundState = 2
Trigger1 = StateType = S
Trigger1 = P2StateType != L
Trigger1 = Ctrl = 1
Trigger1 = P2BodyDist X = (50,100]
Trigger1 = Var(58) <= (Ceil((500.0/8.0)*AILevel))-1.0
Trigger2 = StateNO = 230
Trigger2 = MoveContact
Trigger2 = Var(58) <= (Ceil((100.0/8.0)*AILevel))-1.0

; AI Crouching Light Punch
[State -1, AI Crouching Light Punch]
Type = ChangeState
Value = 240
TriggerAll = Pos Y = 0
Trigger1 = AILevel
Trigger1 = RoundState = 2
Trigger1 = StateType = C
Trigger1 = P2StateType != L
Trigger1 = Ctrl = 1
Trigger1 = P2BodyDist X <= 50
Trigger1 = Var(58) <= (Ceil((125.0/8.0)*AILevel))-1.0
Trigger1 = P2StateType != L

; AI Crouching Strong Punch
[State -1, AI Crouching Strong Punch]
Type = ChangeState
Value = 250
TriggerAll = Pos Y = 0
Trigger1 = AILevel
Trigger1 = RoundState = 2
Trigger1 = StateType = C
Trigger1 = P2StateType != L
Trigger1 = Ctrl = 1
Trigger1 = P2BodyDist X <= 50
Trigger1 = Var(58) <= (Ceil((250.0/8.0)*AILevel))-1.0
Trigger1 = P2StateType != L

; AI Crouching Light Kick
[State -1, AI Crouching Light Kick]
Type = ChangeState
Value = 260
TriggerAll = Pos Y = 0
Trigger1 = AILevel
Trigger1 = RoundState = 2
Trigger1 = StateType = C
Trigger1 = Ctrl = 1
Trigger1 = P2BodyDist X <= 100
Trigger1 = Var(58) <= (Ceil((375.0/8.0)*AILevel))-1.0

; AI Crouching Strong Kick
[State -1, AI Crouching Strong Kick]
Type = ChangeState
Value = 270
TriggerAll = Pos Y = 0
Trigger1 = AILevel
Trigger1 = RoundState = 2
Trigger1 = StateType = C
Trigger1 = Ctrl = 1
Trigger1 = P2BodyDist X <= 100
Trigger1 = Var(58) <= (Ceil((500.0/8.0)*AILevel))-1.0

; AI Jumping Light Punch
[State -1, AI Jumping Light Punch]
Type = ChangeState
Value = 280
TriggerAll = Pos Y < 0
Trigger1 = AILevel
Trigger1 = RoundState = 2
Trigger1 = StateType = A
Trigger1 = Ctrl = 1
Trigger1 = P2BodyDist X <= 50
Trigger1 = P2BodyDist X >= -50
Trigger1 = Var(58) <= (Ceil((125.0/8.0)*AILevel))-1.0

; AI Jumping Strong Punch
[State -1, AI Jumping Strong Punch]
Type = ChangeState
Value = 290
TriggerAll = Pos Y < 0
Trigger1 = AILevel
Trigger1 = RoundState = 2
Trigger1 = StateType = A
Trigger1 = Ctrl = 1
Trigger1 = P2BodyDist X <= 50
Trigger1 = P2BodyDist X >= -50
Trigger1 = Var(58) <= (Ceil((250.0/8.0)*AILevel))-1.0

; AI Jumping Light Kick
[State -1, AI Jumping Light Kick]
Type = ChangeState
Value = 300
TriggerAll = Pos Y < 0
Trigger1 = AILevel
Trigger1 = RoundState = 2
Trigger1 = StateType = A
Trigger1 = Ctrl = 1
Trigger1 = P2BodyDist X <= 50
Trigger1 = P2BodyDist X >= -50
Trigger1 = Var(58) <= (Ceil((375.0/8.0)*AILevel))-1.0

; AI Jumping Strong Kick
[State -1, AI Jumping Strong Kick]
Type = ChangeState
Value = 310
TriggerAll = Pos Y < 0
Trigger1 = AILevel
Trigger1 = RoundState = 2
Trigger1 = StateType = A
Trigger1 = Ctrl = 1
Trigger1 = P2BodyDist X <= 50
Trigger1 = P2BodyDist X >= -50
Trigger1 = Var(58) <= (Ceil((500.0/8.0)*AILevel))-1.0

; AI Air Aura Sphere 1
[State -1, AI Air Aura Sphere 1]
Type = ChangeState
Value = 420
TriggerAll = Pos Y < 0
Trigger1 = AILevel
Trigger1 = RoundState = 2
Trigger1 = StateType = A
Trigger1 = P2StateType != L
Trigger1 = Ctrl = 1
Trigger1 = P2BodyDist X >= 100
Trigger1 = Var(58) <= (Ceil((50.0/8.0)*AILevel))-1.0

; AI Air Aura Sphere 2
[State -1, AI Air Aura Sphere 2]
Type = ChangeState
Value = 430
TriggerAll = Pos Y < 0
Trigger1 = AILevel
Trigger1 = RoundState = 2
Trigger1 = StateType = A
Trigger1 = P2StateType != L
Trigger1 = Ctrl = 1
Trigger1 = P2BodyDist X >= 100
Trigger1 = Var(58) <= (Ceil((100.0/8.0)*AILevel))-1.0

; AI Force Palm 1
[State -1, AI Force Palm 1]
Type = ChangeState
Value = 450
TriggerAll = Pos Y = 0
TriggerAll = AILevel
TriggerAll = RoundState = 2
TriggerAll = P2StateType != L
Trigger1 = StateType = S
Trigger1 = Ctrl = 1
Trigger1 = P2BodyDist X <= 50
Trigger1 = Var(58) <= (Ceil((575.0/8.0)*AILevel))-1.0
Trigger2 = StateNO = 205
Trigger2 = MoveContact
Trigger2 = Var(58) <= (Ceil((125.0/8.0)*AILevel))-1.0
Trigger3 = StateNO = 215
Trigger3 = MoveContact
Trigger3 = Var(58) <= (Ceil((125.0/8.0)*AILevel))-1.0
Trigger4 = StateNO = 220
Trigger4 = MoveContact
Trigger4 = Var(58) <= (Ceil((200.0/8.0)*AILevel))-1.0
Trigger5 = StateNO = 230
Trigger5 = MoveContact
Trigger5 = Var(58) <= (Ceil((200.0/8.0)*AILevel))-1.0
Trigger6 = StateNO = 240
Trigger6 = MoveContact
Trigger6 = Var(58) <= (Ceil((125.0/8.0)*AILevel))-1.0
Trigger7 = StateNO = 250
Trigger7 = MoveContact
Trigger7 = Var(58) <= (Ceil((125.0/8.0)*AILevel))-1.0
Trigger8 = StateNO = 260
Trigger8 = MoveContact
Trigger8 = P2StateNo != [5030,5120]
Trigger8 = Var(58) <= (Ceil((125.0/8.0)*AILevel))-1.0
Trigger9 = StateNO = 270
Trigger9 = MoveContact
Trigger9 = P2StateNo != [5030,5120]
Trigger9 = Var(58) <= (Ceil((125.0/8.0)*AILevel))-1.0

; AI Force Palm 2
[State -1, AI Force Palm 2]
Type = ChangeState
Value = 460
TriggerAll = Pos Y = 0
TriggerAll = AILevel
TriggerAll = RoundState = 2
TriggerAll = P2StateType != L
Trigger1 = StateType = S
Trigger1 = Ctrl = 1
Trigger1 = P2BodyDist X <= 50
Trigger1 = Var(58) <= (Ceil((650.0/8.0)*AILevel))-1.0
Trigger2 = StateNO = 205
Trigger2 = MoveContact
Trigger2 = Var(58) <= (Ceil((250.0/8.0)*AILevel))-1.0
Trigger3 = StateNO = 215
Trigger3 = MoveContact
Trigger3 = Var(58) <= (Ceil((250.0/8.0)*AILevel))-1.0
Trigger4 = StateNO = 220
Trigger4 = MoveContact
Trigger4 = Var(58) <= (Ceil((300.0/8.0)*AILevel))-1.0
Trigger5 = StateNO = 230
Trigger5 = MoveContact
Trigger5 = Var(58) <= (Ceil((300.0/8.0)*AILevel))-1.0
Trigger6 = StateNO = 240
Trigger6 = MoveContact
Trigger6 = Var(58) <= (Ceil((250.0/8.0)*AILevel))-1.0
Trigger7 = StateNO = 250
Trigger7 = MoveContact
Trigger7 = Var(58) <= (Ceil((250.0/8.0)*AILevel))-1.0
Trigger8 = StateNO = 260
Trigger8 = MoveContact
Trigger8 = P2StateNo != [5030,5120]
Trigger8 = Var(58) <= (Ceil((250.0/8.0)*AILevel))-1.0
Trigger9 = StateNO = 270
Trigger9 = MoveContact
Trigger9 = P2StateNo != [5030,5120]
Trigger9 = Var(58) <= (Ceil((250.0/8.0)*AILevel))-1.0

; AI Metal Claw 1
[State -1, AI Metal Claw 1]
Type = ChangeState
Value = 470
TriggerAll = Pos Y = 0
TriggerAll = AILevel
TriggerAll = RoundState = 2
TriggerAll = P2StateType != L
Trigger1 = StateType != A
Trigger1 = Ctrl = 1
Trigger1 = P2BodyDist X <= 50
Trigger1 = Var(58) <= (Ceil((725.0/8.0)*AILevel))-1.0
Trigger2 = StateNO = 205
Trigger2 = MoveContact
Trigger2 = Var(58) <= (Ceil((375.0/8.0)*AILevel))-1.0
Trigger3 = StateNO = 215
Trigger3 = MoveContact
Trigger3 = Var(58) <= (Ceil((375.0/8.0)*AILevel))-1.0
Trigger4 = StateNO = 220
Trigger4 = MoveContact
Trigger4 = Var(58) <= (Ceil((400.0/8.0)*AILevel))-1.0
Trigger5 = StateNO = 230
Trigger5 = MoveContact
Trigger5 = Var(58) <= (Ceil((400.0/8.0)*AILevel))-1.0
Trigger6 = StateNO = 240
Trigger6 = MoveContact
Trigger6 = Var(58) <= (Ceil((375.0/8.0)*AILevel))-1.0
Trigger7 = StateNO = 250
Trigger7 = MoveContact
Trigger7 = Var(58) <= (Ceil((375.0/8.0)*AILevel))-1.0
Trigger8 = StateNO = 260
Trigger8 = MoveContact
Trigger8 = P2StateNo != [5030,5120]
Trigger8 = Var(58) <= (Ceil((375.0/8.0)*AILevel))-1.0
Trigger9 = StateNO = 270
Trigger9 = MoveContact
Trigger9 = P2StateNo != [5030,5120]
Trigger9 = Var(58) <= (Ceil((375.0/8.0)*AILevel))-1.0
Trigger10 = StateType != A
Trigger10 = Ctrl = 1
Trigger10 = P2BodyDist X <= 50
Trigger10 = P2BodyDist Y < 0
Trigger10 = Var(58) <= (Ceil((250.0/8.0)*AILevel))-1.0

; AI Metal Claw 2
[State -1, AI Metal Claw 2]
Type = ChangeState
Value = 480
TriggerAll = Pos Y = 0
TriggerAll = AILevel
TriggerAll = RoundState = 2
TriggerAll = P2StateType != L
Trigger1 = StateType != A
Trigger1 = Ctrl = 1
Trigger1 = P2BodyDist X <= 50
Trigger1 = Var(58) <= (Ceil((800/8.0)*AILevel))-1.0
Trigger2 = StateNO = 205
Trigger2 = MoveContact
Trigger2 = Var(58) <= (Ceil((500.0/8.0)*AILevel))-1.0
Trigger3 = StateNO = 215
Trigger3 = MoveContact
Trigger3 = Var(58) <= (Ceil((500.0/8.0)*AILevel))-1.0
Trigger4 = StateNO = 220
Trigger4 = MoveContact
Trigger4 = Var(58) <= (Ceil((500.0/8.0)*AILevel))-1.0
Trigger5 = StateNO = 230
Trigger5 = MoveContact
Trigger5 = Var(58) <= (Ceil((500.0/8.0)*AILevel))-1.0
Trigger6 = StateNO = 240
Trigger6 = MoveContact
Trigger6 = Var(58) <= (Ceil((500.0/8.0)*AILevel))-1.0
Trigger7 = StateNO = 250
Trigger7 = MoveContact
Trigger7 = Var(58) <= (Ceil((500.0/8.0)*AILevel))-1.0
Trigger8 = StateNO = 260
Trigger8 = MoveContact
Trigger8 = P2StateNo != [5030,5120]
Trigger8 = Var(58) <= (Ceil((500.0/8.0)*AILevel))-1.0
Trigger9 = StateNO = 270
Trigger9 = MoveContact
Trigger9 = P2StateNo != [5030,5120]
Trigger9 = Var(58) <= (Ceil((500.0/8.0)*AILevel))-1.0
Trigger10 = StateType != A
Trigger10 = Ctrl = 1
Trigger10 = P2BodyDist X <= 50
Trigger10 = P2BodyDist Y < 0
Trigger10 = Var(58) <= (Ceil((500.0/8.0)*AILevel))-1.0

; AI Iron Tail 1
[State -1, AI Iron Tail 1]
Type = ChangeState
Value = 490
TriggerAll = Pos Y <= 0
Trigger1 = P2StateType != L
Trigger1 = AILevel
Trigger1 = RoundState = 2
Trigger1 = Ctrl = 1
Trigger1 = P2BodyDist X < 0
Trigger1 = Var(58) <= (Ceil((200.0/8.0)*AILevel))-1.0

; AI Iron Tail 2
[State -1, AI Iron Tail 2]
Type = ChangeState
Value = 500
TriggerAll = Pos Y <= 0
Trigger1 = P2StateType != L
Trigger1 = AILevel
Trigger1 = RoundState = 2
Trigger1 = Ctrl = 1
Trigger1 = P2BodyDist X >= 100
Trigger1 = Var(58) <= (Ceil((100.0/8.0)*AILevel))-1.0

;===========================================================================
;---------------------------------------------------------------------------
; Run Fwd
[State -1, Run Fwd]
type = ChangeState
value = 100
TriggerAll = !AILevel
trigger1 = command = "FF"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
; Run Back
[State -1, Run Back]
type = ChangeState
value = 105
trigger1 = command = "BB"
trigger1 = statetype = S
trigger1 = ctrl

;===========================================================================
;---------------------------------------------------------------------------
; Taunt
[State -1, Taunt]
Type = ChangeState
Value = 197
TriggerAll = !AILevel
TriggerAll = Command = "s"
Trigger1 = StateType = S
Trigger1 = Ctrl

;---------------------------------------------------------------------------
; Throw
[State -1, Throw]
type = ChangeState
value = 800
TriggerAll = !AILevel
TriggerAll = Command = "x"
TriggerAll = Command = "a"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
; Extreme Speed
[State -1, Extreme Speed]
Type = ChangeState
Value = 2500
TriggerAll = !AILevel
TriggerAll = Command = "Extreme_Speed"
TriggerAll = Power >= 3000
Trigger1 = Ctrl
Trigger1 = StateType = S

;---------------------------------------------------------------------------
; Super Aura Storm
[State -1, Super Aura Storm]
Type = ChangeState
Value = 2000
TriggerAll = !AILevel
TriggerAll = Command = "Super_Aura_Storm"
TriggerAll = Power >= 2000
Trigger1 = Ctrl
Trigger1 = StateType = S

;---------------------------------------------------------------------------
; Air Super Aura Storm
[State -1, Air Super Aura Storm]
Type = ChangeState
Value = 2100
TriggerAll = !AILevel
TriggerAll = Command = "Super_Aura_Storm"
TriggerAll = Power >= 2000
Trigger1 = Ctrl
Trigger1 = StateType = A

;---------------------------------------------------------------------------
; Aura Storm
[State -1, Aura Storm]
Type = ChangeState
Value = 1500
TriggerAll = !AILevel
TriggerAll = Command = "Aura_Storm"
TriggerAll = Power >= 1000
Trigger1 = Ctrl
Trigger1 = StateType = S

;---------------------------------------------------------------------------
; Close Combat
[State -1, Close Combat]
Type = ChangeState
Value = 1000
TriggerAll = !AILevel
TriggerAll = Command = "Close_Combat"
TriggerAll = Power >= 1000
Trigger1 = Ctrl
Trigger1 = StateType = S
Trigger2 = StateNO = 200
Trigger2 = AnimTime >= -4 || MoveContact
Trigger3 = StateNO = 201
Trigger3 = AnimTime >= -14 || MoveContact
Trigger4 = StateNO = 205
Trigger4 = AnimTime >= -10 || MoveContact
Trigger5 = StateNO = 210
Trigger5 = AnimTime >= -8 || MoveContact
Trigger6 = StateNO = 215
Trigger6 = AnimTime >= -18 || MoveContact
Trigger7 = StateNO = 220
Trigger7 = AnimTime >= -9 || MoveContact
Trigger8 = StateNO = 230
Trigger8 = AnimTime >= -21 || MoveContact
Trigger9 = StateNO = 240
Trigger9 = AnimTime >= -3 || MoveContact
Trigger10 = StateNO = 250
Trigger10 = AnimTime >= -4 || MoveContact
Trigger11 = StateNO = 260
Trigger11 = AnimTime >= -10 || MoveContact
Trigger12 = StateNO = 270
Trigger12 = AnimTime >= -21 || MoveContact

;---------------------------------------------------------------------------
; Iron Tail 1
[State -1, Iron Tail 1]
Type = ChangeState
Value = 490
TriggerAll = !AILevel
TriggerAll = Command = "Iron_Tail_a"
Trigger1 = Ctrl

;---------------------------------------------------------------------------
; Iron Tail 2
[State -1, Iron Tail 2]
Type = ChangeState
Value = 500
TriggerAll = !AILevel
TriggerAll = Command = "Iron_Tail_b"
Trigger1 = Ctrl

;---------------------------------------------------------------------------
; Metal Claw 1
[State -1, Metal Claw 1]
Type = ChangeState
Value = 470
TriggerAll = !AILevel
TriggerAll = Command = "Metal_Claw_x"
Trigger1 = StateType != A
Trigger1 = Ctrl
Trigger2 = StateNO = 200
Trigger2 = AnimTime >= -4 || MoveContact
Trigger3 = StateNO = 201
Trigger3 = AnimTime >= -14 || MoveContact
Trigger4 = StateNO = 205
Trigger4 = AnimTime >= -10 || MoveContact
Trigger5 = StateNO = 210
Trigger5 = AnimTime >= -8 || MoveContact
Trigger6 = StateNO = 215
Trigger6 = AnimTime >= -18 || MoveContact
Trigger7 = StateNO = 220
Trigger7 = AnimTime >= -9 || MoveContact
Trigger8 = StateNO = 230
Trigger8 = AnimTime >= -21 || MoveContact
Trigger9 = StateNO = 240
Trigger9 = AnimTime >= -3 || MoveContact
Trigger10 = StateNO = 250
Trigger10 = AnimTime >= -4 || MoveContact
Trigger11 = StateNO = 260
Trigger11 = AnimTime >= -10 || MoveContact
Trigger12 = StateNO = 270
Trigger12 = AnimTime >= -21 || MoveContact

;---------------------------------------------------------------------------
; Metal Claw 2
[State -1, Metal Claw 2]
Type = ChangeState
Value = 480
TriggerAll = !AILevel
TriggerAll = Command = "Metal_Claw_y"
Trigger1 = StateType != A
Trigger1 = Ctrl
Trigger2 = StateNO = 200
Trigger2 = AnimTime >= -4 || MoveContact
Trigger3 = StateNO = 201
Trigger3 = AnimTime >= -14 || MoveContact
Trigger4 = StateNO = 205
Trigger4 = AnimTime >= -10 || MoveContact
Trigger5 = StateNO = 210
Trigger5 = AnimTime >= -8 || MoveContact
Trigger6 = StateNO = 215
Trigger6 = AnimTime >= -18 || MoveContact
Trigger7 = StateNO = 220
Trigger7 = AnimTime >= -9 || MoveContact
Trigger8 = StateNO = 230
Trigger8 = AnimTime >= -21 || MoveContact
Trigger9 = StateNO = 240
Trigger9 = AnimTime >= -3 || MoveContact
Trigger10 = StateNO = 250
Trigger10 = AnimTime >= -4 || MoveContact
Trigger11 = StateNO = 260
Trigger11 = AnimTime >= -10 || MoveContact
Trigger12 = StateNO = 270
Trigger12 = AnimTime >= -21 || MoveContact

;---------------------------------------------------------------------------
; Force Palm 1
[State -1, Force Palm 1]
Type = ChangeState
Value = 450
TriggerAll = !AILevel
TriggerAll = Command = "Force_Palm_x"
Trigger1 = StateType = S
Trigger1 = Ctrl
Trigger2 = StateNO = 200
Trigger2 = AnimTime >= -4 || MoveContact
Trigger3 = StateNO = 201
Trigger3 = AnimTime >= -14 || MoveContact
Trigger4 = StateNO = 205
Trigger4 = AnimTime >= -10 || MoveContact
Trigger5 = StateNO = 210
Trigger5 = AnimTime >= -8 || MoveContact
Trigger6 = StateNO = 215
Trigger6 = AnimTime >= -18 || MoveContact
Trigger7 = StateNO = 220
Trigger7 = AnimTime >= -9 || MoveContact
Trigger8 = StateNO = 230
Trigger8 = AnimTime >= -21 || MoveContact
Trigger9 = StateNO = 240
Trigger9 = AnimTime >= -3 || MoveContact
Trigger10 = StateNO = 250
Trigger10 = AnimTime >= -4 || MoveContact
Trigger11 = StateNO = 260
Trigger11 = AnimTime >= -10 || MoveContact
Trigger12 = StateNO = 270
Trigger12 = AnimTime >= -21 || MoveContact

;---------------------------------------------------------------------------
; Force Palm 2
[State -1, Force Palm 2]
Type = ChangeState
Value = 460
TriggerAll = !AILevel
TriggerAll = Command = "Force_Palm_y"
Trigger1 = StateType = S
Trigger1 = Ctrl
Trigger2 = StateNO = 200
Trigger2 = AnimTime >= -4 || MoveContact
Trigger3 = StateNO = 201
Trigger3 = AnimTime >= -14 || MoveContact
Trigger4 = StateNO = 205
Trigger4 = AnimTime >= -10 || MoveContact
Trigger5 = StateNO = 210
Trigger5 = AnimTime >= -8 || MoveContact
Trigger6 = StateNO = 215
Trigger6 = AnimTime >= -18 || MoveContact
Trigger7 = StateNO = 220
Trigger7 = AnimTime >= -9 || MoveContact
Trigger8 = StateNO = 230
Trigger8 = AnimTime >= -21 || MoveContact
Trigger9 = StateNO = 240
Trigger9 = AnimTime >= -3 || MoveContact
Trigger10 = StateNO = 250
Trigger10 = AnimTime >= -4 || MoveContact
Trigger11 = StateNO = 260
Trigger11 = AnimTime >= -10 || MoveContact
Trigger12 = StateNO = 270
Trigger12 = AnimTime >= -21 || MoveContact

;---------------------------------------------------------------------------
; Aura Sphere 1
[State -1, Aura Sphere 1]
Type = ChangeState
Value = 400
TriggerAll = !AILevel
TriggerAll = Command = "Aura_Sphere_x"
Trigger1 = StateType = S
Trigger1 = Ctrl

;---------------------------------------------------------------------------
; Aura Sphere 2
[State -1, Aura Sphere 2]
Type = ChangeState
Value = 410
TriggerAll = !AILevel
TriggerAll = Command = "Aura_Sphere_y"
Trigger1 = StateType = S
Trigger1 = Ctrl

;---------------------------------------------------------------------------
; Air Aura Sphere 1
[State -1, Air Aura Sphere 1]
Type = ChangeState
Value = 420
TriggerAll = !AILevel
TriggerAll = Command = "Aura_Sphere_x"
Trigger1 = StateType = A
Trigger1 = Ctrl

;---------------------------------------------------------------------------
; Air Aura Sphere 2
[State -1, Air Aura Sphere 2]
Type = ChangeState
Value = 430
TriggerAll = !AILevel
TriggerAll = Command = "Aura_Sphere_y"
Trigger1 = StateType = A
Trigger1 = Ctrl

;---------------------------------------------------------------------------
; Cotovelada
[State -1, Cotovelada]
type = ChangeState
value = 205
TriggerAll = !AILevel
triggerall = command = "x"
TriggerAll = Command = "holdfwd"
triggerall = command != "holddown"
Trigger1 = StateType = S
Trigger1 = Ctrl
trigger2 = StateNO = 200
trigger2 = AnimTime >= -4 || MoveContact
trigger3 = StateNO = 201
trigger3 = AnimTime >= -14 || MoveContact

;---------------------------------------------------------------------------
; Light Punch 1
[State -1, Light Punch 1]
type = ChangeState
value = 200
TriggerAll = !AILevel
triggerall = command = "x"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
; Light Punch 2
[State -1, Light Punch 2]
type = ChangeState
value = 201
TriggerAll = !AILevel
triggerall = command = "x"
triggerall = command != "holddown"
trigger1 = StateNO = 200
trigger1 = AnimTime >= -4 || MoveContact

;---------------------------------------------------------------------------
; Push
[State -1, Push]
type = ChangeState
value = 215
TriggerAll = !AILevel
triggerall = command = "y"
TriggerAll = Command = "holdfwd"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
Trigger2 = StateNO = 210
Trigger2 = AnimTime >= -8 || MoveContact

;---------------------------------------------------------------------------
; Strong Punch
[State -1, Strong Punch]
type = ChangeState
value = 210
TriggerAll = !AILevel
triggerall = command = "y"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
; Light Kick 2
[State -1, Light Kick 2]
type = ChangeState
value = 225
TriggerAll = !AILevel
triggerall = command = "a"
TriggerAll = Command = "holdup"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl || StateNO = 40
Trigger2 = StateNO = 220
Trigger2 = AnimTime >= -9 || MoveContact

;---------------------------------------------------------------------------
; Light Kick
[State -1, Light Kick]
type = ChangeState
value = 220
TriggerAll = !AILevel
triggerall = command = "a"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
; Double Kick
[State -1, Double Kick]
type = ChangeState
value = 235
TriggerAll = !AILevel
triggerall = command = "b"
TriggerAll = Command = "holdfwd"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
Trigger2 = StateNO = 230
Trigger2 = AnimTime >= -21 || MoveContact

;---------------------------------------------------------------------------
; Strong Kick
[State -1, Strong Kick]
type = ChangeState
value = 230
TriggerAll = !AILevel
triggerall = command = "b"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
; Crouching Light Punch
[State -1, Crouching Light Punch]
type = ChangeState
value = 240
TriggerAll = !AILevel
triggerall = command = "x"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl

;---------------------------------------------------------------------------
; Crouching Strong Punch
[State -1, Crouching Strong Punch]
type = ChangeState
value = 250
TriggerAll = !AILevel
triggerall = command = "y"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl

;---------------------------------------------------------------------------
; Crouching Light Kick
[State -1, Crouching Light Kick]
type = ChangeState
value = 260
TriggerAll = !AILevel
triggerall = command = "a"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl

;---------------------------------------------------------------------------
; Crouching Strong Kick
[State -1, Crouching Strong Kick]
type = ChangeState
value = 270
TriggerAll = !AILevel
triggerall = command = "b"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl

;---------------------------------------------------------------------------
; Jumping Light Punch
[State -1, Jumping Light Punch]
type = ChangeState
value = 280
TriggerAll = !AILevel
triggerall = command = "x"
trigger1 = statetype = A
trigger1 = ctrl

;---------------------------------------------------------------------------
; Jumping Strong Punch
[State -1, Jumping Strong Punch]
type = ChangeState
value = 290
TriggerAll = !AILevel
triggerall = command = "y"
trigger1 = statetype = A
trigger1 = ctrl

;---------------------------------------------------------------------------
; Jumping Light Kick
[State -1, Jumping Light Kick]
type = ChangeState
value = 300
TriggerAll = !AILevel
triggerall = command = "a"
trigger1 = statetype = A
trigger1 = ctrl

;---------------------------------------------------------------------------
; Jumping Strong Kick
[State -1, Jumping Strong Kick]
type = ChangeState
value = 310
TriggerAll = !AILevel
triggerall = command = "b"
trigger1 = statetype = A
trigger1 = ctrl

;---------------------------------------------------------------------------
; Advancing Guard
[State -1, Advancing Guard]
Type = ChangeState
Value = 350
TriggerAll = !AILevel
TriggerAll = Command = "z"
TriggerAll = Power >= 20
Trigger1 = StateType = S || StateType = C
Trigger1 = Ctrl
Trigger2 = StateNO = 150
Trigger3 = StateNO = 151
Trigger4 = StateNO = 152
Trigger5 = StateNO = 153

;---------------------------------------------------------------------------
; Call Helper
[State -1, Call Helper]
Type = ChangeState
Value = 510
TriggerAll = !AILevel
TriggerAll = Command = "c"
TriggerAll = Ctrl
TriggerAll = StateType = S
TriggerAll = NumHelper(510) = 0
TriggerAll = NumHelper(511) = 0
Trigger1 = Var(0) = 1
Trigger1 = Power >= 500
Trigger2 = Var(0) = 2
Trigger2 = Power >= 1000
Trigger3 = Var(0) = 3
Trigger3 = Power >= 1000