[Command]
name = "CPU1"
command = U, D, F
time = 1

[Command]
name = "CPU2"
command = U, B, F
time = 1

[Command]
name = "CPU3"
command = U, D, D
time = 1

[Command]
name = "CPU4"
command = F, B, U
time = 1

[Command]
name = "CPU5"
command = U, F, U, B
time = 1

[Command]
name = "CPU6"
command = U, D, B
time = 1

[Command]
name = "CPU7"
command = F, F, B
time = 1

[Command]
name = "CPU8"
command = U, D, U
time = 1

[Command]
name = "CPU9"
command = F, B, B
time = 1

[Command]
name = "CPU10"
command = F, F, B, B
time = 1

[Command]
name = "CPU11"
command = U, U, F
time = 1

[Command]
name = "CPU12"
command = U, B, B
time = 1

[Command]
name = "CPU13"
command = U, B, F, F
time = 1

[Command]
name = "CPU14"
command = U, F, B, U
time = 1

[Command]
name = "CPU15"
command = U, B, F, U
time = 1

[Command]
name = "CPU16"
command = U, B, B, B
time = 1

[Command]
name = "CPU17"
command = U, D, B, F
time = 1

[Command]
name = "CPU18"
command = U, D, B, D
time = 1

[Command]
name = "CPU19"
command = U, D, F, U
time = 1

[Command]
name = "CPU20"
command = U, D, U, B
time = 1

[Command]
name = "CPU21"
command = U, D, F, F
time = 1

[Command]
name = "CPU22"
command = F, F, F, F
time = 1

[Command]
name = "CPU23"
command = U, U, U, D
time = 1

[Command]
name = "CPU24"
command = B, B, B
time = 1

[Command]
name = "CPU25"
command = D, D, D, D
time = 1

[Command]
name = "CPU26"
command = D, D, D
time = 1

[Command]
name = "CPU27"
command = F, F, F
time = 1

[Command]
name = "CPU28"
command = U, U, U
time = 1

[Command]
name = "CPU29"
command = U, U, B, B
time = 1

[Command]
name = "CPU30"
command = D, D, F, F
time = 1

[Command]
name = "CPU31"
command = U, D, F, U, D
time = 1

[Command]
name = "CPU32"
command = U, B, F, U, D
time = 1

[Command]
name = "CPU33"
command = U, D, D, U, D
time = 1

[Command]
name = "CPU34"
command = F, B, U, U, D
time = 1

[Command]
name = "CPU35"
command = U, F, U, B, U, D
time = 1

[Command]
name = "CPU36"
command = U, D, B, U, D
time = 1

[Command]
name = "CPU37"
command = F, F, B, U, D
time = 1

[Command]
name = "CPU38"
command = U, D, U, U, D
time = 1

[Command]
name = "CPU39"
command = F, B, B, U, D
time = 1

[Command]
name = "CPU40"
command = F, F, B, B, U, D
time = 1

[Command]
name = "CPU41"
command = U, U, F, U, D
time = 1

[Command]
name = "CPU42"
command = U, B, B, U, D
time = 1

[Command]
name = "CPU43"
command = U, B, F, F, U, D
time = 1

[Command]
name = "CPU44"
command = U, F, B, U, U, D
time = 1

[Command]
name = "CPU45"
command = U, B, F, U, U, D
time = 1

[Command]
name = "CPU46"
command = U, B, B, B, U, D
time = 1

[Command]
name = "CPU47"
command = U, D, B, F, U, D
time = 1

[Command]
name = "CPU48"
command = U, D, B, D, U, D
time = 1

[Command]
name = "CPU49"
command = U, D, F, U, U, D
time = 1

[Command]
name = "CPU50"
command = U, D, U, B, U, D
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

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

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

[Command]
name = "METEOR ATTACK"
command = ~D, D, y

[Command]
name = "genkidama chao"
command = ~D, F, B, c

[Command]
name = "KAME HAME HA AEREO"
command = ~D, B, F, c

[Command]
name = "KAME HAME HA"
command = ~D, B, F, c

;-| Special Motions |------------------------------------------------------
[Command]
name = "kaioken"
command = ~D, F, y

[Command]
name = "explosão de energia"
command = ~D, F, c

[Command]
name = "taioken"
command = ~D, B, c

[Command]
name = "sequencia chutes"
command = ~D, D, b

[Command]
name = "soco duplo"
command = ~D, B, a

