
[Remap]
x = x
y = y
z = z
a = a
b = b
c = c
s = s

;-| Default Values |-------------------------------------------------------
[Defaults]
; Default value for the "time" parameter of a Command. Minimum 1.
command.time = 15

; Default value for the "buffer.time" parameter of a Command. Minimum 1,
; maximum 30.
command.buffer.time = 1

;====================<SINGLE BUTTON>====================

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

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

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

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

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

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

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



;==================<HOLD DIRECTION>==================

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

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

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

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


;====================<HOLD BUTTON>====================

[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



;====================<DIRECTION>====================

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

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

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

[Command]
name = "down"
command = D
time = 1

[Command]
name = "dfwd"
command = DF
time = 1

[Command]
name = "dback"
command = DB
time = 1

[Command]
name = "ufwd"
command = UF
time = 1

[Command]
name = "uback"
command = UB
time = 1



;====================<RELEASE DIR>====================

[Command]
name = "rlsfwd"
command = ~$F
time = 1

[Command]
name = "rlsback"
command = ~$B
time = 1

[Command]
name = "rlsup"
command = ~$U
time = 1

[Command]
name = "rlsdown"
command = ~$D
time = 1



;====================<RELEASE BUTTON>====================

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

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

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

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

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

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



;====================<OTHER>====================

[Command]
name = "highjump"
command = $D, $U
time = 15



;====================<DOUBLE TAP>====================

[Command]
name = "FF"
command = F, F
time = 10

[Command]
name = "BB"
command = B, B
time = 10



;====================<2/3 BUTTON COMBINATION>====================

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

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

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

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

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

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

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

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

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


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

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

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


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

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

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


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

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

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

;==============================================================================================
;========================================<-1 STATES>===========================================
;==============================================================================================
[StateDef -1]

;==============================================================================================
;==============================================================================================
;================================<EXPLODsive Buffering System>=================================
;====================================<by JustMorphPointman>====================================
;==============================================================================================
;==============================================================================================

;This is an explod-based buffering system, designed to overcome several different errors and bugs
;related to MUGEN's default method of processing commands, as well as offering creators more control
;over how the commands of their character should work. It is designed to be easy to use, understand,
;and install. For more information, including instructions on how to add this to a character, as
;well as how to customize it and add new commands, please visit http://mugenguild.com/forum/msg.2366951

;==============================================================================================
;========================<QUICK REFERENCE GUIDE TO THE EXPLOD ID #'s>==========================
;==============================================================================================

;BASIC DIRECTIONAL INPUTS (these are primarily used to detect directional releases, but also can
;be used outside of the Buffering system code block to detect when a specific direction is currently
;being input or held down)

;Down:										90000002
;Down-right:									90000003
;Right:										90000006
;Up-right:									90000009
;Up:										90000008
;Up-left:									90000007
;Left:										90000004
;Down-left:									90000001


;BUTTON PRESS
;x:										90000200
;y:										90000210
;z:										90000220
;a:										90000230
;b:										90000240
;c:										90000250
;start:										90000195


;BUTTON RELEASE
;x:										90000205
;y:										90000215
;z:										90000225
;a:										90000235
;b:										90000245
;c:										90000255
;start:										90000196


;SYSTEM MOTIONS
;Down (3 ticks):				(D with a 3 tick buffer)	90000012
;Down-right (3 ticks):				(DR with a 3 tick buffer)	90000013
;Right (3 ticks):				(R with a 3 tick buffer)	90000016
;Up-right (3 ticks):				(UR with a 3 tick buffer)	90000019
;Up (3 ticks):					(U with a 3 tick buffer)	90000018
;Up-left (3 ticks):				(UL with a 3 tick buffer)	90000017
;Left (3 ticks):				(L with a 3 tick buffer)	90000014
;Down-left (3 ticks):				(DL with a 3 tick buffer)	90000011

;Down (3 ticks + HitPause):			(D w/ 3 tick buffer + HitPause)	90000022
;Down-right (3 ticks + HitPause):		(DR w/ 3 tick buffer + HitPause)90000023
;Right (3 ticks + HitPause):			(R w/ 3 tick buffer + HitPause)	90000026
;Up-right (3 ticks + HitPause):			(UR w/ 3 tick buffer + HitPause)90000029
;Up (3 ticks + HitPause):			(U w/ 3 tick buffer + HitPause)	90000028
;Up-left (3 ticks + HitPause):			(UL w/ 3 tick buffer + HitPause)90000027
;Left (3 ticks + HitPause):			(L w/ 3 tick buffer + HitPause)	90000024
;Down-left (3 ticks + HitPause):		(DL w/ 3 tick buffer + HitPause)90000021

;R, R:						(F, F)				90001016
;L, L:						(B, B)				90001064
;D, U:						(D, U)				90000408
;U, U:						(U, U)				90000518
;D, D:						(D, D)				90000562
;R, DR, D					(F, DF, D)			90007502
;L, DL, D					(B, DB, D)			90007552


;SPECIAL MOTIONS
;D, DR, R:					(QCF)				90010006
;D, DL, L:					(QCB)				90010104
;R, D, DR:					(F, D, DF)			90010203
;L, D, DL:					(B, D, DB)			90010301
;L, DL, D, DR, R:				(HCF)				90010406
;R, DR, D, DL, L:				(HCB)				90010504
;(charge) L, R:					([charge] B, F)			90010606
;(charge) R, L:					([charge] F, B)			90010704
;(charge) D, U:					([charge] D, U)			90010808
;L, D, R, U:					(360)				90011008
;L, U, R, D:					(360)				90011102
;D, R, U, L:					(360)				90011204
;D, L, U, R:					(360)				90011306
;R, D, L, U:					(360)				90011408
;R, U, L, D:					(360)				90011502
;U, R, D, L:					(360)				90011604
;U, L, D, R:					(360)				90011706
;R, D, L, R:					(HCB, F)			90012016
;L, D, R, L:					(HCF, B)			90012114
;R, L, R:					(F, B, F)			90012216
;L, R, L:					(B, F, B)			90012314
;D, DR, R, UR:					(QCF, UF)			90012409
;D, DL, L, UL:					(QCB, UB)			90012507
;D, D:						([special] D, D)		90012602


;SUPER MOTIONS
;D, DR, R, D, DR, R:				(QCFx2)				90030016
;D, DL, L, D, DL, L:				(QCBx2)				90030114
;L, DL, D, DR, R, L, DL, D, DR, R:		(HCFx2)				90030416
;R, DR, D, DL, L, R, DR, D, DL, L:		(HCBx2)				90030514
;(charge) L, R, L, R:				([charge] B, F, B, F)		90030616
;(charge) R, L, R, L:				([charge] F, B, F, B)		90030714
;(charge) DL, DR, DL, UR:			([charge] DB, DF, DB, UF)	90030809
;(charge) DR, DL, DR, UL:			([charge] DF, DB, DF, UB)	90030907
;L, D, R, U, L, D, R, U:			(720)				90031018
;L, U, R, D, L, U, R, D:			(720)				90031112
;D, R, U, L, D, R, U, L:			(720)				90031214
;D, L, U, R, D, L, U, R:			(720)				90031316
;R, D, L, U, R, D, L, U:			(720)				90031418
;R, U, L, D, R, U, L, D:			(720)				90031512
;U, R, D, L, U, R, D, L:			(720)				90031614
;U, L, D, R, U, L, D, R:			(720)				90031716
;R, L, D, R:					(F, HCF)			90032016
;L, R, D, L:					(B, HCB)			90032114
;D, DR, R, D, L:				(QCF, HCB)			90032204
;D, DL, L, D, R:				(QCB, HCF)			90032306
;D, DR, R, DR, L:				(QCF, DF, B)			90032404
;D, DL, L, DL, R:				(QCB, DB, F)			90032506
;D, D, D:					(D, D, D)			90032602


;SUPER MOTIONS (button inputs)
;x, x, F, a, z:					(Shun Goku Satsu)		94000220



;==============================================================================================
;===================================<DIRECTIONAL COMMANDS>=====================================
;==============================================================================================

;==============================================================================================
;These are required for the system to function; they are active whenever the specified direction
;is currently being input, and disappear as soon as they are released (via a series of RemoveExplods
;at the bottom of the Buffering system code block). They are used by the system to detect directional
;releases, but can also be used outside of the Buffering system code block to detect when a specific
;direction is being input or held down.
;==============================================================================================

[State -1, Release Down Detector]
type = Explod
;make sure explod doesn't already exist
triggerAll = !NumExplod(90000002)
;check to make sure Helper exists, and that the entity running this code isn't the helper, and that
;the AI isn't active. Only a human player should be making explods!
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
;If either of these explods exist, then down/up inputs have been reversed (this is usually caused
;by an attack of some sort, such as Thanos's Mind Gem super). We can easily flip left/right commands,
;but for down/up inputs, we must have two sets of triggers. This is the first set, which only activate
;if the explods don't exist, so we can just check the inputs normally.
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
;explod will be created if down is input
trigger1 = Helper(90000005), command = "down" || Helper(90000005), command = "holddown"
;no other directions may be input, otherwise it wouldn't be a down input!
trigger1 = Helper(90000005), command != "fwd" && Helper(90000005), command != "holdfwd" && Helper(90000005), command != "back" && Helper(90000005), command != "holdback" && Helper(90000005), command != "up" && Helper(90000005), command != "holdup"
;These sets of triggers, however, only are used if one of the direction input reversal explods exist.
;We treat "down" inputs as "up", and vice-versa; "down-right" is treated as "up-right", and so on.
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "up" || Helper(90000005), command = "holdup"
trigger2 = Helper(90000005), command != "fwd" && Helper(90000005), command != "holdfwd" && Helper(90000005), command != "back" && Helper(90000005), command != "holdback" && Helper(90000005), command != "down" && Helper(90000005), command != "holddown"
anim = 1
ID = 90000002
;these explods are only removed via a RemoveExplod, so their RemoveTime is set to -1 (aka infinite)
removeTime = -1
pauseMoveTime = -1
superMoveTime = -1
ignoreHitPause = 1

[State -1, Release Down-Right Detector]
type = Explod
triggerAll = !NumExplod(90000003)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command = "down" || Helper(90000005), command = "holddown"
trigger1 = Helper(90000005), command = "fwd" || Helper(90000005), command = "holdfwd"
trigger1 = Helper(90000005), command != "back" && Helper(90000005), command != "holdback" && Helper(90000005), command != "up" && Helper(90000005), command != "holdup"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "up" || Helper(90000005), command = "holdup"
trigger2 = Helper(90000005), command = "fwd" || Helper(90000005), command = "holdfwd"
trigger2 = Helper(90000005), command != "back" && Helper(90000005), command != "holdback" && Helper(90000005), command != "down" && Helper(90000005), command != "holddown"
anim = 1
ID = 90000003
removeTime = -1
pauseMoveTime = -1
superMoveTime = -1
ignoreHitPause = 1

[State -1, Release Right Detector]
type = Explod
triggerAll = !NumExplod(90000006)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "fwd" || Helper(90000005), command = "holdfwd"
trigger1 = Helper(90000005), command != "down" && Helper(90000005), command != "holddown" && Helper(90000005), command != "back" && Helper(90000005), command != "holdback" && Helper(90000005), command != "up" && Helper(90000005), command != "holdup"
anim = 1
ID = 90000006
removeTime = -1
pauseMoveTime = -1
superMoveTime = -1
ignoreHitPause = 1

[State -1, Release Up-Right Detector]
type = Explod
triggerAll = !NumExplod(90000009)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command = "up" || Helper(90000005), command = "holdup"
trigger1 = Helper(90000005), command = "fwd" || Helper(90000005), command = "holdfwd"
trigger1 = Helper(90000005), command != "back" && Helper(90000005), command != "holdback" && Helper(90000005), command != "down" && Helper(90000005), command != "holddown"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "down" || Helper(90000005), command = "holddown"
trigger2 = Helper(90000005), command = "fwd" || Helper(90000005), command = "holdfwd"
trigger2 = Helper(90000005), command != "back" && Helper(90000005), command != "holdback" && Helper(90000005), command != "up" && Helper(90000005), command != "holdup"
anim = 1
ID = 90000009
removeTime = -1
pauseMoveTime = -1
superMoveTime = -1
ignoreHitPause = 1

[State -1, Release Up Detector]
type = Explod
triggerAll = !NumExplod(90000008)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command = "up" || Helper(90000005), command = "holdup"
trigger1 = Helper(90000005), command != "fwd" && Helper(90000005), command != "holdfwd" && Helper(90000005), command != "back" && Helper(90000005), command != "holdback" && Helper(90000005), command != "down" && Helper(90000005), command != "holddown"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "down" || Helper(90000005), command = "holddown"
trigger2 = Helper(90000005), command != "fwd" && Helper(90000005), command != "holdfwd" && Helper(90000005), command != "back" && Helper(90000005), command != "holdback" && Helper(90000005), command != "up" && Helper(90000005), command != "holdup"
anim = 1
ID = 90000008
removeTime = -1
pauseMoveTime = -1
superMoveTime = -1
ignoreHitPause = 1

[State -1, Release Up-Left Detector]
type = Explod
triggerAll = !NumExplod(90000007)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command = "up" || Helper(90000005), command = "holdup"
trigger1 = Helper(90000005), command = "back" || Helper(90000005), command = "holdback"
trigger1 = Helper(90000005), command != "fwd" && Helper(90000005), command != "holdfwd" && Helper(90000005), command != "down" && Helper(90000005), command != "holddown"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "down" || Helper(90000005), command = "holddown"
trigger2 = Helper(90000005), command = "back" || Helper(90000005), command = "holdback"
trigger2 = Helper(90000005), command != "fwd" && Helper(90000005), command != "holdfwd" && Helper(90000005), command != "up" && Helper(90000005), command != "holdup"
anim = 1
ID = 90000007
removeTime = -1
pauseMoveTime = -1
superMoveTime = -1
ignoreHitPause = 1

[State -1, Release Left Detector]
type = Explod
triggerAll = !NumExplod(90000004)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "back" || Helper(90000005), command = "holdback"
trigger1 = Helper(90000005), command != "down" && Helper(90000005), command != "holddown" && Helper(90000005), command != "fwd" && Helper(90000005), command != "holdfwd" && Helper(90000005), command != "up" && Helper(90000005), command != "holdup"
anim = 1
ID = 90000004
removeTime = -1
pauseMoveTime = -1
superMoveTime = -1
ignoreHitPause = 1

[State -1, Release Down-Left Detector]
type = Explod
triggerAll = !NumExplod(90000001)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command = "down" || Helper(90000005), command = "holddown"
trigger1 = Helper(90000005), command = "back" || Helper(90000005), command = "holdback"
trigger1 = Helper(90000005), command != "fwd" && Helper(90000005), command != "holdfwd" && Helper(90000005), command != "up" && Helper(90000005), command != "holdup"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "up" || Helper(90000005), command = "holdup"
trigger2 = Helper(90000005), command = "back" || Helper(90000005), command = "holdback"
trigger2 = Helper(90000005), command != "fwd" && Helper(90000005), command != "holdfwd" && Helper(90000005), command != "down" && Helper(90000005), command != "holddown"
anim = 1
ID = 90000001
removeTime = -1
pauseMoveTime = -1
superMoveTime = -1
ignoreHitPause = 1



;==============================================================================================
;==========================================<BUTTONS>===========================================
;==============================================================================================

[State -1, Press x]
type = Explod
;if there already exists a "press x" explod, and the player is in HitPauseTime, then we don't need another!
trigger1 = !HitPauseTime || !NumExplod(90000200)
trigger1 = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "x"
anim = 1
ID = 90000200
;the removeTime, pauseMoveTime, and superMoveTime all must be the same value. This represents the
;amount of time (in ticks) that this individual input is "active"; in other words, it's the window
;of time the player has to input the next input in sequence (or if it's the final input of a command,
;the amount of time that command will last, if the character cannot currently perform the move in
;question). We use "10" as the default value for most directional inputs, because it's generally the
;standard amount of time for most games
;We use "3" for button inputs, which is what many modern games use, but there's a lot of variance
;there.

;We also include " + ifElse(HitPauseTime, HitPauseTime - 1, 0)" to the RemoveTime/PauseMoveTime/SuperMoveTime
;in order to keep the command alive during hit pause. This goes on all button press commands, as well as
;the final directional input of any system, special, or super command.
;For more information on what the removeTime (and pauseMoveTime, et. al.) represents, see the comments for
;the "Right, Right" command
removeTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
pauseMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
superMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
ignoreHitPause = 1

[State -1, Press y]
type = Explod
trigger1 = !HitPauseTime || !NumExplod(90000210)
trigger1 = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "y"
anim = 1
ID = 90000210
removeTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
pauseMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
superMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
ignoreHitPause = 1

[State -1, Press z]
type = Explod
trigger1 = !HitPauseTime || !NumExplod(90000220)
trigger1 = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "z"
anim = 1
ID = 90000220
removeTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
pauseMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
superMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
ignoreHitPause = 1

[State -1, Press a]
type = Explod
trigger1 = !HitPauseTime || !NumExplod(90000230)
trigger1 = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "a"
anim = 1
ID = 90000230
removeTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
pauseMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
superMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
ignoreHitPause = 1

[State -1, Press b]
type = Explod
trigger1 = !HitPauseTime || !NumExplod(90000240)
trigger1 = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "b"
anim = 1
ID = 90000240
removeTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
pauseMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
superMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
ignoreHitPause = 1

[State -1, Press c]
type = Explod
trigger1 = !HitPauseTime || !NumExplod(90000250)
trigger1 = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "c"
anim = 1
ID = 90000250
removeTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
pauseMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
superMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
ignoreHitPause = 1

[State -1, Press start]
type = Explod
trigger1 = !HitPauseTime || !NumExplod(90000195)
trigger1 = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "start"
anim = 1
ID = 90000195
removeTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
pauseMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
superMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
ignoreHitPause = 1



;==============================================================================================
;These explods are used to detect button releases, much in the same way that the directional
;detectors work. These are required for the system, but it's easier to use MUGEN's standard
;"holda" / "holdx" / etc. for situations where you need to detect a held button input, rather than
;making use of these like you would the release direction detectors.
;==============================================================================================
[State -1, Release x Detector]
type = Explod
triggerAll = !NumExplod(90000201)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "x" || Helper(90000005), command = "holdx"
anim = 1
ID = 90000201
removeTime = -1
pauseMoveTime = -1
superMoveTime = -1
ignoreHitPause = 1

[State -1, Release y Detector]
type = Explod
triggerAll = !NumExplod(90000211)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "y" || Helper(90000005), command = "holdy"
anim = 1
ID = 90000211
removeTime = -1
pauseMoveTime = -1
superMoveTime = -1
ignoreHitPause = 1

[State -1, Release z Detector]
type = Explod
triggerAll = !NumExplod(90000221)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "z" || Helper(90000005), command = "holdz"
anim = 1
ID = 90000221
removeTime = -1
pauseMoveTime = -1
superMoveTime = -1
ignoreHitPause = 1

[State -1, Release a Detector]
type = Explod
triggerAll = !NumExplod(90000231)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "a" || Helper(90000005), command = "holda"
anim = 1
ID = 90000231
removeTime = -1
pauseMoveTime = -1
superMoveTime = -1
ignoreHitPause = 1

[State -1, Release b Detector]
type = Explod
triggerAll = !NumExplod(90000241)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "b" || Helper(90000005), command = "holdb"
anim = 1
ID = 90000241
removeTime = -1
pauseMoveTime = -1
superMoveTime = -1
ignoreHitPause = 1

[State -1, Release c Detector]
type = Explod
triggerAll = !NumExplod(90000251)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "c" || Helper(90000005), command = "holdc"
anim = 1
ID = 90000251
removeTime = -1
pauseMoveTime = -1
superMoveTime = -1
ignoreHitPause = 1

[State -1, Release start Detector]
type = Explod
triggerAll = !NumExplod(90000194)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "start"
anim = 1
ID = 90000194
removeTime = -1
pauseMoveTime = -1
superMoveTime = -1
ignoreHitPause = 1



;==============================================================================================
;Take note of the RemoveTimes on these: release button inputs don't persist through hitpause!
;==============================================================================================

[State -1, Release x]
type = Explod
trigger1 = !HitPauseTime || !NumExplod(90000205)
triggerAll = NumExplod(90000201)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command != "x" && Helper(90000005), command != "holdx"
anim = 1
ID = 90000205
removeTime = 3
pauseMoveTime = 3
superMoveTime = 3
ignoreHitPause = 1

[State -1, Release y]
type = Explod
trigger1 = !HitPauseTime || !NumExplod(90000215)
triggerAll = NumExplod(90000211)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command != "y" && Helper(90000005), command != "holdy"
anim = 1
ID = 90000215
removeTime = 3
pauseMoveTime = 3
superMoveTime = 3
ignoreHitPause = 1

[State -1, Release z]
type = Explod
trigger1 = !HitPauseTime || !NumExplod(90000225)
triggerAll = NumExplod(90000221)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command != "z" && Helper(90000005), command != "holdz"
anim = 1
ID = 90000225
removeTime = 3
pauseMoveTime = 3
superMoveTime = 3
ignoreHitPause = 1

[State -1, Release a]
type = Explod
trigger1 = !HitPauseTime || !NumExplod(90000235)
triggerAll = NumExplod(90000231)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command != "a" && Helper(90000005), command != "holda"
anim = 1
ID = 90000235
removeTime = 3
pauseMoveTime = 3
superMoveTime = 3
ignoreHitPause = 1

[State -1, Release b]
type = Explod
trigger1 = !HitPauseTime || !NumExplod(90000245)
triggerAll = NumExplod(90000241)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command != "b" && Helper(90000005), command != "holdb"
anim = 1
ID = 90000245
removeTime = 3
pauseMoveTime = 3
superMoveTime = 3
ignoreHitPause = 1

[State -1, Release c]
type = Explod
trigger1 = !HitPauseTime || !NumExplod(90000255)
triggerAll = NumExplod(90000251)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command != "c" && Helper(90000005), command != "holdc"
anim = 1
ID = 90000255
removeTime = 3
pauseMoveTime = 3
superMoveTime = 3
ignoreHitPause = 1

[State -1, Release start]
type = Explod
trigger1 = !HitPauseTime || !NumExplod(90000196)
triggerAll = NumExplod(90000194)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command != "start" && Helper(90000005), command != "holdstart"
anim = 1
ID = 90000196
removeTime = 3
pauseMoveTime = 3
superMoveTime = 3
ignoreHitPause = 1

[State -1, Throw Tech]
type = Explod
trigger1 = NumHelper(90000005) && !IsHelper
trigger1 = !AILevel
trigger1 = Helper(90000005), command = "x" && Helper(90000005), command = "a"
anim = 1
ID = 90000800
removeTime = 3 
pauseMoveTime = 3 
superMoveTime = 3 
ignoreHitPause = 1

;==============================================================================================
;=============================<DIRECTIONAL INPUTS (3 TICK BUFFER)>=============================
;==============================================================================================

;==============================================================================================
;These activate whenever the direction in question is input, and persist for three ticks. Useful
;if you need to use only a single directional input, but also want it to last longer than one tick.
;==============================================================================================

;======================================<DOWN (3 TICKS)>========================================
[State -1, Down (3 ticks)]
type = Explod
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command = "down" && Helper(90000005), command != "back" && Helper(90000005), command != "up" && Helper(90000005), command != "fwd"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "up" && Helper(90000005), command != "back" && Helper(90000005), command != "down" && Helper(90000005), command != "fwd"
anim = 1
ID = 90000012
removeTime = 3
pauseMoveTime = 3
superMoveTime = 3
ignoreHitPause = 1



;===================================<DOWN-RIGHT (3 TICKS)>=====================================
[State -1, Down-Right (3 ticks)]
type = Explod
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command = "dfwd" && Helper(90000005), command != "back" && Helper(90000005), command != "up"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "ufwd" && Helper(90000005), command != "back" && Helper(90000005), command != "down"
anim = 1
ID = 90000013
removeTime = 3
pauseMoveTime = 3
superMoveTime = 3
ignoreHitPause = 1



;======================================<RIGHT (3 TICKS)>=======================================
[State -1, Right (3 ticks)]
type = Explod
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "fwd" && Helper(90000005), command != "back" && Helper(90000005), command != "up" && Helper(90000005), command != "down"
anim = 1
ID = 90000016
removeTime = 3
pauseMoveTime = 3
superMoveTime = 3
ignoreHitPause = 1



;=====================================<UP-RIGHT (3 TICKS)>=====================================
[State -1, Up-Right (3 ticks)]
type = Explod
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command = "ufwd" && Helper(90000005), command != "back" && Helper(90000005), command != "down"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "dfwd" && Helper(90000005), command != "back" && Helper(90000005), command != "up"
anim = 1
ID = 90000019
removeTime = 3
pauseMoveTime = 3
superMoveTime = 3
ignoreHitPause = 1



;========================================<UP (3 TICKS)>========================================
[State -1, Up (3 ticks)]
type = Explod
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command = "up" && Helper(90000005), command != "fwd" && Helper(90000005), command != "down" && Helper(90000005), command != "back"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "down" && Helper(90000005), command != "fwd" && Helper(90000005), command != "up" && Helper(90000005), command != "back"
anim = 1
ID = 90000018
removeTime = 3
pauseMoveTime = 3
superMoveTime = 3
ignoreHitPause = 1



;=====================================<UP-LEFT (3 TICKS)>======================================
[State -1, Up-Left (3 ticks)]
type = Explod
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command = "uback" && Helper(90000005), command != "fwd" && Helper(90000005), command != "down"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "dback" && Helper(90000005), command != "fwd" && Helper(90000005), command != "up"
anim = 1
ID = 90000017
removeTime = 3
pauseMoveTime = 3
superMoveTime = 3
ignoreHitPause = 1



;=======================================<LEFT 3 TICKS>=========================================
[State -1, Left (3 ticks)]
type = Explod
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "back" && Helper(90000005), command != "fwd" && Helper(90000005), command != "up" && Helper(90000005), command != "down"
anim = 1
ID = 90000014
removeTime = 3
pauseMoveTime = 3
superMoveTime = 3
ignoreHitPause = 1



;====================================<DOWN-LEFT 3 TICKS>=======================================
[State -1, Down-Left (3 ticks)]
type = Explod
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command = "dback" && Helper(90000005), command != "fwd" && Helper(90000005), command != "up"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "uback" && Helper(90000005), command != "fwd" && Helper(90000005), command != "down"
anim = 1
ID = 90000011
removeTime = 3
pauseMoveTime = 3
superMoveTime = 3
ignoreHitPause = 1



;==============================================================================================
;=====================<DIRECTIONAL INPUTS (3 TICK BUFFER + HITPAUSE TIME)>=====================
;==============================================================================================

;==============================================================================================
;These are almost identical to the explods directly above this, except these will persist through
;a HitPause, and will only activate if the direction in question is being either held or input on
;the same tick that any button is input. These can be used to replicate the command behavior of Capcom
;games for crouching and command normal moves. For more information, please see [INSERT LINK].
;==============================================================================================

;==============================<DOWN (3 TICKS + HITPAUSE TIME)>================================
[State -1, Down (3 ticks + HitPauseTime)]
type = Explod
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
triggerAll = Helper(90000005), command = "x" || Helper(90000005), command = "y" || Helper(90000005), command = "z" || Helper(90000005), command = "a"  || Helper(90000005), command = "b" || Helper(90000005), command = "c" || Helper(90000005), command = "start"
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = (Helper(90000005), command = "down" || Helper(90000005), command = "holddown") && Helper(90000005), command != "back" && Helper(90000005), command != "up" && Helper(90000005), command != "fwd" && Helper(90000005), command != "holdback" && Helper(90000005), command != "holdup" && Helper(90000005), command != "holdfwd"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = (Helper(90000005), command = "up" || Helper(90000005), command = "holdup") && Helper(90000005), command != "back" && Helper(90000005), command != "down" && Helper(90000005), command != "fwd" && Helper(90000005), command != "holdback" && Helper(90000005), command != "holddown" && Helper(90000005), command != "holdfwd"
anim = 1
ID = 90000022
removeTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
pauseMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
superMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
ignoreHitPause = 1




;===========================<DOWN-RIGHT (3 TICKS + HITPAUSE TIME)>=============================
[State -1, Down-Right (3 ticks + HitPauseTime)]
type = Explod
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
triggerAll = Helper(90000005), command = "x" || Helper(90000005), command = "y" || Helper(90000005), command = "z" || Helper(90000005), command = "a"  || Helper(90000005), command = "b" || Helper(90000005), command = "c" || Helper(90000005), command = "start"
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = (Helper(90000005), command = "dfwd" || (Helper(90000005), command = "holddown" && Helper(90000005), command = "holdfwd")) && Helper(90000005), command != "back" && Helper(90000005), command != "up" && Helper(90000005), command != "holdback" && Helper(90000005), command != "holdup"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = (Helper(90000005), command = "ufwd" || (Helper(90000005), command = "holdup" && Helper(90000005), command = "holdfwd")) && Helper(90000005), command != "back" && Helper(90000005), command != "down" && Helper(90000005), command != "holdback" && Helper(90000005), command != "holddown"
anim = 1
ID = 90000023
removeTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
pauseMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
superMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
ignoreHitPause = 1



;==============================<RIGHT (3 TICKS + HITPAUSE TIME)>===============================
[State -1, Right (3 ticks + HitPauseTime)]
type = Explod
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
triggerAll = Helper(90000005), command = "x" || Helper(90000005), command = "y" || Helper(90000005), command = "z" || Helper(90000005), command = "a"  || Helper(90000005), command = "b" || Helper(90000005), command = "c" || Helper(90000005), command = "start"
trigger1 = (Helper(90000005), command = "fwd" || Helper(90000005), command = "holdfwd") && Helper(90000005), command != "back" && Helper(90000005), command != "up" && Helper(90000005), command != "down" && Helper(90000005), command != "holdback" && Helper(90000005), command != "holdup" && Helper(90000005), command != "holddown"
anim = 1
ID = 90000026
removeTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
pauseMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
superMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
ignoreHitPause = 1



;=============================<UP-RIGHT (3 TICKS + HITPAUSE TIME)>=============================
[State -1, Up-Right (3 ticks + HitPauseTime)]
type = Explod
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
triggerAll = Helper(90000005), command = "x" || Helper(90000005), command = "y" || Helper(90000005), command = "z" || Helper(90000005), command = "a"  || Helper(90000005), command = "b" || Helper(90000005), command = "c" || Helper(90000005), command = "start"
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = (Helper(90000005), command = "ufwd" || (Helper(90000005), command = "holdup" && Helper(90000005), command = "holdfwd")) && Helper(90000005), command != "back" && Helper(90000005), command != "down" && Helper(90000005), command != "holdback" && Helper(90000005), command != "holddown"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = (Helper(90000005), command = "dfwd" || (Helper(90000005), command = "holddown" && Helper(90000005), command = "holdfwd")) && Helper(90000005), command != "back" && Helper(90000005), command != "up" && Helper(90000005), command != "holdback" && Helper(90000005), command != "holdup"
anim = 1
ID = 90000029
removeTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
pauseMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
superMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
ignoreHitPause = 1



;================================<UP (3 TICKS + HITPAUSE TIME)>================================
[State -1, Up (3 ticks + HitPauseTime)]
type = Explod
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
triggerAll = Helper(90000005), command = "x" || Helper(90000005), command = "y" || Helper(90000005), command = "z" || Helper(90000005), command = "a"  || Helper(90000005), command = "b" || Helper(90000005), command = "c" || Helper(90000005), command = "start"
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = (Helper(90000005), command = "up" || Helper(90000005), command = "holdup") && Helper(90000005), command != "fwd" && Helper(90000005), command != "down" && Helper(90000005), command != "back" && Helper(90000005), command != "holdfwd" && Helper(90000005), command != "holddown" && Helper(90000005), command != "holdback"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = (Helper(90000005), command = "down" || Helper(90000005), command = "holddown") && Helper(90000005), command != "fwd" && Helper(90000005), command != "up" && Helper(90000005), command != "back" && Helper(90000005), command != "holdfwd" && Helper(90000005), command != "holdup" && Helper(90000005), command != "holdback"
anim = 1
ID = 90000028
removeTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
pauseMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
superMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
ignoreHitPause = 1



;=============================<UP-LEFT (3 TICKS + HITPAUSE TIME)>==============================
[State -1, Up-Left (3 ticks + HitPauseTime)]
type = Explod
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
triggerAll = Helper(90000005), command = "x" || Helper(90000005), command = "y" || Helper(90000005), command = "z" || Helper(90000005), command = "a"  || Helper(90000005), command = "b" || Helper(90000005), command = "c" || Helper(90000005), command = "start"
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = (Helper(90000005), command = "uback" || (Helper(90000005), command = "holdup" && Helper(90000005), command = "holdback")) && Helper(90000005), command != "fwd" && Helper(90000005), command != "down" && Helper(90000005), command != "holdfwd" && Helper(90000005), command != "holddown"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = (Helper(90000005), command = "dback" || (Helper(90000005), command = "holddown" && Helper(90000005), command = "holdback")) && Helper(90000005), command != "fwd" && Helper(90000005), command != "up" && Helper(90000005), command != "holdfwd" && Helper(90000005), command != "holdup"
anim = 1
ID = 90000027
removeTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
pauseMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
superMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
ignoreHitPause = 1



;===============================<LEFT 3 TICKS + HITPAUSE TIME>=================================
[State -1, Left (3 ticks + HitPauseTime)]
type = Explod
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
triggerAll = Helper(90000005), command = "x" || Helper(90000005), command = "y" || Helper(90000005), command = "z" || Helper(90000005), command = "a"  || Helper(90000005), command = "b" || Helper(90000005), command = "c" || Helper(90000005), command = "start"
trigger1 = (Helper(90000005), command = "back" || Helper(90000005), command = "holdback") && Helper(90000005), command != "fwd" && Helper(90000005), command != "up" && Helper(90000005), command != "down" && Helper(90000005), command != "holdfwd" && Helper(90000005), command != "holdup" && Helper(90000005), command != "holddown"
anim = 1
ID = 90000024
removeTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
pauseMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
superMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
ignoreHitPause = 1



;============================<DOWN-LEFT 3 TICKS + HITPAUSE TIME>===============================
[State -1, Down-Left (3 ticks + HitPauseTime)]
type = Explod
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
triggerAll = Helper(90000005), command = "x" || Helper(90000005), command = "y" || Helper(90000005), command = "z" || Helper(90000005), command = "a"  || Helper(90000005), command = "b" || Helper(90000005), command = "c" || Helper(90000005), command = "start"
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = (Helper(90000005), command = "dback" || (Helper(90000005), command = "holddown" && Helper(90000005), command = "holdback")) && Helper(90000005), command != "fwd" && Helper(90000005), command != "up" && Helper(90000005), command != "holdfwd" && Helper(90000005), command != "holdup"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = (Helper(90000005), command = "uback" || (Helper(90000005), command = "holdup" && Helper(90000005), command = "holdback")) && Helper(90000005), command != "fwd" && Helper(90000005), command != "down" && Helper(90000005), command != "holdfwd" && Helper(90000005), command != "holddown"
anim = 1
ID = 90000021
removeTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
pauseMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
superMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
ignoreHitPause = 1



;==============================================================================================
;Reminder: because this system is based on absolute directions (left/right) instead of relative
;directions (forward/backward), all commands must have a mirrored command as well (unless they are
;performed solely with up and/or down!) In other words, two different versions of each individual
;command must be defined in this system: one assuming the character is facing the right, and one
;for the left.
;==============================================================================================

;==============================================================================================
;================================<FORWARD, FORWARD/BACK, BACK>=================================
;==============================================================================================

;==============================================================================================
;Dash/run commands in SNK typically have release directions as their first inputs. In other words,
;in most SNK games, you can dash/run by holding forward or back for however long you like, and then
;quickly releasing the stick and returning to neutral, then quickly inputting forward/back again.
;In most Capcom games, this will not work. We have the dash/run commands in this system set up to
;follow Capcom's example.

;Different games have different input windows for dash commands. KOF gives you a 7 tick window between
;each the first and second forward/back commands, and the final input has a buffer time of 3 ticks.
;CPS2 Capcom games (under the normal speed setting) have an input window of 7 ticks for the consecutive
;forward/back commands, and the final input has a buffer time of 2 ticks. In SFIII, both the input
;window and the buffer time is 7 ticks. The default values in this system are 10 for the input window
;and 3 for the buffer time, to match up with the other commands (but feel free to change those values
;to suit your personal preference!)
;==============================================================================================

;=======================================<RIGHT, RIGHT>=========================================
[State -1, R, R: 1st Right]
type = Explod
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "fwd" && Helper(90000005), command != "back" && Helper(90000005), command != "up" && Helper(90000005), command != "down"
anim = 1
ID = 90001006
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

[State -1, R, R: Neutral]
type = Explod
triggerAll = NumExplod(90000006) && NumExplod(90001006)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
;make sure no directional input is being performed
trigger1 = Helper(90000005), command != "fwd" && Helper(90000005), command != "holdfwd"
trigger1 = Helper(90000005), command != "down" && Helper(90000005), command != "holddown" && Helper(90000005), command != "back" && Helper(90000005), command != "holdback" && Helper(90000005), command != "up" && Helper(90000005), command != "holdup"
anim = 1
ID = 90001005
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

;We remove the neutral explod if any non-right input is detected, or if the 1st right explod does not exist
;in most Capcom games, a dash command will be cancelled mid-input if any direction other than forward/back
;and neutral are input. But SNK games give you more leeway: as long as you have inputting forward/back, and
;have returned the stick to neutral, you can input any other directional command and still get a dash as long
;as you input another forward/back command. If you want to replicate this behavior, simply delete the first trigger
;of this RemoveExplod sctrl (you will still need the second trigger, though).
[State -1, Remove R, R: Neutral]
type = RemoveExplod
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = NumExplod(90000002) || NumExplod(90000003) || NumExplod(90000009) || NumExplod(90000008) || NumExplod(90000007) || NumExplod(90000004) || NumExplod(90000001)
trigger2 = !NumExplod(90001006)
ID = 90001005
ignoreHitPause = 1

[State -1, R, R: 2nd Right]
type = Explod
;we check to see if the user has input right recently, and has returned the stick to neutral
triggerAll = NumExplod(90001005) && NumExplod(90001006)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "fwd" && Helper(90000005), command != "back" && Helper(90000005), command != "up" && Helper(90000005), command != "down"
anim = 1
ID = 90001016
;see the button explods above for an explanation of this ifElse statement. This statement only goes on the final
;input of any command, and should not go anywhere else in the command!
;We also are using a non-standard removeTime for this input, as dash commands in most games are only active
;for a short period of time (around 1-3 ticks).
removeTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
pauseMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
superMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
ignoreHitPause = 1

[State -1, R, R: 2nd Right (10 ticks)]
type = Explod
;this one is used for Kung Fu Knee
triggerAll = NumExplod(90001005) && NumExplod(90001006)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "fwd" && Helper(90000005), command != "back" && Helper(90000005), command != "up" && Helper(90000005), command != "down"
anim = 1
ID = 90001026
removeTime = 10 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
pauseMoveTime = 10 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
superMoveTime = 10 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
ignoreHitPause = 1



;==============================================================================================
;Now for the reversed command:
;==============================================================================================

;=======================================<LEFT, LEFT>=========================================
[State -1, L, L: 1st Left]
type = Explod
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "back" && Helper(90000005), command != "fwd" && Helper(90000005), command != "up" && Helper(90000005), command != "down"
anim = 1
ID = 90001054
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

[State -1, L, L: Neutral]
type = Explod
triggerAll = NumExplod(90000004) && NumExplod(90001054)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command != "back" && Helper(90000005), command != "holdback"
trigger1 = Helper(90000005), command != "down" && Helper(90000005), command != "holddown" && Helper(90000005), command != "fwd" && Helper(90000005), command != "holdfwd" && Helper(90000005), command != "up" && Helper(90000005), command != "holdup"
anim = 1
ID = 90001055
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

[State -1, Remove L, L: Neutral]
type = RemoveExplod
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = NumExplod(90000002) || NumExplod(90000003) || NumExplod(90000006) || NumExplod(90000009) || NumExplod(90000008) || NumExplod(90000007) || NumExplod(90000001)
trigger2 = !NumExplod(90001054)
ID = 90001055
ignoreHitPause = 1

[State -1, L, L: 2nd Left]
type = Explod
triggerAll = NumExplod(90001055) && NumExplod(90001054)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "back" && Helper(90000005), command != "fwd" && Helper(90000005), command != "up" && Helper(90000005), command != "down"
anim = 1
ID = 90001064
removeTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
pauseMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
superMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
ignoreHitPause = 1

[State -1, L, L: 2nd Left (10 ticks)]
type = Explod
triggerAll = NumExplod(90001055) && NumExplod(90001054)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "back" && Helper(90000005), command != "fwd" && Helper(90000005), command != "up" && Helper(90000005), command != "down"
anim = 1
ID = 90001074
removeTime = 10 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
pauseMoveTime = 10 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
superMoveTime = 10 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
ignoreHitPause = 1



;==============================================================================================
;===================================<DOWN, UP (SUPER JUMP)>====================================
;==============================================================================================

;==============================================================================================
;Super jump commands can be done with any down directional input, followed by any up directional
;==============================================================================================

;=======================================<DOWN, UP>=========================================
[State -1, D, U: Down]
type = Explod
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command = "down" || Helper(90000005), command = "dfwd" || Helper(90000005), command = "dback"
trigger1 = Helper(90000005), command != "up"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "up" || Helper(90000005), command = "ufwd" || Helper(90000005), command = "uback"
trigger2 = Helper(90000005), command != "down"
anim = 1
ID = 90000402
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

[State -1, D, U: Up]
type = Explod
triggerAll = NumExplod(90000402)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command = "up" || Helper(90000005), command = "ufwd" || Helper(90000005), command = "uback"
trigger1 = Helper(90000005), command != "down"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "down" || Helper(90000005), command = "dfwd" || Helper(90000005), command = "dback"
trigger2 = Helper(90000005), command != "up"
anim = 1
ID = 90000408
removeTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
pauseMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
superMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
ignoreHitPause = 1



;==============================================================================================
;=====================================<UP, UP/DOWN, DOWN>======================================
;==============================================================================================

;==============================================================================================
;Pretty similar to the Forward, Forward/Back, Back commands, only we don't need to worry about
;the player's facing or anything, since all the inputs are either down or up!

;Also of note is that any up/down direction may be used to activate this command (i.e., a UF, UF
;will still be considered a U, U command).
;==============================================================================================

;=======================================<UP, UP>=========================================
[State -1, U, U: 1st Up]
type = Explod
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command = "up" || Helper(90000005), command = "ufwd" || Helper(90000005), command = "uback"
trigger1 = Helper(90000005), command != "down"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "down" || Helper(90000005), command = "dfwd" || Helper(90000005), command = "dback"
trigger2 = Helper(90000005), command != "up"
anim = 1
ID = 90000508
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

[State -1, U, U: Neutral]
type = Explod
triggerAll = (NumExplod(90000007) || NumExplod(90000008) || NumExplod(90000009)) && NumExplod(90000508)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command != "up" && Helper(90000005), command != "holdup"
trigger1 = Helper(90000005), command != "down" && Helper(90000005), command != "holddown" && Helper(90000005), command != "back" && Helper(90000005), command != "holdback" && Helper(90000005), command != "fwd" && Helper(90000005), command != "holdfwd"
anim = 1
ID = 90000505
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

[State -1, Remove U, U: Neutral]
type = RemoveExplod
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = NumExplod(90000004) || NumExplod(90000001) || NumExplod(90000002) || NumExplod(90000003) || NumExplod(90000006)
trigger2 = !NumExplod(90000508)
ID = 90000505
ignoreHitPause = 1

[State -1, U, U: 2nd Up]
type = Explod
triggerAll = NumExplod(90000505) && NumExplod(90000508)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command = "up" || Helper(90000005), command = "ufwd" || Helper(90000005), command = "uback"
trigger1 = Helper(90000005), command != "down"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "down" || Helper(90000005), command = "dfwd" || Helper(90000005), command = "dback"
trigger2 = Helper(90000005), command != "up"
anim = 1
ID = 90000518
removeTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
pauseMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
superMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
ignoreHitPause = 1



;=========================================<DOWN,DOWN>==========================================
[State -1, D, D: 1st Down]
type = Explod
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command = "down" || Helper(90000005), command = "dfwd" || Helper(90000005), command = "dback"
trigger1 = Helper(90000005), command != "up"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "up" || Helper(90000005), command = "ufwd" || Helper(90000005), command = "uback"
trigger2 = Helper(90000005), command != "down"
anim = 1
ID = 90000552
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

[State -1, D, D: Neutral]
type = Explod
triggerAll = (NumExplod(90000001) || NumExplod(90000002) || NumExplod(90000003)) && NumExplod(90000552)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command != "down" && Helper(90000005), command != "holddown"
trigger1 = Helper(90000005), command != "fwd" && Helper(90000005), command != "holdfwd" && Helper(90000005), command != "back" && Helper(90000005), command != "holdback" && Helper(90000005), command != "up" && Helper(90000005), command != "holdup"
anim = 1
ID = 90000555
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

[State -1, Remove D, D: Neutral]
type = RemoveExplod
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = NumExplod(90000004) || NumExplod(90000007) || NumExplod(90000008) || NumExplod(90000009) || NumExplod(90000006)
trigger2 = !NumExplod(90000552)
ID = 90000555
ignoreHitPause = 1

[State -1, D, D: 2nd Down]
type = Explod
triggerAll = NumExplod(90000555) && NumExplod(90000552)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command = "down" || Helper(90000005), command = "dfwd" || Helper(90000005), command = "dback"
trigger1 = Helper(90000005), command != "up"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "up" || Helper(90000005), command = "ufwd" || Helper(90000005), command = "uback"
trigger2 = Helper(90000005), command != "down"
anim = 1
ID = 90000562
removeTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
pauseMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
superMoveTime = 3 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
ignoreHitPause = 1



;==============================================================================================
;===============================<QUARTER CIRCLE FORWARD/BACK>==================================
;==============================================================================================

;==============================================================================================
;The vast majority of all commands in fighting games allow the first input of any command to be
;a release input, so that you're allowed to hold the direction that the command starts with for
;however long you want, then input the rest of the command, and still get the move. This is why
;in MUGEN, people typically write all their character's commands as starting with a release input;
;however, things are a bit more complicated outside of MUGEN (and thus, more complicated in this
;buffer too). In most games, the window of time a player has to input the next command in sequence
;after performing a release input is shorter than the window of time they have to input the next
;command after a press input. For example, in Street Fighter III, if you want to perform a quarter-
;circle forward motion, and you press (or hold) the "down" direction, you will have 10 ticks to
;input "down-forward" and continue the command. But if instead you were to hold the "down" direction
;down for a few seconds before releasing it, you will have only 5 ticks to input "down-forward" to
;continue entering the command.

;The way this is translated to the EXPLODsive Buffering system is this: we have two separate explods
;for the first input of every command that uses a release directional input. One explod is created
;whenever the first input is entered, and has a RemoveTime of 10 (which is the same amount of time
;that most other directional explods use in this system); one other explod is also created whenever
;the direction of the first input is released: this has a RemoveTime of 5, which is generally what
;commercial fighting games use.

;Do note that not every game gives players the same input windows for every single command: for
;example, in Street Fighter Alpha 3 (on normal speed), press directional inputs all have a 10 tick
;input window, but the input window for the release directional input in a quarter-circle motion is
;6, while the input window for the release directional input in a forward, down, down-forward motion
;is only 4! There's a whole bunch of variance here, sometimes in the same game, and so it's best to check
;the source game of the character you're making (if applicable) to try and get an idea of what RemoveTime
;will be best for each of your commands.
;==============================================================================================

;================================<DOWN, DOWN-RIGHT, RIGHT>=====================================

;Since this is the press directional input for the first input, it has a RemoveTime of 10
[State -1, D, DR, R: Press Down]
type = Explod
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command = "down" && Helper(90000005), command != "back" && Helper(90000005), command != "up" && Helper(90000005), command != "fwd"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "up" && Helper(90000005), command != "back" && Helper(90000005), command != "down" && Helper(90000005), command != "fwd"
anim = 1
ID = 90010002
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

;And since this is the release directional input for the first input, it has a RemoveTime of only 5!
[State -1, D, DR, R: Release Down]
type = Explod
triggerAll = NumExplod(90000002)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command != "down" && Helper(90000005), command != "holddown"
trigger2 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "down" || Helper(90000005), command = "holddown"
trigger2 = Helper(90000005), command = "fwd" || Helper(90000005), command = "holdfwd" || Helper(90000005), command = "back" || Helper(90000005), command = "holdback" || Helper(90000005), command = "up" || Helper(90000005), command = "holdup"
trigger3 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger3 = Helper(90000005), command != "up" && Helper(90000005), command != "holdup"
trigger4 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger4 = Helper(90000005), command = "up" || Helper(90000005), command = "holdup"
trigger4 = Helper(90000005), command = "fwd" || Helper(90000005), command = "holdfwd" || Helper(90000005), command = "back" || Helper(90000005), command = "holdback" || Helper(90000005), command = "down" || Helper(90000005), command = "holddown"
anim = 1
ID = 90010052
removeTime = 5
pauseMoveTime = 5
superMoveTime = 5
ignoreHitPause = 1

[State -1, D, DR, R: Down-Right]
type = Explod
;Remember, we have to check to see if either the "press down" or "release down" explods exist!
triggerAll = NumExplod(90010002) || NumExplod(90010052)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command = "dfwd" && Helper(90000005), command != "back" && Helper(90000005), command != "up"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "ufwd" && Helper(90000005), command != "back" && Helper(90000005), command != "down"
anim = 1
ID = 90010003
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

[State -1, D, DR, R: Right]
type = Explod
triggerAll = NumExplod(90010003)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "fwd" && Helper(90000005), command != "back" && Helper(90000005), command != "up" && Helper(90000005), command != "down"
anim = 1
ID = 90010006
removeTime = 10 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
pauseMoveTime = 10 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
superMoveTime = 10 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
ignoreHitPause = 1



;=================================<DOWN, DOWN-LEFT, LEFT>======================================
[State -1, D, DL, L: Press Down]
type = Explod
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command = "down" && Helper(90000005), command != "back" && Helper(90000005), command != "up" && Helper(90000005), command != "fwd"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "up" && Helper(90000005), command != "back" && Helper(90000005), command != "down" && Helper(90000005), command != "fwd"
anim = 1
ID = 90010102
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

[State -1, D, DL, L: Release Down]
type = Explod
triggerAll = NumExplod(90000002)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command != "down" && Helper(90000005), command != "holddown"
trigger2 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "down" || Helper(90000005), command = "holddown"
trigger2 = Helper(90000005), command = "fwd" || Helper(90000005), command = "holdfwd" || Helper(90000005), command = "back" || Helper(90000005), command = "holdback" || Helper(90000005), command = "up" || Helper(90000005), command = "holdup"
trigger3 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger3 = Helper(90000005), command != "up" && Helper(90000005), command != "holdup"
trigger4 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger4 = Helper(90000005), command = "up" || Helper(90000005), command = "holdup"
trigger4 = Helper(90000005), command = "fwd" || Helper(90000005), command = "holdfwd" || Helper(90000005), command = "back" || Helper(90000005), command = "holdback" || Helper(90000005), command = "down" || Helper(90000005), command = "holddown"
anim = 1
ID = 90010152
removeTime = 5
pauseMoveTime = 5
superMoveTime = 5
ignoreHitPause = 1

[State -1, D, DL, L: Down-Left]
type = Explod
triggerAll = NumExplod(90010102) || NumExplod(90010152)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command = "dback" && Helper(90000005), command != "fwd" && Helper(90000005), command != "up"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "uback" && Helper(90000005), command != "fwd" && Helper(90000005), command != "down"
anim = 1
ID = 90010101
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

[State -1, D, DL, L: Left]
type = Explod
triggerAll = NumExplod(90010101)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "back" && Helper(90000005), command != "fwd" && Helper(90000005), command != "up" && Helper(90000005), command != "down"
anim = 1
ID = 90010104
removeTime = 10 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
pauseMoveTime = 10 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
superMoveTime = 10 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
ignoreHitPause = 1



;==============================================================================================
;===========================<DOUBLE QUARTER CIRCLE FORWARD/BACK>===============================
;==============================================================================================

;==============================================================================================
;This command is mostly identical to the QCF/QCB commands, but with different ID's; there are some
;important differences, however. Instead of repeating the entire first QCF/QCB command, we just
;(mostly) use the ones we already defined above!

;We do repeat the forward/backward input from the first QCF/QCB, though. This is because the final
;explod of the QCF/QCB command will persist through hitpause, which is not true for the QCFx2
;command: otherwise, you'd be able to input a QCF during a long hitpause, wait for the hitpause to
;end, and then input another QCF and still get a QCFx2 motion, and that's not how things are supposed
;to work!

;Also, do note that Capcom games use a command shortcut for QCFx2/QCBx2 motions; a D, DF, F, D, DF
;will work just as well as a D, DF, F, D, DF, F motion; if you want to replicate this behavior, all
;you have to do is check to see if either the repsective "DF/DB" or the "F/B" explods exist in the
;triggers for that move's ChangeState.
;==============================================================================================

;===========================<DOUBLE DOWN, DOWN-RIGHT, RIGHT>===============================
;this is almost identical to the D, DR, R: Right explod; the only difference is that it has a
;RemoveTime of 10 (with no additional ifElse statements), because it shouldn't persist through hitpause!
[State -1, D, DR, R, D, DR, R: 1st Right]
type = Explod
triggerAll = NumExplod(90010003)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "fwd" && Helper(90000005), command != "back" && Helper(90000005), command != "up" && Helper(90000005), command != "down"
anim = 1
ID = 90030006
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

[State -1, D, DR, R, D, DR, R: 2nd Down]
type = Explod
triggerAll = NumExplod(90030006)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command = "down" && Helper(90000005), command != "back" && Helper(90000005), command != "up" && Helper(90000005), command != "fwd"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "up" && Helper(90000005), command != "back" && Helper(90000005), command != "down" && Helper(90000005), command != "fwd"
anim = 1
ID = 90030002
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

[State -1, D, DR, R, D, DR, R: 2nd Down-Right]
type = Explod
triggerAll = NumExplod(90030002)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command = "dfwd" && Helper(90000005), command != "back" && Helper(90000005), command != "up"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "ufwd" && Helper(90000005), command != "back" && Helper(90000005), command != "down"
anim = 1
ID = 90030003
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

[State -1, D, DR, R, D, DR, R: 2nd Right]
type = Explod
triggerAll = NumExplod(90030003)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "fwd" && Helper(90000005), command != "back" && Helper(90000005), command != "up" && Helper(90000005), command != "down"
anim = 1
ID = 90030016
removeTime = 10 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
pauseMoveTime = 10 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
superMoveTime = 10 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
ignoreHitPause = 1


;===========================<DOUBLE DOWN, DOWN-LEFT, LEFT>===============================
[State -1, D, DL, L, D, DL, L: 1st Left]
type = Explod
triggerAll = NumExplod(90010101)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "back" && Helper(90000005), command != "fwd" && Helper(90000005), command != "up" && Helper(90000005), command != "down"
anim = 1
ID = 90030104
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

[State -1, D, DL, L, D, DL, L: 2nd Down]
type = Explod
triggerAll = NumExplod(90030104)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command = "down" && Helper(90000005), command != "back" && Helper(90000005), command != "up" && Helper(90000005), command != "fwd"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "up" && Helper(90000005), command != "back" && Helper(90000005), command != "down" && Helper(90000005), command != "fwd"
anim = 1
ID = 90030102
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

[State -1, D, DL, L, D, DL, L: 2nd Down-Left]
type = Explod
triggerAll = NumExplod(90030102)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command = "dback" && Helper(90000005), command != "fwd" && Helper(90000005), command != "up"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "uback" && Helper(90000005), command != "fwd" && Helper(90000005), command != "down"
anim = 1
ID = 90030101
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

[State -1, D, DL, L, D, DL, L: 2nd Left]
type = Explod
triggerAll = NumExplod(90030101)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "back" && Helper(90000005), command != "fwd" && Helper(90000005), command != "up" && Helper(90000005), command != "down"
anim = 1
ID = 90030114
removeTime = 10 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
pauseMoveTime = 10 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
superMoveTime = 10 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
ignoreHitPause = 1




;==============================================================================================
;====================<FORWARD, DOWN, DOWN-FORWARD/BACK, DOWN, DOWN-BACK>=======================
;==============================================================================================

;==============================================================================================
;Nothing special here, just the standard dragon punch motion!
;==============================================================================================

;================================<RIGHT, DOWN, DOWN-RIGHT>=====================================
[State -1, R, D, DR: Press Right]
type = Explod
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "fwd" && Helper(90000005), command != "back" && Helper(90000005), command != "up" && Helper(90000005), command != "down"
anim = 1
ID = 90010206
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

[State -1, R, D, DR: Release Right]
type = Explod
triggerAll = NumExplod(90000006)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command != "fwd" && Helper(90000005), command != "holdfwd"
trigger2 = Helper(90000005), command = "fwd" || Helper(90000005), command = "holdfwd"
trigger2 = Helper(90000005), command = "down" || Helper(90000005), command = "holddown" || Helper(90000005), command = "back" || Helper(90000005), command = "holdback" || Helper(90000005), command = "up" || Helper(90000005), command = "holdup"
anim = 1
ID = 90010256
removeTime = 5
pauseMoveTime = 5
superMoveTime = 5
ignoreHitPause = 1

[State -1, R, D, DR: Down]
type = Explod
triggerAll = NumExplod(90010206) || NumExplod(90010256)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command = "down" && Helper(90000005), command != "back" && Helper(90000005), command != "up" && Helper(90000005), command != "fwd"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "up" && Helper(90000005), command != "back" && Helper(90000005), command != "down" && Helper(90000005), command != "fwd"
anim = 1
ID = 90010202
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

[State -1, R, D, DR: Down-Right]
type = Explod
triggerAll = NumExplod(90010202)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command = "dfwd" && Helper(90000005), command != "back" && Helper(90000005), command != "up"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "ufwd" && Helper(90000005), command != "back" && Helper(90000005), command != "down"
anim = 1
ID = 90010203
removeTime = 10 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
pauseMoveTime = 10 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
superMoveTime = 10 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
ignoreHitPause = 1



;=================================<LEFT, DOWN, DOWN-LEFT>======================================
[State -1, L, D, DL: Press Left]
type = Explod
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "back" && Helper(90000005), command != "fwd" && Helper(90000005), command != "up" && Helper(90000005), command != "down"
anim = 1
ID = 90010304
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

[State -1, L, D, DL: Release Left]
type = Explod
triggerAll = NumExplod(90000004)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command != "back" && Helper(90000005), command != "holdback"
trigger2 = Helper(90000005), command = "back" || Helper(90000005), command = "holdback"
trigger2 = Helper(90000005), command = "down" || Helper(90000005), command = "holddown" || Helper(90000005), command = "fwd" || Helper(90000005), command = "holdfwd" || Helper(90000005), command = "up" || Helper(90000005), command = "holdup"
anim = 1
ID = 90010354
removeTime = 5
pauseMoveTime = 5
superMoveTime = 5
ignoreHitPause = 1

[State -1, L, D, DL: Down]
type = Explod
triggerAll = NumExplod(90010304) || NumExplod(90010354)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command = "down" && Helper(90000005), command != "back" && Helper(90000005), command != "up" && Helper(90000005), command != "fwd"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "up" && Helper(90000005), command != "back" && Helper(90000005), command != "down" && Helper(90000005), command != "fwd"
anim = 1
ID = 90010302
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

[State -1, L, D, DL: Down-Left]
type = Explod
triggerAll = NumExplod(90010302)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command = "dback" && Helper(90000005), command != "fwd" && Helper(90000005), command != "up"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "uback" && Helper(90000005), command != "fwd" && Helper(90000005), command != "down"
anim = 1
ID = 90010301
removeTime = 10 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
pauseMoveTime = 10 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
superMoveTime = 10 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
ignoreHitPause = 1



;==============================================================================================
;=================================<HALF CIRCLE FORWARD/BACK>===================================
;==============================================================================================

;==============================================================================================
;As mentioned earlier, SNK games have command shortcuts for half-circle moves, allowing the user
;to only input cardinal directions and still complete the command. We have opted to use Capcom's
;method for the standard half circle comands here, but these can very easily be modified to use
;the SNK method!
;==============================================================================================

;========================<LEFT, DOWN-LEFT, DOWN, DOWN-RIGHT, RIGHT>============================
[State -1, L, DL, D, DR, R: Press Left]
type = Explod
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "back" && Helper(90000005), command != "fwd" && Helper(90000005), command != "up" && Helper(90000005), command != "down"
anim = 1
ID = 90010404
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

[State -1, L, DL, D, DR, R: Release Left]
type = Explod
triggerAll = NumExplod(90000004)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command != "back" && Helper(90000005), command != "holdback"
trigger2 = Helper(90000005), command = "back" || Helper(90000005), command = "holdback"
trigger2 = Helper(90000005), command = "down" || Helper(90000005), command = "holddown" || Helper(90000005), command = "fwd" || Helper(90000005), command = "holdfwd" || Helper(90000005), command = "up" || Helper(90000005), command = "holdup"
anim = 1
ID = 90010454
removeTime = 5
pauseMoveTime = 5
superMoveTime = 5
ignoreHitPause = 1

[State -1, L, DL, D, DR, R: Down-Left]
type = Explod
triggerAll = NumExplod(90010404) || NumExplod(90010454)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !NumExplod(92828282) && !NumExplod(92468246)
trigger1 = Helper(90000005), command = "dback" && Helper(90000005), command != "fwd" && Helper(90000005), command != "up"
trigger2 = NumExplod(92828282) || NumExplod(92468246)
trigger2 = Helper(90000005), command = "uback" && Helper(90000005), command != "fwd" && Helper(90000005), command != "down"
anim = 1
ID = 90010401
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

[State -1, L, DL, D, DR, R: Down]
type = Explod
triggerAll = NumExplod(90010401) || NumExplod(90010404) || NumExplod(90010454)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !NumExplod(92828282) && !NumExplod(92468246)
trigger1 = Helper(90000005), command = "down" && Helper(90000005), command != "back" && Helper(90000005), command != "up" && Helper(90000005), command != "fwd"
trigger2 = NumExplod(92828282) || NumExplod(92468246)
trigger2 = Helper(90000005), command = "up" && Helper(90000005), command != "back" && Helper(90000005), command != "down" && Helper(90000005), command != "fwd"
anim = 1
ID = 90010402
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

[State -1, L, DL, D, DR, R: Down-Right]
type = Explod
triggerAll = NumExplod(90010402) || NumExplod(90010401)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !NumExplod(92828282) && !NumExplod(92468246)
trigger1 = Helper(90000005), command = "dfwd" && Helper(90000005), command != "back" && Helper(90000005), command != "up"
trigger2 = NumExplod(92828282) || NumExplod(92468246)
trigger2 = Helper(90000005), command = "ufwd" && Helper(90000005), command != "back" && Helper(90000005), command != "down"
anim = 1
ID = 90010403
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

[State -1, L, DL, D, DR, R: Right]
type = Explod
triggerAll = NumExplod(90010403) || NumExplod(90010402)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "fwd" && Helper(90000005), command != "back" && Helper(90000005), command != "up" && Helper(90000005), command != "down"
anim = 1
ID = 90010406
removeTime = 10 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
pauseMoveTime = 10 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
superMoveTime = 10 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
ignoreHitPause = 1



;========================<RIGHT, DOWN-RIGHT, DOWN, DOWN-LEFT, LEFT>============================
[State -1, R, DR, D, DL, L: Press Right]
type = Explod
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "fwd" && Helper(90000005), command != "back" && Helper(90000005), command != "up" && Helper(90000005), command != "down"
anim = 1
ID = 90010506
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1


[State -1, R, DR, D, DL, L: Release Right]
type = Explod
triggerAll = NumExplod(90000006)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command != "fwd" && Helper(90000005), command != "holdfwd"
trigger2 = Helper(90000005), command = "fwd" || Helper(90000005), command = "holdfwd"
trigger2 = Helper(90000005), command = "down" || Helper(90000005), command = "holddown" || Helper(90000005), command = "back" || Helper(90000005), command = "holdback" || Helper(90000005), command = "up" || Helper(90000005), command = "holdup"
anim = 1
ID = 90010556
removeTime = 5
pauseMoveTime = 5
superMoveTime = 5
ignoreHitPause = 1

[State -1, R, DR, D, DL, L: Down-Right]
type = Explod
triggerAll = NumExplod(90010506) || NumExplod(90010556)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !NumExplod(92828282) && !NumExplod(92468246)
trigger1 = Helper(90000005), command = "dfwd" && Helper(90000005), command != "back" && Helper(90000005), command != "up"
trigger2 = NumExplod(92828282) || NumExplod(92468246)
trigger2 = Helper(90000005), command = "ufwd" && Helper(90000005), command != "back" && Helper(90000005), command != "down"
anim = 1
ID = 90010503
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

[State -1, R, DR, D, DL, L: Down]
type = Explod
triggerAll = NumExplod(90010503) || NumExplod(90010506) || NumExplod(90010556)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !NumExplod(92828282) && !NumExplod(92468246)
trigger1 = Helper(90000005), command = "down" && Helper(90000005), command != "back" && Helper(90000005), command != "up" && Helper(90000005), command != "fwd"
trigger2 = NumExplod(92828282) || NumExplod(92468246)
trigger2 = Helper(90000005), command = "up" && Helper(90000005), command != "back" && Helper(90000005), command != "down" && Helper(90000005), command != "fwd"
anim = 1
ID = 90010502
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

[State -1, R, DR, D, DL, L: Down-Left]
type = Explod
triggerAll = NumExplod(90010502) || NumExplod(90010503)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !NumExplod(92828282) && !NumExplod(92468246)
trigger1 = Helper(90000005), command = "dback" && Helper(90000005), command != "fwd" && Helper(90000005), command != "up"
trigger2 = NumExplod(92828282) || NumExplod(92468246)
trigger2 = Helper(90000005), command = "uback" && Helper(90000005), command != "fwd" && Helper(90000005), command != "down"
anim = 1
ID = 90010501
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

[State -1, R, DR, D, DL, L: Left]
type = Explod
triggerAll = NumExplod(90010501) || NumExplod(90010502)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "back" && Helper(90000005), command != "fwd" && Helper(90000005), command != "up" && Helper(90000005), command != "down"
anim = 1
ID = 90010504
removeTime = 10 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
pauseMoveTime = 10 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
superMoveTime = 10 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
ignoreHitPause = 1


;==============================================================================================
;==================================<(SPECIAL) DOWN, DOWN >=====================================
;==============================================================================================

;==============================================================================================
;This explod is for the special move variant of the D, D motion; the only difference between this
;and the one above is that this has a RemoveTime of 10, like every other special move, since it's
;designed to be used for special moves (as opposed to the earlier D, D command, which was for air
;dashing).
;==============================================================================================

[State -1, (special) D, D: 2nd Down]
type = Explod
triggerAll = NumExplod(90000555) && NumExplod(90000552)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command = "down" || Helper(90000005), command = "dfwd" || Helper(90000005), command = "dback"
trigger1 = Helper(90000005), command != "up"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "up" || Helper(90000005), command = "ufwd" || Helper(90000005), command = "uback"
trigger2 = Helper(90000005), command != "down"
anim = 1
ID = 90012602
removeTime = 10 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
pauseMoveTime = 10 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
superMoveTime = 10 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
ignoreHitPause = 1



;==============================================================================================
;====================================<DOWN, DOWN, DOWN>========================================
;==============================================================================================

;==============================================================================================
;And this is just extending the principle futher, to a third down input! This is typically used
;as a super command.
;==============================================================================================

[State -1, D, D, D: 2nd Neutral]
type = Explod
triggerAll = (NumExplod(90000001) || NumExplod(90000002) || NumExplod(90000003)) && NumExplod(90012602)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command != "down" && Helper(90000005), command != "holddown"
trigger1 = Helper(90000005), command != "fwd" && Helper(90000005), command != "holdfwd" && Helper(90000005), command != "back" && Helper(90000005), command != "holdback" && Helper(90000005), command != "up" && Helper(90000005), command != "holdup"
anim = 1
ID = 90032605
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

[State -1, Remove D, D, D: 2nd Neutral]
type = RemoveExplod
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = NumExplod(90000004) || NumExplod(90000007) || NumExplod(90000008) || NumExplod(90000009) || NumExplod(90000006)
trigger2 = !NumExplod(90012602)
ID = 90032605
ignoreHitPause = 1

[State -1, D, D, D: 3rd Down]
type = Explod
triggerAll = NumExplod(90032605) && NumExplod(90012602)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command = "down" || Helper(90000005), command = "dfwd" || Helper(90000005), command = "dback"
trigger1 = Helper(90000005), command != "up"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "up" || Helper(90000005), command = "ufwd" || Helper(90000005), command = "uback"
trigger2 = Helper(90000005), command != "down"
anim = 1
ID = 90032602
removeTime = 10 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
pauseMoveTime = 10 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
superMoveTime = 10 + ifElse(HitPauseTime, HitPauseTime - 1, 0)
ignoreHitPause = 1


;==============================================================================================
;===============================<REMOVE DIRECTIONAL DETECTORS>=================================
;==============================================================================================

;==============================================================================================
;This block of RemoveExplods gets rid of any active release detector explods; if the direction in
;question isn't currently being input, or if the direction is being input but other directions are
;also being input, then the detector explod is removed, having served its purpose as a detector.
;This must go at the very bottom of the entire EXPLODsive Buffering system code!
;==============================================================================================

[State -1, Remove Down Detector]
type = RemoveExplod
triggerAll = NumExplod(90000002)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command != "down" && Helper(90000005), command != "holddown"
trigger2 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "down" || Helper(90000005), command = "holddown"
trigger2 = Helper(90000005), command = "fwd" || Helper(90000005), command = "holdfwd" || Helper(90000005), command = "back" || Helper(90000005), command = "holdback" || Helper(90000005), command = "up" || Helper(90000005), command = "holdup"
trigger3 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger3 = Helper(90000005), command != "up" && Helper(90000005), command != "holdup"
trigger4 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger4 = Helper(90000005), command = "up" || Helper(90000005), command = "holdup"
trigger4 = Helper(90000005), command = "fwd" || Helper(90000005), command = "holdfwd" || Helper(90000005), command = "back" || Helper(90000005), command = "holdback" || Helper(90000005), command = "down" || Helper(90000005), command = "holddown"
id = 90000002
ignoreHitPause = 1

[State -1, Remove Down-Right Detector]
type = RemoveExplod
triggerAll = NumExplod(90000003)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = (Helper(90000005), command != "down" && Helper(90000005), command != "holddown") || (Helper(90000005), command != "fwd" && Helper(90000005), command != "holdfwd")
trigger2 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "down" || Helper(90000005), command = "holddown"
trigger2 = Helper(90000005), command = "fwd" || Helper(90000005), command = "holdfwd"
trigger2 = Helper(90000005), command = "back" || Helper(90000005), command = "holdback" || Helper(90000005), command = "up" || Helper(90000005), command = "holdup"
trigger3 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger3 = (Helper(90000005), command != "up" && Helper(90000005), command != "holdup") || (Helper(90000005), command != "fwd" && Helper(90000005), command != "holdfwd")
trigger4 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger4 = Helper(90000005), command = "up" || Helper(90000005), command = "holdup"
trigger4 = Helper(90000005), command = "fwd" || Helper(90000005), command = "holdfwd"
trigger4 = Helper(90000005), command = "back" || Helper(90000005), command = "holdback" || Helper(90000005), command = "down" || Helper(90000005), command = "holddown"
id = 90000003
ignoreHitPause = 1

[State -1, Remove Right Detector]
type = RemoveExplod
triggerAll = NumExplod(90000006)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command != "fwd" && Helper(90000005), command != "holdfwd"
trigger2 = Helper(90000005), command = "fwd" || Helper(90000005), command = "holdfwd"
trigger2 = Helper(90000005), command = "down" || Helper(90000005), command = "holddown" || Helper(90000005), command = "back" || Helper(90000005), command = "holdback" || Helper(90000005), command = "up" || Helper(90000005), command = "holdup"
id = 90000006
ignoreHitPause = 1

[State -1, Remove Up-Right Detector]
type = RemoveExplod
triggerAll = NumExplod(90000009)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = (Helper(90000005), command != "up" && Helper(90000005), command != "holdup") || (Helper(90000005), command != "fwd" && Helper(90000005), command != "holdfwd")
trigger2 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "up" || Helper(90000005), command = "holdup"
trigger2 = Helper(90000005), command = "fwd" || Helper(90000005), command = "holdfwd"
trigger2 = Helper(90000005), command = "back" || Helper(90000005), command = "holdback" || Helper(90000005), command = "down" || Helper(90000005), command = "holddown"
trigger3 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger3 = (Helper(90000005), command != "down" && Helper(90000005), command != "holddown") || (Helper(90000005), command != "fwd" && Helper(90000005), command != "holdfwd")
trigger4 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger4 = Helper(90000005), command = "down" || Helper(90000005), command = "holddown"
trigger4 = Helper(90000005), command = "fwd" || Helper(90000005), command = "holdfwd"
trigger4 = Helper(90000005), command = "back" || Helper(90000005), command = "holdback" || Helper(90000005), command = "up" || Helper(90000005), command = "holdup"
id = 90000009
ignoreHitPause = 1

[State -1, Remove Up Detector]
type = RemoveExplod
triggerAll = NumExplod(90000008)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command != "up" && Helper(90000005), command != "holdup"
trigger2 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "up" || Helper(90000005), command = "holdup"
trigger2 = Helper(90000005), command = "fwd" || Helper(90000005), command = "holdfwd" || Helper(90000005), command = "back" || Helper(90000005), command = "holdback" || Helper(90000005), command = "down" || Helper(90000005), command = "holddown"
trigger3 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger3 = Helper(90000005), command != "down" && Helper(90000005), command != "holddown"
trigger4 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger4 = Helper(90000005), command = "down" || Helper(90000005), command = "holddown"
trigger4 = Helper(90000005), command = "fwd" || Helper(90000005), command = "holdfwd" || Helper(90000005), command = "back" || Helper(90000005), command = "holdback" || Helper(90000005), command = "up" || Helper(90000005), command = "holdup"
id = 90000008
ignoreHitPause = 1

[State -1, Remove Up-Left Detector]
type = RemoveExplod
triggerAll = NumExplod(90000007)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = (Helper(90000005), command != "up" && Helper(90000005), command != "holdup") || (Helper(90000005), command != "back" && Helper(90000005), command != "holdback")
trigger2 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "up" || Helper(90000005), command = "holdup"
trigger2 = Helper(90000005), command = "back" || Helper(90000005), command = "holdback"
trigger2 = Helper(90000005), command = "fwd" || Helper(90000005), command = "holdfwd" || Helper(90000005), command = "down" || Helper(90000005), command = "holddown"
trigger3 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger3 = (Helper(90000005), command != "down" && Helper(90000005), command != "holddown") || (Helper(90000005), command != "back" && Helper(90000005), command != "holdback")
trigger4 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger4 = Helper(90000005), command = "down" || Helper(90000005), command = "holddown"
trigger4 = Helper(90000005), command = "back" || Helper(90000005), command = "holdback"
trigger4 = Helper(90000005), command = "fwd" || Helper(90000005), command = "holdfwd" || Helper(90000005), command = "up" || Helper(90000005), command = "holdup"
id = 90000007
ignoreHitPause = 1

[State -1, Remove Left Detector]
type = RemoveExplod
triggerAll = NumExplod(90000004)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command != "back" && Helper(90000005), command != "holdback"
trigger2 = Helper(90000005), command = "back" || Helper(90000005), command = "holdback"
trigger2 = Helper(90000005), command = "down" || Helper(90000005), command = "holddown" || Helper(90000005), command = "fwd" || Helper(90000005), command = "holdfwd" || Helper(90000005), command = "up" || Helper(90000005), command = "holdup"
id = 90000004
ignoreHitPause = 1

[State -1, Remove Down-Left Detector]
type = RemoveExplod
triggerAll = NumExplod(90000001)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = (Helper(90000005), command != "down" && Helper(90000005), command != "holddown") || (Helper(90000005), command != "back" && Helper(90000005), command != "holdback")
trigger2 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "down" || Helper(90000005), command = "holddown"
trigger2 = Helper(90000005), command = "back" || Helper(90000005), command = "holdback"
trigger2 = Helper(90000005), command = "fwd" || Helper(90000005), command = "holdfwd" || Helper(90000005), command = "up" || Helper(90000005), command = "holdup"
trigger3 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger3 = (Helper(90000005), command != "up" && Helper(90000005), command != "holdup") || (Helper(90000005), command != "back" && Helper(90000005), command != "holdback")
trigger4 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger4 = Helper(90000005), command = "up" || Helper(90000005), command = "holdup"
trigger4 = Helper(90000005), command = "back" || Helper(90000005), command = "holdback"
trigger4 = Helper(90000005), command = "fwd" || Helper(90000005), command = "holdfwd" || Helper(90000005), command = "down" || Helper(90000005), command = "holddown"
id = 90000001
ignoreHitPause = 1



;==============================================================================================
;==============================<REMOVE RELEASE BUTTON DETECTORS>===============================
;==============================================================================================

;==============================================================================================
;Same principle here as with the directional release detector explods.
;==============================================================================================

[State -1, Remove x Detector]
type = RemoveExplod
triggerAll = NumExplod(90000201)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command != "x" && Helper(90000005), command != "holdx"
ID = 90000201
ignoreHitPause = 1

[State -1, Remove y Detector]
type = RemoveExplod
triggerAll = NumExplod(90000211)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command != "y" && Helper(90000005), command != "holdy"
ID = 90000211
ignoreHitPause = 1

[State -1, Remove z Detector]
type = RemoveExplod
triggerAll = NumExplod(90000221)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command != "z" && Helper(90000005), command != "holdz"
ID = 90000221
ignoreHitPause = 1

[State -1, Remove a Detector]
type = RemoveExplod
triggerAll = NumExplod(90000231)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command != "a" && Helper(90000005), command != "holda"
ID = 90000231
ignoreHitPause = 1

[State -1, Remove b Detector]
type = RemoveExplod
triggerAll = NumExplod(90000241)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command != "b" && Helper(90000005), command != "holdb"
ID = 90000241
ignoreHitPause = 1

[State -1, Remove c Detector]
type = RemoveExplod
triggerAll = NumExplod(90000251)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command != "c" && Helper(90000005), command != "holdc"
ID = 90000251
ignoreHitPause = 1

[State -1, Remove start Detector]
type = RemoveExplod
triggerAll = NumExplod(90000194)
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = Helper(90000005), command != "start" && Helper(90000005), command != "holdstart"
ID = 90000194
ignoreHitPause = 1


;===========================================================================
; SUPERS
;===========================================================================

; Confidence Mode
[State -1]
type = ChangeState
triggerall = !AILEVEL
triggerall = roundstate = 2
triggerall = Var(51) =0
triggerall = NumExplod(90012602)
triggerall = NumExplod(90000210) && NumExplod(90000240) || NumExplod(90000215) && NumExplod(90000245)
triggerall = statetype != A  && !WinKo
triggerall = stateno != [910,911]
triggerall = Power >= 2000
trigger1 = Ctrl
trigger2 = stateno=900 
value = 2700

; Confidence Mode
[State -1]
type = ChangeState
triggerall = !AILEVEL
triggerall = roundstate = 2
triggerall = Var(51) >0
triggerall = Var(53) != 1
triggerall = NumExplod(90012602)
triggerall = NumExplod(90000210) && NumExplod(90000240) || NumExplod(90000215) && NumExplod(90000245)
triggerall = statetype != A  && !WinKo
triggerall = stateno != [910,911]
trigger1 = Ctrl
trigger2 = stateno=900 
value = 3900

;Solar Flare x 100
[State -1, Solar Flare x 100]
type = Changestate
triggerAll = !AILevel
triggerall = ((ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && (NumExplod(90030101) || NumExplod(90030114))) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && (NumExplod(90030016) || NumExplod(90030003))))
triggerall = NumExplod(90000230) || NumExplod(90000235) || NumExplod(90000240) || NumExplod(90000245) || NumExplod(90000250) || NumExplod(90000255)
triggerall = statetype != A && !WinKo 
triggerall = Cond((Var(51)>1 && Var(53) = 0),Power >= 2000,power >= 3000 )
trigger1 = ctrl
value = 3400
trigger2 = MoveContact
trigger2 = StateNo = [200,499]
trigger2 = StateNo != 270

;KHH
[State -1, KHH]
type = Changestate
triggerAll = !AILevel
triggerall = ifElse(Facing = 1,(NumExplod(90030016) || NumExplod(90030003)),(NumExplod(90030114) || NumExplod(90030101))) 
triggerall = (ifElse(NumExplod(90000200), 1, 0) + ifElse(NumExplod(90000210), 1, 0) + ifElse(NumExplod(90000220), 1, 0) >= 2) || (ifElse(NumExplod(90000205), 1, 0) + ifElse(NumExplod(90000215), 1, 0) + ifElse(NumExplod(90000225), 1, 0) >= 2)
triggerall = statetype = A && !WinKo 
triggerall = power >= 2000 
trigger1 = ctrl
value = 2400
trigger2 = MoveContact
trigger2 = StateNo = [600,699]
trigger3 = StateNo = 1000
trigger4 = StateNo = 1050
trigger5 = Stateno = [1100,1105]
trigger6 = StateNo = 1408
trigger6 = AnimElemTime(7)>0
trigger7 = StateNo = 270
trigger7 = MoveContact
trigger8 = StateNo = 271
trigger9 = StateNo = 1050
trigger9 = Time >= 14

;Scatter Shot 
[State -1, Scatter Shot]
type = Changestate
triggerAll = !AILevel
triggerall = ((ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && (NumExplod(90030016) || NumExplod(90030003))) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && (NumExplod(90030101) || NumExplod(90030114))))
triggerall = (ifElse(NumExplod(90000200), 1, 0) + ifElse(NumExplod(90000210), 1, 0) + ifElse(NumExplod(90000220), 1, 0) >= 2) || (ifElse(NumExplod(90000205), 1, 0) + ifElse(NumExplod(90000215), 1, 0) + ifElse(NumExplod(90000225), 1, 0) >= 2)
triggerall = statetype != A && !WinKo 
triggerall = power >= 2000 
trigger1 = ctrl
value = 3300
trigger2 = MoveContact
trigger2 = StateNo = [200,499]
trigger2 = StateNo != 270

