; The CMD file.
;
; Two parts: 1. Command definition and  2. State entry
; (state entry is after the commands def section)
;
; 1. Command definition
; ---------------------
; Note: The commands are CASE-SENSITIVE, and so are the command names.
; The eight directions are:
;   B, DB, D, DF, F, UF, U, UB     (all CAPS)
;   corresponding to back, down-back, down, downforward, etc.
; The six buttons are:
;   a, b, c, x, y, z               (all lower case)
;   In default key config, abc are are the bottom, and xyz are on the
;   top row. For 2 button characters, we recommend you use a and b.
;   For 6 button characters, use abc for kicks and xyz for punches.
;
; Each [Command] section defines a command that you can use for
; state entry, as well as in the CNS file.
; The command section should look like:
;
;   [Command]
;   name = some_name
;   command = the_command
;   time = time (optional -- defaults to 15 if omitted)
;
; - some_name
;   A name to give that command. You'll use this name to refer to
;   that command in the state entry, as well as the CNS. It is case-
;   sensitive (QCB_a is NOT the same as Qcb_a or QCB_A).
;
; - command
;   list of buttons or directions, separated by commas.
;   Directions and buttons can be preceded by special characters:
;   slash (/) - means the key must be held down
;          egs. command = /D       ;hold the down direction
;               command = /F, a    ;hold fwd while you press a
;   tilde (~) - to detect key releases
;          egs. command = ~a       ;release the a button
;               command = ~D, F, a ;release down, press fwd, then a
;          If you want to detect "charge moves", you can specify
;          the time the key must be held down for (in game-ticks)
;          egs. command = ~30a     ;hold a for at least 30 ticks, then release
;               command = ~30
;   dollar ($) - Direction-only: detect as 4-way
;          egs. command = $D       ;will detect if D, DB or DF is held
;               command = $B       ;will detect if B, DB or UB is held
;   plus (+) - Buttons only: simultaneous press
;          egs. command = a+b      ;press a and b at the same time
;               command = x+y+z    ;press x, y and z at the same time
;   You can combine them:
;     eg. command = ~30$D, a+b     ;hold D, DB or DF for 30 ticks, release,
;                                  ;then press a and b together
;   It's recommended that for most "motion" commads, eg. quarter-circle-fwd,
;   you start off with a "release direction". This matches the way most
;   popular fighting games implement their engine.
;
; - time (optional)
;   Time allowed to do the command, given in game-ticks. Defaults to 15
;   if omitted
;
; If you have two or more commands with the same name, all of them will
; work. You can use it to allow multiple motions for the same move.
;
; Some common commands are given below. Delete, add, or modify as you wish.

;-| Winmugen AI Commands |------------------------------------------------------

[Command]
name = "cpu1"
command = U, U, U, U
time = 0
[Command]
name = "cpu2"
command = U, U, U, D
time = 0
[Command]
name = "cpu3"
command = U, U, D, D
time = 0
[Command]
name = "cpu4"
command = U, D, D, D
time = 0
[Command]
name = "cpu5"
command = D, D, D, D
time = 0
[Command]
name = "cpu6"
command = D, D, D, U
time = 0
[Command]
name = "cpu7"
command = D, D, U, U
time = 0
[Command]
name = "cpu8"
command = D, U, U, U
time = 0
[Command]
name = "cpu9"
command = U, D, U, U
time = 0
[Command]
name = "cpu10"
command = U, U, D, U
time = 0
[Command]
name = "cpu11"
command = D, U, U, D
time = 0
[Command]
name = "cpu12"
command = U, D, D, U
time = 0
[Command]
name = "cpu13"
command = D, U, D, U
time = 0
[Command]
name = "cpu14"
command = U, D, U, D
time = 0
[Command]
name = "cpu15"
command = F, F, F, F
time = 0
[Command]
name = "cpu16"
command = B, B, B, B
time = 0
[Command]
name = "cpu17"
command = F, B, F, F
time = 0
[Command]
name = "cpu18"
command = F, F, B, F
time = 0
[Command]
name = "cpu19"
command = B, F, F, F
time = 0
[Command]
name = "cpu20"
command = F, F, F, B
time = 0
[Command]
name = "cpu21"
command = F, B, B, F
time = 0
[Command]
name = "cpu22"
command = B, F, F, B
time = 0
[Command]
name = "cpu23"
command = F, B, F, B
time = 0
[Command]
name = "cpu24"
command = B, F, B, F
time = 0
[Command]
name = "cpu25"
command = D, F, D, F
time = 0
[Command]
name = "cpu26"
command = D, B, D, B
time = 0
[Command]
name = "cpu27"
command = D, B, D, F
time = 0
[Command]
name = "cpu28"
command = D, F, D, B
time = 0
[Command]
name = "cpu29"
command = U, F, D, B
time = 0
[Command]
name = "cpu30"
command = U, B, D, F
time = 0
[Command]
name = "cpu31"
command = B, D, F, U
time = 0
[Command]
name = "cpu32"
command = F, D, B, U
time = 0
[Command]
name = "cpu33"
command = U, U, U, U
time = 0
[Command]
name = "cpu34"
command = U, U, U, D
time = 0
[Command]
name = "cpu35"
command = U, U, D, D
time = 0
[Command]
name = "cpu36"
command = U, D, D, D
time = 0
[Command]
name = "cpu37"
command = D, D, D, D
time = 0
[Command]
name = "cpu38"
command = D, D, D, U
time = 0
[Command]
name = "cpu39"
command = D, D, U, U
time = 0
[Command]
name = "cpu40"
command = D, U, U, U
time = 0
[Command]
name = "cpu41"
command = U, D, U, U
time = 0
[Command]
name = "cpu42"
command = U, U, D, U
time = 0
[Command]
name = "cpu43"
command = D, U, U, D
time = 0
[Command]
name = "cpu44"
command = U, D, D, U
time = 0
[Command]
name = "cpu45"
command = D, U, D, U
time = 0
[Command]
name = "cpu46"
command = U, D, U, D
time = 0
[Command]
name = "cpu47"
command = F, F, F, F
time = 0
[Command]
name = "cpu48"
command = B, B, B, B
time = 0
[Command]
name = "cpu49"
command = F, B, F, F
time = 0
[Command]
name = "cpu50"
command = F, F, B, F
time = 0
[Command]
name = "cpu51"
command = B, F, F, F
time = 0

;-| Super Motions |--------------------------------------------------------
[command]
name = "360x"
command = ~F, D, B, U, F, x
time = 30
buffer.time = 5
[command]
name = "360x"
command = ~F, D, B, U, F, ~x
time = 30
buffer.time = 5
[command]
name = "360x"
command = ~D, B, U, F, D, x
time = 30
buffer.time = 5
[command]
name = "360x"
command = ~D, B, U, F, D, ~x
time = 30
buffer.time = 5
[command]
name = "360x"
command = ~B, U, F, D, B, x
time = 30
buffer.time = 5
[command]
name = "360x"
command = ~B, U, F, D, B, ~x
time = 30
buffer.time = 5
[command]
name = "360x"
command = ~U, F, D, B, U, x
time = 30
buffer.time = 5
[command]
name = "360x"
command = ~U, F, D, B, U, ~x
time = 30
buffer.time = 5
[command]
name = "360x"
command = ~B, D, F, U, B, x
time = 30
buffer.time = 5
[command]
name = "360x"
command = ~B, D, F, U, B, ~x
time = 30
buffer.time = 5
[command]
name = "360x"
command = ~D, F, U, B, D, x
time = 30
buffer.time = 5
[command]
name = "360x"
command = ~D, F, U, B, D, ~x
time = 30
buffer.time = 5
[command]
name = "360x"
command = ~F, U, B, D, F, x
time = 30
buffer.time = 5
[command]
name = "360x"
command = ~F, U, B, D, F, ~x
time = 30
buffer.time = 5
[command]
name = "360x"
command = ~U, B, D, F, U, x
time = 30
buffer.time = 5
[command]
name = "360x"
command = ~U, B, D, F, U, ~x
time = 30
buffer.time = 5

[command]
name = "360y"
command = ~F, D, B, U, F, y
time = 30
buffer.time = 5
[command]
name = "360y"
command = ~F, D, B, U, F, ~y
time = 30
buffer.time = 5
[command]
name = "360y"
command = ~D, B, U, F, D, y
time = 30
buffer.time = 5
[command]
name = "360y"
command = ~D, B, U, F, D, ~y
time = 30
buffer.time = 5
[command]
name = "360y"
command = ~B, U, F, D, B, y
time = 30
buffer.time = 5
[command]
name = "360y"
command = ~B, U, F, D, B, ~y
time = 30
buffer.time = 5
[command]
name = "360y"
command = ~U, F, D, B, U, y
time = 30
buffer.time = 5
[command]
name = "360y"
command = ~U, F, D, B, U, ~y
time = 30
buffer.time = 5
[command]
name = "360y"
command = ~B, D, F, U, B, y
time = 30
buffer.time = 5
[command]
name = "360y"
command = ~B, D, F, U, B, ~y
time = 30
buffer.time = 5
[command]
name = "360y"
command = ~D, F, U, B, D, y
time = 30
buffer.time = 5
[command]
name = "360y"
command = ~D, F, U, B, D, ~y
time = 30
buffer.time = 5
[command]
name = "360y"
command = ~F, U, B, D, F, y
time = 30
buffer.time = 5
[command]
name = "360y"
command = ~F, U, B, D, F, ~y
time = 30
buffer.time = 5
[command]
name = "360y"
command = ~U, B, D, F, U, y
time = 30
buffer.time = 5
[command]
name = "360y"
command = ~U, B, D, F, U, ~y
time = 30
buffer.time = 5

[command]
name = "360z"
command = ~F, D, B, U, F, z
time = 30
buffer.time = 5
[command]
name = "360z"
command = ~F, D, B, U, F, ~z
time = 30
buffer.time = 5
[command]
name = "360z"
command = ~D, B, U, F, D, z
time = 30
buffer.time = 5
[command]
name = "360z"
command = ~D, B, U, F, D, ~z
time = 30
buffer.time = 5
[command]
name = "360z"
command = ~B, U, F, D, B, z
time = 30
buffer.time = 5
[command]
name = "360z"
command = ~B, U, F, D, B, ~z
time = 30
buffer.time = 5
[command]
name = "360z"
command = ~U, F, D, B, U, z
time = 30
buffer.time = 5
[command]
name = "360z"
command = ~U, F, D, B, U, ~z
time = 30
buffer.time = 5
[command]
name = "360z"
command = ~B, D, F, U, B, z
time = 30
buffer.time = 5
[command]
name = "360z"
command = ~B, D, F, U, B, ~z
time = 30
buffer.time = 5
[command]
name = "360z"
command = ~D, F, U, B, D, z
time = 30
buffer.time = 5
[command]
name = "360z"
command = ~D, F, U, B, D, ~z
time = 30
buffer.time = 5
[command]
name = "360z"
command = ~F, U, B, D, F, z
time = 30
buffer.time = 5
[command]
name = "360z"
command = ~F, U, B, D, F, ~z
time = 30
buffer.time = 5
[command]
name = "360z"
command = ~U, B, D, F, U, z
time = 30
buffer.time = 5
[command]
name = "360z"
command = ~U, B, D, F, U, ~z
time = 30
buffer.time = 5

