
[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

[Command]
name = "s"
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+y
time = 1

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

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

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

[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 complciated 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
triggerAll = !AILevel 
trigger1 = Helper(90000005), command = "down" && Helper(90000005), command != "back" && Helper(90000005), command != "up" && 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
triggerAll = !AILevel 
trigger1 = Helper(90000005), command != "down" && Helper(90000005), command != "holddown"
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 = 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
triggerAll = !AILevel 
trigger1 = Helper(90000005), command = "dfwd" && Helper(90000005), command != "back" && Helper(90000005), command != "up"
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
triggerAll = !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
triggerAll = !AILevel 
trigger1 = Helper(90000005), command = "down" && Helper(90000005), command != "back" && Helper(90000005), command != "up" && 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
triggerAll = !AILevel 
trigger1 = Helper(90000005), command != "down" && Helper(90000005), command != "holddown"
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 = 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
triggerAll = !AILevel 
trigger1 = Helper(90000005), command = "dback" && Helper(90000005), command != "fwd" && Helper(90000005), command != "up"
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
triggerAll = !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 = Helper(90000005), command = "down" && Helper(90000005), command != "fwd" && Helper(90000005), command != "up" && Helper(90000005), command != "back"
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 = Helper(90000005), command = "dfwd" && Helper(90000005), command != "back" && Helper(90000005), command != "up"
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 = Helper(90000005), command = "down" && Helper(90000005), command != "fwd" && Helper(90000005), command != "up" && Helper(90000005), command != "back"
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 = Helper(90000005), command = "dback" && Helper(90000005), command != "fwd" && Helper(90000005), command != "up"
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

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

;==============================================================================================
;This is very, very similar to the preceding command, but it is a distinct command with its own
;quirks! This is typically used for Terry's Power Geyser super, among a few other moves. What
;makes this different from the QCF, HCB/QCB, HCF command is that although this command is officially
;referred to in move lists as "QCF, DF, B/QCB, DB, F", in KOF games, this command can (usually) skip
;straight from the starting QCF/QCB and proceed directly to the final input of the command (the
;command would here be rendered as "QCF, B"/"QCB, F"). But this can sometimes be weird: in KOF 2002
;this can only be done if  that final input in the QCF/QCB part of the command is held for at least
;two ticks (KOF 2002 is the first game in the series where the player only needs to enter an individual
;input for only one frame and still complete a command; previous games required the inputs to be held
;for at least two). In the Fatal Fury series, however, generally this either uses a motion that is
;actually "QCF, DF, B / QCB, DB, F" motion, or sometimes even a QCF, HCB/QCB, HCF motion. Point is,
;there's a ton of variance here!

;As with the previous command, we have opted to modify this for the default EXPLODsive Buffering system,
;in order to keep it relatively simple and tried to change the manner in which the command worked into
;something that made more sense (to us, at least). We have it set up so that this command can skip straight
;from the starting QCF/QCB and proceed directly to the final input of the command (the command would here
;be rendered as "QCF, B"/"QCB, F"). It also can be performed using a QCF, HCB/QCB, HCF motion, with
;the additional quirk that the user can proceed immediately to the final input of the command no matter
;where they are in the half circle motion. So, for example, the user could perform QCB, DB, D, F, and
;still get the move. What this ends up looking like translated to MUGEN code is that, for instance, the
;explod representing QCF, DF, B: DB is allowed to be created if an explod exists representing "D", or "DF",
;or even "F".

;As with the the QCF, HCB / QCB, HCF command, this can be made to accurate to the source game(s)
;by removing some or all of the non-diagonal (and also the "down") explods.
;==============================================================================================

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

[State -1, D, DR, R, DR, L: Down-Right]
type = Explod
triggerAll = NumExplod(90032406)
triggerAll = NumHelper(90000005) && !IsHelper
triggerAll = !AILevel 
trigger1 = Helper(90000005), command = "dfwd" && Helper(90000005), command != "back" && Helper(90000005), command != "up"
anim = 1
ID = 90032403
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

[State -1, D, DR, R, DR, L: Down]
type = Explod
;the Down explod will be created if either (or both) the Right or Down-Right explods exist
triggerAll = NumExplod(90032406) || NumExplod(90032403)
triggerAll = NumHelper(90000005) && !IsHelper
triggerAll = !AILevel 
trigger1 = Helper(90000005), command = "down" && Helper(90000005), command != "fwd" && Helper(90000005), command != "up" && Helper(90000005), command != "back"
anim = 1
ID = 90032402
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

[State -1, D, DR, R, DR, L: Down-Left]
type = Explod
;the Down-Left explod will be created if the Right, Down-Right, or Down explods exist
triggerAll = NumExplod(90032406) || NumExplod(90032403) || NumExplod(90032402)
triggerAll = NumHelper(90000005) && !IsHelper
triggerAll = !AILevel 
trigger1 = Helper(90000005), command = "dback" && Helper(90000005), command != "fwd" && Helper(90000005), command != "up"
anim = 1
ID = 90032401
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

[State -1, D, DR, R, DR, L: Left]
type = Explod
;the Left explod will be created if the Right, Down-Right, Down, or Down-Left explods exist
triggerAll = NumExplod(90032406) || NumExplod(90032403) || NumExplod(90032402) || NumExplod(90032401)
triggerAll = NumHelper(90000005) && !IsHelper
triggerAll = !AILevel 
trigger1 = Helper(90000005), command = "back" && Helper(90000005), command != "fwd" && Helper(90000005), command != "up" && Helper(90000005), command != "down"
anim = 1
ID = 90032404
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, DOWN-LEFT, RIGHT>============================
[State -1, D, DL, L, DL, R: Left]
type = Explod
triggerAll = NumExplod(90010101)
triggerAll = NumHelper(90000005) && !IsHelper
triggerAll = !AILevel 
trigger1 = Helper(90000005), command = "back" && Helper(90000005), command != "fwd" && Helper(90000005), command != "up" && Helper(90000005), command != "down"
anim = 1
ID = 90032504
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

[State -1, D, DL, L, DL, R: Down-Left]
type = Explod
triggerAll = NumExplod(90032504)
triggerAll = NumHelper(90000005) && !IsHelper
triggerAll = !AILevel 
trigger1 = Helper(90000005), command = "dback" && Helper(90000005), command != "fwd" && Helper(90000005), command != "up"
anim = 1
ID = 90032501
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

[State -1, D, DL, L, DL, R: Down]
type = Explod
triggerAll = NumExplod(90032504) || NumExplod(90032501)
triggerAll = NumHelper(90000005) && !IsHelper
triggerAll = !AILevel 
trigger1 = Helper(90000005), command = "down" && Helper(90000005), command != "fwd" && Helper(90000005), command != "up" && Helper(90000005), command != "back"
anim = 1
ID = 90032502
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

[State -1, D, DL, L, DL, R: Down-Right]
type = Explod
triggerAll = NumExplod(90032504) || NumExplod(90032501) || NumExplod(90032502)
triggerAll = NumHelper(90000005) && !IsHelper
triggerAll = !AILevel 
trigger1 = Helper(90000005), command = "dfwd" && Helper(90000005), command != "back" && Helper(90000005), command != "up"
anim = 1
ID = 90032503
removeTime = 10
pauseMoveTime = 10
superMoveTime = 10
ignoreHitPause = 1

[State -1, D, DL, L, DL, R: Right]
type = Explod
triggerAll = NumExplod(90032504) || NumExplod(90032501) || NumExplod(90032502) || NumExplod(90032503)
triggerAll = NumHelper(90000005) && !IsHelper
triggerAll = !AILevel 
trigger1 = Helper(90000005), command = "fwd" && Helper(90000005), command != "back" && Helper(90000005), command != "up" && Helper(90000005), command != "down"
anim = 1
ID = 90032506
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 = NumExplod(90010003)
triggerAll = NumHelper(90000005) && !IsHelper
triggerAll = !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
triggerAll = !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
triggerAll = !AILevel 
trigger1 = Helper(90000005), command = "down" && Helper(90000005), command != "back" && Helper(90000005), command != "up" && 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
triggerAll = !AILevel 
trigger1 = Helper(90000005), command = "dfwd" && Helper(90000005), command != "back" && Helper(90000005), command != "up"
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
triggerAll = !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
triggerAll = !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
triggerAll = !AILevel 
trigger1 = Helper(90000005), command = "down" && Helper(90000005), command != "back" && Helper(90000005), command != "up" && 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
triggerAll = !AILevel 
trigger1 = Helper(90000005), command = "dback" && Helper(90000005), command != "fwd" && Helper(90000005), command != "up"
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

;===============================<(SNK) CHARGE BACK, FORWARD>================================

;==============================================================================================
;This is somewhat similar to the Capcom style of charge moves, but we won't be keeping track of
;the "back" charge, instead, we're gonna be keeping track of how long the player has held left or
;right: when a character facing either direction holds left, var(31) will increase by one every tick.
;And when a character (again, facing any direction) holds right, var(31) will *decrease* by one every
;tick. If at any point the character stops holding the direction they were holding, var(31) will be reset
;to 0.

;So, if var(31) is greater than or equal to 45, then that means the player has sufficiently charged left
;enough to perform a charge back, forward move (provided they are facing to the right). And if var(31) is
;less than or equal to -45, the player has sufficiently charged right long enough to perform a charge back,
;forward move (if they're facing to the left).

;As with the Capcom method of charge moves, var(32) is set to 10 (Capcom has a 16 tick charge buffer SNK
;uses a 10 tick one) once var(31) has incremented (or decremented) enough. This is our charge buffer, and
;as long as it's non-zero, we are able to perform a charge move. var(32) will slowly start counting down to
;0, however, if the player stops hold left or right!
;==============================================================================================
;==============================================================================================
[State -1, Left Charge Increment]
type = VarAdd
triggerAll = NumHelper(90000005) && !IsHelper
trigger1 = !AILevel
trigger1 = Helper(90000005), command = "holdback"
trigger2 = AILEVEL
var(31) = 1
ignoreHitPause = 1

;this will only activate if var(31) is greater than zero; this is to avoid this VarSet from activating
;when the player is charging right
[State -1, Left Charge Reset]
type = VarSet
triggerAll = var(31) > 0
triggerAll = NumHelper(90000005) && !IsHelper
trigger1 = !AILevel
trigger1 = Helper(90000005), command != "holdback" || Helper(90000005), command = "holdfwd"
trigger2 = AILEVEL
trigger2 = StateNo = 0 || Sysvar(1)=0 && StateNo = 40 && Time = 2 
trigger3 = AILEVEL
Trigger3 = (StateNo = [100,105]) || (StateNo = [110,115]) || (StateNo = [10231,10232])|| (StateNo = [221,223]) || (StateNo = [22221,22223]) ||  StateNo = 1000 || (StateNo = [1031,1100]) || (StateNo = [1900,1905]) || (StateNo = [3000,3599]) || StateNo = 3657 || StateNo = 3667 || (StateNo = [3682,3685])
trigger3 = Time = 1
trigger4 = Anim = 20 || StateNo = 3600 && Vel X >0
trigger5 = StateNo = (StateNo = [3621,3623])
var(31) = 0
ignoreHitPause = 1

[State -1, Right Charge Increment]
type = VarAdd
triggerAll = NumHelper(90000005) && !IsHelper
trigger1 = !AILevel
trigger1 = Helper(90000005), command = "holdfwd"
trigger2 = AILEVEL
trigger2 = StateNo = 0 || Sysvar(1)=0 && StateNo = 40 && Time = 2 
trigger3 = AILEVEL
Trigger3 = (StateNo = [100,105]) || (StateNo = [110,115]) || (StateNo = [10231,10232]) || (StateNo = [221,223]) || (StateNo = [22221,22223]) ||  StateNo = 1000 || (StateNo = [1031,1100]) || (StateNo = [1900,1905]) || (StateNo = [3000,3599]) || StateNo = 3657 || StateNo = 3667 || (StateNo = [3682,3685])
trigger3 = Time = 1
trigger4 = Anim = 20 || StateNo = 3600 && Vel X >0
var(31) = -1
ignoreHitPause = 1

[State -1, Right Charge Reset]
type = VarSet
triggerAll = var(31) < 0
triggerAll = NumHelper(90000005) && !IsHelper
trigger1 = !AILevel
trigger1 = Helper(90000005), command != "holdfwd" || Helper(90000005), command = "holdback"
var(31) = 0
ignoreHitPause = 1

[State -1, Left/Right Charge Buffer Activation]
type = VarSet
;we need to remember to check the absolute value of var(31), since in the SNK method, it can be
;either positive or negative!
trigger1 = abs(var(31)) >= 45
;var(32) is only set to 10 (as opposed to 16 like the Capcom method) here because of the different
;way the charge buffer works in SNK games; see below for a more detailed discussion of this.
var(32) = ifElse(var(31) < 0, -16, 16)
ignoreHitPause = 1

[State -1, Left Charge Buffer Decrement]
type = VarAdd
trigger1 = abs(var(31)) < 45 && var(32) > 0
var(32) = -1

[State -1, Right Charge Buffer Decrement]
type = VarAdd
trigger1 = abs(var(31)) < 45 && var(32) < 0
var(32) = 1



;==============================================================================================
;Much like with Capcom-style charge moves, the length of time the command is active behaves very
;differently than with standard commands: instead of having the RemoveTime be a constant value,
;we use the current value of the charge buffer, var(32).
;==============================================================================================

;=================================<(SNK) CHARGE LEFT, RIGHT>===================================
;we only need one command explod for this move, since we already know that the player has been
;inputting the opposite direction!
[State -1, Charge Left, Right: Right]
type = Explod
triggerAll = var(32) > 0
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 = 90010606
removeTime = var(32) + ifElse(HitPauseTime, HitPauseTime - 1, 0)
pauseMoveTime = var(32) + ifElse(HitPauseTime, HitPauseTime - 1, 0)
superMoveTime = var(32) + ifElse(HitPauseTime, HitPauseTime - 1, 0)
ignoreHitPause = 1



;=================================<(SNK) CHARGE RIGHT, LEFT>===================================
[State -1, Charge Right, Left: Left]
type = Explod
triggerAll = var(32) < 0
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 = 90010704
removeTime = abs(var(32)) + ifElse(HitPauseTime, HitPauseTime - 1, 0)
pauseMoveTime = abs(var(32)) + ifElse(HitPauseTime, HitPauseTime - 1, 0)
superMoveTime = abs(var(32)) + ifElse(HitPauseTime, HitPauseTime - 1, 0)
ignoreHitPause = 1

;==============================================================================================
;===================================<(SNK) CHARGE DOWN, UP>====================================
;==============================================================================================

;==============================================================================================
;This uses the exact same concept as the Back, Forward charge move, only things are much easier
;since we don't have to deal with switching sides and having to have mirrored commands!

;Do note that we use different variables [var(33) and var(34)] here.

;The only differences between this and the Capcom method are that var(34) is set to 10, not 16.
;==============================================================================================

[State -1, Down Charge Increment]
type = VarAdd
triggerAll = NumHelper(90000005) && !IsHelper 
trigger1 = !AIlevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command = "holddown"
trigger2 = !AIlevel
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "holdup"
trigger3 = AIlevel>0
var(33) = 1
ignoreHitPause = 1

[State -1, Down Charge Reset]
type = VarSet
triggerAll = NumHelper(90000005) && !IsHelper 
trigger1 = !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command != "holddown" || Helper(90000005), command = "holdup"
trigger2 = !AILevel
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command != "holdup" || Helper(90000005), command = "holddown"
trigger3 = AIlevel
trigger3 = StateNo = 40 || (StateNo = [10230,10233]) || StateNo = 100 ||  StateNo = 105 ||  StateNo = 110 ||  StateNo = 115 ||  StateNo = 195
trigger3 = Time = 1
trigger4 = AIlevel
trigger4 = (StateNo = [22221,22223]) || StateNo = 1000 || (StateNo = [1031,1150]) || StateNo = 1057 || (StateNo = [1900,1905])  
trigger4 = Time = 1
trigger5 = AILevel
trigger5 = Var(12)>1
trigger6 = AILevel
trigger6 = StateType = S && CTRL
var(33) = 0
ignoreHitPause = 1

[State -1, Down Charge Buffer Activation]
type = VarSet
trigger1 = var(33) >= 45
var(34) = 16
ignoreHitPause = 1

[State -1, Down Charge Buffer Decrement]
type = VarAdd
trigger1 = var(33) < 45 && var(34) > 0
var(34) = -1

[State -1, Charge Down, Up: Up]
type = Explod
triggerAll = var(34) > 0
triggerAll = NumHelper(90000005) && !IsHelper && !AILevel
trigger1 = !enemy, NumExplod(92828282) && !enemy, NumExplod(92468246)
trigger1 = Helper(90000005), command = "up" && Helper(90000005), command != "fwd" && Helper(90000005), command != "back" && Helper(90000005), command != "down"
trigger2 = enemy, NumExplod(92828282) || enemy, NumExplod(92468246)
trigger2 = Helper(90000005), command = "down" && Helper(90000005), command != "fwd" && Helper(90000005), command != "back" && Helper(90000005), command != "up"
anim = 1
ID = 90010808
removeTime = var(34) + ifElse(HitPauseTime, HitPauseTime - 1, 0)
pauseMoveTime = var(34) + ifElse(HitPauseTime, HitPauseTime - 1, 0)
superMoveTime = var(34) + 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


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

;==============================================================================================
;this just needs a quick reminder about the detectors (should have already explained that there's a block of code at the very end of the system that removes them
;==============================================================================================
;---------------------------------------------------
;This block of RemoveExplods gets rid of any active release detector explods; if the specific direction 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.
;---------------------------------------------------

[State -1, Remove Down Detector]
type = RemoveExplod
triggerAll = NumExplod(90000002)
triggerAll = NumHelper(90000005) && !IsHelper
triggerAll = !AILevel
trigger1 = Helper(90000005), command != "down" && Helper(90000005), command != "holddown"
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"
id = 90000002
ignoreHitPause = 1

[State -1, Remove Down-Right Detector]
type = RemoveExplod
triggerAll = NumExplod(90000003)
triggerAll = NumHelper(90000005) && !IsHelper
triggerAll = !AILevel
trigger1 = (Helper(90000005), command != "down" && Helper(90000005), command != "holddown") || (Helper(90000005), command != "fwd" && Helper(90000005), command != "holdfwd")
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"
id = 90000003
ignoreHitPause = 1

[State -1, Remove Right Detector]
type = RemoveExplod
triggerAll = NumExplod(90000006)
triggerAll = NumHelper(90000005) && !IsHelper
triggerAll = !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
triggerAll = !AILevel
trigger1 = (Helper(90000005), command != "up" && Helper(90000005), command != "holdup") || (Helper(90000005), command != "fwd" && Helper(90000005), command != "holdfwd")
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"
id = 90000009
ignoreHitPause = 1

[State -1, Remove Up Detector]
type = RemoveExplod
triggerAll = NumExplod(90000008)
triggerAll = NumHelper(90000005) && !IsHelper
triggerAll = !AILevel
trigger1 = Helper(90000005), command != "up" && Helper(90000005), command != "holdup"
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"
id = 90000008
ignoreHitPause = 1

[State -1, Remove Up-Left Detector]
type = RemoveExplod
triggerAll = NumExplod(90000007)
triggerAll = NumHelper(90000005) && !IsHelper
triggerAll = !AILevel
trigger1 = (Helper(90000005), command != "up" && Helper(90000005), command != "holdup") || (Helper(90000005), command != "back" && Helper(90000005), command != "holdback")
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"
id = 90000007
ignoreHitPause = 1

[State -1, Remove Left Detector]
type = RemoveExplod
triggerAll = NumExplod(90000004)
triggerAll = NumHelper(90000005) && !IsHelper
triggerAll = !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
triggerAll = !AILevel
trigger1 = (Helper(90000005), command != "down" && Helper(90000005), command != "holddown") || (Helper(90000005), command != "back" && Helper(90000005), command != "holdback")
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"
id = 90000001
ignoreHitPause = 1



;==============================================================================================
;==============================<REMOVE RELEASE BUTTON DETECTORS>===============================
;==============================================================================================
[State -1, Remove x Detector]
type = RemoveExplod
triggerAll = NumExplod(90000201)
triggerAll = NumHelper(90000005) && !IsHelper
triggerAll = !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
triggerAll = !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
triggerAll = !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
triggerAll = !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
triggerAll = !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
triggerAll = !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
triggerAll = !AILevel
trigger1 = Helper(90000005), command != "start" && Helper(90000005), command != "holdstart"
ID = 90000194
ignoreHitPause = 1


;==============================================================================================
;==========================================<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 = Var(29)=1
trigger5 =  !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 = Var(29)=1
trigger3 =  !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 = P2DisT x < -12 && StateType != A
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 = Var(29)=0
triggerAll = !AILevel
triggerAll = InGuardDist
triggerAll = P2DisT x < -12 && StateType != A
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 = Var(29)=0
triggerAll = !AILevel 
triggerAll = InGuardDist
triggerAll = StateType = A
triggerAll = ctrl
triggerAll = !(StateNo = [120,155])
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 = Var(29)=0
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

;==============================================================================================
;==============================================================================================
;=============================<End of EXPLODsive Buffering System>=============================
;==============================================================================================
;==============================================================================================

;-| SSJ3 Shiznit |--------------------------------------------------------

[State -1, L1]
type = Explod
triggerAll = !AILevel
triggerAll = NumExplod(91111122)
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 = 91111114
removeTime = 20 
pauseMoveTime = 20 
superMoveTime = 20 
ignoreHitPause = 1

;Portal
[State -1, Portal]
type = ChangeState
value = 3684
triggerAll = !AILevel
triggerall = Var(29)=1
triggerall = NumHelper(3677) <=1
triggerall = ((ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90010606)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90010704)))
triggerall = NumExplod(90000200) || NumExplod(90000205) || NumExplod(90000210) || NumExplod(90000215) || NumExplod(90000220) || NumExplod(90000225)
triggerall = RoundState = 2 && StateType != A
trigger1 = ctrl

;Air Portal
[State -1, air Portal]
type = ChangeState
value = 3685
triggerAll = !AILevel
triggerall = Var(29)=1
triggerall = NumHelper(3677) <=1
triggerall = ((ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90010606)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90010704)))
triggerall = NumExplod(90000200) || NumExplod(90000205) || NumExplod(90000210) || NumExplod(90000215) || NumExplod(90000220) || NumExplod(90000225)
triggerall = RoundState = 2 && StateType = A
trigger1 = ctrl