;Tsuihidan
[State -1, Tsuihidan]
type = Changestate
triggerAll = !AILevel
triggerall = ((ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && (NumExplod(90030016) || NumExplod(90030003))) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && (NumExplod(90030101) || NumExplod(90030114))))
triggerall = NumExplod(90000200) || NumExplod(90000205) || NumExplod(90000210) || NumExplod(90000215) || NumExplod(90000220) || NumExplod(90000225)
triggerall = statetype != A && !WinKo 
triggerall = power >= 1000 
trigger1 = ctrl
value = 3200
trigger2 = MoveContact
trigger2 = StateNo = [200,499]
trigger2 = StateNo != 270

;Orin Combo
[State -1, Orin Combo]
type = Changestate
triggerAll = !AILevel
triggerall = ((ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && (NumExplod(90030016) || NumExplod(90030003))) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && (NumExplod(90030101) || NumExplod(90030114))))
triggerall = NumExplod(90000230) || NumExplod(90000235) || NumExplod(90000240) || NumExplod(90000245) || NumExplod(90000250) || NumExplod(90000255)
triggerall = statetype != A && !WinKo 
triggerall = power >= 1000 
trigger1 = ctrl
value = 3100
trigger2 = MoveContact
trigger2 = StateNo = [200,499]
trigger2 = StateNo != 270

