; 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 = /DB, a   ;hold down-back 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
;   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 command detection.
;
; - 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 examples are given below.
;
; [Command] ;Quarter circle forward + x
; name = "QCF_x"
; command = ~D, DF, F, x
;
; [Command] ;Half circle back + a
; name = "HCB_a"
; command = ~F, DF, D, DB, B, a
;
; [Command] ;Two quarter circles forward + y
; name = "2QCF_y"
; command = ~D, DF, F, D, DF, F, y
;
; [Command] ;Tap b rapidly
; name = "5b"
; command = b, b, b, b, b
; time = 30
;
; [Command] ;Charge back, then forward + z
; name = "charge_B_F_z"
; command = ~60$B, F, z
; time = 10
; 
; [Command] ;Charge down, then up + c
; name = "charge_D_U_c"
; command = ~60$D, U, c
; time = 10
; 
;==================================================================================
;======| RELACIONADO À AI - AI RELATED |===========================================
;==================================================================================

; These 11 Single Button and Hold Dir commands must be placed here at the top
; of the CMD, above all other commands, and in the standard order shown here,
; in order for the "Compatibly Partnered" version (9742) of the helper AI
; activation method to work with different partners in simul team mode.
; (When the partner is not compatible, then it's best to just use the regular
; version (9741) and rely on the XOR method for backup in case a human
; partner's input turns off the CPU partner's AI.)
; (Now, even if you do not intend to give your character any custom AI, it
; would still be nice if you would place the commands at the top of your CMD,
; for the sake of other characters which do use this AI activation method.
; And then, define Anim 9741 in your AIR file to indicate to other characters
; that your character is compatible.
; It may slightly increase the chances of faulty AI activation if the user is
; using characters with a poor implementation of the old humanly-impossible
; commands AI activation method when fighting against your character, but
; other than that, there's really no particular reason not to.  And you can
; change the names of the commands if you want.  For compatibility, all that
; really matters is the "command" and "time" parameters.)
;
; Another important point to make, is that if you want to add additional
; definitions for any of these basic command names, then there are limits on
; what kind of parameters you can use, in order to ensure the reliability of
; the helper method.  That is, if you redefine any of these first 11 commands,
; then you must follow these rules when doing so:
; - Don't use any command string that includes any tildes. (e.g. no "~x",
;   no "~30D")
; - In the command string, don't include any direction that isn't preceeded by
;   a slash. (e.g. no "F", no "$D")
; - Don't put any non-slashed buttons in a command string overloading one of
;   the Hold Dir command names.
; - Using a command string that includes any commas (e.g. no "a,b"), and/or
;   setting the time parameter to greater than 1, may be safe, but I wouldn't
;   risk it.
; An example of what is permissible, is redefining the "z" button like so:
;	[Command]
;	name = "z"
;	command = y+b
;	time = 1
; Other than that particular common type of redefinition, it's probably best
; to simply avoid adding definitions for these 11 command names altogether.
; And remember, this paragraph just has to do with the helper method.  You'll
; still need to make changes to the XOR code, no matter what type of overloading
; you use with the commands used by it.
;
;-| Single Button |---------------------------------------------------------
[Command]
name = "a"
command = a
time = 1

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

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

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

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

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

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

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

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

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

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

;-| Hold Button |----------------------------------------------------------
; Please define Anim 74140108 in your AIR file if AND ONLY IF you place these
; 7 Hold Button commands immediately after the 11 Single Button and Hold Dir
; commands at the very top of your CMD list, as demonstrated here.
; In this version of the AI code, these commands are only used by the XOR
; method, and thus are optional.  But there remains a possibility that a
; future version of the helper method might be helped by having these
; commands placed here, and Anim 74140108 would then be used to indicate
; that a partner character has a compatible CMD.

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

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

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

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

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

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

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

[Command]
name = "back"
command = B
time = 1

[Command]
name = "fwd"
command = F
time = 1

;-| CPU |--------------------------------------------------------------
; Note that if you make any changes to the basic one-button or recovery
; commands, you'll need to make the same changes to their matching commands here
; and/or in the XOR VarSet controller.  That includes things like, for example:
;  * changing the recovery command to use a different combination of buttons.
;  * renaming the b button command as "d", or the start button command as "s".
;  * switching the button names around, e.g. so button y triggers "a" and button a triggers "y".
;  * having more than one way to trigger the same command name.
; If you understand how the XOR method works, the proper changes should be obvious.
; If you don't understand it, then simply disable the lines in the XOR VarSet
; controller that correspond to the commands you've altered.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

; Here add matching commands for any moves that must never be used randomly
; by the computer, such as suicide moves and super moves, and add the pairs
; to the XOR VarSet controller in State -3.

; If you're desperate to make sure that the AI always gets turned on as soon
; as possible, you can add more equivalents for your own commands here too,
; and add to the XOR VarSet controller's triggers accordingly.  You should
; use button-only commands before using any commands with directional
; components, as the latter apparently doesn't work in Linux Mugen 2002.04.14.

; And of course, if you've run out of unique command labels (Mugen allows
; 128), you can remove as many of these as you want.  You'll of course need
; to modify the XOR VarSet controller's triggers accordingly, but Mugen
; will let you know if you forget to do so. :)

[Command]
name = "jupiter2"
command = ~D, DF, F, D, DF, F, a
time = 35

[Command]
name = "jupiter2"
command = ~D, DF, F, D, DF, F, ~a
time = 35

[Command]
name = "jupiter2"
command = ~D, DF, F, D, DF, F, b
time = 35

[Command]
name = "jupiter2"
command = ~D, DF, F, D, DF, F, ~b
time = 35

[Command]
name = "jupiter2"
command = ~D, DF, F, D, DF, F, c
time = 35

[Command]
name = "jupiter2"
command = ~D, DF, F, D, DF, F, ~c
time = 35

[Command]
name = "jupiter2"
command = ~D, F, D, F, a
time = 20

[Command]
name = "jupiter2"
command = ~D, F, D, F, ~a
time = 20

[Command]
name = "jupiter2"
command = ~D, F, D, F, b
time = 20

[Command]
name = "jupiter2"
command = ~D, F, D, F, ~b
time = 20

[Command]
name = "jupiter2"
command = ~D, F, D, F, c
time = 20

[Command]
name = "jupiter2"
command = ~D, F, D, F, ~c
time = 20

[Command]
name = "hercules2"
command = ~D, DF, F, D, DF, F, x
time = 35

[Command]
name = "hercules2"
command = ~D, DF, F, D, DF, F, ~x
time = 35

[Command]
name = "hercules2"
command = ~D, DF, F, D, DF, F, y
time = 35

[Command]
name = "hercules2"
command = ~D, DF, F, D, DF, F, ~y
time = 35

[Command]
name = "hercules2"
command = ~D, DF, F, D, DF, F, z
time = 35

[Command]
name = "hercules2"
command = ~D, DF, F, D, DF, F, ~z
time = 35

[Command]
name = "hercules2"
command = ~D, F, D, F, x
time = 20

[Command]
name = "hercules2"
command = ~D, F, D, F, ~x
time = 20

[Command]
name = "hercules2"
command = ~D, F, D, F, y
time = 20

[Command]
name = "hercules2"
command = ~D, F, D, F, ~y
time = 20

[Command]
name = "hercules2"
command = ~D, F, D, F, z
time = 20

[Command]
name = "hercules2"
command = ~D, F, D, F, ~z
time = 20

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

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

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

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

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

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

[Command]
name = "gaiax2"
command = ~B, D, F, U, x
time = 35

[Command]
name = "gaiax2"
command = ~B, DB, DF, F, U, x
time = 35

[Command]
name = "gaiax2"
command = ~D, F, U, B, x
time = 35

[Command]
name = "gaiax2"
command = ~F, U, B, D, x
time = 35

[Command]
name = "gaiax2"
command = ~U, B, D, F, x
time = 35

[Command]
name = "gaiax2"
command = ~U, B, DB, DF, F, x
time = 35

[Command]
name = "gaiax2"
command = ~B, U, F, D, x
time = 35

[Command]
name = "gaiax2"
command = ~D, B, U, F, x
time = 35

[Command]
name = "gaiax2"
command = ~F, D, B, U, x
time = 35

[Command]
name = "gaiax2"
command = ~F, DF, DB, B, U, x
time = 35

[Command]
name = "gaiax2"
command = ~U, F, D, B, x
time = 35

[Command]
name = "gaiax2"
command = ~U, F, DF, DB, B, x
time = 35

[Command]
name = "gaiax2"
command = ~B, D, F, U, ~x
time = 35

[Command]
name = "gaiax2"
command = ~B, DB, DF, F, U, ~x
time = 35

[Command]
name = "gaiax2"
command = ~D, F, U, B, ~x
time = 35

[Command]
name = "gaiax2"
command = ~F, U, B, D, ~x
time = 35

[Command]
name = "gaiax2"
command = ~U, B, D, F, ~x
time = 35

[Command]
name = "gaiax2"
command = ~U, B, DB, DF, F, ~x
time = 35

[Command]
name = "gaiax2"
command = ~B, U, F, D, ~x
time = 35

[Command]
name = "gaiax2"
command = ~D, B, U, F, ~x
time = 35

[Command]
name = "gaiax2"
command = ~F, D, B, U, ~x
time = 35

[Command]
name = "gaiax2"
command = ~F, DF, DB, B, U, ~x
time = 35

[Command]
name = "gaiax2"
command = ~U, F, D, B, ~x
time = 35

[Command]
name = "gaiax2"
command = ~U, F, DF, DB, B, ~x
time = 35

[Command]
name = "gaiay2"
command = ~B, D, F, U, y
time = 35

[Command]
name = "gaiay2"
command = ~B, DB, DF, F, U, y
time = 35

[Command]
name = "gaiay2"
command = ~D, F, U, B, y
time = 35

[Command]
name = "gaiay2"
command = ~F, U, B, D, y
time = 35

[Command]
name = "gaiay2"
command = ~U, B, D, F, y
time = 35

[Command]
name = "gaiay2"
command = ~U, B, DB, DF, F, y
time = 35

[Command]
name = "gaiay2"
command = ~B, U, F, D, y
time = 35

[Command]
name = "gaiay2"
command = ~D, B, U, F, y
time = 35

[Command]
name = "gaiay2"
command = ~F, D, B, U, y
time = 35

[Command]
name = "gaiay2"
command = ~F, DF, DB, B, U, y
time = 35

[Command]
name = "gaiay2"
command = ~U, F, D, B, y
time = 35

[Command]
name = "gaiay2"
command = ~U, F, DF, DB, B, y
time = 35

[Command]
name = "gaiay2"
command = ~B, D, F, U, ~y
time = 35

[Command]
name = "gaiay2"
command = ~B, DB, DF, F, U, ~y
time = 35

[Command]
name = "gaiay2"
command = ~D, F, U, B, ~y
time = 35

[Command]
name = "gaiay2"
command = ~F, U, B, D, ~y
time = 35

[Command]
name = "gaiay2"
command = ~U, B, D, F, ~y
time = 35

[Command]
name = "gaiay2"
command = ~U, B, DB, DF, F, ~y
time = 35

[Command]
name = "gaiay2"
command = ~B, U, F, D, ~y
time = 35

[Command]
name = "gaiay2"
command = ~D, B, U, F, ~y
time = 35

[Command]
name = "gaiay2"
command = ~F, D, B, U, ~y
time = 35

[Command]
name = "gaiay2"
command = ~F, DF, DB, B, U, ~y
time = 35

[Command]
name = "gaiay2"
command = ~U, F, D, B, ~y
time = 35

[Command]
name = "gaiay2"
command = ~U, F, DF, DB, B, ~y
time = 35

[Command]
name = "gaiaz2"
command = ~B, D, F, U, z
time = 35

[Command]
name = "gaiaz2"
command = ~B, DB, DF, F, U, z
time = 35

[Command]
name = "gaiaz2"
command = ~D, F, U, B, z
time = 35

[Command]
name = "gaiaz2"
command = ~F, U, B, D, z
time = 35

[Command]
name = "gaiaz2"
command = ~U, B, D, F, z
time = 35

[Command]
name = "gaiaz2"
command = ~U, B, DB, DF, F, z
time = 35

[Command]
name = "gaiaz2"
command = ~B, U, F, D, z
time = 35

[Command]
name = "gaiaz2"
command = ~D, B, U, F, z
time = 35

[Command]
name = "gaiaz2"
command = ~F, D, B, U, z
time = 35

[Command]
name = "gaiaz2"
command = ~F, DF, DB, B, U, z
time = 35

[Command]
name = "gaiaz2"
command = ~U, F, D, B, z
time = 35

[Command]
name = "gaiaz2"
command = ~U, F, DF, DB, B, z
time = 35

[Command]
name = "gaiaz2"
command = ~B, D, F, U, ~z
time = 35

[Command]
name = "gaiaz2"
command = ~B, DB, DF, F, U, ~z
time = 35

[Command]
name = "gaiaz2"
command = ~D, F, U, B, ~z
time = 35

[Command]
name = "gaiaz2"
command = ~F, U, B, D, ~z
time = 35

[Command]
name = "gaiaz2"
command = ~U, B, D, F, ~z
time = 35

[Command]
name = "gaiaz2"
command = ~U, B, DB, DF, F, ~z
time = 35

[Command]
name = "gaiaz2"
command = ~B, U, F, D, ~z
time = 35

[Command]
name = "gaiaz2"
command = ~D, B, U, F, ~z
time = 35

[Command]
name = "gaiaz2"
command = ~F, D, B, U, ~z
time = 35

[Command]
name = "gaiaz2"
command = ~F, DF, DB, B, U, ~z
time = 35

[Command]
name = "gaiaz2"
command = ~U, F, D, B, ~z
time = 35

[Command]
name = "gaiaz2"
command = ~U, F, DF, DB, B, ~z
time = 35

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

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

[Command]
name = "slama2"
command = ~F, D, DF, a
time = 20

[Command]
name = "slama2"
command = ~F, D, DF, ~a
time = 20

[Command]
name = "slamaquick2"
command = ~F, D, F, a
time = 15

[Command]
name = "slamaquick2"
command = ~F, D, F, ~a
time = 15

[Command]
name = "slamb2"
command = ~F, D, DF, b
time = 20

[Command]
name = "slamb2"
command = ~F, D, DF, ~b
time = 20

[Command]
name = "slambquick2"
command = ~F, D, F, b
time = 15

[Command]
name = "slambquick2"
command = ~F, D, F, ~b
time = 15

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

[Command]
name = "jupiter"
command = ~D, DF, F, D, DF, F, a
time = 35

[Command]
name = "jupiter"
command = ~D, DF, F, D, DF, F, ~a
time = 35

[Command]
name = "jupiter"
command = ~D, DF, F, D, DF, F, b
time = 35

[Command]
name = "jupiter"
command = ~D, DF, F, D, DF, F, ~b
time = 35

[Command]
name = "jupiter"
command = ~D, DF, F, D, DF, F, c
time = 35

[Command]
name = "jupiter"
command = ~D, DF, F, D, DF, F, ~c
time = 35

[Command]
name = "jupiter"
command = ~D, F, D, F, a
time = 20

[Command]
name = "jupiter"
command = ~D, F, D, F, ~a
time = 20

[Command]
name = "jupiter"
command = ~D, F, D, F, b
time = 20

[Command]
name = "jupiter"
command = ~D, F, D, F, ~b
time = 20

[Command]
name = "jupiter"
command = ~D, F, D, F, c
time = 20

[Command]
name = "jupiter"
command = ~D, F, D, F, ~c
time = 20

[Command]
name = "720"
command = ~B, $D, F, $U, B, $D, F, $U
time = 60

[Command]
name = "720"
command = ~$D, F, $U, B, $D, F, $U, B
time = 60

[Command]
name = "720"
command = ~F, $U, B, $D, F, $U, B, $D
time = 60

[Command]
name = "720"
command = ~$U, B, $D, F, $U, B, $D, F
time = 60

[Command]
name = "720"
command = ~B, $U, F, $D, B, $U, F, $D
time = 60

[Command]
name = "720"
command = ~$D, B, $U, F, $D, B, $U, F
time = 60

[Command]
name = "720"
command = ~F, $D, B, $U, F, $D, B, $U
time = 60

[Command]
name = "720"
command = ~$U, F, $D, B, $U, F, $D, B
time = 60