;SSJ3 Ghost Spit
[State -1, SSJ3 Ghost Spit]
type = ChangeState
value = 3682
triggerAll = !AILevel
triggerall = !NumHelper(3674)
triggerall = Var(29)=1
triggerall = ((ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90010006)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90010104)))
triggerall = NumExplod(90000230) || NumExplod(90000235) || NumExplod(90000240) || NumExplod(90000245) || NumExplod(90000250) || NumExplod(90000255)
triggerall = statetype != A 
trigger1 = ctrl

;SSJ3 Air Ghost Spit
[State -1, SSJ3 Air Ghost Spit]
type = ChangeState
value = 3683
triggerAll = !AILevel
triggerall = !NumHelper(3674)
triggerall = Var(29)=1
triggerall = ifElse(Facing = 1, NumExplod(90010006),NumExplod(90010104))
triggerall = NumExplod(90000230) || NumExplod(90000235) || NumExplod(90000240) || NumExplod(90000245) || NumExplod(90000250) || NumExplod(90000255)
triggerall = statetype = A 
trigger1 = ctrl

;Stand Mouth Beam
[State -1, Stand Mouth Beam]
type = ChangeState
value = 3657
triggerAll = !AILevel
triggerall = Var(29)=1
triggerall = ((ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90000026)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90000024))) 
triggerall = NumExplod(90000220)||command = "z"
triggerall = statetype !=A
trigger1 = ctrl 
trigger2 = StateNo = 3648
trigger2 = MoveContact
trigger3 = StateNo = 3654
trigger3 = MoveContact
trigger4 = StateNo = 3649
trigger4 = MoveContact
trigger5 = StateNo = 3655
trigger5 = MoveContact
trigger6 = StateNo = 3651
trigger6 = MoveContact
trigger7 = StateNo = 3656
trigger7 = MoveContact

;Jump Mouth Beam
[State -1, Jump Mouth Beam]
type = ChangeState
value = 3667
triggerAll = !AILevel
triggerall = Var(29)=1
triggerall = ((ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90000026)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90000024))) 
triggerall = NumExplod(90000220)||command = "z"
triggerall = statetype =A
trigger1 = ctrl 
trigger2 = StateNo = 3660
trigger2 = MoveContact
trigger3 = StateNo = 3664
trigger3 = MoveContact
trigger4 = StateNo = 3661
trigger4 = MoveContact
trigger5 = StateNo = 3665
trigger5 = MoveContact
trigger6 = StateNo = 3662
trigger6 = MoveContact
trigger7 = StateNo = 3666
trigger7 = MoveContact

;Stand Light Punch
[State -1, Stand Light Punch]
type = ChangeState
value = 3648
triggerAll = !AILevel
triggerall = Var(29)=1
triggerall = NumExplod(90000200)||command = "x"
triggerall = statetype !=A
trigger1 = ctrl 

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

;Stand Medium Punch
[State -1, Stand Medium Punch]
type = ChangeState
value = 3649
triggerAll = !AILevel
triggerall = Var(29)=1
triggerall = NumExplod(90000210)||command = "y"
triggerall = statetype !=A
trigger1 = ctrl 
trigger2 = StateNo = 3648
trigger2 = MoveContact
trigger3 = StateNo = 3654
trigger3 = MoveContact
trigger4 = StateNo = 3620
trigger4 = Time >=7

;Jump Medium Punch
[State -1, Jump Medium Punch]
type = ChangeState
value = 3661
triggerAll = !AILevel
triggerall = Var(29)=1
triggerall = NumExplod(90000210)||command = "y"
triggerall = statetype =A
trigger1 = ctrl 
trigger2 = StateNo = 3660
trigger2 = MoveContact
trigger3 = StateNo = 3664
trigger3 = MoveContact
trigger4 = StateNo = 3622
trigger4 = Time >=7

;Ground Punch
[State -1, Ground Punch]
type = ChangeState
value = 3658
triggerAll = !AILevel
triggerall = Var(29)=1
triggerall = NumExplod(90000220) ||  command = "z"
triggerall = NumExplod(90000021) || NumExplod(90000022) || NumExplod(90000023)
triggerall = statetype !=A
trigger1 = ctrl 
trigger2 = StateNo = 3648
trigger2 = MoveContact
trigger3 = StateNo = 3654
trigger3 = MoveContact
trigger4 = StateNo = 3649
trigger4 = MoveContact
trigger5 = StateNo = 3655
trigger5 = MoveContact

;Jump Ground Punch
[State -1, jump Ground Punch]
type = ChangeState
value = 3680
triggerAll = !AILevel
triggerall = Var(29)=1
triggerall = NumExplod(90000220) ||  command = "z"
triggerall = NumExplod(90000021) || NumExplod(90000022) || NumExplod(90000023)
triggerall = statetype =A
trigger1 = ctrl 
trigger2 = StateNo = 3660
trigger2 = MoveContact
trigger3 = StateNo = 3664
trigger3 = MoveContact
trigger4 = StateNo = 3661
trigger4 = MoveContact
trigger5 = StateNo = 3665
trigger5 = MoveContact

;Stand Hard Punch
[State -1, Stand Hard Punch]
type = ChangeState
value = 3651
triggerAll = !AILevel
triggerall = Var(29)=1
triggerall = NumExplod(90000220)||command = "z"
triggerall = (!NumExplod(90000021) && !NumExplod(90000022) && !NumExplod(90000023))
triggerall = StateType != A
trigger1 = ctrl 
trigger2 = StateNo = 3648
trigger2 = MoveContact
trigger3 = StateNo = 3654
trigger3 = MoveContact
trigger4 = StateNo = 3649
trigger4 = MoveContact
trigger5 = StateNo = 3655
trigger5 = MoveContact

;Jump Hard Punch
[State -1, Jump Hard Punch]
type = ChangeState
value = 3662
triggerAll = !AILevel
triggerall = Var(29)=1
triggerall = NumExplod(90000220)||command = "z"
triggerall = (!NumExplod(90000021) && !NumExplod(90000022) && !NumExplod(90000023))
triggerall = statetype =A
trigger1 = ctrl 
trigger2 = StateNo = 3660
trigger2 = MoveContact
trigger3 = StateNo = 3664
trigger3 = MoveContact
trigger4 = StateNo = 3661
trigger4 = MoveContact
trigger5 = StateNo = 3665
trigger5 = MoveContact

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

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

;Stand Medium Kick
[State -1, Stand Medium Kick]
type = ChangeState
value = 3655
triggerAll = !AILevel
triggerall = Var(29)=1
triggerall = NumExplod(90000240)||command = "b"
triggerall = statetype !=A
trigger1 = ctrl 
trigger2 = StateNo = 3648
trigger2 = MoveContact
trigger3 = StateNo = 3654
trigger3 = MoveContact
trigger4 = StateNo = 3620
trigger4 = Time >=7

;Jump Medium Kick
[State -1, Jump Medium Kick]
type = ChangeState
value = 3665
triggerAll = !AILevel
triggerall = Var(29)=1
triggerall = NumExplod(90000240)||command = "b"
triggerall = statetype =A
trigger1 = ctrl 
trigger2 = StateNo = 3660
trigger2 = MoveContact
trigger3 = StateNo = 3664
trigger3 = MoveContact
trigger4 = StateNo = 3622
trigger4 = Time >=7

;Stand Hard Kick
[State -1, Stand Hard Kick]
type = ChangeState
value = 3656
triggerAll = !AILevel
triggerall = Var(29)=1
triggerall = NumExplod(90000250)||command = "c"
triggerall = statetype !=A
trigger1 = ctrl 
trigger2 = StateNo = 3648
trigger2 = MoveContact
trigger3 = StateNo = 3654
trigger3 = MoveContact
trigger4 = StateNo = 3649
trigger4 = MoveContact
trigger5 = StateNo = 3655
trigger5 = MoveContact
trigger6 = StateNo = 3620
trigger6 = Time >=7

;Jump Hard Kick
[State -1, Jump Hard Kick]
type = ChangeState
value = 3666
triggerAll = !AILevel
triggerall = Var(29)=1
triggerall = NumExplod(90000250)||command = "c"
triggerall = statetype =A
triggerall = Pos Y <=-30
trigger1 = ctrl 
trigger2 = StateNo = 3660
trigger2 = MoveContact
trigger3 = StateNo = 3664
trigger3 = MoveContact
trigger4 = StateNo = 3661
trigger4 = MoveContact
trigger5 = StateNo = 3665
trigger5 = MoveContact
trigger6 = StateNo = 3622
trigger6 = Time >=7

; Taunt
[State -1, Taunt]
type = ChangeState
triggerAll = !AILevel
triggerall = Var(29)=1
triggerall = NumExplod(90000195) || command="start"
trigger1 = statetype != A
trigger1 = ctrl
value = 3625

; Air Taunt
[State -1, Taunt]
type = ChangeState
triggerAll = !AILevel
triggerall = Var(29)=1
triggerall = NumExplod(90000195) || command="start"
trigger1 = statetype = A
trigger1 = ctrl
value = 3626

;-| Supers |--------------------------------------------------------

; Air SSJ2 Mode
[State -1]
type = ChangeState
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = Var(9) < 9997
triggerall = roundstate = 2
triggerall = var(50)<=0 ;No rage mode
triggerall = NumExplod(90012602)
triggerall = NumExplod(90000210) && NumExplod(90000240) || NumExplod(90000215) && NumExplod(90000245)
triggerall = statetype = A  && !WinKo
triggerall = power >= 2000 && stateno != 2700
;triggerall = !NumHelper(3501)
;triggerall = !NumHelper(3502)
trigger1 = Ctrl
value = 2710

; SSJ2 Mode
[State -1]
type = ChangeState
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = Var(9) < 9997
triggerall = roundstate = 2
triggerall = var(50)<=0 ;No SSJ2
triggerall = NumExplod(90012602)
triggerall = NumExplod(90000210) && NumExplod(90000240) || NumExplod(90000215) && NumExplod(90000245)
triggerall = statetype != A  && !WinKo
triggerall = power >= 2000 && stateno != 2700
;triggerall = !NumHelper(3501)
;triggerall = !NumHelper(3502)
trigger1 = Ctrl
trigger2 = stateno=900
value = 2700

; Exit SSJ2 Mode
[State -1]
type = ChangeState
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = Var(9) < 9997
triggerall = roundstate = 2
triggerall = var(50)>0 ;In SSJ2
triggerall = NumExplod(90012602)
triggerall = NumExplod(90000210) && NumExplod(90000240) || NumExplod(90000215) && NumExplod(90000245)
triggerall = statetype != A  && !WinKo
trigger1 = Ctrl
trigger2 = stateno=902
value = 2790

; SSJ3 Mode
[State -1]
type = ChangeState
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = Var(9) < 9997
triggerall = TeamMode != Simul
triggerall = enemyNear,TeamMode != Simul
triggerall = !NumProjID(27529)
triggerall = roundstate = 2
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 = Ctrl
trigger1 = var(50)>0 ;SSJ2 mode
trigger1 = power >= 2000 || Var(51) >= 2000 || power >= 1000 && Var(51) >=1000
trigger2 = var(50)<=0 ;No SSJ2 mode
trigger2 = power = 3000
value = 3601

;Volley Ball
[State -1, Volley Ball]
type = Changestate
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = !NumHelper(3410)
triggerall = !NumHelper(3310)
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 = (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 = command = "x"
triggerall = power >= 2000 || Var(51) >= 2000 || power >= 1000 && Var(51) >=1000
trigger1 = ctrl
trigger2 = (stateno = 200 && MoveContact) || (stateno = 212 && MoveContact) || (stateno = 221 && MoveContact) || StateNo = 224
trigger3 = (stateno = 230 && MoveContact) || (stateno = 240 && MoveContact) || (stateno = 241 && MoveContact)  
trigger4 = (stateno = 400 && MoveContact) || (stateno = 410 && MoveContact) || (stateno = 411 && MoveContact) ||(stateno = 420 && MoveContact) || stateno = 421 
trigger5 = (stateno = 430 && MoveContact) || (stateno = 440 && MoveContact) || (stateno = 441 && MoveContact) || (stateno = 450 && MoveContact)
trigger6 = (stateno = 442 && MoveContact)
trigger7 = StateNo = 220 
trigger8 = StateNo = 1020 && MoveContact
value = 3400

;Galactic Donut
[State -1, Galactic Donut]
type = Changestate
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = !NumHelper(3410)
triggerall = !NumHelper(3310)
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 || Var(51) >= 1000
trigger1 = ctrl
trigger2 = (stateno = 200 && MoveContact) || (stateno = 212 && MoveContact) || (stateno = 221 && MoveContact) || StateNo = 224
trigger3 = (stateno = 230 && MoveContact) || (stateno = 240 && MoveContact) || (stateno = 241 && MoveContact)  
trigger4 = (stateno = 400 && MoveContact) || (stateno = 410 && MoveContact) || (stateno = 411 && MoveContact) ||(stateno = 420 && MoveContact) || stateno = 421 
trigger5 = (stateno = 430 && MoveContact) || (stateno = 440 && MoveContact) || (stateno = 441 && MoveContact) || (stateno = 450 && MoveContact)
trigger6 = (stateno = 442 && MoveContact)
trigger7 = StateNo = 220 
trigger8 = StateNo = 1020 && MoveContact
value = 3300

;SERVE!
[State -1, SERVE!]
type = Changestate
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = !NumExplod(3111)
triggerall = ((ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && (NumExplod(90032506))) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && (NumExplod(90032404))))
triggerall = NumExplod(90000200) || NumExplod(90000205) || NumExplod(90000210) || NumExplod(90000215) || NumExplod(90000220) || NumExplod(90000225)
triggerall = statetype != A && !WinKo 
triggerall = power >= 1000 || Var(51) >= 1000
trigger1 = ctrl
trigger2 = (stateno = 200 && MoveContact) || (stateno = 212 && MoveContact) || (stateno = 221 && MoveContact) || StateNo = 224
trigger3 = (stateno = 230 && MoveContact) || (stateno = 240 && MoveContact) || (stateno = 241 && MoveContact) 
trigger4 = (stateno = 400 && MoveContact) || (stateno = 410 && MoveContact) || (stateno = 411 && MoveContact) ||(stateno = 420 && MoveContact) || stateno = 421 
trigger5 = (stateno = 430 && MoveContact) || (stateno = 440 && MoveContact) || (stateno = 441 && MoveContact) || (stateno = 450 && MoveContact)
trigger6 = (stateno = 442 && MoveContact)
trigger7 = StateNo = 220 
trigger8 = StateNo = 1020 && MoveContact
value = 3200