[Command]
name = "hyper"
command = ~30$F,B,F,B,x+y

[Command]
name = "hyper"
command = ~30$F,B,F,B,y+z

[Command]
name = "hyper"
command = ~30$F,B,F,B,x+z

[Command]
name = "supersmackdown2"
command = ~30$U,D,U,D,x+y

[Command]
name = "supersmackdown2"
command = ~30$U,D,U,D,y+z

[Command]
name = "supersmackdown2"
command = ~30$U,D,U,D,x+z

[Command]
name = "supersmackdown"
command = ~30$U,D,U,D,x

[Command]
name = "supersmackdown"
command = ~30$U,D,U,D,y

[Command]
name = "supersmackdown"
command = ~30$U,D,U,D,z

[Command]
name = "smackdown"
command = ~D,D,D,x+y
time = 30

[Command]
name = "smackdown"
command = ~D,D,D,y+z
time = 30

[Command]
name = "smackdown"
command = ~D,D,D,x+z
time = 30

[Command]
name = "AcrobaticSDM"
command = ~D, DF, F, D, DF, F, x+y
time = 30

[Command]
name = "AcrobaticSDM"
command = ~D, DF, F, D, DF, F, y+z
time = 30

[Command]
name = "AcrobaticSDM"
command = ~D, DF, F, D, DF, F, x+z
time = 30

; Sonic Acrobatic Rush DM
[Command]
name = "AcrobaticDM"
command = ~D, DF, F, D, DF, F, x
time = 30

[Command]
name = "AcrobaticDM"
command = ~D, DF, F, D, DF, F, ~x
time = 30

[Command]
name = "AcrobaticDM"
command = ~D, DF, F, D, DF, F, y
time = 30

[Command]
name = "AcrobaticDM"
command = ~D, DF, F, D, DF, F, ~y
time = 30

[Command]
name = "AcrobaticDM"
command = ~D, DF, F, D, DF, F, z
time = 30

[Command]
name = "AcrobaticDM"
command = ~D, DF, F, D, DF, F, ~z
time = 30

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

[Command]
name = "runSDM"
command = ~D, DB, B, D, DB, B, y+z
time = 30

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

[Command]
name = "runDM"
command = ~D, DB, B, D, DB, B, x
time = 30

[Command]
name = "runDM"
command = ~D, DB, B, D, DB, B, ~x
time = 30

[Command]
name = "runDM"
command = ~D, DB, B, D, DB, B, y
time = 30

[Command]
name = "runDM"
command = ~D, DB, B, D, DB, B, ~y
time = 30

[Command]
name = "runDM"
command = ~D, DB, B, D, DB, B, z
time = 30

[Command]
name = "runDM"
command = ~D, DB, B, D, DB, B, ~z
time = 30

;-| EX Motions |-----------------------------------------------------------

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

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

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

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

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

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

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

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

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

[Command]
name = "waveex"
command = ~B,DB,D,DF,F,x+y

[Command]
name = "waveex"
command = ~B,DB,D,DF,F,y+z

[Command]
name = "waveex"
command = ~B,DB,D,DF,F,x+z

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

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

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

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

[Command]
name = "flash"
command = ~30$F,B,x

[Command]
name = "flash"
command = ~30$F,B,~x

[Command]
name = "flash"
command = ~30$F,B,y

[Command]
name = "flash"
command = ~30$F,B,~y

[Command]
name = "flash"
command = ~30$F,B,z

[Command]
name = "flash"
command = ~30$F,B,~z

[Command]
name = "flash"
command = ~30$F,B,a

[Command]
name = "flash"
command = ~30$F,B,~a

[Command]
name = "spind"
command = ~30$U,D,x

[Command]
name = "spind"
command = ~30$U,D,~x

[Command]
name = "spind"
command = ~30$U,D,y

[Command]
name = "spind"
command = ~30$U,D,~y

[Command]
name = "spind"
command = ~30$U,D,z

[Command]
name = "spind"
command = ~30$U,D,~z

[Command]
name = "lightx"
command = ~B,DB,D,DF,F,x

[Command]
name = "lightx"
command = ~B,DB,D,DF,F,~x

[Command]
name = "lighty"
command = ~B,DB,D,DF,F,y

[Command]
name = "lighty"
command = ~B,DB,D,DF,F,~y

[Command]
name = "lightz"
command = ~B,DB,D,DF,F,z

[Command]
name = "lightz"
command = ~B,DB,D,DF,F,~z

[Command]
name = "light2x"
command = ~F,DF,D,DB,B,x

[Command]
name = "light2x"
command = ~F,DF,D,DB,B,~x

[Command]
name = "light2y"
command = ~F,DF,D,DB,B,y

[Command]
name = "light2y"
command = ~F,DF,D,DB,B,~y

[Command]
name = "light2z"
command = ~F,DF,D,DB,B,z

[Command]
name = "light2z"
command = ~F,DF,D,DB,B,~z

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

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

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

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

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

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

[Command]
name = "home"
command = ~B,D,DB,a

[Command]
name = "home"
command = ~B,D,DB,~a

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

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

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

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

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

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

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

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

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

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

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

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

[Command]
name = "rolla"
command = ~D,DB,B,a

[Command]
name = "rolla"
command = ~D,DB,B,~a

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

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

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

;-| Double Tap |-----------------------------------------------------------
[Command]
name = "FF";Required (do not remove)
command = F, F
time = 10

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

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

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

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

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

[Command]
name = "recovery";Required (do not remove)
command = x+z
time = 1
;-| Dir + Button |---------------------------------------------------------
[Command]
name = "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

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

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

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

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

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

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

[Command]
name = "Provocate"
command = s

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

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

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

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

[Command]
name = "holda" ;Required (do not remove)
command = /a
time = 1

[Command]
name = "holdx" ;Required (do not remove)
command = /x
time = 1

[Command]
name = "holdy" ;Required (do not remove)
command = /y
time = 1

[Command]
name = "holdz" ;Required (do not remove)
command = /z
time = 1

;---------------------------------------------------------------------------
; 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 || stateno = [100,101]
;       0 or 1 : 1 if player has control. Unless "interrupting" another
;                move, you'll want ctrl || stateno = [100,101] = 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"
;
; Note: The order of state entry is important.
;   State entry with a certain command must come before another state
;   entry with a command that is the subset of the first.  
;   For example, command "fwd_a" must be listed before "a", and
;   "fwd_ab" should come before both of the others.
;
; 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]