[Command]
name = "hercules"
command = ~D, DF, F, D, DF, F, x
time = 35

[Command]
name = "hercules"
command = ~D, DF, F, D, DF, F, ~x
time = 35

[Command]
name = "hercules"
command = ~D, DF, F, D, DF, F, y
time = 35

[Command]
name = "hercules"
command = ~D, DF, F, D, DF, F, ~y
time = 35

[Command]
name = "hercules"
command = ~D, DF, F, D, DF, F, z
time = 35

[Command]
name = "hercules"
command = ~D, DF, F, D, DF, F, ~z
time = 35

[Command]
name = "hercules"
command = ~D, F, D, F, x
time = 20

[Command]
name = "hercules"
command = ~D, F, D, F, ~x
time = 20

[Command]
name = "hercules"
command = ~D, F, D, F, y
time = 20

[Command]
name = "hercules"
command = ~D, F, D, F, ~y
time = 20

[Command]
name = "hercules"
command = ~D, F, D, F, z
time = 20

[Command]
name = "hercules"
command = ~D, F, D, F, ~z
time = 20

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

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

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

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

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

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

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

[Command]
name = "360"
command = ~B, D, F, U
time = 30

[Command]
name = "360"
command = ~B, DB, DF, F, U
time = 30

[Command]
name = "360"
command = ~D, F, U, B
time = 30

[Command]
name = "360"
command = ~F, U, B, D
time = 30

[Command]
name = "360"
command = ~U, B, D, F
time = 30

[Command]
name = "360"
command = ~U, B, DB, DF, F
time = 30

[Command]
name = "360"
command = ~B, U, F, D
time = 30

[Command]
name = "360"
command = ~D, B, U, F
time = 30

[Command]
name = "360"
command = ~F, D, B, U
time = 30

[Command]
name = "360"
command = ~F, DF, DB, B, U
time = 30

[Command]
name = "360"
command = ~U, F, D, B
time = 30

[Command]
name = "360"
command = ~U, F, DF, DB, B
time = 30

[Command]
name = "gaiax"
command = ~B, D, F, U, x
time = 35

[Command]
name = "gaiax"
command = ~B, DB, DF, F, U, x
time = 35

[Command]
name = "gaiax"
command = ~D, F, U, B, x
time = 35

[Command]
name = "gaiax"
command = ~F, U, B, D, x
time = 35

[Command]
name = "gaiax"
command = ~U, B, D, F, x
time = 35

[Command]
name = "gaiax"
command = ~U, B, DB, DF, F, x
time = 35

[Command]
name = "gaiax"
command = ~B, U, F, D, x
time = 35

[Command]
name = "gaiax"
command = ~D, B, U, F, x
time = 35

[Command]
name = "gaiax"
command = ~F, D, B, U, x
time = 35

[Command]
name = "gaiax"
command = ~F, DF, DB, B, U, x
time = 35

[Command]
name = "gaiax"
command = ~U, F, D, B, x
time = 35

[Command]
name = "gaiax"
command = ~U, F, DF, DB, B, x
time = 35

[Command]
name = "gaiax"
command = ~B, D, F, U, ~x
time = 35

[Command]
name = "gaiax"
command = ~B, DB, DF, F, U, ~x
time = 35

[Command]
name = "gaiax"
command = ~D, F, U, B, ~x
time = 35

[Command]
name = "gaiax"
command = ~F, U, B, D, ~x
time = 35

[Command]
name = "gaiax"
command = ~U, B, D, F, ~x
time = 35

[Command]
name = "gaiax"
command = ~U, B, DB, DF, F, ~x
time = 35

[Command]
name = "gaiax"
command = ~B, U, F, D, ~x
time = 35

[Command]
name = "gaiax"
command = ~D, B, U, F, ~x
time = 35

[Command]
name = "gaiax"
command = ~F, D, B, U, ~x
time = 35

[Command]
name = "gaiax"
command = ~F, DF, DB, B, U, ~x
time = 35

[Command]
name = "gaiax"
command = ~U, F, D, B, ~x
time = 35

[Command]
name = "gaiax"
command = ~U, F, DF, DB, B, ~x
time = 35

[Command]
name = "gaiay"
command = ~B, D, F, U, y
time = 35

[Command]
name = "gaiay"
command = ~B, DB, DF, F, U, y
time = 35

[Command]
name = "gaiay"
command = ~D, F, U, B, y
time = 35

[Command]
name = "gaiay"
command = ~F, U, B, D, y
time = 35

[Command]
name = "gaiay"
command = ~U, B, D, F, y
time = 35

[Command]
name = "gaiay"
command = ~U, B, DB, DF, F, y
time = 35

[Command]
name = "gaiay"
command = ~B, U, F, D, y
time = 35

[Command]
name = "gaiay"
command = ~D, B, U, F, y
time = 35

[Command]
name = "gaiay"
command = ~F, D, B, U, y
time = 35

[Command]
name = "gaiay"
command = ~F, DF, DB, B, U, y
time = 35

[Command]
name = "gaiay"
command = ~U, F, D, B, y
time = 35

[Command]
name = "gaiay"
command = ~U, F, DF, DB, B, y
time = 35

[Command]
name = "gaiay"
command = ~B, D, F, U, ~y
time = 35

[Command]
name = "gaiay"
command = ~B, DB, DF, F, U, ~y
time = 35

[Command]
name = "gaiay"
command = ~D, F, U, B, ~y
time = 35

[Command]
name = "gaiay"
command = ~F, U, B, D, ~y
time = 35

[Command]
name = "gaiay"
command = ~U, B, D, F, ~y
time = 35

[Command]
name = "gaiay"
command = ~U, B, DB, DF, F, ~y
time = 35

[Command]
name = "gaiay"
command = ~B, U, F, D, ~y
time = 35

[Command]
name = "gaiay"
command = ~D, B, U, F, ~y
time = 35

[Command]
name = "gaiay"
command = ~F, D, B, U, ~y
time = 35

[Command]
name = "gaiay"
command = ~F, DF, DB, B, U, ~y
time = 35

[Command]
name = "gaiay"
command = ~U, F, D, B, ~y
time = 35

[Command]
name = "gaiay"
command = ~U, F, DF, DB, B, ~y
time = 35

[Command]
name = "gaiaz"
command = ~B, D, F, U, z
time = 35

[Command]
name = "gaiaz"
command = ~B, DB, DF, F, U, z
time = 35

[Command]
name = "gaiaz"
command = ~D, F, U, B, z
time = 35

[Command]
name = "gaiaz"
command = ~F, U, B, D, z
time = 35

[Command]
name = "gaiaz"
command = ~U, B, D, F, z
time = 35

[Command]
name = "gaiaz"
command = ~U, B, DB, DF, F, z
time = 35

[Command]
name = "gaiaz"
command = ~B, U, F, D, z
time = 35

[Command]
name = "gaiaz"
command = ~D, B, U, F, z
time = 35

[Command]
name = "gaiaz"
command = ~F, D, B, U, z
time = 35

[Command]
name = "gaiaz"
command = ~F, DF, DB, B, U, z
time = 35

[Command]
name = "gaiaz"
command = ~U, F, D, B, z
time = 35

[Command]
name = "gaiaz"
command = ~U, F, DF, DB, B, z
time = 35

[Command]
name = "gaiaz"
command = ~B, D, F, U, ~z
time = 35

[Command]
name = "gaiaz"
command = ~B, DB, DF, F, U, ~z
time = 35

[Command]
name = "gaiaz"
command = ~D, F, U, B, ~z
time = 35

[Command]
name = "gaiaz"
command = ~F, U, B, D, ~z
time = 35

[Command]
name = "gaiaz"
command = ~U, B, D, F, ~z
time = 35

[Command]
name = "gaiaz"
command = ~U, B, DB, DF, F, ~z
time = 35

[Command]
name = "gaiaz"
command = ~B, U, F, D, ~z
time = 35

[Command]
name = "gaiaz"
command = ~D, B, U, F, ~z
time = 35

[Command]
name = "gaiaz"
command = ~F, D, B, U, ~z
time = 35

[Command]
name = "gaiaz"
command = ~F, DF, DB, B, U, ~z
time = 35

[Command]
name = "gaiaz"
command = ~U, F, D, B, ~z
time = 35

[Command]
name = "gaiaz"
command = ~U, F, DF, DB, B, ~z
time = 35

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

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

[Command]
name = "switcha"
command = ~D, DB, B, a
time = 20

[Command]
name = "switcha"
command = ~D, DB, B, ~a
time = 20

[Command]
name = "switchb"
command = ~D, DB, B, b
time = 20

[Command]
name = "switchb"
command = ~D, DB, B, ~b
time = 20

[Command]
name = "switchc"
command = ~D, DB, B, c
time = 20

[Command]
name = "switchc"
command = ~D, DB, B, ~c
time = 20

[Command]
name = "weaponx"
command = ~D, DB, B, x
time = 20

[Command]
name = "weaponx"
command = ~D, DB, B, ~x
time = 20

[Command]
name = "weapony"
command = ~D, DB, B, y
time = 20

[Command]
name = "weapony"
command = ~D, DB, B, ~y
time = 20

[Command]
name = "weaponz"
command = ~D, DB, B, z
time = 20

[Command]
name = "weaponz"
command = ~D, DB, B, ~z
time = 20

[Command]
name = "perseusx"
command = ~45$B, F, x
time = 10

[Command]
name = "perseusx"
command = ~45$B, F, ~x
time = 10

[Command]
name = "perseusy"
command = ~45$B, F, y
time = 10

[Command]
name = "perseusy"
command = ~45$B, F, ~y
time = 10

[Command]
name = "perseusz"
command = ~45$B, F, z
time = 10

[Command]
name = "perseusz"
command = ~45$B, F, ~z
time = 10

[Command]
name = "perseusa"
command = ~45$B, F, a
time = 10

[Command]
name = "perseusa"
command = ~45$B, F, ~a
time = 10

[Command]
name = "perseusb"
command = ~45$B, F, b
time = 10

[Command]
name = "perseusb"
command = ~45$B, F, ~b
time = 10

[Command]
name = "perseusc"
command = ~45$B, F, c
time = 10

[Command]
name = "perseusc"
command = ~45$B, F, ~c
time = 10

[Command]
name = "slama"
command = ~F, D, DF, a
time = 20

[Command]
name = "slama"
command = ~F, D, DF, ~a
time = 20

[Command]
name = "slamaquick"
command = ~F, D, F, a
time = 15

[Command]
name = "slamaquick"
command = ~F, D, F, ~a
time = 15

[Command]
name = "slamb"
command = ~F, D, DF, b
time = 20

[Command]
name = "slamb"
command = ~F, D, DF, ~b
time = 20

[Command]
name = "slambquick"
command = ~F, D, F, b
time = 15

[Command]
name = "slambquick"
command = ~F, D, F, ~b
time = 15

[Command]
name = "slamc"
command = ~F, D, DF, c
time = 20

[Command]
name = "slamc"
command = ~F, D, DF, ~c
time = 20

[Command]
name = "slamcquick"
command = ~F, D, F, c
time = 15

[Command]
name = "slamcquick"
command = ~F, D, F, ~c
time = 15

[Command]
name = "slashx"
command = ~F, D, DF, x
time = 20

[Command]
name = "slashx"
command = ~F, D, DF, ~x
time = 20

[Command]
name = "slashxquick"
command = ~F, D, F, x
time = 15

[Command]
name = "slashxquick"
command = ~F, D, F, ~x
time = 15

[Command]
name = "slashy"
command = ~F, D, DF, y
time = 20

[Command]
name = "slashy"
command = ~F, D, DF, ~y
time = 20

[Command]
name = "slashyquick"
command = ~F, D, F, y
time = 15

[Command]
name = "slashyquick"
command = ~F, D, F, ~y
time = 15

[Command]
name = "slashz"
command = ~F, D, DF, z
time = 20

[Command]
name = "slashz"
command = ~F, D, DF, ~z
time = 20

[Command]
name = "slashzquick"
command = ~F, D, F, z
time = 15

[Command]
name = "slashzquick"
command = ~F, D, F, ~z
time = 15

[Command]
name = "rushx"
command = ~D, DF, F, x
time = 20

[Command]
name = "rushx"
command = ~D, DF, F, ~x
time = 20

[Command]
name = "rushy"
command = ~D, DF, F, y
time = 20

[Command]
name = "rushy"
command = ~D, DF, F, ~y
time = 20

[Command]
name = "rushz"
command = ~D, DF, F, z
time = 20

[Command]
name = "rushz"
command = ~D, DF, F, ~z
time = 20

[Command]
name = "rusha"
command = ~D, DF, F, a
time = 20

[Command]
name = "rusha"
command = ~D, DF, F, ~a
time = 20

[Command]
name = "rushb"
command = ~D, DF, F, b
time = 20

[Command]
name = "rushb"
command = ~D, DF, F, ~b
time = 20

[Command]
name = "rushc"
command = ~D, DF, F, c
time = 20

[Command]
name = "rushc"
command = ~D, DF, F, ~c
time = 20

[Command]
name = "ultcounterpunch"
command = ~B, DB, D, x
time = 20

[Command]
name = "ultcounterpunch"
command = ~B, DB, D, ~x
time = 20

[Command]
name = "ultcounterpunch"
command = ~B, DB, D, y
time = 20

[Command]
name = "ultcounterpunch"
command = ~B, DB, D, ~y
time = 20

[Command]
name = "ultcounterpunch"
command = ~B, DB, D, z
time = 20

[Command]
name = "ultcounterpunch"
command = ~B, DB, D, ~z
time = 20

[Command]
name = "ultcounterkick"
command = ~B, DB, D, a
time = 20

[Command]
name = "ultcounterkick"
command = ~B, DB, D, ~a
time = 20

[Command]
name = "ultcounterkick"
command = ~B, DB, D, b
time = 20

[Command]
name = "ultcounterkick"
command = ~B, DB, D, ~b
time = 20

[Command]
name = "ultcounterkick"
command = ~B, DB, D, c
time = 20

[Command]
name = "ultcounterkick"
command = ~B, DB, D, ~c
time = 20

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

;-| Dir |--------------------------------------------------------------------

[Command]
name = "up"
command = $U
time = 1

[Command]
name = "down"
command = $D
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, Label]           ;Change Label to any name you want to use to
;                               ;identify the state with.
;   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"
;
; 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]

;==================================================================================
;======| RELACIONADO À AI - AI RELATED |===========================================
;==================================================================================

; The main purpose of having these next two controllers here at the top of
; StateDef -1 is to make sure the AI helper never changes to a different state,
; but they also improve efficiency by preventing Mugen from wasting time
; processing the entire State -1 for the helper.
[State -1, AI Helper Check]
type = ChangeState
trigger1 = IsHelper(9741)
value = 9741

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

; This is generally the best place to put most of your AI directives.  For
; example, this controller would only be executed when the CPU is in control:
;
; [State -1, Haha!]
; type = ChangeState
; trigger1 = var(0) ; (Or use "var(59)>0" if you've chosen not to
;                   ; use the Simplifier variable/controller.)
; trigger1 = ctrl
; trigger1 = (StateType = S)
; trigger1 = (MoveType = I)
; trigger1 = (P2MoveType = H)
; trigger1 = (NumEnemy = 1)
; trigger1 = (Enemy,GetHitVar(HitTime) > 60)
; trigger1 = (PrevStateNo != 195)
; trigger1 = (Random < 99)
; value = 195

; And of course, most human-only command-based ChangeStates also belong
; in State -1.  For example, this move would only be performable by a human:
;
; [State -1, Death Before Dishonor]
; type = ChangeState
; trigger1 = (command = "suicide")
; trigger1 = !var(0) ; (Or use "var(59)<1" if you've chosen not to
;                    ; use the Simplifier variable/controller.)
; trigger1 = ctrl
; trigger1 = (StateType != A)
; trigger1 = (MoveType = I)
; value = {suicide state number}

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

;==================================================================================
;==================================================================================
;==================================================================================
;---------------------------------------------------------------------------
; Regain Weapons
[State -1, Regain Weapons]
type = ChangeState
value = ifelse(var(9) = 5 && !var(20), 1310, 1300)
triggerall = statetype != A
triggerall = ctrl || movecontact = 1 && (stateno = 200 || stateno = 400 || stateno = [230, 240])
trigger1 = var(9) < 0