[State -1, Ghost]
type = ChangeState
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = Var(53)<5
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)
trigger1 = Power >= 1000 || Var(51) >= 1000
trigger1 = ctrl && statetype != A
trigger1 = StateNo != 3000
value = 3000

;Air Die Die Missles LVL2
[State -1, Air Die Die Missles LVL2]
type = Changestate
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = !NumExplod(3112)
triggerall = !NumExplod(3111)
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 = !WinKo 
triggerall = power >= 2000 || Var(51) >= 2000 || power >= 1000 && Var(51) >=1000
trigger1 = ctrl && statetype = A
trigger2 = (StateNo = 620 && MoveContact)
trigger3 = StateNo = 251 && AnimElemTime(9)>=0 && MoveContact = 1
trigger4 = StateNo = 1154
trigger4 = NumTarget
trigger5 = StateNo = 224 && statetype = A
value = 3105

;Air Die Die Missles
[State -1, Air Die Die Missles]
type = Changestate
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = !NumExplod(3112)
triggerall = !NumExplod(3111)
triggerall = ifElse(Facing = 1,(NumExplod(90030016) || NumExplod(90030003)),(NumExplod(90030114) || NumExplod(90030101))) 
triggerall = NumExplod(90000200) || NumExplod(90000205) || NumExplod(90000210) || NumExplod(90000215) || NumExplod(90000220) || NumExplod(90000225)
triggerall = !WinKo 
triggerall = power >= 1000 || Var(51) >= 1000 
trigger1 = ctrl && statetype = A
trigger2 = (StateNo = 620 && MoveContact)
trigger3 = StateNo = 251 && AnimElemTime(9)>=0 && MoveContact = 1
trigger4 = StateNo = 1154
trigger4 = NumTarget
trigger5 = StateNo = 224 && statetype = A
value = 3100

;GroundDie Die Missles LVL2
[State -1, Ground Die Die Missles LVL2]
type = Changestate
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = !NumExplod(3112)
triggerall = !NumExplod(3111)
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 || Var(51) >= 2000 || power >= 1000 && Var(51) >=1000
trigger1 = ctrl
trigger2 = StateNo = 220
value = 3106

;GroundDie Die Missles
[State -1, Ground Die Die Missles]
type = Changestate
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = !NumExplod(3112)
triggerall = !NumExplod(3111)
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 || Var(51) >= 1000
trigger1 = ctrl
trigger2 = StateNo = 220
value = 3102

;-| EX Attacks |-------------------------------------------------------\
;EX Air Miracle Blast
[State -1, EX Air Miracle Blast]
type = ChangeState
value = 1030
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = !NumExplod(1038)
triggerall = !NumExplod(1037)
triggerall = ifElse(Facing = 1, NumExplod(90010006),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 
triggerall = power >= 500 || Var(51) >= 500
trigger1 = ctrl
trigger2 = (StateNo = 600 && AnimElem >= 4) || (StateNo = 610 && AnimElem >= 5)
trigger3 = (StateNo = 620 && AnimElem >= 7) || (StateNo = 630 && AnimElem >= 5)
trigger4 = (StateNo = 640 && AnimElem >= 4) 
trigger5 = (StateNo = 600 && MoveContact) || (StateNo = 610 && MoveContact)
trigger6 = (StateNo = 620 && MoveContact) || (StateNo = 630 && MoveContact)
trigger7 = (StateNo = 640 && MoveContact)
 

;EX Air Miracle Blast follow up
[State -1, EX Air Miracle Blast follow up]
type = ChangeState
value = 1038
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = NumExplod(1037)
triggerall = !NumExplod(1038)
triggerall = ifElse(Facing = 1, NumExplod(90010006),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 
trigger1 = ctrl
trigger2 = (StateNo = 600 && AnimElem >= 4) || (StateNo = 610 && AnimElem >= 5)
trigger3 = (StateNo = 620 && AnimElem >= 7) || (StateNo = 630 && AnimElem >= 5)
trigger4 = (StateNo = 640 && AnimElem >= 4) 
trigger5 = (StateNo = 600 && MoveContact) || (StateNo = 610 && MoveContact)
trigger6 = (StateNo = 620 && MoveContact) || (StateNo = 630 && MoveContact)
trigger7 = (StateNo = 640 && MoveContact)
trigger8 = StateNo = 1030 && AnimElemTime(9) >= 0

;-| Special Attacks |--------------------------------------------------------
;Air Ghost Blast 1
[State -1, Air Ghost Blast 1]
type = null;ChangeState
value = 1040
triggerall = Var(53)>=1
triggerall = !NumExplod(1037)
;triggerall = command = "qcfa" || command = "qcfb" || command = "qcfc"
triggerall = statetype = A 
trigger1 = ctrl
trigger2 = (StateNo = 600 && AnimElem >= 4) || (StateNo = 610 && AnimElem >= 5)
trigger3 = (StateNo = 620 && AnimElem >= 7) || (StateNo = 630 && AnimElem >= 5)
trigger4 = (StateNo = 640 && AnimElem >= 4) 
trigger5 = (StateNo = 600 && MoveContact) || (StateNo = 610 && MoveContact)
trigger6 = (StateNo = 620 && MoveContact) || (StateNo = 630 && MoveContact)
trigger7 = (StateNo = 640 && MoveContact) 

[State -1, Air Ghost Blast 2]
type = null;ChangeState
value = 1041
triggerall = Var(53)>=1
triggerall = NumExplod(1037)
;triggerall = command = "qcfa" || command = "qcfb" || command = "qcfc"
triggerall = statetype = A 
trigger1 = ctrl
trigger2 = (StateNo = 600 && AnimElem >= 4) || (StateNo = 610 && AnimElem >= 5)
trigger3 = (StateNo = 620 && AnimElem >= 7) || (StateNo = 630 && AnimElem >= 5)
trigger4 = (StateNo = 640 && AnimElem >= 4) 
trigger5 = (StateNo = 600 && MoveContact) || (StateNo = 610 && MoveContact)
trigger6 = (StateNo = 620 && MoveContact) || (StateNo = 630 && MoveContact)
trigger7 = (StateNo = 640 && MoveContact) 
trigger8 = StateNo = 1031 && AnimElemTime(5) >= 0
trigger9 = StateNo = 1040 && AnimElemTime(5) >= 0

;Air Miracle Blast 
[State -1, Air Miracle Blast 1]
type = ChangeState
value = 1031
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = !NumExplod(1036)
triggerall = !NumExplod(1035)
triggerall = ifElse(Facing = 1, NumExplod(90010006),NumExplod(90010104))
triggerall = NumExplod(90000200) || NumExplod(90000205) || NumExplod(90000210) || NumExplod(90000215) || NumExplod(90000220) || NumExplod(90000225)
triggerall = statetype = A 
trigger1 = ctrl
trigger2 = (StateNo = 600 && AnimElem >= 4) || (StateNo = 610 && AnimElem >= 5)
trigger3 = (StateNo = 620 && AnimElem >= 7) || (StateNo = 630 && AnimElem >= 5)
trigger4 = (StateNo = 640 && AnimElem >= 4) 
trigger5 = (StateNo = 600 && MoveContact) || (StateNo = 610 && MoveContact)
trigger6 = (StateNo = 620 && MoveContact) || (StateNo = 630 && MoveContact)
trigger7 = (StateNo = 640 && MoveContact) 

[State -1, Air Miracle Blast 2]
type = ChangeState
value = 1032
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = NumExplod(1035)
triggerall = !NumExplod(1036)
triggerall = ifElse(Facing = 1, NumExplod(90010006),NumExplod(90010104))
triggerall = NumExplod(90000200) || NumExplod(90000205) || NumExplod(90000210) || NumExplod(90000215) || NumExplod(90000220) || NumExplod(90000225)
triggerall = statetype = A 
trigger1 = ctrl
trigger2 = (StateNo = 600 && AnimElem >= 4) || (StateNo = 610 && AnimElem >= 5)
trigger3 = (StateNo = 620 && AnimElem >= 7) || (StateNo = 630 && AnimElem >= 5)
trigger4 = (StateNo = 640 && AnimElem >= 4) 
trigger5 = (StateNo = 600 && MoveContact) || (StateNo = 610 && MoveContact)
trigger6 = (StateNo = 620 && MoveContact) || (StateNo = 630 && MoveContact)
trigger7 = (StateNo = 640 && MoveContact) 
trigger8 = StateNo = 1031 && AnimElemTime(5) >= 0
trigger9 = StateNo = 1040 && AnimElemTime(5) >= 0

;Air Miracle Blast  follow up
[State -1, Air Miracle Blast follow up]
type = ChangeState
value = 1032
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = statetype = A 
triggerall = NumHelper(1035) = 1 && NumHelper(1036) = 0
triggerall = ifElse(Facing = 1, NumExplod(90010006),NumExplod(90010104))
triggerall = NumExplod(90000200) || NumExplod(90000205) || NumExplod(90000210) || NumExplod(90000215) || NumExplod(90000220) || NumExplod(90000225)
trigger1 = ctrl
trigger2 = (StateNo = 600 && AnimElem >= 4) || (StateNo = 610 && AnimElem >= 5)
trigger3 = (StateNo = 620 && AnimElem >= 7) || (StateNo = 630 && AnimElem >= 5)
trigger4 = (StateNo = 640 && AnimElem >= 4) 
trigger5 = (StateNo = 600 && MoveContact) || (StateNo = 610 && MoveContact)
trigger6 = (StateNo = 620 && MoveContact) || (StateNo = 630 && MoveContact)
trigger7 = (StateNo = 640 && MoveContact)

;Call Back Ghosts
[State -1, Call Back Ghosts]
type = ChangeState
value = 1902
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = Var(53)>0
triggerall = NumHelper(20000)
triggerall = helper(20000),Var(0)>=1
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) 
triggerall = statetype != A 
trigger1 = ctrl

;Call Back Ghosts
[State -1, Call Back Ghosts]
type = ChangeState
value = 1903
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = Var(53)>0
triggerall = NumHelper(20000)
triggerall = helper(20000),Var(0)>=1
triggerall = ((ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90010104)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90010006)))
triggerall = NumExplod(90000210) || NumExplod(90000215) 
triggerall = statetype != A 
trigger1 = ctrl
trigger2 = StateNo = 220

;Call Back Ghosts
[State -1, Call Back Ghosts]
type = ChangeState
value = 1905
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = Var(53)>0
triggerall = NumHelper(20000)
triggerall = helper(20000),Var(0)>=1
triggerall = ((ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90010104)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90010006)))
triggerall =  NumExplod(90000220) || NumExplod(90000225)
triggerall = statetype != A 
trigger1 = ctrl
trigger2 = StateNo = 220

;Hero Stance
[State -1, Hero Stance]
type = ChangeState
value = 1000
triggerAll = !AILevel
triggerall = Var(29)=0
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 
trigger1 = ctrl
trigger2 = (stateno = 200 && MoveContact) || (stateno = 212 && MoveContact) || (stateno = 221 && MoveContact) || StateNo = 224
trigger3 = (stateno = 230 && MoveContact) || (stateno = 240 && MoveContact) || (stateno = 241 && MoveContact)
trigger4 = (stateno = 400 && MoveContact) || (stateno = 410 && MoveContact) || (stateno = 411 && MoveContact) ||(stateno = 420 && MoveContact) || stateno = 421 
trigger5 = (stateno = 430 && MoveContact) || (stateno = 440 && MoveContact) || (stateno = 441 && MoveContact)
trigger6 = (stateno = 442 && MoveContact) || (stateno = 450 && MoveContact)

;EX INSULT!
[State -1, EX Insult!]
type = ChangeState
value = 1101
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = !NumHelper(1110)  
triggerall = !NumHelper(1116)
triggerall = Power >= 500 || Var(51) >= 500
triggerall = ((ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90010606)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90010704)))
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 = RoundState = 2 && StateType != A
trigger1 = ctrl
trigger2 = (stateno = 200 && MoveContact) || (stateno = 212 && MoveContact) || (stateno = 221 && MoveContact)
trigger3 = (stateno = 230 && MoveContact) || (stateno = 240 && MoveContact) || (stateno = 241 && MoveContact)
trigger4 = (stateno = 400 && MoveContact) || (stateno = 410 && MoveContact) || (stateno = 411 && MoveContact) ||(stateno = 420 && MoveContact) || stateno = 421 
trigger5 = (stateno = 430 && MoveContact) || (stateno = 440 && MoveContact) || (stateno = 441 && MoveContact)
trigger6 = (stateno = 442 && MoveContact)
trigger7 = StateNo = 220 

;Headbutt Slam Air
[State -1, Headbutt Slam]
type = ChangeState
value = 1157
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = NumExplod(90010808)
triggerall = NumExplod(90000200) || NumExplod(90000205) || NumExplod(90000210) || NumExplod(90000215) || NumExplod(90000220) || NumExplod(90000225)
triggerall = RoundState = 2
triggerall = StateType = A
triggerall = MoveType != H
trigger1 = ctrl || StateNo = 40 || StateNo = 52 || (StateNo = 50 && Pos Y >= -20 && Vel Y >0) && StateNo != [1154,1155]
trigger2 = (stateno = 600 && MoveContact) || (stateno = 610 && MoveContact) || (stateno = 620 && MoveContact) || StateNo = 224
trigger3 = (stateno = 630 && MoveContact) || (stateno = 640 && MoveContact) || (stateno = 650 && MoveContact) || stateno = 651
trigger4 = StateNo = [1051,1054]


;Headbutt Slam
[State -1, Headbutt Slam]
type = ChangeState
value = 1150
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = NumExplod(90010808)
triggerall = NumExplod(90000200) || NumExplod(90000205) || NumExplod(90000210) || NumExplod(90000215) || NumExplod(90000220) || NumExplod(90000225)
triggerall = RoundState = 2
triggerall = StateType != A
triggerall = MoveType != H
trigger1 = ctrl || StateNo = 40 || StateNo = 52 
trigger2 = (stateno = 200 && MoveContact) || (stateno = 212 && MoveContact) || (stateno = 221 && MoveContact) || StateNo = 224
trigger3 = (stateno = 230 && MoveContact) || (stateno = 240 && MoveContact) || (stateno = 241 && MoveContact) || (stateno = 251 && MoveContact) 
trigger4 = (stateno = 400 && MoveContact) || (stateno = 410 && MoveContact) || (stateno = 411 && MoveContact) ||(stateno = 420 && MoveContact) || stateno = 421 
trigger5 = (stateno = 430 && MoveContact) || (stateno = 440 && MoveContact) || (stateno = 441 && MoveContact) || (stateno = 450 && MoveContact)
trigger6 = (stateno = 442 && MoveContact)
trigger7 = StateNo = 220 

[State -1, Ghost Headbutt Slam]
type = ChangeState
value = 1904
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = Var(53)>=1
triggerall = NumHelper(20000)
triggerall = NumExplod(90010808)
triggerall = NumExplod(90000230) || NumExplod(90000235) || NumExplod(90000240) || NumExplod(90000245) || NumExplod(90000250) || NumExplod(90000255)
triggerall = RoundState = 2 && StateType != A
triggerall = helper(20000), Var(5)>0
triggerall = helper(20000),Var(6)<2
trigger1 = ctrl || StateNo = 40 || StateNo = 52 
trigger2 = (stateno = 200 && MoveContact) || (stateno = 212 && MoveContact) || (stateno = 221 && MoveContact)
trigger3 = (stateno = 230 && MoveContact) || (stateno = 240 && MoveContact) || (stateno = 241 && MoveContact)
trigger4 = (stateno = 400 && MoveContact) || (stateno = 410 && MoveContact) || (stateno = 411 && MoveContact) ||(stateno = 420 && MoveContact) || stateno = 421 
trigger5 = (stateno = 430 && MoveContact) || (stateno = 440 && MoveContact) || (stateno = 441 && MoveContact)
trigger6 = (stateno = 442 && MoveContact)

[State -1, Ghost AltScream]
type = null;ChangeState
value = 1904
triggerall = Var(53)>=1
;triggerall = command = "BFA" || command = "BFB" || command = "BFC"
triggerall = RoundState = 2
triggerall = Var(32) > 0
trigger1 = ctrl || StateNo = 40 || StateNo = 52 || (StateNo = 50 && Pos Y >= -20 && Vel Y >0)
trigger2 = (stateno = 200 && MoveContact) || (stateno = 212 && MoveContact) || (stateno = 221 && MoveContact)
trigger3 = (stateno = 230 && MoveContact) || (stateno = 240 && MoveContact) || (stateno = 241 && MoveContact)
trigger4 = (stateno = 400 && MoveContact) || (stateno = 410 && MoveContact) || (stateno = 411 && MoveContact) ||(stateno = 420 && MoveContact) || stateno = 421 
trigger5 = (stateno = 430 && MoveContact) || (stateno = 440 && MoveContact) || (stateno = 441 && MoveContact)
trigger6 = (stateno = 442 && MoveContact)