;===========================================================================
;------------------------------AI-------------------------------------------
;===========================================================================
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; Taunt
[State -1, Taunt]
type = ChangeState
value = 199
triggerall = var(58)
triggerall = statetype != A
triggerall = ctrl
triggerall = enemynear, numproj = 0
triggerall = enemynear, movetype != A
triggerall = ((Life*100)/LifeMax) >= 40
trigger1 = p2bodydist x >= 150
trigger1 = life >= enemynear, life
trigger1 = random <= 6 && var(58) >= 6 || random <= 20 && var(58) >= 3 && var(58) <= 5 || random <= 40 &&var(58) >= 1 && var(58) <= 2
trigger1 = roundstate = 2
trigger2 = roundstate = 2
trigger2 = p2bodydist x >= 150
trigger2 = p2statetype = L
trigger2 = random <= 12 && var(58) >= 6 || random <= 32 && var(58) >= 3 && var(58) <= 5 || random <= 56 && var(58) >= 1 && var(58) <= 2
trigger3 = roundstate = 3
trigger3 = prevstateno != [195,199]
trigger3 = win
;---------------------------------------------------------------------------
[State -1, AI Jump]
type = ChangeState
value = 40
triggerall = var(58)
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = ctrl
triggerall = stateno != 40
trigger1 = enemynear, movetype = A && p2bodydist x < 160 && enemynear, hitdefattr = SC, AT
trigger1 = var(58) >= 4
trigger1 = Random < (900 * (var(58) ** 2 / 64.0)) || var(58) >= 8
trigger2 = var(0)
trigger2 = Random < (500 * (var(58) ** 2 / 64.0))
trigger2 = p2bodydist x >= 60
trigger3 = var(0)
trigger3 = numtarget(422) || numtarget(1400) || numtarget(720) || numtarget(3400)
trigger3 = Random < (900 * (var(58) ** 2 / 64.0))
;-----------------------------------------------------------------------------
; hyper Grab
[State -1]
type = ChangeState
value = 3400
triggerall = roundstate = 2
triggerall = var(58)
triggerall = var(0)
triggerall = statetype = A
triggerall = power >= 3000
triggerall = p2bodydist y >= -60
triggerall = enemynear,statetype != L
triggerall = p2bodydist x = [-20,300]
trigger1 = stateno = 600 || stateno = 610 || stateno = 620 || stateno = 1400
trigger1 = movecontact
trigger1 = Random < (32 * (var(58) ** 2 / 64.0))
trigger1 = var(58) = [1,5]
trigger2 = stateno = 1400
trigger2 = var(2) > 1
trigger2 = var(9)
trigger2 = movecontact
trigger2 = Random < (900 * (var(58) ** 2 / 64.0))
trigger3 = stateno = 1400
trigger3 = var(2) > 1
trigger3 = !var(9)
trigger3 = movecontact
trigger3 = Random < (250 * (var(58) ** 2 / 64.0))
;-----------------------------------------------------------------------------
; hyper attack
[State -1]
type = ChangeState
value = 3300
triggerall = roundstate = 2
triggerall = var(58)
triggerall = var(0)
triggerall = statetype = A
triggerall = power >= 3000
triggerall = var(30) <= 4
triggerall = enemynear,statetype != L
trigger1 = ctrl
trigger1 = Random < (12 * (var(58) ** 2 / 64.0))
trigger1 = var(58) = [1,5]
trigger2 = enemynear,ctrl = 0
trigger2 = ctrl
trigger2 = enemynear,movetype = A
trigger2 = var(58) >= 6
trigger2 = Random < (500 * (var(58) ** 2 / 64.0))
;-----------------------------------------------------------------------------
; Super smackdown 2
[State -1]
type = ChangeState
value = 3210
triggerall = roundstate = 2
triggerall = var(58)
triggerall = var(0)
triggerall = statetype = A
triggerall = power >= 2000
triggerall = p2bodydist Y >= -20
triggerall = p2bodydist x <= 28
trigger1 = ctrl
trigger1 = Random < (6 * (var(58) ** 2 / 64.0))
trigger1 = p2statetype != L
trigger2 = stateno = 620
trigger2 = movecontact
trigger2 = Random < (25 * (var(58) ** 2 / 64.0))
trigger3 = stateno = 620
trigger3 = var(2)
trigger3 = movecontact
trigger3 = Random < (100 * (var(58) ** 2 / 64.0))
;-----------------------------------------------------------------------------
; Super smackdown
[State -1]
type = ChangeState
value = 3200
triggerall = roundstate = 2
triggerall = var(58)
triggerall = var(0)
triggerall = statetype = A
triggerall = power >= 1000
triggerall = p2bodydist Y >= -20
triggerall = p2bodydist x <= 28
trigger1 = ctrl
trigger1 = Random < (6 * (var(58) ** 2 / 64.0))
trigger1 = p2statetype != L
trigger2 = stateno = 620
trigger2 = movecontact
trigger2 = Random < (25 * (var(58) ** 2 / 64.0))
trigger3 = stateno = 620
trigger3 = var(2)
trigger3 = movecontact
trigger3 = Random < (100 * (var(58) ** 2 / 64.0))
;---------------------------------------------------------------------------
; Smackdown
[State -1]
type = ChangeState
value = 3100
triggerall = roundstate = 2
triggerall = var(58)
triggerall = !var(0)
triggerall = power  >= 3000
triggerall = statetype != A
trigger1 = ctrl || stateno = [100,101]
trigger1 = Random < (24 * (var(58) ** 2 / 64.0))
trigger2 = stateno = 1000 || stateno = 1010 || stateno = 1020 || stateno = 1032 && numtarget(1031)
trigger2 = movecontact
trigger2 = p2bodydist x <= 13
trigger3 = p2bodydist x <= 13
trigger3 = enemynear, ctrl = 0 || statetype = A
trigger3 = var(58) >= 6
trigger3 = ctrl || stateno = [100,101]
;---------------------------------------------------------------------------
; Super Run SDM
[State -1]
type = ChangeState
value = 3060
triggerall = roundstate = 2
triggerall = var(58)
triggerall = !var(0)
triggerall = power  >= 2000
triggerall = statetype != A
triggerall = p2statetype != L
trigger1 = ctrl || stateno = [100,101]
trigger1 = enemynear, ctrl = 0
trigger1 = p2statetype != A
trigger1 = enemynear, anim != [120,152]
trigger1 = Random < (100 * (var(58) ** 2 / 64.0))
;---------------------------------------------------------------------------
; SONIC_ACROBATIC_RUSH SDM
[State -1]
type = ChangeState
value = 3010
triggerall = roundstate = 2
triggerall = var(58)
triggerall = !var(0)
triggerall = power >= 2000
triggerall = statetype != A
trigger1 = ctrl || stateno = [100,101]
trigger1 = p2statetype != A
trigger1 = p2bodydist X <= 72
trigger1 = enemynear, anim != [120,152]
trigger1 = Random < (12 * (var(58) ** 2 / 64.0))
trigger2 = stateno = 1000 || stateno = 1010 || stateno = 1020 || stateno = 1032 && numtarget(1031)
trigger2 = movecontact
trigger2 = Random < (500 * (var(58) ** 2 / 64.0)) || numtarget(1031)
;---------------------------------------------------------------------------
; Super Run DM
[State -1]
type = ChangeState
value = 3050
triggerall = roundstate = 2
triggerall = var(58)
triggerall = !var(0)
triggerall = power  >= 1000
triggerall = statetype != A
triggerall = p2statetype != L
trigger1 = ctrl || stateno = [100,101]
trigger1 = enemynear, ctrl = 0
trigger1 = p2statetype != A
trigger1 = enemynear, anim != [120,152]
trigger1 = Random < (100 * (var(58) ** 2 / 64.0))
;---------------------------------------------------------------------------
; SONIC_ACROBATIC_RUSH DM
[State -1]
type = ChangeState
value = 3000
triggerall = roundstate = 2
triggerall = var(58)
triggerall = !var(0)
triggerall = power  >= 1000
triggerall = statetype != A
trigger1 = ctrl || stateno = [100,101]
trigger1 = p2statetype != A
trigger1 = p2bodydist X <= 72
trigger1 = enemynear, anim != [120,152]
trigger1 = Random < (12 * (var(58) ** 2 / 64.0))
trigger2 = stateno = 1000 || stateno = 1010 || stateno = 1020 || stateno = 1032 && numtarget(1031)
trigger2 = movecontact
trigger2 = Random < (500 * (var(58) ** 2 / 64.0)) || numtarget(1031)
;-----------------------------------------------------------------------------
; flash
[State -1]
type = ChangeState
value = 1410
triggerall = roundstate = 2
triggerall = var(58)
triggerall = var(0)
triggerall = statetype = A
triggerall = enemynear,statetype != L
triggerall = enemynear,movetype != H
triggerall = enemynear,stateno != 3312
triggerall = stateno != 1410
trigger1 = ctrl
trigger1 = Random < (64 * (var(58) ** 2 / 64.0))
trigger1 = p2bodydist x >= 100
trigger2 = enemynear,ctrl = 0
trigger2 = ctrl
trigger2 = enemynear,movetype = A
trigger2 = var(58) >= 6
trigger2 = Random < (250 * (var(58) ** 2 / 64.0))
;-----------------------------------------------------------------------------
; spin dowm
[State -1]
type = ChangeState
value = 1400
triggerall = roundstate = 2
triggerall = var(58)
triggerall = var(0)
triggerall = statetype = A
triggerall = p2bodydist Y >= -100
triggerall = enemynear,statetype != L
trigger1 = ctrl
trigger1 = Random < (16 * (var(58) ** 2 / 64.0))
trigger1 = p2bodydist x <= 140
trigger1 = enemynear,movetype != H
trigger2 = enemynear,ctrl = 0
trigger2 = enemynear,movetype = A
trigger2 = var(58) >= 5
trigger2 = Random < (100 * (var(58) ** 2 / 64.0))
trigger2 = ctrl
trigger2 = enemynear,movetype != H
trigger3 = stateno = 620
trigger3 = movecontact
trigger3 = Random < (500 * (var(58) ** 2 / 64.0))
trigger4 = stateno = 600 || stateno = 610
trigger4 = p2bodydist y <= -30
trigger4 = movecontact
trigger4 = Random < (500 * (var(58) ** 2 / 64.0))
;-----------------------------------------------------------------------------
; dizzy run
[State -1]
type = ChangeState
value = 1320+random%2
triggerall = !inguarddist
triggerall = var(58)
triggerall = !var(0)
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = enemynear,movetype != A
triggerall = enemynear,statetype != A
triggerall = enemynear,movetype != H
triggerall = p2statetype != L
trigger1 = ctrl
trigger1 = p2bodydist x >= 150 || var(58) = [1,2]
trigger1 = Random < (24 * (var(58) ** 2 / 64.0))
;-----------------------------------------------------------------------------
; sonic attack
[State -1]
type = ChangeState
value = 1310+random%2
triggerall = !inguarddist
triggerall = var(58)
triggerall = !var(0)
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = p2statetype != L
trigger1 = ctrl
trigger1 = p2bodydist x >= 100 || var(58) = [1,2]
trigger1 = Random < (24 * (var(58) ** 2 / 64.0))
;-----------------------------------------------------------------------------
; AI Light speed dash 2
[State -1]
type = ChangeState
value = 1301
triggerall = roundstate = 2
triggerall = var(58)
triggerall = !var(0)
triggerall = statetype != A
triggerall = backedgedist >= 40
triggerall = ctrl || stateno = [100,101]
triggerall = prevstateno != [1300,1301]
trigger1 = Random < (2 * (var(58) ** 2 / 64.0))
trigger2 = inguarddist || enemynear,movetype = A
trigger2 = Random < (10 * (var(58) ** 2 / 64.0))
trigger2 = var(58) >= 3
trigger3 = p2bodydist x <= 80
trigger3 = Random < (6 * (var(58) ** 2 / 64.0))
;-----------------------------------------------------------------------------
; AI Light speed dash
[State -1]
type = ChangeState
value = 1300
triggerall = roundstate = 2
triggerall = var(58)
triggerall = !var(0)
triggerall = statetype != A
triggerall = frontedgedist >= 60
triggerall = ctrl || stateno = [100,101]
triggerall = prevstateno != [1300,1301]
trigger1 = Random < (2 * (var(58) ** 2 / 64.0))
trigger2 = inguarddist || enemynear,movetype = A
trigger2 = Random < (16 * (var(58) ** 2 / 64.0))
trigger2 = var(58) >= 3
trigger3 = p2bodydist x >= 200
trigger3 = Random < (20 * (var(58) ** 2 / 64.0))
trigger4 = backedgedist < 20
trigger4 = p2bodydist x <= 60
trigger4 = enemynear,facing != facing
trigger4 = enemynear,movetype = A
trigger4 = Random < (500 * (var(58) ** 2 / 64.0)) || var(58) >= 8
trigger4 = var(58) >= 4
;------------------------------------------------------
; AIR EX Homing Attack
[State -1]
type = ChangeState
value = 1253
triggerall = roundstate = 2
triggerall = var(58)
triggerall = !var(0)
triggerall = statetype = A
triggerall = power >= 500
trigger1 = ctrl || stateno = [100,101]
trigger1 = enemynear, movetype != A
trigger1 = enemynear, stateno != 100
trigger1 = Random < (14 * (var(58) ** 2 / 64.0))
trigger1 = p2bodydist X >= 100
;------------------------------------------------------
; EX Homing Attack
[State -1]
type = ChangeState
value = 1250
triggerall = roundstate = 2
triggerall = var(58)
triggerall = !var(0)
triggerall = statetype != A
triggerall = power >= 500
trigger1 = ctrl || stateno = [100,101]
trigger1 = enemynear, movetype != A
trigger1 = enemynear, stateno != 100
trigger1 = Random < (14 * (var(58) ** 2 / 64.0))
trigger1 = p2bodydist X >= 100
;------------------------------------------------------
; AIR Homing Attack
[State -1]
type = ChangeState
value = 1203
triggerall = roundstate = 2
triggerall = var(58)
triggerall = !var(0)
triggerall = statetype = A
trigger1 = ctrl || stateno = [100,101]
trigger1 = enemynear, movetype != A
trigger1 = enemynear, stateno != 100
trigger1 = Random < (34 * (var(58) ** 2 / 64.0))
trigger1 = p2bodydist x >= 34
;------------------------------------------------------
; Homing Attack
[State -1]
type = ChangeState
value = 1200
triggerall = roundstate = 2
triggerall = var(58)
triggerall = !var(0)
triggerall = statetype != A
trigger1 = ctrl || stateno = [100,101]
trigger1 = enemynear, movetype != A
trigger1 = enemynear, stateno != 100
trigger1 = Random < (34 * (var(58) ** 2 / 64.0))
;---------------------------------------------------------------------------
; Split-Second EX
[State -1]
type = ChangeState
value  = 1050
triggerall = roundstate = 2
triggerall = var(58)
triggerall = !var(0)
triggerall = statetype != A
triggerall = power >= 500
triggerall = p2bodydist y >= -102
trigger1 = stateno = 1000
trigger1 = movecontact
trigger1 = Random < (50 * (var(58) ** 2 / 64.0))
;---------------------------------------------------------------------------
; Split-Second
[State -1]
type = ChangeState
value  = 1040
triggerall = roundstate = 2
triggerall = var(58)
triggerall = !var(0)
triggerall = statetype != A
triggerall = p2statetype != L
triggerall = p2bodydist y >= -75
trigger1 = ctrl || stateno = [100,101]
trigger1 = p2bodydist X <= 48
trigger1 = p2statetype != A
trigger1 = enemynear, ctrl = 0
trigger1 = enemynear, time <= 4
trigger1 = var(58) >= 6
trigger1 = Random < (64 * (var(58) ** 2 / 64.0))
trigger2 = p2bodydist X <= 56
trigger2 = ctrl || stateno = [100,101]
trigger2 = p2statetype = A
trigger2 = Random < (34 * (var(58) ** 2 / 64.0))
trigger2 = enemynear,movetype != H
trigger3 = p2bodydist X <= 56
trigger3 = ctrl || stateno = [100,101]
trigger3 = p2statetype = A && enemynear, ctrl = 0
trigger3 = Random < (64 * (var(58) ** 2 / 64.0))
trigger3 = enemynear,movetype != H
trigger4 = stateno = 1000
trigger4 = movecontact
trigger4 = Random < (300 * (var(58) ** 2 / 64.0))
trigger4 = power < 1000
;-----------------------------------------------------------------------------
; Roll_Ex
[State -1]
type = ChangeState
value = 1030
triggerall = roundstate = 2
triggerall = var(58)
triggerall = !var(0)
triggerall = !var(2)
triggerall = power >= 500
triggerall = statetype != A
triggerall = p2statetype != L
trigger1 = stateno = 220 || stateno = 421 || stateno = 521
trigger1 = movecontact
trigger1 = Random < (100 * (var(58) ** 2 / 64.0))
;-----------------------------------------------------------------------------
; Roll_Hard
[State -1]
type = ChangeState
value = 1020
triggerall = roundstate = 2
triggerall = var(58)
triggerall = !var(0)
triggerall = statetype != A
trigger1 = ctrl || stateno = [100,101]
trigger1 = p2movetype != A
trigger1 = p2statetype != A
trigger1 = p2bodydist X <= 69
trigger1 = p2stateno != 100
trigger1 = enemynear, numproj = 0
trigger1 = Random < (24 * (var(58) ** 2 / 64.0))
;-----------------------------------------------------------------------------
; Roll_Med
[State -1]
type = ChangeState
value = 1010
triggerall = roundstate = 2
triggerall = var(58)
triggerall = !var(0)
triggerall = statetype != A
triggerall = p2statetype != L
trigger1 = stateno = 420
trigger1 = movecontact
trigger1 = Random < (350 * (var(58) ** 2 / 64.0))
trigger2 = ctrl || stateno = [100,101]
trigger2 = p2movetype != A
trigger2 = p2statetype != A
trigger2 = p2bodydist X <= 42
trigger2 = Random < (16 * (var(58) ** 2 / 64.0))
;-----------------------------------------------------------------------------
; Roll_Weak
[State -1]
type = ChangeState
value = 1000
triggerall = roundstate = 2
triggerall = var(58)
triggerall = !var(0)
triggerall = statetype != A
triggerall = p2statetype != L
trigger1 = stateno = 220 || stateno = 421 || stateno = 521
trigger1 = movecontact
trigger1 = Random < (350 * (var(58) ** 2 / 64.0))
trigger2 = ctrl || stateno = [100,101]
trigger2 = p2movetype != A
trigger2 = p2statetype != A
trigger2 = p2bodydist X <= 32
trigger2 = Random < (16 * (var(58) ** 2 / 64.0))
;---------------------------------------------------------------------------
;Spindash
[State -1, Spindash]
type = ChangeState
value = 950
triggerall = roundstate = 2
triggerall = var(58)
triggerall = statetype != A
trigger1 = ctrl || stateno = [100,101]
trigger1 = p2bodydist x >= 100
trigger1 = p2statetype != A
trigger1 = p2movetype != A
trigger1 = Random < (10 * (var(58) ** 2 / 64.0))
trigger2 = ctrl || stateno = [100,101]
trigger2 = enemynear, statetype = L
trigger2 = Random < (32 * (var(58) ** 2 / 64.0))
trigger2 = p2bodydist x <= 77
trigger3 = stateno = 220 || stateno = 420 || stateno = 421 || stateno = 521
trigger3 = movecontact
trigger3 = Random < (100 * (var(58) ** 2 / 64.0))
;---------------------------------------------------------------------------
;AI Stun
[State -1, AI Stun]
type = ChangeState
value = 900
triggerall = roundstate = 2
triggerall = var(20)
triggerall = var(58)
triggerall = statetype != A
triggerall = ctrl || stateno = [100,101]
triggerall = p2bodydist X <= 58
triggerall = p2statetype != A
triggerall = !numtarget(910)
triggerall = p2movetype != H
trigger1 = Random < (6 * (var(58) ** 2 / 64.0))
trigger2 = p2statetype = L
trigger2 = Random < (122 * (var(58) ** 2 / 64.0))
trigger2 = enemynear,time <= 2
;---------------------------------------------------------------------------
;AI Air Throw
[State -1, AI Air Throw]
type = ChangeState
value = 850
triggerall = roundstate = 2
triggerall = var(58) >= 4
triggerall = var(0)
triggerall = statetype = A
triggerall = ctrl
triggerall = p2statetype != L
triggerall = p2statetype = A
triggerall = p2bodydist Y = [-40,86]
trigger1 = p2bodydist x <= 22
trigger1 = Random < (200 * (var(58) ** 2 / 64.0))
trigger1 = enemynear,movetype != H
trigger2 = enemynear, anim >= 120 && enemynear, anim <= 160 && p2bodydist x <= 28
trigger2 = var(58) >= 6
trigger3 = p2bodydist x <= 22
trigger3 = Random < (20 * (var(58) ** 2 / 64.0))
trigger3 = enemynear,movetype = H
trigger4 = p2bodydist x <= 22
trigger4 = Random < (200 * (var(58) ** 2 / 64.0))
trigger4 = enemynear,movetype = H
trigger4 = var(2) > 1
trigger4 = var(9)
;---------------------------------------------------------------------------
;AI Throw
[State -1, AI Throw]
type = ChangeState
value = 800
triggerall = roundstate = 2
triggerall = var(58)
triggerall = statetype != A
triggerall = ctrl || stateno = [100,101]
triggerall = p2statetype != L
triggerall = p2movetype != A
triggerall = p2movetype != H
trigger1 = p2bodydist x <= 22 && p2statetype != A
trigger1 = Random < (64 * (var(58) ** 2 / 64.0))
trigger2 = enemynear, anim >= 120 && enemynear, anim <= 152 && p2bodydist x <= 28
trigger2 = p2statetype != A
trigger2 = var(58) >= 6