;---------------------------------------------------------------------------
; Jupiter Rave
[State -1, Rave]
type = ChangeState
value = 2200
triggerall = var(59) < 1
triggerall = var(16)
triggerall = var(9) = 5
triggerall = statetype != A
triggerall = power >= 2000
triggerall = ctrl || movecontact = 1 && (stateno = 200 || stateno = 400 || stateno = [230, 240])
trigger1 = command = "jupiter"
trigger2 = numhelper(9998)
trigger2 = helper(9998), var(0) = 43

;---------------------------------------------------------------------------
; Gigas Driver
[State -1, Gigas Driver]
type = ChangeState
value = 2100
triggerall = var(59) < 1
triggerall = var(9) > 0
triggerall = !var(20) || var(20) > 31 || (var(16) && var(20) > 25)
triggerall = statetype != A
triggerall = power >= 1000
triggerall = ctrl || stateno = 40 || movecontact = 1 && (stateno = 200 || stateno = 400 || stateno = [230, 240])
trigger1 = !numhelper(9998)
trigger1 = command = "720"
trigger1 = command = "holdx" || command = "holdy" || command = "holdz"
trigger1 = var(0) := 0 || 1
trigger2 = numhelper(9998)
trigger2 = helper(9998), var(0) = 37
trigger2 = var(0) := 0 || 1

;---------------------------------------------------------------------------
; Hercules Rush
[State -1, Rush]
type = ChangeState
value = 2000
triggerall = var(59) < 1
triggerall = var(9) > 0
triggerall = statetype != A
triggerall = power >= 1000
triggerall = ctrl || movecontact = 1 && (stateno = 200 || stateno = 400 || stateno = [230, 240])
trigger1 = command = "hercules"
trigger2 = numhelper(9998)
trigger2 = helper(9998), var(0) = 34

;---------------------------------------------------------------------------
; Mystic Break
[State -1, Mystic Break]
type = ChangeState
value = 4000
triggerall = var(59) < 1
triggerall = statetype != A
triggerall = power >= 1000
triggerall = ctrl || movecontact = 1 && (stateno = 200 || stateno = 400 || stateno = [230, 240])
trigger1 = command = "mystic"
trigger2 = numhelper(9998)
trigger2 = helper(9998), var(0) = 40

;===========================================================================
;---------------------------------------------------------------------------
; Gaia Driver
[State -1, Gaia Driver]
type = ChangeState
value = 1200
triggerall = var(59) < 1
triggerall = var(9) > 0
triggerall = !var(20) || var(20) > 30 || (var(16) && var(20) > 22)
triggerall = statetype != A
triggerall = ctrl || stateno = 40 || movecontact = 1 && (stateno = 200 || stateno = 400 || stateno = [230, 240])
trigger1 = helper(9998), var(0) = 13 || command = "gaiax"
trigger1 = var(0) := 0 || 1
trigger2 = helper(9998), var(0) = 14 || command = "gaiay"
trigger2 = var(0) := 1
trigger3 = helper(9998), var(0) = 15 || command = "gaiaz"
trigger3 = var(0) := 2

;---------------------------------------------------------------------------
; Mars Slash (Shortcut Input)
[State -1, Mars Slash]
type = ChangeState
value = 1100
triggerall = var(59) < 1
triggerall = var(9) > 0
triggerall = statetype != A
triggerall = ctrl || movecontact = 1 && (stateno = 200 || stateno = 400 || stateno = [230, 240])
trigger1 = command = "slashxquick" || helper(9998), var(0) = 10
trigger1 = var(0) := 0 || 1
trigger2 = command = "slashyquick" || helper(9998), var(0) = 11
trigger2 = var(0) := 1
trigger3 = command = "slashzquick" || helper(9998), var(0) = 12
trigger3 = var(0) := 2

;---------------------------------------------------------------------------
; Apollo Slam (Shortcut Input)
[State -1, Apollo Slam]
type = ChangeState
value = 1400
triggerall = var(59) < 1
triggerall = var(16)
triggerall = !var(20) || var(20) > 4
triggerall = var(9) > 0
triggerall = statetype != A
triggerall = ctrl || movecontact = 1 && (stateno = 200 || stateno = 400 || stateno = [230, 240])
trigger1 = command = "slamaquick" || helper(9998), var(0) = 22
trigger1 = var(0) := 0 || 1
trigger2 = command = "slambquick" || helper(9998), var(0) = 23
trigger2 = var(0) := 1
trigger3 = command = "slamcquick" || helper(9998), var(0) = 24
trigger3 = var(0) := 2

;---------------------------------------------------------------------------
; Chronos/Achilles Rush
[State -1, Rush]
type = ChangeState
value = 1000
triggerall = var(59) < 1
triggerall = var(9) > 0
triggerall = statetype != A
triggerall = ctrl || movecontact = 1 && (stateno = 200 || stateno = 400 || stateno = [230, 240])
trigger1 = command = "rushx" || helper(9998), var(0) = 1
trigger1 = var(0) := 0 || 1
trigger2 = command = "rushy" || helper(9998), var(0) = 2
trigger2 = var(0) := 1
trigger3 = command = "rushz" || helper(9998), var(0) = 3
trigger3 = var(0) := 2
trigger4 = !var(20) || var(20) > 7
trigger4 = command = "rusha" || helper(9998), var(0) = 4
trigger4 = var(0) := 3
trigger5 = !var(20) || var(20) > 7
trigger5 = command = "rushb" || helper(9998), var(0) = 5
trigger5 = var(0) := 4
trigger6 = !var(20) || var(20) > 7
trigger6 = command = "rushc" || helper(9998), var(0) = 6
trigger6 = var(0) := 5

;---------------------------------------------------------------------------
; Weapon Specials
[State -1, Weapon Specials]
type = ChangeState
value = 1600
triggerall = var(59) < 1
triggerall = var(9) > 0
triggerall = var(16)
triggerall = statetype != A
triggerall = ctrl || movecontact = 1 && (stateno = 200 || stateno = 400 || stateno = [230, 240])
triggerall = (var(9) != 6 || !numhelper(1660))
triggerall = (var(9) != 7 || !numhelper(1710))
trigger1 = command = "weaponx" || helper(9998), var(0) = 31
trigger1 = var(0) := 0 || 1
trigger2 = command = "weapony" || helper(9998), var(0) = 32
trigger2 = var(0) := 1
trigger3 = command = "weaponz" || helper(9998), var(0) = 33
trigger3 = var(0) := 2

;---------------------------------------------------------------------------
; Mars Slash
[State -1, Mars Slash]
type = ChangeState
value = 1100
triggerall = var(59) < 1
triggerall = var(9) > 0
triggerall = statetype != A
triggerall = ctrl || movecontact = 1 && (stateno = 200 || stateno = 400 || stateno = [230, 240])
trigger1 = command = "slashx" || helper(9998), var(0) = 7
trigger1 = var(0) := 0 || 1
trigger2 = command = "slashy" || helper(9998), var(0) = 8
trigger2 = var(0) := 1
trigger3 = command = "slashz" || helper(9998), var(0) = 9
trigger3 = var(0) := 2

;---------------------------------------------------------------------------
; Apollo Slam
[State -1, Apollo Slam]
type = ChangeState
value = 1400
triggerall = var(59) < 1
triggerall = var(16)
triggerall = !var(20) || var(20) > 4
triggerall = var(9) > 0
triggerall = statetype != A
triggerall = ctrl || movecontact = 1 && (stateno = 200 || stateno = 400 || stateno = [230, 240])
trigger1 = command = "slama" || helper(9998), var(0) = 19
trigger1 = var(0) := 0 || 1
trigger2 = command = "slamb" || helper(9998), var(0) = 20
trigger2 = var(0) := 1
trigger3 = command = "slamc" || helper(9998), var(0) = 21
trigger3 = var(0) := 2

;---------------------------------------------------------------------------
; Perseus Charge
[State -1, Rush]
type = ChangeState
value = 1500
triggerall = var(59) < 1
triggerall = var(9) > 0
triggerall = var(16)
triggerall = !var(20) || var(20) > 11
triggerall = statetype != A
triggerall = ctrl || movecontact = 1 && (stateno = 200 || stateno = 400 || stateno = [230, 240])
trigger1 = command = "perseusx" || helper(9998), var(0) = 25
trigger1 = var(0) := 0 || 1
trigger2 = command = "perseusy" || helper(9998), var(0) = 26
trigger2 = var(0) := 1
trigger3 = command = "perseusz" || helper(9998), var(0) = 27
trigger3 = var(0) := 2

;---------------------------------------------------------------------------
; Perseus Tackle
[State -1, Rush]
type = ChangeState
value = 1550
triggerall = var(59) < 1
triggerall = var(9) > 0
triggerall = var(16)
triggerall = !var(20) || var(20) > 14
triggerall = statetype != A
triggerall = ctrl || movecontact = 1 && (stateno = 200 || stateno = 400 || stateno = [230, 240])
trigger1 = command = "perseusa" || helper(9998), var(0) = 28
trigger1 = var(0) := 0 || 1
trigger2 = command = "perseusb" || helper(9998), var(0) = 29
trigger2 = var(0) := 1
trigger3 = command = "perseusc" || helper(9998), var(0) = 30
trigger3 = var(0) := 2

;---------------------------------------------------------------------------
; Switch Legendary Weapons
[State -1, Switch Legendary Weapons]
type = ChangeState
value = 1310
triggerall = var(59) < 1
triggerall = var(9) > 0
triggerall = !var(20)
triggerall = statetype != A
triggerall = ctrl || movecontact = 1 && (stateno = 200 || stateno = 400 || stateno = [230, 240])
triggerall = power >= 333 || var(9) = 5
trigger1 = command = "switchlegendary"

;---------------------------------------------------------------------------
; Switch Weapons
[State -1, Switch Weapons]
type = ChangeState
value = 1300
triggerall = var(59) < 1
triggerall = var(9) > 0
triggerall = var(21) > 9
triggerall = statetype != A
triggerall = ctrl || movecontact = 1 && (stateno = 200 || stateno = 400 || stateno = [230, 240])
triggerall = var(9) != 5 || var(20)
trigger1 = (var(21)%100)/10
trigger1 = command = "switcha" && command = "switchb"
trigger1 = var(0) := 3
trigger2 = (var(21)%1000)/100
trigger2 = command = "switchb" && command = "switchc"
trigger2 = var(0) := 4
trigger3 = (var(21)%10000)/1000
trigger3 = command = "switcha" && command = "switchc"
trigger3 = var(0) := 5
trigger4 = command = "switcha"
trigger4 = var(0) := 0 || 1
trigger5 = command = "switchb"
trigger5 = var(0) := 1
trigger6 = (var(21)%100000)/10000
trigger6 = command = "switchc"
trigger6 = var(0) := 2

;---------------------------------------------------------------------------
; Ultimate Guard
[State -1, Stand Ultimate Guard]
type = ChangeState
value = ifelse(stateno = 150 || stateno = 152, 165, 160)
triggerall = var(59) < 1
triggerall = var(9) > 0
triggerall = stateno != 160 && stateno != 165
triggerall = statetype != A
triggerall = movetype != A
triggerall = ctrl || (movetype = H && gethitvar(guarded))
trigger1 = command = "z" && command = "c"
trigger1 = var(0) := 1
trigger2 = (command = "x" || command = "y" || command = "z")
trigger2 = (command = "a" || command = "b" || command = "c")
trigger2 = var(0) := 0 || 1
ignorehitpause = 1

;---------------------------------------------------------------------------
; Ultimate Counter (Punch)
[State -1, Ultimate Counter (Punch)]
type = ChangeState
value = 900
triggerall = var(59) < 1
triggerall = var(9) > 0
triggerall = (anim = 161 && (stateno = 161 || (stateno = 162 && time < 5))) || ((anim = 161 || anim = 166) && (stateno = 166 && time < 13))
trigger1 = command = "ultcounterpunch"
ignorehitpause = 1

;---------------------------------------------------------------------------
; Ultimate Counter (Kick)
[State -1, Ultimate Counter (Kick)]
type = ChangeState
value = 910
triggerall = var(59) < 1
triggerall = var(9) > 0
triggerall = !var(20) || var(20) > 19
triggerall = (anim = 161 && (stateno = 161 || (stateno = 162 && time < 5))) || ((anim = 161 || anim = 166) && (stateno = 166 && time < 13))
trigger1 = command = "ultcounterkick"
ignorehitpause = 1

;===========================================================================
;---------------------------------------------------------------------------
; Run Fwd
[State -1, Run Fwd]
type = ChangeState
value = ifelse(p2dist x < 0, 105, 100)
triggerall = var(59) < 1
triggerall = statetype = S
triggerall = ctrl
trigger1 = command = "FF"
trigger2 = numhelper(9998)
trigger2 = helper(9998), var(1) = 21
trigger2 = helper(9998), var(2) > 54
trigger2 = command = "holdfwd"

;---------------------------------------------------------------------------
; Run Back
[State -1, Run Back]
type = ChangeState
value = ifelse(p2dist x < 0, 100, 105)
triggerall = var(59) < 1
triggerall = statetype = S
triggerall = ctrl
trigger1 = command = "BB"
trigger2 = numhelper(9998)
trigger2 = helper(9998), var(1) = 22
trigger2 = helper(9998), var(2) > 54
trigger2 = command = "holdback"

;---------------------------------------------------------------------------
; Throw
[State -1, Throw]
type = ChangeState
value = 800
triggerall = var(59) < 1
triggerall = statetype = S
triggerall = ctrl
triggerall = p2bodydist X < 10
triggerall = (p2statetype = S) || (p2statetype = C)
triggerall = p2movetype != H
trigger1 = command = "z"
trigger1 = command = "holdfwd" || command = "holdback"
trigger2 = numhelper(9998)
trigger2 = helper(9998), var(1) = 3
trigger2 = helper(9998), var(2) > 54
trigger2 = command = "holdz"
trigger2 = command = "holdfwd" || command = "holdback"

;---------------------------------------------------------------------------
; Throw
[State -1, Throw 2]
type = ChangeState
value = 810
triggerall = var(59) < 1
triggerall = statetype = S
triggerall = ctrl
triggerall = p2bodydist X < 10
triggerall = (p2statetype = S) || (p2statetype = C)
triggerall = p2movetype != H
trigger1 = command = "y"
trigger1 = command = "holdfwd" || command = "holdback"
trigger2 = numhelper(9998)
trigger2 = helper(9998), var(1) = 2
trigger2 = helper(9998), var(2) > 54
trigger2 = command = "holdy"
trigger2 = command = "holdfwd" || command = "holdback"

;---------------------------------------------------------------------------
; Pounce
[State -1, Pounce]
type = ChangeState
value = 700
triggerall = var(59) < 1
triggerall = var(9) > 0
triggerall = statetype != A
triggerall = ctrl || stateno = 40
triggerall = p2movetype = H
triggerall = (p2statetype = A && enemynear, gethitvar(fall)) || p2statetype = L
trigger1 = command = "a" || command = "b" || command = "c"
trigger1 = command = "holdup"
trigger2 = numhelper(9998)
trigger2 = command = "holdup"
trigger2 = helper(9998), var(1) = [4, 6]
trigger2 = helper(9998), var(2) > 50
[State -1, Pounce]
type = ChangeState
value = 700
triggerall = var(59) < 1
triggerall = var(9) > 0
triggerall = statetype != A
triggerall = ctrl || stateno = 40
triggerall = numtarget
triggerall = (target, statetype = A && target, gethitvar(fall)) || target, statetype = L
trigger1 = command = "a" || command = "b" || command = "c"
trigger1 = command = "holdup"
trigger2 = numhelper(9998)
trigger2 = command = "holdup"
trigger2 = helper(9998), var(1) = [4, 6]
trigger2 = helper(9998), var(2) > 50

;===========================================================================
;---------------------------------------------------------------------------
; Taunt
;[State -1, Taunt]
;type = ChangeState
;value = 195
;triggerall = command = "start"
;trigger1 = statetype != A
;trigger1 = ctrl

;---------------------------------------------------------------------------
; Stand Light Punch
[State -1, Stand Light Punch]
type = ChangeState
value = 200
triggerall = var(59) < 1
triggerall = var(9) > 0
triggerall = statetype = S
triggerall = ctrl
trigger1 = command = "x"
trigger1 = command != "holddown"
trigger2 = numhelper(9998)
trigger2 = helper(9998), var(1) = 1
trigger2 = helper(9998), var(2) > 54
trigger2 = command = "holdx"
trigger2 = command != "holddown"