;INSULT!
[State -1, Insult!]
type = ChangeState
value = 1100
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = !NumHelper(1110)  
triggerall = !NumHelper(1116)
triggerall = ((ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90010606)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90010704)))
triggerall = NumExplod(90000200) || NumExplod(90000205) || NumExplod(90000210) || NumExplod(90000215) || NumExplod(90000220) || NumExplod(90000225)
triggerall = RoundState = 2 && StateType != A
trigger1 = ctrl
trigger2 = (stateno = 200 && MoveContact) || (stateno = 212 && MoveContact) || (stateno = 221 && MoveContact)
trigger3 = (stateno = 230 && MoveContact) || (stateno = 240 && MoveContact) || (stateno = 241 && MoveContact)
trigger4 = (stateno = 400 && MoveContact) || (stateno = 410 && MoveContact) || (stateno = 411 && MoveContact) ||(stateno = 420 && MoveContact) || stateno = 421 
trigger5 = (stateno = 430 && MoveContact) || (stateno = 440 && MoveContact) || (stateno = 441 && MoveContact)
trigger6 = (stateno = 442 && MoveContact)
trigger7 = StateNo = 220 

;-| Direction + Basics |--------------------------------------------------------
;Ghost Mine
[State -1, Ghost Mine]
type = ChangeState
value = 1900
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = Var(53)>=1
triggerall = NumHelper(20000)
triggerall = helper(20000), Var(5)>0
triggerall = helper(20000),Var(6)<2
triggerall = NumExplod(90012602)
triggerall = NumExplod(90000230) || NumExplod(90000240) || NumExplod(90000250) 
trigger1 = ctrl && statetype != a

;Ghost Fire
[State -1, Ghost Fire]
type = ChangeState
value = 1901
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = Var(53)>=1
triggerall = NumHelper(20000)
triggerall = helper(20000), Var(5)>0
triggerall = helper(20000),Var(6)<2
triggerall = NumExplod(90012602)
triggerall = NumExplod(90000200) || NumExplod(90000210) || NumExplod(90000220) 
trigger1 = ctrl && statetype != a

;Stand Medium Kick
[State -1, Stand Medium Kick]
type = null;ChangeState
value = 242
triggerall = command = "b" && command = "holdback"  && command != "holddown"
trigger1 = ctrl && statetype != a

[State -1, R1]
type = Explod
triggerAll = !AILevel
triggerAll = NumExplod(91111114)
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 = 91111116
removeTime = 20 
pauseMoveTime = 20 
superMoveTime = 20 
ignoreHitPause = 1

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

; Focus Attack
[State -1]
type = ChangeState
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = stateno !=[1300,1302]
triggerall = stateno != 106
triggerall = NumExplod(90000220) && NumExplod(90000250)|| command = "z" && command = "c"
triggerall = statetype = S
trigger1 = ctrl
trigger2 = StateNo=220
trigger2 = !NumExplod(221)
trigger2 = !NumExplod(1301)
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

;Power Charge SSJ
[State -1]
type = ChangeState
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = !NumHelper(3410)
triggerall = !NumHelper(3310)
triggerall = Var(50)>0
triggerall = StateType != A
triggerall = stateno != 902
triggerall = Ctrl
triggerall = NumExplod(90000210) && NumExplod(90000240) || command = "holdb" && command = "holdy"
trigger1 = Power < 3000 && Var(50)>0
trigger2 = Var(51)<3000 && Var(50)>0
value = 902

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

; Kick Throw (Suplex)/Reverse Throw
[State -1, throw1]
type = changestate
triggerAll = !AILevel
triggerall = Var(29)=0
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 Flip kick into rising headbutt
[State -1, throw1]
type = changestate
triggerAll = !AILevel
triggerall = Var(29)=0
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

[State 0, Explod]
type = Explod
triggerAll = !AILevel
triggerALL = NumExplod(91111126)
trigger1 = command = "b"
anim = 1
ID = 91111240
removetime = 20
pausemovetime = 20
supermovetime = 20
ignorehitpause = 1


;-| Punches |--------------------------------------------------------
;Stand Light Punch
[State -1, Stand Light Punch]
type = ChangeState
value = 200
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = NumExplod(90000200) ||  command = "x"
triggerall = (!NumExplod(90000021) && !NumExplod(90000022) && !NumExplod(90000023))
triggerall = StateType != A
trigger1 = ctrl || stateno = 100

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


;Stand Strong Punch
[State -1, Stand Strong Punch]
type = ChangeState
value = 220
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = NumExplod(90000220) ||  command = "holdz"
triggerall = (!NumExplod(90000021) && !NumExplod(90000022) && !NumExplod(90000023))
triggerall = (!NumExplod(90000001) && !NumExplod(90000002) && !NumExplod(90000003))
triggerall = StateType != A
trigger1 = ctrl
trigger2 = (stateno = 200 && MoveContact) || (stateno = 212 && MoveContact) 
trigger3 = (stateno = 230 && MoveContact) || (stateno = 240 && MoveContact) || (stateno = 241 && MoveContact)
trigger4 = (stateno = 400 && MoveContact) || (stateno = 410 && MoveContact) || (stateno = 411 && MoveContact)
trigger5 = (stateno = 430 && MoveContact) || (stateno = 440 && MoveContact) || (stateno = 441 && MoveContact)
trigger6 = (stateno = 442 && MoveContact)

;-| Kicks |--------------------------------------------------------
;Stand Light Kick
[State -1, Stand Light Kick]
type = ChangeState
value = 230
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = NumExplod(90000230) ||  command = "a"
triggerall = (!NumExplod(90000021) && !NumExplod(90000022) && !NumExplod(90000023))
triggerall = StateType != A
trigger1 = ctrl || stateno = 100
trigger2 = (stateno = 200 && MoveContact) 
trigger3 = (stateno = 400 && MoveContact) 

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

;Stand Strong Kick 
[State -1, Stand Strong Kick]
type = ChangeState
value = 251
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = NumExplod(90000250) ||  command = "c"
triggerall = (!NumExplod(90000021) && !NumExplod(90000022) && !NumExplod(90000023))
triggerall = StateType != A
trigger1 = ctrl || stateno = 100
trigger2 = (stateno = 200 && MoveContact) || (stateno = 212 && MoveContact) ;|| (stateno = 221 && MoveContact)
trigger3 = (stateno = 230 && MoveContact) || (stateno = 240 && MoveContact) || (stateno = 241 && MoveContact)
trigger4 = (stateno = 400 && MoveContact) || (stateno = 410 && MoveContact) || (stateno = 411 && MoveContact)
trigger5 = (stateno = 430 && MoveContact) || (stateno = 440 && MoveContact) || (stateno = 441 && MoveContact)
trigger6 = (stateno = 442 && MoveContact)

;Running Jump Medium Kick
[State -1, Jump Medium Kick]
type = null;ChangeState
triggerall = NumExplod(90000240)&& stateno = 100
trigger1 = Time >2
value = 640

;-| Crouch Punches |--------------------------------------------------------
;Crouch Light Punch
[State -1, Crouch Light Punch]
type = ChangeState
value = 400
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = NumExplod(90000200) ||  command = "x"
triggerall = NumExplod(90000021) || NumExplod(90000022) || NumExplod(90000023)
triggerall = StateType != A
trigger1 = ctrl || stateno = 100

;Crouch Medium Punch
[State -1, Crouch Medium Punch]
type = ChangeState
value = 410
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = NumExplod(90000210) ||  command = "y"
triggerall = NumExplod(90000021) || NumExplod(90000022) || NumExplod(90000023)
triggerall = StateType != A
trigger1 = ctrl || stateno = 100

;Crouch Medium Punch
[State -1, Crouch Medium Punch]
type = ChangeState
value = 411
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = NumExplod(90000210) ||  command = "y"
triggerall = NumExplod(90000021) || NumExplod(90000022) || NumExplod(90000023)
triggerall = StateType != A
trigger1 = (stateno = 200 && MoveContact)  
trigger2 = (stateno = 230 && MoveContact) 
trigger3 = (stateno = 400 && MoveContact)  
trigger4 = (stateno = 430 && MoveContact) 

;Crouch Strong Punch
[State -1, Crouch Strong Punch]
type = ChangeState
value = 420
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = NumExplod(90000220) ||  command = "z"
triggerall = NumExplod(90000021) || NumExplod(90000022) || NumExplod(90000023)
triggerall = StateType != A
trigger1 = ctrl || stateno = 100
trigger2 = (stateno = 200 && MoveContact) || (stateno = 212 && MoveContact) 
trigger3 = (stateno = 230 && MoveContact) || (stateno = 240 && MoveContact) || (stateno = 241 && MoveContact)
trigger4 = (stateno = 400 && MoveContact) || (stateno = 410 && MoveContact) || (stateno = 411 && MoveContact)
trigger5 = (stateno = 430 && MoveContact) || (stateno = 440 && MoveContact) || (stateno = 441 && MoveContact)
trigger6 = (stateno = 442 && MoveContact) || (stateno = 450 && MoveContact) || (stateno = 451 && MoveContact)

;Running Strong Punch
[State -1, Running Strong Punch]
type = ChangeState
value = 270
triggerAll = !AILevel
triggerall = Var(29)=0
trigger1 = NumExplod(90000220) && stateno = 100
trigger1 = ifElse(Facing = 1, NumExplod(90000006),NumExplod(90000004)) && !NumExplod(90000001) && !NumExplod(90000002) && !NumExplod(9000003)
trigger1 = Time >2

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

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

;Crouch Strong Kick 
[State -1, Crouch Strong Kick]
type = ChangeState
value = 450
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = NumExplod(90000250) ||  command = "c"
triggerall = NumExplod(90000021) || NumExplod(90000022) || NumExplod(90000023)
triggerall = StateType != A
trigger1 = ctrl
trigger2 = (stateno = 200 && MoveContact) || (stateno = 212 && MoveContact) ;|| (stateno = 221 && MoveContact)
trigger3 = (stateno = 230 && MoveContact) || (stateno = 240 && MoveContact) || (stateno = 241 && MoveContact)
trigger4 = (stateno = 400 && MoveContact) || (stateno = 410 && MoveContact) || (stateno = 411 && MoveContact)
trigger5 = (stateno = 430 && MoveContact) || (stateno = 440 && MoveContact) || (stateno = 441 && MoveContact)
trigger6 = (stateno = 442 && MoveContact) || (stateno = 251 && Var(9)=1 && MoveContact)

;Running Slide
[State -1, Running Slide]
type = ChangeState
value = 451
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = NumExplod(90000250) ||  command = "c"
triggerall = NumExplod(90000021) || NumExplod(90000022) || NumExplod(90000023)
triggerall = StateType != A
trigger1 = stateno = 100
trigger1 = Time >2

;-| Jump Punches |--------------------------------------------------------
;Jump Light Punch
[State -1, Jump Light Punch]
type = ChangeState
triggerAll = !AILevel
triggerall = Var(29)=0
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 = Var(29)=0
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 = Var(29)=0
triggerall = NumExplod(90000220)||command = "z"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = (StateNo = 600) || (StateNo = 630) || (StateNo = 610) || (StateNo = 640); || (StateNo = 645)
trigger2 = MoveContact
value = 620

;-| Jump Kicks |--------------------------------------------------------
;Jump Light Kick
[State -1, Jump Light Kick]
type = ChangeState
triggerAll = !AILevel
triggerall = Var(29)=0
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 = Var(29)=0
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 = Var(29)=0
triggerall = NumExplod(90000250)||command = "c"
trigger1 =  stateno = 251 && Var(9)=1 
trigger1 = MoveContact>=1&&MoveContact<=5
value = 659

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


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

; Salute
[State -1, Taunt]
type = ChangeState
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = Var(53)>=1
triggerall = NumHelper(20000)
triggerall = helper(20000), Var(5)>0
triggerall = NumExplod(90000195) || command="start"
triggerall = ((ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90000006)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90000004)))
trigger1 = stateno!=269
trigger1 = statetype != A
trigger1 = ctrl
value = 269

; Taunt
[State -1, Taunt]
type = ChangeState
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = NumExplod(90000195) || command="start"
triggerall = (!NumExplod(90000021) && !NumExplod(90000022) && !NumExplod(90000023))
trigger1 = stateno!=195
trigger1 = statetype != A
trigger1 = ctrl
value = 195

; Crouch Taunt
[State -1, Taunt]
type = ChangeState
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = NumExplod(90000195) || command="start"
triggerall = NumExplod(90000021) || NumExplod(90000022) || NumExplod(90000023)
trigger1 = stateno!=195
trigger1 = statetype != A
trigger1 = ctrl
value = 460

; Air Taunt
[State -1, Taunt]
type = ChangeState
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = NumExplod(90000195) || command="start"
trigger1 = stateno!=195
trigger1 = statetype = A
trigger1 = ctrl
value = 660

;Air Dash Forward
[State -1, Fwd]
type = ChangeState
triggerAll = !AILevel
value = 110
triggerall = Var(29)=0
triggerall = var(10) = 0 ;limiter
triggerall = ifElse(Facing = 1, NumExplod(90001016),NumExplod(90001064))
triggerall = (statetype = A) 
triggerall = stateno != 105
triggerall = !NumExplod(110)
trigger1 = (pos Y < -20) && (ctrl)
trigger2 = StateNo = 224
trigger3 = StateNo = 1054
trigger3 = Time >=10

;SSJ3 Air Dash Forward
[State -1, Fwd]
type = ChangeState
triggerAll = !AILevel
value = 3622
triggerall = Var(29)=1
triggerall = var(10) = 0 ;limiter
triggerall = ifElse(Facing = 1, NumExplod(90001016),NumExplod(90001064))
triggerall = (statetype = A) 
triggerall = stateno != 3622
trigger1 = (pos Y < -20) && (ctrl)

;Air Dash Back
[State -1, Back]
type = ChangeState
triggerAll = !AILevel
value = 115
triggerall = Var(29)=0
triggerall = var(10) = 0 ;limiter
triggerall = vel x <= 0
triggerall = stateno != 105
triggerall = ifElse(Facing = 1, NumExplod(90001064),NumExplod(90001016))
trigger1 = statetype = A
trigger1 = (pos Y < -20) && (ctrl)
trigger2 = StateNo = 224
trigger2 = statetype = A
trigger3 = StateNo = 251
trigger3 = AnimElemTime(12)>=0 && AnimElemTime(15)<0
trigger3 = statetype = S
trigger4 = StateNo = 1054
trigger4 = Time >=10
trigger4 = statetype = A

;SSJ3 Air Dash Back
[State -1, Back]
type = ChangeState
triggerAll = !AILevel
value = 3623
triggerall = Var(29)=1
triggerall = var(10) = 0 ;limiter
triggerall = vel x <= 0
triggerall = stateno != 3623
triggerall = ifElse(Facing = 1, NumExplod(90001064),NumExplod(90001016))
trigger1 = statetype = A
trigger1 = (pos Y < -20) && (ctrl)

; Run Fwd
[State -1, Run Fwd]
type = ChangeState
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = NumExplod(220)<2
triggerall = (ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90001016)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90001064))
triggerall = statetype = S && roundstate=2
triggerall = (stateno!=[100,106])
trigger1 = ctrl 
trigger2 = StateNo = 224
value = 100

; SSJ3 Run Fwd
[State -1, Run Fwd]
type = ChangeState
triggerAll = !AILevel
triggerall = Var(29)=1
triggerall = (ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90001016)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90001064))
triggerall = statetype = S && roundstate=2
triggerall = (stateno!=[3620,3626])
trigger1 = ctrl 
value = 3620

; Run Back
[State -1, Run Back]
type = ChangeState
value = 105
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = (ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90001064)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90001016))
triggerall = statetype = S && roundstate=2
trigger1 = ctrl
trigger2 = StateNo = 224

; Run Back
[State -1, Run Back]
type = ChangeState
value = 3621
triggerAll = !AILevel
triggerall = Var(29)=1
triggerall = (ifElse(P2DisT x < -12, Facing = -1, Facing = 1) && NumExplod(90001064)) || (ifElse(P2DisT x < -12, Facing = 1, Facing = -1) && NumExplod(90001016))
triggerall = statetype = S && roundstate=2
trigger1 = ctrl

; Super Jump
;This state executes only after performing the air launcher
[State -1, Jump Launcher]
type = ChangeState
value = 10230
triggerAll = !AILevel
triggerall = Var(29)=0
triggerall = NumExplod(90000008) || NumExplod(90000009) || NumExplod(90000007)
trigger1 = stateno = 225 && animelemtime(4)>0 && MoveHit
trigger1 = statetype = S 
trigger2 = stateno = 226 && animelemtime(4)>0 && MoveHit
trigger2 = statetype = S 
trigger3 = stateno = 227 && animelemtime(5)>0 && MoveHit
trigger3 = statetype = S 

[State -1, Super Jump Forward]
type = ChangeState
value = 10232
triggerall = Var(29)=0
triggerall= !AILevel
triggerall = !Var(34)
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 = Var(29)=0
triggerall= !AILevel
triggerall = !Var(34)
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 = Var(29)=0
triggerall= !AILevel
triggerall = !Var(34)
trigger1 = StateType = S
trigger1 = ctrl
trigger1 = NumExplod(90000408)

[State 0, ChangeState]
type = ChangeState
triggerAll = !AILevel
triggerall = StateNo=3600
trigger1 = command = "holddown" || command = "down"
value = 3600
ctrl = 1


;-----------------------GHOSTS-------------------------------
;------------------------------------------------------------

[State -1,U1]
type = Explod
triggerAll = !AILevel
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 = 91111118
removeTime = 20
pauseMoveTime = 20
superMoveTime = 20
ignoreHitPause = 1