[Command]
name = "chute duplo"
command = ~D, B, b

[Command]
name = "chute impacto"
command = ~D, F, b

[Command]
name = "soco impacto"
command = ~D, F, a

[Command]
name = "super soco"
command = ~40$B, F, a

[Command]
name = "super chute"
command = ~40$B, F, b

[Command]
name = "joelhada"
command = ~F, D, F, b

[Command]
name = "sequencia chute aereo"
command = ~F, F, b

[Command]
name = "voadora"
command = ~F, D, b

[Command]
name = "sequencia soco aereo"
command = ~F, D, a

[Command]
name = "ground"
command = ~D, D, b

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

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

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

[Command]
name = "FF"     ;Required (do not remove)
command = /$F, z
time = 1

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

;-| 2/3 Button Combination |-----------------------------------------------

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

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

;===========================================================================
[Statedef -1]

[State -1, AI]
type = VarSet
triggerall = var(59) != 1
triggerall = RoundState = 2
trigger1 = command = "CPU1"
trigger2 = command = "CPU2"
trigger3 = command = "CPU3"
trigger4 = command = "CPU4"
trigger5 = command = "CPU5"
trigger6 = command = "CPU6"
trigger7 = command = "CPU7"
trigger8 = command = "CPU8"
trigger9 = command = "CPU9"
trigger10 = command = "CPU10"
trigger11 = command = "CPU11"
trigger12 = command = "CPU12"
trigger13 = command = "CPU13"
trigger14 = command = "CPU14"
trigger15 = command = "CPU15"
trigger16 = command = "CPU16"
trigger17 = command = "CPU17"
trigger18 = command = "CPU18"
trigger19 = command = "CPU19"
trigger20 = command = "CPU20"
trigger21 = command = "CPU21"
trigger22 = command = "CPU22"
trigger23 = command = "CPU23"
trigger24 = command = "CPU24"
trigger25 = command = "CPU25"
trigger26 = command = "CPU26"
trigger27 = command = "CPU27"
trigger28 = command = "CPU28"
trigger29 = command = "CPU29"
trigger30 = command = "CPU30"
trigger31 = command = "CPU31"
trigger32 = command = "CPU32"
trigger33 = command = "CPU33"
trigger34 = command = "CPU34"
trigger35 = command = "CPU35"
trigger36 = command = "CPU36"
trigger37 = command = "CPU37"
trigger38 = command = "CPU38"
trigger39 = command = "CPU39"
trigger40 = command = "CPU40"
trigger41 = command = "CPU41"
trigger42 = command = "CPU42"
trigger43 = command = "CPU43"
trigger44 = command = "CPU44"
trigger45 = command = "CPU45"
trigger46 = command = "CPU46"
trigger47 = command = "CPU47"
trigger48 = command = "CPU48"
trigger49 = command = "CPU49"
trigger50 = command = "CPU50"
var(59) = 1

;---------------------------------------------------------------------------
; Para finalizar, vamos setar a recuperação do char após ser derrubado
; Vale a pena combinar com prevstateno = 5210 ou 5200 junto com outro golpe
; (tipo, uma voadora...)

[State -1]
type = ChangeState
triggerall = var(59)
triggerall = Alive
triggerall = CanRecover && Vel Y > -1
trigger1 = StateNo = 5050
persistent = 0
value = 5210

[State -1]
type = ChangeState
triggerall = var(59)
triggerall = Alive
triggerall = CanRecover && Vel Y > 0
triggerall = Pos Y >= -20
trigger1 = StateNo = 5050
persistent = 0
value = 5200

;-------------------------------------------------------------------------
; A.I. Rotinas
[State -1]
type = ChangeState
triggerall = RoundState = 2 && var(59)
triggerall = (StateType != A) && (StateType != L)
triggerall = P2StateType = A
triggerall = MoveType != H
triggerall = P2life != 0
trigger1 = (P2BodyDist X <= 70) && (P2BodyDist Y = [-170,-35])
trigger1 = Ctrl
trigger1 = FrontEdgeBodyDist >= 70
value = ifelse(random<=100,238,ifelse(random<=100,280,2220))

[State -1, 1]
type = ChangeState
trigger1 = (Ctrl) && (power > 99)
trigger1 = RoundState = 2
trigger1 = var(59) != 0 
trigger1 = Random <= 50
trigger1 = P2BodyDist X <= 75
trigger1 = StateType = S
trigger1 = P2MoveType = A 
value = 700