;Keinzan
[State -1, Keinzan]
type = Changestate
triggerAll = !AILevel
triggerall = ((ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && (NumExplod(90030101) || NumExplod(90030114))) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && (NumExplod(90030016) || NumExplod(90030003))))
triggerall = NumExplod(90000200) || NumExplod(90000205) || NumExplod(90000210) || NumExplod(90000215) || NumExplod(90000220) || NumExplod(90000225)
triggerall = statetype != A && !WinKo 
triggerall = power >= 1000 
trigger1 = ctrl
value = 3000
trigger2 = MoveContact
trigger2 = StateNo = [200,499]
trigger2 = StateNo != 270

;===========================================================================
; SPECIALS
;===========================================================================

; Duck N Cover
[State -1]
type = ChangeState
triggerall = !AILEVEL
triggerall = roundstate = 2
triggerall = NumExplod(90032602) || ( NumExplod(90000230)&&NumExplod(90000240)&&NumExplod(90000250) && (NumExplod(90000021) || NumExplod(90000022) || NumExplod(90000023)))
triggerall = statetype != A  && !WinKo
triggerall = stateno != 15
;triggerall = Var(51)=0 && Var(52)>0
trigger1 = Ctrl
value = 15

;EX Turtle Flip
[State -1, EX Turtle Flip]
type = ChangeState
triggerall= !AILevel
triggerall = Power>=500
triggerall = ((ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90010406)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90010504)))
triggerall = (ifElse(NumExplod(90000230), 1, 0) + ifElse(NumExplod(90000240), 1, 0) + ifElse(NumExplod(90000250), 1, 0) >= 2) || (ifElse(NumExplod(90000235), 1, 0) + ifElse(NumExplod(90000245), 1, 0) + ifElse(NumExplod(90000255), 1, 0) >= 2)
triggerall = StateType != A  && !WinKo
trigger1 = ctrl
trigger2 = MoveContact
trigger2 = StateNo = [200,499]
trigger2 = StateNo != 270
value = 1050