;----------------------------------------
;----------------------------------------
;Cinematic Super! Leave!
[State 0, ChangeState]
type = ChangeState
triggerall = IsHelper(30000) 
triggerall = StateNo != [30060,30062]
triggerall = StateNo != 31500
triggerall = root, MoveType = H
triggerall = RoundState = 2
trigger1 = enemy, AnimExist(5939)
trigger1 = enemy, NumExplod(991901)
trigger2 = !enemy, AnimExist(5939)
trigger2 = root, Var(43)=1
trigger2 = root, NumExplod(3502)
trigger2 = root,var(48)-root,var(49)>=30
trigger3 = !enemy, AnimExist(5939)
trigger3 = root, Var(43)=2
trigger3 = root, NumExplod(3502)
trigger3 = root,var(48)-root,var(49)>=60
trigger4 = !enemy, AnimExist(5939)
trigger4 = root, Var(43)=3
trigger4 = root, NumExplod(3502)
trigger4 = root,var(48)-root,var(49)>=90
trigger5 = !enemy, AnimExist(5939)
trigger5 = root, Var(43)=4
trigger5 = root, NumExplod(3502)
trigger5 = root,var(48)-root,var(49)>=120
trigger6 = !enemy, AnimExist(5939)
trigger6 = root, Var(43)=5
trigger6 = root, NumExplod(3502)
trigger6 = root,var(48)-root,var(49)>=150
trigger7 = !enemy, AnimExist(5939)
trigger7 = root, NumExplod(3502)
trigger7 = root, Var(43)=6
trigger7 = root,var(48)-root,var(49)>=180
value = 30060
ctrl = 0

;----------------------------------------
;Cinematic Super! Leave!
[State 0, ChangeState]
type = ChangeState
triggerall = IsHelper(30000) 
triggerall = StateNo != [30060,30062]
triggerall = StateNo != 31500
triggerall = RoundState = 2
trigger1 = root, NumExplod(991901)
value = 30060
ctrl = 0

[State 0, RemapPal]
type = RemapPal
triggerall = IsHelper(30000) 
trigger1 = root,Anim = 2700 || root,Anim = 2710 || root,anim = 3601
trigger1 = root,Time = 4
source = 1,1
dest = 2,root,Var(58)

;===========================================================================
; AI
;===========================================================================

;AI Jump
[State 0, ChangeState AI Jump]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType = S  
triggerall = Ctrl = 1
triggerall = Var(29)=0
trigger1 = random <100*(AIlevel ** 2 / 64.0)
trigger1 = (StateNo = 20) && Time >15
trigger2 = p2bodydist x<140
trigger2 = P2MoveType = H && P2StateType = A
trigger2 = random <200*(AIlevel ** 2 / 64.0)
trigger3 = P2BodyDist Y <0
trigger3 = P2MoveType = A
trigger3 = enemynear, Facing = Facing
trigger3 = random <200*(AIlevel ** 2 / 64.0)
trigger3 = P2BodyDist X = [10,30]
trigger4 = (P2StateNo!=[3430,3433]) && P2MoveType = H
value = 40
ctrl = 0

;aiStand Light Punch
[State -1, aiStand Light Punch]
type = ChangeState
value = 3648
triggerall = Var(29)=1
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A
triggerall =(p2bodydist x = [0, 30]) && (p2bodydist Y = [-10, 30]) && P2statetype != C && P2statetype != L
trigger1 = ctrl && random < 550*(AIlevel ** 2 / 64.0)
trigger2 = (stateno = [100,101]) && random < 250*(AIlevel ** 2 / 64.0)
trigger3 = ctrl&&(enemynear,ctrl) && random < 600*(AIlevel ** 2 / 64.0)

;aiJump Light Punch
[State -1, aiJump Light Punch]
type = ChangeState
value = 3660
triggerall = Var(29)=1
triggerall = AILevel>0 && numenemy && roundstate=2 && statetype = A
triggerall = (p2bodydist x = [2,40]) && (p2bodydist y = [-60,60]) && p2statetype != L
trigger1 = ctrl

;aiStand Medium Punch
[State -1, aiStand Medium Punch]
type = ChangeState
value = 3649
triggerAll = AILevel
triggerall = Var(29)=1
triggerall = numenemy && roundstate=2 && StateType != A  && P2statetype != C
triggerall = (p2bodydist x = [0, 100]) && p2statetype != L
trigger1 = ctrl && random < 350*(AIlevel ** 2 / 64.0)
trigger2 = StateNo = 3648 && MoveHit
trigger2 = random < 400*(AIlevel ** 2 / 64.0)
trigger3 = StateNo = 3654 && MoveHit
trigger3 = random < 400*(AIlevel ** 2 / 64.0)
trigger4 = StateNo = 3620
trigger4 = Time >=7
trigger4 = random < 400*(AIlevel ** 2 / 64.0)

;aiJump Medium Punch
[State -1, aiJump Medium Punch]
type = ChangeState
value = 3661
triggerall = Var(29)=1
triggerall = AILevel>0 && numenemy && roundstate=2 && statetype = A
triggerall = (p2bodydist x = [30,80]) && (p2bodydist y = [-60,60]) && p2statetype != L
trigger1 = ctrl && random < 250*(AIlevel ** 2 / 64.0)
trigger2 = StateNo = 3660
trigger2 = Movehit && random < 450*(AIlevel ** 2 / 64.0)
trigger3 = StateNo = 3664
trigger3 = Movehit && random < 450*(AIlevel ** 2 / 64.0)
trigger4 = StateNo = 3622
trigger4 = Time >=7

;aiStand Hard Punch
[State -1, aiStand Hard Punch]
type = ChangeState
value = 3651
triggerall = Var(29)=1
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A  && P2statetype != C
triggerall = (p2bodydist x = [10, 75]) && p2statetype != L || (p2bodydist x >150)
trigger1 = ctrl && random < 150*(AIlevel ** 2 / 64.0)
trigger2 = StateNo = 3648 && MoveHit
trigger2 = random < 400*(AIlevel ** 2 / 64.0)
trigger3 = StateNo = 3654 && MoveHit
trigger3 = random < 400*(AIlevel ** 2 / 64.0)
trigger4 = StateNo = 3649 && MoveHit
trigger4 = random < 400*(AIlevel ** 2 / 64.0)
trigger5 = StateNo = 3655 && MoveHit
trigger5 = random < 400*(AIlevel ** 2 / 64.0)

;aiJump Hard Punch
[State -1, aiJump Hard Punch]
type = ChangeState
value = 3662
triggerall = Var(29)=1
triggerall = AILevel>0 && numenemy && roundstate=2 && statetype = A
triggerall = (p2bodydist x = [0,60]) && (p2bodydist y = [-60,60]) && p2statetype != L
trigger1 = ctrl && random < 250*(AIlevel ** 2 / 64.0)
trigger2 = StateNo = 3660 
trigger2 = Movehit && random < 450*(AIlevel ** 2 / 64.0)
trigger3 = StateNo = 3664 
trigger3 = Movehit && random < 450*(AIlevel ** 2 / 64.0)
trigger4 = StateNo = 3661 
trigger4 = Movehit && random < 450*(AIlevel ** 2 / 64.0)
trigger5 = StateNo = 3665 
trigger5 = Movehit && random < 450*(AIlevel ** 2 / 64.0)

;aiStand Light Kick
[State -1, aiStand Light Kick]
type = ChangeState
value = 3654
triggerall = Var(29)=1
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A  && P2statetype != A
triggerall = (p2bodydist x = [10, 45]) && p2statetype != L
trigger1 = ctrl && random < 150*(AIlevel ** 2 / 64.0)

;aiJump Light Kick
[State -1, aiJump Light Kick]
type = ChangeState
value = 3664
triggerall = Var(29)=1
triggerall = AILevel>0 && numenemy && roundstate=2 && statetype = A
triggerall = (p2bodydist x = [5,50]) && (p2bodydist y = [-20,60]) && p2statetype != L
trigger1 = ctrl && random < 250*(AIlevel ** 2 / 64.0)

;aiStand Medium Kick
[State -1, aiStand Medium Kick]
type = ChangeState
value = 3655
triggerall = Var(29)=1
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A  ;&& P2statetype != C
triggerall = (p2bodydist x = [40, 100]) && p2statetype != L
trigger1 = ctrl && random < 150*(AIlevel ** 2 / 64.0)
trigger2 = StateNo = 3648 && MoveHit
trigger2 = random < 150*(AIlevel ** 2 / 64.0)
trigger3 = StateNo = 3654 && MoveHit
trigger3 = random < 150*(AIlevel ** 2 / 64.0)
trigger4 = StateNo = 3620 
trigger4 = Time >=7
trigger4 = random < 150*(AIlevel ** 2 / 64.0)

;aiJump Medium Kick
[State -1, aiJump Medium Kick]
type = ChangeState
value = 3665
triggerall = Var(29)=1
triggerall = AILevel>0 && numenemy && roundstate=2 && statetype = A
triggerall = (p2bodydist x = [5,100]) && (p2bodydist y = [-20,60]) && p2statetype != L
trigger1 = ctrl && random < 250*(AIlevel ** 2 / 64.0)
trigger2 = StateNo = 3660
trigger2 = Movehit && random < 450*(AIlevel ** 2 / 64.0)
trigger3 = StateNo = 3664
trigger3 = Movehit && random < 450*(AIlevel ** 2 / 64.0)
trigger4 = StateNo = 3622
trigger4 = Time >=7
trigger4 = random < 250*(AIlevel ** 2 / 64.0)

;aiStand Hard Kick
[State -1, aStand Hard Kick]
type = ChangeState
value = 3656
triggerall = Var(29)=1
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A  && P2statetype != A
triggerall = (p2bodydist x = [90, 150]) && p2statetype != L
trigger1 = ctrl && random < 150*(AIlevel ** 2 / 64.0)
trigger2 = StateNo = 3648 && MoveHit
trigger2 = random < 150*(AIlevel ** 2 / 64.0)
trigger3 = StateNo = 3654 && MoveHit
trigger3 = MoveContact
trigger4 = StateNo = 3649 && MoveHit
trigger4 = random < 150*(AIlevel ** 2 / 64.0)
trigger5 = StateNo = 3655 && MoveHit
trigger5 = random < 150*(AIlevel ** 2 / 64.0)
trigger6 = StateNo = 3620
trigger6 = Time >=7
trigger6 = random < 150*(AIlevel ** 2 / 64.0)

;aiJump Hard Kick
[State -1, aiJump Hard Kick]
type = ChangeState
value = 3666
triggerall = Var(29)=1
triggerall = Pos Y <=-30
triggerall = AILevel>0 && numenemy && roundstate=2 && statetype = A
triggerall = (p2bodydist x = [5,80]) && (p2bodydist y = [-20,80]) && p2statetype != L
trigger1 = ctrl && random < 250*(AIlevel ** 2 / 64.0)
trigger2 = StateNo = 3660
trigger2 = Movehit && random < 450*(AIlevel ** 2 / 64.0)
trigger3 = StateNo = 3664
trigger3 = Movehit && random < 450*(AIlevel ** 2 / 64.0)
trigger4 = StateNo = 3661
trigger4 = Movehit && random < 450*(AIlevel ** 2 / 64.0)
trigger5 = StateNo = 3665
trigger5 = Movehit && random < 450*(AIlevel ** 2 / 64.0)
trigger6 = StateNo = 3622
trigger6 = Time >=7
trigger6 = random < 250*(AIlevel ** 2 / 64.0)

; ai SSJ3 Taunt
[State -1, aiTaunt]
type = ChangeState
triggerall = Var(29)=1
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A
triggerall = ctrl
trigger1 = P2movetype=A 
trigger1 = (p2bodydist x>=100) && (p2StateType = L)&& P2statetype != A 
trigger1 = random < 150*(AIlevel ** 2 / 64.0)
trigger2 = (p2bodydist x>=100) && P2statetype != A 
trigger2 = random > 900*(AIlevel ** 2 / 64.0)
trigger2 = StateNo != 195
trigger2 = PrevStateNo != 195
value = 3625

; ai SSJ3 Air Taunt
[State -1, aiTaunt]
type = ChangeState
triggerall = Var(29)=1
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType = A
triggerall = ctrl
trigger1 = P2movetype=A 
trigger1 = (p2bodydist x>=100) && (p2bodydist y>=40)&& P2statetype != A 
trigger1 = random < 150*(AIlevel ** 2 / 64.0)
trigger2 = Vel Y >0 && Pos Y >-40
trigger2 = random < 850*(AIlevel ** 2 / 64.0)
trigger2 = (p2bodydist x>=100)
value = 3626

;aiPortal
[State -1, aiPortal]
type = ChangeState
value = 3684
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A
triggerall = Var(29)=1
triggerall = NumHelper(3677) <=1
triggerall = ctrl && Var(32)>0
trigger1 = random < 550*(AIlevel ** 2 / 64.0)
trigger1 = P2BodyDist X >20
trigger1 = P2MoveType != A
trigger2 = P2MoveType = H 
trigger2 = random < 650*(AIlevel ** 2 / 64.0)

;aiAir Portal
[State -1, aiair Portal]
type = ChangeState
value = 3685
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType = A
triggerall = Var(29)=1
triggerall = NumHelper(3677) <=1
triggerall = ctrl && Var(32)>0
trigger1 = random < 550*(AIlevel ** 2 / 64.0)
trigger1 = P2BodyDist X >20
trigger1 = P2MoveType != A
trigger2 = P2MoveType = H 
trigger2 = random < 650*(AIlevel ** 2 / 64.0)

;aiGround Punch
[State -1, Ground Punch]
type = ChangeState
value = 3658
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A
triggerall = Var(29)=1
triggerall = p2statetype !=A
trigger1 = random < 250*(AIlevel ** 2 / 64.0)
trigger1 = ctrl 
trigger2 = StateNo = 3648
trigger2 = MoveContact && random < 150*(AIlevel ** 2 / 64.0)
trigger3 = StateNo = 3654
trigger3 = MoveContact && random < 150*(AIlevel ** 2 / 64.0)
trigger4 = StateNo = 3649
trigger4 = MoveContact && random < 150*(AIlevel ** 2 / 64.0)
trigger5 = StateNo = 3655
trigger5 = MoveContact && random < 150*(AIlevel ** 2 / 64.0)

;aiJump Ground Punch
[State -1, jump Ground Punch]
type = ChangeState
value = 3680
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType = A
triggerall = Var(29)=1
trigger1 = p2statetype !=A
trigger1 = random < 250*(AIlevel ** 2 / 64.0)
trigger1 = ctrl 
trigger2 = StateNo = 3660
trigger2 = MoveContact && random < 150*(AIlevel ** 2 / 64.0)
trigger3 = StateNo = 3664
trigger3 = MoveContact && random < 150*(AIlevel ** 2 / 64.0)
trigger4 = StateNo = 3661
trigger4 = MoveContact && random < 150*(AIlevel ** 2 / 64.0)
trigger5 = StateNo = 3665
trigger5 = MoveContact && random < 150*(AIlevel ** 2 / 64.0)

;aiStand Mouth Beam
[State -1, Stand Mouth Beam]
type = ChangeState
value = 3657
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A
triggerall = Var(29)=1
trigger1 = random < 350*(AIlevel ** 2 / 64.0)
triggerall = (P2BodyDist Y = [-30,30])
trigger1 = ctrl && (P2BodyDist X >20)
trigger2 = StateNo = 3648
trigger2 = MoveContact && random < 150*(AIlevel ** 2 / 64.0)
trigger3 = StateNo = 3654
trigger3 = MoveContact && random < 150*(AIlevel ** 2 / 64.0)
trigger4 = StateNo = 3649
trigger4 = MoveContact && random < 150*(AIlevel ** 2 / 64.0)
trigger5 = StateNo = 3655
trigger5 = MoveContact && random < 150*(AIlevel ** 2 / 64.0)
trigger6 = StateNo = 3651
trigger6 = MoveContact && random < 150*(AIlevel ** 2 / 64.0)
trigger7 = StateNo = 3656
trigger7 = MoveContact && random < 150*(AIlevel ** 2 / 64.0)

;aiJump Mouth Beam
[State -1, Jump Mouth Beam]
type = ChangeState
value = 3667
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType = A
triggerall = Var(29)=1
trigger1 = random < 350*(AIlevel ** 2 / 64.0)
triggerall = (P2BodyDist Y = [-30,30])
trigger1 = ctrl && (P2BodyDist X >20)
trigger2 = StateNo = 3660
trigger2 = MoveContact && random < 150*(AIlevel ** 2 / 64.0)
trigger3 = StateNo = 3664
trigger3 = MoveContact && random < 150*(AIlevel ** 2 / 64.0)
trigger4 = StateNo = 3661
trigger4 = MoveContact && random < 150*(AIlevel ** 2 / 64.0)
trigger5 = StateNo = 3665
trigger5 = MoveContact && random < 150*(AIlevel ** 2 / 64.0)
trigger6 = StateNo = 3662
trigger6 = MoveContact && random < 150*(AIlevel ** 2 / 64.0)
trigger7 = StateNo = 3666
trigger7 = MoveContact && random < 150*(AIlevel ** 2 / 64.0)

;aiSSJ3 Ghost Spit
[State -1, aiSSJ3 Ghost Spit]
type = ChangeState
value = 3682
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A
triggerall = !NumHelper(3674)
triggerall = Var(29)=1
triggerall = ctrl
trigger1 = random < 350*(AIlevel ** 2 / 64.0)
trigger1 = (P2BodyDist X >30) && P2MoveType != H || P2MoveType = H
trigger2 = P2StateType = L
trigger2 = random < 550*(AIlevel ** 2 / 64.0)

;aiSSJ3 aiAir Ghost Spit
[State -1, SSJ3 Air Ghost Spit]
type = ChangeState
value = 3683
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType = A
triggerall = !NumHelper(3674)
triggerall = Var(29)=1
triggerall = ctrl
trigger1 = random < 350*(AIlevel ** 2 / 64.0)
trigger1 = (P2BodyDist X >30) && P2MoveType != H || P2MoveType = H
trigger2 = P2StateType = L
trigger2 = random < 550*(AIlevel ** 2 / 64.0)

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