;-------------------------------------------------------------------------
; A.I. Rotinas - Combos Starters
; Usamos, quando perto do oponente, um ataque com um golpe fraco
: Depois encaixamos outros golpes
; Por isso, usamos o trigger Movehit
; É melhor movehit pq é possível continuar o combo sobre a defesa
; Supomos os statedefs dos golpes como 200, 210, 220...

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
triggerall = StateType = S
triggerall = (p2statetype = S) || (p2statetype = C)
triggerall = Ctrl
triggerall = P2BodyDist X <= 50
trigger1 = p2movetype = I
trigger1 = Random <= 50
value = 230

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
triggerall = StateType = S
triggerall = (p2statetype = S) || (p2statetype = C)
triggerall = Ctrl
triggerall = P2BodyDist X <= 50
trigger1 = p2movetype = I
trigger1 = Random <= 50
value = 239

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
triggerall = StateType = S
triggerall = (p2statetype = S) || (p2statetype = C)
triggerall = Ctrl
triggerall = P2BodyDist X <= 50
trigger1 = p2movetype = I
trigger1 = Random <= 50
value = 240

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
triggerall = StateType = S
triggerall = (p2statetype = S) || (p2statetype = C)
triggerall = Ctrl
triggerall = P2BodyDist X <= 100
trigger1 = p2movetype = I
trigger1 = Random <= 50
value = 270

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
triggerall = StateType = S
triggerall = (p2statetype = S) || (p2statetype = C)
triggerall = Ctrl
triggerall = P2BodyDist X <= 50
trigger1 = p2movetype = I
trigger1 = Random <= 50
value = 280

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
triggerall = StateType = S
triggerall = (p2statetype = S) || (p2statetype = C)
triggerall = Ctrl
triggerall = P2BodyDist X <= 50
trigger1 = p2movetype = I
trigger1 = Random <= 50
value = 290

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
triggerall = StateType = S
triggerall = (p2statetype = S) || (p2statetype = C)
triggerall = Ctrl
triggerall = P2BodyDist X <= 70
trigger1 = p2movetype = I
trigger1 = Random <= 50
value = 300

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
triggerall = StateType = S
triggerall = (p2statetype = S) || (p2statetype = C)
triggerall = Ctrl
triggerall = P2BodyDist X <= 70
trigger1 = p2movetype = I
trigger1 = Random <= 50
value = 320

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
trigger1 = (stateno = 230 || stateno = 240) && movehit
trigger1 = Random <= 300
value = 233

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
trigger1 = (stateno = 230 || stateno = 240) && movehit
trigger1 = Random <= 300
value = 250

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
trigger1 = stateno = 250 && Time > 24
trigger1 = stateno = 233 && Time > 25
trigger1 = Random <= 200
value = 235

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
trigger1 = stateno = 250 && Time > 24
trigger1 = stateno = 233 && Time > 25
trigger1 = Random <= 200
value = 260

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
trigger1 = stateno = 250 && Time > 24
trigger1 = stateno = 233 && Time > 25
trigger1 = stateno = 290 && Time > 39
trigger1 = Random <= 300
value = 238

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
trigger1 = stateno = 250 && Time > 24
trigger1 = stateno = 233 && Time > 25
trigger1 = Random <= 300
value = 239

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
trigger1 = stateno = 250 && Time > 24
trigger1 = stateno = 233 && Time > 25
trigger1 = Random <= 300
value = 270

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
trigger1 = stateno = 250 && Time > 24
trigger1 = stateno = 233 && Time > 25
trigger1 = stateno = 290 && Time > 39
trigger1 = Random <= 300
value = 280

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
trigger1 = (stateno = 230 || stateno = 240) && movehit
trigger1 = stateno = 250 && Time > 24
trigger1 = stateno = 233 && Time > 25
trigger1 = Random <= 300
value = 290

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
trigger1 = stateno = 250 && Time > 24
trigger1 = stateno = 233 && Time > 25
trigger1 = Random <= 300
value = 300

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
trigger1 = stateno = 250 && Time > 24
trigger1 = stateno = 233 && Time > 25
trigger1 = Random <= 300
value = 320

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
trigger1 = stateno = 320 && movehit && Time > 30
trigger1 = Random <= 300
value = 330

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
trigger1 = stateno = 340 && movehit && Time > 30
trigger1 = Random <= 300
value = 350

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
trigger1 = stateno = 350 && movehit && Time > 30
trigger1 = Random <= 300
value = 360

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
trigger1 = stateno = 360 && movehit && Time > 30
trigger1 = Random <= 300
value = 370

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
triggerall = power >= 1999
trigger1 = stateno = 320 && Time > 30
trigger1 = Random <= 300
value = 2100

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
trigger1 = stateno = 320 && Time > 30
trigger1 = Random <= 300
value = 3000

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
trigger1 = stateno = 238 && Time > 18
trigger1 = Random <= 300
value = 630

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
trigger1 = stateno = 238 && Time > 18
trigger1 = Random <= 300
value = 640

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
trigger1 = stateno = 238 && Time > 18
trigger1 = Random <= 300
value = 645

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
trigger1 = stateno = 238 && Time > 18
trigger1 = Random <= 300
value = 647

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
trigger1 = stateno = 238 && Time > 18
trigger1 = Random <= 300
value = 650

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
trigger1 = stateno = 238 && Time > 18
trigger1 = Random <= 500
value = 660

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
triggerall = StateType = S
triggerall = (p2statetype = S) || (p2statetype = C)
triggerall = Ctrl
triggerall = P2BodyDist X <= 80
trigger1 = stateno = 290 && Time > 39
trigger1 = p2movetype = I
trigger1 = Random <= 50
value = 670

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
triggerall = StateType = S
triggerall = (p2statetype = S) || (p2statetype = C)
triggerall = Ctrl
triggerall = P2BodyDist X <= 80
trigger1 = stateno = 290 && Time > 39
trigger1 = p2movetype = I
trigger1 = Random <= 50
value = 680

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
triggerall = StateType = S
triggerall = (p2statetype = S) || (p2statetype = C)
triggerall = (Ctrl) && (Var(2) < 2)
triggerall = P2BodyDist X >= 100
triggerall = power >= 199
trigger1 = p2movetype = I
trigger1 = Random <= 20
value = 2200

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
triggerall = StateType = S
triggerall = (p2statetype = S) || (p2statetype = C)
triggerall = Ctrl
triggerall = P2BodyDist X >= 80
triggerall = power >= 1999
trigger1 = p2movetype = I
trigger1 = Random <= 50
value = 1550

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
triggerall = StateType = S
triggerall = (p2statetype = S) || (p2statetype = C)
triggerall = Ctrl
triggerall = P2BodyDist X >= 120
triggerall = power >= 1999
trigger1 = p2movetype = I
trigger1 = Random <= 50
value = 2100