;---------------------------------------------------------------------------
; Stand Medium Punch
[State -1, Stand Medium Punch]
type = ChangeState
value = 210
triggerall = var(59) < 1
triggerall = var(9) > 0
triggerall = statetype = S
triggerall = ctrl
trigger1 = command = "y"
trigger1 = command != "holddown"
trigger2 = numhelper(9998)
trigger2 = helper(9998), var(1) = 2
trigger2 = helper(9998), var(2) > 54
trigger2 = command = "holdy"
trigger2 = command != "holddown"

;---------------------------------------------------------------------------
; Stand Strong Punch
[State -1, Stand Strong Punch]
type = ChangeState
value = 220
triggerall = var(59) < 1
triggerall = var(9) > 0
triggerall = statetype = S
triggerall = ctrl
trigger1 = command = "z"
trigger1 = command != "holddown"
trigger2 = numhelper(9998)
trigger2 = helper(9998), var(1) = 3
trigger2 = helper(9998), var(2) > 54
trigger2 = command = "holdz"
trigger2 = command != "holddown"

[State -1, VarSet]
type = VarSet
triggerall = var(59) < 1
triggerall = var(9) > 0
triggerall = stateno = 220
triggerall = animelemno(0) = [6, 10]
trigger1 = command = "z"
var(0) = 1

;---------------------------------------------------------------------------
; Stand Light Kick
[State -1, Stand Light Kick]
type = ChangeState
value = 230
triggerall = var(59) < 1
triggerall = statetype = S
triggerall = ctrl
trigger1 = command = "a"
trigger1 = command != "holddown"
trigger2 = numhelper(9998)
trigger2 = helper(9998), var(1) = 4
trigger2 = helper(9998), var(2) > 54
trigger2 = command = "holda"
trigger2 = command != "holddown"


;---------------------------------------------------------------------------
; Standing Medium Kick
[State -1, Standing Medium Kick]
type = ChangeState
value = 240
triggerall = var(59) < 1
triggerall = statetype = S
triggerall = ctrl
trigger1 = command = "b"
trigger1 = command != "holddown"
trigger2 = numhelper(9998)
trigger2 = helper(9998), var(1) = 5
trigger2 = helper(9998), var(2) > 54
trigger2 = command = "holdb"
trigger2 = command != "holddown"

;---------------------------------------------------------------------------
; Standing Strong Kick
[State -1, Standing Strong Kick]
type = ChangeState
value = 250
triggerall = var(59) < 1
triggerall = statetype = S
triggerall = ctrl
trigger1 = command = "c"
trigger1 = command != "holddown"
trigger2 = numhelper(9998)
trigger2 = helper(9998), var(1) = 6
trigger2 = helper(9998), var(2) > 54
trigger2 = command = "holdc"
trigger2 = command != "holddown"


;---------------------------------------------------------------------------
; Crouching Light Punch
[State -1, Crouching Light Punch]
type = ChangeState
value = 400
triggerall = var(59) < 1
triggerall = var(9) > 0
triggerall = statetype = C
triggerall = ctrl
trigger1 = command = "x"
trigger1 = command = "holddown"
trigger2 = numhelper(9998)
trigger2 = helper(9998), var(1) = 1
trigger2 = helper(9998), var(2) > 54
trigger2 = command = "holdx"
trigger2 = command = "holddown"

;---------------------------------------------------------------------------
; Crouching Medium Punch
[State -1, Crouching Medium Punch]
type = ChangeState
value = 410
triggerall = var(59) < 1
triggerall = var(9) > 0
triggerall = statetype = C
triggerall = ctrl
trigger1 = command = "y"
trigger1 = command = "holddown"
trigger2 = numhelper(9998)
trigger2 = helper(9998), var(1) = 2
trigger2 = helper(9998), var(2) > 54
trigger2 = command = "holdy"
trigger2 = command = "holddown"

;---------------------------------------------------------------------------
; Crouching Strong Punch
[State -1, Crouching Strong Punch]
type = ChangeState
value = 420
triggerall = var(59) < 1
triggerall = var(9) > 0
triggerall = statetype = C
triggerall = ctrl
trigger1 = command = "z"
trigger1 = command = "holddown"
trigger2 = numhelper(9998)
trigger2 = helper(9998), var(1) = 3
trigger2 = helper(9998), var(2) > 54
trigger2 = command = "holdz"
trigger2 = command = "holddown"

;---------------------------------------------------------------------------
; Crouching Light Kick
[State -1, Crouching Light Kick]
type = ChangeState
value = 430
triggerall = var(59) < 1
triggerall = var(9) > 0
triggerall = statetype = C
triggerall = ctrl
trigger1 = command = "a"
trigger1 = command = "holddown"
trigger2 = numhelper(9998)
trigger2 = helper(9998), var(1) = 4
trigger2 = helper(9998), var(2) > 54
trigger2 = command = "holda"
trigger2 = command = "holddown"

;---------------------------------------------------------------------------
; Crouching Medium Kick
[State -1, Crouching Medium Kick]
type = ChangeState
value = 440
triggerall = var(59) < 1
triggerall = var(9) > 0
triggerall = statetype = C
triggerall = ctrl
trigger1 = command = "b"
trigger1 = command = "holddown"
trigger2 = numhelper(9998)
trigger2 = helper(9998), var(1) = 5
trigger2 = helper(9998), var(2) > 54
trigger2 = command = "holdb"
trigger2 = command = "holddown"

;---------------------------------------------------------------------------
; Crouching Strong Kick
[State -1, Crouching Strong Kick]
type = ChangeState
value = 450
triggerall = var(59) < 1
triggerall = var(9) > 0
triggerall = statetype = C
triggerall = ctrl
trigger1 = command = "c"
trigger1 = command = "holddown"
trigger2 = numhelper(9998)
trigger2 = helper(9998), var(1) = 6
trigger2 = helper(9998), var(2) > 54
trigger2 = command = "holdc"
trigger2 = command = "holddown"

[State -1, VarSet]
type = VarSet
triggerall = var(59) < 1
triggerall = var(9) > 0
triggerall = stateno = 450
triggerall = animelemno(0) = [5, 8]
trigger1 = command = "c"
var(0) = 1

;---------------------------------------------------------------------------
; Jump Light Punch
[State -1, Jump Light Punch]
type = ChangeState
value = 600
triggerall = var(59) < 1
triggerall = var(9) > 0
triggerall = statetype = A
triggerall = ctrl
trigger1 = command = "x"
trigger2 = numhelper(9998)
trigger2 = helper(9998), var(1) = 1
trigger2 = helper(9998), var(2) > 54
trigger2 = command = "holdx"

;---------------------------------------------------------------------------
; Jump Medium Punch
[State -1, Jump Medium Punch]
type = ChangeState
value = 610
triggerall = var(59) < 1
triggerall = var(9) > 0
triggerall = statetype = A
triggerall = ctrl
trigger1 = command = "y"
trigger1 = command != "holdup"
trigger2 = numhelper(9998)
trigger2 = helper(9998), var(1) = 2
trigger2 = helper(9998), var(2) > 54
trigger2 = command = "holdy"
trigger2 = command != "holdup"

;---------------------------------------------------------------------------
; Jump Medium Punch 2
[State -1, Jump Medium Punch]
type = ChangeState
value = 660
triggerall = var(59) < 1
triggerall = var(9) > 0
triggerall = statetype = A
triggerall = ctrl
trigger1 = command = "y"
trigger1 = command = "holdup"
trigger2 = numhelper(9998)
trigger2 = helper(9998), var(1) = 2
trigger2 = helper(9998), var(2) > 54
trigger2 = command = "holdy"
trigger2 = command = "holdup"

;---------------------------------------------------------------------------
; Jump Strong Punch
[State -1, Jump Strong Punch]
type = ChangeState
value = 620
triggerall = var(59) < 1
triggerall = var(9) > 0
triggerall = statetype = A
triggerall = ctrl
trigger1 = command = "z"
trigger2 = numhelper(9998)
trigger2 = helper(9998), var(1) = 3
trigger2 = helper(9998), var(2) > 54
trigger2 = command = "holdz"

;---------------------------------------------------------------------------
; Jump Light Kick
[State -1, Jump Light Kick]
type = ChangeState
value = 630
triggerall = var(59) < 1
triggerall = var(9) > 0
triggerall = statetype = A
triggerall = ctrl
trigger1 = command = "a"
trigger2 = numhelper(9998)
trigger2 = helper(9998), var(1) = 4
trigger2 = helper(9998), var(2) > 54
trigger2 = command = "holda"

;---------------------------------------------------------------------------
; Jump Medium Kick
[State -1, Jump Medium Kick]
type = ChangeState
value = 640
triggerall = var(59) < 1
triggerall = var(9) > 0
triggerall = statetype = A
triggerall = ctrl
trigger1 = command = "b"
trigger1 = command != "holddown"
trigger2 = numhelper(9998)
trigger2 = helper(9998), var(1) = 5
trigger2 = helper(9998), var(2) > 54
trigger2 = command = "holdb"
trigger2 = command != "holddown"

;---------------------------------------------------------------------------
; Jump Medium Kick
[State -1, Jump Medium Kick 2]
type = ChangeState
value = 670
triggerall = var(59) < 1
triggerall = var(9) > 0
triggerall = statetype = A
triggerall = ctrl
trigger1 = command = "b"
trigger1 = command = "holddown"
trigger2 = numhelper(9998)
trigger2 = helper(9998), var(1) = 5
trigger2 = helper(9998), var(2) > 54
trigger2 = command = "holdb"
trigger2 = command = "holddown"

;---------------------------------------------------------------------------
; Jump Strong Kick
[State -1, Jump Strong Kick]
type = ChangeState
value = 650
triggerall = var(59) < 1
triggerall = var(9) > 0
triggerall = statetype = A
triggerall = ctrl
trigger1 = command = "c"
trigger1 = command != "holddown"
trigger2 = numhelper(9998)
trigger2 = helper(9998), var(1) = 6
trigger2 = helper(9998), var(2) > 54
trigger2 = command = "holdc"
trigger2 = command != "holddown"

;---------------------------------------------------------------------------
; Jump Strong Kick
[State -1, Jump Strong Kick 2]
type = ChangeState
value = 680
triggerall = var(59) < 1
triggerall = var(9) > 0
triggerall = statetype = A
triggerall = ctrl
trigger1 = command = "c"
trigger1 = command = "holddown"
trigger2 = numhelper(9998)
trigger2 = helper(9998), var(1) = 6
trigger2 = helper(9998), var(2) > 54
trigger2 = command = "holdc"
trigger2 = command = "holddown"


;===========================================================================
;---------------------------------------------------------------------------
; AI

[State AI, Action Select]
type = VarSet
triggerall = var(59) > 0
trigger1 = statetype != A
trigger1 = movetype != A || time = 1
var(58) = random%16

[State AI, Action Select]
type = VarSet
triggerall = var(59) > 0
trigger1 = enemynear, stateno = [160, 162]
trigger1 = enemynear, movetype != A
trigger1 = enemynear, statetype = S
var(58) = -1

[State AI, Guard Jump/Crouch Response]
type = null
triggerall = var(59) > 0
triggerall = p2movetype != H
trigger1 = p2statetype = A
trigger1 = fvar(39) < 200
trigger1 = fvar(39) := fvar(39) + 1
trigger2 = p2statetype = C
trigger2 = fvar(39) > -200
trigger2 = fvar(39) := fvar(39) - 1
trigger3 = p2statetype = S
trigger3 = fvar(39) := 0
ignorehitpause = 1

[State AI, Enemy Cornered]
type = VarSet
trigger1 = var(59) > 0
var(52) = 0

[State AI, Enemy Cornered]
type = VarSet
triggerall = var(59) > 0
trigger1 = enemynear, vel x < 0
trigger1 = enemynear, backedgebodydist > 5
trigger2 = enemynear, vel x > 0
trigger2 = enemynear, frontedgebodydist > 5
var(52) = 1

[State AI, Perseus High/Low]
type = VarSet
trigger1 = var(59) > 0
trigger1 = numhelper(9999)
trigger1 = var(36) = 1
trigger1 = helper(9999), var(32) = 1500
;trigger1 = var(52) > -2
var(51) = -1
ignorehitpause = 1

[State AI, Guard Ctrl]
type = CtrlSet
trigger1 = var(59) > 0
trigger1 = stateno = [120, 155]
trigger1 = movetype != H
value = 1

[State AI, Stand Heavy Kick Combo]
type = ChangeState
value = 250
triggerall = var(59) > 0
triggerall = statetype != A
triggerall = ctrl
triggerall = p2statetype = S
triggerall = p2stateno != [5120, 5205]
triggerall = p2bodydist x < const(size.xscale)*16 + 48*(enemynear, backedgebodydist < 1)
triggerall = p2dist x > const(size.xscale)*32
triggerall = p2dist y > const(size.yscale)*-64
triggerall = !var(48)
trigger1 = p2movetype = H
trigger1 = !inguarddist && stateno != [120, 155]
trigger1 = numtarget
trigger1 = (!target, gethitvar(guarded) && target, gethitvar(hittime) > 16) || (target, gethitvar(guarded) && target, gethitvar(ctrltime) > 16)
trigger1 = stateno != 250 || (p2stateno = 5400 && enemynear, time < 25)
trigger1 = moveguarded || stateno != 250
trigger1 = random/fvar(10) < 1000

[State AI, Stand Medium Kick Combo/Wakeup]
type = ChangeState
value = 240
triggerall = var(59) > 0
triggerall = statetype != A
triggerall = ctrl
triggerall = p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = p2stateno != [5120, 5205]
triggerall = p2bodydist x < const(size.xscale)*28 + 20*(enemynear, backedgebodydist < 1 || facing = enemynear, facing)
triggerall = p2dist x > const(size.xscale)*16
triggerall = p2dist y > const(size.yscale)*-64
triggerall = !var(48)
trigger1 = p2movetype = H
trigger1 = !inguarddist && stateno != [120, 155]
trigger1 = numtarget
trigger1 = (!target, gethitvar(guarded) && target, gethitvar(hittime) > 4) || (target, gethitvar(guarded) && target, gethitvar(ctrltime) > 4) || target, stateno = 5400
trigger1 = random/fvar(10) < 1000
trigger2 = var(55) > 4
trigger2 = random/fvar(10) < 100 + 300*p2movetype = A

[State AI, Stand Light Kick Combo/Wakeup]
type = ChangeState
value = 230
triggerall = var(59) > 0
triggerall = statetype != A
triggerall = ctrl
triggerall = p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = p2stateno != [5120, 5205]
triggerall = p2bodydist x < const(size.xscale)*48
triggerall = p2dist x > const(size.xscale)*8
triggerall = p2dist y > const(size.yscale)*-32
triggerall = !var(48)
trigger1 = p2movetype = H
trigger1 = p2bodydist x < const(size.xscale)*40 + 8*(enemynear, backedgebodydist < 1)
trigger1 = numtarget
trigger1 = random/fvar(10) < 1000
trigger1 = (!target, gethitvar(guarded) && target, gethitvar(hittime) = [1, 15]) || (target, gethitvar(guarded) && target, gethitvar(ctrltime) = [1, 15])
trigger2 = var(55) > 2
trigger2 = random/fvar(10) < 100 + 300*p2movetype = A

[State AI, Jupiter]
type = ChangeState
value = 2200
triggerall = var(59) > 0
triggerall = var(9) > 0
triggerall = var(16)
triggerall = var(9) = 5
triggerall = statetype != A
triggerall = power >= 2000
triggerall = ctrl || movecontact = 1 && stateno = 400;(stateno = 200 || stateno = 400 || stateno = [230, 240])
triggerall = p2statetype != L
triggerall = p2stateno != [5120, 5205]
triggerall = p2bodydist x < const(size.xscale)*32
triggerall = p2dist x > const(size.xscale)*8
triggerall = p2dist y > const(size.yscale)*-32
triggerall = p2bodydist x < const(size.xscale)*88
triggerall = !var(48)
trigger1 = inguarddist
trigger1 = p2movetype = A
trigger1 = random/fvar(10) < (120 + enemynear, time*5)
trigger2 = prevstateno = [120, 155]
trigger2 = enemynear, movecontact
trigger2 = random/fvar(10) < 300
trigger3 = p2movetype = H
trigger3 = p2statetype = A || enemynear, backedgebodydist > 32
trigger3 = enemynear, gethitvar(chainid) != 810 + id%10
trigger3 = enemynear, anim != [5070, 5071]
trigger3 = p2stateno > 4999
trigger3 = random/fvar(10) < 1000