;---------------------------------------------------------------------------
[State -1, AI Air dodge]
type = ChangeState
value = 257
triggerall = roundstate = 2
triggerall = var(58)
triggerall = var(0)
triggerall = statetype = A
triggerall = ctrl
triggerall = p2movetype != H
trigger1 = Random < (20 * (var(58) ** 2 / 64.0))
trigger1 = inguarddist
trigger1 = var(58) >= 3

;---------------------------------------------------------------------------
[State -1, AI Standing dodge]
type = ChangeState
value = 254
triggerall = roundstate = 2
triggerall = var(58)
triggerall = statetype != A
triggerall = ctrl || stateno = [100,101]
triggerall = p2movetype != H
trigger1 = Random < (12 * (var(58) ** 2 / 64.0))
trigger1 = inguarddist
trigger1 = var(58) >= 3

;---------------------------------------------------------------------------
[State -1, AI Fwd dodge]
type = ChangeState
value = 255
triggerall = roundstate = 2
triggerall = var(58)
triggerall = statetype != A
triggerall = ctrl || stateno = [100,101]
triggerall = p2movetype != H
trigger1 = Random < (12 * (var(58) ** 2 / 64.0))
trigger1 = inguarddist
trigger1 = var(58) >= 3
trigger2 = p2bodydist X >= 100 && Random < (3 * (var(58) ** 2 / 64.0))

;---------------------------------------------------------------------------
[State -1, AI Backwards dodge]
type = ChangeState
value = 256
triggerall = roundstate = 2
triggerall = var(58)
triggerall = statetype != A
triggerall = ctrl || stateno = [100,101]
triggerall = p2movetype != H
trigger1 = Random < (12 * (var(58) ** 2 / 64.0))
trigger1 = inguarddist
trigger1 = var(58) >= 3

;---------------------------------------------------------------------------
[State -1, AI Air Dash Back]
type = ChangeState
value = 115
Triggerall=!Inguarddist
triggerall = roundstate = 2
triggerall = var(58)
triggerall = var(0)
triggerall = roundstate = 2
triggerall = statetype = A
triggerall = enemynear,movetype != H
triggerall = ctrl 
triggerall = var(3) < 2
triggerall = stateno != 115
triggerall = backedgebodydist >= 50
trigger1 = Random < (6 * (var(58) ** 2 / 64.0))
trigger2 = enemynear,statetype = A || enemynear,movetype = A
trigger2 = Random < (30 * (var(58) ** 2 / 64.0))