;Fake Turtle Flip
[State -1, Fake Turtle Flip]
type = ChangeState
triggerall= !AILevel
triggerall = !NumHelper(1070)
triggerall = ((ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90010406)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90010504)))
triggerall = NumExplod(90000195) || NumExplod(90000196) 
triggerall = StateType != A  && !WinKo
triggerall = !NumExplod(1060)
trigger1 = ctrl
trigger2 = MoveContact
trigger2 = StateNo = [200,499]
trigger2 = StateNo != 270
value = 1060

;Turtle Flip
[State -1, Turtle Flip]
type = ChangeState
triggerall= !AILevel
triggerall = ((ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90010406)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90010504)))
triggerall = NumExplod(90000230) || NumExplod(90000235) || NumExplod(90000240) || NumExplod(90000245) || NumExplod(90000250) || NumExplod(90000255)
triggerall = StateType != A  && !WinKo
trigger1 = ctrl
trigger2 = MoveContact
trigger2 = StateNo = [200,499]
trigger2 = StateNo != 270
value = 1000

;Solar Flare
[State -1, Solar Flare]
type = ChangeState
triggerall = !AILevel
triggerall = ((ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90010301)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90010203)))
triggerall = NumExplod(90000230) || NumExplod(90000235) || NumExplod(90000240) || NumExplod(90000245) || NumExplod(90000250) || NumExplod(90000255) || (!NumExplod(1064) && NumExplod(90000195) || NumExplod(90000196))
triggerall = StateType != A  && !WinKo
trigger1 = ctrl
trigger2 = MoveContact
trigger2 = StateNo = [200,499]
trigger2 = StateNo != 270
value = 1450