[State AI, Gigas Driver]
type = ChangeState
value = 2100
triggerall = var(59) > 0
triggerall = var(9) > 0
triggerall = !var(20) || var(20) > 31 || (var(16) && var(20) > 26)
triggerall = statetype != A
triggerall = power >= 1000
triggerall = ctrl || stateno = 40 || movecontact = 1 && (stateno = 200 || stateno = 400 || stateno = [230, 240])
triggerall = p2statetype != L
triggerall = p2statetype != A || (p2dist y > -8 && enemynear, vel y < -5)
triggerall = p2movetype != H
triggerall = p2stateno != [5120, 5205]
triggerall = p2bodydist x < const(size.xscale)*32
triggerall = p2dist x > 0
triggerall = p2dist y > const(size.yscale)*-64
triggerall = !var(48)
trigger1 = ((stateno != [120, 155]) && stateno != [0, 40]) || (prevstateno = 52 && (stateno = 40 || time < 5)) || var(55) > 0
trigger1 = random/fvar(10) < (40 + power*0.01)*(1 + (var(55) > 0) + 3*(stateno = 52))*(1 + (p2movetype = I))
trigger1 = var(0) := 0 || 1

[State AI, Hercules]
type = ChangeState
value = 2000
triggerall = var(59) > 0
triggerall = var(9) > 0
triggerall = statetype != A
triggerall = power >= 1000
triggerall = ctrl || movecontact = 1 && stateno = 400;(stateno = 200 || stateno = 400 || stateno = [230, 240])
triggerall = p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = p2stateno != [5120, 5205]
triggerall = p2dist x > const(size.xscale)*32
triggerall = enemynear, pos y > const(size.yscale)*-8
triggerall = p2bodydist x < const(size.xscale)*64
trigger1 = inguarddist
trigger1 = p2movetype = A
trigger1 = random/fvar(10) < ((power+1000 + var(53)*2)*0.003 + enemynear, time*power*0.002)
trigger2 = random/fvar(10) < (power+1000 + var(53)*2)*0.006

[State AI, Gaia Driver]
type = ChangeState
value = 1200
triggerall = var(59) > 0
triggerall = var(9) > 0
triggerall = !var(20) || var(20) > 30 || (var(16) && var(20) > 22)
triggerall = statetype != A
triggerall = ctrl || stateno = 40 || movecontact = 1 && (stateno = 200 || stateno = 400 || stateno = [230, 240])
triggerall = p2movetype != H || (enemynear, gethitvar(hittime) < 6 && enemynear, gethitvar(ctrltime) < 6) || stateno = 250
triggerall = p2statetype != L
triggerall = p2statetype != A || (p2movetype != H && ((p2dist y > -8 && enemynear, vel y < -5) || (p2dist y > -16 && p2dist y + 4*enemynear, vel y >= 0)))
triggerall = p2stateno != [5120, 5205]
triggerall = p2dist x > 0
triggerall = p2dist y > const(size.yscale)*-64
triggerall = random/fvar(10) < 50*(1 + 4*(var(55) > 4) + 4*(stateno = 52) + 3*(stateno = 250) + 3*(p2movetype != A))
triggerall = !var(48)
trigger1 = p2bodydist x < const(size.xscale)*40
trigger1 = !inguarddist && stateno != [120, 155]
trigger1 = random < 300
trigger1 = var(0) := 2
trigger2 = p2bodydist x < const(size.xscale)*28
trigger2 = !inguarddist && stateno != [120, 155]
trigger2 = random < 500
trigger2 = var(0) := 1
trigger3 = p2bodydist x < const(size.xscale)*16
trigger3 = random < 500 || (!inguarddist && stateno != [120, 155])
trigger3 = var(0) := 0 || 1

[State AI, Throw]
type = ChangeState
value = 800 + 10*(pos x*facing > 0)
triggerall = var(59) > 0
triggerall = statetype != A
triggerall = ctrl
triggerall = p2bodydist X < 10
triggerall = (p2statetype = S) || (p2statetype = C)
triggerall = p2movetype != H
triggerall = p2stateno != [5120, 5205]
triggerall = p2dist x > 0
triggerall = p2dist y > const(size.yscale)*-64
triggerall = !var(48)
trigger1 = random/fvar(10) < 200*(1 + 2*(var(55) > 0) + 1*(stateno = 52) + 1*(backedgedist < 120)) + var(53)

[State AI, Apollo Slam]
type = ChangeState
value = 1400
triggerall = var(59) > 0
triggerall = var(16)
triggerall = var(9) > 0
triggerall = !var(20) || var(20) > 4
triggerall = statetype != A
triggerall = ctrl || movecontact = 1 && (stateno = 200 || stateno = 400 || stateno = [230, 240])
triggerall = p2statetype = A
triggerall = p2movetype != H || !enemynear, gethitvar(guarded)
triggerall = p2bodydist x + enemynear, vel x*var(52)*(6 + p2bodydist x/5)*facing*enemynear, facing + p2dist y + (enemynear, vel y+3)*(6 + p2bodydist x/5) < 48
triggerall = p2dist x + var(52)*(enemynear, vel x*(6 + p2bodydist x/5)*facing*enemynear, facing + p2dist y + (enemynear, vel y+3)*(6 + p2bodydist x/5)) > -48
triggerall = p2dist y + enemynear, vel y*(6 + p2bodydist x/5) = [-200, -64]
triggerall = !var(48)
trigger1 = p2bodydist x + enemynear, vel x*var(52)*(6 + p2bodydist x/5)*facing*enemynear, facing < 72
trigger1 = p2dist y < -48
trigger1 = random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < 30 + fvar(39)*0.8
trigger1 = var(0) := ifelse(p2bodydist x + enemynear, vel x*var(52)*(6 + p2bodydist x/5)*facing*enemynear, facing + p2dist y + (enemynear, vel y+5)*(6 + p2bodydist x/5) < -8, 2, 1)
trigger2 = p2movetype = H
trigger2 = enemynear, stateno != [120, 155]
trigger2 = enemynear, gethitvar(fall) || enemynear, stateno = 5400
trigger2 = enemynear, gethitvar(chainid) != 810 + id%10
trigger2 = random/fvar(10) < 1000
trigger2 = var(0) := ifelse(p2bodydist x + enemynear, vel x*var(52)*(6 + p2bodydist x/5)*facing*enemynear, facing + p2dist y + (enemynear, vel y+3)*(6 + p2bodydist x/5) < -16, 2, 1)

[State AI, Mystic Break]
type = ChangeState
value = 4000
triggerall = var(59) > 0
triggerall = statetype != A
triggerall = power >= 1000
triggerall = ctrl || movecontact = 1 && (stateno = 200 || stateno = 400 || stateno = [230, 240])
triggerall = random*10/fvar(10) < var(53)*((power-1000)*0.002)*(1 + 0.5*(!enemynear, ctrl))
triggerall = var(58) != -1
triggerall = var(24) := random%6 + 1
triggerall = p2movetype != H
triggerall = var(9) != 5 || var(20)
trigger1 = var(24) = 1
trigger1 = p2dist x > 0
trigger1 = p2bodydist x < 32*const(size.xscale)
trigger1 = p2dist y > -120*const(size.yscale)
trigger1 = frontedgedist > 160
trigger1 = p2statetype != L
trigger1 = p2stateno != [5120, 5205]
trigger2 = var(24) = 2
trigger2 = !inguarddist
trigger2 = p2movetype != A
trigger2 = (abs(p2dist x)/const(size.xscale)**2 + abs(p2dist y)/const(size.yscale)**2)**0.5 > 160
trigger3 = var(24) = 3
trigger3 = p2dist y > -120*const(size.yscale)
trigger3 = p2statetype != L
trigger3 = p2statetype = A
trigger3 = p2stateno != [5120, 5205]
trigger4 = var(24) = 4
trigger4 = !inguarddist
trigger4 = abs(p2dist x) + abs(p2dist y) > 160*const(size.xscale)
trigger4 = random < 300 + 700*(p2statetype = A && enemynear, vel y < 0)
trigger5 = var(24) = 5
trigger5 = !inguarddist
trigger5 = numhelper(9999)
trigger5 = !helper(9999), inguarddist
trigger5 = p2movetype != A
trigger5 = enemynear, vel x*var(52)*facing*enemynear, facing > -2
trigger5 = abs(p2dist x) > 120*const(size.xscale)
trigger5 = random < (200*(p2statetype = L) + (p2statetype = A || enemynear, ctrl = 0)*abs(p2dist x)*3)
trigger6 = var(24) = 6
trigger6 = p2dist x > -128*const(size.xscale)
trigger6 = p2bodydist x < 48*const(size.xscale)
trigger6 = p2statetype != A || (p2dist y > -16*const(size.yscale) && enemynear, vel y > 0)
trigger6 = p2statetype != L
trigger6 = p2stateno != [5120, 5205]
trigger6 = enemynear, power > 100

[State AI, Perseus]
type = ChangeState
value = ifelse(random < 500 + var(51)*200, 1500, 1550)
triggerall = var(59) > 0
triggerall = var(9) > 0
triggerall = var(16)
triggerall = var(49)
triggerall = !var(20) || var(20) > 14
triggerall = statetype != A
triggerall = ctrl || movecontact = 1 && (stateno = 200 || stateno = 400 || stateno = [230, 240])
triggerall = p2statetype != A
triggerall = p2movetype != H
triggerall = p2statetype != L
triggerall = p2stateno != [5120, 5205]
triggerall = p2bodydist x > const(size.xscale)*96
triggerall = numhelper(9999)
triggerall = inguarddist || (helper(9999), inguarddist && !enemynear, hitdefattr = SCA, AA, AP, AT)
triggerall = random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < (200 + p2bodydist x*0.5)*var(53)*0.003
triggerall = !enemynear, hitdefattr = SCA, HA, AT, HP
triggerall = !var(48)
trigger1 = p2dist x < 128
trigger1 = random < 500
trigger1 = var(0) := 0 || 1
trigger2 = p2dist x < 192
trigger2 = random < 500
trigger2 = var(0) := 1
trigger3 = var(0) := 2

[State AI, Ulysses Vault Light]
type = ChangeState
value = 1600
triggerall = var(59) > 0
triggerall = var(9) = [1, 5]
triggerall = var(16)
triggerall = statetype != A
triggerall = p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = (p2stateno != [5120, 5205]) || enemynear, animtime = [-5, -1]
triggerall = p2bodydist x < 64
triggerall = enemynear, pos y + enemynear, vel y*16 > const(size.yscale)*-96
triggerall = ctrl
triggerall = !var(48)
trigger1 = inguarddist || enemynear, hitdefattr = SCA, AT
trigger1 = random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < ifelse((enemynear, hitdefattr = SCA, SA, HA, AT), (var(53) + 100 + enemynear, time*20), (var(53)*0.5 + 30))
trigger1 = var(0) := 0 || 1
trigger2 = p2bodydist x < 16
trigger2 = random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < var(53)*0.2 + 10
trigger2 = var(0) := 0 || 1

[State AI, Ulysses Vault Medium]
type = ChangeState
value = 1600
triggerall = var(59) > 0
triggerall = var(9) = [1, 5]
triggerall = var(16)
triggerall = statetype != A
triggerall = p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = (p2stateno != [5120, 5205]) || enemynear, animtime = [-5, -1]
triggerall = p2bodydist x < 80 + const(size.xscale)*(88 + 8*ifelse(var(9) = 9, -1, ifelse(var(9) = 4, 1, ifelse(var(9) = 5, 2, 0))))
triggerall = enemynear, pos y + enemynear, vel y*16 > const(size.yscale)*-48
triggerall = !var(48)
trigger1 = ctrl
trigger1 = (!inguarddist && stateno != [120, 155]) || (p2statetype = C && (p2movetype = A || enemynear, hitdefattr = SCA, AA, AP, AT) && enemynear, animtime < -20)
trigger1 = p2movetype != H || enemynear, gethitvar(guarded)
trigger1 = p2statetype != A || (p2dist x + enemynear, vel x*21*facing*enemynear, facing > 80)
trigger1 = random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < 30 + 30*p2statetype = C + 10*(enemynear, ctrl = 0 && p2movetype != A) + (20 + ifelse(enemynear, time < 10, enemynear, time*2, 20))*(p2statetype=C&&p2movetype=A&&enemynear,animtime<-20) - var(53)*0.05
trigger1 = var(0) := 1
trigger2 = moveguarded = 1 && (stateno = 200 || stateno = 400 || stateno = [230, 240])
trigger2 = random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < 100 + 200*p2statetype = C - var(53)*0.5
trigger2 = var(0) := 1

[State AI, Ulysses Vault Heavy]
type = ChangeState
value = 1600
triggerall = var(59) > 0
triggerall = var(9) = [1, 5]
triggerall = var(16)
triggerall = statetype != A
triggerall = p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = p2bodydist x < 160 + const(size.xscale)*(128 + 8*ifelse(var(9) = 9, -1, ifelse(var(9) = 4, 1, ifelse(var(9) = 5, 2, 0))))
triggerall = enemynear, pos y + enemynear, vel y*24 > const(size.yscale)*-32
triggerall = p2dist x + enemynear, vel x*21*facing*enemynear, facing > 160
triggerall = ctrl
triggerall = !var(48)
trigger1 = (!inguarddist && stateno != [120, 155]) || (p2statetype = C && (p2movetype = A || enemynear, hitdefattr = SCA, AA, AP, AT) && enemynear, animtime < -30)
trigger1 = p2movetype != H || enemynear, gethitvar(guarded)
trigger1 = random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < 15 + 10*p2statetype = C + 5*(enemynear, ctrl = 0 && p2movetype != A) + (20 + ifelse(enemynear, time < 10, enemynear, time*2, 20))*(p2statetype = C && p2movetype = A && enemynear, animtime < -30)
trigger1 = var(0) := 2
trigger2 = numhelper(9999)
trigger2 = helper(9999), var(0) = 2
trigger2 = random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < 300 + 100*p2statetype = C + 200*(enemynear, animtime < -30)
trigger2 = var(0) := 2

[State AI, Hades Scorcher]
type = ChangeState
value = 1600
triggerall = var(59) > 0
triggerall = var(9) = 6
triggerall = !numhelper(1660)
triggerall = var(16)
triggerall = statetype != A
triggerall = p2statetype != L
triggerall = p2statetype != A || (!enemynear, hitfall && enemynear, vel x*var(52)*facing*enemynear, facing > -1)
triggerall = (p2stateno != [5120, 5205]) || enemynear, vel x*var(52)*facing*enemynear, facing >= 0
triggerall = enemynear, pos y + enemynear, vel y*30 > -1
triggerall = ctrl || moveguarded = 1 && (stateno = 200 || stateno = 400 || stateno = [230, 240])
triggerall = !inguarddist && stateno != [120, 155]
triggerall = numhelper(9999)
triggerall = !helper(9999), inguarddist || enemynear, hitdefattr = SCA, AA, AP, AT
triggerall = !var(48)
trigger1 = enemynear, ctrl || p2movetype = H && enemynear, gethitvar(guarded)
trigger1 = p2bodydist x > 64
trigger1 = random/fvar(10) < 10 + p2bodydist x*0.07*(1 + var(53)*0.01)
trigger1 = var(0) := ifelse(p2bodydist x < 96*const(size.xscale), random%2, 1 + random%2) || 1
trigger2 = !enemynear, ctrl
trigger2 = p2movetype != H
trigger2 = p2bodydist x > 64
trigger2 = p2movetype != A || enemynear, animtime < -16
trigger2 = random/fvar(10) < 10 + p2bodydist x*0.07*(1 + enemynear, time*0.1)*(1 + var(53)*0.01)
trigger2 = var(0) := ifelse(p2bodydist x < 96*const(size.xscale), random%2, 1 + random%2) || 1
trigger3 = p2movetype = H
trigger3 = enemynear, gethitvar(guarded)
trigger3 = random/fvar(10) < 3*enemynear, gethitvar(ctrltime)*(1 + 3*(moveguarded = 1))
trigger3 = var(0) := random%3 || 1