[State -1, AirGuard];Don't airguard if you've dashed or moving forward
type = AssertSpecial
triggerall= AILevel>0 && numenemy
triggerall = var(10) = 1 || vel x >= 0.1
trigger1 = 1
flag = NoAirGuard
IgnoreHitPause = 1

[State -1, Fall Recovery AI]
type=ChangeState
value= ifelse((pos y>=-20), 5200, 5210)
trigger1= AILevel && numenemy
trigger1= RoundState=2 && alive
trigger1= StateNo=5050 && canrecover
trigger1= vel y>=-1 && ceil(random<=50*(AILevel**2/64.0))

; AI Air Taunt
[State -1, AI Air Taunt]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType = A
triggerall= var(29)=0  
triggerall = ctrl
trigger1 = P2movetype=A 
trigger1 = (p2bodydist x>=100) && (p2bodydist y>=40)&& P2statetype != A 
trigger1 = random < 150*(AIlevel ** 2 / 64.0)
trigger2 = Vel Y >0 && Pos Y >-40
trigger2 = random < 850*(AIlevel ** 2 / 64.0)
trigger2 = (p2bodydist x>=100)
value = 660

; aiSalute
[State -1, Taunt]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType = S
triggerall = Var(29)=0
triggerall = Var(53)>=1
triggerall = NumHelper(20000)
triggerall = helper(20000), Var(5)>0
trigger1 = stateno!=269
trigger1 = (p2bodydist x>=100) && (p2StateType = L)&& P2statetype != A 
trigger1 = random < 150*(AIlevel ** 2 / 64.0)
trigger1 = ctrl
value = 269

; AI Stand Taunt
[State -1, AI Stand Taunt]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType = S
triggerall= var(29)=0  
triggerall = ctrl
trigger1 = P2movetype=A 
trigger1 = (p2bodydist x>=100) && (p2StateType = L)&& P2statetype != A 
trigger1 = random < 150*(AIlevel ** 2 / 64.0)
trigger2 = (p2bodydist x>=100) && P2statetype != A 
trigger2 = random > 900*(AIlevel ** 2 / 64.0)
trigger2 = StateNo != 195
trigger2 = PrevStateNo != 195
value = 195

; AI Crouch Taunt
[State -1, AI Crouch Taunt]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType = C
triggerall= var(29)=0  
triggerall = ctrl
trigger1 = P2movetype=A 
trigger1 = (p2bodydist x>=100) && (p2StateType = L)&& P2statetype != A 
trigger1 = random < 150*(AIlevel ** 2 / 64.0)
trigger2 = (p2bodydist x>=100) && P2statetype != A 
trigger2 = random > 900*(AIlevel ** 2 / 64.0)
value = 460

;AI Air Dash 
[State -1, Air Dash AI]
type = ChangeState
triggerall = Var(29)=0
value = Ifelse(enemynear,Movetype=A&&enemynear, vel x>0&&random<150,115,110)
triggerall = AILevel >= 1 && RoundState = 2 && numenemy && var(10) = 0 && pos Y < -20
triggerall = StateType = A && (p2bodydist x>=80) && (p2bodydist y=[-44,44])
triggerall = ceil(random<=80*(AILevel**2/64.0))
trigger1 = ctrl
trigger2 = StateNo = 1054
trigger2 = Time >=10
[State -1, Air Dash AI]
type = ChangeState
triggerall = Var(29)=0
value = 115
triggerall = AILevel >= 1 && RoundState = 2 && numenemy && var(10) = 0 
trigger1 = (p2bodydist x>=80) && (p2bodydist y=[-44,44])
trigger1 = StateNo = 251 && random<300*((AIlevel**2)/64.0)
trigger1 = AnimElemTime(12)>=0 && AnimElemTime(15)<0
trigger1 = statetype = S
trigger2 = StateNo = 224 && random<300*((AIlevel**2)/64.0)
trigger2 = (P2BodyDist X = [10,50]) && P2StateType != A
trigger2 = StateType = A
[State -1, Air Dash AI]
type = ChangeState
triggerall = Var(29)=0
value = 110
triggerall = AILevel >= 1 && RoundState = 2 && numenemy && var(10) = 0 
triggerall = StateNo = 224 && random<300*((AIlevel**2)/64.0)
trigger1 = (P2BodyDist X = [-10,-50]) && P2StateType != A
triggerall = StateType = A
trigger2 = P2BodyDist X >150
trigger2 = Time > 240
trigger3 = Time > 440

;AI SSJ3 Air Dash 
[State -1, AI SSJ3 Air Dash]
type = ChangeState
value = Ifelse(enemynear,Movetype=A&&enemynear, vel x>0&&random<150,3623,3622)
triggerall = Var(29)=1
triggerall = AILevel >= 1 && RoundState = 2 && numenemy && var(10) = 0 && pos Y < -20
triggerall = StateType = A && (p2bodydist x>=80) && (p2bodydist y=[-44,44])
triggerall = ceil(random<=80*(AILevel**2/64.0))
trigger1 = ctrl

; AI8 Run Fwd
[State -1, AI8 Run Fwd]
type = ChangeState
triggerall = AILevel=8 && numenemy && roundstate=2 && StateType != A  
triggerall = Var(29)=0
triggerall = NumExplod(220)<2
triggerall = statetype = S 
trigger1 = NumExplod(221)
trigger1 = StateNo = 224 || StateNo = 225
value = 100

; AI Run Fwd
[State -1, AI Run Fwd]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A  
triggerall = Var(29)=0
triggerall = NumExplod(220)<2
triggerall = random<300*((AIlevel**2)/64.0)
triggerall = statetype = S 
triggerall = (stateno!=[100,106])
trigger1 = ctrl 
trigger1 = P2BodyDist X >=150 || enemynear, Pos Y <80 && Vel Y >0 && P2BodyDist X = [0,50]
trigger2 = StateNo = 224 && P2MoveType=H
value = 100

; SSJ3 AI Run Fwd
[State -1, SSJ3 AI Run Fwd]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A  
triggerall = Var(29)=1
triggerall = random<300*((AIlevel**2)/64.0)
triggerall = statetype = S && roundstate=2
triggerall = (stateno!=[3620,3626])
trigger1 = ctrl 
trigger1 = P2BodyDist X >=100 
value = 3620

; Super Jump
;This state executes only after performing the air launcher
[State -1, AI Jump Launcher]
type = ChangeState
value = 10230
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A  
triggerall = Var(29)=0
triggerall = Movehit && random < 450*(AIlevel ** 2 / 64.0)
trigger1 = stateno = 225 && animelemtime(4)>0 && MoveHit
trigger1 = statetype = S 
trigger2 = stateno = 226 && animelemtime(4)>0 && MoveHit
trigger2 = statetype = S 
trigger3 = stateno = 227 && animelemtime(5)>0 && MoveHit
trigger3 = statetype = S 

; AI Run Back
[State -1, AI Run Back]
type = ChangeState
value = 105
triggerall = Var(29)=0
triggerall= AILevel>0 && numenemy
triggerall= roundstate=2 && statetype=S
triggerall= ctrl && (stateno!=105)
trigger1= (enemynear,movetype=A) && backedgedist>=80 && (p2bodydist x=[80,120]) && (enemynear,vel x)
trigger1= random<ifelse((enemynear,hitdefattr=SC,AT),100,50)
trigger2 = StateNo = 224 && random<300*((AIlevel**2)/64.0) 
trigger2 = P2StateType = A
trigger2 = (P2BodyDist X = [10,50]) && enemynear, Vel Y >0

; SSJ3 AI Run Back
[State -1, AI Run Back]
type = ChangeState
value = 3621
triggerall = Var(29)=1
triggerall= AILevel>0 && numenemy
triggerall= roundstate=2 && statetype=S
triggerall= ctrl && (stateno!=3621)
trigger1= (enemynear,movetype=A) && backedgedist>=80 && (p2bodydist x=[80,120]) && (enemynear,vel x)
trigger1= random<ifelse((enemynear,hitdefattr=SC,AT),100,50)
trigger2 = StateNo = 224&& random<300*((AIlevel**2)/64.0)

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

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

;AI Power Charge
[State -1, AI Power Charge]
type=changestate
triggerall= AILevel>0 && numenemy && roundstate=2 && statetype!=A
triggerall = var(29)=0 
triggerall = !NumHelper(3410)
triggerall = !NumHelper(3310)
triggerall = Var(50)<=0
triggerall= power<const(data.power) && enemynear,Movetype!=A && !(enemynear,ctrl)
triggerall=  power < const(data.power) && power < powermax
triggerall= !inguarddist && random<900 && (p2bodydist x>=120 && !NumExplod(801) || NumExplod(801))
triggerall = stateno != [900,901]
triggerall= ctrl
trigger1=(enemynear,Movetype=H||enemynear,statetype=L)
trigger2=enemynear,vel x<0
trigger3=enemynear,stateno=[120,155]
trigger4=enemynear,Movetype=I
value=900

;AI SSJ Power Charge
[State -1, AI Power Charge]
type=changestate
triggerall= AILevel>0 && numenemy && roundstate=2 && statetype!=A
triggerall = var(29)=0 
triggerall = !NumHelper(3410)
triggerall = !NumHelper(3310)
triggerall = Var(50)>0
triggerall= (power<const(data.power) || Var(51)<3000) && enemynear,Movetype!=A && !(enemynear,ctrl)
triggerall=  (power < const(data.power) && power < powermax) && Var(51)<3000
triggerall= !inguarddist && random<900 && (p2bodydist x>=120 && !NumExplod(801) || NumExplod(801))
triggerall = stateno != [902,903]
triggerall= ctrl
trigger1=(enemynear,Movetype=H||enemynear,statetype=L)
trigger2=enemynear,vel x<0
trigger3=enemynear,stateno=[120,155]
trigger4=enemynear,Movetype=I
value=902

; Exit SSJ2 Mode
[State -1]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A
triggerall = Var(29)=0
triggerall = Var(9) < 9997
triggerall = roundstate = 2
triggerall = var(50)>0 ;In SSJ2
triggerall = Var(52)>1000 && Power <1000
triggerall = enemy, Life <200 && P2MoveType = A
triggerall = Life <200
triggerall = !WinKo
trigger1 = ctrl && random < 550*(AIlevel ** 2 / 64.0)
value = 2790


;AI8 INSULT!
[State -1, AI8 Insult!]
type = ChangeState
value = 1100
triggerall=  AILevel=8 && numenemy && roundstate = 2 && statetype != A
triggerall = Var(29)=0
triggerall = !NumHelper(1110)  
triggerall = !NumHelper(1116)
triggerall = !NumProjID(3420)
triggerall = !NumProjID(3421)
triggerall = Var(32)>0
trigger1 = MoveContact
trigger1 = StateNo = 442
trigger2 = MoveGuarded
trigger2 = StateNo = 200 || StateNo = 230 || StateNo = 400 || StateNo = 430 

; AI8 Standing Medium Kick
[State -1, AI8 Standing Medium Kick]
type = ChangeState
triggerall = Var(29)=0
triggerall = AILevel=8 && numenemy && roundstate=2 && StateType != A  ;&& P2statetype != C
triggerall = !NumProjID(3420)
triggerall = !NumProjID(3421)
trigger1 = MoveHit
trigger1 = StateNo = 200 || StateNo = 230 || StateNo = 400 || StateNo = 430 || StateNo = 410 || StateNo = 411
value = 240
; AI8 Standing Medium Kick 2
[State -1, AI8 Standing Medium Kick 2]
type = ChangeState
triggerall = Var(29)=0
triggerall = AILevel=8 && numenemy && roundstate=2 && StateType != A  ;&& P2statetype != C
triggerall = !NumProjID(3420)
triggerall = !NumProjID(3421)
trigger1 = MoveHit
trigger1 = StateNo = 240
value = 241

; AI8 Crouching Medium Kick 2
[State -1, AI8 Standing Medium Kick 2]
type = ChangeState
triggerall = Var(29)=0
triggerall = AILevel=8 && numenemy && roundstate=2 && StateType = C  ;&& P2statetype != C
trigger1 = MoveHit
trigger1 = StateNo = 440
value = 441
; AI8 Crouchinging Medium Kick 3
[State -1, AI8 Standing Medium Kick 3]
type = ChangeState
triggerall = Var(29)=0
triggerall = AILevel=8 && numenemy && roundstate=2 && StateType = C  ;&& P2statetype != C
trigger1 = MoveHit
trigger1 = StateNo = 441
value = 442

; AI8 Stand Strong Punch
[State -1, AI8 Stand Strong Punch]
type = ChangeState
triggerall = Var(29)=0
triggerall = AILevel=8 && numenemy && roundstate=2 && StateType != A  && P2statetype != A
trigger1 = !NumExplod(220)
trigger1 = MoveHit 
trigger1 = P2MoveType = H
trigger1 = P2BodyDist X = [-10,40]
trigger1 = StateNo = 241 || StateNo = 243
value = 220

; AI8 Stand Light Punch
[State -1, AI Stand Light Punch]
type = ChangeState
triggerall = Var(29)=0
triggerall = AILevel=8 && numenemy && roundstate=2 && StateType != A
trigger1 = StateNo = 100
trigger1 = NumExplod(220)
trigger1 = P2BodyDist X =[0,30]
value = 200

; AI8 Standing Strong Kick
[State -1, AI8 Standing Strong Kick]
type = ChangeState
triggerall = Var(29)=0
triggerall = AILevel=8 && numenemy && roundstate=2 && StateType != A  
trigger1 = MoveContact
trigger1 = StateNo = 241
value = 251

;AI Running Strong Punch
[State -1, AI Running Strong Punch]
type = ChangeState
value = 270
triggerall = Var(29)=0
triggerall = AILevel>0 && numenemy && roundstate=2 && statetype != A 
triggerall = Time >2
triggerall = stateno = 100
triggerall = !NumProjID(3420)
triggerall = !NumProjID(3421)
trigger1 = random < 250*(AIlevel ** 2 / 64.0)
trigger1 = (p2bodydist x = [0,100])
trigger2 = random < 550*(AIlevel ** 2 / 64.0)
trigger2 = (p2bodydist x = [0,100])
trigger2 = P2MoveType = H && (P2StateNo !=[120,155])

;Running Slide
[State -1, Running Slide]
type = ChangeState
value = 451
triggerall = Var(29)=0
triggerall = AILevel>0 && numenemy && roundstate=2 && statetype != A 
triggerall = Time >2
triggerall = !NumProjID(3420)
triggerall = !NumProjID(3421)
trigger1 = stateno = 100
trigger1 = random < 350*(AIlevel ** 2 / 64.0)
trigger1 = (p2bodydist x = [0,80])

; AI Stand Light Punch
[State -1, AI Stand Light Punch]
type = ChangeState
triggerall = Var(29)=0
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A
triggerall =(p2bodydist x = [-5, 30]) &&(p2bodydist Y = [-20, 30]) &&P2statetype != C && P2statetype != L
triggerall = !NumProjID(3420)
triggerall = !NumProjID(3421)
trigger1 = ctrl && random < 550*(AIlevel ** 2 / 64.0)
trigger2 = (stateno = [100,101]) && random < 250*(AIlevel ** 2 / 64.0) && !NumProjID(220)
trigger3 = ctrl&&(enemynear,ctrl) && random < 600*(AIlevel ** 2 / 64.0)
trigger4 = ctrl && random < 550*(AIlevel ** 2 / 64.0)
trigger4 = P2MoveType = H
value = 200

; AI Stand Medium Punch
[State -1, AI Stand Medium Punch]
type = ChangeState
triggerall = Var(29)=0
triggerall = (AILevel>0&&AILevel<5) && numenemy && roundstate=2 && StateType != A  && P2statetype != C
triggerall = (p2bodydist x = [-15, 80]) && (p2bodydist Y = [-20, 30]) && p2statetype != L
triggerall = !NumProjID(3420)
triggerall = !NumProjID(3421)
trigger1 = ctrl && random < 50*(AIlevel ** 2 / 64.0)
value = 210

; AI Stand Medium Punch Far Away
[State -1, AI Stand Medium Punch far]
type = ChangeState
triggerall = Var(29)=0
triggerall = (AILevel>0&&AILevel<5) && numenemy && roundstate=2 && StateType != A  && P2statetype != C
triggerall = !NumProjID(3420)
triggerall = !NumProjID(3421)
trigger1 = (p2bodydist x > 120) && p2statetype != L
trigger1 = ctrl && random < 50*(AIlevel ** 2 / 64.0)
trigger2 = ((stateno = 200) || (stateno = 205) || (stateno = 230) || (stateno = 240))&& movehit
trigger2 = random < 600*(AIlevel ** 2 / 64.0)
trigger3 = (stateno = [100,101]) && random < 250*(AIlevel ** 2 / 64.0) 
trigger4 = ((stateno = 400) || (stateno = 430)) && movehit
trigger4 = random < 400*(AIlevel ** 2 / 64.0)
trigger5 = (p2bodydist x = [-15, 80]) && p2statetype != L
trigger5 = ctrl && random < 100*(AIlevel ** 2 / 64.0)
value = 210

; AI Stand Strong Punch
[State -1, AI Stand Strong Punch]
type = ChangeState
triggerall = Var(29)=0
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A  && P2statetype != C
triggerall = (p2bodydist x = [10, 75]) && (p2bodydist Y = [-20, 30]) && p2statetype != L || (p2bodydist x >150)
triggerall = !NumProjID(3420)
triggerall = !NumProjID(3421)
triggerall = (Var(50)>0 && random < 300*(AIlevel ** 2 / 64.0))
trigger1 = ctrl 
trigger2 = StateType != A && movehit
trigger2 = (stateno = 200) || (stateno = 212)  || (stateno = 230) || (stateno = 240) || (stateno = 241)
trigger2 = movehit && random < 300*(AIlevel ** 2 / 64.0)
trigger3 = (stateno = 100 || stateno = 101) && random < 250*(AIlevel ** 2 / 64.0)  && !NumProjID(220)
trigger4 = (stateno = 400) || (stateno = 430) || (stateno = 410) || (stateno = 440)|| (stateno = 441)|| (stateno = 442)
trigger4 = movehit && random < 300*(AIlevel ** 2 / 64.0)
value = 220