;EX Rocket Man
[State -1, EX Rocket Man]
type = null;ChangeState
triggerall = !AILevel
triggerall = Power>=500
triggerall = ((ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90010203)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90010301))) || NumExplod(90012602)
triggerall = (ifElse(NumExplod(90000200), 1, 0) + ifElse(NumExplod(90000210), 1, 0) + ifElse(NumExplod(90000220), 1, 0) >= 2) || (ifElse(NumExplod(90000205), 1, 0) + ifElse(NumExplod(90000215), 1, 0) + ifElse(NumExplod(90000225), 1, 0) >= 2)
triggerall = !WinKo
triggerall = StateType !=A
trigger1 = ctrl
trigger2 = MoveContact
trigger2 = StateNo = [200,499]
trigger2 = StateNo != 270
trigger2 = (NumExplod(200) || Var(51)>0)
value = 1504

;EX Air Rocket Man
[State -1, EX Air Rocket Man]
type = ChangeState
triggerall = !AILevel
triggerall = Power>=500
triggerall = (NumExplod(90000021)||NumExplod(90000022)||NumExplod(90000023)) 
triggerall = (ifElse(NumExplod(90000200), 1, 0) + ifElse(NumExplod(90000210), 1, 0) + ifElse(NumExplod(90000220), 1, 0) >= 2) || (ifElse(NumExplod(90000205), 1, 0) + ifElse(NumExplod(90000215), 1, 0) + ifElse(NumExplod(90000225), 1, 0) >= 2)
triggerall = StateType = A  && !WinKo
triggerall = Pos Y >=-300
triggerall =  NumExplod(1502)<1 || (NumExplod(1502)<2 && Var(51)>0 && Var(53)=0)
trigger1 = ctrl
trigger2 = MoveContact
trigger2 = StateNo = [600,699]
trigger3 = StateNo = 1408
trigger3 = AnimElemTime(7)>0
trigger4 = StateNo = 270
trigger4 = MoveContact
trigger5 = StateNo = 271
trigger6 = StateNo = 1050
trigger6 = Time >= 14
value = 1504

;Rocket Man
[State -1, Rocket Man]
type = null;ChangeState
triggerall = !AILevel
triggerall = ((ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90010203)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90010301))) || NumExplod(90012602)
triggerall = NumExplod(90000200) || NumExplod(90000205) || NumExplod(90000210) || NumExplod(90000215) || NumExplod(90000220) || NumExplod(90000225) 
triggerall = StateType != A  && !WinKo
trigger1 = ctrl
trigger2 = MoveContact
trigger2 = StateNo = [200,499]
trigger2 = StateNo != 270
value = 1500

;Air Rocket Man
[State -1, Air Rocket Man]
type = ChangeState
triggerall = !AILevel
triggerall = (NumExplod(90000021)||NumExplod(90000022)||NumExplod(90000023)) 
triggerall = NumExplod(90000200) || NumExplod(90000205) || NumExplod(90000210) || NumExplod(90000215) || NumExplod(90000220) || NumExplod(90000225) 
triggerall = StateType = A  && !WinKo
triggerall = Pos Y >=-300
triggerall =  NumExplod(1501)<1 || (NumExplod(1501)<2 && Var(51)>0 && Var(53)=0)
trigger1 = ctrl
trigger2 = MoveContact
trigger2 = StateNo = [600,699]
trigger3 = StateNo = 1408
trigger3 = AnimElemTime(7)>0
trigger4 = StateNo = 270
trigger4 = MoveContact
trigger5 = StateNo = 271
trigger6 = StateNo = 1050
trigger6 = Time >= 14
value = 1501

;Fake Rocket Man
[State -1, Fake Rocket Man]
type = null;ChangeState
triggerall = !AILevel
triggerall = ((ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90010203)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90010301)))|| NumExplod(90012602)
triggerall = NumExplod(90000195) || NumExplod(90000196) 
triggerall = StateType != A  && !WinKo
triggerall = !NumExplod(1061)
trigger1 = ctrl
trigger2 = MoveContact
trigger2 = StateNo = [200,499]
trigger2 = StateNo != 270
value = 1502

;Air Fake Rocket Man
[State -1, Air Fake Rocket Man]
type = ChangeState
triggerall = !AILevel
triggerall = (NumExplod(90000021)||NumExplod(90000022)||NumExplod(90000023))
triggerall = NumExplod(90000195) || NumExplod(90000196) 
triggerall = StateType = A  && !WinKo
;triggerall = !NumExplod(1061)
trigger1 = ctrl
trigger2 = MoveContact
trigger2 = StateNo = [600,699]
trigger3 = StateNo = 1408
trigger3 = AnimElemTime(7)>0
trigger4 = StateNo = 270
trigger4 = MoveContact
trigger5 = StateNo = 271
trigger6 = StateNo = 1050
trigger6 = Time >= 14
value = 1503

;Fake Air Jet
[State -1, Fake Air Jet]
type = ChangeState
triggerall = !AILevel
triggerall = ifElse(Facing = 1, NumExplod(90010104),NumExplod(90010006))
triggerall = NumExplod(90000195) || NumExplod(90000196) 
triggerall = StateType = A  && !WinKo
triggerall = !NumExplod(1134)
trigger1 = ctrl
trigger2 = MoveContact
trigger2 = StateNo = [600,699]
trigger3 = StateNo = 1408
trigger3 = AnimElemTime(7)>0
trigger4 = StateNo = 270
trigger4 = MoveContact
trigger5 = StateNo = 271
trigger6 = StateNo = 1050
trigger6 = Time >= 14
value = 1134

;EX Air Jet
[State -1, EX Air Jet]
type = ChangeState
triggerall = !AILevel
triggerall = Power>=500
triggerall = ifElse(Facing = 1, NumExplod(90010104),NumExplod(90010006))
triggerall = (ifElse(NumExplod(90000200), 1, 0) + ifElse(NumExplod(90000210), 1, 0) + ifElse(NumExplod(90000220), 1, 0) >= 2) || (ifElse(NumExplod(90000205), 1, 0) + ifElse(NumExplod(90000215), 1, 0) + ifElse(NumExplod(90000225), 1, 0) >= 2)
triggerall = StateType = A  && !WinKo
trigger1 = ctrl
trigger2 = MoveContact
trigger2 = StateNo = [600,699]
trigger3 = MoveContact
trigger3 = StateNo = [1101,1102]
trigger3 = Var(51)>0 && Var(53)=0
trigger4 = StateNo = 1408
trigger4 = AnimElemTime(7)>0
trigger5 = StateNo = 270
trigger5 = MoveContact
trigger6 = StateNo = 271
trigger7 = StateNo = 1050
trigger7 = Time >= 14
value = 1135

;Air Jet
[State -1, Air Jet]
type = ChangeState
triggerall = !AILevel
triggerall = ifElse(Facing = 1, NumExplod(90010104),NumExplod(90010006))
triggerall = NumExplod(90000200) || NumExplod(90000205) || NumExplod(90000210) || NumExplod(90000215) || NumExplod(90000220) || NumExplod(90000225) 
triggerall = StateType = A  && !WinKo
trigger1 = ctrl
trigger2 = MoveContact
trigger2 = StateNo = [600,699]
trigger3 = MoveContact
trigger3 = StateNo = [1101,1102]
trigger3 = Var(51)>0 && Var(53)=0
trigger4 = StateNo = 1408
trigger4 = AnimElemTime(7)>0
trigger5 = StateNo = 270
trigger5 = MoveContact
trigger6 = StateNo = 271
trigger7 = StateNo = 1050
trigger7 = Time >= 14
value = 1130

;EX Shoulder Crusher
[State -1, EX Shoulder Crusher]
type = ChangeState
triggerall = !AILevel
triggerall = Power>=500
triggerall = ((ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90010104)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90010006)))
triggerall = (ifElse(NumExplod(90000200), 1, 0) + ifElse(NumExplod(90000210), 1, 0) + ifElse(NumExplod(90000220), 1, 0) >= 2) || (ifElse(NumExplod(90000205), 1, 0) + ifElse(NumExplod(90000215), 1, 0) + ifElse(NumExplod(90000225), 1, 0) >= 2)
triggerall = StateType != A  && !WinKo
trigger1 = ctrl
trigger2 = MoveContact
trigger2 = StateNo = [200,499]
trigger2 = StateNo != 270
value = 1105

;Fake Shoulder Crusher
[State -1, Fake Shoulder Crusher]
type = ChangeState
triggerall = !AILevel
triggerall = ((ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90010104)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90010006)))
triggerall = NumExplod(90000195) || NumExplod(90000196) 
triggerall = StateType != A  && !WinKo
triggerall = !NumExplod(1061)
trigger1 = ctrl
trigger2 = MoveContact
trigger2 = StateNo = [200,499]
trigger2 = StateNo != 270
value = 1120

;Shoulder Crusher
[State -1, Shoulder Crusher]
type = ChangeState
triggerall = !AILevel
triggerall = ((ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90010104)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90010006)))
triggerall = NumExplod(90000200) || NumExplod(90000205) || NumExplod(90000210) || NumExplod(90000215) || NumExplod(90000220) || NumExplod(90000225) 
triggerall = StateType != A  && !WinKo
trigger1 = ctrl
trigger2 = MoveContact
trigger2 = StateNo = [200,499]
trigger2 = StateNo != 270
value = 1100