[State AI, Neptune Spike]
type = ChangeState
value = 1600
triggerall = var(59) > 0
triggerall = var(9) = 7
triggerall = !numhelper(1710)
triggerall = var(16)
triggerall = statetype != A
triggerall = p2statetype != A || !enemynear, hitfall
triggerall = enemynear, vel x*var(52)*facing*enemynear, facing > -1
triggerall = enemynear, pos y + enemynear, vel y*30 > -p2bodydist x
triggerall = ctrl || moveguarded = 1 && (stateno = 200 || stateno = 400 || stateno = [230, 240])
triggerall = !inguarddist && stateno != [120, 155]
triggerall = numhelper(9999)
triggerall = !helper(9999), inguarddist || enemynear, hitdefattr = SCA, AA, AP, AT
triggerall = !var(48)
trigger1 = enemynear, ctrl || (p2movetype = H && enemynear, gethitvar(guarded)) || p2statetype = L
trigger1 = p2bodydist x > 64
trigger1 = random/fvar(10) < 10 + p2bodydist x*0.07*(1 + var(53)*0.01)*(1 + (p2statetype = L))
trigger1 = var(0) := ifelse(p2dist x < 130*const(size.xscale) || (p2dist x < 260*const(size.xscale) && random < 300), 0, ifelse(p2dist x < 260*const(size.xscale) || random < 300, 1, 2)) || 1
trigger2 = !enemynear, ctrl
trigger2 = p2movetype != H
trigger2 = p2bodydist x > 64
trigger2 = p2movetype != A || enemynear, animtime < -20
trigger2 = random/fvar(10) < 10 + p2bodydist x*0.03*(1 + enemynear, time*0.1)*(1 + var(53)*0.01)
trigger2 = var(0) := ifelse(p2dist x < 130*const(size.xscale), 0, ifelse(p2dist x < 260*const(size.xscale), 1, 2)) || 1
trigger3 = p2movetype = H
trigger3 = enemynear, gethitvar(guarded)
trigger3 = random/fvar(10) < 2*enemynear, gethitvar(ctrltime)*(1 + 3*(moveguarded = 1))
trigger3 = var(0) := ifelse(p2dist x < 130*const(size.xscale), 0, ifelse(p2dist x < 260*const(size.xscale), 1, 2)) || 1

[State AI, Mercury Stride]
type = ChangeState
value = 1600
triggerall = var(59) > 0
triggerall = var(9) = 8
triggerall = var(16)
triggerall = statetype != A
triggerall = p2statetype != A || enemynear, vel x*var(52)*facing*enemynear, facing > -1
triggerall = p2movetype = H || enemynear, pos y + enemynear, vel y*25 > -1
triggerall = ctrl || moveguarded = 1 && (stateno = 200 || stateno = 400 || stateno = [230, 240])
triggerall = !inguarddist && stateno != [120, 155]
triggerall = !var(48)
trigger1 = enemynear, ctrl || (p2movetype = H && enemynear, gethitvar(guarded)) || p2statetype = L
trigger1 = p2bodydist x > 64
trigger1 = random/fvar(10) < p2bodydist x*0.05*(1 + var(53)*0.01)*(1 + (p2statetype = L))
trigger1 = var(0) := ifelse(random < 200, 0, 1+random%2) || 1
trigger2 = !enemynear, ctrl
trigger2 = p2movetype != H
trigger2 = p2bodydist x > 64
trigger2 = p2movetype != A || enemynear, animtime < -20
trigger2 = random/fvar(10) < p2bodydist x*0.05*(1 + enemynear, time*0.1)*(1 + var(53)*0.01)
trigger2 = var(0) := ifelse(random < 200, 0, 1+random%2) || 1
trigger3 = p2movetype = H
trigger3 = enemynear, gethitvar(guarded)
trigger3 = random/fvar(10) < 3*enemynear, gethitvar(ctrltime)*(1 + 3*(moveguarded = 1))
trigger3 = var(0) := ifelse(random < 200, 0, 1+random%2) || 1

[State AI, Atlas Quake]
type = ChangeState
value = 1600
triggerall = var(59) > 0
triggerall = var(9) = 9
triggerall = var(16)
triggerall = statetype != A
triggerall = p2statetype != C && p2statetype != L
triggerall = p2statetype != A || (!enemynear, hitfall && enemynear, vel x*var(52)*facing*enemynear, facing > -1)
triggerall = p2stateno != [5120, 5205]
triggerall = enemynear, pos y + enemynear, vel y*30 > -1
triggerall = ctrl || moveguarded = 1 && (stateno = 200 || stateno = 400 || stateno = [230, 240])
triggerall = !inguarddist && stateno != [120, 155]
triggerall = !var(48)
trigger1 = enemynear, ctrl || p2movetype = H && enemynear, gethitvar(guarded)
trigger1 = p2bodydist x > 64
trigger1 = random/fvar(10) < 10 + p2bodydist x*0.07*(1 + var(53)*0.01)
trigger1 = var(0) := random%3 || 1
trigger2 = !enemynear, ctrl
trigger2 = p2movetype != H
trigger2 = p2bodydist x > 64
trigger2 = p2movetype != A || enemynear, animtime < -23
trigger2 = random/fvar(10) < 10 + p2bodydist x*0.07*(1 + enemynear, time*0.1)*(1 + var(53)*0.01)
trigger2 = var(0) := ifelse(enemynear, animtime > -31 || random < 200, ifelse(enemynear, animtime > -26 || random < 200, 0, 1), 2) || 1
trigger3 = p2movetype = H
trigger3 = enemynear, gethitvar(guarded)
trigger3 = random/fvar(10) < 3*enemynear, gethitvar(ctrltime)*(1 + 3*(moveguarded = 1))
trigger3 = var(0) := random%3 || 1
trigger4 = p2bodydist x < 32
trigger4 = enemynear, stateno = 5100
trigger4 = enemynear, time < 2
trigger4 = random/fvar(10) < 1000
trigger4 = var(0) := 1

[State AI, Rush]
type = ChangeState
value = 1000
triggerall = var(59) > 0
triggerall = var(9) > 0
triggerall = statetype != A
triggerall = ctrl || movecontact = 1 && (stateno = 200 || stateno = 400 || stateno = [230, 240])
triggerall = p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = p2stateno != [5120, 5205]
triggerall = p2dist x > const(size.xscale)*32
triggerall = enemynear, pos y + enemynear, vel y*8 > const(size.yscale)*-32
triggerall = !var(48)
trigger1 = ctrl
trigger1 = var(58) = [12, 13]
trigger1 = !inguarddist && stateno != [120, 155]
trigger1 = numhelper(9999)
trigger1 = !helper(9999), inguarddist || enemynear, hitdefattr = SCA, AA, AP, AT || numhelper(1660)
trigger1 = random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < 160 - p2bodydist x*0.1
trigger1 = var(0) := ifelse(p2bodydist x < 256, random%2 + (random%2)*3, 1 + (random%2)*3) || 1
trigger2 = !ctrl
trigger2 = p2movetype = H
trigger2 = var(9) = 5 && power > 1900
trigger2 = enemynear, backedgebodydist < 64
trigger2 = p2bodydist x < 48
trigger2 = ((movehit || (enemynear, stateno = 5400 && enemynear, movetype != A)) && random/fvar(10) < 1000) || (moveguarded && random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < 320)
trigger2 = numtarget
trigger2 = var(0) := 0 || 1
trigger3 = moveguarded
trigger3 = p2movetype = H
trigger3 = p2statetype != A
trigger3 = p2stateno = 5400
trigger3 = numtarget
trigger3 = random/fvar(10) < 1000
trigger3 = p2bodydist x < 200
trigger3 = var(0) := ifelse(p2bodydist x < 32 + 48*(enemynear, backedgebodydist < 1), 2, 0) || 1
trigger4 = stateno = 200 || stateno = 400
trigger4 = p2movetype = H
trigger4 = movecontact = 1 
trigger4 = p2bodydist x < 12 + 32*(enemynear, backedgebodydist < 1)
trigger4 = ((movehit || (enemynear, stateno = 5400 && enemynear, movetype != A)) && random/fvar(10) < 1000) || (moveguarded && random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < 320)
trigger4 = numtarget || random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < 320
trigger4 = var(0) := ifelse(p2bodydist x < 8 + 16*(enemynear, backedgebodydist < 1), 1, 0) + (random%2)*3 || 1
trigger5 = stateno = 230
trigger5 = movecontact = 1 
trigger5 = p2movetype = H
trigger5 = p2bodydist x < 32 + 8*(enemynear, backedgebodydist < 1)
trigger5 = ((movehit || (enemynear, stateno = 5400 && enemynear, movetype != A)) && random/fvar(10) < 1000) || (moveguarded && random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < 320)
trigger5 = p2bodydist x > 16*(enemynear, backedgebodydist < 1) || random*fvar(10) < 160;smaller combo /w lower setting
trigger5 = numtarget || random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < 320
trigger5 = var(0) := ifelse(p2bodydist x < 8 + 16*(enemynear, backedgebodydist < 1), 1, 0) + (random%2)*3 || 1
trigger6 = stateno = 240
trigger6 = movecontact = 1 
trigger6 = p2movetype = H
trigger6 = p2bodydist x < 24 + 32*(enemynear, backedgebodydist < 1)
trigger6 = ((movehit || (enemynear, stateno = 5400 && enemynear, movetype != A)) && random/fvar(10) < 1000) || (moveguarded && random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < 320)
trigger6 = numtarget || random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < 320
trigger6 = var(0) := ifelse(p2bodydist x < 12 + 16*(enemynear, backedgebodydist < 1), 2, 1) + (random%2)*3
trigger7 = p2movetype = H
trigger7 = numtarget
trigger7 = !target, gethitvar(guarded) && target, gethitvar(hittime) > 15
trigger7 = p2bodydist x < 48
trigger7 = random/fvar(10) < 1000
trigger7 = var(0) := 1 + (random%2)*3 || 1
trigger8 = prevstateno = [120, 155]
trigger8 = p2bodydist x < const(size.xscale)*100
trigger8 = enemynear, movecontact
trigger8 = enemynear, animtime < -15 - p2bodydist x/10
trigger8 = random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < 400
trigger8 = var(0) := 1 + random%2

[State AI, Stand Light Punch]
type = ChangeState
value = 200
triggerall = var(59) > 0
triggerall = var(9) > 0
triggerall = statetype != A
triggerall = ctrl
triggerall = p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = p2stateno != [5120, 5205]
triggerall = p2bodydist x < const(size.xscale)*(88 + 8*ifelse(var(9) = 9, -1, ifelse(var(9) = 4, 1, ifelse(var(9) = 5, 2, 0))))
triggerall = p2dist x > const(size.xscale)*16
triggerall = p2dist y > const(size.yscale)*-32
triggerall = !var(48)
trigger1 = var(58) = 0
trigger1 = !inguarddist && stateno != [120, 155]
trigger1 = random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < 160

[State AI, Stand Medium Punch]
type = ChangeState
value = 210
triggerall = var(59) > 0
triggerall = var(9) > 0
triggerall = statetype != A
triggerall = ctrl
triggerall = p2statetype != L && p2statetype != C
triggerall = p2statetype != A || p2movetype != H
triggerall = p2stateno != [5120, 5205]
triggerall = p2bodydist x < const(size.xscale)*(128 + 8*ifelse(var(9) = 9, -1, ifelse(var(9) = 4, 1, ifelse(var(9) = 5, 2, 0))))
triggerall = p2dist x > const(size.xscale)*32
triggerall = p2dist y > const(size.yscale)*-32
triggerall = !var(48)
trigger1 = var(58) = 1
trigger1 = !inguarddist && stateno != [120, 155]
trigger1 = random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < 60 + p2bodydist x*2

[State AI, Stand Heavy Punch]
type = ChangeState
value = 220
triggerall = var(59) > 0
triggerall = var(9) > 0
triggerall = statetype != A
triggerall = ctrl
triggerall = p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = p2stateno != [5120, 5205]
triggerall = p2bodydist x < const(size.xscale)*(88 + 8*ifelse(var(9) = 9, -1, ifelse(var(9) = 4, 1, ifelse(var(9) = 5, 2, 0))))
triggerall = p2dist x > const(size.xscale)*32
triggerall = p2dist y > const(size.yscale)*-16
triggerall = !var(48)
trigger1 = var(58) = 2
trigger1 = !inguarddist && stateno != [120, 155]
trigger1 = random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < 80 + p2bodydist x*2

[State AI, VarSet]
type = VarSet
triggerall = var(59) > 0
triggerall = var(9) > 0
triggerall = stateno = 220
triggerall = animelemno(0) = [6, 10]
triggerall = p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = p2stateno != [5120, 5205]
triggerall = p2bodydist x < const(size.xscale)*(136 + 8*ifelse(var(9) = 9, -1, ifelse(var(9) = 4, 1, ifelse(var(9) = 5, 2, 0))))
triggerall = p2dist x > const(size.xscale)*32
triggerall = p2dist y > const(size.yscale)*-32
triggerall = !var(48)
trigger1 = var(58) < 9
trigger1 = !inguarddist
trigger1 = animelemno(0) = 6 + var(58)/2
trigger1 = p2movetype != H || (enemynear, stateno = 5400 && enemynear, movetype != A)
var(0) = 1

[State AI, Stand Heavy Kick]
type = ChangeState
value = 250
triggerall = var(59) > 0
triggerall = statetype != A
triggerall = ctrl
triggerall = p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = p2stateno != [5120, 5205]
triggerall = p2bodydist x < const(size.xscale)*64
triggerall = p2dist x > const(size.xscale)*32
triggerall = p2dist y > const(size.yscale)*-64
triggerall = !var(48)
trigger1 = var(58) = 5
trigger1 = !inguarddist && stateno != [120, 155]
trigger1 = random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < 80
trigger2 = prevstateno = [120, 155]
trigger2 = enemynear, movecontact
trigger2 = enemynear, animtime < -16
trigger2 = random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < 400

[State AI, Stand Medium Kick]
type = ChangeState
value = 240
triggerall = var(59) > 0
triggerall = statetype != A
triggerall = ctrl
triggerall = p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = p2stateno != [5120, 5205]
triggerall = p2bodydist x < const(size.xscale)*48
triggerall = p2dist x > const(size.xscale)*16
triggerall = p2dist y > const(size.yscale)*-64
triggerall = !var(48)
trigger1 = var(58) = 4
trigger1 = !inguarddist && stateno != [120, 155]
trigger1 = random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < 400
trigger2 = prevstateno = [120, 155]
trigger2 = enemynear, movecontact
trigger2 = enemynear, animtime < -4
trigger2 = random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < 400
trigger3 = var(55) > 4
trigger3 = random/fvar(10) < 100 + 300*p2movetype = A

[State AI, Stand Light Kick]
type = ChangeState
value = 230
triggerall = var(59) > 0
triggerall = statetype != A
triggerall = ctrl
triggerall = p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = p2stateno != [5120, 5205]
triggerall = p2bodydist x < const(size.xscale)*48
triggerall = p2dist x > const(size.xscale)*8
triggerall = p2dist y > const(size.yscale)*-32
triggerall = !var(48)
trigger1 = var(58) = 3
trigger1 = !inguarddist && stateno != [120, 155]
trigger1 = random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < 320
trigger2 = prevstateno = [120, 155]
trigger2 = enemynear, movecontact
trigger2 = enemynear, animtime < -2
trigger2 = random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < 400

[State AI, Crouch Light Punch]
type = ChangeState
value = 400
triggerall = var(59) > 0
triggerall = var(9) > 0
triggerall = statetype != A
triggerall = ctrl
triggerall = p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = p2stateno != [5120, 5205]
triggerall = p2bodydist x < const(size.xscale)*(88 + 8*ifelse(var(9) = 9, -1, ifelse(var(9) = 4, 1, ifelse(var(9) = 5, 2, 0))))
triggerall = p2dist x > const(size.xscale)*32
triggerall = p2dist y > const(size.yscale)*-8
triggerall = !var(48)
trigger1 = var(58) = 6
trigger1 = stateno != [120, 155]
trigger1 = !inguarddist || random < p2bodydist x*3
trigger1 = random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < 100 + 40*(p2statetype = S) + p2bodydist x*2