[State -1]
type = null;changestate
triggerall = RoundState = 2 && var(59)
triggerall = StateType = A
triggerall = (p2statetype = S) || (p2statetype = C)
triggerall = Ctrl
triggerall = P2BodyDist X >= 80
triggerall = power >= 999
trigger1 = p2movetype = I
trigger1 = Random <= 50
value = 2110

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
triggerall = StateType = S
triggerall = (p2statetype = S) || (p2statetype = C)
triggerall = Ctrl
triggerall = P2BodyDist X >= 140
triggerall = power >= 2999
trigger1 = (Var(0) = [1, 299])
trigger1 = p2movetype = I
trigger1 = Random <= 200
trigger2 = (!Var(0)) && (power > 2999)
trigger2 = p2movetype = I
trigger2 = Random <= 200
value = 2700

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
triggerall = StateType = S
triggerall = (p2statetype = S) || (p2statetype = C)
triggerall = Ctrl
triggerall = P2BodyDist X >= 80
triggerall = power >= 2999
trigger1 = p2movetype = I
trigger1 = Random <= 200
value = 20000

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
triggerall = power >= 1999
trigger1 = (stateno = 670 || stateno = 680) && movehit
trigger1 = stateno = 2200 && movehit
trigger1 = Random <= 400
value = 1550

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
trigger1 = (stateno = 670 || stateno = 680) && movehit
trigger1 = stateno = 2200 && movehit
trigger1 = Random <= 300
value = 3000

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
triggerall = power >= 1999
trigger1 = (stateno = 670 || stateno = 680) && movehit
trigger1 = stateno = 2200 && movehit
trigger1 = Random <= 300
value = 2100

[State -1]
type = changestate
triggerall = RoundState = 2 && var(59)
triggerall = power >= 2999
trigger1 = (stateno = 670 || stateno = 680) && movehit
trigger1 = Random <= 200
value = 20000

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

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