;Whoa!
[State -1, Whoa!]
type = ChangeState
triggerall = !AILevel
triggerall = ((ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90010104)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90010006)))
triggerall = NumExplod(90000230) || NumExplod(90000235) || NumExplod(90000240) || NumExplod(90000245) || NumExplod(90000250) || NumExplod(90000255) 
triggerall = StateType != A  && !WinKo
triggerall = !NumExplod(1065)
triggerall = Var(51) >0 && Var(53)=0
trigger1 = ctrl
trigger2 = MoveContact
trigger2 = StateNo = [200,499]
trigger2 = StateNo != 270
value = 1400

;EX Ki Blast 
[State -1, Ki Blast]
type = null;ChangeState
triggerall= !AILevel
triggerall = Power>=500
triggerall = ((ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90010006)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90010104)))
triggerall = (ifElse(NumExplod(90000200), 1, 0) + ifElse(NumExplod(90000210), 1, 0) + ifElse(NumExplod(90000220), 1, 0) >= 2) || (ifElse(NumExplod(90000205), 1, 0) + ifElse(NumExplod(90000215), 1, 0) + ifElse(NumExplod(90000225), 1, 0) >= 2)
triggerall = StateType != A  && !WinKo
trigger1 = ctrl
trigger2 = MoveContact
trigger2 = StateNo = [200,499]
trigger2 = StateNo != 270
value = 1260

;Ki Blast 
[State -1, Ki Blast]
type = null;ChangeState
triggerall= !AILevel
triggerall = ((ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90010006)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90010104)))
triggerall = NumExplod(90000200) || NumExplod(90000205) || NumExplod(90000210) || NumExplod(90000215) || NumExplod(90000220) || NumExplod(90000225) 
triggerall = StateType != A  && !WinKo
trigger1 = ctrl
trigger2 = MoveContact
trigger2 = StateNo = [200,499]
trigger2 = StateNo != 270
value = 1200

;Fake Ki Blast 
[State -1, Ki Blast]
type = ChangeState
triggerall= !AILevel
triggerall = ((ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90010006)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90010104)))
triggerall = NumExplod(90000195) || NumExplod(90000196) 
triggerall = StateType != A  && !WinKo
triggerall = !NumExplod(1063)
trigger1 = ctrl
trigger2 = MoveContact
trigger2 = StateNo = [200,499]
trigger2 = StateNo != 270
value = 1201

;EX Ki Blast Up
[State -1, Ki Blast]
type = ChangeState
triggerall= !AILevel
triggerall = Power>=500
triggerall = ((ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90010006)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90010104)))
triggerall = (ifElse(NumExplod(90000200), 1, 0) + ifElse(NumExplod(90000210), 1, 0) + ifElse(NumExplod(90000220), 1, 0) >= 2) || (ifElse(NumExplod(90000205), 1, 0) + ifElse(NumExplod(90000215), 1, 0) + ifElse(NumExplod(90000225), 1, 0) >= 2)
triggerall = StateType != A  && !WinKo
trigger1 = ctrl
trigger2 = MoveContact
trigger2 = StateNo = [200,499]
trigger2 = StateNo != 270
value = 1265

;Ki Blast Up
[State -1, Ki Blast Up]
type = ChangeState
triggerall= !AILevel
triggerall = ((ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90010006)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90010104)))
triggerall = NumExplod(90000200) || NumExplod(90000205) || NumExplod(90000210) || NumExplod(90000215) || NumExplod(90000220) || NumExplod(90000225) 
triggerall = StateType != A  && !WinKo
trigger1 = ctrl
trigger2 = MoveContact
trigger2 = StateNo = [200,499]
trigger2 = StateNo != 270
value = 1202

;EX Roll Away
[State -1, EX Roll Away]
type = null;ChangeState
triggerall= !AILevel
triggerall = Power>=1000
triggerall = (ifElse(NumExplod(90000230), 1, 0) + ifElse(NumExplod(90000240), 1, 0) + ifElse(NumExplod(90000250), 1, 0) >= 2) 
triggerall = StateType = L  && !WinKo
trigger1 = StateNo = 5111 && Alive
value = 1240

;===========================================================================
; COMMAND & SYSTEM MOVES
;===========================================================================

;Power Charge
[State -1]
type = ChangeState
triggerAll = !AILevel
triggerall = StateType != A
triggerall = stateno != 900
triggerall = Ctrl
triggerall = NumExplod(90000210) && NumExplod(90000240) || command = "holdb" && command = "holdy"
trigger1 = Power < 3000 
value = 900

; Back Throw
[State -1, throw1]
type = changestate
triggerAll = !AILevel
triggerall = ((ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90000004)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90000006))) && NumExplod(90000800)
trigger1 = roundstate=2 && ctrl && statetype=S && stateno!=100
value = 810

; Forward Throw 
[State -1, throw1]
type = changestate
triggerAll = !AILevel
triggerall = ((ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90000006)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90000004))) && NumExplod(90000800) || NumExplod(90000800)
trigger1 = roundstate=2 && ctrl && statetype=S && stateno!=100
value = 800

; Slashing Chop (aka Focus Attack)
[State -1, Slashing Chop]
type = ChangeState
triggerall= !AILevel
triggerall = RoundState = 2
triggerall = StateNo !=[1300,1302]
triggerall = StateNo != 106
triggerall = command = "z" && command = "c"
triggerall = NumExplod(90000220) && NumExplod(90000250)
trigger1 = StateType = S
trigger1 = ctrl
value = 1300

;Zetto Counter - Ground
[State -1, Z Counter - Ground]
type = ChangeState
trigger1 = !AILevel
trigger1 = StateNo=150 || StateNo=152
trigger1 = ((ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90000006)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90000004)))
trigger1 = (ifElse(NumExplod(90000200), 1, 0) + ifElse(NumExplod(90000210), 1, 0) + ifElse(NumExplod(90000220), 1, 0) >= 2) || (ifElse(NumExplod(90000205), 1, 0) + ifElse(NumExplod(90000215), 1, 0) + ifElse(NumExplod(90000225), 1, 0) >= 2) || (ifElse(NumExplod(90000230), 1, 0) + ifElse(NumExplod(90000240), 1, 0) + ifElse(NumExplod(90000250), 1, 0) >= 2) || (ifElse(NumExplod(90000235), 1, 0) + ifElse(NumExplod(90000245), 1, 0) + ifElse(NumExplod(90000255), 1, 0) >= 2)
trigger1 = RoundState=2 && power>=1000 && StateType!=A
value = 750

;ZettoCounter - Air
[State -1, Z Counter - Air]
type = ChangeState
trigger1 = !AILevel
trigger1 = StateNo=154  
trigger1 = ((ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90000006)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90000004)))
trigger1 = (ifElse(NumExplod(90000200), 1, 0) + ifElse(NumExplod(90000210), 1, 0) + ifElse(NumExplod(90000220), 1, 0) >= 2) || (ifElse(NumExplod(90000205), 1, 0) + ifElse(NumExplod(90000215), 1, 0) + ifElse(NumExplod(90000225), 1, 0) >= 2) || (ifElse(NumExplod(90000230), 1, 0) + ifElse(NumExplod(90000240), 1, 0) + ifElse(NumExplod(90000250), 1, 0) >= 2) || (ifElse(NumExplod(90000235), 1, 0) + ifElse(NumExplod(90000245), 1, 0) + ifElse(NumExplod(90000255), 1, 0) >= 2)
trigger1 = RoundState=2 && power>=1000 && StateType=A
value = 760

;Run Strong Kick 
[State -1, Run Strong Kick]
type = ChangeState
value = 270
triggerAll = !AILevel
triggerall = NumExplod(90000250) ||  command = "c"
triggerall = !NumExplod(90000001) && !NumExplod(90000002) && !NumExplod(9000003)
triggerall = StateType != A
trigger1 = StateNo = [100,101]

;===========================================================================
; NORMALS
;===========================================================================

; Stand Light Punch
[State -1, Stand Light Punch]
type = ChangeState
triggerall= !AILevel
triggerall = !IsHelper
triggerall = NumExplod(90000200) ||  command = "x"
triggerall = (!NumExplod(90000021) && !NumExplod(90000022) && !NumExplod(90000023))
trigger1 = StateType !=A
trigger1 = ctrl
trigger2 =  StateNo = 101 || (StateNo = 100 && Var(51)>0 && Var(53)=0)
value = 200

; Stand Medium Punch
[State -1, Stand Medium Punch]
type = ChangeState
triggerall= !AILevel
triggerall = !IsHelper
triggerall = NumExplod(90000210) ||  command = "y"
triggerall = (!NumExplod(90000021) && !NumExplod(90000022) && !NumExplod(90000023))
trigger1 = StateType !=A
trigger1 = ctrl
trigger2 =  StateNo = 101 || (StateNo = 100 && Var(51)>0 && Var(53)=0)
trigger3 = MoveContact
trigger3 = StateNo = 200 || StateNo = 230 || StateNo = 400 || StateNo = 430
value = 210

; Stand Hard Punch
[State -1, Stand Hard Punch]
type = ChangeState
triggerall= !AILevel
triggerall = !IsHelper
triggerall = NumExplod(90000220) ||  command = "z"
triggerall = (!NumExplod(90000021) && !NumExplod(90000022) && !NumExplod(90000023))
trigger1 = StateType !=A
trigger1 = ctrl
trigger2 =  StateNo = 101 || (StateNo = 100 && Var(51)>0 && Var(53)=0)
trigger3 = MoveContact
trigger3 = StateNo = 200 || (StateNo = 210 && AnimElemTime(8)>=1) || StateNo = 230 || StateNo = 240 || StateNo = 400 || StateNo = 410 || StateNo = 430 || StateNo = 440
value = 220

;-| Kicks |--------------------------------------------------------
;Stand Light Kick
[State -1, Stand Light Kick]
type = ChangeState
value = 230
triggerAll = !AILevel
triggerall = NumExplod(90000230) ||  command = "a"
triggerall = (!NumExplod(90000021) && !NumExplod(90000022) && !NumExplod(90000023))
triggerall = StateType != A
trigger1 = ctrl 
trigger2 =  StateNo = 101 || (StateNo = 100 && Var(51)>0 && Var(53)=0)

;Stand Medium Kick
[State -1, Stand Medium Kick]
type = ChangeState
value = 240
triggerAll = !AILevel
triggerall = NumExplod(90000240) ||  command = "b"
triggerall = (!NumExplod(90000021) && !NumExplod(90000022) && !NumExplod(90000023))
triggerall = StateType != A
trigger1 = ctrl  ||  StateNo = 101 || (StateNo = 100 && Var(51)>0 && Var(53)=0)
trigger2 = (stateno = 200 && MoveContact) 
trigger3 = (stateno = 230 && MoveContact) 
trigger4 = (stateno = 400 && MoveContact) 
trigger5 = (stateno = 430 && MoveContact)

;Stand Strong Kick 
[State -1, Stand Strong Kick]
type = ChangeState
value = 250
triggerAll = !AILevel
triggerall = NumExplod(90000250) ||  command = "c"
triggerall = (!NumExplod(90000021) && !NumExplod(90000022) && !NumExplod(90000023))
triggerall = StateType != A
trigger1 = ctrl  ||  StateNo = 101 || (StateNo = 100 && Var(51)>0 && Var(53)=0)
trigger2 = (stateno = 200 && MoveContact) || (stateno = 210 && MoveContact) 
trigger3 = (stateno = 230 && MoveContact) || (stateno = 240 && MoveContact) 
trigger4 = (stateno = 400 && MoveContact) || (stateno = 410 && MoveContact) 
trigger5 = (stateno = 430 && MoveContact) || (stateno = 440 && MoveContact) 

;Combo Strong Punch
[State -1, Combo Strong Punch]
type = ChangeState
triggerAll = !AILevel
triggerall = NumExplod(90000220)||command = "z"
triggerall = statetype != A
trigger1 = (StateNo = 245) 
trigger1 = MoveContact
value = 261

;Combo Strong Kick
[State -1, Combo Strong Kick]
type = null;ChangeState
triggerAll = !AILevel
triggerall = (ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90000026)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90000024))
triggerall = NumExplod(90000250)||command = "c"
triggerall = statetype != A
trigger1 = (StateNo = 245) 
trigger1 = MoveContact
value = 262

;Combo Strong Kick
[State -1, Combo Strong Kick]
type = ChangeState
triggerAll = !AILevel
triggerall = NumExplod(90000250)||command = "c"
triggerall = statetype != A
trigger1 = (StateNo = 245) 
trigger1 = MoveContact
value = 260


;-| Crouch Punches |--------------------------------------------------------
;Crouch Light Punch
[State -1, Crouch Light Punch]
type = ChangeState
value = 400
triggerAll = !AILevel
triggerall = NumExplod(90000200) ||  command = "x"
triggerall = NumExplod(90000021) || NumExplod(90000022) || NumExplod(90000023)
triggerall = StateType != A
trigger1 = ctrl  ||  StateNo = 101 || (StateNo = 100 && Var(51)>0 && Var(53)=0)
trigger2 = (stateno = 200) || (stateno = 230) 

;Crouch Medium Punch
[State -1, Crouch Medium Punch]
type = ChangeState
value = 410
triggerAll = !AILevel
triggerall = NumExplod(90000210) ||  command = "y"
triggerall = NumExplod(90000021) || NumExplod(90000022) || NumExplod(90000023)
triggerall = StateType != A
trigger1 = ctrl  ||  StateNo = 101 || (StateNo = 100 && Var(51)>0 && Var(53)=0)
trigger2 = (stateno = 200) || (stateno = 230)  
trigger2 = MoveContact 
trigger3 = (stateno = 400) || (stateno = 430)  
trigger3 = MoveContact 

;Crouch Strong Punch
[State -1, Crouch Strong Punch]
type = ChangeState
value = 420
triggerAll = !AILevel
triggerall = NumExplod(90000220) ||  command = "z"
triggerall = NumExplod(90000021) || NumExplod(90000022) || NumExplod(90000023)
triggerall = StateType != A
trigger1 = ctrl  ||  StateNo = 101 || (StateNo = 100 && Var(51)>0 && Var(53)=0)
trigger2 = (stateno = 200) || (stateno = 210) || (stateno = 230) || (stateno = 240) ;|| (stateno = 225)
trigger2 = MoveContact 
trigger3 = (stateno = 400) || (stateno = 410) || (stateno = 430) || (stateno = 440) 
trigger3 = MoveContact 

;-| Crouch Kicks |--------------------------------------------------------
;Crouch Crouch Light Kick
[State -1, Crouch Light Kick]
type = ChangeState
value = 430
triggerAll = !AILevel
triggerall = NumExplod(90000230) ||  command = "a"
triggerall = NumExplod(90000021) || NumExplod(90000022) || NumExplod(90000023)
triggerall = StateType != A
trigger1 = ctrl  ||  StateNo = 101 || (StateNo = 100 && Var(51)>0 && Var(53)=0)
trigger2 = (stateno = 200) || (stateno = 230) 

;Crouch Medium Kick
[State -1, Crouch Medium Kick]
type = ChangeState
value = 440
triggerAll = !AILevel
triggerall = NumExplod(90000240) ||  command = "b"
triggerall = NumExplod(90000021) || NumExplod(90000022) || NumExplod(90000023)
triggerall = StateType != A
trigger1 = ctrl  ||  StateNo = 101 || (StateNo = 100 && Var(51)>0 && Var(53)=0)
trigger2 = (stateno = 200) || (stateno = 230)  
trigger2 = MoveContact 
trigger3 = (stateno = 400) || (stateno = 430)  
trigger3 = MoveContact 

;Crouch Strong Kick 
[State -1, Crouch Strong Kick]
type = ChangeState
value = 450
triggerAll = !AILevel
triggerall = NumExplod(90000250) ||  command = "c"
triggerall = NumExplod(90000021) || NumExplod(90000022) || NumExplod(90000023)
triggerall = StateType != A
trigger1 = ctrl  ||  StateNo = 101 || (StateNo = 100 && Var(51)>0 && Var(53)=0)
trigger2 = (stateno = 200) || (stateno = 210) || (stateno = 230) || (stateno = 240)  
trigger2 = MoveContact 
trigger3 = (stateno = 400) || (stateno = 410) || (stateno = 430) || (stateno = 440) 
trigger3 = MoveContact 

;-| Jump Punches |--------------------------------------------------------
;Jump Light Punch
[State -1, Jump Light Punch]
type = ChangeState
triggerAll = !AILevel
triggerall = NumExplod(90000200)||command = "x"
triggerall = stateno != 600
triggerall = statetype = A
trigger1 = ctrl
value = 600

;Jump Medium Punch
[State -1, Jump Medium Punch]
type = ChangeState
triggerAll = !AILevel
triggerall = NumExplod(90000210)||command = "y"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = (StateNo = 600) || (StateNo = 630)
trigger2 = MoveContact
value = 610

;Jump Strong Punch 
[State -1, Jump Strong Punch]
type = ChangeState
triggerAll = !AILevel
triggerall = NumExplod(90000220)||command = "z"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = (StateNo = 600) || (StateNo = 630) || (StateNo = 610) || (StateNo = 640)
trigger2 = MoveContact
value = 620

;-| Jump Kicks |--------------------------------------------------------
;Jump Light Kick
[State -1, Jump Light Kick]
type = ChangeState
triggerAll = !AILevel
triggerall = NumExplod(90000230)||command = "a"
triggerall = statetype = A
trigger1 = ctrl 
value = 630

;Jump Medium Kick
[State -1, Jump Medium Kick]
type = ChangeState
triggerAll = !AILevel
triggerall = NumExplod(90000240)||command = "b"
triggerall = statetype = A
triggerall = (stateno!=640); && (stateno!=645)
trigger1 = ctrl 
trigger2 = (StateNo = 600) || (StateNo = 630)
trigger2 = movecontact
value = 640

;Jump Strong Kick
[State -1, Jump Strong Kick]
type = ChangeState
triggerAll = !AILevel
triggerall = NumExplod(90000250)||command = "c"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = (StateNo = 600) || (StateNo = 630) || (StateNo = 610) || (StateNo = 640)
trigger2 = MoveContact
value = 650

; Taunt
[State -1, Taunt]
type = ChangeState
triggerall= !AILevel
triggerall = !IsHelper
triggerall = NumExplod(90000195)  ||  command = "start"
triggerall = StateNo!=195
trigger1 = StateType != A
trigger1 = ctrl
value = 195

;===========================================================================
; SYSTEM
;===========================================================================

;Air Dash Forward
[State -1, Fwd]
type = ChangeState
value = 110
triggerall = !AILevel
triggerall = var(10) = 0 ;limiter
triggerall = ((pos Y < -20 && StateNo != 811) || (StateNo = 811))
triggerall = ifElse(Facing = 1, NumExplod(90001016),NumExplod(90001064))
trigger1 = (StateType = A) && (ctrl) 

;Air Dash Back
[State -1, Back]
type = ChangeState
value = 115
triggerall = !AILevel
triggerall = var(10) = 0 && Vel X <=0;limiter
triggerall = ((pos Y < -20 && StateNo != 811) || (StateNo = 811))
triggerall = ifElse(Facing = 1, NumExplod(90001064),NumExplod(90001016))
trigger1 = (StateType = A) && (ctrl) 

; Run Fwd
[State -1, Run Fwd]
type = ChangeState
triggerall= !AILevel
triggerall = (ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90001016)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90001064))
triggerall = StateType = S && ctrl
trigger1 = RoundState=2 && (StateNo!=[100,106])
value = 100