;---------------------------------------------------------------------------
[State -1, AI Air Dash Fwd]
type = ChangeState
value = 110
Triggerall=!Inguarddist
triggerall = roundstate = 2
triggerall = var(58)
triggerall = var(0)
triggerall = roundstate = 2
triggerall = statetype = A
triggerall = ctrl 
triggerall = var(3) < 2
triggerall = stateno != 110
triggerall = p2movetype != A
trigger1 = p2bodydist x >= 100
trigger1 = Random < (500 * (var(58) ** 2 / 64.0))
trigger2 = enemynear,statetype = A || enemynear,movetype = A
trigger2 = Random < (30 * (var(58) ** 2 / 64.0))
trigger2 = backedgebodydist <= 49

;---------------------------------------------------------------------------
[State -1, AI Run Back]
type = ChangeState
value = 105
triggerall = var(58)
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = p2bodydist x <= 100
triggerall = enemynear,movetype != H
triggerall = ctrl
triggerall = backedgebodydist >= 50
trigger1 = Random < (6 * (var(58) ** 2 / 64.0))
trigger2 = enemynear,statetype = A || enemynear,movetype = A
trigger2 = Random < (30 * (var(58) ** 2 / 64.0))

;---------------------------------------------------------------------------
;AI Run Fwd
[State -1, AI Run Fwd]
type = ChangeState
value = 100
Triggerall=!Inguarddist
triggerall = roundstate = 2
triggerall = var(58)
triggerall = roundstate = 2
triggerall = statetype != A
triggerall = ctrl || stateno = [100,101]
triggerall = stateno != 100
triggerall = p2movetype != A
trigger1 = p2bodydist x >= 50
trigger1 = Random < (500 * (var(58) ** 2 / 64.0))
trigger1 = !var(0)
trigger2 = numtarget(320)
trigger3 = enemynear,statetype = A || enemynear,movetype = A
trigger3 = Random < (30 * (var(58) ** 2 / 64.0))
trigger3 = backedgebodydist <= 49
trigger4 = Random < (32 * (var(58) ** 2 / 64.0))
trigger4 = var(0)
;---------------------------------------------------------------------------
[State -1]
type = ChangeState
value = 720
triggerall = roundstate = 2
triggerall = var(58)
triggerall = var(0)
triggerall = !var(9)
triggerall = statetype = A
triggerall = p2statetype != L
triggerall = power >= 500
triggerall = stateno = 600 || stateno = 610
triggerall = movecontact
trigger1 = Random < (50 * (var(58) ** 2 / 64.0))
trigger1 = !var(2)
trigger2 = Random < (250 * (var(58) ** 2 / 64.0))
trigger2 = var(2)
;---------------------------------------------------------------------------
[State -1]
type = ChangeState
value = 320
triggerall = roundstate = 2
triggerall = var(58)
triggerall = !var(0)
triggerall = !var(9)
triggerall = statetype != A
triggerall = p2statetype != L
triggerall = p2statetype != A
triggerall = power >= 500
trigger1 = stateno = 220 || stateno = 420 || stateno = 421 || stateno = 521
trigger1 = movecontact
trigger1 = Random < (100 * (var(58) ** 2 / 64.0))
;---------------------------------------------------------------------------
[State -1]
type = ChangeState
value = 421
triggerall = roundstate = 2
triggerall = var(58)
triggerall = !var(0)
triggerall = statetype != A
triggerall = ctrl || stateno = [100,101]
triggerall = p2statetype != L
trigger1 = p2bodydist X <= 64
trigger1 = p2statetype = C
trigger1 = Random < (100 * (var(58) ** 2 / 64.0))
;---------------------------------------------------------------------------
[State -1]
type = ChangeState
value = 422
triggerall = roundstate = 2
triggerall = var(58)
triggerall = var(0)
triggerall = p2bodydist y >= -60
triggerall = p2statetype != L
triggerall = statetype != A
trigger1 = ctrl || stateno = [100,101]
trigger1 = p2bodydist X <= 43
trigger1 = Random < (126 * (var(58) ** 2 / 64.0))
trigger1 = p2movetype != A
trigger1 = p2bodydist X >= 25
trigger2 = stateno = 210 || stateno = 410 || stateno = 220
trigger2 = movecontact
trigger2 = Random < (900 * (var(58) ** 2 / 64.0))
;---------------------------------------------------------------------------
[State -1]
type = ChangeState
value = 521
triggerall = roundstate = 2
triggerall = var(58)
triggerall = !var(0)
triggerall = statetype != A
triggerall = ctrl || stateno = [100,101]
triggerall = p2statetype != L
triggerall = power >= 500
trigger1 = p2bodydist X <= 64
trigger1 = p2statetype = C
trigger1 = Random < (100 * (var(58) ** 2 / 64.0))
;---------------------------------------------------------------------------
[State -1]
type = ChangeState
value = 200
triggerall = roundstate = 2
triggerall = var(58)
triggerall = statetype != A
triggerall = ctrl || stateno = [100,101]
triggerall = p2statetype != L
triggerall = p2statetype != A
trigger1 = p2bodydist X <= 24
trigger1 = Random < (500 * (var(58) ** 2 / 64.0))

;---------------------------------------------------------------------------
[State -1]
type = ChangeState
value = 210
triggerall = roundstate = 2
triggerall = var(58)
triggerall = !var(0)
triggerall = statetype != A
triggerall = p2statetype != L
triggerall = p2statetype != A
trigger1 = ctrl || stateno = [100,101]
trigger1 = p2bodydist X <= 57
trigger1 = Random < (81 * (var(58) ** 2 / 64.0))
trigger1 = p2movetype != A
trigger1 = p2bodydist X >= 52
trigger2 = stateno = 200 || stateno = 400
trigger2 = movecontact
trigger2 = p2bodydist X > 38

;---------------------------------------------------------------------------
[State -1]
type = ChangeState
value = 211
triggerall = roundstate = 2
triggerall = var(58)
triggerall = var(0)
triggerall = statetype != A
triggerall = p2statetype != L
triggerall = p2statetype != A
trigger1 = ctrl || stateno = [100,101]
trigger1 = p2bodydist X <= 45
trigger1 = Random < (81 * (var(58) ** 2 / 64.0))
trigger1 = p2movetype != A
trigger1 = p2bodydist X >= 39
trigger2 = stateno = 200 || stateno = 400
trigger2 = movecontact
trigger2 = p2bodydist X > 38

;---------------------------------------------------------------------------
[State -1]
type = ChangeState
value = 220
triggerall = roundstate = 2
triggerall = var(58)
triggerall = statetype != A
triggerall = p2statetype != L
triggerall = p2statetype != A
trigger1 = ctrl || stateno = [100,101]
trigger1 = p2bodydist X <= 51
trigger1 = Random < (61 * (var(58) ** 2 / 64.0))
trigger1 = p2movetype != A
trigger1 = p2bodydist X >= 25
trigger2 = stateno = 210 || stateno = 410
trigger2 = movecontact
trigger2 = Random < (500 * (var(58) ** 2 / 64.0))
;---------------------------------------------------------------------------
[State -1]
type = ChangeState
value = 400
triggerall = roundstate = 2
triggerall = var(58)
triggerall = statetype != A
triggerall = ctrl || stateno = [100,101]
triggerall = p2statetype != L
triggerall = p2statetype != A
trigger1 = p2bodydist X <= 24
trigger1 = Random < (500 * (var(58) ** 2 / 64.0))
;---------------------------------------------------------------------------
[State -1]
type = ChangeState
value = 410
triggerall = roundstate = 2
triggerall = var(58)
triggerall = statetype != A
triggerall = p2statetype != L
triggerall = p2statetype != A
trigger1 = ctrl || stateno = [100,101]
trigger1 = p2bodydist X <= 38
trigger1 = Random < (156 * (var(58) ** 2 / 64.0))
trigger1 = p2movetype != A
trigger1 = p2statetype = S
trigger1 = p2bodydist X >= 25
trigger2 = stateno = 200 || stateno = 400
trigger2 = movecontact
trigger2 = p2bodydist X <= 38

;---------------------------------------------------------------------------
[State -1]
type = ChangeState
value = 420
triggerall = roundstate = 2
triggerall = var(58)
triggerall = statetype != A
triggerall = p2statetype != L
triggerall = p2statetype != A
trigger1 = ctrl || stateno = [100,101]
trigger1 = p2bodydist X <= 47
trigger1 = Random < (126 * (var(58) ** 2 / 64.0))
trigger1 = p2movetype != A
trigger1 = p2statetype = S
trigger1 = p2bodydist X >= 25
trigger2 = stateno = 210 || stateno = 410
trigger2 = movecontact
trigger2 = Random < (550 * (var(58) ** 2 / 64.0))

;--------------------------------------------------------------------------
;Jump_Light_Kick
[State -1]
type = ChangeState
value = 600
triggerall = roundstate = 2
triggerall = var(58)
triggerall = statetype = A
triggerall = ctrl
triggerall = p2statetype != L
triggerall = p2bodydist Y = [-40,86]
triggerall = p2bodydist X <= 36
triggerall = time >= 12 || p2statetype = A
trigger1 = Random < (500 * (var(58) ** 2 / 64.0))

;--------------------------------------------------------------------------
;Jump_Light_Kick
[State -1]
type = ChangeState
value = 610
triggerall = roundstate = 2
triggerall = var(58)
triggerall = statetype = A
triggerall = p2statetype != L
triggerall = p2bodydist Y = [-40,86]
triggerall = p2bodydist X <= 37
triggerall = time >= 12 || p2statetype = A
trigger1 = ctrl
trigger1 = Random < (500 * (var(58) ** 2 / 64.0))
trigger1 = !var(0)
trigger2 = ctrl
trigger2 = Random < (500 * (var(58) ** 2 / 64.0))
trigger2 = enemynear,movetype != H
trigger2 = var(0)
trigger3 = stateno = 600
trigger3 = movecontact
trigger3 = var(0)
trigger3 = Random < (500 * (var(58) ** 2 / 64.0))

;--------------------------------------------------------------------------
;Jump_Light_Kick
[State -1]
type = ChangeState
value = 620
triggerall = roundstate = 2
triggerall = var(58)
triggerall = statetype = A
triggerall = p2statetype != L
triggerall = p2bodydist Y = [-40,86]
triggerall = p2bodydist X <= 71
triggerall = time >= 12 || p2statetype = A
trigger1 = ctrl
trigger1 = Random < (500 * (var(58) ** 2 / 64.0))
trigger1 = !var(0)
trigger2 = ctrl
trigger2 = Random < (500 * (var(58) ** 2 / 64.0))
trigger2 = enemynear,movetype != H
trigger2 = var(0)
trigger3 = stateno = 610
trigger3 = movecontact
trigger3 = var(0)
trigger3 = Random < (500 * (var(58) ** 2 / 64.0))