[State AI, Crouch Medium Punch]
type = ChangeState
value = 410
triggerall = var(59) > 0
triggerall = var(9) > 0
triggerall = statetype != A
triggerall = ctrl
triggerall = p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = p2stateno != [5120, 5205]
triggerall = p2bodydist x < const(size.xscale)*(128 + 8*ifelse(var(9) = 9, -1, ifelse(var(9) = 4, 1, ifelse(var(9) = 5, 2, 0))))
triggerall = p2dist x > const(size.xscale)*32
triggerall = p2dist y > const(size.yscale)*-8
triggerall = !var(48)
trigger1 = var(58) = 7
trigger1 = !inguarddist && stateno != [120, 155]
trigger1 = random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < 60 + p2bodydist x*2

[State AI, Crouch Heavy Punch]
type = ChangeState
value = 420
triggerall = var(59) > 0
triggerall = var(9) > 0
triggerall = statetype != A
triggerall = ctrl
triggerall = p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = p2stateno != [5120, 5205]
triggerall = p2bodydist x < const(size.xscale)*(64 + 8*ifelse(var(9) = 9, -1, ifelse(var(9) = 4, 1, ifelse(var(9) = 5, 2, 0))))
triggerall = p2dist x > const(size.xscale)*16
triggerall = p2dist y + enemynear, vel y*12> const(size.yscale)*-64
triggerall = !var(48)
trigger1 = var(58) = 8
trigger1 = !inguarddist && stateno != [120, 155]
trigger1 = random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < 230
trigger2 = prevstateno = [120, 155]
trigger2 = enemynear, movecontact
trigger2 = enemynear, animtime < -8
trigger2 = random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < 400

[State AI, Crouch Light Kick]
type = ChangeState
value = 430
triggerall = var(59) > 0
triggerall = var(9) > 0
triggerall = statetype != A
triggerall = ctrl
triggerall = p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = p2stateno != [5120, 5205]
triggerall = p2bodydist x < const(size.xscale)*(48 + 8*ifelse(var(9) = 9, -1, ifelse(var(9) = 4, 1, ifelse(var(9) = 5, 2, 0))))
triggerall = p2dist x > const(size.xscale)*32
triggerall = p2dist y > const(size.yscale)*-32
triggerall = !var(48)
trigger1 = var(58) = 9
trigger1 = !inguarddist && stateno != [120, 155]
trigger1 = random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < 40

[State AI, Crouch Heavy Kick]
type = ChangeState
value = 450
triggerall = var(59) > 0
triggerall = var(9) > 0
triggerall = statetype != A
triggerall = ctrl
triggerall = p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = p2stateno != [5120, 5205]
triggerall = p2bodydist x < const(size.xscale)*(128 + 8*ifelse(var(9) = 9, -1, ifelse(var(9) = 4, 1, ifelse(var(9) = 5, 2, 0))))
triggerall = p2dist x > const(size.xscale)*16
triggerall = p2dist y > const(size.yscale)*-8
triggerall = !var(48)
trigger1 = var(58) = 11
trigger1 = stateno != [120, 155]
trigger1 = !inguarddist || random < p2bodydist x*3
trigger1 = random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < 70 + 60*(p2statetype = S) + p2bodydist x*2
trigger2 = prevstateno = [120, 155]
trigger2 = enemynear, movecontact
trigger2 = enemynear, animtime < -11
trigger2 = random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < 400

[State AI, Crouch Medium Kick]
type = ChangeState
value = 440
triggerall = var(59) > 0
triggerall = var(9) > 0
triggerall = statetype != A
triggerall = ctrl
triggerall = p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = p2stateno != [5120, 5205]
triggerall = p2bodydist x < const(size.xscale)*(160 + 12*ifelse(var(9) = 9, -1, ifelse(var(9) = 4, 1, ifelse(var(9) = 5, 2, 0))))
triggerall = p2dist x > const(size.xscale)*48
triggerall = p2dist y > const(size.yscale)*-16
triggerall = !var(48)
trigger1 = var(58) = 10
trigger1 = stateno != [120, 155]
trigger1 = !inguarddist || random < p2bodydist x*3
trigger1 = random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < 140 + p2bodydist x*2
trigger2 = prevstateno = [120, 155]
trigger2 = enemynear, movecontact
trigger2 = enemynear, animtime < -7
trigger2 = random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < 400
trigger3 = command != "holdback"
trigger3 = p2movetype = A
trigger3 = !inguarddist || !enemynear, hitdefattr = SCA, AA, AP, AT
trigger3 = enemynear, animtime < -7
trigger3 = random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < p2bodydist x*(0.05 + enemynear, time*0.02)

[State AI, VarSet]
type = VarSet
triggerall = var(59) > 0
triggerall = var(9) > 0
triggerall = stateno = 450
triggerall = animelemno(0) = [6, 8]
triggerall = p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = p2stateno != [5120, 5205]
triggerall = p2bodydist x < const(size.xscale)*(136 + 8*ifelse(var(9) = 9, -1, ifelse(var(9) = 4, 1, ifelse(var(9) = 5, 2, 0))))
triggerall = p2dist x > const(size.xscale)*32
triggerall = p2dist y > const(size.yscale)*-8
triggerall = !var(48)
trigger1 = var(58) < 9
trigger1 = !inguarddist
trigger1 = animelemno(0) = 6 + var(58)%3
trigger1 = p2movetype != H || enemynear, anim != [5910, 5920]
var(0) = 1

[State AI, Mars Slash]
type = ChangeState
value = 1100
triggerall = var(59) > 0
triggerall = var(9) > 0
triggerall = statetype != A
triggerall = ctrl || movecontact = 1 && (stateno = 200 || stateno = 400 || stateno = [230, 240])
triggerall = p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = p2stateno != [5120, 5205]
triggerall = p2bodydist x < const(size.xscale)*(224 + 8*ifelse(var(9) = 9, -1, ifelse(var(9) = 4, 1, ifelse(var(9) = 5, 2, 0))))
triggerall = p2dist x > const(size.xscale)*32
triggerall = enemynear, pos y + enemynear, vel y*8 > const(size.yscale)*-64
triggerall = !var(48)
trigger1 = ctrl
trigger1 = var(58) = [14, 15]
trigger1 = stateno != [120, 155]
trigger1 = !inguarddist || random < p2bodydist x*3
trigger1 = random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < 30*(1 + (p2bodydist x < const(size.xscale)*192 && p2statetype != C)) + var(53)*0.5*(p2bodydist x < const(size.xscale)*192 && p2statetype != C)
trigger1 = var(0) := random%3 || 1
trigger2 = inguarddist || enemynear, hitdefattr = SCA, AA, AP, AT
trigger2 = enemynear, animtime > -10
trigger2 = p2movetype = A
trigger2 = random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < (50 + enemynear, time*3)*(1 + (1 + var(53)*0.005)*(p2bodydist x < const(size.xscale)*192 && p2statetype != C) - 0.5*(p2bodydist x < const(size.xscale)*192 && p2statetype = C))
trigger2 = var(0) := random%3 || 1
trigger3 = numtarget
trigger3 = !target, gethitvar(guarded) && target, gethitvar(hittime) > 15
trigger3 = target, statetype = S
trigger3 = random/fvar(10) < 1000
trigger3 = var(0) := 0 || 1

[State AI, Jump Light Punch]
type = ChangeState
value = 600
triggerall = var(59) > 0
triggerall = var(9) > 0
triggerall = statetype = A
triggerall = ctrl
triggerall = p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = p2stateno != [5120, 5205]
triggerall = p2bodydist x - vel x*5 < const(size.xscale)*(128 + 8*ifelse(var(9) = 9, -1, ifelse(var(9) = 4, 1, ifelse(var(9) = 5, 2, 0))))
triggerall = p2dist x - vel x*5 > const(size.xscale)*48
triggerall = p2dist y - vel y*5 + enemynear, vel y*5 = [const(size.yscale)*-64, const(size.yscale)*16]
triggerall = var(58) != -1
triggerall = !var(48)
trigger1 = random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < 320
trigger1 = stateno != [120, 155]
trigger1 = p2statetype = A 

[State AI, Jump Medium Punch]
type = ChangeState
value = 610
triggerall = var(59) > 0
triggerall = var(9) > 0
triggerall = statetype = A
triggerall = ctrl
triggerall = p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = p2stateno != [5120, 5205]
triggerall = p2bodydist x - vel x*8 < const(size.xscale)*(160 + 8*ifelse(var(9) = 9, -1, ifelse(var(9) = 4, 1, ifelse(var(9) = 5, 2, 0))))
triggerall = p2dist x - vel x*8 > const(size.xscale)*48
triggerall = p2dist y - vel y*8 + enemynear, vel y*8 = [const(size.yscale)*-64, const(size.yscale)*24]
triggerall = var(58) != -1
triggerall = !var(48)
trigger1 = random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < 320
trigger1 = stateno != [120, 155]
trigger1 = p2statetype = A 

[State AI, Jump Strong Punch]
type = ChangeState
value = 620
triggerall = var(59) > 0
triggerall = var(9) > 0
triggerall = statetype = A
triggerall = ctrl
triggerall = p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = p2stateno != [5120, 5205]
triggerall = p2bodydist x - vel x*8 < const(size.xscale)*(128 + 8*ifelse(var(9) = 9, -1, ifelse(var(9) = 4, 1, ifelse(var(9) = 5, 2, 0))))
triggerall = p2dist x - vel x*8 > const(size.xscale)*48
triggerall = p2dist y - vel y*8 + enemynear, vel y*8 = [const(size.yscale)*-16, const(size.yscale)*32]
triggerall = !var(48)
trigger1 = var(58) > -1
trigger1 = enemynear, ctrl = 0 || var(58) < 12
trigger1 = p2statetype != C
trigger1 = p2statetype != A || random/(fvar(10)*(1 + 0.2*(var(9) = 5))) < 320;((!inguarddist || random < p2bodydist x*3) && stateno != [120, 155])

[State AI, Jump Light Kick]
type = ChangeState
value = 630
triggerall = var(59) > 0
triggerall = var(9) > 0
triggerall = statetype = A
triggerall = ctrl
triggerall = p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = p2stateno != [5120, 5205]
triggerall = p2bodydist x - vel x*10 < const(size.xscale)*(96 + 8*ifelse(var(9) = 9, -1, ifelse(var(9) = 4, 1, ifelse(var(9) = 5, 2, 0))))
triggerall = p2dist x - vel x*10 > -const(size.xscale)*(128 - 8*ifelse(var(9) = 9, -1, ifelse(var(9) = 4, 1, ifelse(var(9) = 5, 2, 0))))
triggerall = p2dist y - vel y*10 + enemynear, vel y*10 = [const(size.yscale)*-24, const(size.yscale)*24*(1 + p2statetype != C)]
triggerall = !var(48)
trigger1 = var(58) = [0, 11]
trigger1 = p2dist x - vel x*8 < const(size.xscale)*48
trigger1 = p2statetype != A || ((!inguarddist || random < p2bodydist x*3) && stateno != [120, 155])

[State AI, Jump Medium Kick]
type = ChangeState
value = 640
triggerall = var(59) > 0
triggerall = var(9) > 0
triggerall = statetype = A
triggerall = ctrl
triggerall = p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = p2stateno != [5120, 5205]
triggerall = p2bodydist x - vel x*12 < const(size.xscale)*(160 + 8*ifelse(var(9) = 9, -1, ifelse(var(9) = 4, 1, ifelse(var(9) = 5, 2, 0))))
triggerall = p2dist x - vel x*12 > const(size.xscale)*64
triggerall = p2dist y - vel y*12 + enemynear, vel y*12 = [0, const(size.yscale)*64]
triggerall = !var(48)
trigger1 = var(58) = [3, 5]
trigger1 = p2statetype != A || ((!inguarddist || random < p2bodydist x*3) && stateno != [120, 155])

[State AI, Jump Medium Kick Down]
type = ChangeState
value = 670
triggerall = var(59) > 0
triggerall = var(9) > 0
triggerall = statetype = A
triggerall = ctrl
triggerall = p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = p2stateno != [5120, 5205]
triggerall = p2bodydist x - vel x*8 < const(size.xscale)*32
triggerall = p2dist x - vel x*10 > const(size.xscale)*-24
triggerall = p2dist y - vel y*12 + enemynear, vel y*12 > const(size.yscale)*-24
triggerall = !var(48)
trigger1 = var(58) = [3, 5]
trigger1 = vel y > 0
trigger1 = p2statetype != A || ((!inguarddist || random < p2bodydist x*3) && stateno != [120, 155])

[State AI, Jump Strong Kick]
type = ChangeState
value = 650
triggerall = var(59) > 0
triggerall = var(9) > 0
triggerall = statetype = A
triggerall = ctrl
triggerall = p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = p2stateno != [5120, 5205]
triggerall = p2bodydist x - vel x*10 < const(size.xscale)*(104 + 8*ifelse(var(9) = 9, -1, ifelse(var(9) = 4, 1, ifelse(var(9) = 5, 2, 0))))
triggerall = p2dist x - vel x*10 > const(size.xscale)*32
triggerall = p2dist y - vel y*10 + enemynear, vel y*10 = [const(size.yscale)*-64, const(size.yscale)*32]
triggerall = p2statetype != A || ((!inguarddist || random < p2bodydist x*3) && stateno != [120, 155])
triggerall = !var(48)
trigger1 = var(58) = [6, 8]
trigger2 = enemynear, ctrl = 0 || var(58) = [0, 5]
trigger2 = p2statetype = C

[State AI, Jump Strong Kick Down]
type = ChangeState
value = 680
triggerall = var(59) > 0
triggerall = var(9) > 0
triggerall = statetype = A
triggerall = ctrl
triggerall = p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = p2stateno != [5120, 5205]
triggerall = p2bodydist x - vel x*12 < const(size.xscale)*(88 + 8*ifelse(var(9) = 9, -1, ifelse(var(9) = 4, 1, ifelse(var(9) = 5, 2, 0))))
triggerall = p2dist x - vel x*12 > const(size.xscale)*24
triggerall = p2dist y - vel y*12 + enemynear, vel y*12 = [const(size.yscale)*-24, const(size.yscale)*64]
triggerall = p2statetype != A || ((!inguarddist || random < p2bodydist x*3) && stateno != [120, 155])
triggerall = !var(48)
trigger1 = var(58) = [9, 11]
trigger2 = enemynear, ctrl = 0 || var(58) = [6, 11]
trigger2 = p2statetype = C

[State AI, Guard]
type = CtrlSet
trigger1 = var(59) > 0
trigger1 = stateno = [120, 155]
trigger1 = stateno != 140
value = 0

[State AI, Guard]
type = ChangeState
value = 120
triggerall = var(59) > 0
triggerall = ctrl
triggerall = inguarddist
triggerall = p2movetype != A || !enemynear, movecontact
trigger1 = statetype = A
trigger2 = anim = 21
trigger3 = enemynear, movetype != A
trigger4 = prevstateno = 5120
trigger5 = stateno = 50
trigger6 = anim = 0
trigger6 = random/fvar(10) < 250 + enemynear, time*10
trigger7 = random/fvar(10) < 150 + enemynear, time*10
trigger8 = var(48)
ctrl = 0

[State AI, Ultimate Guard]
type = ChangeState
value = ifelse(stateno = 150 || stateno = 152, 165, 160)
triggerall = var(59) > 0
triggerall = var(9) > 0
triggerall = stateno != 160 && stateno != 165
triggerall = statetype != A
triggerall = movetype != A
triggerall = ctrl || (movetype = H && gethitvar(guarded))
triggerall = inguarddist
triggerall = enemynear, hitdefattr = SCA, AA, AP || enemynear, numproj
triggerall = p2bodydist x < const(size.xscale)*(160 + 8*ifelse(var(9) = 9, -1, ifelse(var(9) = 4, 1, ifelse(var(9) = 5, 2, 0))))
triggerall = p2dist y > const(size.yscale)*-32
trigger1 = movetype = H
trigger1 = gethitvar(guarded)
trigger1 = (!enemynear, movecontact && !var(54)) || enemynear, animtime < -60
trigger1 = time
trigger1 = random/fvar(10) < 200 + var(53)*0.5
trigger1 = var(0) := 1
trigger2 = !enemynear, movecontact && !var(54)
trigger2 = random < (30 - p2bodydist x*0.2)*(1 + var(53)*0.02)
trigger2 = var(0) := 1