; Run Back
[State -1, Run Back]
type = ChangeState
triggerall= !AILevel
triggerall = (ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90001064)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90001016))
triggerall = StateType = S
trigger1 = ctrl
trigger2 = StateNo=195 && animelemtime(3)>=0
value = Cond((Var(51)=0 || (Var(51)>0 && Var(53)=1)),105,1404)

; Super Jump
;This state executes only after performing the air launcher
[State -1, Jump Launcher]
type = ChangeState
value = 10230
triggerall= !AILevel
triggerall = NumExplod(90000008) || NumExplod(90000009) || NumExplod(90000007)
trigger1 = (StateNo = 420) && MoveHit

[State -1, Super Jump Forward]
type = ChangeState
value = 10232
triggerall= !AILevel
trigger1 = StateType = S
trigger1 = ctrl
trigger1 = NumExplod(90000408) 
trigger1 = (ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90000009)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90000007))

[State -1, Super Jump Backward]
type = ChangeState
value = 10233
triggerall= !AILevel
trigger1 = StateType = S
trigger1 = ctrl
trigger1 = NumExplod(90000408)
trigger1 = (ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90000007)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90000009))

[State -1, Super Jump Straight Up]
type = ChangeState
value = 10231
triggerall= !AILevel
trigger1 = StateType = S
trigger1 = ctrl
trigger1 = NumExplod(90000408)

;==============================================================================================
;==========================================<GUARDING>==========================================
;==============================================================================================
 
;==============================================================================================
;Here, we override the MUGEN's default guard system, and add our own triggers. This will ensure
;that the player can always block as long as they are holding a direction away from the opponent.
;This block of code also adds "chicken guarding", which is allowing the player to air guard by holding
;not only back, but down-back and up-back.
 
;It is also recommended that you also override the guard states (120, 130, 131, 132, 140, 150, 151, 152, 154, 155)
;with an updated version that uses the EXPLODsive buffering system. A copy of those fixed states
;can be found in this character, and also in the release thread (here:PUT LINK HERE).
;==============================================================================================
 
[State -1, AssertSpecial: NoAirGuard]
type = AssertSpecial
triggerAll = !AILevel 
trigger1 = P2DisT x < -12 && StateType = A
trigger2 = var(10) =1 
trigger3 = vel x >= 0.1
trigger4 =  !NumExplod(90000004) && !NumExplod(90000006) && !NumExplod(90000001) && !NumExplod(90000003) && !NumExplod(90000007) && !NumExplod(90000009)
flag = NoAirGuard
ignoreHitPause = 0
 
[State -1, AssertSpecial: No StandGuard and NoCrouchGuard when landing from jump after switching sides]
type = AssertSpecial
triggerAll = !AILevel 
trigger1 = P2DisT x < -12 && StateType != A
trigger2 =  !NumExplod(90000004) && !NumExplod(90000006) && !NumExplod(90000001) && !NumExplod(90000003) && !NumExplod(90000007) && !NumExplod(90000009)
flag = NoStandGuard
flag2 = NoCrouchGuard
ignoreHitPause = 0
 
[State -1, Stand Blocking]
type = ChangeState
triggerAll = Var(29)=0
triggerAll = !AILevel
triggerAll = InGuardDist
triggerAll = StateType = S
triggerAll = ctrl
trigger1 = (ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90000004)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90000006))
value = 120
 
[State -1, Crouch Blocking]
type = ChangeState
triggerAll = !AILevel
triggerAll = InGuardDist
triggerAll = StateType = C
triggerAll = ctrl
trigger1 = (ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90000001)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90000003))
value = 120
 
[State -1, Air Blocking]
type = ChangeState
triggerAll = !AILevel 
triggerAll = InGuardDist
triggerAll = StateType = A
triggerAll = ctrl
triggerAll = Var(10)=0
triggerAll = (vel x <= 0)
trigger1 = (ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90000004)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90000006))
trigger2 = (ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90000001)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90000003))
trigger3 = (ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90000007)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90000009))
value = 120
 
[State -1, Air Blocking]
type = ChangeState
triggerAll = !AILevel 
triggerAll = InGuardDist
triggerAll = StateType = A
triggerAll = StateNo = 5210 && Time = 14
trigger1 = (ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90000004)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90000006))
trigger2 = (ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90000001)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90000003))
trigger3 = (ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90000007)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90000009))
value = 120
 
;===========================================================================
;===========================================================================
;===========================================================================
;===========================================================================
;===========================================================================

;AI routines
;====================================
;AI ROUTINES
;====================================

[State -1, AI Air Dash]
type = ChangeState
value = Ifelse(enemynear,Movetype=A&&enemynear, vel x>0&&random<150,115,110)
triggerall = AILevel>0 && roundstate = 2 && numenemy && var(10) = 0 && pos Y < -20
triggerall = stateno != 105 && statetype = A && (p2bodydist x>=80) && (p2bodydist y=[-40,155])
triggerall =random < 75*(AIlevel ** 2 / 64.0)
trigger1 = ctrl && time>5

[State -1, AI Fall Recovery]
type=changestate
value= ifelse((pos y>=-20), 5200, 5210)
trigger1= AILevel>0 && numenemy && statetype=A
trigger1= roundstate=2 && alive
trigger1= stateno=5050 && canrecover
trigger1= vel y>=-1 && random < 250*(AIlevel ** 2 / 64.0)

; AI Taunt
[State -1, AI Taunt]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A
triggerall =(p2bodydist x>=100) && P2movetype!=A
triggerall = P2statetype != A
triggerall = life>600 && P2life<300 ;salt to the injury
triggerall = StateNo!=195
trigger1 = ctrl && random < 150*(AIlevel ** 2 / 64.0)
value = 195

; AI Duck
[State -1, AI Duck]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A
triggerall = P2statetype != A
triggerall = stateno != 15
triggerall = enemynear,stateno!=[1455,1459]
;triggerall = Var(51)=0 && Var(52)>0
trigger1 = Ctrl && time>5 && random < (100*(AIlevel ** 2 / 64.0) + 75*(enemynear,movetype=A) - 50*(p2bodydist x<100) + 50*(p2bodydist x>=100) +50*(enemynear,stateno>=1000)- 150*(Var(51)>0))
value = 15

[State -1, AI Run]
type=changestate
value=100
trigger1= AILevel>0 && numenemy
trigger1= roundstate=2 && statetype=S
trigger1= ctrl && (stateno!=[100,106])
trigger1= (enemynear,movetype!=A) && p2bodydist x>=70 && random < 150*(AIlevel ** 2 / 64.0)

[State -1, AI Jump]
type= changestate
value=40
triggerall= AILevel>0 && numenemy
triggerall= roundstate=2 && statetype!=A && ctrl
trigger1 = enemynear,movetype=A && p2bodydist x<160 && enemynear,hitdefattr=SC,AT


[State -1, AI Dash Backward]
type=changestate
value=105
triggerall= AILevel>0 && numenemy
triggerall= roundstate=2 && statetype=S
triggerall= ctrl && (stateno!=[100,106])
trigger1= (enemynear,movetype=A) && backedgedist>=80 && (p2bodydist x=[80,120]) && (enemynear,vel x)
trigger1= random< (50*Var(54)+ ifelse((enemynear,hitdefattr=SC,AT),(150*(AIlevel ** 2 / 64.0)),(50*(AIlevel ** 2 / 64.0))))
trigger2= (p2bodydist x=[0,80]) && backedgebodydist>=80
trigger2= enemynear,stateno=5120 && enemynear,animtime=-3 && random < 500*(AIlevel ** 2 / 64.0)

[State -1, AI Walk Fwd]
type = ChangeState
value = 20
triggerall = AILevel>0 && numenemy && roundstate=2
triggerall = stateno != 20 && stateno != 100
triggerall = statetype = S && ctrl && pos Y = 0
trigger1 = p2bodydist x >= 10 && random < 500*(AIlevel ** 2 / 64.0)
trigger1 = p2bodydist y = [-20,5]
trigger1 = enemynear,movetype != A
trigger2 = (p2bodydist x = [10,110])
trigger2 = p2bodydist y = [-20,5]
trigger2 = random < 700*(AIlevel ** 2 / 64.0)
trigger2 = (enemy,facing = facing)
trigger3 = p2bodydist x >= 10 && random < 500*(AIlevel ** 2 / 64.0)
trigger3 = p2bodydist y = [-20,5]
trigger3 = enemynear,movetype != A
trigger3 =(enemy,stateno = [120,155]) || moveguarded

[State -1, AI Walk Fwd Stop]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2
triggerall = stateno = 20
triggerall = statetype = S
triggerall = time>5
trigger1 = P2movetype = A && (enemy,facing != facing)
trigger2 = p2bodydist x < 4
value = 0
ctrl = 1

[State -1, AI Guard]
type= changestate
value=120
triggerall= AILevel>0 && numenemy
triggerall= roundstate=2 && inguarddist
triggerall= statetype!=A || p2statetype=A
triggerall= ctrl && (stateno!=[120,155])&& !(enemynear,ctrl)
trigger1= !(enemynear,hitdefattr=SCA,AT) && (enemynear,time<120)
trigger2= random < 64*(AIlevel ** 2 / 64.0) && (enemynear,hitdefattr=SCA,NA)
trigger3= random < 128*(AIlevel ** 2 / 64.0) && (enemynear,hitdefattr=SCA,SA)
trigger4= random < 192*(AIlevel ** 2 / 64.0) && (enemynear,hitdefattr=SCA,HA)

[State -1, AI Guard fix]
Type=Assertspecial
Triggerall=StateNo!=[120,155]
Trigger1=AILevel>0
flag=noairguard
flag2=nocrouchguard
flag3=nostandguard

[State -1, AI Super Jump]
type = ChangeState
value = 10231
triggerall = AILevel>0 && numenemy && statetype != A && roundstate = 2 && (p2bodydist y = [-320,-40])
triggerall = stateno != 100 && pos y = 0 && (enemynear,Statetype=A)
trigger1 = ctrl && enemy,vel y < -1 && (p2bodydist x = [ 10, 70]) && enemynear,movetype != A && random < 100*(AIlevel ** 2 / 64.0)
trigger2 = ctrl && enemy,vel y < -1 && random < 50*(AIlevel ** 2 / 64.0)
trigger2 = enemynear,movetype = H && (enemynear,stateno=5040)
trigger2 = p2bodydist x <= 50 && random < 150*(AIlevel ** 2 / 64.0)
trigger3 = ctrl && enemynear,MoveType != H && P2BodyDist Y < -90&& enemy,vel y <= 0

; Super Jump
;This state executes only after performing the air launcher or f+MKx3
[State -1, AI Jump Launcher]
type = ChangeState
triggerall = AILevel>0 && numenemy && statetype != A && roundstate = 2 && (p2bodydist y = [-320,-40])
triggerall = stateno != 100 && pos y = 0 && (enemynear,Statetype=A)
trigger1 = (StateNo = 1453) && animelemtime(5)>0 ;&& MoveHit
trigger2 = (StateNo = 243) && animelemtime(25)>0 ;&& MoveHit
value = 10230


[State -1, AI Zetto Counter]
type=changestate
value=750
triggerall = Cond(!NumHelper(4750),power>=1000,power>=0)
trigger1= AILevel>0 && numenemy && roundstate=2 && statetype!=A
trigger1= stateno=150 || stateno=152
trigger1= random < 25*(AIlevel ** 2 / 64.0)
trigger1= (p2bodydist x=[0,50]) && (life<.5*lifemax)

[State -1, AI Air Zetto Counter]
type=changestate
value=760
triggerall = Cond(!NumHelper(4750),power>=1000,power>=0)
trigger1= AILevel>0 && numenemy && roundstate=2 && statetype=A
trigger1= stateno=154
trigger1= random < 25*(AIlevel ** 2 / 64.0)
trigger1= (p2bodydist x=[0,50]) && (life<.5*lifemax)

[State -1, AI Focus Attack]
type = ChangeState
triggerall= AILevel>0 && numenemy && roundstate = 2 && (stateno !=[1300,1302]) && stateno != 106 && statetype = S && (enemynear, Movetype != A)
triggerall= (p2bodydist x = [45,135]) && (p2bodydist y = [ -70, 0]) && (p2statetype != L) && (enemynear, vel y >= 0)
triggerall= (enemynear, const(size.head.pos.y) <= -40) || (enemynear, statetype != A)
trigger1 = ctrl && random<25*(AIlevel ** 2 / 64.0)
value = 1300

[State -1, AI Power Charge]
type=changestate
triggerall= AILevel>0 && numenemy && roundstate=2 && statetype!=A
triggerall= power<const(data.power) && enemynear,Movetype!=A && !(enemynear,ctrl)
triggerall=  power < const(data.power) && power < powermax
triggerall= !inguarddist && random<900 && p2bodydist x>=120;*((powermax-power)/powermax) ;random < 300*(AIlevel ** 2 / 64.0)
triggerall = stateno != [900,901]
triggerall= ctrl && time>5
trigger1=(enemynear,Movetype=H||enemynear,statetype=L)
trigger2=enemynear,vel x<0
trigger3=enemynear,stateno=[120,155]
trigger4=enemynear,Movetype=I
value=900

; AI Confidence mode
[State -1, AI Confidence mode]
type = ChangeState
triggerall = TeamMode != Simul
triggerall = enemyNear,TeamMode != Simul
triggerall = (enemy,Name != "Saibamen Z2")
triggerall = AILevel>0 && numenemy && roundstate = 2 && (statetype != A)
triggerall = Var(51) =0
triggerall = stateno != [910,911]
triggerall = power >= 2000 && stateno != 4000
trigger1 = ctrl && time>5 && random<(150*((AIlevel**2)/64.0) + 50*(enemynear,movetype=H) + 50*(p2statetype = L) + 50*(p2bodydist x>=120) - 50*(enemynear,Movetype=A))
trigger2 = stateno=900 && time>5 && random<(150*((AIlevel**2)/64.0) + 50*(enemynear,movetype=H) + 50*(p2statetype = L) + 50*(p2bodydist x>=120) - 50*(enemynear,Movetype=A))
value = 2700


; AI Confidence mode
[State -1, AI Confidence mode]
type = ChangeState
triggerall = TeamMode != Simul
triggerall = enemyNear,TeamMode != Simul
triggerall = (enemy,Name != "Saibamen Z2")
triggerall = AILevel>0 && numenemy && roundstate = 2 && (statetype != A)
triggerall = Var(51) >0
triggerall = Var(53) != 1
triggerall = stateno != [910,911]
trigger1 = ctrl && time>5 && random<(50*((AIlevel**2)/64.0) + (Var(52)/10.0) + 10*(enemynear,movetype=H) + 10*(p2statetype = L) + 10*(p2bodydist x>=120) - 50*(enemynear,Movetype=A))
trigger2 = stateno=900 && time>5 && random<(50*((AIlevel**2)/64.0) + (Var(52)/10.0) + 10*(enemynear,movetype=H) + 10*(p2statetype = L) + 10*(p2bodydist x>=120) - 50*(enemynear,Movetype=A))
value = 3900