[State -1]
Type=Changestate
Triggerall=Inguarddist ; Guard when in guard distance
triggerall = var(58) = 3 && random <= 64 || var(58) = 4 && random <= 72 || var(58) = 5 && random <= 108 || var(58) = 6 && random <= 250 || var(58) = 7 && random <=500 || var(58) = 8 && random <= 999 ; and the AI is on
trigger1 = stateno!=[120,160]
Trigger1=ctrl ; and we have control
value=120
;===========================================================================
;----------------------------HUMAN------------------------------------------
;===========================================================================

;===========================================================================
; SUPER MOTIONS
;===========================================================================
;-----------------------------------------------------------------------------
; hyper grab
[State -1]
type = ChangeState
value = 3400
triggerall = !var(58)
triggerall = var(0)
triggerall = command = "360x" || command = "360y" || command = "360z"
triggerall = power >= 3000
triggerall = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600
trigger2 = movecontact
trigger3 = stateno = 610
trigger3 = movecontact
trigger4 = stateno = 620
trigger4 = movecontact
trigger5 = stateno = 1400
trigger5 = movecontact
trigger6 = stateno = 1410
trigger6 = movecontact
;-----------------------------------------------------------------------------
; hyper attack
[State -1]
type = ChangeState
value = 3300
triggerall = !var(58)
triggerall = var(0)
triggerall = command = "hyper"
triggerall = power >= 3000
triggerall = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600
trigger2 = movecontact
trigger3 = stateno = 610
trigger3 = movecontact
trigger4 = stateno = 620
trigger4 = movecontact
trigger5 = stateno = 1400
trigger5 = movecontact
trigger6 = stateno = 1410
trigger6 = movecontact
;-----------------------------------------------------------------------------
; Super smackdown 2
[State -1]
type = ChangeState
value = 3210
triggerall = !var(58)
triggerall = var(0)
triggerall = command = "supersmackdown2"
triggerall = power >= 2000
triggerall = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600
trigger2 = movecontact
trigger3 = stateno = 610
trigger3 = movecontact
trigger4 = stateno = 620
trigger4 = movecontact
trigger5 = stateno = 1400
trigger5 = movecontact
trigger6 = stateno = 1410
trigger6 = movecontact
;-----------------------------------------------------------------------------
; Super smackdown
[State -1]
type = ChangeState
value = 3200
triggerall = !var(58)
triggerall = var(0)
triggerall = command = "supersmackdown"
triggerall = power >= 1000
triggerall = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600
trigger2 = movecontact
trigger3 = stateno = 610
trigger3 = movecontact
trigger4 = stateno = 620
trigger4 = movecontact
trigger5 = stateno = 1400
trigger5 = movecontact
trigger6 = stateno = 1410
trigger6 = movecontact
;---------------------------------------------------------------------------
; Smackdown
[State -1]
type = ChangeState
value = 3100
triggerall = !var(58)
triggerall = !var(0)
triggerall = command = "smackdown"
triggerall = power  >= 3000
triggerall = statetype != A
trigger1 = ctrl || stateno = [100,101]
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 400
trigger4 = movecontact
trigger5 = stateno = 410
trigger5 = movecontact
trigger6 = stateno = 220
trigger6 = movecontact
trigger7 = stateno = 420
trigger7 = movecontact
trigger8 = stateno = 1000
trigger8 = movecontact
trigger9 = stateno = 1010
trigger9 = movecontact
trigger10 = stateno = 1020
trigger10 = movecontact
trigger11 = stateno = 1032
trigger11 = numtarget(1031)
trigger12 = stateno = 421
trigger12 = movecontact
trigger13 = stateno = 521
trigger13 = movecontact
trigger14 = stateno = 320
trigger14 = movecontact
;---------------------------------------------------------------------------
; Super Run SDM
[State -1]
type = ChangeState
value = 3060
triggerall = !var(58)
triggerall = !var(0)
triggerall = command = "runSDM"
triggerall = power  >= 2000
triggerall = statetype != A
trigger1 = ctrl || stateno = [100,101]
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 400
trigger4 = movecontact
trigger5 = stateno = 410
trigger5 = movecontact
trigger6 = stateno = 220
trigger6 = movecontact
trigger7 = stateno = 420
trigger7 = movecontact
trigger8 = stateno = 1000
trigger8 = movecontact
trigger9 = stateno = 1010
trigger9 = movecontact
trigger10 = stateno = 1020
trigger10 = movecontact
trigger11 = stateno = 1032
trigger11 = numtarget(1031)
trigger12 = stateno = 421
trigger12 = movecontact
trigger13 = stateno = 521
trigger13 = movecontact
trigger14 = stateno = 320
trigger14 = movecontact
;---------------------------------------------------------------------------
; SONIC_ACROBATIC_RUSH SDM
[State -1]
type = ChangeState
value = 3010
triggerall = !var(58)
triggerall = !var(0)
triggerall = command = "AcrobaticSDM"
triggerall = power  >= 2000
triggerall = statetype != A
trigger1 = ctrl || stateno = [100,101]
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 400
trigger4 = movecontact
trigger5 = stateno = 410
trigger5 = movecontact
trigger6 = stateno = 220
trigger6 = movecontact
trigger7 = stateno = 420
trigger7 = movecontact
trigger8 = stateno = 1000
trigger8 = movecontact
trigger9 = stateno = 1010
trigger9 = movecontact
trigger10 = stateno = 1020
trigger10 = movecontact
trigger11 = stateno = 1032
trigger11 = numtarget(1031)
trigger12 = stateno = 421
trigger12 = movecontact
trigger13 = stateno = 521
trigger13 = movecontact
trigger14 = stateno = 320
trigger14 = movecontact
;---------------------------------------------------------------------------
; Super Run DM
[State -1]
type = ChangeState
value = 3050
triggerall = !var(58)
triggerall = !var(0)
triggerall = command = "runDM"
triggerall = power  >= 1000
triggerall = statetype != A
trigger1 = ctrl || stateno = [100,101]
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 400
trigger4 = movecontact
trigger5 = stateno = 410
trigger5 = movecontact
trigger6 = stateno = 220
trigger6 = movecontact
trigger7 = stateno = 420
trigger7 = movecontact
trigger8 = stateno = 1000
trigger8 = movecontact
trigger9 = stateno = 1010
trigger9 = movecontact
trigger10 = stateno = 1020
trigger10 = movecontact
trigger11 = stateno = 1032
trigger11 = numtarget(1031)
trigger12 = stateno = 421
trigger12 = movecontact
trigger13 = stateno = 521
trigger13 = movecontact
trigger14 = stateno = 320
trigger14 = movecontact
;---------------------------------------------------------------------------
; SONIC_ACROBATIC_RUSH DM
[State -1]
type = ChangeState
value = 3000
triggerall = !var(58)
triggerall = !var(0)
triggerall = command = "AcrobaticDM"
triggerall = power  >= 1000
triggerall = statetype != A
trigger1 = ctrl || stateno = [100,101]
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 400
trigger4 = movecontact
trigger5 = stateno = 410
trigger5 = movecontact
trigger6 = stateno = 220
trigger6 = movecontact
trigger7 = stateno = 420
trigger7 = movecontact
trigger8 = stateno = 1000
trigger8 = movecontact
trigger9 = stateno = 1010
trigger9 = movecontact
trigger10 = stateno = 1020
trigger10 = movecontact
trigger11 = stateno = 1032
trigger11 = numtarget(1031)
trigger12 = stateno = 421
trigger12 = movecontact
trigger13 = stateno = 521
trigger13 = movecontact
trigger14 = stateno = 320
trigger14 = movecontact
;===========================================================================
; SPECIAL ATTACKS
;===========================================================================
;-----------------------------------------------------------------------------
; flash
[State -1]
type = ChangeState
value = 1410
triggerall = !var(58)
triggerall = var(0)
triggerall = command = "flash"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600
trigger2 = movecontact
trigger3 = stateno = 610
trigger3 = movecontact
trigger4 = stateno = 620
trigger4 = movecontact
;-----------------------------------------------------------------------------
; spin dowm
[State -1]
type = ChangeState
value = 1400
triggerall = !var(58)
triggerall = var(0)
triggerall = command = "spind"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600
trigger2 = movecontact
trigger3 = stateno = 610
trigger3 = movecontact
trigger4 = stateno = 620
trigger4 = movecontact
;-----------------------------------------------------------------------------
; Ex Air Homing Attack
[State -1]
type = ChangeState
value = 1253
triggerall = !var(58)
triggerall = !var(0)
triggerall = command = "rollex"
triggerall = statetype = A
triggerall = stateno != 2041
triggerall = power >= 500
trigger1 = ctrl
trigger2 = stateno = 600
trigger2 = movecontact
trigger3 = stateno = 610
trigger3 = movecontact
trigger4 = stateno = 620
trigger4 = movecontact
;-----------------------------------------------------------------------------
; EX Homing Attack
[State -1]
type = ChangeState
value = 1250
triggerall = !var(58)
triggerall = !var(0)
triggerall = command = "homeex"
triggerall = statetype != A
triggerall = power >= 500
trigger1 = ctrl || stateno = [100,101]
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 400
trigger4 = movecontact
trigger5 = stateno = 410
trigger5 = movecontact
trigger6 = stateno = 220
trigger6 = movecontact
trigger7 = stateno = 420
trigger7 = movecontact
trigger8 = stateno = 221
trigger8 = movecontact
trigger9 = stateno = 421
trigger9 = movecontact
trigger10 = stateno = 521
trigger10 = movecontact
trigger11 = stateno = 320
trigger11 = movecontact
;-----------------------------------------------------------------------------
; Spin Blade Attack EX
[State -1]
type = ChangeState
value = 1050
triggerall = !var(58)
triggerall = !var(0)
triggerall = command = "bladeex"
triggerall = power >= 500
triggerall = statetype != A
trigger1 = ctrl || stateno = [100,101]
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 400
trigger4 = movecontact
trigger5 = stateno = 410
trigger5 = movecontact
trigger6 = stateno = 220
trigger6 = movecontact
trigger7 = stateno = 420
trigger7 = movecontact
trigger8 = stateno = 221
trigger8 = movecontact
trigger9 = stateno = 421
trigger9 = movecontact
trigger10 = stateno = 521
trigger10 = movecontact
trigger11 = stateno = 320
trigger11 = movecontact
trigger12 = stateno = 1000
trigger12 = movecontact
;-----------------------------------------------------------------------------
; Roll_Ex
[State -1]
type = ChangeState
value = 1030
triggerall = !var(58)
triggerall = !var(0)
triggerall = command = "rollex"
triggerall = statetype != A
triggerall = power >= 500
trigger1 = ctrl || stateno = [100,101]
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 400
trigger4 = movecontact
trigger5 = stateno = 410
trigger5 = movecontact
trigger6 = stateno = 220
trigger6 = movecontact
trigger7 = stateno = 420
trigger7 = movecontact
trigger8 = stateno = 221
trigger8 = movecontact
trigger9 = stateno = 421
trigger9 = movecontact
trigger10 = stateno = 521
trigger10 = movecontact
trigger11 = stateno = 320
trigger11 = movecontact
;-----------------------------------------------------------------------------
; dizzy run 2
[State -1]
type = ChangeState
value = 1321
triggerall = !var(58)
triggerall = !var(0)
triggerall = command = "light2z"
triggerall = statetype != A
trigger1 = ctrl || stateno = [100,101]
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 400
trigger4 = movecontact
trigger5 = stateno = 410
trigger5 = movecontact
trigger6 = stateno = 220
trigger6 = movecontact
trigger7 = stateno = 420
trigger7 = movecontact
trigger8 = stateno = 221
trigger8 = movecontact
trigger9 = stateno = 421
trigger9 = movecontact
trigger10 = stateno = 521
trigger10 = movecontact
trigger11 = stateno = 320
trigger11 = movecontact
;-----------------------------------------------------------------------------
; dizzy run
[State -1]
type = ChangeState
value = 1320
triggerall = !var(58)
triggerall = !var(0)
triggerall = command = "lightz"
triggerall = statetype != A
trigger1 = ctrl || stateno = [100,101]
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 400
trigger4 = movecontact
trigger5 = stateno = 410
trigger5 = movecontact
trigger6 = stateno = 220
trigger6 = movecontact
trigger7 = stateno = 420
trigger7 = movecontact
trigger8 = stateno = 221
trigger8 = movecontact
trigger9 = stateno = 421
trigger9 = movecontact
trigger10 = stateno = 521
trigger10 = movecontact
trigger11 = stateno = 320
trigger11 = movecontact
;-----------------------------------------------------------------------------
; sonic attack 2
[State -1]
type = ChangeState
value = 1311
triggerall = !var(58)
triggerall = !var(0)
triggerall = command = "light2y"
triggerall = statetype != A
trigger1 = ctrl || stateno = [100,101]
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 400
trigger4 = movecontact
trigger5 = stateno = 410
trigger5 = movecontact
trigger6 = stateno = 220
trigger6 = movecontact
trigger7 = stateno = 420
trigger7 = movecontact
trigger8 = stateno = 221
trigger8 = movecontact
trigger9 = stateno = 421
trigger9 = movecontact
trigger10 = stateno = 521
trigger10 = movecontact
trigger11 = stateno = 320
trigger11 = movecontact
;-----------------------------------------------------------------------------
; sonic attack
[State -1]
type = ChangeState
value = 1310
triggerall = !var(58)
triggerall = !var(0)
triggerall = command = "lighty"
triggerall = statetype != A
trigger1 = ctrl || stateno = [100,101]
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 400
trigger4 = movecontact
trigger5 = stateno = 410
trigger5 = movecontact
trigger6 = stateno = 220
trigger6 = movecontact
trigger7 = stateno = 420
trigger7 = movecontact
trigger8 = stateno = 221
trigger8 = movecontact
trigger9 = stateno = 421
trigger9 = movecontact
trigger10 = stateno = 521
trigger10 = movecontact
trigger11 = stateno = 320
trigger11 = movecontact
;-----------------------------------------------------------------------------
; Light speed dash 2
[State -1]
type = ChangeState
value = 1301
triggerall = !var(58)
triggerall = !var(0)
triggerall = command = "light2x"
triggerall = statetype != A
trigger1 = ctrl || stateno = [100,101]
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 400
trigger4 = movecontact
trigger5 = stateno = 410
trigger5 = movecontact
trigger6 = stateno = 220
trigger6 = movecontact
trigger7 = stateno = 420
trigger7 = movecontact
trigger8 = stateno = 221
trigger8 = movecontact
trigger9 = stateno = 421
trigger9 = movecontact
trigger10 = stateno = 521
trigger10 = movecontact
trigger11 = stateno = 320
trigger11 = movecontact
;-----------------------------------------------------------------------------
; Light speed dash
[State -1]
type = ChangeState
value = 1300
triggerall = !var(58)
triggerall = !var(0)
triggerall = command = "lightx"
triggerall = statetype != A
trigger1 = ctrl || stateno = [100,101]
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 400
trigger4 = movecontact
trigger5 = stateno = 410
trigger5 = movecontact
trigger6 = stateno = 220
trigger6 = movecontact
trigger7 = stateno = 420
trigger7 = movecontact
trigger8 = stateno = 221
trigger8 = movecontact
trigger9 = stateno = 421
trigger9 = movecontact
trigger10 = stateno = 521
trigger10 = movecontact
trigger11 = stateno = 320
trigger11 = movecontact
;-----------------------------------------------------------------------------
; Air Homing Attack
[State -1]
type = ChangeState
value = 1203
triggerall = !var(58)
triggerall = !var(0)
triggerall = command = "rollx" || command = "rolly" || command = "rollz" || command = "rolla"
triggerall = statetype = A
triggerall = stateno != 2041
trigger1 = ctrl
trigger2 = stateno = 600
trigger2 = movecontact
trigger3 = stateno = 610
trigger3 = movecontact
trigger4 = stateno = 620
trigger4 = movecontact
;------------------------------------------------------
; Homing Attack
[State -1]
type = ChangeState
value = 1200
triggerall = !var(58)
triggerall = !var(0)
triggerall = command = "home"
triggerall = statetype != A
trigger1 = ctrl || stateno = [100,101]
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 400
trigger4 = movecontact
trigger5 = stateno = 410
trigger5 = movecontact
trigger6 = stateno = 220
trigger6 = movecontact
trigger7 = stateno = 420
trigger7 = movecontact
trigger8 = stateno = 221
trigger8 = movecontact
trigger9 = stateno = 421
trigger9 = movecontact
trigger10 = stateno = 521
trigger10 = movecontact
trigger11 = stateno = 320
trigger11 = movecontact
;-----------------------------------------------------------------------------
; Spin Blade Attack
[State -1]
type = ChangeState
value = 1040
triggerall = !var(58)
triggerall = !var(0)
triggerall = command = "blade"
triggerall = statetype != A
trigger1 = ctrl || stateno = [100,101]
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 400
trigger4 = movecontact
trigger5 = stateno = 410
trigger5 = movecontact
trigger6 = stateno = 220
trigger6 = movecontact
trigger7 = stateno = 420
trigger7 = movecontact
trigger8 = stateno = 221
trigger8 = movecontact
trigger9 = stateno = 421
trigger9 = movecontact
trigger10 = stateno = 521
trigger10 = movecontact
trigger11 = stateno = 320
trigger11 = movecontact
trigger12 = stateno = 1000
trigger12 = movecontact
;-----------------------------------------------------------------------------
; Roll_Hard
[State -1]
type = ChangeState
value = 1020
triggerall = !var(58)
triggerall = !var(0)
triggerall = command = "rollz"
triggerall = statetype != A
trigger1 = ctrl || stateno = [100,101]
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 400
trigger4 = movecontact
trigger5 = stateno = 410
trigger5 = movecontact
trigger6 = stateno = 220
trigger6 = movecontact
trigger7 = stateno = 420
trigger7 = movecontact
trigger8 = stateno = 221
trigger8 = movecontact
trigger9 = stateno = 421
trigger9 = movecontact
trigger10 = stateno = 521
trigger10 = movecontact
trigger11 = stateno = 320
trigger11 = movecontact
;-----------------------------------------------------------------------------
; Roll_Med
[State -1]
type = ChangeState
value = 1010
triggerall = !var(58)
triggerall = !var(0)
triggerall = command = "rolly"
triggerall = statetype != A
trigger1 = ctrl || stateno = [100,101]
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 400
trigger4 = movecontact
trigger5 = stateno = 410
trigger5 = movecontact
trigger6 = stateno = 220
trigger6 = movecontact
trigger7 = stateno = 420
trigger7 = movecontact
trigger8 = stateno = 221
trigger8 = movecontact
trigger9 = stateno = 421
trigger9 = movecontact
trigger10 = stateno = 521
trigger10 = movecontact
trigger11 = stateno = 320
trigger11 = movecontact
;-----------------------------------------------------------------------------
; Roll_Weak
[State -1]
type = ChangeState
value = 1000
triggerall = !var(58)
triggerall = !var(0)
triggerall = command = "rollx"
triggerall = statetype != A
trigger1 = ctrl || stateno = [100,101]
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 400
trigger4 = movecontact
trigger5 = stateno = 410
trigger5 = movecontact
trigger6 = stateno = 220
trigger6 = movecontact
trigger7 = stateno = 420
trigger7 = movecontact
trigger8 = stateno = 221
trigger8 = movecontact
trigger9 = stateno = 421
trigger9 = movecontact
trigger10 = stateno = 521
trigger10 = movecontact
trigger11 = stateno = 320
trigger11 = movecontact
;---------------------------------------------------------------------------
;===========================================================================
; NORMAL ATTACKS
;===========================================================================
;---------------------------------------------------------------------------
;Spindash
[State -1, Spindash]
type = ChangeState
value = 950
triggerall = !var(58)
triggerall = command = "a"
triggerall = command = "holddown"
trigger1 = statetype = C || stateno = [100,101]
trigger1 = ctrl || stateno = [100,101]
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 210 || stateno = 211
trigger3 = movecontact
trigger4 = stateno = 400
trigger4 = movecontact
trigger5 = stateno = 410
trigger5 = movecontact
trigger6 = stateno = 220
trigger6 = movecontact
trigger7 = stateno = 420
trigger7 = movecontact
trigger8 = stateno = 221
trigger8 = movecontact
trigger9 = stateno = 421
trigger9 = movecontact
trigger10 = stateno = 521
trigger10 = movecontact
trigger11 = stateno = 320
trigger11 = movecontact
;---------------------------------------------------------------------------
;EX Air Launcher
[State -1]
type = ChangeState
value = 720
triggerall = !var(58)
triggerall = var(0)
triggerall = command = "a"
triggerall = power >= 500
triggerall = !var(9)
triggerall = statetype = A
trigger1 = stateno = 600
trigger1 = movecontact
trigger2 = stateno = 610
trigger2 = movecontact
trigger3 = stateno = 620
trigger3 = movecontact
;---------------------------------------------------------------------------
;EX Overhead
[State -1]
type = ChangeState
value = 521
triggerall = !var(58)
triggerall = !var(0)
triggerall = command = "y" && command = "z" && command = "holdfwd"
triggerall = command = "holddown"
triggerall = power >= 500
trigger1 = statetype = C || stateno = [100,101]
trigger1 = ctrl || stateno = [100,101]
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 400
trigger3 = movecontact
trigger4 = stateno = 210
trigger4 = movecontact
trigger5 = stateno = 410
trigger5 = movecontact
;---------------------------------------------------------------------------
;EX Stand_Light_Kick
[State -1]
type = ChangeState
value = 320
triggerall = !var(58)
triggerall = !var(0)
triggerall = command = "a"
triggerall = power >= 500
triggerall = !var(9)
trigger1 = stateno = 200
trigger1 = movecontact
trigger2 = stateno = 400
trigger2 = movecontact
trigger3 = stateno = 210 || stateno = 211
trigger3 = movecontact
trigger4 = stateno = 410
trigger4 = movecontact
trigger5 = stateno = 420
trigger5 = movecontact
trigger6 = stateno = 220
trigger6 = movecontact
trigger7 = stateno = 421
trigger7 = movecontact
trigger8 = stateno = 521
trigger8 = movecontact
;---------------------------------------------------------------------------
;Stun
[State -1, Stun]
type = ChangeState
value = 900
triggerall = var(20)
triggerall = !var(58)
triggerall = command = "a"
trigger1 = statetype != A
trigger1 = ctrl || stateno = [100,101]
;---------------------------------------------------------------------------
;Throw
[State -1, Air Throw]
type = ChangeState
value = 850
triggerall = !var(58)
triggerall = var(0)
triggerall = command = "y" && command = "z" || command = "c"
trigger1 = statetype = A
trigger1 = ctrl
;---------------------------------------------------------------------------
;Throw
[State -1, Throw]
type = ChangeState
value = 800
triggerall = !var(58)
triggerall = command = "y" && command = "z" || command = "c"
trigger1 = statetype != A
trigger1 = ctrl || stateno = [100,101]
;---------------------------------------------------------------------------
;AirDashDown
[State -1]
type = ChangeState
value = 117
triggerall = var(0)
triggerall = var(3) < 2
triggerall = !var(58)
triggerall = stateno != 117
trigger1 = command = "DD"
trigger1 = statetype = A
trigger1 = ctrl
;---------------------------------------------------------------------------
;AirDashBack
[State -1]
type = ChangeState
value = 115
triggerall = var(0)
triggerall = var(3) < 2
triggerall = !var(58)
triggerall = stateno != 115
trigger1 = command = "BB"
trigger1 = statetype = A
trigger1 = ctrl
;---------------------------------------------------------------------------
;AirDashUp
[State -1]
type = ChangeState
value = 113
triggerall = var(0)
triggerall = var(3) < 2
triggerall = !var(58)
triggerall = stateno != 113
trigger1 = command = "UU"
trigger1 = statetype = A
trigger1 = ctrl
;---------------------------------------------------------------------------
;AirDashFwd
[State -1]
type = ChangeState
value = 110
triggerall = var(0)
triggerall = var(3) < 2
triggerall = !var(58)
triggerall = stateno != 110
trigger1 = command = "FF"
trigger1 = statetype = A
trigger1 = ctrl
;---------------------------------------------------------------------------
;RunFwd
[State -1]
type = ChangeState
value = 100
triggerall = !var(58)
trigger1 = command = "FF"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
;RunBack
[State -1]
type = ChangeState
value = 105
triggerall = !var(58)
trigger1 = command = "BB"
trigger1 = statetype = S
trigger1 = ctrl
;===========================================================================
;---------------------------------------------------------------------------
;Air Dodge 
[State -1]
type = ChangeState
value = 257
triggerall = !var(58)
triggerall = var(0)
triggerall = command = "x" && command = "y" || command = "b"
trigger1 = statetype = A
trigger1 = ctrl
;---------------------------------------------------------------------------
;Backward Dodge
[State -1]
type = ChangeState
value = 256
triggerall = !var(58)
triggerall = command = "x" && command = "y" || command = "b"
triggerall = command = "holdback"
trigger1 = statetype != A
trigger1 = ctrl || stateno = [100,101]
;---------------------------------------------------------------------------
;Forward Dodge 
[State -1]
type = ChangeState
value = 255
triggerall = !var(58)
triggerall = command = "x" && command = "y" || command = "b"
triggerall = command = "holdfwd"
trigger1 = statetype != A
trigger1 = ctrl || stateno = [100,101]
;---------------------------------------------------------------------------
;Stand Dodge 
[State -1]
type = ChangeState
value = 254
triggerall = !var(58)
triggerall = command = "x" && command = "y" || command = "b"
trigger1 = statetype != A
trigger1 = ctrl || stateno = [100,101]
;---------------------------------------------------------------------------
;alright
[State -1]
type = ChangeState
value = 198
triggerall = !var(58)
triggerall = command = "Provocate"
triggerall = command = "holdup"
trigger1 = statetype != A
trigger1 = ctrl || stateno = 40
;---------------------------------------------------------------------------
;your too slow
[State -1]
type = ChangeState
value = 197
triggerall = !var(58)
triggerall = command = "Provocate"
triggerall = command = "holddown"
trigger1 = statetype != A
trigger1 = ctrl
;---------------------------------------------------------------------------
;finger
[State -1]
type = ChangeState
value = 196
triggerall = !var(58)
triggerall = command = "Provocate"
triggerall = command = "holdfwd" || command = "holdback"
trigger1 = statetype != A
trigger1 = ctrl
;---------------------------------------------------------------------------
;tap feet
[State -1]
type = ChangeState
value = 195
triggerall = !var(58)
triggerall = command = "Provocate"
trigger1 = statetype != A
trigger1 = ctrl
;---------------------------------------------------------------------------
;Stand_Weak_Punch
[State -1]
type = ChangeState
value = 200
triggerall = !var(58)
triggerall = command = "x"          ;Place name of command here
triggerall = command != "holddown"  ;Standing moves should have this line
 ;The following is true if Player is in stand state, and has control