; AI Stand Light Kick
[State -1, AI Stand Light Kick]
type = ChangeState
triggerall = Var(29)=0
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A  && P2statetype != A
triggerall = (p2bodydist x = [10, 40]) && p2statetype != L
triggerall = !NumProjID(3420)
triggerall = !NumProjID(3421)
trigger1 = ctrl && random < 150*(AIlevel ** 2 / 64.0)
trigger2 = (stateno = 100 || stateno = 101) && random < 250*(AIlevel ** 2 / 64.0)  && !NumProjID(220)
value = 230

[State -1, AI Throw]
type = ChangeState
triggerall = var(29)=0 
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,20])
triggerall = ctrl && stateno!=100
triggerall = !NumProjID(3420)
triggerall = !NumProjID(3421)
trigger1 = random < 100*(AIlevel ** 2 / 64.0)
trigger2 = enemynear,stateno=[120,155]
trigger2 = random < 300*(AIlevel ** 2 / 64.0)
value = Ifelse(random<=500,800,810)

; AI Standing Medium Kick
[State -1, AI Standing Medium Kick]
type = ChangeState
triggerall = Var(29)=0
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A  ;&& P2statetype != C
triggerall = (p2bodydist x = [40, 180]) && p2statetype != L
triggerall = !NumProjID(3420)
triggerall = !NumProjID(3421)
trigger1 = ctrl && random < 150*(AIlevel ** 2 / 64.0)
trigger2 = (stateno = 200) || (stateno = 212) || (stateno = 230) 
trigger2 = movehit && random < 600*(AIlevel ** 2 / 64.0)
trigger3 = stateno = 100 || stateno = 101  && !NumProjID(220)
trigger3 = movehit && random < 250*(AIlevel ** 2 / 64.0)
trigger4 = (stateno = 400) || (stateno = 430)
trigger4 = movehit && random < 450*(AIlevel ** 2 / 64.0)
value = 240

; AI Standing Strong Kick
[State -1, AI Standing Strong Kick]
type = ChangeState
triggerall = Var(29)=0
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A  
triggerall = (p2bodydist x = [80, 150]) && p2statetype != L
triggerall = !NumProjID(3420)
triggerall = !NumProjID(3421)
trigger1 = ctrl && random < 250*(AIlevel ** 2 / 64.0)
trigger2 = (stateno = 200) || (stateno = 212) || (stateno = 221) || (stateno = 230) || (stateno = 240) || (stateno = 241) 
trigger2 = movehit && random < 600*(AIlevel ** 2 / 64.0)
trigger3 = stateno = 100 || stateno = 101  && !NumProjID(220)
trigger3 = movehit && random < 250*(AIlevel ** 2 / 64.0)
trigger4 = (stateno = 400) || (stateno = 430) || (stateno = 410) || (stateno = 440)
trigger4 = movehit && random < 450*(AIlevel ** 2 / 64.0)
value = 251

; AI Crouching Light Punch
[State -1, AI Crouching Light Punch]
type = ChangeState
triggerall = Var(29)=0
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType = C
triggerall = (p2bodydist x = [-5, 20]) &&(p2bodydist y = 0) && P2statetype != A && P2statetype != L
trigger1 = ctrl && random < 250*(AIlevel ** 2 / 64.0)
value = 400

; AI Crouching Medium Punch
[State -1, AI Crouching Medium Punch]
type = ChangeState
triggerall = Var(29)=0
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType = C
triggerall = (p2bodydist x = [-5, 40]) &&(p2bodydist y = [-40,0]) && P2statetype != A && P2statetype != L
trigger1 = ctrl && random < 250*(AIlevel ** 2 / 64.0)
value = 410

;Crouch Medium Punch
[State -1, Crouch Medium Punch]
type = ChangeState
value = 411
triggerall = Var(29)=0
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType = C
triggerall = (p2bodydist x = [-5, 40]) &&(p2bodydist y = [-40,0]) && P2statetype != A && P2statetype != L
trigger1 = (stateno = 200 && MoveContact)  
trigger2 = (stateno = 230 && MoveContact) 
trigger3 = (stateno = 400 && MoveContact)  
trigger4 = (stateno = 430 && MoveContact) 


; AI Crouching Strong Punch 
[State -1, AI Crouching Strong Punch]
type = ChangeState
triggerall = Var(29)=0
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType = C
triggerall = (p2bodydist x = [-5, 70]) &&(p2bodydist y = [-90,0]) && P2statetype != L
trigger1 = ctrl && random < 250*(AIlevel ** 2 / 64.0)
trigger2 = (stateno = 200) || (stateno = 212) || (stateno = 230) || (stateno = 240) || (stateno = 241) 
trigger2 = movehit && random < 200*(AIlevel ** 2 / 64.0)
trigger3 = (stateno = 400) || (stateno = 410) || (stateno = 411) || (stateno = 430) || (stateno = 440) || (stateno = 441) || (stateno = 442) || (stateno = 450) || (stateno = 451)
trigger3 = movehit && random < 400*(AIlevel ** 2 / 64.0)
value = 420

; AI Crouching Light Kick
[State -1, AI Crouching Light Kick]
type = ChangeState
triggerall = Var(29)=0
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType = C
triggerall = (p2bodydist x = [-5, 30]) && P2statetype != A && P2statetype != L
trigger1 = ctrl && random < 250*(AIlevel ** 2 / 64.0)
trigger2 = (stateno = 200) 
trigger2 = movehit && random < 400*(AIlevel ** 2 / 64.0)
value = 430

; AI Crouching Medium Kick
[State -1, AI Crouching Medium Kick]
type = ChangeState
triggerall = StateNo != 440
triggerall = Var(29)=0
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType = C
triggerall = (p2bodydist x = [0, 100]) && P2statetype != A 
trigger1 = ctrl && random < 250*(AIlevel ** 2 / 64.0)
trigger2 = (StateNo = 200) || (stateno = 212) || (stateno = 230) || (stateno = 400) || (stateno = 410) || (stateno = 411) || (stateno = 430) 
trigger2 = movehit && random < 400*(AIlevel ** 2 / 64.0)
trigger3 = random < 700*(AIlevel ** 2 / 64.0)
trigger3 = P2StateType = L && (p2bodydist x = [0, 10])
value = 440

; AI Crouching Strong Kick
[State -1, AI Crouching Strong Kick]
type = ChangeState
triggerall = Var(29)=0
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType = C
triggerall = (p2bodydist x = [40, 90]) && P2statetype != A && P2statetype != L
trigger1 = ctrl && random < 250*(AIlevel ** 2 / 64.0)
trigger2 = (StateNo = 400) || (stateno = 410) || (stateno = 430) || (stateno = 440) || (stateno = 441) || (stateno = 442)
trigger2 = movehit && random < 400*(AIlevel ** 2 / 64.0)
trigger3 = (stateno = 200) || (stateno = 212) || (stateno = 230) || (stateno = 240) || (stateno = 241) || (stateno = 240) 
trigger2 = movehit && random < 200*(AIlevel ** 2 / 64.0)
trigger3 = (stateno = 251 && Var(9)=1)
trigger3 = random < 225*(AIlevel ** 2 / 64.0) && P2StateType != A
value = 450

;AI Jump Light Punch
[State -1, AI Jump Light Punch]
type = ChangeState
triggerall = Var(29)=0
triggerall = numenemy && roundstate=2 && statetype = A
triggerall = ctrl
trigger1 = random < 250*(AIlevel ** 2 / 64.0) && AILEVEL>0 && AILEVEL <8
trigger1 = (p2bodydist x = [-20,40]) && (p2bodydist y = [-60,60]) && p2statetype != L
trigger2 = AILEVEL =8
trigger2 = (p2bodydist x = [-20,40]) && (p2bodydist y = [-60,60]) && p2statetype != L
trigger3 = AILEVEL>0
trigger3 = NumProjID(3420)
value = 600

;AI8 Jump Medium Kick
[State -1, AI8 Jump Medium Kick]
type = ChangeState
triggerall = Var(29)=0
triggerall = AILevel=8 && numenemy && roundstate=2 && statetype = A
triggerall = (p2bodydist x = [-20,120]) && (p2bodydist y = [-20,60]) && p2statetype != L
trigger1 = MoveHit 
trigger1 = StateNo = 600 || StateNo = 630
value = 640

;AI8 Jump Strong Punch 
[State -1, AI8 Jump Strong Punch]
type = ChangeState
triggerall = Var(29)=0
triggerall = AILevel=8 && numenemy && roundstate=2 && statetype = A
triggerall = (p2bodydist x = [-10,60]) && (p2bodydist y = [-60,60]) && p2statetype != L
trigger1 = MoveHit 
trigger1 = StateNo = 610 || StateNo = 640
trigger1 = Movehit && random < 659*(AIlevel ** 2 / 64.0)
value = 620

;AI8 Jump Strong Kick
[State -1, AI8 Jump Strong Kick]
type = ChangeState
triggerall = Var(29)=0
triggerall = AILevel=8 && numenemy && roundstate=2 && statetype = A
triggerall = (p2bodydist x = [-5,70]) && (p2bodydist y = [-20,80]) && p2statetype != L
trigger1 = MoveHit 
trigger1 = StateNo = 610 || StateNo = 640
trigger1 = Movehit && random < 999*(AIlevel ** 2 / 64.0)
value = 650

;AI Jump Medium Punch
[State -1, AI Jump Medium Punch]
type = ChangeState
triggerall = Var(29)=0
triggerall = AILevel>0 && numenemy && roundstate=2 && statetype = A
triggerall = (p2bodydist x = [0,80]) && (p2bodydist y = [-60,60]) && p2statetype != L
trigger1 = ctrl && random < 250*(AIlevel ** 2 / 64.0)
trigger2 = (StateNo = 600) || (StateNo = 630)
trigger2 = Movehit && random < 450*(AIlevel ** 2 / 64.0)
value = 610

;AI Jump Strong Punch 
[State -1, AI Jump Strong Punch]
type = ChangeState
triggerall = Var(29)=0
triggerall = AILevel>0 && numenemy && roundstate=2 && statetype = A
triggerall = (p2bodydist x = [0,60]) && (p2bodydist y = [-60,60]) && p2statetype != L
trigger1 = ctrl && random < 250*(AIlevel ** 2 / 64.0)
trigger2 = (StateNo = 600) || (StateNo = 610) || (StateNo = 630) || (StateNo = 640)
trigger2 = Movehit && random < 450*(AIlevel ** 2 / 64.0)
value = 620

;AI Jump Light Kick
[State -1, AI Jump Light Kick]
type = ChangeState
triggerall = Var(29)=0
triggerall = AILevel>0 && numenemy && roundstate=2 && statetype = A
triggerall = (p2bodydist x = [5,50]) && (p2bodydist y = [-20,70]) && p2statetype != L
trigger1 = ctrl && random < 250*(AIlevel ** 2 / 64.0)
value = 630

;AI Jump Medium Kick
[State -1, AI Jump Medium Kick]
type = ChangeState
triggerall = Var(29)=0
triggerall = AILevel>0 && numenemy && roundstate=2 && statetype = A
triggerall = (p2bodydist x = [-15,120]) && (p2bodydist y = [-20,60]) && p2statetype != L
trigger1 = ctrl && random < 250*(AIlevel ** 2 / 64.0)
trigger2 = (StateNo = 600) || (StateNo = 630)
trigger2 = Movehit && random < 450*(AIlevel ** 2 / 64.0)
value = 640

;AI Jump Strong Kick
[State -1, AI Jump Strong Kick]
type = ChangeState
triggerall = Var(29)=0
triggerall = AILevel>0 && numenemy && roundstate=2 && statetype = A
triggerall = (p2bodydist x = [5,80]) && (p2bodydist y = [-20,80]) && p2statetype != L
trigger1 = ctrl && random < 250*(AIlevel ** 2 / 64.0)
trigger2 = (StateNo = 600) || (StateNo = 610) || (StateNo = 630) || (StateNo = 640)
trigger2 = Movehit && random < 450*(AIlevel ** 2 / 64.0)
value = 650

;AI Jump Strong Kick
[State -1, AI Jump Strong Kick]
type = ChangeState
triggerAll = AILevel && numenemy && roundstate=2
triggerall = Var(29)=0
triggerall = random < 450*(AIlevel ** 2 / 64.0)
trigger1 =  stateno = 251 && Var(9)=1 
trigger1 = MoveContact>=1&&MoveContact<=5
value = 659

;AI INSULT!
[State -1, AI Insult!]
type = ChangeState
value = IfElse(((power>=500 || Var(51)>500)&&random%10),1101,1100)
triggerall=  AILevel>0 && numenemy && roundstate = 2 && statetype != A
triggerall = Var(29)=0
triggerall = !NumHelper(1110)  
triggerall = !NumHelper(1116)
triggerall = !NumProjID(3420)
triggerall = !NumProjID(3421)
triggerall = Var(32)>0
triggerall = (p2bodydist x<=160) && (p2bodydist y=[-40,0])
triggerall = P2Statetype!=L
triggerall = !NumExplod(801)
trigger1 = P2Movetype=H 
trigger1 = ctrl && (Random<400*((AIlevel**2)/64.0))
trigger2 = P2Statetype!=A && P2Movetype=A
trigger2 = ctrl && (Random<200*((AIlevel**2)/64.0))

;AI INSULT!
[State -1, AI Insult!]
type = ChangeState
value = 1100
triggerall=  AILevel>0 && numenemy && roundstate = 2 && statetype != A
triggerall = Var(29)=0
triggerall = !NumHelper(1110)  
triggerall = !NumHelper(1116)
triggerall = !NumProjID(3420)
triggerall = !NumProjID(3421)
triggerall = Var(32)>0
triggerall = (p2bodydist x<=110) && (p2bodydist y=[-40,0])
triggerall = !NumExplod(801)
trigger1 = (P2Statetype=L || P2Movetype=H) 
trigger1 = ctrl && (Random<400*((AIlevel**2)/64.0))
trigger2 = P2Statetype!=A && P2Movetype=A
trigger2 = ctrl && (Random<200*((AIlevel**2)/64.0))
trigger3 = P2Statetype!=A && (enemy,stateno=[120,155])
trigger3 = ctrl && (Random<200*((AIlevel**2)/64.0))
trigger4 = MoveContact
trigger4 = (stateno = 241 && P2StateType = A) || (stateno = 441) || (stateno = 442)

;AI Hero Stance
[State -1, AI Hero Stance]
type = ChangeState
value = 1000
triggerall=  AILevel>0 && numenemy && roundstate = 2 && statetype != A
triggerall = Var(29)=0
triggerall = (Random<400*((AIlevel**2)/64.0))
triggerall = !NumProjID(3420)
triggerall = !NumProjID(3421)
trigger1 = ctrl
trigger1 = P2BodyDist X >120
trigger2 = MoveContact
trigger2 = stateno = 200 || stateno = 212 || stateno = 221  || StateNo = 224 ||stateno = 230  || stateno = 240  || stateno = 241 || stateno = 400  || stateno = 410  || stateno = 411  ||stateno = 420  || stateno = 421|| stateno = 442  || stateno = 450
trigger3 = P2MoveType = A || inguarddist
trigger3 = StateNo = 224

;aiEX Air Miracle Blast
[State -1, aiEX Air Miracle Blast]
type = ChangeState
value = 1030
triggerall=  AILevel>0 && numenemy && roundstate = 2 
triggerall = Var(29)=0
triggerall = power>=500 || Var(51)>500
triggerall = Pos Y <-140
triggerall = !NumExplod(1038)
triggerall = !NumExplod(1037)
triggerall = !NumProjID(3420)
triggerall = !NumProjID(3421)
triggerall = (Random<200*((AIlevel**2)/64.0))
triggerall = statetype = A 
triggerall = P2BodyDist X =[80,150]
triggerall = P2BodyDist Y <0
triggerall = !NumExplod(801)
trigger1 = ctrl || (StateNo = 600 && AnimElem >= 4) || (StateNo = 610 && AnimElem >= 5) || (StateNo = 620 && AnimElem >= 7) || (StateNo = 630 && AnimElem >= 5) || (StateNo = 640 && AnimElem >= 4) 
trigger2 = (P2Movetype=H && P2StateNo != [120,155])

;aiEX Air Miracle Blast follow up
[State -1, aiEX Air Miracle Blast follow up]
type = ChangeState
value = 1038
triggerall=  AILevel>0 && numenemy && roundstate = 2 
triggerall = Var(29)=0
triggerall = NumExplod(1037)
triggerall = !NumExplod(1038)
triggerall = (Random<450*((AIlevel**2)/64.0))
triggerall = statetype = A 
triggerall = P2BodyDist X =[80,150]
triggerall = P2BodyDist Y <0
triggerall = !NumExplod(801)
trigger1 = ctrl || (StateNo = 600 && AnimElem >= 4) || (StateNo = 610 && AnimElem >= 5) || (StateNo = 620 && AnimElem >= 7) || (StateNo = 630 && AnimElem >= 5) || (StateNo = 640 && AnimElem >= 4) 
trigger2 = StateNo = 1030 && AnimElemTime(9) >= 0