[State -1, AI FW Throw]
type = ChangeState
value = 800
triggerall = AILevel>0
triggerall = roundstate=2 && statetype!=A && enemynear,statetype!=L && (enemynear,stateno!=[5120,5201])
triggerall = enemynear,movetype!=H && enemynear,statetype!=A && enemynear,Hitover && (p2bodydist x =[0,30])
triggerall = BackEdgeDist > 100
triggerall = (ctrl && time>5)||stateno=100
trigger1 = random<(100*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger2 = enemynear,stateno=[120,155]
trigger2 = random<(400*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger3 = stateno=100
trigger4=(p2bodydist x=[0,30]) && random<(100*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger5=(p2stateno=[120,155]) && (p2bodydist x=[0,30]) && random<(400*(AIlevel ** 2 / 64.0) - 50*Var(54))

[State -1, AI BW Throw]
type = ChangeState
value = 810
triggerall = AILevel>0
triggerall = roundstate=2 && statetype!=A && enemynear,statetype!=L && (enemynear,stateno!=[5120,5201])
triggerall = enemynear,movetype!=H && enemynear,statetype!=A && enemynear,Hitover && (p2bodydist x =[0,30])
triggerall = BackEdgeDist <= 100
triggerall = (ctrl && time>5)||stateno=100
trigger1 = random<(100*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger2 = enemynear,stateno=[120,155]
trigger2 = random<(400*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger3 = stateno=100
trigger4=(p2bodydist x=[0,30]) && random<(100*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger5=(p2stateno=[120,155]) && (p2bodydist x=[0,30]) && random<(400*(AIlevel ** 2 / 64.0) - 50*Var(54))

;AI Solar Flare x 100
[State -1, AI Solar Flare x 100]
type = Changestate
triggerall = AILevel>0 && numenemy && roundstate=2
triggerall = statetype != A && !WinKo 
triggerall = Cond((Var(51)>0 && Var(53) = 0),Power >= 2000,power >= 3000 )
trigger1 = ctrl && time>5 && random<(350*((AIlevel**2)/64.0) + 50*(p2bodydist x<100) + 50*(enemynear,movetype=H) + 50*(p2statetype = L && enemynear,time>5) - 50*Var(54))
trigger2 = MoveContact
trigger2 = StateNo = [200,499]
trigger2 = StateNo != 270
trigger2 = movehit && random < (200*(AIlevel ** 2 / 64.0) - 50*Var(54))
value = 3400

; AI Turtle Flip
[State -1, AI Turtle Flip]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A
triggerall= (enemy,stateno!=[120,155]) && (enemy,stateno!=[5100,5120]) && (enemynear,statetype!=L)
triggerall= (p2bodydist x=[0,100]) 
trigger1 = ctrl && time>5 && random < (150*(AIlevel ** 2 / 64.0) + 200*(enemynear,movetype=I) + 200*(enemynear,statetype=C) - 50*Var(54))
trigger2 = StateNo = [200,499]
trigger2 = StateNo != 270
trigger2 = movehit && random < (200*(AIlevel ** 2 / 64.0) - 50*Var(54))
value = Cond(power>=500&&random%10,1050,Cond(random<650,1000,1060))

;AI Solar Flare
[State -1, AI Solar Flare]
type = ChangeState
triggerall = AILevel>0
triggerall = roundstate=2 && statetype!=A && (enemynear,stateno!=[5120,5201]);&& enemynear,statetype!=L
triggerall = (enemy,stateno!=[120,155]) && (p2bodydist x =[0,80])
triggerall = enemynear,stateno!=[1455,1459]
trigger1 = ctrl && time>5
trigger1 = random<(300*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger2 = ctrl && time>5
trigger2 = enemynear,stateno=[120,155]
trigger2 = random<(400*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger3 = StateNo = [200,499]
trigger3 = StateNo != 270
trigger3 = movehit && random < (200*(AIlevel ** 2 / 64.0) - 50*Var(54))
value = 1450

;AI Air Jet
[State -1, AI Air Jet]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType = A
triggerall= (enemy,stateno!=[120,155]) && (enemy,stateno!=[5100,5120]) && (enemynear,statetype!=L)
triggerall= (p2bodydist x=[50,220]) && (p2bodydist y=[50,-110]) && (enemynear,vel x=[0,2))
trigger1 = ctrl && time>5 && random < (150*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger2 = StateNo = [600,699]
trigger2 = movehit && random < (400*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger3 = StateNo = [1101,1102]
trigger3 = Var(51)>0 && Var(53)=0
trigger3 = movehit && random < (400*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger4 = StateNo = 1408
trigger4 = AnimElemTime(7)>0
trigger4 = movehit && random < (400*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger5 = StateNo = 270
trigger5 = movehit && random < (400*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger6 = StateNo = 271
trigger6 = movehit && random < (400*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger7 = StateNo = 1050
trigger7 = Time >= 14
trigger7 = movehit && random < (400*(AIlevel ** 2 / 64.0) - 50*Var(54))
value = Cond(power>=500&&random%10,1135,Cond(random<650,1130,1134))

;AI Shoulder Crusher
[State -1, AI Shoulder Crusher]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A
triggerall= (enemy,stateno!=[120,155]) && (enemy,stateno!=[5100,5120]) && (enemynear,statetype!=L)
triggerall= (p2bodydist x=[50,220]) && (p2bodydist y=[-10,150]) && (enemynear,vel x=[0,2))
trigger1 = ctrl && time>5 && random < (150*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger2 = StateNo = [200,499]
trigger2 = StateNo != 270
trigger2 = movehit && random < (200*(AIlevel ** 2 / 64.0) - 50*Var(54))
value = Cond(power>=500&&random%10,1105,Cond(random<650,1100,1120))

;AI Whoa!
[State -1, AI Whoa!]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2
triggerall= (enemy,stateno!=[120,155])&&(enemy,stateno!=[5100,5120]) 
triggerall = p2bodydist x>=100
triggerall = StateType != A  && !WinKo
triggerall = !NumExplod(1065)
triggerall = Var(51) >0 && Var(53)=0
trigger1 = ctrl && time>5 && random < (150*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger2 = StateNo = [200,499]
trigger2 = StateNo != 270
trigger2 = movehit && random < (100*(AIlevel ** 2 / 64.0) - 50*Var(54))
value = 1400

;AI Ki Blast Up
[State -1, AI Ki Blast Up]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A
triggerall= (enemy,stateno!=[120,155])&&(enemy,stateno!=[5100,5120]) 
triggerall = p2bodydist x>=100
trigger1 = ctrl && time>5 && random < (150*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger2 = StateNo = [200,499]
trigger2 = StateNo != 270
trigger2 = movehit && random < (100*(AIlevel ** 2 / 64.0) - 50*Var(54))
value = Cond(power>=500&&random%10,1265,Cond(random<650,1202,1201))

;AI EX Air Rocket Man
[State -1, AI EX Air Rocket Man]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && statetype = A
triggerall = (p2bodydist x = [-20,40]) && (p2bodydist y = [0,100]) && p2statetype != L
triggerall = StateType = A  && !WinKo
triggerall = Power>=500
triggerall = Pos Y >=-300
triggerall =  NumExplod(1502)<1 || (NumExplod(1502)<2 && Var(51)>0 && Var(53)=0)
trigger1 = ctrl && time>3 && random < (150*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger2 = StateNo = [600,699]
trigger2 = movehit && random < (400*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger3 = StateNo = 1408
trigger3 = AnimElemTime(7)>0
trigger3 = movehit && random < (400*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger4 = StateNo = 270
trigger4 = movehit && random < (400*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger5 = StateNo = 271
trigger5 = movehit && random < (400*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger6 = StateNo = 1050
trigger6 = Time >= 14
trigger6 = movehit && random < (400*(AIlevel ** 2 / 64.0) - 50*Var(54))
value = 1504

;AI Air Rocket Man
[State -1, AI Air Rocket Man]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && statetype = A
triggerall = (p2bodydist x = [-20,40]) && (p2bodydist y = [0,100]) && p2statetype != L
triggerall = StateType = A  && !WinKo
triggerall = Pos Y >=-300
trigger1 = ctrl && time>3 && random < (150*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger2 = StateNo = [600,699]
trigger2 = movehit && random < (400*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger3 = StateNo = 1408
trigger3 = AnimElemTime(7)>0
trigger3 = movehit && random < (400*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger4 = StateNo = 270
trigger4 = movehit && random < (400*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger5 = StateNo = 271
trigger5 = movehit && random < (400*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger6 = StateNo = 1050
trigger6 = Time >= 14
trigger6 = movehit && random < (400*(AIlevel ** 2 / 64.0) - 50*Var(54))
value = Cond((NumExplod(1501)<1 || (NumExplod(1501)<2 && Var(51)>0 && Var(53)=0)),1501,1503)

;AI Stand Light Punch
[State -1, AI Stand Light Punch]
type = ChangeState
triggerall = !IsHelper
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A
triggerall =(p2bodydist x = [0, 30])&&P2statetype != C && P2statetype != L
trigger1 = ctrl && time>5 && random < (350*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger2 = ((stateno = [100,101]) && Var(51)>0 && Var(53)=0) && random < (250*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger3 = ctrl&&(enemynear,ctrl) && random < (600*(AIlevel ** 2 / 64.0) - 50*Var(54))
value = 200

;AI Stand Medium Punch
[State -1, AI Stand Medium Punch]
type = ChangeState
triggerall = !IsHelper
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A
triggerall =(p2bodydist x = [-10, 40])&&P2statetype != C && P2statetype != L
trigger1 = ctrl && time>5 && (random < 150*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger2 = (stateno = 200) || (stateno = 230)
trigger2 = movehit && random < (600*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger3 = (stateno = 400) || (stateno = 430)
trigger3 = movehit && random < (600*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger4 = StateNo = 101 || (StateNo = 100 && Var(51)>0 && Var(53)=0)
trigger4 = random < (250*(AIlevel ** 2 / 64.0) - 50*Var(54))
value = 210

;AI Stand Strong Punch
[State -1, AI Stand Strong Punch]
type = ChangeState
triggerall = !IsHelper
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A
triggerall =(p2bodydist x = [0, 50])&&P2statetype != C && P2statetype != L
trigger1 = ctrl && time>5 && random < (150*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger2 = (stateno = 200) || (StateNo = 210 && AnimElemTime(8)>=1) || (stateno = 230) || (stateno = 240)
trigger2 = movehit && random < (600*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger3 = (stateno = 400) || (stateno = 410) || (stateno = 430) || (stateno = 440)
trigger3 = movehit && random < (600*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger4 = StateNo = 101 || (StateNo = 100 && Var(51)>0 && Var(53)=0)
trigger4 = random < (250*(AIlevel ** 2 / 64.0) - 50*Var(54))
value = 220


;AI Stand Light Kick
[State -1, AI Stand Light Kick]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A
triggerall =(p2bodydist x = [10, 35])&&P2statetype != C && P2statetype != L
triggerall = stateno != 230
trigger1 = ctrl && time>5 && random < (150*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger2 = StateNo = 101 || (StateNo = 100 && Var(51)>0 && Var(53)=0)
trigger2 = random < (250*(AIlevel ** 2 / 64.0) - 50*Var(54))
value = 230

;AI Stand Medium Kick
[State -1, AI Stand Medium Kick]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A
triggerall =(p2bodydist x = [0, 40])&&P2statetype != C && P2statetype != L
triggerall = stateno != 240
trigger1 = ctrl && time>5 && random < (150*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger2 = (stateno = 200) || (stateno = 230)
trigger2 = movehit && random < (600*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger3 = (stateno = 400) || (stateno = 430)
trigger3 = movehit && random < (600*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger4 = StateNo = 101 || (StateNo = 100 && Var(51)>0 && Var(53)=0)
trigger4 = random < (250*(AIlevel ** 2 / 64.0) - 50*Var(54))
value = 240

;AI Stand Strong Kick
[State -1, AI Standing Strong Kick]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A
triggerall =(p2bodydist x = [10, 55])&&P2statetype != C && P2statetype != L
trigger1 = ctrl && time>5 && random < (150*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger2 = (stateno = 200) || (stateno = 210)
trigger2 = movehit && random < (600*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger3 = (stateno = 230) || (stateno = 240)
trigger3 = movehit && random < (600*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger4 = (stateno = 400) || (stateno = 410) || (stateno = 430) || (stateno = 440)
trigger4 = movehit && random < (600*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger5 = StateNo = 101 || (StateNo = 100 && Var(51)>0 && Var(53)=0)
trigger5 = random < (250*(AIlevel ** 2 / 64.0) - 50*Var(54))
value = 250

;AI Crouch Light Punch
[State -1, AI Crouch Light Punch]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType = C
triggerall = (p2bodydist x = [2,40]) && (p2bodydist y = [-80,-40]) && P2statetype != A && P2statetype != L
trigger1 = ctrl && time>5 && random < (250*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger2 = (stateno = 200) || (stateno = 230) 
trigger2 = movehit && random < (600*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger3 = StateNo = 101 || (StateNo = 100 && Var(51)>0 && Var(53)=0)
trigger3 = random < (100*(AIlevel ** 2 / 64.0) - 50*Var(54))
value = 400

;AI Crouch Medium Punch
[State -1, AI Crouch Medium Punch]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType = C
triggerall = (p2bodydist x = [-5, 65]) && (p2bodydist y = [ -80, -40]) && P2statetype != A && P2statetype != L
trigger1 = ctrl && time>5 && random < (250*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger2 = StateNo = 101 || (StateNo = 100 && Var(51)>0 && Var(53)=0)
trigger2 = random < (100*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger3 = (stateno = 400) || (stateno = 430)
trigger3 = movehit && random < (600*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger4 = (stateno = 200) || (stateno = 230)
trigger4 = movehit && random < (600*(AIlevel ** 2 / 64.0) - 50*Var(54))
value = 410

;AI Crouch Strong Punch
[State -1, AI Crouch Strong Punch]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType = C
triggerall = (p2bodydist x = [-2, 38]) &&(p2bodydist y = [-50,25]) && P2statetype != A && P2statetype != L
trigger1 = ctrl && time>5 && random < (250*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger2 = stateno = 100 || stateno = 101
trigger2 = random < (100*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger3 = (stateno = 400) || (stateno = 410) || (stateno = 430) || (stateno = 440) 
trigger3 = movehit && random < (600*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger4 = (stateno = 200) || (stateno = 210) || (stateno = 230) || (stateno = 240)
trigger4 = movehit && random < (600*(AIlevel ** 2 / 64.0) - 50*Var(54))
value = 420

;AI Crouch Light Kick
[State -1, AI Crouch Light Kick]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType = C
triggerall = (p2bodydist x = [-2, 18]) &&(p2bodydist y = [-50,25]) && P2statetype != A && P2statetype != L
trigger1 = ctrl && time>5 && random < (250*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger2 = StateNo = 101 || (StateNo = 100 && Var(51)>0 && Var(53)=0)
trigger2 = random < (100*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger3 = (stateno = 200) || (stateno = 230) 
trigger3 = movehit && random < (600*(AIlevel ** 2 / 64.0) - 50*Var(54))
value = 430

;AI Crouch Medium Kick
[State -1, AI Crouch Medium Kick]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType = C
triggerall = (p2bodydist x = [-2, 28]) &&(p2bodydist y = [-50,25]) && P2statetype != A && P2statetype != L
trigger1 = ctrl && time>5 && random < (250*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger2 = StateNo = 101 || (StateNo = 100 && Var(51)>0 && Var(53)=0)
trigger2 = random < (100*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger3 = (stateno = 400) || (stateno = 430)  
trigger3 = movehit && random < (600*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger4 = (stateno = 200) || (stateno = 230)  
trigger4 = movehit && random < (600*(AIlevel ** 2 / 64.0) - 50*Var(54))
value = 440

;AI Crouch Strong Kick
[State -1, AI Crouch Strong Kick]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType = C
triggerall = (p2bodydist x = [-2, 38]) &&(p2bodydist y = [-50,25]) && P2statetype != A && P2statetype != L
trigger1 = ctrl && time>5 && random < (250*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger2 = StateNo = 101 || (StateNo = 100 && Var(51)>0 && Var(53)=0)
trigger2 = random < (100*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger3 = (stateno = 400) || (stateno = 410) || (stateno = 430) || (stateno = 440) 
trigger3 = movehit && random < (600*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger4 = (stateno = 200) || (stateno = 210) || (stateno = 230) || (stateno = 240)  
trigger4 = movehit && random < (600*(AIlevel ** 2 / 64.0) - 50*Var(54))
value = 450

;AI Jump Light Punch
[State -1, AI Jump Light Punch]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && statetype = A && stateno != 600
triggerall = (p2bodydist x = [2,30]) && (p2bodydist y = [-10,40]) && p2statetype != L
trigger1 = ctrl && time>3 && random < (600*(AIlevel ** 2 / 64.0) - 50*Var(54))
value = 600

;AI Jump Medium Punch
[State -1, AI Jump Medium Punch]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && statetype = A
triggerall = (p2bodydist x = [-5,40]) && (p2bodydist y = [-10,40]) && p2statetype != L
trigger1 = ctrl && time>3 && random < (400*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger2 = (stateno = 600) || (stateno = 630)
trigger2 = movehit && random < (600*(AIlevel ** 2 / 64.0) - 50*Var(54))
value = 610

;AI Jump Strong Punch
[State -1, AI Jump Strong Punch]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && statetype = A
triggerall = (p2bodydist x = [10,60]) && (p2bodydist y = [-30,40]) && p2statetype != L
trigger1 = ctrl && time>3 && random < (400*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger2 = (StateNo = 600) || (StateNo = 630) || (StateNo = 610) || (StateNo = 640)
trigger2 = movehit && random < (600*(AIlevel ** 2 / 64.0) - 50*Var(54))
value = 620

;AI Jump Light Kick
[State -1, AI Jump Light Kick]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && statetype = A && stateno != 630
triggerall = (p2bodydist x = [-5,25]) && (p2bodydist y = [-10,40]) && p2statetype != L
trigger1 = ctrl && time>3 && random < (300*(AIlevel ** 2 / 64.0) - 50*Var(54))
value = 630

;AI Jump Medium Kick
[State -1, AI Jump Medium Kick]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && statetype = A
triggerall = (p2bodydist x = [-60,60]) && (p2bodydist y = [-30,60]) && p2statetype != L
triggerall = (stateno!=640);
trigger1 = ctrl && time>3 && random < (600*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger2 = (stateno = 600) || (stateno = 630)
trigger2 = movehit && random < (600*(AIlevel ** 2 / 64.0) - 50*Var(54))
value = 640

;AI Jump Strong Kick
[State -1, AI Jump Strong Kick]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && statetype = A
triggerall = (p2bodydist x = [50,100]) && (p2bodydist y = [-60,50]) && p2statetype != L
trigger1 = ctrl && time>3 && random < (600*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger2 =  (StateNo = 600) || (StateNo = 630) || (StateNo = 610) || (StateNo = 640)
trigger2 = movehit && random < (600*(AIlevel ** 2 / 64.0) - 50*Var(54))
value = 650

; AI KHH
[State -1, AI KHH]
type = Changestate
triggerall= AILevel>0 && numenemy && roundstate = 2
triggerall= (enemy,stateno!=[5100,5120])&&(enemynear,statetype!=L)
triggerall = statetype = A  && !WinKo
triggerall = p2bodydist x>100
triggerall = power >= 2000 && stateno != 2400
trigger1 = ctrl && time>5 && random<(50*((AIlevel**2)/64.0) +50*(p2bodydist y=[-90,5]) + 50*(enemynear,movetype=H) + 50*(p2statetype = L && enemynear,time>5) - 50*Var(54))
trigger2 = StateNo = [600,699]
trigger2 = movehit && random < (200*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger3 = StateNo = 1000
trigger3 = movehit && random < (200*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger4 = StateNo = 1050
trigger4 = movehit && random < (200*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger5 = Stateno = [1100,1105]
trigger5 = movehit && random < (200*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger6 = StateNo = 1408
trigger6 = AnimElemTime(7)>0
trigger6 = movehit && random < (200*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger7 = StateNo = 270
trigger7 = MoveContact
trigger7 = movehit && random < (200*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger8 = StateNo = 271
trigger80 = movehit && random < (200*(AIlevel ** 2 / 64.0) - 50*Var(54))
trigger9 = StateNo = 1050
trigger9 = Time >= 14
trigger9 = movehit && random < (200*(AIlevel ** 2 / 64.0) - 50*Var(54))
value = 2400


;AI Scatter Shot
[State -1, AI Scatter Shot]
type = Changestate
triggerall= AILevel>0 && numenemy && roundstate = 2
triggerall = (p2stateno != [120, 155]) && (p2bodydist y =[-150,0])
triggerall = stateno != 3300
triggerall = statetype != A && !WinKo 
triggerall = power >= 2000 
trigger1 = ctrl && time>5 && random<(300*((AIlevel**2)/64.0) + 50*(p2bodydist x>80) + 100*(enemynear,stateno=[1455,1459]) + 50*(enemynear,movetype=H) + 50*(p2statetype = L) + 50*(enemynear,movetype=A && enemynear,time>10) - 50*Var(54))
trigger2 = StateNo = [200,499]
trigger2 = StateNo != 270
trigger2 = movehit && random < (300*(AIlevel ** 2 / 64.0) - 50*Var(54))
value = 3300

;AI Tsuihidan
[State -1, AI Tsuihidan]
type = Changestate
triggerall= AILevel>0 && numenemy && roundstate = 2
triggerall = (p2stateno != [120, 155]) && (p2bodydist y =[-150,0])
triggerall = stateno != 3200
triggerall = statetype != A && !WinKo 
triggerall = power >= 1000 
trigger1 = ctrl && time>5 && random<(250*((AIlevel**2)/64.0) + 50*(p2bodydist x>80) + 100*(enemynear,stateno=[1455,1459]) + 50*(enemynear,movetype=H) + 50*(p2statetype = L) + 50*(enemynear,movetype=A && enemynear,time>10) - 50*Var(54))
trigger2 = StateNo = [200,499]
trigger2 = StateNo != 270
trigger2 = movehit && random < (300*(AIlevel ** 2 / 64.0) - 50*Var(54))
value = 3200

;AI Keinzan
[State -1, AI Keinzan]
type = Changestate
triggerall= AILevel>0 && numenemy && roundstate = 2
triggerall = (p2stateno != [120, 155]) && (p2bodydist y =[-150,0])
triggerall = stateno != 3000
triggerall = statetype != A && !WinKo 
triggerall = power >= 1000 
trigger1 = ctrl && time>5 && random<(250*((AIlevel**2)/64.0) + 50*(p2bodydist x>80) + 100*(enemynear,stateno=[1455,1459]) + 50*(enemynear,movetype=H) + 50*(p2statetype = L) + 50*(enemynear,movetype=A && enemynear,time>10) - 50*Var(54))
trigger2 = StateNo = [200,499]
trigger2 = StateNo != 270
trigger2 = movehit && random < (300*(AIlevel ** 2 / 64.0) - 50*Var(54))
value = 3000

;AI Orin Combo
[State -1, AI Orin Combo]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A
triggerall = (p2stateno != [120, 155]) && p2statetype != L && (p2bodydist x = [-5,50]) && (p2bodydist y =[-105,5]) && (enemynear, statetype != C)
triggerall = power >= 1000 
trigger1 = ctrl && time>5 && random<(350*((AIlevel**2)/64.0) + 200*(enemynear,statetype=A) + 100*(enemynear,stateno=[1455,1459]) - 50*Var(54))
trigger2 = StateNo = [200,499]
trigger2 = StateNo != 270
trigger2 = movehit && random < (200*(AIlevel ** 2 / 64.0) - 50*Var(54))
value = 3100