trigger1 = statetype = S
trigger1 = ctrl || stateno = [100,101]

;---------------------------------------------------------------------------
;combo attack
[State -1]
type = ChangeState
value = 211
triggerall = !var(58)
triggerall = var(0)
triggerall = command = "y"; && command = "holdfwd"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl || stateno = [100,101]
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 400
trigger3 = movecontact
trigger4 = stateno = 210
trigger4 = movecontact
trigger5 = stateno = 410
trigger5 = movecontact

;---------------------------------------------------------------------------
;Stand_Fierce_Punch
[State -1]
type = ChangeState
value = 210
triggerall = !var(58)
triggerall = !var(0)
triggerall = command = "y"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl || stateno = [100,101]
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 400
trigger3 = movecontact
;---------------------------------------------------------------------------
;Stand_Light_Kick
[State -1]
type = ChangeState
value = 220
triggerall = !var(58)
triggerall = command = "z"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl || stateno = [100,101]
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 400
trigger3 = movecontact
trigger4 = stateno = 210 || stateno = 211
trigger4 = movecontact
trigger5 = stateno = 410
trigger5 = movecontact
;---------------------------------------------------------------------------
; Crouch_Light_Punch
[State -1]
type = ChangeState
value = 400
triggerall = !var(58)
triggerall = command = "x"
triggerall = command = "holddown"
trigger1 = statetype = C || stateno = [100,101]
trigger1 = ctrl || stateno = [100,101]
;---------------------------------------------------------------------------
; Crouch_Hard_Punch
[State -1]
type = ChangeState
value = 410
triggerall = !var(58)
triggerall = command = "y"
triggerall = command = "holddown"
trigger1 = statetype = C || stateno = [100,101]
trigger1 = ctrl || stateno = [100,101]
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 400
trigger3 = movecontact
;---------------------------------------------------------------------------
;Overhead
[State -1]
type = ChangeState
value = 421
triggerall = !var(58)
triggerall = !var(0)
triggerall = command = "z" && command = "holdfwd"
triggerall = command = "holddown"
trigger1 = statetype = C || stateno = [100,101]
trigger1 = ctrl || stateno = [100,101]
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 400
trigger3 = movecontact
trigger4 = stateno = 210 || stateno = 211
trigger4 = movecontact
trigger5 = stateno = 410
trigger5 = movecontact
;---------------------------------------------------------------------------
;Launcher
[State -1]
type = ChangeState
value = 422
triggerall = !var(58)
triggerall = var(0)
triggerall = command = "z" && command = "holdfwd"
triggerall = command = "holddown"
trigger1 = statetype = C || stateno = [100,101]
trigger1 = ctrl || stateno = [100,101]
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 400
trigger3 = movecontact
trigger4 = stateno = 210 || stateno = 220 || stateno = 320 || stateno = 211
trigger4 = movecontact
trigger5 = stateno = 410
trigger5 = movecontact
;---------------------------------------------------------------------------
;Crouch_Light_Kick
[State -1]
type = ChangeState
value = 420
triggerall = !var(58)
triggerall = command = "z"
triggerall = command = "holddown"
trigger1 = statetype = C || stateno = [100,101]
trigger1 = ctrl || stateno = [100,101]
trigger2 = stateno = 200
trigger2 = movecontact
trigger3 = stateno = 400
trigger3 = movecontact
trigger4 = stateno = 210 || stateno = 211
trigger4 = movecontact
trigger5 = stateno = 410
trigger5 = movecontact
;---------------------------------------------------------------------------
;Jump_Light_Punch
[State -1]
type = ChangeState
value = 600
triggerall = !var(58)
triggerall = command = "x"
trigger1 = statetype = A
trigger1 = ctrl
;---------------------------------------------------------------------------
;Jump_Hard_Punch
[State -1]
type = ChangeState
value = 610
triggerall = !var(58)
triggerall = command = "y"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600
trigger2 = movecontact
trigger2 = var(0)
;--------------------------------------------------------------------------
;Jump_Light_Kick
[State -1]
type = ChangeState
value = 620
triggerall = !var(58)
triggerall = command = "z"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 || stateno = 610
trigger2 = movecontact
trigger2 = var(0)
;--------------------------------------------------------------------------