;---------------------------------------------------------------------------
;METEOR ATTACK
[State -1, METEOR ATTACK]
type = ChangeState
value = 20000
triggerall = (command = "METEOR ATTACK") && (!Pos Y) && (power > 2999)
trigger1 = ctrl

;---------------------------------------------------------------------------
;GENKIDAMA
[State -1, GENKIDAMA]
type = ChangeState
value = 2700
triggerall = (command = "genkidama chao") && (!Pos Y) && (ctrl)
trigger1 = (Var(0) = [1, 299])
trigger2 = (!Var(0)) && (power > 2999)

;---------------------------------------------------------------------------
;KAME HAME HA AEREO
[State -1, KAME HAME HA AEREO]
type = null;ChangeState
value = 2110
triggerall = (command = "KAME HAME HA AEREO") && (Pos Y) && (power > 999)
trigger1 = ctrl
trigger2 = stateno = 370 && Time > 25

;---------------------------------------------------------------------------
;KAME HAME HA
[State -1, KAME HAME HA]
type = ChangeState
value = 2100
triggerall = (command = "KAME HAME HA") && (!Pos Y) && (power > 999)
trigger1 = ctrl

;---------------------------------------------------------------------------
;KAIOKEN
[State -1, KAIOKEN]
type = ChangeState
value = 1550
triggerall = (command = "kaioken") && (!Pos Y) && (power > 1999)
trigger1 = ctrl

;---------------------------------------------------------------------------
;EXPLOSÃO DE ENERGIA (AR)
[State -1, EXPLOSÃO DE ENERGIA (AR)]
type = ChangeState
value = 2225
triggerall = (command = "explosão de energia") && (power > 199)
trigger1 = StateType = A && ctrl

;---------------------------------------------------------------------------
;EXPLOSÃO DE ENERGIA
[State -1, EXPLOSÃO DE ENERGIA]
type = ChangeState
value = 2220
triggerall = (command = "explosão de energia") && (!Pos Y) && (power > 199)
trigger1 = ctrl

;---------------------------------------------------------------------------
;TAIOKEN
[State -1, TAIOKEN]
type = ChangeState
value = 2200
triggerall = (command = "taioken") && (!Pos Y) && (Var(2) < 2) && (power > 299)
trigger1 = ctrl

;---------------------------------------------------------------------------
;KI SHOT
[State -1, KI SHOT]
type = ChangeState
value = 2000
triggerall = (command = "c") && (!Pos Y) && (power > 29)
trigger1 = ctrl
trigger2 = stateno = 250 && Time > 24
trigger3 = stateno = 233 && Time > 25
trigger4 = movehit && stateno = 240
trigger5 = movehit && stateno = 230
trigger6 = (stateno = 2001) && Time > 10

;---------------------------------------------------------------------------
;KI SHOT2
[State -1, KI SHOT2]
type = ChangeState
value = 2001
triggerall = (command = "c") && (!Pos Y) && (power > 29)
trigger1 = (stateno = 2000) && (Time > 10) && (PrevStateNo != 2001)

;---------------------------------------------------------------------------
;KI SHOT A
[State -1, KI SHOT]
type = ChangeState
value = 2002
triggerall = (command = "c") && (Pos Y) && (power > 29)
trigger1 = ctrl
trigger2 = (stateno = 2003) && Time > 6
trigger3 = stateno = 370 && Time > 25

;---------------------------------------------------------------------------
;KI SHOT2 A
[State -1, KI SHOT2]
type = ChangeState
value = 2003
triggerall = (command = "c") && (Pos Y) && (power > 29)
trigger1 = (stateno = 2002) && (Time > 6) && (PrevStateNo != 2003)

;---------------------------------------------------------------------------
[State -1, power up]
type = ChangeState
value = 1500
triggerall = (Power < 3000) && (command = "charge") && (command = "charge 1")
trigger1 = (ctrl) && (StateType = S)

;---------------------------------------------------------------------------
;teleport
[State -1, TELEPORTE]
type = ChangeState
value = 700
triggerall = (command = "x") && (power > 99)
trigger1 = ctrl

;---------------------------------------------------------------------------
;sequencia chute aereo
[State -1, sequencia chute aereo]
type = ChangeState
value = 665
triggerall = command = "sequencia chute aereo"
trigger1 = movehit && stateno = 238 && Time > 9