;aiAir Miracle Blast 
[State -1, aiAir Miracle Blast 1]
type = ChangeState
value = 1031
triggerall=  AILevel>0 && numenemy && roundstate = 2 && statetype = A
triggerall = Var(29)=0
triggerall = !NumExplod(1036)
triggerall = !NumExplod(1035)
triggerall = (Random<450*((AIlevel**2)/64.0))
triggerall = statetype = A 
triggerall = P2BodyDist X >60
trigger1 = ctrl || (StateNo = 600 && AnimElem >= 4) || (StateNo = 610 && AnimElem >= 5) || (StateNo = 620 && AnimElem >= 7) || (StateNo = 630 && AnimElem >= 5) || (StateNo = 640 && AnimElem >= 4) 
trigger2 = MoveHit
trigger2 = StateNo = 600 || StateNo = 630

[State -1, aiAir Miracle Blast 2]
type = ChangeState
value = 1032
triggerall=  AILevel>0 && numenemy && roundstate = 2 && statetype = A
triggerall = Var(29)=0
triggerall = NumExplod(1035)
triggerall = !NumExplod(1036)
triggerall = statetype = A 
triggerall = (Random<450*((AIlevel**2)/64.0))
triggerall = P2BodyDist X >60
trigger1 = ctrl || (StateNo = 600 && AnimElem >= 4) || (StateNo = 610 && AnimElem >= 5) || (StateNo = 620 && AnimElem >= 7) || (StateNo = 630 && AnimElem >= 5) || (StateNo = 640 && AnimElem >= 4) 
trigger2 = MoveHit
trigger2 = StateNo = 600 || StateNo = 630
trigger3 = StateNo = 1031 && AnimElemTime(5) >= 0
trigger4 = StateNo = 1040 && AnimElemTime(5) >= 0

;aiAir Miracle Blast  follow up
[State -1, siAir Miracle Blast follow up]
type = ChangeState
value = 1032
triggerall=  AILevel>0 && numenemy && roundstate = 2 && statetype = A
triggerall = Var(29)=0
triggerall = statetype = A 
triggerall = NumHelper(1035) = 1 && NumHelper(1036) = 0
triggerall = (Random<450*((AIlevel**2)/64.0))
triggerall = P2BodyDist X >60
trigger1 = ctrl || (StateNo = 600 && AnimElem >= 4) || (StateNo = 610 && AnimElem >= 5) || (StateNo = 620 && AnimElem >= 7) || (StateNo = 630 && AnimElem >= 5) || (StateNo = 640 && AnimElem >= 4) 
trigger2 = MoveHit
trigger2 = StateNo = 600 || StateNo = 630

;aiHeadbutt Slam Air
[State -1, aiHeadbutt Slam]
type = ChangeState
value = 1157
triggerall=  AILevel>0 && numenemy && roundstate = 2 && statetype = A
triggerall = Var(29)=0
triggerall = Var(34)>0
triggerall = MoveType != H
triggerall = (Random<100*((AIlevel**2)/64.0))
triggerall = P2BodyDist X = [0,60]
triggerall = P2StateType != L
triggerall = !NumProjID(220)
triggerall = !NumExplod(801)
trigger1 = ctrl || StateNo = 40 || StateNo = 52 || (StateNo = 50 && Pos Y >= -20 && Vel Y >0) && StateNo != [1154,1155]
trigger2 = (stateno = 600 && MoveGuarded) || (stateno = 610 && MoveGuarded) || (stateno = 620 && MoveContact) || StateNo = 224
trigger3 = (stateno = 630 && MoveGuarded) || (stateno = 640 && MoveGuarded) || (stateno = 650 && MoveContact) || stateno = 651
trigger4 = StateNo = [1051,1054]

;aiHeadbutt Slam
[State -1, aiHeadbutt Slam]
type = ChangeState
value = 1150
triggerall=  AILevel>0 && numenemy && roundstate = 2 && statetype != A
triggerall = Var(29)=0
triggerall = Var(34)>0
triggerall = MoveType != H
triggerall = (Random<100*((AIlevel**2)/64.0))
triggerall = P2BodyDist X = [0,60]
triggerall = P2StateType != L
triggerall = !NumProjID(220)
triggerall = !NumExplod(801)
trigger1 = ctrl || StateNo = 40 || StateNo = 52 
trigger2 = (stateno = 200 && MoveContact) || (stateno = 212 && MoveContact) || (stateno = 221 && MoveContact) || StateNo = 224
trigger3 = (stateno = 230 && MoveContact) || (stateno = 240 && MoveContact) || (stateno = 241 && MoveGuarded) || (stateno = 251 && MoveContact) 
trigger4 = (stateno = 400 && MoveContact) || (stateno = 410 && MoveContact) || (stateno = 411 && MoveContact) ||(stateno = 420 && MoveContact) || stateno = 421 
trigger5 = (stateno = 430 && MoveContact) || (stateno = 440 && MoveContact) || (stateno = 441 && MoveContact) || (stateno = 450 && MoveContact)
trigger6 = (stateno = 442 && MoveContact)
trigger7 = StateNo = 220 
trigger8 = P2BodyDist Y <0
trigger8 = P2MoveType = A

; aiAir SSJ2 Mode
[State -1]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2
triggerall = Var(29)=0
triggerall = Var(9) < 9997
triggerall = var(50)<=0 ;No rage mode
triggerall = statetype = A  && !WinKo
triggerall = power >= 2000 && stateno != 2700
triggerall = Var(59)=0 || Var(59)=2
triggerall = Ctrl
triggerall = Var(59)=0 || Var(59)=2
trigger1 =  (P2MoveType = H || P2MoveType = A) && (P2BodyDist X =[-40,40])
trigger1 = P2StateNo != [120,155]
trigger1 = Cond(Var(59)=2,(Random<900*((AIlevel**2)/64.0)),(Random<600*((AIlevel**2)/64.0)))
trigger2 = Var(59)=2
trigger2 = P2MoveType = H || P2StateType = L
trigger2 = (Random<300*((AIlevel**2)/64.0))
value = 2710

; aiSSJ3 Mode
[State -1, aissj3]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2
triggerall = Var(29)=0
triggerall = Var(9) < 9997
triggerall = TeamMode != Simul
triggerall = enemyNear,TeamMode != Simul
triggerall = !NumProjID(27529)
triggerall = !NumProjID(3420)
triggerall = !NumProjID(3421)
triggerall = roundstate = 2
triggerall = statetype != A  && !WinKo
triggerall = Ctrl
triggerall = (var(50)>0 && (power >= 2000 || Var(51) >= 2000 || power >= 1000 && Var(51) >=1000)) || (var(50)<=0 && power = 3000)
triggerall =  P2MoveType = H || P2StateType = L
trigger1 = (Random<300*((AIlevel**2)/64.0))
trigger2 = Life <= 100
trigger2 = (Random<800*((AIlevel**2)/64.0))
value = 3601

; aiSSJ2 Mode
[State -1]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2
triggerall = Var(29)=0
triggerall = Var(9) < 9997
triggerall = var(50)<=0 ;No SSJ2
triggerall = statetype != A  && !WinKo
triggerall = power >= 2000 && stateno != 2700
triggerall = Ctrl 
triggerall = Var(59)=0 || Var(59)=2
trigger1 =  (P2MoveType = H || P2MoveType = A) && (P2BodyDist X =[-40,40]) 
trigger1 = P2StateNo != [120,155]
trigger1 = Cond(Var(59)=2,(Random<900*((AIlevel**2)/64.0)),(Random<600*((AIlevel**2)/64.0)))
trigger2 = Var(59)=2
trigger2 = P2MoveType = H || P2StateType = L
trigger2 = (Random<300*((AIlevel**2)/64.0))
value = 2700

;aiVolley Ball
[State -1, aiVolley Ball]
type = Changestate
triggerall = AILevel>0 && numenemy && roundstate=2 && P2StateType != L
triggerall = Var(29)=0
triggerall = !NumHelper(3410)
triggerall = !NumHelper(3310)
triggerall = statetype != A && !WinKo 
triggerall = power >= 2000 || Var(51) >= 2000 || power >= 1000 && Var(51) >=1000
triggerall = !NumExplod(801)
trigger1 = enemy, Pos Y = 0
trigger1 = ctrl && (P2MoveType = A || (P2StateNo != [120,155])) 
trigger1 = (Random<50*((AIlevel**2)/64.0))
trigger2 = (stateno = 212 && MoveHit) || (stateno = 221 && MoveHit) || StateNo = 224 && (P2Movetype=H && (P2StateNo != [120,155]))
trigger2 = (Random<100*((AIlevel**2)/64.0)) && (P2BodyDist Y >=-30) && (P2BodyDist X >10) 
trigger3 = (stateno = 241 && MoveHit)  && (P2BodyDist Y >=-30) && (P2BodyDist X >10) 
trigger3 = (Random<100*((AIlevel**2)/64.0)) && (P2BodyDist Y >=-30) && (P2BodyDist X >10) 
trigger4 = (stateno = 410 && MoveHit) || (stateno = 411 && MoveHit) ||(stateno = 420 && MoveHit) || stateno = 421 
trigger4 = (Random<100*((AIlevel**2)/64.0)) && (P2BodyDist Y >=-30) && (P2BodyDist X >10) 
trigger5 = (stateno = 440 && MoveHit) || (stateno = 441 && MoveHit) || (stateno = 450 && MoveHit)
trigger5 = (Random<100*((AIlevel**2)/64.0)) && (P2BodyDist Y >=-30) && (P2BodyDist X >10) 
trigger6 = (stateno = 442 && MoveHit)
trigger6 = (Random<100*((AIlevel**2)/64.0)) && (P2BodyDist Y >=-30) && (P2BodyDist X >10) 
trigger7 = StateNo = 1020 && MoveHit
trigger7 = (Random<100*((AIlevel**2)/64.0)) && (P2BodyDist Y >=-30) && (P2BodyDist X >10) 
value = 3400

;aiGalactic Donut
[State -1, aiGalactic Donut]
type = Changestate
triggerall = AILevel>0 && numenemy && roundstate=2 && P2StateType != L
triggerall = Var(29)=0
triggerall = !NumHelper(3410)
triggerall = !NumHelper(3310)
triggerall = statetype != A && !WinKo 
triggerall = power >= 1000 || Var(51) >= 1000
triggerall = (P2BodyDist Y >=-30) && (P2BodyDist X >10)
triggerall = !NumExplod(801)
trigger1 = ctrl && (P2MoveType = A || (P2StateNo != [120,155])) 
trigger1 = (Random<100*((AIlevel**2)/64.0))
trigger2 = (stateno = 212 && MoveHit) || (stateno = 221 && MoveHit) || StateNo = 224 && (P2Movetype=H && (P2StateNo != [120,155]))
trigger2 = (Random<200*((AIlevel**2)/64.0))
trigger3 = (stateno = 241 && MoveHit)  
trigger3 = (Random<200*((AIlevel**2)/64.0))
trigger4 = (stateno = 410 && MoveHit) || (stateno = 411 && MoveHit) ||(stateno = 420 && MoveHit) || stateno = 421 
trigger4 = (Random<200*((AIlevel**2)/64.0))
trigger5 = (stateno = 440 && MoveHit) || (stateno = 441 && MoveHit) || (stateno = 450 && MoveHit)
trigger5 = (Random<200*((AIlevel**2)/64.0))
trigger6 = (stateno = 442 && MoveHit)
trigger6 = (Random<200*((AIlevel**2)/64.0))
trigger7 = StateNo = 1020 && MoveHit
trigger7 = (Random<200*((AIlevel**2)/64.0))
value = 3300

;aiSERVE!
[State -1, aiSERVE!]
type = Changestate
triggerall = AILevel>0 && numenemy && roundstate=2 && P2StateType != L
triggerall = Var(29)=0
triggerall = !NumExplod(3111)
triggerall = statetype != A && !WinKo 
triggerall = power >= 1000 || Var(51) >= 1000
trigger1 = StateNo = 1020 && MoveHit&& (Random<600*((AIlevel**2)/64.0))
value = 3200

[State -1, aiGhost]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2
triggerall = Var(29)=0
triggerall = Var(53)<4
triggerall = ctrl && statetype != A
triggerall = StateNo != 3000
triggerall = Var(59)<2 
trigger1 = Power >= 1000 || Var(51) >= 1000
trigger1 = P2Statetype=L || P2MoveType = H
trigger1 = (Random<500*((AIlevel**2)/64.0)) 
value = 3000

;aiAir Die Die Missles LVL2
[State -1, aiAir Die Die Missles LVL2]
type = Changestate
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType = A && P2StateType != L && P2StateNo != [120,155]
triggerall = Var(29)=0
triggerall = !NumExplod(3112)
triggerall = !NumExplod(3111)
triggerall = !NumProjID(3421)
triggerall = !WinKo 
triggerall = power >= 2000 || Var(51) >= 2000 || power >= 1000 && Var(51) >=1000
triggerall = ((P2BodyDist Y = [-20,30]) && (P2BodyDist X = [-10,30])) || ((P2BodyDist Y = [30,60]) && (P2BodyDist X = [30,80])) || ((P2BodyDist Y =[60,100]) && (P2BodyDist X = [81,160]))
triggerall = !NumExplod(801)
trigger1 = (P2Movetype=H && P2StateNo != [120,155]) 
trigger1 = ctrl && (Random<300*((AIlevel**2)/64.0)) && StateType = A
trigger2 = P2Statetype=A && P2Movetype!=A && enemy, Vel X >0 && P2BodyDist X >20 && P2BodyDist Y <=0
trigger2 = ctrl && (Random<300*((AIlevel**2)/64.0)) && StateType = A
trigger3 = P2Movetype=A && P2BodyDist X >20 && P2StateType !=A
trigger3 = ctrl && (Random<200*((AIlevel**2)/64.0)) && StateType = A
trigger2 = (StateNo = 620 && MoveHit)&& (Random<200*((AIlevel**2)/64.0)) && StateType = A
trigger3 = StateNo = 251 && AnimElemTime(9)>=0 && MoveHit = 1 && (Random<200*((AIlevel**2)/64.0)) && StateType != A
trigger4 = StateNo = 1154 && StateType = A
trigger4 = NumTarget && (Random<200*((AIlevel**2)/64.0))
trigger5 = StateNo = 224 && statetype = A && (Random<200*((AIlevel**2)/64.0))
value = 3105

;aiAir Die Die Missles
[State -1, aiAir Die Die Missles]
type = Changestate
triggerall = AILevel>0 && numenemy && roundstate=2 && P2StateType != L && P2StateNo != [120,155]
triggerall = Var(29)=0
triggerall = !NumExplod(3112)
triggerall = !NumExplod(3111)
triggerall = !NumProjID(3421)
triggerall = !WinKo 
triggerall = power >= 1000 || Var(51) >= 1000 
triggerall = ((P2BodyDist Y = [-20,30]) && (P2BodyDist X = [-10,30])) || ((P2BodyDist Y = [30,60]) && (P2BodyDist X = [30,80])) || ((P2BodyDist Y = [60,100]) && (P2BodyDist X = [81,160]))
triggerall = !NumExplod(801)
trigger1 = P2Movetype=H 
trigger1 = ctrl && (Random<300*((AIlevel**2)/64.0)) && StateType = A
trigger2 = P2Statetype=A && P2Movetype!=A && enemy, Vel X >0 && P2BodyDist X >20 && P2BodyDist Y <=0
trigger2 = ctrl && (Random<300*((AIlevel**2)/64.0)) && StateType = A
trigger3 = P2Movetype=A && P2BodyDist X >20 && P2StateType !=A
trigger3 = ctrl && (Random<200*((AIlevel**2)/64.0)) && StateType = A
trigger2 = (StateNo = 620 && MoveHit)&& (Random<200*((AIlevel**2)/64.0)) && StateType = A
trigger3 = StateNo = 251 && AnimElemTime(9)>=0 && MoveHit = 1 && (Random<200*((AIlevel**2)/64.0)) && StateType != A
trigger4 = StateNo = 1154 && StateType = A
trigger4 = NumTarget && (Random<200*((AIlevel**2)/64.0))
trigger5 = StateNo = 224 && statetype = A && (Random<200*((AIlevel**2)/64.0))
value = 3100

;aiGroundDie Die Missles LVL2
[State -1, aiGround Die Die Missles LVL2]
type = Changestate
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A && P2StateType != L && P2StateNo != [120,155]
triggerall = Var(29)=0
triggerall = !NumExplod(3112)
triggerall = !NumExplod(3111)
triggerall = !NumProjID(3421)
triggerall = statetype != A && !WinKo 
triggerall = power >= 2000 || Var(51) >= 2000 || power >= 1000 && Var(51) >=1000
triggerall = p2bodydist x<230
triggerall = !NumExplod(801)
trigger1 = (P2Movetype=H && P2StateNo != [120,155]) 
trigger1 = ctrl && (Random<300*((AIlevel**2)/64.0))
trigger2 = P2Statetype=A && P2Movetype!=A && enemy, Vel X >0 && P2BodyDist X >20
trigger2 = ctrl && (Random<300*((AIlevel**2)/64.0))
trigger3 = P2Movetype=A && P2BodyDist X >20 && P2StateType !=A
trigger3 = ctrl && (Random<200*((AIlevel**2)/64.0))
value = 3106

;AI GroundDie Die Missles
[State -1, AI Ground Die Die Missles]
type = Changestate
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A && P2StateType != L && P2StateNo != [120,155]
triggerall = Var(29)=0
triggerall = !NumExplod(3112)
triggerall = !NumExplod(3111)
triggerall = !NumProjID(3421)
triggerall = statetype != A && !WinKo 
triggerall = power >= 1000 || Var(51) >= 1000
triggerall = p2bodydist x<230
triggerall = !NumExplod(801)
trigger1 = (P2Movetype=H && P2StateNo != [120,155]) 
trigger1 = ctrl && (Random<350*((AIlevel**2)/64.0))
trigger2 = P2Statetype=A && P2Movetype!=A && enemy, Vel X >0 && P2BodyDist X >20
trigger2 = ctrl && (Random<350*((AIlevel**2)/64.0))
trigger3 = P2Movetype=A && P2BodyDist X >20 && P2StateType !=A
trigger3 = ctrl && (Random<450*((AIlevel**2)/64.0))
value = 3102