[State AI, Ultimate Counter (Punch)]
type = ChangeState
value = 900
triggerall = var(59) > 0
triggerall = var(9) > 0
triggerall = (anim = 161 && (stateno = 161 || (stateno = 162 && time < 5))) || ((anim = 161 || anim = 166) && (stateno = 166 && time < 13))
triggerall = p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = p2stateno != [5120, 5205]
triggerall = p2bodydist x < const(size.xscale)*(136 + 8*ifelse(var(9) = 9, -1, ifelse(var(9) = 4, 1, ifelse(var(9) = 5, 2, 0))))
triggerall = p2dist x > const(size.xscale)*32
triggerall = p2dist y > const(size.yscale)*-32
trigger1 = var(58) = [0, 7]
trigger1 = random/fvar(10) < 40 + enemynear, time + var(53)*0.1
ignorehitpause = 1

[State AI, Ultimate Counter (Kick)]
type = ChangeState
value = 910
triggerall = var(59) > 0
triggerall = var(9) > 0
triggerall = !var(20) || var(20) > 19
triggerall = (anim = 161 && (stateno = 161 || (stateno = 162 && time < 5))) || ((anim = 161 || anim = 166) && (stateno = 166 && time < 13))
triggerall = p2statetype != L
triggerall = p2statetype != A
triggerall = p2stateno != [5120, 5205]
triggerall = p2bodydist x < const(size.xscale)*(160 + 8*ifelse(var(9) = 9, -1, ifelse(var(9) = 4, 1, ifelse(var(9) = 5, 2, 0))))
triggerall = p2dist x > const(size.xscale)*32
triggerall = p2dist y > const(size.yscale)*-8
trigger1 = var(58) = [0, 15]
trigger1 = random/fvar(10) < 40 + enemynear, time + var(53)*0.1
ignorehitpause = 1

[State AI, Ultimate Counter (Punch)]
type = ChangeState
value = 900
triggerall = var(59) > 0
triggerall = var(9) > 0
triggerall = (anim = 161 && (stateno = 161 || (stateno = 162 && time < 5))) || ((anim = 161 || anim = 166) && (stateno = 166 && time < 13))
triggerall = p2statetype != L
triggerall = p2statetype != A || p2movetype != H
triggerall = p2stateno != [5120, 5205]
triggerall = p2bodydist x < const(size.xscale)*(136 + 8*ifelse(var(9) = 9, -1, ifelse(var(9) = 4, 1, ifelse(var(9) = 5, 2, 0))))
triggerall = p2dist x > const(size.xscale)*32
triggerall = p2dist y > const(size.yscale)*-24
trigger1 = var(58) = [8, 15]
trigger1 = random/fvar(10) < 40 + enemynear, time
ignorehitpause = 1

[State AI, Pounce]
type = ChangeState
value = 700
triggerall = var(59) > 0
triggerall = var(9) > 0
triggerall = statetype != A
triggerall = ctrl || stateno = 40
triggerall = numtarget
triggerall = target, statetype = A && target, gethitvar(fall)
triggerall = random/fvar(10) < 1000
trigger1 = stateno = 420
trigger2 = prevstateno = 420
trigger3 = stateno = 1505
trigger4 = prevstateno = 1505
trigger5 = stateno = 1555
trigger6 = prevstateno = 1555

[State AI, Dash Fwd]
type = ChangeState
value = 100
triggerall = var(59) > 0
triggerall = statetype != A
triggerall = ctrl
triggerall = !inguarddist && stateno != [120, 155]
triggerall = p2movetype != A
triggerall = numhelper(9999)
triggerall = !helper(9999), inguarddist || enemynear, hitdefattr = SCA, AA, AP, AT || numhelper(1660)
trigger1 = p2bodydist x > 160
trigger1 = enemynear, vel x*var(52)*enemynear, facing*facing > -5
trigger1 = random/fvar(10) < p2bodydist x*0.5 - 50
trigger1 = p2statetype != L || p2bodydist x > 160
trigger2 = p2statetype = A
trigger2 = p2movetype = H
trigger2 = p2bodydist x + enemynear, vel x*var(52)*8*enemynear, facing*facing > 64
trigger2 = enemynear, gethitvar(fall)
trigger2 = enemynear, stateno != [120, 155]
trigger2 = enemynear, pos y < -240

[State AI, Dash Back]
type = ChangeState
value = 105
triggerall = var(59) > 0
triggerall = statetype != A
triggerall = ctrl
triggerall = !inguarddist && stateno != [120, 155]
triggerall = p2movetype != A
triggerall = backedgebodydist > 40
trigger1 = p2bodydist x < 10*const(size.xscale)
trigger1 = p2statetype != A
trigger1 = random/fvar(10) < 30
trigger2 = p2statetype = L || enemynear, stateno = [5120, 5129]
trigger2 = p2bodydist x < 30 || random < (80 - p2bodydist x)

[State AI, Switch Legendary weapons]
type = ChangeState
value = 1310
triggerall = var(59) > 0
triggerall = var(9) > 0
triggerall = !var(20)
triggerall = statetype != A
triggerall = ctrl
triggerall = power >= 2333
triggerall = var(9) != 5
triggerall = !inguarddist && stateno != [120, 155]
triggerall = p2movetype != A
triggerall = p2bodydist x > 80
triggerall = life > 300 && enemynear, life > 300
trigger1 = random < (power - 1000)*0.01
trigger2 = power >= 3000

[State AI, Switch Weapons]
type = ChangeState
value = 1300
triggerall = var(59) > 0
triggerall = var(9) > 0
triggerall = var(21) > 9
triggerall = statetype != A
triggerall = ctrl
triggerall = var(9) != 5
triggerall = !inguarddist && stateno != [120, 155]
triggerall = p2movetype != A
triggerall = p2bodydist x > 80
trigger1 = stateno != 1300 && prevstateno != 1300
trigger1 = random < 5
trigger1 = var(0) := 1 + random%5
trigger1 = var(0) := ifelse((var(0) = var(9) - 3 && var(0) > 2) || (var(0) = 1 && var(9) < 5) || (var(0) = 2 && var(9) = 9), 0, var(0)) || 1

[State AI, Ult. Guard Cheat]
type = HitOverride
triggerall = var(59) > 0
triggerall = var(9) > 0
triggerall = stateno != 160 && stateno != 165
triggerall = statetype != A
triggerall = movetype != A
triggerall = ctrl || (movetype = H && gethitvar(guarded))
triggerall = p2bodydist x < const(size.xscale)*(160 + 8*ifelse(var(9) = 9, -1, ifelse(var(9) = 4, 1, ifelse(var(9) = 5, 2, 0))))
triggerall = p2dist y > const(size.yscale)*-32
trigger1 = random/fvar(10) < var(53)*(0.5 + 0.5*(stateno = [5120, 5122]))
attr = SCA, AA, AP
stateno = 161
time = 1
ignorehitpause = 1

;===============================================================
;Command Buffer Helper

[Statedef 9998]
;Vars:
;	0 = confirmed command, [1-6] Rush, [7-12] Slash, [13-15] Gaia, [16-18] Switch, [19-24] Apollo Slam, [25-30] Perseus
;               [31-33] Weapon Special, [34-36] Hercules, [37-39] Gigas, [40-42] Mystic Break,  [43-45] Jupiter
;	1 = keypress detected, [1-3] x-z, [4-6] a-c, [7-9] pp, 10 ppp, [11-13], kk, 14 kkk, 15 qcf, 16 dp, 17 qcb, 18 360, 19 qcfx2, 20 720, 21 ff, 22 bb
;	2 = keypress countdown
;	3 = command buffer countdown
;	4 = alt. cmd. file

;FVars:
;	0 = origin

type = A
physics = N
movetype = A
anim = 9999
ctrl = 0

[State 9998, PosAdd]
type = PosAdd
trigger1 = 1
x = -screenpos x + 999

[State 9998, VarSet]
type = VarSet
trigger1 = !time
fvar(0) = pos x

[State 9998, VarAdd]
type = VarAdd
trigger1 = var(2) > 0
var(2) = -1

[State 9998, VarSet]
type = VarSet
trigger1 = var(2) = 0
var(1) = 0

[State 9998, VarAdd]
type = VarAdd
trigger1 = var(3) > 0
var(3) = -1

[State 9998, VarSet]
type = VarSet
trigger1 = var(3) = 0
var(0) = 0

[State 9998, VarSet]
type = VarSet
trigger1 = var(3) > 0
var(3) = -var(3)

[State 9998, Input Read]
type = Null
triggerall = var(3) < 1
triggerall = command = "720"
trigger1 = (var(1) = [1, 3]) || (var(1) = [7, 9])
trigger1 = var(2) > 49
trigger1 = var(0) := 37
trigger1 = var(2) := 0
trigger1 = var(3) := 10
trigger2 = var(1) := 20
trigger2 = var(2) := 60

[State 9998, Input Read]
type = Null
triggerall = var(3) < 1
triggerall = command = "360"
trigger1 = (var(1) = [1, 3]) || (var(1) = [7, 9])
trigger1 = var(2) > 49
trigger1 = var(0) := 12 + ifelse((var(1) = [1, 3]), var(1), var(1) - 6)
trigger1 = var(2) := 0
trigger1 = var(3) := 10
trigger2 = var(1) := 18
trigger2 = var(2) := 60

[State 9998, Input Read]
type = Null
triggerall = var(3) < 1
triggerall = command = "x"
trigger1 = var(1) = 20
trigger1 = var(2) > 44
trigger1 = var(0) := 37
trigger1 = var(3) := 10
trigger2 = var(1) = 18
trigger2 = var(2) > 44
trigger2 = var(0) := 13
trigger2 = var(3) := 10

[State 9998, Input Read]
type = Null
triggerall = var(3) < 1
triggerall = command = "y"
trigger1 = var(1) = 20
trigger1 = var(2) > 44
trigger1 = var(0) := 37
trigger1 = var(3) := 10
trigger2 = var(1) = 18
trigger2 = var(2) > 44
trigger2 = var(0) := 14
trigger2 = var(3) := 10

[State 9998, Input Read]
type = Null
triggerall = var(3) < 1
triggerall = command = "z"
trigger1 = var(1) = 20
trigger1 = var(2) > 44
trigger1 = var(0) := 37
trigger1 = var(3) := 10
trigger2 = var(1) = 18
trigger2 = var(2) > 44
trigger2 = var(0) := 15
trigger2 = var(3) := 10

[State 9998, Input Read]
type = Null
triggerall = var(3) < 1
triggerall = numhelper(9999)
triggerall = helper(9999), command = "jupiter"
trigger1 = var(0) := 43
trigger1 = var(3) := 12

[State 9998, Input Read]
type = Null
triggerall = var(3) < 1
triggerall = numhelper(9999)
triggerall = helper(9999), command = "mystic"
trigger1 = var(0) := 40
trigger1 = var(3) := 12

[State 9998, Input Read]
type = Null
triggerall = var(3) < 1
triggerall = numhelper(9999)
triggerall = helper(9999), command = "hercules"
trigger1 = var(0) := 34
trigger1 = var(3) := 12

[State 9998, Input Read]
type = Null
triggerall = var(3) < 1
triggerall = numhelper(9999)
trigger1 = helper(9999), command = "slashxquick"
trigger1 = var(0) := 10
trigger1 = var(3) := 12
trigger2 = helper(9999), command = "slashyquick"
trigger2 = var(0) := 11
trigger2 = var(3) := 12
trigger3 = helper(9999), command = "slashzquick"
trigger3 = var(0) := 12
trigger3 = var(3) := 12

[State 9998, Input Read]
type = Null
triggerall = var(3) < 1
triggerall = numhelper(9999)
trigger1 = helper(9999), command = "slamaquick"
trigger1 = var(0) := 22
trigger1 = var(3) := 12
trigger2 = helper(9999), command = "slambquick"
trigger2 = var(0) := 23
trigger2 = var(3) := 12
trigger3 = helper(9999), command = "slamcquick"
trigger3 = var(0) := 24
trigger3 = var(3) := 12

[State 9998, Input Read]
type = Null
triggerall = var(3) < 1
triggerall = numhelper(9999)
trigger1 = helper(9999), command = "rushx"
trigger1 = var(0) := 1
trigger1 = var(3) := 12
trigger2 = helper(9999), command = "rushy"
trigger2 = var(0) := 2
trigger2 = var(3) := 12
trigger3 = helper(9999), command = "rushz"
trigger3 = var(0) := 3
trigger3 = var(3) := 12
trigger4 = helper(9999), command = "rusha"
trigger4 = var(0) := 4
trigger4 = var(3) := 12
trigger5 = helper(9999), command = "rushb"
trigger5 = var(0) := 5
trigger5 = var(3) := 12
trigger6 = helper(9999), command = "rushc"
trigger6 = var(0) := 6
trigger6 = var(3) := 12

[State 9998, Input Read]
type = Null
triggerall = var(3) < 1
triggerall = numhelper(9999)
trigger1 = helper(9999), command = "weaponx"
trigger1 = var(0) := 31
trigger1 = var(3) := 12
trigger2 = helper(9999), command = "weapony"
trigger2 = var(0) := 32
trigger2 = var(3) := 12
trigger3 = helper(9999), command = "weaponz"
trigger3 = var(0) := 33
trigger3 = var(3) := 12

[State 9998, Input Read]
type = Null
triggerall = var(3) < 1
triggerall = numhelper(9999)
trigger1 = helper(9999), command = "slashx"
trigger1 = var(0) := 7
trigger1 = var(3) := 12
trigger2 = helper(9999), command = "slashy"
trigger2 = var(0) := 8
trigger2 = var(3) := 12
trigger3 = helper(9999), command = "slashz"
trigger3 = var(0) := 9
trigger3 = var(3) := 12

[State 9998, Input Read]
type = Null
triggerall = var(3) < 1
triggerall = numhelper(9999)
trigger1 = helper(9999), command = "slama"
trigger1 = var(0) := 19
trigger1 = var(3) := 12
trigger2 = helper(9999), command = "slamb"
trigger2 = var(0) := 20
trigger2 = var(3) := 12
trigger3 = helper(9999), command = "slamc"
trigger3 = var(0) := 21
trigger3 = var(3) := 12

[State 9998, Input Read]
type = Null
triggerall = var(3) < 1
triggerall = numhelper(9999)
trigger1 = helper(9999), command = "perseusx"
trigger1 = var(0) := 25
trigger1 = var(3) := 12
trigger2 = helper(9999), command = "perseusy"
trigger2 = var(0) := 26
trigger2 = var(3) := 12
trigger3 = helper(9999), command = "perseusz"
trigger3 = var(0) := 27
trigger3 = var(3) := 12
trigger4 = helper(9999), command = "perseusa"
trigger4 = var(0) := 28
trigger4 = var(3) := 12
trigger5 = helper(9999), command = "perseusb"
trigger5 = var(0) := 29
trigger5 = var(3) := 12
trigger6 = helper(9999), command = "perseusc"
trigger6 = var(0) := 30
trigger6 = var(3) := 12

[State 9998, Single Button Read]
type = Null
triggerall = var(3) < 1
trigger1 = command = "x"
trigger1 = var(1) := 1
trigger1 = var(2) := 60
trigger2 = command = "y"
trigger2 = var(1) := 2 + 5*(command = "x")
trigger2 = var(2) := 60
trigger3 = command = "z"
trigger3 = var(1) := 3 + 6*(command = "x") + 5*(command = "y")
trigger3 = var(2) := 60
trigger4 = command = "a"
trigger4 = var(1) := 4
trigger4 = var(2) := 60
trigger5 = command = "b"
trigger5 = var(1) := 5
trigger5 = var(2) := 60
trigger6 = command = "c"
trigger6 = var(1) := 6
trigger6 = var(2) := 60

[State 9998, Single Button Read]
type = Null
triggerall = var(3) < 1
trigger1 = command = "FF"
trigger1 = var(1) := 21
trigger1 = var(2) := 60
trigger2 = command = "BB"
trigger2 = var(1) := 22
trigger2 = var(2) := 60

[State 9998, VarSet]
type = VarSet
trigger1 = var(3) < 0
var(3) = -var(3)

[State Debug Info]
type = DisplayToClipboard
trigger1 = 1
text = "var(0) %d, var(1) %d, var(2) %d, var(3) %d, pos x %.0f"
params = var(0), var(1), var(2), var(3), pos x

