;-| Hypers |-----------------------------------------------------------------------------------
;-[SHINING GOU SHOCK]------
[Command]
name = "ShinGoSh"
command = x, x, F, a, z
time = 50

;-[TAMEIKI WARI]------
[Command]
name = "Tameiki Wari"
command = ~s, s, s
time = 15

;-[SCRAMBLE GOU RASSEN]------
[Command]
name = "sgr"
command = ~D, DB, B, a+b
time = 30

[Command]
name = "sgr"
command = ~D, DB, B, a+c

[Command]
name = "sgr"
command = ~D, DB, B, c+b

[Command]
name = "sgr"
command = ~D, DB, B, a+b+c

;-[SCRAMBLE GOU PUNCH (Tierra)//THUNDER GOU SHOWER (Aire)]------
[Command]
name = "QCF2_z"
command = ~D, DF, F, z+y

[Command]
name = "QCF2_z"
command = ~D, DF, F, x+y

[Command]
name = "QCF2_z"
command = ~D, DF, F, z+x

;-[HIGH MEGA GOU BEAM ]--en AIRE y TIERRA------ 
[Command]
name = "QCB2_y"
command = ~D, DB, B, y+z
time = 22

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

[Command]
name = "QCB2_y"
command = ~D, DB, B, z+x
time = 22

;-| Especiales |-------------------------------------------------------------------------------
; Asura Senkuu Forward
[Command]
name = "asuraf_a"
command = ~F, D, DF, a+b

[Command]
name = "asuraf_b"
command = ~F, D, DF, b+c

[Command]
name = "asuraf_c"
command = ~F, D, DF, a+c

[Command]
name = "asuraf_x"
command = ~F, D, DF, x+y

[Command]
name = "asuraf_y"
command = ~F, D, DF, y+z

[Command]
name = "asuraf_z"
command = ~F, D, DF, x+z

;-----------------
; Asura Senkuu Backward
[Command]
name = "asurab_a"
command = ~B, D, DB, a+b

[Command]
name = "asurab_b"
command = ~B, D, DB, b+c

[Command]
name = "asurab_c"
command = ~B, D, DB, a+c

[Command]
name = "asurab_x"
command = ~B, D, DB, x+y

[Command]
name = "asurab_y"
command = ~B, D, DB, y+z

[Command]
name = "asurab_z"
command = ~B, D, DB, x+z

;-----------------
; QCF
[Command]
name = "QCF_a"
command = ~D, DF, F, a

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

[Command]
name = "QCF_c"
command = ~D, DF, F, c

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

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

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

;-----------------
; QCB
[Command]
name = "QCB_a"
command = ~D, DB, B, a

[Command]
name = "QCB_b"
command = ~D, DB, B, b

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

[Command]
name = "QCB_x"
command = ~D, DB, B, x

[Command]
name = "QCB_y"
command = ~D, DB, B, y

[Command]
name = "QCB_z"
command = ~D, DB, B, z

;-----------------
; QCD
[Command]
name = "QCD_a"
command = ~B, DB, D, a

[Command]
name = "QCD_b"
command = ~B, DB, D, b

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

[Command]
name = "QCD_x"
command = ~B, DB, D, x

[Command]
name = "QCD_y"
command = ~B, DB, D, y

[Command]
name = "QCD_z"
command = ~B, DB, D, z

;-----------------
; Uppercut
[Command]
name = "uppercut_a"
command = ~F, D, DF, a

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

[Command]
name = "uppercut_c"
command = ~F, D, DF, c

[Command]
name = "uppercut_x"
command = ~F, D, DF, x

[Command]
name = "uppercut_y"
command = ~F, D, DF, y

[Command]
name = "uppercut_z"
command = ~F, D, DF, z

;-| Doble Tipeo |------------------------------------------------------------------------------
;Correr
[Command]
name = "FF";-----[No Remover]
command = F, F
time = 10

;Retroceder
[Command]
name = "BB";-----[No Remover]
command = B, B
time = 10

;-| Otros |------------------------------------------------------------------------------------
;Super Salto
[Command]
name = "SuperJump"
command = ~D, U
time = 10

[Command]
name = "PT"
command = a+z
time = 1

;Zero/Alpha Counter A
[Command]
name = "ff_c"
command = y+b
time = 1

[Command]
name = "ff_z"
command = z+c
time = 1

[Command]
name = "ff_a"
command = F, F, a
time = 15

[Command]
name = "ff_b"
command = F, F, b
time = 15

[Command]
name = "ff_c"
command = F, F, c
time = 15

[Command]
name = "ff_x"
command = F, F, x
time = 15

[Command]
name = "ff_y"
command = F, F, y
time = 15

[Command]
name = "ff_z"
command = F, F, z
time = 15
 
;-| 2/3 Combinaciones |------------------------------------------------------------------------
;Recuperacion
[Command]
name = "recovery";-----[No Remover]
command = s
time = 1

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

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

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

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

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

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

;Guard Push---------------------
[Command]
name = "xyz"
command = x+y+z
time = 1

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

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

;-| Dir + Button |-----------------------------------------------------------------------------
[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 = "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 = "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_ab"
command = /F, a+b
time = 1

[Command]
name = "back_ab"
command = /B, a+b
time = 1

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

;-| 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";-----[No Remover]
command = /$F
time = 1

[Command]
name = "holdback";-----[No Remover]
command = /$B
time = 1

[Command]
name = "holdup";-----[No Remover]
command = /$U
time = 1

[Command]
name = "holddown";-----[No Remover]
command = /$D
time = 1

;-| AI |--------------------------------------------------------------
[Command]
name = "AI1"
command = U,D,B,F,U,D,B,F,b,b,a,a,s
time = 0

[Command]
name = "AI2"
command = U,D,U,D,U,D,U,D,U,D,U,D,a+b+c+x+y+z
time = 0

[Command]
name = "AI3"
command = U,F,B,D,B,F,U,x,x,x,y,y,y,z,z,z
time = 0

[Command]
name = "AI4"
command = x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x
time = 0

[Command]
name = "AI5"
command = y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y
time = 0

[Command]
name = "AI6"
command = z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z
time = 0

[Command]
name = "AI7"
command = x+y+z,x+y+z,x+y+z,x+y+z,x+y+z,x+y+z,x+y+z
time = 0

[Command]
name = "AI8"
command = a+b+c,a+b+c,a+b+c,a+b+c,a+b+c,a+b+c,a+b+c
time = 0

[Command]
name = "AI9"
command = y,a,B,B,a,D,a,B,B,a
time = 0

[Command]
name = "AI10"
command = c,U,B,B,y,B,U,D,D,y
time = 0

[Command]
name = "AI11"
command = x,x
time = 0

[Command]
name = "AI12"
command = y,y
time = 0

[Command]
name = "AI13"
command = z,z
time = 0

[Command]
name = "AI14"
command = a,a
time = 0

[Command]
name = "AI15"
command = b,b
time = 0

[Command]
name = "AI16"
command = c,c
time = 0

[Command]
name = "AI17"
command = U,x
time = 0

[Command]
name = "AI18"
command = D,x
time = 0

[Command]
name = "AI19"
command = B,x
time = 0

[Command]
name = "AI20"
command = F,x
time = 0

[Command]
name = "AI0"
command = U,U,D,D,B,F,B,F,b,a,s
time = 0

;---------------------------------------------------------------------------
; 2. State entry
; --------------
; This is where you define what commands bring you to what states.
;
; Each state entry block looks like:
;   [State -1]                  ;Don't change this
;   type = ChangeState          ;Don't change this
;   value = new_state_number
;   trigger1 = command = "command_name"
;   . . .  (any additional triggers)
;
; - new_state_number is the number of the state to change to
; - command_name is the name of the command (from the section above)
; - Useful triggers to know:
;   - statetype
;       S, C or A : current state-type of player (stand, crouch, air)
;   - ctrl
;       0 or 1 : 1 if player has control. Unless "interrupting" another
;                move, you'll want ctrl = 1
;   - stateno
;       number of state player is in - useful for "move interrupts"
;   - movecontact
;       0 or 1 : 1 if player's last attack touched the opponent
;                useful for "move interrupts"
;
; For reference on triggers, see CNS documentation.
;
; Just for your information (skip if you're not interested):
; This part is an extension of the CNS. "State -1" is a special state
; that is executed once every game-tick, regardless of what other state
; you are in. 


; Don't remove the following line. It's required by the CMD standard.
[Statedef -1]
;===========================================================================
;---------------------------------------------------------------------------
;Activate AI
[State -1, Activate AI]
type = VarSet
triggerall = var(59) = 0
trigger1 = IsHomeTeam
trigger1 = TeamSide = 2
trigger2 = command = "AI0"
trigger3 = command = "AI1"
trigger4 = command = "AI2"
trigger5 = command = "AI3"
trigger6 = command = "AI4"
trigger7 = command = "AI5"
trigger8 = command = "AI6"
trigger9 = command = "AI7"
trigger10 = command = "AI8"
trigger11 = command = "AI9"
trigger12 = command = "AI10"
trigger13 = command = "AI11"
trigger14 = command = "AI12"
trigger15 = command = "AI13"
trigger16 = command = "AI14"
trigger17 = command = "AI15"
trigger18 = command = "AI16"
trigger19 = command = "AI17"
trigger20 = command = "AI18"
trigger21 = command = "AI19"
trigger22 = command = "AI20"
v = 59
value = 1

;---------------------------------------------------------------------------
;Activate AI
[State -1, Activate AI]
type = VarSet
trigger1 = var(59) = 2
trigger1 = RoundState != 3
v = 59
value = 1

;---------------------------------------------------------------------------
;Deactivate AI
[State -1, Deactivate AI]
type = VarSet
triggerall = var(59) != 0
trigger1 = RoundState = 3
v = 59
value = 2

;---------------------------------------------------------------------------
;Liedown AI
[State -1, Liedown AI]
type = VarSet
triggerall = var(59) = 1
trigger1 = p2statetype = L
trigger2 = p2stateno = [5050,5079]
v = 59
value = 4

;---------------------------------------------------------------------------
;Liedown AI Off
[State -1, Liedown AI Off]
type = VarSet
triggerall = var(59) = 4
trigger1 = p2statetype != L
trigger1 = p2stateno != [5050,5079]
v = 59
value = 1

;---------------------------------------------------------------------------
;Check Miss AI Begin Attack
[State -1, Check Miss AI Begin Attack]
type = VarSet
triggerall = var(59) != 0
triggerall = var(58) <= 0
trigger1 = movetype = A
v = 58
value = stateno

;---------------------------------------------------------------------------
;Check Miss AI Hit
[State -1, Check Miss AI Hit]
type = VarSet
triggerall = var(59) != 0
triggerall = var(58) != 0
trigger1 = movecontact
trigger2 = movetype = I
trigger2 = random < 10
trigger3 = stateno = [150,159]
v = 58
value = 0

;---------------------------------------------------------------------------
;Check Miss AI End Attack
[State -1, Check Miss AI End Attack]
type = VarSet
triggerall = var(59) != 0
triggerall = var(58) > 0
trigger1 = ctrl = 1
v = 58
value = var(58)*(-1)

;===========================================================================
; AI hiper
;===========================================================================
[State -1, Thunder Gou Shower]
type = ChangeState
value = 2700
triggerall = var(59) != 0
triggerall = var(59) = 1
triggerall = statetype = A
triggerall = power >= 1000
trigger1 = p2bodydist x > 100
trigger1 = p2bodydist y = [-100,0]
trigger1 = random < 100
trigger2 = enemy, ctrl = 0
triggerall = stateno != 2700 
triggerall = stateno != 4500
triggerall = stateno != 2010
triggerall = stateno != 3600
triggerall = stateno != 198
triggerall = stateno != 1170
triggerall = stateno != 4900
triggerall = Prevstateno != 2700 
triggerall = Prevstateno != 4500
triggerall = Prevstateno != 2010
triggerall = Prevstateno != 3600
triggerall = Prevstateno != 198
triggerall = Prevstateno != 1170
triggerall = Prevstateno != 4900
ctrl = 1

[State -1, SCRAMBLE GOU RASSEN]
type = ChangeState
value = 4500
triggerall = var(59) != 0
triggerall = p2bodydist x < 30
trigger1 = p2bodydist y = [-300,0]
triggerall = P2statetype = A
triggerall = power >= 1000
trigger1 = random < 300
trigger2 = enemy, ctrl = 0
triggerall = var(59) = 1
triggerall = stateno != 2700 
triggerall = stateno != 4500
triggerall = stateno != 2010
triggerall = stateno != 3600
triggerall = stateno != 198
triggerall = stateno != 1170
triggerall = stateno != 4900
triggerall = Prevstateno != 2700 
triggerall = Prevstateno != 4500
triggerall = Prevstateno != 2010
triggerall = Prevstateno != 3600
triggerall = Prevstateno != 198
triggerall = Prevstateno != 1170
triggerall = Prevstateno != 4900
ctrl = 0

[State -1, SCRAMBLE GOU RASSEN]
type = VelAdd
trigger1 = var(59) != 0
trigger1 = stateno = 4502
trigger1 = p2bodydist x > 5
triggerall = Time > 6
x = 2.2

[State -1, SCRAMBLE GOU RASSEN]
type = VelAdd
trigger1 = var(59) != 0
trigger1 = stateno = 4502
trigger1 = p2bodydist x < 5
triggerall = Time > 6
x = -2.2

[State -1, SCRAMBLE GOU RASSEN]
type = VelAdd
trigger1 = var(59) != 0
trigger1 = stateno = 4502
trigger1 = p2bodydist y > 55
triggerall = Time > 6
triggerall = Pos Y < 0
y = 0.3

[State 3201, SCRAMBLE GOU RASSEN]
type = VelAdd
trigger1 = var(59) != 0
trigger1 = stateno = 4502
trigger1 = p2bodydist y < 45
triggerall = Time > 6
y = -0.8

[State -1, HIGH MEGA GOU BEAM]
type = ChangeState
value = 2010
triggerall = var(59) != 0
triggerall = statetype = S
triggerall = power >= 1000
trigger1 = p2bodydist x > 0
trigger1 = p2bodydist y = [-50,30]
trigger1 = random < 400
trigger2 = enemy, ctrl = 0
triggerall = var(59) = 1
triggerall = power != [999,0]
triggerall = stateno != 2700 
triggerall = stateno != 4500
triggerall = stateno != 2010
triggerall = stateno != 3600
triggerall = stateno != 198
triggerall = stateno != 1170
triggerall = stateno != 4900
triggerall = Prevstateno != 2700 
triggerall = Prevstateno != 4500
triggerall = Prevstateno != 2010
triggerall = Prevstateno != 3600
triggerall = Prevstateno != 198
triggerall = Prevstateno != 1170
triggerall = Prevstateno != 4900
ctrl = 0

[State -1, HIGH MEGA GOU BEAM AIRE]
type = ChangeState
value = 3600
triggerall = var(59) != 0
triggerall = statetype = A
triggerall = power >= 1000
trigger1 = p2bodydist x > 0
trigger1 = p2bodydist y = [-100,30]
trigger1 = random < 200
trigger2 = enemy, ctrl = 0
triggerall = var(59) = 1
triggerall = stateno != 2700 
triggerall = stateno != 4500
triggerall = stateno != 2010
triggerall = stateno != 3600
triggerall = stateno != 198
triggerall = stateno != 1170
triggerall = stateno != 4900
triggerall = Prevstateno != 2700 
triggerall = Prevstateno != 4500
triggerall = Prevstateno != 2010
triggerall = Prevstateno != 3600
triggerall = Prevstateno != 198
triggerall = Prevstateno != 1170
triggerall = Prevstateno != 4900
ctrl = 0

[State -1, Tameiki Wari]
type = ChangeState
value = 198
triggerall = var(59) != 0
triggerall = statetype = S
triggerall = power >= 1000
trigger1 = p2bodydist x > 0
trigger1 = p2bodydist y = 0
trigger1 = random < 400
trigger2 = enemy, ctrl = 0
triggerall = var(59) = 1
triggerall = stateno != 2700 
triggerall = stateno != 4500
triggerall = stateno != 2010
triggerall = stateno != 3600
triggerall = stateno != 198
triggerall = stateno != 1170
triggerall = stateno != 4900
triggerall = Prevstateno != 2700 
triggerall = Prevstateno != 4500
triggerall = Prevstateno != 2010
triggerall = Prevstateno != 3600
triggerall = Prevstateno != 198
triggerall = Prevstateno != 1170
triggerall = Prevstateno != 4900
ctrl = 0

[State -1, SCRAMBLE GOU PUNCH]
type = ChangeState
value = 1170
triggerall = var(59) != 0
triggerall = statetype = S
triggerall = power >= 1000
trigger1 = p2bodydist x < 200
trigger1 = p2bodydist y = 0
trigger1 = random < 600
trigger2 = enemy, ctrl = 0
triggerall = var(59) = 1
triggerall = stateno != 2700 
triggerall = stateno != 4500
triggerall = stateno != 2010
triggerall = stateno != 3600
triggerall = stateno != 198
triggerall = stateno != 1170
triggerall = stateno != 4900
triggerall = Prevstateno != 2700 
triggerall = Prevstateno != 4500
triggerall = Prevstateno != 2010
triggerall = Prevstateno != 3600
triggerall = Prevstateno != 198
triggerall = Prevstateno != 1170
triggerall = Prevstateno != 4900
ctrl = 0

[State -1, SHINING GOU SHOCK]
type = ChangeState
value = 4900
triggerall = var(59) != 0
triggerall = statetype = S
triggerall = power >= 1000
trigger1 = p2bodydist x > 0
trigger1 = p2bodydist y = [-150,0]
trigger1 = random < 100
trigger3 = p2bodydist x < 200
trigger3 = p2bodydist y = 0
trigger3 = random < 200
trigger2 = enemy, ctrl = 0
triggerall = var(59) = 1
triggerall = stateno != 2700 
triggerall = stateno != 4500
triggerall = stateno != 2010
triggerall = stateno != 3600
triggerall = stateno != 198
triggerall = stateno != 1170
triggerall = stateno != 4900
triggerall = Prevstateno != 2700 
triggerall = Prevstateno != 4500
triggerall = Prevstateno != 2010
triggerall = Prevstateno != 3600
triggerall = Prevstateno != 198
triggerall = Prevstateno != 1170
triggerall = Prevstateno != 4900
ctrl = 0

;===========================================================================
; AI Agarre
;===========================================================================
;---------------------------------------------------------------------------
;Air Throw
[State -1, Throw]
type = ChangeState
value = 4030
triggerall = var(59) = 1
triggerall = statetype = A
triggerall = ctrl
trigger1 = p2bodydist X = [0,3]
trigger1 = p2statetype = A
trigger1 = p2movetype != H
ctrl = 0

;---------------------------------------------------------------------------
;Air Throw
[State -1, Throw]
type = ChangeState
value = 4000
triggerall = var(59) = 1
triggerall = statetype = S
triggerall = ctrl
trigger1 = p2bodydist X = [0,30]
trigger1 = p2statetype = S
trigger1 = p2movetype != H
ctrl = 0

;===========================================================================
; AI Guard-La proteccion
;===========================================================================
;---------------------------------------------------------------------------
;Guard (ChangeToCrouching)
[State -1, Guard (ChangeToCrouching)]
type = ChangeState
value = 152
triggerall = var(59) = 1
triggerall = stateno = 150
triggerall = p2statetype = C
trigger1 = p2movetype = A
trigger2 = enemy, NumProj != 0

;---------------------------------------------------------------------------
;Guard (ChangeToStanding)
[State -1, Guard (ChangeToStanding)]
type = ChangeState
value = 150
triggerall = var(59) = 1
triggerall = stateno = 152
triggerall = p2statetype = A
trigger1 = p2movetype = A
trigger2 = enemy, NumProj != 0

;---------------------------------------------------------------------------
;Guard (Crouching)
[State -1, Guard (Crouching)]
type = ChangeState
value = 131
triggerall = var(59) = 1
triggerall = (ctrl && statetype != A) || (stateno = 100) || (stateno = 105)
triggerall = p2statetype != A
trigger1 = p2movetype = A
trigger1 = enemy, MoveGuarded = 0
trigger2 = enemy, NumProj != 0
triggerall = ctrl = 1

;;---------------------------------------------------------------------------
;Guard (Standing)
[State -1, Guard (Standing)]
type = ChangeState
value = 130
triggerall = var(59) = 1
triggerall = statetype != A
triggerall = (ctrl && statetype != A) || (stateno = 100) || (stateno = 105)
triggerall = p2statetype != C
trigger1 = p2movetype = A
trigger1 = enemy, MoveGuarded = 0
trigger2 = enemy, NumProj != 0

;;---------------------------------------------------------------------------
;Guard (Air)
[State -1, Guard (Air)]
type = ChangeState
value = 132
triggerall = var(59) = 1
triggerall = statetype = A
triggerall = ctrl
trigger1 = p2movetype = A
trigger1 = enemy, MoveGuarded = 0
trigger2 = enemy, NumProj != 0

;Proteccion-AI---------------------------------------------------------------------------
;Guard Push-S
[State -1, Guard Push (Stand)]
type = ChangeState
value = 160
triggerall = stateno = 150
triggerall = var(59) = 1
trigger1 = statetype = S
trigger1 = random < 600
ignorehitpause = 1

;---------------------------------------------------------------------------
;Guard Push-C
[State -1, Guard Push (Crouch)]
type = ChangeState
value = 161
triggerall = stateno = 152
triggerall = var(59) = 1
trigger1 = statetype = C
trigger1 = random < 600
ignorehitpause = 1

;---------------------------------------------------------------------------
;Guard Push-A
[State -1, Guard Push (Air)]
type = ChangeState
value = 162
triggerall = stateno = 154
triggerall = var(59) = 1
trigger1 = statetype = A
trigger1 = random < 600
ignorehitpause = 1

;---------------------------------------------------------------------------
; Zero/Alpha Counter Z
[State -1]
type = ChangeState
value = 920
triggerall = var(59) = 1
triggerall = power >= 500
triggerall = P2bodydist X <= 130
trigger1 = stateno >= 150
trigger1 = stateno <= 153
trigger1 = random < 100
ctrl = 0

;---------------------------------------------------------------------------
; PT
[State -1]
type = ChangeState
value = 925
triggerall = var(59) = 1
triggerall = power >= 100
triggerAll = enemynear, Movetype = A
triggerall = P2bodydist X <= 80
triggerall = P2bodydist y = [-50,30]
trigger1 = HitShakeOver = 1
trigger1 = stateno = [5000,5120]
trigger1 = random < 50
trigger1 = statetype = S
ctrl = 0

;---------------------------------------------------------------------------
; PT
[State -1]
type = ChangeState
value = 926
triggerall = var(59) = 1
triggerall = power >= 100
triggerAll = enemynear, Movetype = A
triggerall = P2bodydist X <= 80
triggerall = P2bodydist y = [-50,30]
trigger1 = HitShakeOver = 1
trigger1 = stateno = [5000,5120]
trigger1 = random < 50
trigger1 = statetype = A
ctrl = 0

;---------------------------------------------------------------------------
; Zero/Alpha Counter A
[State -1]
type = ChangeState
value = 945
triggerall = var(59) = 1
triggerall = power >= 500
triggerall = P2bodydist X <= 80
trigger1 = stateno >= 150
trigger1 = stateno <= 153
trigger1 = random < 100
ctrl = 0

;---------------------------------------------------------------------------
; Zero/Alpha Counter A
[State -1]
type = ChangeState
value = 945
triggerall = var(59) = 1
triggerall = power >= 500
trigger1 = statetype = S
triggerall = P2bodydist X <= 80
triggerall = P2bodydist y = [-50,30]
trigger1 = stateno = [5000,5070]
trigger1 = random < 50
trigger1 = HitShakeOver = 1
ctrl = 0

;===========================================================================
; AI Combo en tierra
;===========================================================================
;---------------------------------------------------------------------------
;Stand X
[State -1]
type = ChangeState
value = 200
triggerall = var(59) = 1
triggerall = statetype = S
triggerall = stateno != 200
triggerall = stateno != 201
triggerall = stateno != 205
triggerall = stateno != 206
trigger1 = p2dist X < 50
trigger1 = p2dist Y = [-55,10]
;triggerall = random < 100
trigger2 = stateno = 946
trigger3 = stateno = 560
trigger3 = movecontact = 1
trigger2 = movehit = 1
triggerall = stateno != 2700 
triggerall = stateno != 4500
triggerall = stateno != 2010
triggerall = stateno != 3600
triggerall = stateno != 198
triggerall = stateno != 1170
triggerall = stateno != 4900
triggerall = Prevstateno != 2700 
triggerall = Prevstateno != 4500
triggerall = Prevstateno != 2010
triggerall = Prevstateno != 3600
triggerall = Prevstateno != 198
triggerall = Prevstateno != 1170
triggerall = Prevstateno != 4900
triggerall = stateno = 4000

;---------------------------------------------------------------------------
;Stand Y
[State -1]
type = ChangeState
value = 201
triggerall = var(59) = 1
triggerall = statetype = S
triggerall = stateno != 201
triggerall = stateno != 205
triggerall = stateno != 206
trigger1 = movecontact = 1
trigger1 = stateno = 200

;---------------------------------------------------------------------------
;Stand A
[State -1]
type = ChangeState
value = 204
triggerall = var(59) = 1
triggerall = statetype = S
triggerall = stateno != 204
trigger1 = movecontact = 1
trigger1 = stateno = 404

;---------------------------------------------------------------------------
;Stand B
[State -1]
type = ChangeState
value = 205
triggerall = var(59) = 1
triggerall = statetype = S
triggerall = stateno != 200
triggerall = stateno != 205
triggerall = stateno != 206
trigger1 = movecontact = 1
trigger1 = stateno = 201

;---------------------------------------------------------------------------
;Stand C
[State -1]
type = ChangeState
value = 206
triggerall = var(59) = 1
triggerall = statetype = S
trigger1 = movecontact = 1
trigger1 = stateno = 205
triggerall = stateno != 206
triggerall = stateno != 200
triggerall = stateno != 201

;---------------------------------------------------------------------------
;Crouch X
[State -1]
type = ChangeState
value = 400
triggerall = var(59) = 1
triggerall = statetype = C
trigger1 = movecontact = 1
trigger1 = stateno = 405
triggerall = stateno != 400

;---------------------------------------------------------------------------
;Crouch Y
[State -1]
type = ChangeState
value = 401
triggerall = var(59) = 1
triggerall = statetype = C
trigger1 = movecontact = 1
trigger1 = stateno = 400
triggerall = stateno != 401

;---------------------------------------------------------------------------
;Crouch Z
[State -1]
type = ChangeState
value = 402
triggerall = var(59) = 1
trigger1 = movecontact = 1
triggerall = stateno != 402
trigger1 = stateno = 206
trigger1 = p2dist X < 50
trigger1 = p2dist Y = [-55,10]
triggerall = stateno != 2700 
triggerall = stateno != 4500
triggerall = stateno != 2010
triggerall = stateno != 3600
triggerall = stateno != 198
triggerall = stateno != 1170
triggerall = stateno != 4900
triggerall = Prevstateno != 2700 
triggerall = Prevstateno != 4500
triggerall = Prevstateno != 2010
triggerall = Prevstateno != 3600
triggerall = Prevstateno != 198
triggerall = Prevstateno != 1170
triggerall = Prevstateno != 490
triggerall = stateno != 4000

;---------------------------------------------------------------------------
;Crouch A
[State -1]
type = ChangeState
value = 404
triggerall = var(59) = 1
triggerall = statetype = C
triggerall = movecontact = 1
triggerall = stateno != 404
trigger1 = p2dist X < 110
trigger1 = p2dist Y = [-20,0]

;---------------------------------------------------------------------------
;Crouch B
[State -1]
type = ChangeState
value = 405
triggerall = var(59) = 1
triggerall = statetype = C
trigger1 = movecontact = 1
trigger1 = stateno = 206
triggerall = stateno != 405
trigger1 = p2dist X > 51
trigger1 = p2dist Y = [-55,10]
triggerall = stateno != 2700 
triggerall = stateno != 4500
triggerall = stateno != 2010
triggerall = stateno != 3600
triggerall = stateno != 198
triggerall = stateno != 1170
triggerall = stateno != 4900
triggerall = Prevstateno != 2700 
triggerall = Prevstateno != 4500
triggerall = Prevstateno != 2010
triggerall = Prevstateno != 3600
triggerall = Prevstateno != 198
triggerall = Prevstateno != 1170
triggerall = Prevstateno != 490
triggerall = stateno != 4000

;---------------------------------------------------------------------------
;Crouch C
[State -1]
type = ChangeState
value = 406
triggerall = var(59) = 1
triggerall = statetype = C
trigger1 = movecontact = 1
trigger1 = stateno = 401
triggerall = stateno != 406

;---------------------------------------------------------------------------
;
[State -1, ??]
type = ChangeState
value = 3021
triggerall = stateno != 500
trigger1 = stateno = 550  
trigger1 = movecontact
trigger1 = var(59) = 1

;---------------------------------------------------------------------------
;
[State -1, ??]
type = ChangeState
value = 500
triggerall = stateno != 550
trigger1 = stateno = 206
triggerall = stateno != 500
trigger1 = movecontact
trigger1 = var(59) = 1
ctrl = 0

;---------------------------------------------------------------------------
;
[State -1, ??]
type = ChangeState
value = 550
triggerall = stateno != 550
trigger1 = (stateno = 404)  || (stateno = 500)
trigger1 = movecontact
trigger1 = var(59) = 1

;---------------------------------------------------------------------------
;
[State -1, ??]
type = ChangeState
value = 560
triggerall = stateno = 100
trigger1 = movecontact
trigger1 = var(59) = 1
triggerall = P2BodyDist X < 100

;===========================================================================
; AI Aerial Rave
;===========================================================================
;Super Jump
[State -1, Jump]
type = ChangeState
value = 60
triggerall = var(59) = 1
trigger1 = StateNo = 402
trigger1 = AnimElem >= 1 
trigger1 = AnimElem <= 3
trigger1 = Movecontact

;===========================================================================
;Super Jump
[State -1, Jump]
type = ChangeState
value = 50
triggerall = var(59) = 1
trigger1 = StateNo = 402
trigger1 = AnimElem >= 4 
trigger1 = AnimElem <= 16
trigger1 = Movecontact

;---------------------------------------------------------------------------
;Jump Forwards
;[State 110, 3]
;type = VelSet 
;triggerall = var(59) = 1
;trigger1 = StateNo = 61
;x = 3

;---------------------------------------------------------------------------
;Jump Light Punch
[State -1, Jump Light Punch]
type = ChangeState
value = 600
triggerall = var(59) = 1
triggerall = P2BodyDist X = [0,50]
triggerall = P2BodyDist Y = [-50,30]
triggerall = Pos Y = [-70,-500]
trigger1 = statetype = A
trigger1 = ctrl
trigger1 = stateno = 61
trigger2 = stateno = 61
trigger3 = stateno = 50
trigger2 = statetype = A
trigger3 = statetype = A
ctrl = 0

;---------------------------------------------------------------------------
;Jump Punch
[State -1, Jump Punch]
type = ChangeState
value = 601
triggerall = var(59) = 1
triggerall = movecontact
trigger1 = stateno = 600
trigger2 = stateno = 604
trigger3 = stateno = 704

;---------------------------------------------------------------------------
;Jump Medium Punch
[State -1, Jump Medium Punch]
type = ChangeState
value = 705
triggerall = var(59) = 1
trigger1 = movecontact
trigger1 = stateno = 601
trigger1 = vel x = 0

;---------------------------------------------------------------------------
;Jump Medium Punch
[State -1, Jump Medium Punch]
type = ChangeState
value = 706
triggerall = var(59) = 1
trigger1 = movecontact
trigger1 = stateno = 705
trigger1 = vel x = 0

;---------------------------------------------------------------------------
;Jump Medium Punch
[State -1, Jump Medium Punch]
type = ChangeState
value = 605
triggerall = var(59) = 1
trigger1 = movecontact
trigger1 = stateno = 601
trigger1 = vel x > 0

;---------------------------------------------------------------------------
;Jump Medium Punch
[State -1, Jump Medium Punch]
type = ChangeState
value = 606
triggerall = var(59) = 1
trigger1 = movecontact
trigger1 = stateno = 705
trigger1 = vel x > 0

;---------------------------------------------------------------------------
;Jump Light Kick
[State -1, Jump Light Kick]
type = ChangeState
value = 604
triggerall = var(59) = 1
trigger1 = P2BodyDist X = [0,50]
trigger1 = P2BodyDist Y = [-50,30]
triggerall = Pos Y = [-51,-500]
trigger1 = statetype = A
triggerall = Vel x > 0
triggerall = stateno != 604

;---------------------------------------------------------------------------
[State -1, Jump Light Punch]
type = ChangeState
value = 704
triggerall = var(59) = 1
triggerall = P2BodyDist X = [0,50]
triggerall = P2BodyDist Y = [-50,30]
triggerall = statetype = A
trigger1 = ctrl
trigger1 = stateno = 61
trigger2 = stateno = 61
trigger3 = stateno = 50
triggerall = Vel x = 0

;---------------------------------------------------------------------------
;Jump Strong Kick
[State -1, Jump Strong Kick]
type = ChangeState
value = 602
triggerall = var(59) = 1
trigger1 = movecontact
trigger1 = stateno = 601

;===========================================================================
; AI Special Moves
;===========================================================================
;---------------------------------------------------------------------------
;Adoken
[State -1, MS]
type = ChangeState
value = 1002
triggerall = var(59) = 1
triggerall = statetype != A
triggerall = NumProj = 0
trigger1 = ctrl
trigger1 = p2dist X > 200
trigger1 = p2dist Y = [-50,0]
;trigger2 = (stateno = [200,201])  || (stateno = [204,206])
trigger1 = random < 500

;---------------------------------------------------------------------------
;Adoken
[State -1,Adoken ]
type = ChangeState
value = 1302
triggerall = var(59) = 1
triggerall = numproj = 0
triggerall = statetype = A
triggerall = Pos Y = [-280,-130]
trigger1 = ctrl
trigger1 = p2dist X > 160
trigger1 = p2dist Y = [-130,-100]
trigger2 = stateno = 600
trigger2 = movecontact = 0

;---------------------------------------------------------------------------
;GOU SHO RYU
[State -1, GOU SHO RYU]
type = ChangeState
value = 1120
triggerall = var(59) = 1
triggerall = statetype = S
trigger1 = ctrl
triggerall = p2dist X < 81
triggerall = p2dist Y = [-130,80]
trigger1 = (stateno = [200,201])  || (stateno = [204,206])
trigger1 = random < 400
trigger2 = Stateno = 0
Trigger2 = PrevStateNo = [3020,3022]

;---------------------------------------------------------------------------
;TENMA GOU KUU JIN KYAKU
[State -1, TENMA GOU KUU JIN KYAKU]
type = ChangeState
value = 850
triggerall = var(59) = 1
triggerall = statetype = A
trigger1 = ctrl
trigger1 = ctrl = 1 &&  (stateno = 50) || (stateno = 61)
trigger1 = P2bodydist X = [40,80]
trigger1 = P2Bodydist Y = [40,100]
trigger1 = p2movetype != A && random <= 200
trigger2 = ctrl = 1 && (stateno = 50) || (stateno = 61)
trigger2 = P2bodydist X = [30,70]
trigger2 = P2Bodydist Y = [30,90]
trigger2 = p2movetype != A && random <= 200
trigger3 = ctrl = 1 && (stateno = 50) || (stateno = 61)
trigger3 = P2bodydist X = [20,60]
trigger3 = P2Bodydist Y = [20,80]
trigger3 = p2movetype != A && random <= 200
trigger4 = ctrl = 1 &&  (stateno = 50) || (stateno = 61)
trigger4 = P2bodydist X = [10,50]
trigger4 = P2Bodydist Y = [10,70]
trigger4 = p2movetype != A && random <= 200
trigger5 = ctrl = 1 &&  (stateno = 50) || (stateno = 61)
trigger5 = P2bodydist X = [50,90]
trigger5 = P2Bodydist Y = [50,110]
trigger5 = p2movetype != A && random <= 200
trigger6 = ctrl = 1 &&  (stateno = 50) || (stateno = 61)
trigger6 = P2bodydist X = [60,100]
trigger6 = P2Bodydist Y = [60,120]
trigger7 = stateno = 706
trigger7 = movecontact = 1
trigger8 = stateno = 600
trigger8 = movecontact = 0
trigger8 = P2bodydist X = [60,100]
trigger8 = P2Bodydist Y = [60,120]
trigger8 = Vel x > 0
trigger8 = Pos Y = [-280,-120]

;---------------------------------------------------------------------------
;TATSU MAKI ZANKUU KYAKU
[State -1, TATSU MAKI ZANKUU KYAKU]
type = ChangeState
value = 3020
triggerall = var(59) = 1
trigger1 = statetype = S
trigger1 = ctrl
trigger1 = p2dist X < 100
trigger1 = p2dist Y = [-100,30]
trigger1 = (stateno = 400)  || (stateno = 205)

;---------------------------------------------------------------------------
;TATSU MAKI ZANKUU KYAKU
[State -1, TATSU MAKI ZANKUU KYAKU]
type = ChangeState
value = 3050
triggerall = var(59) = 1
triggerall = statetype = A
trigger1 = ctrl
triggerall = p2dist X < 70
triggerall = p2dist Y = [-100,30]
trigger1 = (stateno = 601)  || (stateno = 705)
trigger1 = random < 400
trigger1 = movecontact = 1

;===========================================================================
; AI Normal Moves
;===========================================================================
;---------------------------------------------------------------------------
;Crouching Light Kick
[State -1, Crouching Light Kick]
type = ChangeState
value = 404
triggerall = var(59) = 1
triggerall = (abs(var(58)) != 404)|| (Random < 100)
triggerall = (var(58) != [200,499]) || (Random < 200)
triggerall = (var(58) != [1000,3999]) || (Random < 300)
triggerall = (ctrl && statetype != A) || (stateno = 100) || (stateno = 105)
trigger1 = (p2statetype = C && Random < 333) || (p2statetype = S && Random < 667)
trigger1 = p2bodydist x = [0,31]
trigger1 = enemy, pos y = 0

;---------------------------------------------------------------------------
;Crouching Medium Kick
[State -1, Crouching Medium Kick]
type = ChangeState
value = 405
triggerall = var(59) = 1
triggerall = (abs(var(58)) != 405)|| (Random < 100)
triggerall = (var(58) != [200,499]) || (Random < 200)
triggerall = (var(58) != [1000,3999]) || (Random < 300)
triggerall = (ctrl && statetype != A) || (stateno = 100) || (stateno = 105)
trigger1 = (p2statetype = C && Random < 333) || (p2statetype = S && Random < 667)
trigger1 = p2bodydist x = [0,33]
trigger1 = enemy, pos y = 0

;---------------------------------------------------------------------------
;Crouching Strong Kick
[State -1, Crouching Strong Kick]
type = ChangeState
value = 406
triggerall = var(59) = 1
triggerall = (abs(var(58)) != 406)|| (Random < 100)
triggerall = (var(58) != [200,499]) || (Random < 200)
triggerall = (var(58) != [1000,3999]) || (Random < 300)
triggerall = (ctrl && statetype != A) || (stateno = 100) || (stateno = 105)
trigger1 = (p2statetype = C && Random < 333) || (p2statetype = S && Random < 667)
trigger1 = p2bodydist x = [0,40]
trigger1 = enemy, pos y = 0

;---------------------------------------------------------------------------
;Crouching Light Punch
[State -1, Crouching Light Punch]
type = ChangeState
value = 400
triggerall = var(59) = 1
triggerall = (abs(var(58)) != 400)|| (Random < 100)
triggerall = (var(58) != [200,499]) || (Random < 200)
triggerall = (var(58) != [1000,3999]) || (Random < 300)
triggerall = (ctrl && statetype != A) || (stateno = 100) || (stateno = 105)
trigger1 = (p2statetype = C && Random < 333) || (p2statetype = S && Random < 667)
trigger1 = p2bodydist x = [0,30]
trigger1 = enemy, pos y = 0

;---------------------------------------------------------------------------
;Crouching Medium Punch
[State -1, Crouching Medium Punch]
type = ChangeState
value = 401
triggerall = var(59) = 1
triggerall = (abs(var(58)) != 401)|| (Random < 100)
triggerall = (var(58) != [200,499]) || (Random < 200)
triggerall = (var(58) != [1000,3999]) || (Random < 300)
triggerall = (ctrl && statetype != A) || (stateno = 100) || (stateno = 105)
trigger1 = (p2statetype = C && Random < 333) || (p2statetype = S && Random < 667)
trigger1 = p2bodydist x = [0,32]
trigger1 = enemy, pos y = 0

;---------------------------------------------------------------------------
;Crouching Strong Punch
[State -1, Crouching Strong Punch]
type = ChangeState
value = 402
triggerall = var(59) = 1
triggerall = (abs(var(58)) != 402)|| (Random < 100)
triggerall = (var(58) != [200,499]) || (Random < 200)
triggerall = (var(58) != [1000,3999]) || (Random < 300)
triggerall = (ctrl && statetype != A) || (stateno = 100) || (stateno = 105)
trigger1 = (p2statetype = C && Random < 333) || (p2statetype = S && Random < 667)
trigger1 = p2bodydist x = [0,20]
trigger1 = enemy, pos y = [-250,0]

;---------------------------------------------------------------------------
;Stand Light Punch
[State -1, Stand Light Punch]
type = ChangeState
value = 200
triggerall = var(59) = 1
triggerall = (abs(var(58)) != 200)|| (Random < 100)
triggerall = (var(58) != [200,499]) || (Random < 200)
triggerall = (var(58) != [1000,3999]) || (Random < 300)
triggerall = (ctrl && statetype != A) || (stateno = 100) || (stateno = 105)
trigger1 = (p2statetype = C && Random < 667) || (p2statetype = S && Random < 333)
trigger1 = p2bodydist x = [0,50]
trigger1 = enemy, pos y = [-30,0]

;---------------------------------------------------------------------------
;Stand Medium Punch
[State -1, Stand Medium Punch]
type = ChangeState
value = 201
triggerall = var(59) = 1
triggerall = (abs(var(58)) != 201)|| (Random < 100)
triggerall = (var(58) != [200,499]) || (Random < 200)
triggerall = (var(58) != [1000,3999]) || (Random < 300)
triggerall = (ctrl && statetype != A) || (stateno = 100) || (stateno = 105)
trigger1 = (p2statetype = C && Random < 667) || (p2statetype = S && Random < 333)
trigger1 = p2bodydist x = [0,70]
trigger1 = enemy, pos y = [-30,0]

;---------------------------------------------------------------------------
;Stand Buster
[State -1, Stand Buster]
type = ChangeState
value = 667
triggerall = var(59) = 1
triggerall = statetype = S
triggerall = stateno != 970
triggerall = (abs(var(58)) != 667)|| (Random < 100)
triggerall = (var(58) != [200,499]) || (Random < 200)
triggerall = (var(58) != [1000,3999]) || (Random < 300)
triggerall = (ctrl && statetype != A) || (stateno = 100) || (stateno = 105)
trigger1 = (p2statetype = C && Random < 667) || (p2statetype = S && Random < 400)
trigger1 = p2bodydist x = [0,2260]
trigger1 = enemy, pos y = [-200,0]
trigger2 = var(29) < 300
trigger2 = var(29) > 100

;---------------------------------------------------------------------------
;Stand Light Kick
[State -1, Stand Light Kick]
type = ChangeState
value = 204
triggerall = var(59) = 1
triggerall = (abs(var(58)) != 204)|| (Random < 100)
triggerall = (var(58) != [200,499]) || (Random < 200)
triggerall = (var(58) != [1000,3999]) || (Random < 300)
triggerall = (ctrl && statetype != A) || (stateno = 100) || (stateno = 105)
trigger1 = (p2statetype = C && Random < 667) || (p2statetype = S && Random < 333)
trigger1 = p2bodydist x = [0,70]
trigger1 = enemy, pos y = [-30,0]

;---------------------------------------------------------------------------
;Standing Medium Kick
[State -1, Standing Medium Kick]
type = ChangeState
value = 205
triggerall = var(59) = 1
triggerall = (abs(var(58)) != 205)|| (Random < 100)
triggerall = (var(58) != [200,499]) || (Random < 200)
triggerall = (var(58) != [1000,3999]) || (Random < 300)
triggerall = (ctrl && statetype != A) || (stateno = 100) || (stateno = 105)
trigger1 = (p2statetype = C && Random < 667) || (p2statetype = S && Random < 333)
trigger1 = p2bodydist x = [0,70]
trigger1 = enemy, pos y = [-30,0]

;---------------------------------------------------------------------------
;Standing Strong Kick
[State -1, Standing Strong Kick]
type = ChangeState
value = 206
triggerall = var(59) = 1
triggerall = (abs(var(58)) != 206)|| (Random < 100)
triggerall = (var(58) != [200,499]) || (Random < 200)
triggerall = (var(58) != [1000,3999]) || (Random < 300)
triggerall = (ctrl && statetype != A) || (stateno = 100) || (stateno = 105)
trigger1 = (p2statetype = C && Random < 667) || (p2statetype = S && Random < 333)
trigger1 = p2bodydist x = [0,70]
trigger1 = enemy, pos y = [-30,0]

;---------------------------------------------------------------------------
;Jump Light Punch
[State -1, Jump Light Punch]
type = ChangeState
value = 600
triggerall = var(59) = 1
triggerall = statetype = A
triggerall = ctrl
triggerall = stateno != 600
trigger1 = p2bodydist x = [0,30]
trigger1 = p2bodydist y = [-50,20]

;---------------------------------------------------------------------------
;Jump Medium Punch
[State -1, Jump Medium Punch]
type = ChangeState
value = 601
triggerall = var(59) = 1
triggerall = statetype = A
triggerall = ctrl
trigger1 = p2bodydist x = [0,32]
trigger1 = p2bodydist y = [-50,20]

;---------------------------------------------------------------------------
;
[State -1, buster air]
type = ChangeState
value = 602
triggerall = var(59) = 1
triggerall = statetype = A
triggerall = ctrl
trigger1 = p2bodydist x = [0,34]
trigger1 = p2bodydist y = [-50,20]

;---------------------------------------------------------------------------
;Jump Light Kick
[State -1, Jump Light Kick]
type = ChangeState
value = 603
triggerall = var(59) = 1
triggerall = statetype = A
triggerall = ctrl
trigger1 = p2bodydist x = [0,31]
trigger1 = p2bodydist y = [-50,20]

;---------------------------------------------------------------------------
;Jump Medium Kick
[State -1, Jump Medium Kick]
type = ChangeState
value = 604
triggerall = var(59) = 1
triggerall = statetype = A
triggerall = ctrl
trigger1 = p2bodydist x = [0,33]
triggerall = stateno != 604
trigger1 = p2bodydist y = [-50,20]
triggerall = Vel x > 0

;---------------------------------------------------------------------------
;Jump Medium Kick
[State -1, Jump Medium Kick]
type = ChangeState
value = 704
triggerall = var(59) = 1
triggerall = statetype = A
triggerall = ctrl
trigger1 = p2bodydist x = [0,33]
triggerall = stateno != 604
trigger1 = p2bodydist y = [-50,20]
triggerall = Vel x = 0

;---------------------------------------------------------------------------
;Jump Strong Kick Up
[State -1, Jump Strong Kick]
type = ChangeState
value = 800
triggerall = var(59) = 1
triggerall = statetype = A
triggerall = ctrl
trigger1 = p2bodydist x = [0,38]
trigger1 = p2bodydist y = [-50,20]

;---------------------------------------------------------------------------
;Jump Strong Kick
[State -1, Jump Strong Kick]
type = ChangeState
value = 605
triggerall = var(59) = 1
triggerall = statetype = A
triggerall = ctrl
trigger1 = p2bodydist x = [0,36]
trigger1 = p2bodydist y = [-50,20]
triggerall = Vel x > 0

;---------------------------------------------------------------------------
;Jump Strong Kick
[State -1, Jump Strong Kick]
type = ChangeState
value = 705
triggerall = var(59) = 1
triggerall = statetype = A
triggerall = ctrl
trigger1 = p2bodydist x = [0,36]
trigger1 = p2bodydist y = [-50,20]
triggerall = Vel x = 0

;===========================================================================
; AI Misc
;===========================================================================
;---------------------------------------------------------------------------
; Jump
[State -1, Jump]
type = ChangeState
value = 40
triggerall = var(59) = 1
triggerall = statetype != A
trigger1 = ctrl
trigger1 = random < 50

;---------------------------------------------------------------------------
;Super Jump
[State -1, Super Jump]
type = ChangeState
value = 60
triggerall = var(59) = 1
triggerall = statetype != A
trigger1 = ctrl
trigger1 = p2bodydist x > 120
trigger1 = random < 80

;---------------------------------------------------------------------------
;Run Fwd
[State -1, Run Fwd]
type = ChangeState
value = 100
triggerall = var(59) = 1
triggerall = statetype != A
trigger1 = ctrl
trigger1 = stateno != 100
trigger1 = stateno != 105
trigger1 = Random < 50

;---------------------------------------------------------------------------
;Run Back
[State -1, Run Back]
type = ChangeState
value = 105
triggerall = var(59) = 1
triggerall = statetype = S
trigger1 = ctrl
trigger1 = stateno != 100
trigger1 = stateno != 105
trigger1 = Random < 20

;---------------------------------------------------------------------------
[State -1, cpu warp counter close range]
type = changestate
value = 970
triggerall = Var(59) = 1
triggerall = statetype != A
triggerall = ctrl
triggerall = P2BodyDist X = [20,100]
trigger1 = random <= 50
trigger1 = p2movetype = A
trigger3 = stateno = 667 && random <= 50
trigger4 = enemy, Numproj > 0 && random <= 100
trigger2 = (P2name = "Evil Ryu") || (P2name = "Evil Ken")
trigger2 = Random < 100

[State -1, cpu warp counter far range]
type = changestate
value = 960
triggerall = Var(59) = 1
triggerall = statetype != A
triggerall = ctrl
triggerall = P2BodyDist X > 0
trigger1 = p2movetype = A
trigger1 = random <= 50
trigger2 = prevstateno = 667 && random <= 50
trigger3 = enemy, Numproj > 0 && random <= 10

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

;===========================================================================
; NO AI Commands
;===========================================================================
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; THUNDER GOU SHOWER
[State -1]
type = ChangeState
value = 2700
triggerall = var(59) = 0
triggerall = command = "QCF2_z"
triggerall = power >= 1000
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 600
trigger3 = movecontact = 1
trigger3 = stateno = 601
trigger4 = movecontact = 1
trigger4 = stateno = 602
trigger5 = movecontact = 1
trigger5 = stateno = 604
trigger6 = movecontact = 1
trigger6 = stateno = 605
trigger7 = movecontact = 1
trigger7 = stateno = 606
trigger8 = movecontact = 1
trigger8 = stateno = 704
trigger9 = movecontact = 1
trigger9 = stateno = 705
trigger10 = stateno = 1350
trigger10 = time >= 39
trigger11 = stateno = 1360
trigger11 = time >= 39
trigger12 = stateno = 1370
trigger12 = time >= 39
trigger13 = stateno = 2500
trigger13 = time >= 131
trigger14 = stateno = 2600
trigger14 = time >= 131
trigger15 = stateno = 2700
trigger15 = time >= 131
trigger16 = movecontact = 1
trigger16 = stateno = 706
trigger17 = stateno = 550
trigger18 = stateno = 800
trigger19 = movecontact = 1
trigger19 = stateno = 850
trigger20 = movecontact = 1
trigger20 = stateno = 3030
trigger21 = movecontact = 1
trigger21 = stateno = 3040
trigger22 = movecontact = 1
trigger22 = stateno = 3050
trigger23 = projcontact = 1
trigger23 = stateno = 1350
trigger24 = projcontact = 1
trigger24 = stateno = 1360
trigger25 = projcontact = 1
trigger25 = stateno = 1370
trigger26 = projcontact = 1
trigger26 = stateno = 1300
trigger27 = projcontact = 1
trigger27 = stateno = 1301
trigger28 = projcontact = 1
trigger28 = stateno = 1302
trigger29 = movecontact = 1
trigger29 = stateno = 3520

;===========================================================================
;---------------------------------------------------------------------------
; HIGH MEGA GOU BEAM
[State -1]
type = ChangeState
value = 2010
triggerall = var(59) = 0
triggerall = command = "QCB2_y"
triggerall = power >= 1000 
triggerall = stateno !=  [4900,4952]
triggerall = statetype != A
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 200
trigger3 = movecontact = 1
trigger3 = stateno = 201
trigger4 = movecontact = 1
trigger4 = stateno = 202
trigger5 = movecontact = 1
trigger5 = stateno = 203
trigger6 = movecontact = 1
trigger6 = stateno = 204
trigger7 = movecontact = 1
trigger7 = stateno = 205
trigger8 = movecontact = 1
trigger8 = stateno = 206
trigger9 = movecontact = 1
trigger9 = stateno = 400
trigger10 = movecontact = 1
trigger10 = stateno = 401
trigger11 = movecontact = 1
trigger11 = stateno = 402
trigger12 = movecontact = 1
trigger12 = stateno = 403
trigger13 = movecontact = 1
trigger13 = stateno = 404
trigger14 = movecontact = 1
trigger14 = stateno = 405
trigger15 = movecontact = 1
trigger15 = stateno = 406
trigger16 = movecontact = 1
trigger16 = stateno = 301
trigger17 = movecontact = 1
trigger17 = stateno = 302
trigger18 = movecontact = 1
trigger18 = stateno = 304
trigger19 = movecontact = 1
trigger19 = stateno = 305
trigger20 = stateno = 100
trigger21 = statetype = C
trigger21 = ctrl = 1
trigger22 = movecontact = 1
trigger22 = stateno = 306
trigger23 = movecontact = 1
trigger23 = stateno = 500
trigger24 = movecontact = 1
trigger24 = stateno = 550
trigger25 = movecontact = 1
trigger25 = stateno = 1100
trigger26 = movecontact = 1
trigger26 = stateno = 1110
trigger27 = movecontact = 1
trigger27 = stateno = 1120
trigger28 = movecontact = 1
trigger28 = stateno = 1050
trigger29 = movecontact = 1
trigger29 = stateno = 1060
trigger30 = movecontact = 1
trigger30 = stateno = 1070
trigger31 = projcontact = 1
trigger31 = stateno = 3000
trigger32 = projcontact = 1
trigger32 = stateno = 3010
trigger33 = projcontact = 1
trigger33 = stateno = 3020
trigger34 = projcontact = 1
trigger34 = stateno = 1010
trigger35 = projcontact = 1
trigger35 = stateno = 1011
trigger36 = projcontact = 1
trigger36 = stateno = 1012
trigger37 = projcontact = 1
trigger37 = stateno = 1000
trigger38 = projcontact = 1
trigger38 = stateno = 1001
trigger39 = projcontact = 1
trigger39 = stateno = 1002
trigger40 = movecontact = 1
trigger40 = stateno = 900
trigger41 = movecontact = 1
trigger41 = stateno = 910
trigger42 = movecontact = 1
trigger42 = stateno = 920
trigger43 = movecontact = 1
trigger43 = stateno = 945
trigger44 = stateno = 950
trigger45 = stateno = 951
trigger46 = stateno = 952

;---------------------------------------------------------------------------
; HIGH MEGA GOU BEAM-AIRE
[State -1]
type = ChangeState
value = 3600
triggerall = var(59) = 0
triggerall = command = "QCB2_y"
triggerall = power >= 1000 
triggerall = stateno !=  [4900,4952]
triggerall = statetype != S
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 600
trigger3 = movecontact = 1
trigger3 = stateno = 601
trigger4 = movecontact = 1
trigger4 = stateno = 602
trigger5 = movecontact = 1
trigger5 = stateno = 604
trigger6 = movecontact = 1
trigger6 = stateno = 605
trigger7 = movecontact = 1
trigger7 = stateno = 606
trigger8 = movecontact = 1
trigger8 = stateno = 704
trigger9 = movecontact = 1
trigger9 = stateno = 705
trigger10 = movecontact = 1
trigger10 = stateno = 706
trigger11 = movecontact = 1
trigger11 = stateno = 800
trigger12 = movecontact = 1
trigger12 = stateno = 3030
trigger13 = movecontact = 1
trigger13 = stateno = 3040
trigger14 = movecontact = 1
trigger14 = stateno = 3050
trigger15 = movecontact = 1
trigger15 = stateno = [3000,3002]
trigger16 = movecontact = 1
trigger16 = stateno = [3010,3012]
trigger17 = movecontact = 1
trigger17 = stateno = [3020,3022]
trigger18 = movecontact = 1
trigger18 = stateno = [1100,1102]
trigger19 = movecontact = 1
trigger19 = stateno = [1110,1112]
trigger22 = movecontact = 1
trigger22 = stateno = [1120,1122]
trigger23 = movecontact = 1
trigger23 = stateno = 560
trigger24 = movecontact = 1
trigger24 = stateno = 550
trigger25 = movecontact = 1
trigger25 = stateno = 850
trigger26 = movecontact = 1
trigger26 = stateno = 1121

;---------------------------------------------------------------------------
; Asura Senkuu Forward X
[State -1]
type = ChangeState
value = 960
triggerall = var(59) = 0
triggerall = command = "asuraf_x"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = statetype = C
trigger2 = ctrl = 1
trigger3 = stateno = 100
trigger4 = stateno = 950
trigger5 = stateno = 951
trigger6 = stateno = 952

;---------------------------------------------------------------------------
; Asura Senkuu Forward Y
[State -1]
type = ChangeState
value = 960
triggerall = command = "asuraf_y"
triggerall = var(59) = 0
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = statetype = C
trigger2 = ctrl = 1
trigger3 = stateno = 100
trigger4 = stateno = 950
trigger5 = stateno = 951
trigger6 = stateno = 952

;---------------------------------------------------------------------------
; Asura Senkuu Forward Z
[State -1]
type = ChangeState
value = 960
triggerall = command = "asuraf_z"
triggerall = var(59) = 0
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = statetype = C
trigger2 = ctrl = 1
trigger3 = stateno = 100
trigger4 = stateno = 950
trigger5 = stateno = 951
trigger6 = stateno = 952

;---------------------------------------------------------------------------
; Asura Senkuu Forward A
[State -1]
type = ChangeState
value = 970
triggerall = command = "asuraf_a"
triggerall = var(59) = 0
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = statetype = C
trigger2 = ctrl = 1
trigger3 = stateno = 100
trigger4 = stateno = 950
trigger5 = stateno = 951
trigger6 = stateno = 952

;---------------------------------------------------------------------------
; Asura Senkuu Forward B
[State -1]
type = ChangeState
value = 970
triggerall = command = "asuraf_b"
triggerall = var(59) = 0
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = statetype = C
trigger2 = ctrl = 1
trigger3 = stateno = 100
trigger4 = stateno = 950
trigger5 = stateno = 951
trigger6 = stateno = 952

;---------------------------------------------------------------------------
; Asura Senkuu Forward C
[State -1]
type = ChangeState
value = 970
triggerall = command = "asuraf_c"
triggerall = var(59) = 0
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = statetype = C
trigger2 = ctrl = 1
trigger3 = stateno = 100
trigger4 = stateno = 950
trigger5 = stateno = 951
trigger6 = stateno = 952

;===========================================================================
;---------------------------------------------------------------------------
; Asura Senkuu Backward X
[State -1]
type = ChangeState
value = 980
triggerall = command = "asurab_x"
triggerall = var(59) = 0
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = statetype = C
trigger2 = ctrl = 1
trigger3 = stateno = 100

;---------------------------------------------------------------------------
; Asura Senkuu Backward Y
[State -1]
type = ChangeState
value = 980
triggerall = command = "asurab_y"
triggerall = var(59) = 0
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = statetype = C
trigger2 = ctrl = 1
trigger3 = stateno = 100

;---------------------------------------------------------------------------
; Asura Senkuu Backward Z
[State -1]
type = ChangeState
value = 980
triggerall = command = "asurab_z"
triggerall = var(59) = 0
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = statetype = C
trigger2 = ctrl = 1
trigger3 = stateno = 100

;---------------------------------------------------------------------------
; Asura Senkuu Backward A
[State -1]
type = ChangeState
value = 990
triggerall = command = "asurab_a"
triggerall = var(59) = 0
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = statetype = C
trigger2 = ctrl = 1
trigger3 = stateno = 100

;---------------------------------------------------------------------------
; Asura Senkuu Backward B
[State -1]
type = ChangeState
value = 990
triggerall = command = "asurab_b"
triggerall = var(59) = 0
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = statetype = C
trigger2 = ctrl = 1
trigger3 = stateno = 100

;---------------------------------------------------------------------------
; Asura Senkuu Backward C
[State -1]
type = ChangeState
value = 990
triggerall = command = "asurab_c"
triggerall = var(59) = 0
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = statetype = C
trigger2 = ctrl = 1
trigger3 = stateno = 100

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; SCRAMBLE GOU PUNCH
[State -1]
type = ChangeState
value = 1170
triggerall = command = "QCF2_z"
triggerall = var(59) = 0
triggerall = power >= 1000
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 200
trigger3 = movecontact = 1
trigger3 = stateno = 201
trigger4 = movecontact = 1
trigger4 = stateno = 202
trigger5 = movecontact = 1
trigger5 = stateno = 203
trigger6 = movecontact = 1
trigger6 = stateno = 204
trigger7 = movecontact = 1
trigger7 = stateno = 205
trigger8 = movecontact = 1
trigger8 = stateno = 206
trigger9 = movecontact = 1
trigger9 = stateno = 400
trigger10 = movecontact = 1
trigger10 = stateno = 401
trigger11 = movecontact = 1
trigger11 = stateno = 402
trigger12 = movecontact = 1
trigger12 = stateno = 403
trigger13 = movecontact = 1
trigger13 = stateno = 404
trigger14 = movecontact = 1
trigger14 = stateno = 405
trigger15 = movecontact = 1
trigger15 = stateno = 406
trigger16 = movecontact = 1
trigger16 = stateno = 301
trigger17 = movecontact = 1
trigger17 = stateno = 302
trigger18 = movecontact = 1
trigger18 = stateno = 304
trigger19 = movecontact = 1
trigger19 = stateno = 305
trigger20 = stateno = 100
trigger21 = statetype = C
trigger21 = ctrl = 1
trigger22 = movecontact = 1
trigger22 = stateno = 306
trigger23 = movecontact = 1
trigger23 = stateno = 500
trigger24 = movecontact = 1
trigger24 = stateno = 550
trigger28 = movecontact = 1
trigger28 = stateno = 1050
trigger29 = movecontact = 1
trigger29 = stateno = 1060
trigger30 = movecontact = 1
trigger30 = stateno = 1070
trigger31 = projcontact = 1
trigger31 = stateno = 3000
trigger32 = projcontact = 1
trigger32 = stateno = 3010
trigger33 = projcontact = 1
trigger33 = stateno = 3020
trigger34 = projcontact = 1
trigger34 = stateno = 1010
trigger35 = projcontact = 1
trigger35 = stateno = 1011
trigger36 = projcontact = 1
trigger36 = stateno = 1012
trigger37 = projcontact = 1
trigger37 = stateno = 1000
trigger38 = projcontact = 1
trigger38 = stateno = 1001
trigger39 = projcontact = 1
trigger39 = stateno = 1002
trigger40 = movecontact = 1
trigger40 = stateno = 900
trigger41 = movecontact = 1
trigger41 = stateno = 910
trigger42 = movecontact = 1
trigger42 = stateno = 920
trigger43 = movecontact = 1
trigger43 = stateno = 945
trigger44 = stateno = 950
trigger45 = stateno = 951
trigger46 = stateno = 952


;===========================================================================
;---------------------------------------------------------------------------
; Tenma Gou Kuu Jin Kyaku A
[State -1]
type = ChangeState
value = 850
triggerall = command = "QCF_a"
triggerall = var(59) = 0
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 600
trigger3 = movecontact = 1
trigger3 = stateno = 601
trigger4 = movecontact = 1
trigger4 = stateno = 602
trigger5 = movecontact = 1
trigger5 = stateno = 604
trigger6 = movecontact = 1
trigger6 = stateno = 605
trigger7 = movecontact = 1
trigger7 = stateno = 606
trigger8 = movecontact = 1
trigger8 = stateno = 704
trigger9 = movecontact = 1
trigger9 = stateno = 705
trigger10 = movecontact = 1
trigger10 = stateno = 706
trigger11 = stateno = 550
trigger12 = stateno = 800

;---------------------------------------------------------------------------
; Tenma Gou Kuu Jin Kyaku B
[State -1]
type = ChangeState
value = 850
triggerall = command = "QCF_b"
triggerall = var(59) = 0
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 600
trigger3 = movecontact = 1
trigger3 = stateno = 601
trigger4 = movecontact = 1
trigger4 = stateno = 602
trigger5 = movecontact = 1
trigger5 = stateno = 604
trigger6 = movecontact = 1
trigger6 = stateno = 605
trigger7 = movecontact = 1
trigger7 = stateno = 606
trigger8 = movecontact = 1
trigger8 = stateno = 704
trigger9 = movecontact = 1
trigger9 = stateno = 705
trigger10 = movecontact = 1
trigger10 = stateno = 706
trigger11 = stateno = 550
trigger12 = stateno = 800

;---------------------------------------------------------------------------
; Tenma Gou Kuu Jin Kyaku C
[State -1]
type = ChangeState
value = 850
triggerall = command = "QCF_c"
triggerall = var(59) = 0
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 600
trigger3 = movecontact = 1
trigger3 = stateno = 601
trigger4 = movecontact = 1
trigger4 = stateno = 602
trigger5 = movecontact = 1
trigger5 = stateno = 604
trigger6 = movecontact = 1
trigger6 = stateno = 605
trigger7 = movecontact = 1
trigger7 = stateno = 606
trigger8 = movecontact = 1
trigger8 = stateno = 704
trigger9 = movecontact = 1
trigger9 = stateno = 705
trigger10 = movecontact = 1
trigger10 = stateno = 706
trigger11 = stateno = 550
trigger12 = stateno = 800

;===========================================================================
;---------------------------------------------------------------------------
; Kuuchuu Tatsu Maki Zankuu Kyaku A 
[State -1]
type = ChangeState
value = 3030
triggerall = command = "QCB_a"
triggerall = var(59) = 0
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 600
trigger3 = movecontact = 1
trigger3 = stateno = 601
trigger4 = movecontact = 1
trigger4 = stateno = 602
trigger5 = movecontact = 1
trigger5 = stateno = 604
trigger6 = movecontact = 1
trigger6 = stateno = 605
trigger7 = movecontact = 1
trigger7 = stateno = 606
trigger8 = movecontact = 1
trigger8 = stateno = 704
trigger9 = movecontact = 1
trigger9 = stateno = 705
trigger10 = stateno = 1350
trigger10 = time >= 39
trigger11 = stateno = 1360
trigger11 = time >= 39
trigger12 = stateno = 1370
trigger12 = time >= 39
trigger13 = stateno = 2500
trigger13 = time >= 131
trigger14 = stateno = 2600
trigger14 = time >= 131
trigger15 = stateno = 2700
trigger15 = time >= 131
trigger16 = movecontact = 1
trigger16 = stateno = 706
trigger17 = stateno = 550
trigger18 = stateno = 800
trigger19 = movecontact = 1
trigger19 = stateno = 3520

;---------------------------------------------------------------------------
; Kuuchuu Tatsu Maki Zankuu Kyaku B
[State -1]
type = ChangeState
value = 3040
triggerall = command = "QCB_b"
triggerall = var(59) = 0
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 600
trigger3 = movecontact = 1
trigger3 = stateno = 601
trigger4 = movecontact = 1
trigger4 = stateno = 602
trigger5 = movecontact = 1
trigger5 = stateno = 604
trigger6 = movecontact = 1
trigger6 = stateno = 605
trigger7 = movecontact = 1
trigger7 = stateno = 606
trigger8 = movecontact = 1
trigger8 = stateno = 704
trigger9 = movecontact = 1
trigger9 = stateno = 705
trigger10 = stateno = 1350
trigger10 = time >= 39
trigger11 = stateno = 1360
trigger11 = time >= 39
trigger12 = stateno = 1370
trigger12 = time >= 39
trigger13 = stateno = 2500
trigger13 = time >= 131
trigger14 = stateno = 2600
trigger14 = time >= 131
trigger15 = stateno = 2700
trigger15 = time >= 131
trigger16 = movecontact = 1
trigger16 = stateno = 706
trigger17 = stateno = 550
trigger18 = stateno = 800
trigger19 = movecontact = 1
trigger19 = stateno = 3520

;---------------------------------------------------------------------------
; Kuuchuu Tatsu Maki Zankuu Kyaku C
[State -1]
type = ChangeState
value = 3050
triggerall = command = "QCB_c"
triggerall = var(59) = 0
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 600
trigger3 = movecontact = 1
trigger3 = stateno = 601
trigger4 = movecontact = 1
trigger4 = stateno = 602
trigger5 = movecontact = 1
trigger5 = stateno = 604
trigger6 = movecontact = 1
trigger6 = stateno = 605
trigger7 = movecontact = 1
trigger7 = stateno = 606
trigger8 = movecontact = 1
trigger8 = stateno = 704
trigger9 = movecontact = 1
trigger9 = stateno = 705
trigger10 = stateno = 1350
trigger10 = time >= 39
trigger11 = stateno = 1360
trigger11 = time >= 39
trigger12 = stateno = 1370
trigger12 = time >= 39
trigger13 = stateno = 2500
trigger13 = time >= 131
trigger14 = stateno = 2600
trigger14 = time >= 131
trigger15 = stateno = 2700
trigger15 = time >= 131
trigger16 = movecontact = 1
trigger16 = stateno = 706
trigger18 = stateno = 800
trigger19 = movecontact = 1
trigger19 = stateno = 3520

;===========================================================================
;---------------------------------------------------------------------------
; Zankuu Hado Ken X
[State -1]
type = ChangeState
value = 1300
triggerall = command = "QCF_x"
triggerall = var(59) = 0
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 600
trigger3 = movecontact = 1
trigger3 = stateno = 601
trigger4 = movecontact = 1
trigger4 = stateno = 602
trigger5 = movecontact = 1
trigger5 = stateno = 604
trigger6 = movecontact = 1
trigger6 = stateno = 605
trigger7 = movecontact = 1
trigger7 = stateno = 606
trigger8 = movecontact = 1
trigger8 = stateno = 704
trigger9 = movecontact = 1
trigger9 = stateno = 705
trigger10 = movecontact = 1
trigger10 = stateno = 706
trigger11 = stateno = 550
trigger12 = stateno = 800
trigger13 = movecontact = 1
trigger13 = stateno = 3520

;---------------------------------------------------------------------------
; Zankuu Hado Ken Y
[State -1]
type = ChangeState
value = 1301
triggerall = command = "QCF_y"
triggerall = var(59) = 0
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 600
trigger3 = movecontact = 1
trigger3 = stateno = 601
trigger4 = movecontact = 1
trigger4 = stateno = 602
trigger5 = movecontact = 1
trigger5 = stateno = 604
trigger6 = movecontact = 1
trigger6 = stateno = 605
trigger7 = movecontact = 1
trigger7 = stateno = 606
trigger8 = movecontact = 1
trigger8 = stateno = 704
trigger9 = movecontact = 1
trigger9 = stateno = 705
trigger10 = movecontact = 1
trigger10 = stateno = 706
trigger11 = stateno = 550
trigger12 = stateno = 800
trigger13 = movecontact = 1
trigger13 = stateno = 3520

;---------------------------------------------------------------------------
; Zankuu Hado Ken Z
[State -1]
type = ChangeState
value = 1302
triggerall = command = "QCF_z"
triggerall = var(59) = 0
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 600
trigger3 = movecontact = 1
trigger3 = stateno = 601
trigger4 = movecontact = 1
trigger4 = stateno = 602
trigger5 = movecontact = 1
trigger5 = stateno = 604
trigger6 = movecontact = 1
trigger6 = stateno = 605
trigger7 = movecontact = 1
trigger7 = stateno = 606
trigger8 = movecontact = 1
trigger8 = stateno = 704
trigger9 = movecontact = 1
trigger9 = stateno = 705
trigger10 = movecontact = 1
trigger10 = stateno = 706
trigger11 = stateno = 550
trigger12 = stateno = 800
trigger13 = movecontact = 1
trigger13 = stateno = 3520

;===========================================================================
;---------------------------------------------------------------------------
; Hyakki Gou Sai
[State -1]
type = ChangeState
value = 3540
triggerall = time >= 12
triggerall = p2bodydist x <= 0
triggerall = p2bodydist x >= -35
triggerall = var(59) = 0
trigger1 = command = "x"
trigger1 = command = "holdfwd"
trigger1 = stateno = 3500
trigger2 = command = "x"
trigger2 = command = "holdfwd"
trigger2 = stateno = 3501
trigger3 = command = "x"
trigger3 = command = "holdfwd"
trigger3 = stateno = 3502
trigger4 = command = "y"
trigger4 = command = "holdfwd"
trigger4 = stateno = 3500
trigger5 = command = "y"
trigger5 = command = "holdfwd"
trigger5 = stateno = 3501
trigger6 = command = "y"
trigger6 = command = "holdfwd"
trigger6 = stateno = 3502
trigger7 = command = "z"
trigger7 = command = "holdfwd"
trigger7 = stateno = 3500
trigger8 = command = "z"
trigger8 = command = "holdfwd"
trigger8 = stateno = 3501
trigger9 = command = "z"
trigger9 = command = "holdfwd"
trigger9 = stateno = 3502
trigger10 = command = "x"
trigger10 = command = "holdback"
trigger10 = stateno = 3500
trigger11 = command = "x"
trigger11 = command = "holdback"
trigger11 = stateno = 3501
trigger12 = command = "x"
trigger12 = command = "holdback"
trigger12 = stateno = 3502
trigger13 = command = "y"
trigger13 = command = "holdback"
trigger13 = stateno = 3500
trigger14 = command = "y"
trigger14 = command = "holdback"
trigger14 = stateno = 3501
trigger15 = command = "y"
trigger15 = command = "holdback"
trigger15 = stateno = 3502
trigger16 = command = "z"
trigger16 = command = "holdback"
trigger16 = stateno = 3500
trigger17 = command = "z"
trigger17 = command = "holdback"
trigger17 = stateno = 3501
trigger18 = command = "z"
trigger18 = command = "holdback"
trigger18 = stateno = 3502

;---------------------------------------------------------------------------
; Hyakki Gou Tsui A
[State -1]
type = ChangeState
value = 3550
triggerall = time >= 12
triggerall = p2bodydist x < 8
triggerall = var(59) = 0
trigger1 = command = "a"
trigger1 = command = "holdfwd"
trigger1 = stateno = 3500
trigger2 = command = "a"
trigger2 = command = "holdfwd"
trigger2 = stateno = 3501
trigger3 = command = "a"
trigger3 = command = "holdfwd"
trigger3 = stateno = 3502
trigger4 = command = "b"
trigger4 = command = "holdfwd"
trigger4 = stateno = 3500
trigger5 = command = "b"
trigger5 = command = "holdfwd"
trigger5 = stateno = 3501
trigger6 = command = "b"
trigger6 = command = "holdfwd"
trigger6 = stateno = 3502
trigger7 = command = "c"
trigger7 = command = "holdfwd"
trigger7 = stateno = 3500
trigger8 = command = "c"
trigger8 = command = "holdfwd"
trigger8 = stateno = 3501
trigger9 = command = "c"
trigger9 = command = "holdfwd"
trigger9 = stateno = 3502

;---------------------------------------------------------------------------
; Hyakki Gou Tsui B
[State -1]
type = ChangeState
value = 3555
triggerall = time >= 12
triggerall = p2bodydist x < 8
triggerall = var(59) = 0
trigger1 = command = "a"
trigger1 = command = "holdback"
trigger1 = stateno = 3500
trigger2 = command = "a"
trigger2 = command = "holdback"
trigger2 = stateno = 3501
trigger3 = command = "a"
trigger3 = command = "holdback"
trigger3 = stateno = 3502
trigger4 = command = "b"
trigger4 = command = "holdback"
trigger4 = stateno = 3500
trigger5 = command = "b"
trigger5 = command = "holdback"
trigger5 = stateno = 3501
trigger6 = command = "b"
trigger6 = command = "holdback"
trigger6 = stateno = 3502
trigger7 = command = "c"
trigger7 = command = "holdback"
trigger7 = stateno = 3500
trigger8 = command = "c"
trigger8 = command = "holdback"
trigger8 = stateno = 3501
trigger9 = command = "c"
trigger9 = command = "holdback"
trigger9 = stateno = 3502

;---------------------------------------------------------------------------
; Hyakki Gou Shou
[State -1]
type = ChangeState
value = 3520
triggerall = time >= 12
triggerall = var(59) = 0
trigger1 = command = "x"
trigger1 = stateno = 3500
trigger2 = command = "x"
trigger2 = stateno = 3501
trigger3 = command = "x"
trigger3 = stateno = 3502
trigger4 = command = "y"
trigger4 = stateno = 3500
trigger5 = command = "y"
trigger5 = stateno = 3501
trigger6 = command = "y"
trigger6 = stateno = 3502
trigger7 = command = "z"
trigger7 = stateno = 3500
trigger8 = command = "z"
trigger8 = stateno = 3501
trigger9 = command = "z"
trigger9 = stateno = 3502

;---------------------------------------------------------------------------
; Hyakki Gou Sen
[State -1]
type = ChangeState
value = 3530
triggerall = time >= 12
triggerall = var(59) = 0
trigger1 = command = "a"
trigger1 = stateno = 3500
trigger2 = command = "a"
trigger2 = stateno = 3501
trigger3 = command = "a"
trigger3 = stateno = 3502
trigger4 = command = "b"
trigger4 = stateno = 3500
trigger5 = command = "b"
trigger5 = stateno = 3501
trigger6 = command = "b"
trigger6 = stateno = 3502
trigger7 = command = "c"
trigger7 = stateno = 3500
trigger8 = command = "c"
trigger8 = stateno = 3501
trigger9 = command = "c"
trigger9 = stateno = 3502

;===========================================================================
;---------------------------------------------------------------------------
; Gou Sho Ryu X
[State -1]
type = ChangeState
value = 1100
triggerall = command = "uppercut_x"
triggerall = var(59) = 0
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 200
trigger3 = movecontact = 1
trigger3 = stateno = 201
trigger4 = movecontact = 1
trigger4 = stateno = 202
trigger5 = movecontact = 1
trigger5 = stateno = 203
trigger6 = movecontact = 1
trigger6 = stateno = 204
trigger7 = movecontact = 1
trigger7 = stateno = 205
trigger8 = movecontact = 1
trigger8 = stateno = 206
trigger9 = movecontact = 1
trigger9 = stateno = 400
trigger10 = movecontact = 1
trigger10 = stateno = 401
trigger11 = movecontact = 1
trigger11 = stateno = 402
trigger12 = movecontact = 1
trigger12 = stateno = 403
trigger13 = movecontact = 1
trigger13 = stateno = 404
trigger14 = movecontact = 1
trigger14 = stateno = 405
trigger15 = movecontact = 1
trigger15 = stateno = 406
trigger16 = movecontact = 1
trigger16 = stateno = 301
trigger17 = movecontact = 1
trigger17 = stateno = 302
trigger18 = movecontact = 1
trigger18 = stateno = 304
trigger19 = movecontact = 1
trigger19 = stateno = 305
trigger20 = stateno = 100
trigger21 = statetype = C
trigger21 = ctrl = 1
trigger22 = movecontact = 1
trigger22 = stateno = 306
trigger23 = movecontact = 1
trigger23 = stateno = 500
trigger24 = movecontact = 1
trigger24 = stateno = 550


;---------------------------------------------------------------------------
; Gou Sho Ryu Y
[State -1]
type = ChangeState
value = 1110
triggerall = command = "uppercut_y"
triggerall = var(59) = 0
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 200
trigger3 = movecontact = 1
trigger3 = stateno = 201
trigger4 = movecontact = 1
trigger4 = stateno = 202
trigger5 = movecontact = 1
trigger5 = stateno = 203
trigger6 = movecontact = 1
trigger6 = stateno = 204
trigger7 = movecontact = 1
trigger7 = stateno = 205
trigger8 = movecontact = 1
trigger8 = stateno = 206
trigger9 = movecontact = 1
trigger9 = stateno = 400
trigger10 = movecontact = 1
trigger10 = stateno = 401
trigger11 = movecontact = 1
trigger11 = stateno = 402
trigger12 = movecontact = 1
trigger12 = stateno = 403
trigger13 = movecontact = 1
trigger13 = stateno = 404
trigger14 = movecontact = 1
trigger14 = stateno = 405
trigger15 = movecontact = 1
trigger15 = stateno = 406
trigger16 = movecontact = 1
trigger16 = stateno = 301
trigger17 = movecontact = 1
trigger17 = stateno = 302
trigger18 = movecontact = 1
trigger18 = stateno = 304
trigger19 = movecontact = 1
trigger19 = stateno = 305
trigger20 = stateno = 100
trigger21 = statetype = C
trigger21 = ctrl = 1
trigger22 = movecontact = 1
trigger22 = stateno = 306
trigger23 = movecontact = 1
trigger23 = stateno = 500
trigger24 = movecontact = 1
trigger24 = stateno = 550


;---------------------------------------------------------------------------
; Gou Sho Ryu Z
[State -1]
type = ChangeState
value = 1120
triggerall = command = "uppercut_z"
triggerall = var(59) = 0
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 200
trigger3 = movecontact = 1
trigger3 = stateno = 201
trigger4 = movecontact = 1
trigger4 = stateno = 202
trigger5 = movecontact = 1
trigger5 = stateno = 203
trigger6 = movecontact = 1
trigger6 = stateno = 204
trigger7 = movecontact = 1
trigger7 = stateno = 205
trigger8 = movecontact = 1
trigger8 = stateno = 206
trigger9 = movecontact = 1
trigger9 = stateno = 400
trigger10 = movecontact = 1
trigger10 = stateno = 401
trigger11 = movecontact = 1
trigger11 = stateno = 402
trigger12 = movecontact = 1
trigger12 = stateno = 403
trigger13 = movecontact = 1
trigger13 = stateno = 404
trigger14 = movecontact = 1
trigger14 = stateno = 405
trigger15 = movecontact = 1
trigger15 = stateno = 406
trigger16 = movecontact = 1
trigger16 = stateno = 301
trigger17 = movecontact = 1
trigger17 = stateno = 302
trigger18 = movecontact = 1
trigger18 = stateno = 304
trigger19 = movecontact = 1
trigger19 = stateno = 305
trigger20 = stateno = 100
trigger21 = statetype = C
trigger21 = ctrl = 1
trigger22 = movecontact = 1
trigger22 = stateno = 306
trigger23 = movecontact = 1
trigger23 = stateno = 500
trigger24 = movecontact = 1
trigger24 = stateno = 550


;===========================================================================
;===========================================================================
;---------------------------------------------------------------------------
; Zenpou Tenshin X
[State -1]
type = ChangeState
value = 950
triggerall = command = "QCB_x"
triggerall = var(59) = 0
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 200
trigger3 = movecontact = 1
trigger3 = stateno = 201
trigger4 = movecontact = 1
trigger4 = stateno = 202
trigger5 = movecontact = 1
trigger5 = stateno = 203
trigger6 = movecontact = 1
trigger6 = stateno = 204
trigger7 = movecontact = 1
trigger7 = stateno = 205
trigger8 = movecontact = 1
trigger8 = stateno = 206
trigger9 = movecontact = 1
trigger9 = stateno = 400
trigger10 = movecontact = 1
trigger10 = stateno = 401
trigger11 = movecontact = 1
trigger11 = stateno = 402
trigger12 = movecontact = 1
trigger12 = stateno = 403
trigger13 = movecontact = 1
trigger13 = stateno = 404
trigger14 = movecontact = 1
trigger14 = stateno = 405
trigger15 = movecontact = 1
trigger15 = stateno = 406
trigger16 = movecontact = 1
trigger16 = stateno = 301
trigger17 = movecontact = 1
trigger17 = stateno = 302
trigger18 = movecontact = 1
trigger18 = stateno = 304
trigger19 = movecontact = 1
trigger19 = stateno = 305
trigger20 = stateno = 100
trigger21 = statetype = C
trigger21 = ctrl = 1
trigger22 = movecontact = 1
trigger22 = stateno = 306
trigger23 = movecontact = 1
trigger23 = stateno = 500
trigger24 = movecontact = 1
trigger24 = stateno = 550

;---------------------------------------------------------------------------
; Zenpou Tenshin Y
[State -1]
type = ChangeState
value = 951
triggerall = command = "QCB_y"
triggerall = var(59) = 0
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 200
trigger3 = movecontact = 1
trigger3 = stateno = 201
trigger4 = movecontact = 1
trigger4 = stateno = 202
trigger5 = movecontact = 1
trigger5 = stateno = 203
trigger6 = movecontact = 1
trigger6 = stateno = 204
trigger7 = movecontact = 1
trigger7 = stateno = 205
trigger8 = movecontact = 1
trigger8 = stateno = 206
trigger9 = movecontact = 1
trigger9 = stateno = 400
trigger10 = movecontact = 1
trigger10 = stateno = 401
trigger11 = movecontact = 1
trigger11 = stateno = 402
trigger12 = movecontact = 1
trigger12 = stateno = 403
trigger13 = movecontact = 1
trigger13 = stateno = 404
trigger14 = movecontact = 1
trigger14 = stateno = 405
trigger15 = movecontact = 1
trigger15 = stateno = 406
trigger16 = movecontact = 1
trigger16 = stateno = 301
trigger17 = movecontact = 1
trigger17 = stateno = 302
trigger18 = movecontact = 1
trigger18 = stateno = 304
trigger19 = movecontact = 1
trigger19 = stateno = 305
trigger20 = stateno = 100
trigger21 = statetype = C
trigger21 = ctrl = 1
trigger22 = movecontact = 1
trigger22 = stateno = 306
trigger23 = movecontact = 1
trigger23 = stateno = 500
trigger24 = movecontact = 1
trigger24 = stateno = 550

;---------------------------------------------------------------------------
; Zenpou Tenshin Z
[State -1]
type = ChangeState
value = 952
triggerall = command = "QCB_z"
triggerall = var(59) = 0
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 200
trigger3 = movecontact = 1
trigger3 = stateno = 201
trigger4 = movecontact = 1
trigger4 = stateno = 202
trigger5 = movecontact = 1
trigger5 = stateno = 203
trigger6 = movecontact = 1
trigger6 = stateno = 204
trigger7 = movecontact = 1
trigger7 = stateno = 205
trigger8 = movecontact = 1
trigger8 = stateno = 206
trigger9 = movecontact = 1
trigger9 = stateno = 400
trigger10 = movecontact = 1
trigger10 = stateno = 401
trigger11 = movecontact = 1
trigger11 = stateno = 402
trigger12 = movecontact = 1
trigger12 = stateno = 403
trigger13 = movecontact = 1
trigger13 = stateno = 404
trigger14 = movecontact = 1
trigger14 = stateno = 405
trigger15 = movecontact = 1
trigger15 = stateno = 406
trigger16 = movecontact = 1
trigger16 = stateno = 301
trigger17 = movecontact = 1
trigger17 = stateno = 302
trigger18 = movecontact = 1
trigger18 = stateno = 304
trigger19 = movecontact = 1
trigger19 = stateno = 305
trigger20 = stateno = 100
trigger21 = statetype = C
trigger21 = ctrl = 1
trigger22 = movecontact = 1
trigger22 = stateno = 306
trigger23 = movecontact = 1
trigger23 = stateno = 500
trigger24 = movecontact = 1
trigger24 = stateno = 550

;===========================================================================
;---------------------------------------------------------------------------
; Tatsu Maki Zankuu Kyaku A 
[State -1]
type = ChangeState
value = 3000
triggerall = command = "QCB_a"
triggerall = var(59) = 0
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 200
trigger3 = movecontact = 1
trigger3 = stateno = 201
trigger4 = movecontact = 1
trigger4 = stateno = 202
trigger5 = movecontact = 1
trigger5 = stateno = 203
trigger6 = movecontact = 1
trigger6 = stateno = 204
trigger7 = movecontact = 1
trigger7 = stateno = 205
trigger8 = movecontact = 1
trigger8 = stateno = 206
trigger9 = movecontact = 1
trigger9 = stateno = 400
trigger10 = movecontact = 1
trigger10 = stateno = 401
trigger11 = movecontact = 1
trigger11 = stateno = 402
trigger12 = movecontact = 1
trigger12 = stateno = 403
trigger13 = movecontact = 1
trigger13 = stateno = 404
trigger14 = movecontact = 1
trigger14 = stateno = 405
trigger15 = movecontact = 1
trigger15 = stateno = 406
trigger16 = movecontact = 1
trigger16 = stateno = 301
trigger17 = movecontact = 1
trigger17 = stateno = 302
trigger18 = movecontact = 1
trigger18 = stateno = 304
trigger19 = movecontact = 1
trigger19 = stateno = 305
trigger20 = stateno = 100
trigger21 = statetype = C
trigger21 = ctrl = 1
trigger22 = movecontact = 1
trigger22 = stateno = 306
trigger23 = movecontact = 1
trigger23 = stateno = 500
trigger24 = movecontact = 1
trigger24 = stateno = 550

;---------------------------------------------------------------------------
; Tatsu Maki Zankuu Kyaku B 
[State -1]
type = ChangeState
value = 3010
triggerall = command = "QCB_b"
triggerall = var(59) = 0
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 200
trigger3 = movecontact = 1
trigger3 = stateno = 201
trigger4 = movecontact = 1
trigger4 = stateno = 202
trigger5 = movecontact = 1
trigger5 = stateno = 203
trigger6 = movecontact = 1
trigger6 = stateno = 204
trigger7 = movecontact = 1
trigger7 = stateno = 205
trigger8 = movecontact = 1
trigger8 = stateno = 206
trigger9 = movecontact = 1
trigger9 = stateno = 400
trigger10 = movecontact = 1
trigger10 = stateno = 401
trigger11 = movecontact = 1
trigger11 = stateno = 402
trigger12 = movecontact = 1
trigger12 = stateno = 403
trigger13 = movecontact = 1
trigger13 = stateno = 404
trigger14 = movecontact = 1
trigger14 = stateno = 405
trigger15 = movecontact = 1
trigger15 = stateno = 406
trigger16 = movecontact = 1
trigger16 = stateno = 301
trigger17 = movecontact = 1
trigger17 = stateno = 302
trigger18 = movecontact = 1
trigger18 = stateno = 304
trigger19 = movecontact = 1
trigger19 = stateno = 305
trigger20 = stateno = 100
trigger21 = statetype = C
trigger21 = ctrl = 1
trigger22 = movecontact = 1
trigger22 = stateno = 306
trigger23 = movecontact = 1
trigger23 = stateno = 500
trigger24 = movecontact = 1
trigger24 = stateno = 550

;---------------------------------------------------------------------------
; Tatsu Maki Zankuu Kyaku C
[State -1]
type = ChangeState
value = 3020
triggerall = command = "QCB_c"
triggerall = var(59) = 0
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 200
trigger3 = movecontact = 1
trigger3 = stateno = 201
trigger4 = movecontact = 1
trigger4 = stateno = 202
trigger5 = movecontact = 1
trigger5 = stateno = 203
trigger6 = movecontact = 1
trigger6 = stateno = 204
trigger7 = movecontact = 1
trigger7 = stateno = 205
trigger8 = movecontact = 1
trigger8 = stateno = 206
trigger9 = movecontact = 1
trigger9 = stateno = 400
trigger10 = movecontact = 1
trigger10 = stateno = 401
trigger11 = movecontact = 1
trigger11 = stateno = 402
trigger12 = movecontact = 1
trigger12 = stateno = 403
trigger13 = movecontact = 1
trigger13 = stateno = 404
trigger14 = movecontact = 1
trigger14 = stateno = 405
trigger15 = movecontact = 1
trigger15 = stateno = 406
trigger16 = movecontact = 1
trigger16 = stateno = 301
trigger17 = movecontact = 1
trigger17 = stateno = 302
trigger18 = movecontact = 1
trigger18 = stateno = 304
trigger19 = movecontact = 1
trigger19 = stateno = 305
trigger20 = stateno = 100
trigger21 = statetype = C
trigger21 = ctrl = 1
trigger22 = movecontact = 1
trigger22 = stateno = 306
trigger23 = movecontact = 1
trigger23 = stateno = 500

;---------------------------------------------------------------------------
; Tatsu Maki Zankuu Kyaku C
[State -1]
type = ChangeState
value = 3021
triggerall = command = "QCB_c"
triggerall = var(59) = 0
trigger1 = statetype = A
trigger1 = movecontact = 1
trigger1 = stateno = 550

;===========================================================================
;---------------------------------------------------------------------------
; Gou Hado Ken X (close)
[State -1]
type = ChangeState
value = 1010
triggerall = command = "QCF_x"
triggerall = var(59) = 0
triggerall = P2bodydist X < 55
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 200
trigger3 = movecontact = 1
trigger3 = stateno = 201
trigger4 = movecontact = 1
trigger4 = stateno = 202
trigger5 = movecontact = 1
trigger5 = stateno = 203
trigger6 = movecontact = 1
trigger6 = stateno = 204
trigger7 = movecontact = 1
trigger7 = stateno = 205
trigger8 = movecontact = 1
trigger8 = stateno = 206
trigger9 = movecontact = 1
trigger9 = stateno = 400
trigger10 = movecontact = 1
trigger10 = stateno = 401
trigger11 = movecontact = 1
trigger11 = stateno = 402
trigger12 = movecontact = 1
trigger12 = stateno = 403
trigger13 = movecontact = 1
trigger13 = stateno = 404
trigger14 = movecontact = 1
trigger14 = stateno = 405
trigger15 = movecontact = 1
trigger15 = stateno = 406
trigger16 = movecontact = 1
trigger16 = stateno = 301
trigger17 = movecontact = 1
trigger17 = stateno = 302
trigger18 = movecontact = 1
trigger18 = stateno = 304
trigger19 = movecontact = 1
trigger19 = stateno = 305
trigger20 = stateno = 100
trigger21 = statetype = C
trigger21 = ctrl = 1
trigger22 = movecontact = 1
trigger22 = stateno = 306
trigger23 = movecontact = 1
trigger23 = stateno = 500
trigger24 = movecontact = 1
trigger24 = stateno = 550

;---------------------------------------------------------------------------
; Gou Hado Ken Y (close)
[State -1]
type = ChangeState
value = 1011
triggerall = command = "QCF_y"
triggerall = P2bodydist X < 55
triggerall = var(59) = 0
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 200
trigger3 = movecontact = 1
trigger3 = stateno = 201
trigger4 = movecontact = 1
trigger4 = stateno = 202
trigger5 = movecontact = 1
trigger5 = stateno = 203
trigger6 = movecontact = 1
trigger6 = stateno = 204
trigger7 = movecontact = 1
trigger7 = stateno = 205
trigger8 = movecontact = 1
trigger8 = stateno = 206
trigger9 = movecontact = 1
trigger9 = stateno = 400
trigger10 = movecontact = 1
trigger10 = stateno = 401
trigger11 = movecontact = 1
trigger11 = stateno = 402
trigger12 = movecontact = 1
trigger12 = stateno = 403
trigger13 = movecontact = 1
trigger13 = stateno = 404
trigger14 = movecontact = 1
trigger14 = stateno = 405
trigger15 = movecontact = 1
trigger15 = stateno = 406
trigger16 = movecontact = 1
trigger16 = stateno = 301
trigger17 = movecontact = 1
trigger17 = stateno = 302
trigger18 = movecontact = 1
trigger18 = stateno = 304
trigger19 = movecontact = 1
trigger19 = stateno = 305
trigger20 = stateno = 100
trigger21 = statetype = C
trigger21 = ctrl = 1
trigger22 = movecontact = 1
trigger22 = stateno = 306
trigger23 = movecontact = 1
trigger23 = stateno = 500
trigger24 = movecontact = 1
trigger24 = stateno = 550

;---------------------------------------------------------------------------
; Gou Hado Ken Z (close)
[State -1]
type = ChangeState
value = 1012
triggerall = command = "QCF_z"
triggerall = P2bodydist X < 55
triggerall = var(59) = 0
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 200
trigger3 = movecontact = 1
trigger3 = stateno = 201
trigger4 = movecontact = 1
trigger4 = stateno = 202
trigger5 = movecontact = 1
trigger5 = stateno = 203
trigger6 = movecontact = 1
trigger6 = stateno = 204
trigger7 = movecontact = 1
trigger7 = stateno = 205
trigger8 = movecontact = 1
trigger8 = stateno = 206
trigger9 = movecontact = 1
trigger9 = stateno = 400
trigger10 = movecontact = 1
trigger10 = stateno = 401
trigger11 = movecontact = 1
trigger11 = stateno = 402
trigger12 = movecontact = 1
trigger12 = stateno = 403
trigger13 = movecontact = 1
trigger13 = stateno = 404
trigger14 = movecontact = 1
trigger14 = stateno = 405
trigger15 = movecontact = 1
trigger15 = stateno = 406
trigger16 = movecontact = 1
trigger16 = stateno = 301
trigger17 = movecontact = 1
trigger17 = stateno = 302
trigger18 = movecontact = 1
trigger18 = stateno = 304
trigger19 = movecontact = 1
trigger19 = stateno = 305
trigger20 = stateno = 100
trigger21 = statetype = C
trigger21 = ctrl = 1
trigger22 = movecontact = 1
trigger22 = stateno = 306
trigger23 = movecontact = 1
trigger23 = stateno = 500
trigger24 = movecontact = 1
trigger24 = stateno = 550

;---------------------------------------------------------------------------
; Gou Hado Ken X
[State -1]
type = ChangeState
value = 1000
triggerall = command = "QCF_x"
triggerall = var(59) = 0
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 200
trigger3 = movecontact = 1
trigger3 = stateno = 201
trigger4 = movecontact = 1
trigger4 = stateno = 202
trigger5 = movecontact = 1
trigger5 = stateno = 203
trigger6 = movecontact = 1
trigger6 = stateno = 204
trigger7 = movecontact = 1
trigger7 = stateno = 205
trigger8 = movecontact = 1
trigger8 = stateno = 206
trigger9 = movecontact = 1
trigger9 = stateno = 400
trigger10 = movecontact = 1
trigger10 = stateno = 401
trigger11 = movecontact = 1
trigger11 = stateno = 402
trigger12 = movecontact = 1
trigger12 = stateno = 403
trigger13 = movecontact = 1
trigger13 = stateno = 404
trigger14 = movecontact = 1
trigger14 = stateno = 405
trigger15 = movecontact = 1
trigger15 = stateno = 406
trigger16 = movecontact = 1
trigger16 = stateno = 301
trigger17 = movecontact = 1
trigger17 = stateno = 302
trigger18 = movecontact = 1
trigger18 = stateno = 304
trigger19 = movecontact = 1
trigger19 = stateno = 305
trigger20 = stateno = 100
trigger21 = statetype = C
trigger21 = ctrl = 1
trigger22 = movecontact = 1
trigger22 = stateno = 306
trigger23 = movecontact = 1
trigger23 = stateno = 500
trigger24 = movecontact = 1
trigger24 = stateno = 550

;---------------------------------------------------------------------------
; Gou Hado Ken Y
[State -1]
type = ChangeState
value = 1001
triggerall = command = "QCF_y"
triggerall = var(59) = 0
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 200
trigger3 = movecontact = 1
trigger3 = stateno = 201
trigger4 = movecontact = 1
trigger4 = stateno = 202
trigger5 = movecontact = 1
trigger5 = stateno = 203
trigger6 = movecontact = 1
trigger6 = stateno = 204
trigger7 = movecontact = 1
trigger7 = stateno = 205
trigger8 = movecontact = 1
trigger8 = stateno = 206
trigger9 = movecontact = 1
trigger9 = stateno = 400
trigger10 = movecontact = 1
trigger10 = stateno = 401
trigger11 = movecontact = 1
trigger11 = stateno = 402
trigger12 = movecontact = 1
trigger12 = stateno = 403
trigger13 = movecontact = 1
trigger13 = stateno = 404
trigger14 = movecontact = 1
trigger14 = stateno = 405
trigger15 = movecontact = 1
trigger15 = stateno = 406
trigger16 = movecontact = 1
trigger16 = stateno = 301
trigger17 = movecontact = 1
trigger17 = stateno = 302
trigger18 = movecontact = 1
trigger18 = stateno = 304
trigger19 = movecontact = 1
trigger19 = stateno = 305
trigger20 = stateno = 100
trigger21 = statetype = C
trigger21 = ctrl = 1
trigger22 = movecontact = 1
trigger22 = stateno = 306
trigger23 = movecontact = 1
trigger23 = stateno = 500
trigger24 = movecontact = 1
trigger24 = stateno = 550

;---------------------------------------------------------------------------
; Gou Hado Ken Z
[State -1]
type = ChangeState
value = 1002
triggerall = command = "QCF_z"
triggerall = var(59) = 0
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 200
trigger3 = movecontact = 1
trigger3 = stateno = 201
trigger4 = movecontact = 1
trigger4 = stateno = 202
trigger5 = movecontact = 1
trigger5 = stateno = 203
trigger6 = movecontact = 1
trigger6 = stateno = 204
trigger7 = movecontact = 1
trigger7 = stateno = 205
trigger8 = movecontact = 1
trigger8 = stateno = 206
trigger9 = movecontact = 1
trigger9 = stateno = 400
trigger10 = movecontact = 1
trigger10 = stateno = 401
trigger11 = movecontact = 1
trigger11 = stateno = 402
trigger12 = movecontact = 1
trigger12 = stateno = 403
trigger13 = movecontact = 1
trigger13 = stateno = 404
trigger14 = movecontact = 1
trigger14 = stateno = 405
trigger15 = movecontact = 1
trigger15 = stateno = 406
trigger16 = movecontact = 1
trigger16 = stateno = 301
trigger17 = movecontact = 1
trigger17 = stateno = 302
trigger18 = movecontact = 1
trigger18 = stateno = 304
trigger19 = movecontact = 1
trigger19 = stateno = 305
trigger20 = stateno = 100
trigger21 = statetype = C
trigger21 = ctrl = 1
trigger22 = movecontact = 1
trigger22 = stateno = 306
trigger23 = movecontact = 1
trigger23 = stateno = 500
trigger24 = movecontact = 1
trigger24 = stateno = 550

;---------------------------------------------------------------------------
;Punch Throw (Forward)
[State -1]
type = ChangeState
value = 4000
triggerall = statetype = S
triggerall = var(59) = 0
triggerall = ctrl = 1
triggerall = command = "holdfwd"
trigger1 = command = "z"
trigger1 = p2movetype != H && p2bodydist X < 36
;trigger2 = command = "xz"
;trigger2 = p2movetype != H
;trigger3 = command = "yz"
;trigger3 = p2movetype != H
;trigger4 = command = "xy"
;trigger4 = p2movetype != H
;trigger5 = command = "xz"
;trigger5 = p2movetype != H
;trigger6 = command = "yz"
;trigger6 = p2movetype != H

;---------------------------------------------------------------------------
;Punch Throw (Backward)
[State -1]
type = ChangeState
value = 4005
triggerall = statetype = S
triggerall = var(59) = 0
triggerall = ctrl = 1
triggerall = command = "holdback"
trigger1 = command = "z" 
trigger1 = p2bodydist X < 36
;trigger2 = command = "xz"
;trigger3 = command = "yz"
;trigger4 = command = "xy"
;trigger5 = command = "xz"
;trigger6 = command = "yz"

;---------------------------------------------------------------------------
;Kick Throw (Forward)
[State -1]
type = ChangeState
value = 4010
triggerall = statetype = S
triggerall = var(59) = 0
triggerall = ctrl = 1
triggerall = command = "holdfwd"
trigger1 = command = "c"
trigger1 = p2bodydist X < 36
;trigger2 = command = "ac"
;trigger3 = command = "bc"
;trigger4 = command = "ab"
;trigger5 = command = "ac"
;trigger6 = command = "bc"

;---------------------------------------------------------------------------
;Kick Throw (Backward)
[State -1]
type = ChangeState
value = 4015
triggerall = statetype = S
triggerall = var(59) = 0
triggerall = ctrl = 1
triggerall = command = "holdback"
trigger1 = command = "c"
trigger1 = p2bodydist X < 36
;trigger2 = command = "ac"
;trigger3 = command = "bc"
;trigger4 = command = "ab"
;trigger5 = command = "ac"
;trigger6 = command = "bc"
       
;---------------------------------------------------------------------------
;Air Throw (Forward)
[State -1]
type = ChangeState
value = 4030
triggerall = statetype = A
triggerall = var(59) = 0
triggerall = ctrl = 1
triggerall = command = "holdfwd"
trigger1 = command = "ab"
trigger2 = command = "ac"
trigger3 = command = "bc"

;---------------------------------------------------------------------------
;Air Throw (Backward)
[State -1]
type = ChangeState
value = 4030
triggerall = statetype = A
triggerall = var(59) = 0
triggerall = ctrl = 1
triggerall = command = "holdback"
trigger1 = command = "ab"
trigger2 = command = "ac"
trigger3 = command = "bc"

;===========================================================================
;---------------------------------------------------------------------------
;Zugai Hassatsu
[State -1]
type = ChangeState
value = 500
triggerall = command = "fwd_y"
triggerall = var(59) = 0
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 200
trigger3 = movecontact = 1
trigger3 = stateno = 201
trigger4 = movecontact = 1
trigger4 = stateno = 202
trigger5 = movecontact = 1
trigger5 = stateno = 203
trigger6 = movecontact = 1
trigger6 = stateno = 204
trigger7 = movecontact = 1
trigger7 = stateno = 205
trigger8 = movecontact = 1
trigger8 = stateno = 206
trigger9 = movecontact = 1
trigger9 = stateno = 400
trigger10 = movecontact = 1
trigger10 = stateno = 401
trigger11 = movecontact = 1
trigger11 = stateno = 402
trigger12 = movecontact = 1
trigger12 = stateno = 403
trigger13 = movecontact = 1
trigger13 = stateno = 404
trigger14 = movecontact = 1
trigger14 = stateno = 405
trigger15 = movecontact = 1
trigger15 = stateno = 406
trigger16 = movecontact = 1
trigger16 = stateno = 301
trigger17 = movecontact = 1
trigger17 = stateno = 302
trigger18 = movecontact = 1
trigger18 = stateno = 304
trigger19 = movecontact = 1
trigger19 = stateno = 305
trigger20 = stateno = 100
trigger21 = movecontact = 1
trigger21 = stateno = 306

;===========================================================================
;---------------------------------------------------------------------------
;Senpuu Kyaku
[State -1]
type = ChangeState
value = 550
triggerall = command = "fwd_b"
triggerall = var(59) = 0
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 200
trigger3 = movecontact = 1
trigger3 = stateno = 201
trigger4 = movecontact = 1
trigger4 = stateno = 202
trigger5 = movecontact = 1
trigger5 = stateno = 203
trigger6 = movecontact = 1
trigger6 = stateno = 204
trigger7 = movecontact = 1
trigger7 = stateno = 205
trigger8 = movecontact = 1
trigger8 = stateno = 206
trigger9 = movecontact = 1
trigger9 = stateno = 400
trigger10 = movecontact = 1
trigger10 = stateno = 401
trigger11 = movecontact = 1
trigger11 = stateno = 402
trigger12 = movecontact = 1
trigger12 = stateno = 403
trigger13 = movecontact = 1
trigger13 = stateno = 404
trigger14 = movecontact = 1
trigger14 = stateno = 405
trigger15 = movecontact = 1
trigger15 = stateno = 406
trigger16 = movecontact = 1
trigger16 = stateno = 301
trigger17 = movecontact = 1
trigger17 = stateno = 302
trigger18 = movecontact = 1
trigger18 = stateno = 304
trigger19 = movecontact = 1
trigger19 = stateno = 305
trigger20 = stateno = 100
trigger21 = movecontact = 1
trigger21 = stateno = 306

;===========================================================================
;---------------------------------------------------------------------------
;Senpuu Kyaku
[State -1]
type = ChangeState
value = 560
triggerall = command = "fwd_c"
triggerall = var(59) = 0
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 200
trigger3 = movecontact = 1
trigger3 = stateno = 201
trigger4 = movecontact = 1
trigger4 = stateno = 202
trigger5 = movecontact = 1
trigger5 = stateno = 203
trigger6 = movecontact = 1
trigger6 = stateno = 204
trigger7 = movecontact = 1
trigger7 = stateno = 205
trigger8 = movecontact = 1
trigger8 = stateno = 206
trigger9 = movecontact = 1
trigger9 = stateno = 400
trigger10 = movecontact = 1
trigger10 = stateno = 401
trigger11 = movecontact = 1
trigger11 = stateno = 402
trigger12 = movecontact = 1
trigger12 = stateno = 403
trigger13 = movecontact = 1
trigger13 = stateno = 404
trigger14 = movecontact = 1
trigger14 = stateno = 405
trigger15 = movecontact = 1
trigger15 = stateno = 406
trigger16 = movecontact = 1
trigger16 = stateno = 301
trigger17 = movecontact = 1
trigger17 = stateno = 302
trigger18 = movecontact = 1
trigger18 = stateno = 304
trigger19 = movecontact = 1
trigger19 = stateno = 305
trigger20 = stateno = 100
trigger21 = movecontact = 1
trigger21 = stateno = 306

;===========================================================================
;---------------------------------------------------------------------------
;RunFwd
[State -1]
type = ChangeState
value = 100
triggerall = var(59) = 0
trigger1 = command = "FF"
trigger1 = statetype = S
trigger1 = ctrl = 1

;---------------------------------------------------------------------------
;RunBack
[State -1]
type = ChangeState
value = 105
triggerall = var(59) = 0
trigger1 = command = "BB"
trigger1 = statetype = S
trigger1 = ctrl = 1

;===========================================================================
;---------------------------------------------------------------------------
;Stand X
[State -1]
type = ChangeState
value = 200
triggerall = var(59) = 0
triggerall = command = "x"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = time >= 5
trigger2 = stateno = 200
trigger3 = stateno = 100

;---------------------------------------------------------------------------
;Stand Y
[State -1]
type = ChangeState
value = 201
triggerall = var(59) = 0
triggerall = command = "y"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 200
trigger3 = movecontact = 1
trigger3 = stateno = 204
trigger4 = MoveContact = 1
trigger4 = stateno = 400
trigger5 = MoveContact = 1
trigger5 = stateno = 404
trigger6 = stateno = 100
trigger7 = MoveContact = 1
trigger7 = stateno = 304

;---------------------------------------------------------------------------
;Stand Z
[State -1]
type = ChangeState
value = 667
triggerall = var(59) = 0
triggerall = command = "z"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 200
trigger3 = movecontact = 1
trigger3 = stateno = 201
trigger4 = movecontact = 1
trigger4 = stateno = 204
trigger5 = movecontact = 1
trigger5 = stateno = 205
trigger6 = movecontact = 1
trigger6 = stateno = 301
trigger7 = movecontact = 1
trigger7 = stateno = 304
trigger8 = MoveContact = 1
trigger8 = stateno = 400
trigger9 = MoveContact = 1
trigger9 = stateno = 401
trigger10 = MoveContact = 1
trigger10 = stateno = 404
trigger11 = MoveContact = 1
trigger11 = stateno = 405
trigger12 = movecontact = 1
trigger12 = stateno = 210
trigger13 = stateno = 100
trigger14 = movecontact = 1
trigger14 = stateno = 305

;---------------------------------------------------------------------------
;Stand A
[State -1]
type = ChangeState
value = 204
triggerall = command = "a"
triggerall = var(59) = 0
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = MoveContact = 1
trigger2 = stateno = 200
trigger3 = MoveContact = 1
trigger3 = stateno = 400
trigger4 = stateno = 100
trigger5 = MoveContact = 1
trigger5 = stateno = 204
trigger6 = MoveContact = 1
trigger6 = stateno = 304

;---------------------------------------------------------------------------
;Stand B
[State -1]
type = ChangeState
value = 205
triggerall = var(59) = 0
triggerall = command = "b"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 200
trigger3 = movecontact = 1
trigger3 = stateno = 201
trigger4 = movecontact = 1
trigger4 = stateno = 204
trigger5 = movecontact = 1
trigger5 = stateno = 301
trigger6 = MoveContact = 1
trigger6 = stateno = 400
trigger7 = MoveContact = 1
trigger7 = stateno = 401
trigger8 = MoveContact = 1
trigger8 = stateno = 404
trigger9 = movecontact = 1
trigger9 = stateno = 304
trigger10 = stateno = 100

;---------------------------------------------------------------------------
;Stand C
[State -1]
type = ChangeState
value = 206
triggerall = var(59) = 0
triggerall = command = "c"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 200
trigger3 = movecontact = 1
trigger3 = stateno = 201
trigger4 = movecontact = 1
trigger4 = stateno = 204
trigger5 = movecontact = 1
trigger5 = stateno = 205
trigger6 = movecontact = 1
trigger6 = stateno = 301
trigger7 = movecontact = 1
trigger7 = stateno = 304
trigger8 = movecontact = 1
trigger8 = stateno = 400
trigger9 = MoveContact = 1
trigger9 = stateno = 401
trigger10 = MoveContact = 1
trigger10 = stateno = 404
trigger11 = MoveContact = 1
trigger11 = stateno = 405
trigger12 = movecontact = 1
trigger12 = stateno = 305
trigger13 = stateno = 100

;---------------------------------------------------------------------------
;Crouch X
[State -1]
type = ChangeState
value = 400
triggerall = var(59) = 0
triggerall = command = "x"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl = 1
trigger2 = stateno = 100
trigger3 = time >= 5
trigger3 = stateno = 400
trigger4 = time >= 5
trigger4 = stateno = 200

;---------------------------------------------------------------------------
;Crouch Y
[State -1]
type = ChangeState
value = 401
triggerall = var(59) = 0
triggerall = command = "y"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 400
trigger3 = movecontact = 1
trigger3 = stateno = 404
trigger4 = movecontact = 1
trigger4 = stateno = 200
trigger5 = movecontact = 1
trigger5 = stateno = 204
trigger6 = movecontact = 1
trigger6 = stateno = 207
trigger7 = stateno = 100
trigger8 = movecontact = 1
trigger8 = stateno = 304

;---------------------------------------------------------------------------
;Crouch Z
[State -1]
type = ChangeState
value = 402
triggerall = var(59) = 0
triggerall = command = "z"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 400
trigger3 = movecontact = 1
trigger3 = stateno = 401
trigger4 = movecontact = 1
trigger4 = stateno = 404
trigger5 = movecontact = 1
trigger5 = stateno = 405
trigger6 = movecontact = 1
trigger6 = stateno = 200
trigger7 = movecontact = 1
trigger7 = stateno = 201
trigger8 = movecontact = 1
trigger8 = stateno = 204
trigger9 = movecontact = 1
trigger9 = stateno = 205
trigger10 = movecontact = 1
trigger10 = stateno = 207
trigger11 = movecontact = 1
trigger11 = stateno = 208
trigger12 = stateno = 100
trigger13 = movecontact = 1
trigger13 = stateno = 304
trigger14 = movecontact = 1
trigger14 = stateno = 301
trigger15 = movecontact = 1
trigger15 = stateno = 305

;---------------------------------------------------------------------------
;Super Jump (Super salto)
[State -1]
Type = Changestate
value = 60
triggerall = var(59) = 0
triggerall = command = "SuperJump"
trigger1 = statetype != A
Trigger1 = Ctrl = 1
trigger2 = stateno = 100
trigger3 = stateno = 105
trigger4 = stateno = 402
trigger4 = movehit = 1

;---------------------------------------------------------------------------
;Aerial Rave Jump
[State -1]
type = ChangeState
value = 40
triggerall = var(59) = 0
triggerall = command = "holdup"
trigger1 = movecontact = 1
trigger1 = stateno = 402

;---------------------------------------------------------------------------
;Crouch A
[State -1]
type = ChangeState
value = 404
triggerall = var(59) = 0
triggerall = command = "a"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl = 1
trigger2 = time >= 5
trigger2 = stateno = 400
trigger3 = movecontact = 1
trigger3 = stateno = 204
trigger4 = time >= 5
trigger4 = stateno = 404
trigger5 = time >= 5
trigger5 = stateno = 200
trigger6 = time >= 5
trigger6 = stateno = 304
trigger7 = movecontact = 1
trigger7 = stateno = 400
trigger8 = stateno = 100

;---------------------------------------------------------------------------
;Crouch B
[State -1]
type = ChangeState
value = 405
triggerall = var(59) = 0
triggerall = command = "b"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 400
trigger3 = movecontact = 1
trigger3 = stateno = 401
trigger4 = movecontact = 1
trigger4 = stateno = 404
trigger5 = movecontact = 1
trigger5 = stateno = 200
trigger6 = movecontact = 1
trigger6 = stateno = 201
trigger7 = movecontact = 1
trigger7 = stateno = 204
trigger8 = movecontact = 1
trigger8 = stateno = 207
trigger9 = movecontact = 1
trigger9 = stateno = 208
trigger10 = movecontact = 1
trigger10 = stateno = 304
trigger11 = stateno = 100

;---------------------------------------------------------------------------
;Crouch C
[State -1]
type = ChangeState
value = 406
triggerall = var(59) = 0
triggerall = command = "c"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl = 1
trigger2 = movecontact = 1
trigger2 = stateno = 400
trigger3 = movecontact = 1
trigger3 = stateno = 401
trigger4 = movecontact = 1
trigger4 = stateno = 404
trigger5 = movecontact = 1
trigger5 = stateno = 200
trigger6 = movecontact = 1
trigger6 = stateno = 201
trigger7 = movecontact = 1
trigger7 = stateno = 204
trigger8 = movecontact = 1
trigger8 = stateno = 207
trigger9 = movecontact = 1
trigger9 = stateno = 208
trigger10 = movecontact = 1
trigger10 = stateno = 205
trigger11 = movecontact = 1
trigger11 = stateno = 405
trigger12 = movecontact = 1
trigger12 = stateno = 304
trigger13 = stateno = 100

;---------------------------------------------------------------------------
;Jump X
[State -1]
type = ChangeState
value = 600
triggerall = var(59) = 0
triggerall = command = "x"
trigger1 = statetype = A
trigger1 = ctrl = 1

;---------------------------------------------------------------------------
;Jump Y
[State -1]
type = ChangeState
value = 601
triggerall = var(59) = 0
triggerall = command = "y"
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger2 = p2statetype = A
trigger2 = movecontact = 1
trigger2 = stateno = 600
trigger3 = p2statetype = A
trigger3 = movecontact = 1
trigger3 = stateno = 604
trigger4 = p2statetype = A
trigger4 = movecontact = 1
trigger4 = stateno = 704

;---------------------------------------------------------------------------
;Jump Z
[State -1]
type = ChangeState
value = 602
triggerall = var(59) = 0
triggerall = command = "z"
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger2 = p2statetype = A
trigger2 = movecontact = 1
trigger2 = stateno = 600
trigger3 = p2statetype = A
trigger3 = movecontact = 1
trigger3 = stateno = 601
trigger4 = p2statetype = A
trigger4 = movecontact = 1
trigger4 = stateno = 604
trigger5 = p2statetype = A
trigger5 = movecontact = 1
trigger5 = stateno = 605
trigger6 = p2statetype = A
trigger6 = movecontact = 1
trigger6 = stateno = 704
trigger7 = p2statetype = A
trigger7 = movecontact = 1
trigger7 = stateno = 705

;---------------------------------------------------------------------------
;Tenma Kuu Jin Kyaku
[State -1]
type = ChangeState
value = 800
triggerall = var(59) = 0
triggerall = command = "holddown"
triggerall = command = "b"
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger1 = stateno = 50
trigger1 = time >= 14
trigger1 = vel x >= 0.5
trigger2 = statetype = A
trigger2 = ctrl = 1
trigger2 = stateno = 51
trigger2 = time <= 10
trigger2 = vel x >= 0.5

;---------------------------------------------------------------------------
;Jump C (spinning roundhouse)
[State -1]
type = ChangeState
value = 706
triggerall = var(59) = 0
triggerall = command = "holdup"
triggerall = command = "c"
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger2 = p2statetype = A
trigger2 = movecontact = 1
trigger2 = stateno = 600
trigger3 = p2statetype = A
trigger3 = movecontact = 1
trigger3 = stateno = 601
trigger4 = p2statetype = A
trigger4 = movecontact = 1
trigger4 = stateno = 604
trigger5 = p2statetype = A
trigger5 = movecontact = 1
trigger5 = stateno = 605
trigger6 = p2statetype = A
trigger6 = movecontact = 1
trigger6 = stateno = 704
trigger7 = p2statetype = A
trigger7 = movecontact = 1
trigger7 = stateno = 705

;---------------------------------------------------------------------------
;Jump Up A
[State -1]
type = ChangeState
value = 704
triggerall = vel X = 0
triggerall = command = "a"
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger2 = p2statetype = A
trigger2 = movecontact = 1
trigger2 = stateno = 600

;---------------------------------------------------------------------------
;Jump Up B
[State -1]
type = ChangeState
value = 705
triggerall = var(59) = 0
triggerall = vel X = 0
triggerall = command = "b"
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger2 = p2statetype = A
trigger2 = movecontact = 1
trigger2 = stateno = 600
trigger3 = p2statetype = A
trigger3 = movecontact = 1
trigger3 = stateno = 601
trigger4 = p2statetype = A
trigger4 = movecontact = 1
trigger4 = stateno = 602
trigger5 = p2statetype = A
trigger5 = movecontact = 1
trigger5 = stateno = 604
trigger6 = p2statetype = A
trigger6 = movecontact = 1
trigger6 = stateno = 704

;---------------------------------------------------------------------------
;Jump Up C
[State -1]
type = ChangeState
value = 706
triggerall = vel X = 0
triggerall = command = "c"
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger2 = p2statetype = A
trigger2 = movecontact = 1
trigger2 = stateno = 600
trigger3 = p2statetype = A
trigger3 = movecontact = 1
trigger3 = stateno = 601
trigger4 = p2statetype = A
trigger4 = movecontact = 1
trigger4 = stateno = 604
trigger5 = p2statetype = A
trigger5 = movecontact = 1
trigger5 = stateno = 605
trigger6 = p2statetype = A
trigger6 = movecontact = 1
trigger6 = stateno = 704
trigger7 = p2statetype = A
trigger7 = movecontact = 1
trigger7 = stateno = 705

;---------------------------------------------------------------------------
;Jump A
[State -1]
type = ChangeState
value = 604
triggerall = var(59) = 0
triggerall = command = "a"
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger2 = p2statetype = A
trigger2 = movecontact = 1
trigger2 = stateno = 600

;---------------------------------------------------------------------------
;Jump B
[State -1]
type = ChangeState
value = 605
triggerall = command = "b"
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger2 = p2statetype = A
trigger2 = movecontact = 1
trigger2 = stateno = 600
trigger3 = p2statetype = A
trigger3 = movecontact = 1
trigger3 = stateno = 601
trigger4 = p2statetype = A
trigger4 = movecontact = 1
trigger4 = stateno = 602
trigger5 = p2statetype = A
trigger5 = movecontact = 1
trigger5 = stateno = 604
trigger6 = p2statetype = A
trigger6 = movecontact = 1
trigger6 = stateno = 704

;---------------------------------------------------------------------------
;Jump C
[State -1]
type = ChangeState
value = 606
triggerall = var(59) = 0
triggerall = command = "c"
trigger1 = statetype = A
trigger1 = ctrl = 1
trigger2 = p2statetype = A
trigger2 = movecontact = 1
trigger2 = stateno = 600
trigger3 = p2statetype = A
trigger3 = movecontact = 1
trigger3 = stateno = 601
trigger4 = p2statetype = A
trigger4 = movecontact = 1
trigger4 = stateno = 604
trigger5 = p2statetype = A
trigger5 = movecontact = 1
trigger5 = stateno = 605
trigger6 = p2statetype = A
trigger6 = movecontact = 1
trigger6 = stateno = 704
trigger7 = p2statetype = A
trigger7 = movecontact = 1
trigger7 = stateno = 705

;---------------------------------------------------------------------------
;Asura F
[State -1]
type = ChangeState
value = 197
triggerall = var(59) = 0
triggerall = command = "s"
triggerall = command = "holdback"
trigger1 = statetype = S
trigger1 = ctrl = 1

;---------------------------------------------------------------------------
;Asura B
[State -1]
type = ChangeState
value = 196
triggerall = var(59) = 0
triggerall = command = "s"
triggerall = command = "holdfwd"
trigger1 = statetype = S
trigger1 = ctrl = 1
trigger2 = stateno = 100

;---------------------------------------------------------------------------
;Karga y Golpe C
[State -1]
type = ChangeState
value = 195
triggerall = var(59) = 0
triggerall = command = "s"
trigger1 = statetype = S
trigger1 = ctrl = 1

;---------------------------------------------------------------------------
;Tameiki Wari
[State -1]
type = ChangeState
value = 198
triggerall = var(59) = 0
triggerall = command = "Tameiki Wari"
triggerall = command = "s"
triggerall = power >= 1000
trigger1 = statetype = S
trigger1 = ctrl = 1

;---------------------------------------------------------------------------
; Zero/Alpha Counter X
[State -1]
type = ChangeState
value = 900
triggerall = var(59) = 0
triggerall = command = "QCD_x"
triggerall = power >= 500
trigger1 = stateno >= 150
trigger1 = stateno <= 153

;---------------------------------------------------------------------------
; Zero/Alpha Counter X
[State -1]
type = ChangeState
value = 900
triggerall = var(59) = 0
triggerall = command = "ff_x"
triggerall = power >= 500
trigger1 = stateno >= 150
trigger1 = stateno <= 153

;---------------------------------------------------------------------------
; Zero/Alpha Counter Y
[State -1]
type = ChangeState
value = 910
triggerall = var(59) = 0
triggerall = command = "QCD_y"
triggerall = power >= 500
trigger1 = stateno >= 150
trigger1 = stateno <= 153

;---------------------------------------------------------------------------
; Zero/Alpha Counter Y
[State -1]
type = ChangeState
value = 910
triggerall = var(59) = 0
triggerall = command = "ff_y"
triggerall = power >= 500
trigger1 = stateno >= 150
trigger1 = stateno <= 153

;---------------------------------------------------------------------------
; Zero/Alpha Counter Z
[State -1]
type = ChangeState
value = 920
triggerall = var(59) = 0
triggerall = command = "QCD_z"
triggerall = power >= 500
trigger1 = stateno >= 150
trigger1 = stateno <= 153

;---------------------------------------------------------------------------
; Zero/Alpha Counter Z
[State -1]
type = ChangeState
value = 920
triggerall = var(59) = 0
triggerall = command = "ff_z"
triggerall = power >= 500
trigger1 = stateno = [5000,5120]

;---------------------------------------------------------------------------
; Zero/Alpha Counter Z
[State -1]
type = ChangeState
value = 920
triggerall = var(59) = 0
triggerall = command = "ff_z"
triggerall = power >= 500
trigger1 = stateno >= 150
trigger1 = stateno <= 153

;---------------------------------------------------------------------------
; Zero/Alpha Counter A
[State -1]
type = ChangeState
value = 945
triggerall = var(59) = 0
triggerall = command = "QCD_a"
triggerall = power >= 500
trigger1 = stateno >= 150
trigger1 = stateno <= 153

;---------------------------------------------------------------------------
; Zero/Alpha Counter A
[State -1]
type = ChangeState
value = 945
triggerall = var(59) = 0
triggerall = power >= 500
triggerall = command = "ff_c"
trigger1 = statetype = S
trigger1 = stateno = [5000,5070]

;---------------------------------------------------------------------------
; Zero/Alpha Counter A
[State -1]
type = ChangeState
value = 945
triggerall = var(59) = 0
triggerall = command = "ff_a"
triggerall = power >= 500
trigger1 = stateno >= 150
trigger1 = stateno <= 153

;---------------------------------------------------------------------------
; Zero/Alpha Counter B
[State -1]
type = ChangeState
value = 945
triggerall = var(59) = 0
triggerall = command = "QCD_b"
triggerall = power >= 500
trigger1 = stateno >= 150
trigger1 = stateno <= 153

;---------------------------------------------------------------------------
; Zero/Alpha Counter B
[State -1]
type = ChangeState
value = 945
triggerall = var(59) = 0
triggerall = command = "ff_b"
triggerall = power >= 500
trigger1 = stateno >= 150
trigger1 = stateno <= 153

;---------------------------------------------------------------------------
; Zero/Alpha Counter C
[State -1]
type = ChangeState
value = 945
triggerall = var(59) = 0
triggerall = command = "QCD_c"
triggerall = power >= 500
trigger1 = stateno >= 150
trigger1 = stateno <= 153

;---------------------------------------------------------------------------
; Zero/Alpha Counter C
[State -1]
type = ChangeState
value = 945
triggerall = var(59) = 0
triggerall = command = "ff_c"
triggerall = power >= 500
trigger1 = stateno >= 150
trigger1 = stateno <= 153

;---------------------------------------------------------------------------
; Recovery Roll X
[State -1]
type = ChangeState
value = 930
triggerall = command = "QCD_x"
triggerall = var(59) = 0
triggerall = alive = 1
trigger1 = stateno = 5050
trigger2 = stateno = 5071

;---------------------------------------------------------------------------
; Recovery Roll Y
[State -1]
type = ChangeState
value = 932
triggerall = command = "QCD_y"
triggerall = var(59) = 0
triggerall = alive = 1
trigger1 = stateno = 5050
trigger2 = stateno = 5071

;---------------------------------------------------------------------------
; Recovery Roll Z
[State -1]
type = ChangeState
value = 934
triggerall = command = "QCD_z"
triggerall = var(59) = 0
triggerall = alive = 1
trigger1 = stateno = 5050
trigger2 = stateno = 5071

;---------------------------------------------------------------------------
; Recovery Roll A
[State -1]
type = ChangeState
value = 936
triggerall = command = "QCD_a"
triggerall = var(59) = 0
triggerall = alive = 1
trigger1 = stateno = 5050
trigger2 = stateno = 5071

;---------------------------------------------------------------------------
; Recovery Roll B
[State -1]
type = ChangeState
value = 938
triggerall = command = "QCD_b"
triggerall = var(59) = 0
triggerall = alive = 1
trigger1 = stateno = 5050
trigger2 = stateno = 5071

;---------------------------------------------------------------------------
; Recovery Roll C
[State -1]
type = ChangeState
value = 940
triggerall = command = "QCD_c"
triggerall = var(59) = 0
triggerall = alive = 1
trigger1 = stateno = 5050
trigger2 = stateno = 5071

;---------------------------------------------------------------------------
;Guard Push (Stand)
[State -1, Guard Push (Stand)]
type = ChangeState
value = 160
triggerall = stateno = 150
triggerall = var(59) = 0
triggerall = command = "xyz"
triggerall = command != "holddown"
triggerall = var(59) = 0
trigger1 = statetype = S
ignorehitpause = 1

;---------------------------------------------------------------------------
;Guard Push (Crouch)
[State -1, Guard Push (Crouch)]
type = ChangeState
value = 161
triggerall = stateno = 152
triggerall = var(59) = 0
triggerall = command = "xyz"
triggerall = var(59) = 0
trigger1 = statetype = C
ignorehitpause = 1

;---------------------------------------------------------------------------
;Guard Push (Air)
[State -1, Guard Push (Air)]
type = ChangeState
value = 162
triggerall = stateno = 154
triggerall = var(59) = 0
triggerall = command = "xyz"
triggerall = var(59) = 0
trigger1 = statetype = A
ignorehitpause = 1

;---------------------------------------------------------------------------
[State -1, SHINING GOU SHOCK]
type = ChangeState
value = 4900
triggerall = command = "ShinGoSh"
triggerall = var(59) = 0
triggerall = power >= 1000
triggerall = stateno != 2010 
triggerall = stateno != 4900 
triggerall = stateno != 4952 
trigger1 = Statetype = S && (stateno = [200,406]) || ctrl;
trigger2 = MoveContact && stateno = [200,406]

;---------------------------------------------------------------------------
;POWER add All Time
;[State -1, POWER ADD]
;type = poweradd
;trigger1 = life > 0
;trigger1 = IsHelper = 0
;value = 2

;---------------------------------------------------------------------------
[State -1, Scramble Gou Rassen]
type = ChangeState
value = 4500
triggerall = command = "sgr" && stateno != 4952
triggerall = var(59) = 0
triggerall = power >= 1000
;trigger1 = statetype = S && statetype != A
trigger1 = (stateno = [200,1012]) || ctrl
trigger5 = MoveContact && stateno = [200,1012]
trigger2 = stateno != 2010 || ctrl 
trigger3 = stateno != 4900 && ctrl
trigger4 = stateno != 4952 || ctrl

;---------------------------------------------------------------------------
[State -1,Power Add Fast]
type = changestate
value = 6072
triggerall = power < 3000
triggerall = var(59) = 0
triggerall = command = "hold_x"
triggerall = command = "hold_a"
trigger1 = statetype = S
trigger1 = ctrl = 1

;---------------------------------------------------------------------------
[State -1, CHARGE]
type = ChangeState
value = 6072
triggerall = (roundstate != [0,1]) || (roundstate != [3,4]) 
triggerall = Var(59) = 1
triggerall = statetype = S
triggerall = ctrl = 1
trigger1 = P2movetype != A && power < 3000
trigger1 = P2BodyDist X = [150,500]

;---------------------------------------------------------------------------
[State -1, CHARGE]
type = ChangeState
value = 0
triggerall = (roundstate != [0,1]) || (roundstate != [3,4]) 
triggerall = Var(59) = 1
triggerall = statetype = S
triggerall = ctrl = 1
triggerall = stateno = 6072
trigger1 = P2movetype = A
trigger2 = P2stateno != [5000,5070]
trigger3 = enemy, NumProj > 0
trigger4 = P2bodydist X < 149

;---------------------------------------------------------------------------
; Zero/Alpha Counter A
[State -1]
type = ChangeState
value = 925
triggerall = var(59) = 0
triggerall = command = "PT"
triggerall = power >= 100
trigger1 = stateno >= 150
trigger1 = stateno <= 153
triggerall = statetype = S
trigger2 = stateno = [5000,5070]

;---------------------------------------------------------------------------
; Zero/Alpha Counter A
[State -1]
type = ChangeState
value = 926
triggerall = var(59) = 0
triggerall = command = "PT"
triggerall = power >= 100
triggerall = statetype = A
trigger2 = stateno = [5000,5070]
trigger1 = stateno >= 154