;---------------------------------------------------------------------------
;ground
[State -1, ground]
type = ChangeState
value = 660
trigger1 = (command = "ground") && (StateType != A) && (ctrl) && (p2StateType = L)

;---------------------------------------------------------------------------
;voadora
[State -1, voadora]
type = ChangeState
value = 650
triggerall = command = "voadora"
trigger1 = StateType = A && ctrl

;---------------------------------------------------------------------------
;sequencia soco aereo
[State -1, sequencia soco aereo]
type = ChangeState
value = 645
triggerall = command = "sequencia soco aereo"
trigger1 = StateType = A && ctrl

;---------------------------------------------------------------------------
;martelo
[State -1, martelo]
type = ChangeState
value = 647
triggerall = (command = "a") && (command = "holddown")
trigger1 = StateType = A && ctrl

;---------------------------------------------------------------------------
;sequencia aerea (fim)
[State -1, sequencia aerea]
type = ChangeState
value = 370
triggerall = (command = "a") && (Pos Y) && (power > 49)
trigger1 = movehit && stateno = 360 && Time > 14

;---------------------------------------------------------------------------
;sequencia aerea
[State -1, sequencia aerea]
type = ChangeState
value = 360
triggerall = (command = "a") && (Pos Y) && (power > 49)
trigger1 = movehit && stateno = 350 && Time > 15

;---------------------------------------------------------------------------
;sequencia aerea
[State -1, sequencia aerea]
type = ChangeState
value = 350
triggerall = (command = "a") && (Pos Y) && (power > 49)
trigger1 = movehit && stateno = 340 && Time > 20

;---------------------------------------------------------------------------
;sequencia aerea (inicio)
[State -1, sequencia aerea (inicio)]
type = ChangeState
value = 330
triggerall = (command = "a") && (!Pos Y) && (power > 49)
trigger1 = movehit && stateno = 320 && Time > 22

;---------------------------------------------------------------------------
;soco duplo
[State -1, soco duplo]
type = ChangeState
value = 320
triggerall = (command = "soco duplo") && (!Pos Y)
trigger1 = ctrl

;---------------------------------------------------------------------------
;chute duplo
[State -1, chute duplo]
type = ChangeState
value = 300
triggerall = (command = "chute duplo") && (!Pos Y)
trigger1 = ctrl

;---------------------------------------------------------------------------
;sequencia chutes
[State -1, sequencia chutes]
type = ChangeState
value = 290
triggerall = (command = "sequencia chutes") && (!Pos Y)
trigger1 = ctrl

;---------------------------------------------------------------------------
;gancho
[State -1, gancho]
type = ChangeState
value = 280
triggerall = (command = "a") && (command = "holddown") && (!Pos Y)
trigger1 = ctrl
trigger2 = stateno = 250 && Time > 24
trigger3 = stateno = 233 && Time > 25
trigger4 = movehit && stateno = 240
trigger5 = movehit && stateno = 230

;---------------------------------------------------------------------------
;joelhada
[State -1, joelhada]
type = ChangeState
value = 238
triggerall = (command = "joelhada") && (!Pos Y)
trigger1 = ctrl
trigger2 = stateno = 250 && Time > 24
trigger3 = stateno = 233 && Time > 25
trigger4 = movehit && stateno = 240
trigger5 = movehit && stateno = 230

;---------------------------------------------------------------------------
;rasteira
[State -1, rasteira]
type = ChangeState
value = 239
triggerall = (command = "b") && (command = "holddown") && (!Pos Y)
trigger1 = ctrl
trigger2 = stateno = 250 && Time > 24
trigger3 = stateno = 233 && Time > 25
trigger4 = movehit && stateno = 240
trigger5 = movehit && stateno = 230

;---------------------------------------------------------------------------
;cabeçada
[State -1, cabeçada]
type = ChangeState
value = 270
triggerall = (command = "a") && (!Pos Y)
trigger1 = stateno = 100 && Time > 3

;---------------------------------------------------------------------------
;cabeçada aerea
[State -1, cabeçada aerea]
type = ChangeState
value = 277
triggerall = (command = "a") && (Pos Y)
trigger1 = stateno = 4000 && Time > 1

;---------------------------------------------------------------------------
;soco impacto
[State -1, soco impacto]
type = ChangeState
value = 670
triggerall = (command = "soco impacto") && (!Pos Y)
trigger1 = ctrl
trigger2 = stateno = 250 && Time > 24
trigger3 = stateno = 233 && Time > 25
trigger4 = movehit && stateno = 240
trigger5 = movehit && stateno = 230
trigger6 = stateno = 680 && Time > 33

;---------------------------------------------------------------------------
;chute impacto
[State -1, chute impacto]
type = ChangeState
value = 680
triggerall = (command = "chute impacto") && (!Pos Y)
trigger1 = ctrl
trigger2 = stateno = 250 && Time > 24
trigger3 = stateno = 233 && Time > 25
trigger4 = movehit && stateno = 240
trigger5 = movehit && stateno = 230
trigger6 = stateno = 670 && Time > 31

;---------------------------------------------------------------------------
;super chute
[State -1, super chute]
type = ChangeState
value = 3100
triggerall = (command = "super chute") && (!Pos Y)
trigger1 = ctrl

;---------------------------------------------------------------------------
;super soco
[State -1, super soco]
type = ChangeState
value = 3000
triggerall = (command = "super soco") && (!Pos Y)
trigger1 = ctrl
trigger2 = stateno = 250 && Time > 24
trigger3 = stateno = 233 && Time > 25
trigger4 = movehit && stateno = 240
trigger5 = movehit && stateno = 230

;---------------------------------------------------------------------------
;Run Back
[State -1, Run Back]
type = ChangeState
value = 105
triggerall = (command = "BB") && (!Pos Y)
trigger1 = ctrl || (StateNo = 2700) && (Var(0) < 290)

;---------------------------------------------------------------------------
;Run Back Air
[State -1, Run Back]
type = ChangeState
value = 4005
triggerall = (command = "BB") && (Pos Y)
trigger1 = ctrl

;---------------------------------------------------------------------------
;Run Fwd
[State -1, Run Fwd]
type = ChangeState
value = 100
triggerall = StateNo != 100
triggerall = (command = "z") && (!Pos Y)
trigger1 = ctrl || (StateNo = 2700) && (Var(0) < 290)

;---------------------------------------------------------------------------
;Run Fwd Air
[State -1, Run Fwd]
type = ChangeState
value = 4000
triggerall = (command = "z") && (Pos Y)
trigger1 = ctrl

;---------------------------------------------------------------------------
;sequencia chute forte
[State -1, sequencia chute forte]
type = ChangeState
value = 235
triggerall = (command = "b") && (!Pos Y)
trigger1 = stateno = 250 && Time > 24
trigger2 = stateno = 233 && Time > 25

;---------------------------------------------------------------------------
;sequencia soco forte
[State -1, sequencia soco forte]
type = ChangeState
value = 260
triggerall = (command = "a") && (!Pos Y)
trigger1 = stateno = 250 && Time > 24
trigger2 = stateno = 233 && Time > 25

;---------------------------------------------------------------------------
;sequencia chute fraco
[State -1, sequencia chute fraco]
type = ChangeState
value = 233
triggerall = (command = "b") && (!Pos Y)
trigger1 = movehit && stateno = 230
trigger2 = movehit && stateno = 240

;---------------------------------------------------------------------------
;sequencia soco fraco
[State -1, sequencia soco fraco]
type = ChangeState
value = 250
triggerall = (command = "a") && (!Pos Y)
trigger1 = movehit && stateno = 240
trigger2 = movehit && stateno = 230

;---------------------------------------------------------------------------
;Stand CHUTE
[State -1, Stand Light Kick]
type = ChangeState
value = 230
triggerall = (command = "b") && (!Pos Y)
trigger1 = ctrl

;---------------------------------------------------------------------------
;Stand SOCO
[State -1, Standing Strong Kick]
type = ChangeState
value = 240
triggerall = (command = "a") && (!Pos Y)
trigger1 = ctrl && StateNo != 100

;---------------------------------------------------------------------------
;Jump CHUTE
[State -1, Jump Light Kick]
type = ChangeState
value = 630
triggerall = (command = "b") && (Pos Y)
trigger1 = ctrl
trigger2 = stateno = 1350 ;Air blocking

;---------------------------------------------------------------------------
;Jump SOCO
[State -1, Jump Light Punch]
type = ChangeState
value = 640
triggerall = (command = "a") && (Pos Y)
trigger1 = ctrl
trigger2 = stateno = 1350 ;Air blocking