
[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

;-| Hyper Motions |--------------------------------------------------------

[Command]
name = "qcbfa"
command = ~D, DB, B, F, a
buffer.time = 3
[Command]
name = "qcbfa"
command = ~D, DB, B, F, ~a
buffer.time = 3
[Command]
name = "qcbfb"
command = ~D, DB, B, F, b
buffer.time = 3
[Command]
name = "qcbfb"
command = ~D, DB, B, F, ~b
buffer.time = 3
[Command]
name = "qcbfc"
command = ~D, DB, B, F, c
buffer.time = 3
[Command]
name = "qcbfc"
command = ~D, DB, B, F, ~c
buffer.time = 3

[Command]
name = "qcbfx"
command = ~D, DB, B, F, x
buffer.time = 3
[Command]
name = "qcbfx"
command = ~D, DB, B, F, ~x
buffer.time = 3
[Command]
name = "qcbfy"
command = ~D, DB, B, F, y
buffer.time = 3
[Command]
name = "qcbfy"
command = ~D, DB, B, F, ~y
buffer.time = 3
[Command]
name = "qcbfz"
command = ~D, DB, B, F, z
buffer.time = 3
[Command]
name = "qcbfz"
command = ~D, DB, B, F, ~z
buffer.time = 3


[Command]
name = "qcfbx"
command = ~D, F, B, x
buffer.time = 3

[Command]
name = "qcfbx"
command = ~D, F, B, ~x
buffer.time = 3

[Command]
name = "qcfbx"
command = ~D, DF, F, B, x
buffer.time = 3

[Command]
name = "qcfbx"
command = ~D, DF, F, B, ~x
buffer.time = 3

[Command]
name = "qcfby"
command = ~D, F, B, y
buffer.time = 3

[Command]
name = "qcfby"
command = ~D, F, B, ~y
buffer.time = 3

[Command]
name = "qcfby"
command = ~D, DF, F, B, y
buffer.time = 3

[Command]
name = "qcfby"
command = ~D, DF, F, B, ~y
buffer.time = 3

[Command]
name = "qcfbz"
command = ~D, DF, F, B, z
buffer.time = 3

[Command]
name = "qcfbz"
command = ~D, F, B, z
buffer.time = 3

[Command]
name = "qcfbz"
command = ~D, F, B, ~z
buffer.time = 3

[Command]
name = "qcfbz"
command = ~D, DF, F, B, ~z
buffer.time = 3


[Command]
name = "2qcf2p"
command = ~D, DF, F, D, DF, x+y
time = 30
buffer.time = 3
[Command]
name = "2qcf2p"
command = ~D, DF, F, D, DF, x+z
time = 30
buffer.time = 3
[Command]
name = "2qcf2p"
command = ~D, DF, F, D, DF, y+z
time = 30
buffer.time = 3

[Command]
name = "2qcf2k"
command = ~D, DF, F, D, DF, a+b
time = 30
buffer.time = 3
[Command]
name = "2qcf2k"
command = ~D, DF, F, D, DF, a+c
time = 30
buffer.time = 3
[Command]
name = "2qcf2k"
command = ~D, DF, F, D, DF, b+c
time = 30
buffer.time = 3

[Command]
name = "qcbf2p"
command = ~D, $B, F, x+y
time = 30
buffer.time = 3
[Command]
name = "qcbf2p"
command = ~D, $B, F, x+z
time = 30
buffer.time = 3
[Command]
name = "qcbf2p"
command = ~D, $B, F, y+z
time = 30
buffer.time = 3

[Command]
name = "2qcb2p"
command = ~D, DB, B, D, DB, x+y
time = 30
buffer.time = 3
[Command]
name = "2qcb2p"
command = ~D, DB, B, D, DB, x+z
time = 30
buffer.time = 3
[Command]
name = "2qcb2p"
command = ~D, DB, B, D, DB, y+z
time = 30
buffer.time = 3

[Command]
name = "demon"
command = D, D, y+b
time = 20
buffer.time = 3

[Command]
name = "dd2p"
command = D, D, x+y
time = 20
buffer.time = 3
[Command]
name = "dd2p"
command = D, D, x+z
time = 20
buffer.time = 3
[Command]
name = "dd2p"
command = D, D, y+z
time = 20
buffer.time = 3

[Command]
name = "dd2k"
command = D, D, a+b
time = 20
buffer.time = 3
[Command]
name = "dd2k"
command = D, D, a+c
time = 20
buffer.time = 3
[Command]
name = "dd2k"
command = D, D, b+c
time = 20
buffer.time = 3

[Command]
name = "ddx"
command = D, D, x
time = 20
buffer.time = 3
[Command]
name = "ddy"
command = D, D, y
time = 20
buffer.time = 3
[Command]
name = "ddz"
command = D, D, z
time = 20
buffer.time = 3

[Command]
name = "dda"
command = D, D, a
time = 20
buffer.time = 3
[Command]
name = "ddb"
command = D, D, b
time = 20
buffer.time = 3
[Command]
name = "ddc"
command = D, D, c
time = 20
buffer.time = 3

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

[Command]
name = "qcbfx"
command = ~D, $B, F, x
time = 20
buffer.time = 3
[Command]
name = "qcbfx"
command = ~D, $B, F, ~x
time = 20
buffer.time = 3
[Command]
name = "qcbfy"
command = ~D, $B, F, y
time = 20
buffer.time = 3
[Command]
name = "qcbfy"
command = ~D, $B, F, ~y
time = 20
buffer.time = 3
[Command]
name = "qcbfz"
command = ~D, $B, F, z
time = 20
buffer.time = 3
[Command]
name = "qcbfz"
command = ~D, $B, F, ~z
time = 20
buffer.time = 3

[Command]
name = "2qcfx"
command = ~D, DF, F, D, DF, x
time = 35
buffer.time = 3
[Command]
name = "2qcfx"
command = ~D, DF, F, D, DF, ~x
time = 35
buffer.time = 3
[Command]
name = "2qcfy"
command = ~D, DF, F, D, DF, y
time = 35
buffer.time = 3
[Command]
name = "2qcfy"
command = ~D, DF, F, D, DF, ~y
time = 35
buffer.time = 3
[Command]
name = "2qcfz"
command = ~D, DF, F, D, DF, z
time = 35
buffer.time = 3
[Command]
name = "2qcfz"
command = ~D, DF, F, D, DF, ~z
time = 35
buffer.time = 3

[Command]
name = "2qcbx"
command = ~D, DB, B, D, DB, x
time = 35
buffer.time = 3
[Command]
name = "2qcbx"
command = ~D, DB, B, D, DB, ~x
time = 35
buffer.time = 3
[Command]
name = "2qcby"
command = ~D, DB, B, D, DB, y
time = 35
buffer.time = 3
[Command]
name = "2qcby"
command = ~D, DB, B, D, DB, ~y
time = 35
buffer.time = 3
[Command]
name = "2qcbz"
command = ~D, DB, B, D, DB, z
time = 35
buffer.time = 3
[Command]
name = "2qcbz"
command = ~D, DB, B, D, DB, ~z
time = 35
buffer.time = 3

[Command]
name = "2qcfa"
command = ~D, DF, F, D, DF, a
time = 35
buffer.time = 3
[Command]
name = "2qcfa"
command = ~D, DF, F, D, DF, ~a
time = 35
buffer.time = 3
[Command]
name = "2qcfb"
command = ~D, DF, F, D, DF, b
time = 35
buffer.time = 3
[Command]
name = "2qcfb"
command = ~D, DF, F, D, DF, ~b
time = 35
buffer.time = 3
[Command]
name = "2qcfc"
command = ~D, DF, F, D, DF, c
time = 35
buffer.time = 3
[Command]
name = "2qcfc"
command = ~D, DF, F, D, DF, ~c
time = 35
buffer.time = 3

[Command]
name = "2qcba"
command = ~D, DB, B, D, DB, a
time = 35
buffer.time = 3
[Command]
name = "2qcba"
command = ~D, DB, B, D, DB, ~a
time = 35
buffer.time = 3
[Command]
name = "2qcbb"
command = ~D, DB, B, D, DB, b
time = 35
buffer.time = 3
[Command]
name = "2qcbb"
command = ~D, DB, B, D, DB, ~b
time = 35
buffer.time = 3
[Command]
name = "2qcbc"
command = ~D, DB, B, D, DB, c
time = 35
buffer.time = 3
[Command]
name = "2qcbc"
command = ~D, DB, B, D, DB, ~c
time = 35
buffer.time = 3

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

[Command]
name = "qcf2p"
command = ~D, DF, F, x+y
buffer.time = 3
[Command]
name = "qcf2p"
command = ~D, DF, F, x+z
buffer.time = 3
[Command]
name = "qcf2p"
command = ~D, DF, F, y+z
buffer.time = 3

[Command]
name = "qcf2k"
command = ~D, DF, F, a+b
buffer.time = 3
[Command]
name = "qcf2k"
command = ~D, DF, F, a+c
buffer.time = 3
[Command]
name = "qcf2k"
command = ~D, DF, F, b+c
buffer.time = 3

[Command]
name = "qcb2p"
command = ~D, DB, B, x+y
buffer.time = 3
[Command]
name = "qcb2p"
command = ~D, DB, B, x+z
buffer.time = 3
[Command]
name = "qcb2p"
command = ~D, DB, B, y+z
buffer.time = 3

[Command]
name = "qcb2k"
command = ~D, DB, B, a+b
buffer.time = 3
[Command]
name = "qcb2k"
command = ~D, DB, B, a+c
buffer.time = 3
[Command]
name = "qcb2k"
command = ~D, DB, B, b+c
buffer.time = 3

[Command]
name = "rdp2p"
command = ~B, D, DB, x+y
buffer.time = 3
[Command]
name = "rdp2p"
command = ~B, D, DB, x+z
buffer.time = 3
[Command]
name = "rdp2p"
command = ~B, D, DB, y+z
buffer.time = 3

[Command]
name = "dp2p"
command = ~F, D, DF, x+y
buffer.time = 3
[Command]
name = "dp2p"
command = ~F, D, DF, x+z
buffer.time = 3
[Command]
name = "dp2p"
command = ~F, D, DF, y+z
buffer.time = 3

[Command]
name = "dp2k"
command = ~F, D, DF, a+b
buffer.time = 3
[Command]
name = "dp2k"
command = ~F, D, DF, a+c
buffer.time = 3
[Command]
name = "dp2k"
command = ~F, D, DF, b+c
buffer.time = 3

[Command]
name = "rdp2k"
command = ~B, D, DB, a+b
buffer.time = 3
[Command]
name = "rdp2k"
command = ~B, D, DB, a+c
buffer.time = 3
[Command]
name = "rdp2k"
command = ~B, D, DB, b+c
buffer.time = 3

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

[Command]
name = "dpx"
command = ~F, D, DF, x
buffer.time = 3
[Command]
name = "dpx"
command = ~F, D, DF, ~x
buffer.time = 3
[Command]
name = "dpy"
command = ~F, D, DF, y
buffer.time = 3
[Command]
name = "dpy"
command = ~F, D, DF, ~y
buffer.time = 3
[Command]
name = "dpz"
command = ~F, D, DF, z
buffer.time = 3
[Command]
name = "dpz"
command = ~F, D, DF, ~z
buffer.time = 3

[Command]
name = "rdpx"
command = ~B, D, DB, x
buffer.time = 3
[Command]
name = "rdpx"
command = ~B, D, DB, ~x
buffer.time = 3
[Command]
name = "rdpy"
command = ~B, D, DB, y
buffer.time = 3

[Command]
name = "rdpy"
command = ~B, D, DB, ~y
buffer.time = 3
[Command]
name = "rdpz"
command = ~B, D, DB, z
buffer.time = 3
[Command]
name = "rdpz"
command = ~B, D, DB, ~z
buffer.time = 3

[Command]
name = "dpa"
command = ~F, D, DF, a
buffer.time = 3
[Command]
name = "dpa"
command = ~F, D, DF, ~a
buffer.time = 3
[Command]
name = "dpb"
command = ~F, D, DF, b
buffer.time = 3
[Command]
name = "dpb"
command = ~F, D, DF, ~b
buffer.time = 3
[Command]
name = "dpc"
command = ~F, D, DF, c
buffer.time = 3
[Command]
name = "dpc"
command = ~F, D, DF, ~c
buffer.time = 3

[Command]
name = "rdpa"
command = ~B, D, DB, a
buffer.time = 3
[Command]
name = "rdpa"
command = ~B, D, DB, ~a
buffer.time = 3
[Command]
name = "rdpb"
command = ~B, D, DB, b
buffer.time = 3
[Command]
name = "rdpb"
command = ~B, D, DB, ~b
buffer.time = 3
[Command]
name = "rdpc"
command = ~B, D, DB, c
buffer.time = 3
[Command]
name = "rdpc"
command = ~B, D, DB, ~c
buffer.time = 3



[Command]
name = "qcfx"
command = ~D, DF, F, x
buffer.time = 3
[Command]
name = "qcfx"
command = ~D, DF, F, ~x
buffer.time = 3
[Command]
name = "qcfy"
command = ~D, DF, F, y
buffer.time = 3
[Command]
name = "qcfy"
command = ~D, DF, F, ~y
buffer.time = 3
[Command]
name = "qcfz"
command = ~D, DF, F, z
buffer.time = 3
[Command]
name = "qcfz"
command = ~D, DF, F, ~z
buffer.time = 3

[Command]
name = "qcfa"
command = ~D, DF, F, a
buffer.time = 3
[Command]
name = "qcfa"
command = ~D, DF, F, ~a
buffer.time = 3
[Command]
name = "qcfb"
command = ~D, DF, F, b
buffer.time = 3
[Command]
name = "qcfb"
command = ~D, DF, F, ~b
buffer.time = 3
[Command]
name = "qcfc"
command = ~D, DF, F, c
buffer.time = 3
[Command]
name = "qcfc"
command = ~D, DF, F, ~c
buffer.time = 3

[Command]
name = "qcbx"
command = ~D, DB, B, x
buffer.time = 3
[Command]
name = "qcbx"
command = ~D, DB, B, ~x
buffer.time = 3
[Command]
name = "qcby"
command = ~D, DB, B, y
buffer.time = 3
[Command]
name = "qcby"
command = ~D, DB, B, ~y
buffer.time = 3
[Command]
name = "qcbz"
command = ~D, DB, B, z
buffer.time = 3
[Command]
name = "qcbz"
command = ~D, DB, B, ~z
buffer.time = 3

[Command]
name = "qcba"
command = ~D, DB, B, a
buffer.time = 3
[Command]
name = "qcba"
command = ~D, DB, B, ~a
buffer.time = 3
[Command]
name = "qcbb"
command = ~D, DB, B, b
buffer.time = 3
[Command]
name = "qcbb"
command = ~D, DB, B, ~b
buffer.time = 3
[Command]
name = "qcbc"
command = ~D, DB, B, c
buffer.time = 3
[Command]
name = "qcbc"
command = ~D, DB, B, ~c
buffer.time = 3

[Command]
name = "dpa"
command = ~F, D, DF, a
buffer.time = 3
[Command]
name = "dpa"
command = ~F, D, DF, ~a
buffer.time = 3
[Command]
name = "dpb"
command = ~F, D, DF, b
buffer.time = 3
[Command]
name = "dpb"
command = ~F, D, DF, ~b
buffer.time = 3
[Command]
name = "dpc"
command = ~F, D, DF, c
buffer.time = 3
[Command]
name = "dpc"
command = ~F, D, DF, ~c
buffer.time = 3



[Command]
name = "f2p"
command = $F, x+y
buffer.time = 3
[Command]
name = "f2p"
command = $F, x+z
buffer.time = 3
[Command]
name = "f2p"
command = $F, y+z
buffer.time = 3

[Command]
name = "u2k"
command = $U, a+b
buffer.time = 3
[Command]
name = "u2k"
command = $U, a+c
buffer.time = 3
[Command]
name = "u2k"
command = $U, b+c
buffer.time = 3

[Command]
name = "f2k"
command = $F, a+b
buffer.time = 3
[Command]
name = "f2k"
command = $F, a+c
buffer.time = 3
[Command]
name = "f2k"
command = $F, b+c
buffer.time = 3

[Command]
name = "ffC"  
command = ~F, F, c
buffer.time = 3

[Command]
name = "bbC"  
command = ~b, b, c
buffer.time = 3

[Command]
name = "mash_b"
command = ~b, b, b
time = 20
buffer.time = 3

;-| Dir + Button |-----------------------------------------------------------
[Command]
name = "Fc"
command = F, c
time = 1
buffer.time = 3

[Command]
name = "UFc"
command = UF, c
time = 1
buffer.time = 3

[Command]
name = "Uc"
command = U, c
time = 1
buffer.time = 3

[Command]
name = "UBc"
command = UB, c
time = 1
buffer.time = 3

[Command]
name = "Bc"
command = B, c
time = 1
buffer.time = 3

[Command]
name = "DBc"
command = DB, c
time = 1
buffer.time = 3

[Command]
name = "Dc"
command = D, c
time = 1
buffer.time = 3

[Command]
name = "DFc"
command = DF, c
time = 1
buffer.time = 3


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

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

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

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


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

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

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

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

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

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

;-| Dir + Button |---------------------------------------------------------

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

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

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

;-| Single Button |---------------------------------------------------------
[Command]
name = "a"
command = a
time = 1
buffer.time = 3

[Command]
name = "b"
command = b
time = 1
buffer.time = 3

[Command]
name = "c"
command = c
time = 1
buffer.time = 3

[Command]
name = "x"
command = x
time = 1
buffer.time = 3

[Command]
name = "y"
command = y
time = 1
buffer.time = 3

[Command]
name = "z"
command = z
time = 1
buffer.time = 3

[Command]
name = "s"
command = s
time = 1
buffer.time = 3

[Command]
name = "lp_lk"
command = x+a
time = 10
buffer.time = 3

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

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

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

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

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

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

[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

;-| Hold Button |--------------------------------------------------------
[Command]
name = "hold_x"
command = /x
time = 1

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

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

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

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

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

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

[Command]
name = "hold-c"
command = /c
time = 1
 
[Command]
name = "hold-z"
command = /z
time = 1





[Statedef -1]




;===========================================================================
; SOUP
;===========================================================================

;Seeking Bullet
[State -1, Seeking Bullet]
type = Changestate
triggerall = Var(9) < 9997
triggerall = command = "2qcf2p" && NumExplod(20)=0 || command = "2qcb2p" && NumExplod(20)=1 ;|| command = "x" && command = "y"
triggerall = statetype != A && !WinKo 
triggerall = !IsHelper
triggerall =  power >= 2000 && Var(52) <=0  || Var(52) >= 1 && Var(42) = 0 || power >= 2000 && Var(52) >0 && Var(42) = 1
triggerall = !NumHelper(3310) 
trigger1 = ctrl
trigger2 = stateno = 100 || stateno = 101
trigger3 = stateno = 210 || stateno = 220 || stateno = 227 || stateno = 221 || stateno = 225 || stateno = 240 || stateno = 250 || stateno = 410 || stateno = 420 || stateno = 440 || stateno = 450
trigger3 = movecontact
trigger4 = Anim = 1350 
trigger4 = Time >= 15
trigger4 = P2MoveType = H
trigger5 = Anim = 1351 
trigger5 = Time >= 15
trigger5 = P2MoveType = H
trigger6 = Anim = 1352 
trigger6 = Time >= 15
trigger6 = P2MoveType = H
value = 3300

;Hellzone Grenade
[State -1, Hellzone Grenade]
type = Changestate
triggerall = Var(9) < 9997
triggerall = TeamMode != Simul
triggerall = enemyNear,TeamMode != Simul
triggerall = var(42)<=0 ; No Hellzone Grenades active
triggerall = command = "2qcbx"  || command = "2qcby" || command = "2qcbz" ;|| command = "x"; && command = "y"
triggerall = statetype != A && !WinKo 
triggerall = !IsHelper
triggerall = ctrl
trigger1 =  power >= 3000 && var(52)<=0
trigger2 =  power >= 2000 && var(52)>0
value = 3400

;Hellzone Grenade Launch
[State -1, Hellzone Grenade Launch]
type = Changestate
triggerall = Var(9) < 9997
triggerall = var(42)>0 ; Hellzone Grenades active
triggerall = command = "demon" ;|| command = "x"
triggerall = statetype != A && !WinKo 
triggerall = !IsHelper
trigger1 = ctrl
trigger2 = stateno=900
trigger3 = stateno = 210 || stateno = 220 || stateno = 227 || stateno = 221 ||stateno = 225 || stateno = 240 || stateno = 250 || stateno = 410 || stateno = 420 || stateno = 440 || stateno = 450
trigger3 = movecontact
trigger4 = stateno = 1350 
trigger4 = Anim = 1350 && AnimElemNo(6)>=0
trigger5 = stateno = 1350 
trigger5 = Anim = 1350 && AnimElemNo(8)>=0
trigger6 = stateno = 1350 
trigger6 = Anim = 1350 && AnimElemNo(9)>=0
trigger7 = NumHelper(425)
trigger7 = helper(425), MoveContact
value = 3410

[State 0, Hellzone Grenade AutoLaunch]
type = ChangeState
triggerall = RoundState = 2
triggerall = Var(9) < 9997
triggerall = statetype != A && !WinKo 
triggerall = !IsHelper
trigger1 = Var(42) = 1
trigger1 = Var(36) >= 900
trigger1 = ctrl
value = 3415

; Demon Mode
[State -1]
type = ChangeState
triggerall = Var(9) < 9997
triggerall = TeamMode != Simul
triggerall = enemyNear,TeamMode != Simul
triggerall = roundstate = 2
triggerall = enemy, name != "Saibamen Z2" && authorname = "Team Z2"
triggerall = var(52)<=0 ;No rage mode
triggerall = var(42)<=0 ; No Hellzone Grenades active
triggerall = command = "demon" ;|| command = "y"
triggerall = statetype != A  && !WinKo
triggerall = power >= 2000 && stateno != 2700
;triggerall = !NumHelper(3501)
;triggerall = !NumHelper(3502)
trigger1 = Ctrl
trigger2 = stateno=900
value = 2700

;Deddo Endo
[State -1, Deddo Endo]
type = Changestate
triggerall = Var(9) < 9997
triggerall = var(59)<=0
triggerall = command = "qcfbx" || command = "qcfby" || command = "qcfbz" 
triggerall = statetype != A && !WinKo 
triggerall = !IsHelper
triggerall = power >= 1000 && Var(52) <=0 || Var(52) >= 1 && Var(42) = 0 || power >= 1000 && Var(52) >0 && Var(42) = 1
triggerall = !NumExplod(3006)
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 100 || stateno = 101
trigger3 = stateno = 210 || stateno = 220 || stateno = 227 ||stateno = 225 || stateno = 240 || stateno = 250 || stateno = 410 || stateno = 420 || stateno = 440 || stateno = 450
trigger3 = movecontact
value = 3000

;SBC
[State -1, Special Beam Clones]
type = Changestate
triggerall = IsHelper(3501)
triggerall = RoundState = 2
triggerall =  Cond(root, Facing = 1,command ="qcbfx", command ="qcfbx") || Cond(root, Facing = 1,command ="qcbfz", command ="qcfbz")
triggerall = statetype != A && !WinKo 
triggerall = root,power >= 1000 
trigger1 = StateNo = [35000,35020]
value = 3200

;SBC
[State -1, Special Beam Clones]
type = Changestate
triggerall = IsHelper(3502)
triggerall = RoundState = 2
triggerall =  Cond(root, Facing = 1,command ="qcbfy", command ="qcfby") || Cond(root, Facing = 1,command ="qcbfz", command ="qcfbz")
triggerall = statetype != A && !WinKo 
triggerall = root,power >= 1000 
trigger1 = StateNo = [35000,35020]
value = 3200

;SBC
[State -1, Special Beam Cannon]
type = Changestate
triggerall = Var(9) < 9997
triggerall = command = "2qcfx"  || command = "2qcfy" || command = "2qcfz" ;|| command = "x"; && command = "y"
triggerall = statetype != A && !WinKo 
triggerall = !IsHelper
triggerall = power >= 1000 && !Var(52) || power >= 1000 && Var(52) >0 && Var(42) = 1
trigger1 = ctrl
trigger2 = stateno = 100 || stateno = 101
trigger3 = stateno = 210 || stateno = 220 || stateno = 227 || stateno = 221 ||stateno = 225 || stateno = 240 || stateno = 250 || stateno = 410 || stateno = 420 || stateno = 440 || stateno = 450
trigger3 = movecontact
trigger4 = Anim = 1350 
trigger4 = Time >= 15
trigger4 = P2MoveType = H
trigger5 = Anim = 1351 
trigger5 = Time >= 15
trigger5 = P2MoveType = H
trigger6 = Anim = 1352 
trigger6 = Time >= 15
trigger6 = P2MoveType = H
value = 3200

;SBC Demon
[State -1, Special Beam Cannon]
type = Changestate
triggerall = Var(9) < 9997
triggerall = command = "2qcfx" || command = "2qcfy" || command = "2qcfz"
triggerall = statetype != A && !WinKo 
triggerall = !IsHelper
triggerall = Var(52) >=1 && Var(53) >= 700 && Var(42) = 0
trigger1 = ctrl
trigger2 = stateno = 100 || stateno = 101
trigger3 = stateno = 210 || stateno = 220 || stateno = 227 || stateno = 221 ||stateno = 225 || stateno = 240 || stateno = 250 || stateno = 410 || stateno = 420 || stateno = 440 || stateno = 450
trigger3 = movecontact
trigger4 = stateno = 1350 
trigger4 = Anim = 1350 && AnimElemNo(6)>=0
trigger5 = stateno = 1350 
trigger5 = Anim = 1350 && AnimElemNo(8)>=0
trigger6 = stateno = 1350 
trigger6 = Anim = 1350 && AnimElemNo(9)>=0
value = 3250

;Clones
[State -1, Send out the Clones!]
type = Changestate
triggerall = Var(9) < 9997
triggerall = command = "2qcfc" && NumExplod(20)=0 || command = "2qcfb" && NumExplod(20)=0 || command = "2qcfa" && NumExplod(20)=0 || command = "holddown" && command = "s" && Var(39) = 1 || command = "2qcbc" && NumExplod(20)=1 || command = "2qcbb" && NumExplod(20)=1 || command = "2qcba" && NumExplod(20)=1
triggerall = statetype != A && !WinKo 
triggerall = Cond(NumHelper(3501), power >= 2000, power >= 1000) 
triggerall = NumHelper(3502) = 0
triggerall = !IsHelper
;triggerall = Life >= 160
triggerall = Var(54) != 2
;triggerall = !NumHelper(2750)
;triggerall = !NumHelper(2760)
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 100 || stateno = 101
trigger3 = stateno = 210 || stateno = 220 || stateno = 227 ||stateno = 225 || stateno = 240 || stateno = 250 || stateno = 410 || stateno = 420 || stateno = 440 || stateno = 450
trigger3 = movecontact
value = 3500

;===========================================================================
; SPEC
;===========================================================================

;---------------------------------------------------------------------------
; savage Sweep EX
[State -1, EX savage sweep]
type = ChangeState
triggerall= AILevel<=0
triggerall = Var(9) < 9997
triggerall = command = "rdp2k" 
triggerall = Power >= 500
triggerall = !IsHelper
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 100 || stateno = 101
;Medium Attacks
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 240
trigger4 = movecontact
trigger5 = stateno = 410
trigger5 = movecontact
trigger6 = stateno = 440
trigger6 = movecontact
;Heavy Attacks
trigger7 = stateno = 220
trigger7 = movecontact
trigger8 = stateno = 250
trigger8 = movecontact
trigger9 = stateno = 420
trigger9 = movecontact
trigger10 = stateno = 450
trigger10 = movecontact
trigger11 = stateno = 225
trigger11 = movecontact
trigger12 = stateno = 221
trigger12 = movecontact
trigger13 = stateno = 227
trigger13 = movecontact
trigger14 = stateno = 1510 && !NumExplod(1500)
trigger14 = moveguarded
trigger15 = stateno = 1520 && !NumExplod(1500)
trigger15 = moveguarded
value = 1852

;---------------------------------------------------------------------------
;Carnage Blitz (EX)
[State -1, Carnage Blitz EX]
type = ChangeState
triggerall = Var(9) < 9997
triggerall= var(59)<=0
triggerall = power >= 500
triggerall = command = "dp2p" && NumExplod(20)=0 ||  command = "rdp2p" && NumExplod(20)=1
triggerall = !IsHelper
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 100 || stateno = 101
;Medium Attacks
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 240
trigger4 = movecontact
trigger5 = stateno = 410
trigger5 = movecontact
trigger6 = stateno = 440
trigger6 = movecontact
;Heavy Attacks
trigger7 = stateno = 220
trigger7 = movecontact
trigger8 = stateno = 250
trigger8 = movecontact
trigger9 = stateno = 420
trigger9 = movecontact
trigger10 = stateno = 450
trigger10 = movecontact
trigger11 = stateno = 225
trigger11 = movecontact
trigger12 = stateno = 221
trigger12 = movecontact
trigger13 = stateno = 227
trigger13 = movecontact
trigger14 = stateno = 1500 && !NumExplod(1500)
trigger14 = moveguarded
trigger15 = stateno = 1510 && !NumExplod(1500)
trigger15 = moveguarded
trigger16 = stateno = 1520 && !NumExplod(1500)
trigger16 = moveguarded
value = 1550

;---------------------------------------------------------------------------
; EX Mystic Harpoon
[State -1, EX Mystic Harpoon]
type = ChangeState
triggerall = Var(9) < 9997
triggerall= var(59)<=0
triggerall = roundstate = 2
triggerall = power >= 500
triggerall = command = "qcb2p" 
triggerall = !IsHelper
triggerall = !NumExplod(300603)
trigger1 = statetype != A
trigger1 = ctrl && fvar(19) != 2.5
;Heavy Attacks
trigger2 = stateno = 220
trigger2 = movecontact
trigger3 = stateno = 250
trigger3 = movecontact
trigger4 = stateno = 221
trigger4 = movecontact
trigger5 = stateno = 420
trigger5 = movecontact
trigger6 = stateno = 227
trigger6 = movecontact
value = 1603

;---------------------------------------------------------------------------
; Micro Wave (EX) (AIR)
[State -1, Micro Wave (EX)  (AIR)]
type = ChangeState
triggerall = Var(9) < 9997
triggerall= var(59)<=0
triggerall = roundstate = 2
triggerall = power >= 500
triggerall = command = "qcf2p"
triggerall = !IsHelper
triggerall = Pos Y >-160
trigger1 = statetype = A
trigger1 = ctrl
; Light Attacks
trigger2 = stateno = 600 && animelemtime(4) >= 0 && animelemtime(5) < 0
trigger3 = stateno = 610 && animelemtime(6) >= 0 && animelemtime(7) < 0
trigger4 = stateno = 630 && animelemtime(4) >= 0 && animelemtime(6) < 0
trigger5 = stateno = 640 && (animelemtime(5) >= 0 && animelemtime(6) < 0)
trigger6 = stateno = 640 && animelemtime(8) >= 0 
trigger7 = stateno = 1500 || stateno = 1510 || stateno = 1520
trigger7 = moveguarded && !NumExplod(1500)
value = 1372

;---------------------------------------------------------------------------
; Micro Wave (EX)
[State -1, Micro Wave (EX)]
type = ChangeState
triggerall = Var(9) < 9997
triggerall = var(59)<=0
triggerall = roundstate = 2
triggerall = power >= 500
triggerall = command = "qcf2p" && NumExplod(20)=0 || command = "qcb2p" && NumExplod(20)=1
triggerall = !IsHelper
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 100 || stateno = 101
;Medium Attacks
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 240
trigger4 = movecontact
trigger5 = stateno = 410
trigger5 = movecontact
trigger6 = stateno = 440
trigger6 = movecontact
;Heavy Attacks
trigger7 = stateno = 220
trigger7 = movecontact
trigger8 = stateno = 250
trigger8 = movecontact
trigger9 = stateno = 420
trigger9 = movecontact
trigger10 = stateno = 450
trigger10 = movecontact
trigger11 = stateno = 225
trigger11 = movecontact
trigger12 = stateno = 221
trigger12 = movecontact
trigger13 = stateno = 227
trigger13 = movecontact
value = 1351

;---------------------------------------------------------------------------
; savage Kick LK
[State -1, savage Kick]
type = ChangeState
triggerall= AILevel<=0
triggerall = Var(9) < 9997
triggerall = command = "rdpa"  
triggerall = !IsHelper
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 100 || stateno = 101
;Medium Attacks
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 240
trigger4 = movecontact
trigger5 = stateno = 410
trigger5 = movecontact
trigger6 = stateno = 440
trigger6 = movecontact
;Heavy Attacks
trigger7 = stateno = 220
trigger7 = movecontact
trigger8 = stateno = 250
trigger8 = movecontact
trigger9 = stateno = 420
trigger9 = movecontact
trigger10 = stateno = 450
trigger10 = movecontact
trigger11 = stateno = 225
trigger11 = movecontact
trigger12 = stateno = 221
trigger12 = movecontact
trigger13 = stateno = 227
trigger13 = movecontact
trigger14 = stateno = 1510 && !NumExplod(1500)
trigger14 = moveguarded
trigger15 = stateno = 1520 && !NumExplod(1500)
trigger15 = moveguarded
value = 1870

;---------------------------------------------------------------------------
; savage Kick MK/SK
[State -1, savage Kick]
type = ChangeState
triggerall= AILevel<=0
triggerall = Var(9) < 9997
triggerall = command = "rdpb" || command = "rdpc" 
triggerall = !IsHelper
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 100 || stateno = 101
;Medium Attacks
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 240
trigger4 = movecontact
trigger5 = stateno = 410
trigger5 = movecontact
trigger6 = stateno = 440
trigger6 = movecontact
;Heavy Attacks
trigger7 = stateno = 220
trigger7 = movecontact
trigger8 = stateno = 250
trigger8 = movecontact
trigger9 = stateno = 420
trigger9 = movecontact
trigger10 = stateno = 450
trigger10 = movecontact
trigger11 = stateno = 225
trigger11 = movecontact
trigger12 = stateno = 221
trigger12 = movecontact
trigger13 = stateno = 227
trigger13 = movecontact
trigger14 = stateno = 1510 && !NumExplod(1500)
trigger14 = movecontact
trigger15 = stateno = 1520 && !NumExplod(1500)
trigger15 = movecontact
value = 1871

;---------------------------------------------------------------------------
; Call Clones
[State -1, CallClones]
type = ChangeState
triggerall= AILevel<=0
triggerall = Var(9) < 9997
triggerall = command = "qcbfa"  || command = "qcbfb" || command = "qcbfc" 
triggerall = !IsHelper
triggerall = statetype != A
triggerall = !NumExplod(3507)
triggerall = ctrl
trigger1 = NumHelper(3501)  
trigger1 = helper(3501), Alive 
trigger2 = NumHelper(3502)
trigger2 = helper(3502), Alive
value = 3510

;---------------------------------------------------------------------------
; Trap Shot DP Destroyed!
[State -1]
triggerall = Var(9) < 9997
type = ChangeState
triggerall = var(52)>0 ;demon mode mode
triggerall = command = "dd2p" 
triggerall = statetype != A  && !WinKo
triggerall = ctrl
trigger1 = NumHelper(1751)
trigger1 = helper(1751), StateNo = 1760
trigger2 = NumHelper(1752)
trigger2 = helper(1752), StateNo = 1760
trigger3 = NumHelper(1753)
trigger3 = helper(1753), StateNo = 1760
value = 1803

;---------------------------------------------------------------------------
; Trap Shot DP Destroyed!
[State -1]
type = ChangeState
triggerall = Var(9) < 9997
triggerall = var(52)>0 ;demon mode mode
triggerall = command = "ddx"
triggerall = statetype != A  && !WinKo
triggerall = ctrl
trigger1 = NumHelper(1751)
trigger1 = helper(1751), Var(0) = 1 
trigger1 = helper(1751), StateNo = 1760
trigger2 = NumHelper(1752)
trigger2 = helper(1752), Var(0) = 1
trigger2 = helper(1752), StateNo = 1760
trigger3 = NumHelper(1753)
trigger3 = helper(1753), Var(0) = 1
trigger3 = helper(1753), StateNo = 1760
value = 1800

;---------------------------------------------------------------------------
; Trap Shot DP Destroyed!
[State -1]
type = ChangeState
triggerall = var(52)>0 ;demon mode mode
triggerall = Var(9) < 9997
triggerall = command = "ddy"
triggerall = statetype != A  && !WinKo
triggerall = ctrl
trigger1 = NumHelper(1751)
trigger1 = helper(1751), Var(1) = 1 
trigger1 = helper(1751), StateNo = 1760
trigger2 = NumHelper(1752)
trigger2 = helper(1752), Var(1) = 1
trigger2 = helper(1752), StateNo = 1760
trigger3 = NumHelper(1753)
trigger3 = helper(1753), Var(1) = 1
trigger3 = helper(1753), StateNo = 1760
value = 1801

;---------------------------------------------------------------------------
; Trap Shot DP Destroyed!
[State -1]
type = ChangeState
triggerall = var(52)>0 ;demon mode mode
triggerall = Var(9) < 9997
triggerall = command = "ddz" 
triggerall = statetype != A  && !WinKo
triggerall = ctrl
trigger1 = NumHelper(1751)
trigger1 = helper(1751), Var(2) = 1 
trigger1 = helper(1751), StateNo = 1760
trigger2 = NumHelper(1752)
trigger2 = helper(1752), Var(2) = 1
trigger2 = helper(1752), StateNo = 1760
trigger3 = NumHelper(1753)
trigger3 = helper(1753), Var(2) = 1
trigger3 = helper(1753), StateNo = 1760
value = 1802

;---------------------------------------------------------------------------
; Trap Shot DP Destroyed!
[State -1]
type = ChangeState
triggerall = var(52)>0 ;demon mode mode
triggerall = Var(9) < 9997
triggerall = command = "dd2k" 
triggerall = statetype != A  && !WinKo
triggerall = ctrl
trigger1 = NumHelper(1754)
trigger1 = helper(1754), StateNo = 1760
trigger2 = NumHelper(1755)
trigger2 = helper(1755), StateNo = 1760
trigger3 = NumHelper(1756)
trigger3 = helper(1756), StateNo = 1760
value = 1807

;---------------------------------------------------------------------------
; Trap Shot DP Destroyed!
[State -1]
type = ChangeState
triggerall = var(52)>0 ;demon mode mode
triggerall = Var(9) < 9997
triggerall = command = "dda" ;|| command = "b" 
triggerall = statetype != A  && !WinKo
triggerall = ctrl
trigger1 = NumHelper(1754)
trigger1 = helper(1754), Var(0) = 1
trigger1 = helper(1754), StateNo = 1760
trigger2 = NumHelper(1755)
trigger2 = helper(1755), Var(0) = 1
trigger2 = helper(1755), StateNo = 1760
trigger3 = NumHelper(1756)
trigger3 = helper(1756), Var(0) = 1
trigger3 = helper(1756), StateNo = 1760
value = 1804

;---------------------------------------------------------------------------
; Trap Shot DP Destroyed!
[State -1]
type = ChangeState
triggerall = var(52)>0 ;demon mode mode
triggerall = Var(9) < 9997
triggerall = command = "ddb" 
triggerall = statetype != A  && !WinKo
triggerall = ctrl
trigger1 = NumHelper(1754)
trigger1 = helper(1754), Var(1) = 1
trigger1 = helper(1754), StateNo = 1760
trigger2 = NumHelper(1755)
trigger2 = helper(1755), Var(1) = 1
trigger2 = helper(1755), StateNo = 1760
trigger3 = NumHelper(1756)
trigger3 = helper(1756), Var(1) = 1
trigger3 = helper(1756), StateNo = 1760
value = 1805

;---------------------------------------------------------------------------
; Trap Shot DP Destroyed!
[State -1]
type = ChangeState
triggerall = var(52)>0 ;demon mode mode
triggerall = Var(9) < 9997
triggerall = command = "ddc" 
triggerall = statetype != A  && !WinKo
triggerall = ctrl
trigger1 = NumHelper(1754)
trigger1 = helper(1754), Var(2) = 1
trigger1 = helper(1754), StateNo = 1760
trigger2 = NumHelper(1755)
trigger2 = helper(1755), Var(2) = 1
trigger2 = helper(1755), StateNo = 1760
trigger3 = NumHelper(1756)
trigger3 = helper(1756), Var(2) = 1
trigger3 = helper(1756), StateNo = 1760
value = 1806



;---------------------------------------------------------------------------
; Trap Shot QCF
[State -1]
type = ChangeState
triggerall = var(52)>0 ;demon mode mode
triggerall = Var(9) < 9997
triggerall = command = "qcfa"  || command = "qcfb"  || command = "qcfc"  
triggerall = statetype != A  && !WinKo
triggerall = ctrl
trigger1 = NumHelper(1751)=0
;trigger2 = Var(53) >= 700
trigger2 = NumHelper(1752)=0
;trigger3 = Var(53) >= 1400
trigger3 = NumHelper(1753)=0
value = 1700

;---------------------------------------------------------------------------
; Trap Shot QCB
[State -1]
type = ChangeState
triggerall = var(52)>0 ;demon mode mode
triggerall = Var(9) < 9997
triggerall = command = "qcba"  || command = "qcbb"  || command = "qcbc"  ;|| command = "a" 
triggerall = statetype != A  && !WinKo
triggerall = Var(26) = 2 || Var(26) = 0
triggerall = ctrl
trigger1 = NumHelper(1754)=0
;trigger2 = Var(53) >= 700
trigger2 = NumHelper(1755)=0
;trigger3 = Var(53) >= 1400
trigger3 = NumHelper(1756)=0
value = 1701

;---------------------------------------------------------------------------
;Carnage Blitz (Heavy)
[State -1, Carnage Blitz Heavy]
type = ChangeState
triggerall = Var(9) < 9997
triggerall = command = "dpz" && NumExplod(20)=0 || command = "rdpz" && NumExplod(20)=1
triggerall = !IsHelper
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 100 || stateno = 101
;Medium Attacks
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 240
trigger4 = movecontact
trigger5 = stateno = 410
trigger5 = movecontact
trigger6 = stateno = 440
trigger6 = movecontact
;Heavy Attacks
trigger7 = stateno = 220
trigger7 = movecontact
trigger8 = stateno = 250
trigger8 = movecontact
trigger9 = stateno = 420
trigger9 = movecontact
trigger10 = stateno = 450
trigger10 = movecontact
trigger11 = stateno = 225
trigger11 = movecontact
trigger12 = stateno = 221
trigger12 = movecontact
trigger13 = stateno = 227
trigger13 = movecontact
trigger14 = stateno = 1510 && !NumExplod(1500)
trigger14 = moveguarded
trigger15 = stateno = 1520 && !NumExplod(1500)
trigger15 = moveguarded
value = 1520

;---------------------------------------------------------------------------
;Carnage Blitz (Medium)
[State -1, Carnage Blitz Medium]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = command = "dpy" && NumExplod(20)=0 || command = "rdpy" && NumExplod(20)=1
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 100 || stateno = 101
;Medium Attacks
trigger3 = stateno = 210 && !IsHelper
trigger3 = movecontact
trigger4 = stateno = 240 && !IsHelper
trigger4 = movecontact
trigger5 = stateno = 410 && !IsHelper
trigger5 = movecontact
trigger6 = stateno = 440 && !IsHelper
trigger6 = movecontact
;Heavy Attacks
trigger7 = stateno = 220 && !IsHelper
trigger7 = movecontact
trigger8 = stateno = 250 && !IsHelper
trigger8 = movecontact
trigger9 = stateno = 420 && !IsHelper
trigger9 = movecontact
trigger10 = stateno = 450 && !IsHelper
trigger10 = movecontact
trigger11 = stateno = 225 && !IsHelper
trigger11 = movecontact
trigger12 = stateno = 221 && !IsHelper
trigger12 = movecontact
trigger13 = stateno = 227 && !IsHelper
trigger13 = movecontact
trigger14 = stateno = 1510 && !IsHelper && !NumExplod(1500)
trigger14 = moveguarded
trigger15 = stateno = 1520 && !IsHelper && !NumExplod(1500)
trigger15 = moveguarded
value = 1510

;---------------------------------------------------------------------------
;Carnage Blitz (Light)
[State -1, Carnage Blitz Light]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = command = "dpx" && NumExplod(20)=0 || command = "rdpx" && NumExplod(20)=1
triggerall = !IsHelper
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 100 || stateno = 101
;Medium Attacks
trigger3 = stateno = 210
trigger3 = movecontact
trigger4 = stateno = 240
trigger4 = movecontact
trigger5 = stateno = 410
trigger5 = movecontact
trigger6 = stateno = 440
trigger6 = movecontact
;Heavy Attacks
trigger7 = stateno = 220
trigger7 = movecontact
trigger8 = stateno = 250
trigger8 = movecontact
trigger9 = stateno = 420
trigger9 = movecontact
trigger10 = stateno = 450
trigger10 = movecontact
trigger11 = stateno = 225
trigger11 = movecontact
trigger12 = stateno = 221
trigger12 = movecontact
trigger13 = stateno = 227
trigger13 = movecontact
value = 1500


;---------------------------------------------------------------------------
;Mental Shock
[State -1, Mental Shock]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = command = "rdpx" && NumExplod(20)=0 || command = "rdpy" && NumExplod(20)=0 || command = "rdpz" && NumExplod(20)=0 || command = "dpx" && NumExplod(20)=1 || command = "dpy" && NumExplod(20)=1 || command = "dpz" && NumExplod(20)=1
trigger1 = statetype != A && NumProjID(1451) = 0
trigger1 = ctrl
trigger2 = stateno = 100 || stateno = 101
;Medium Attacks
trigger3 = stateno = 210 && !IsHelper
trigger3 = movecontact
trigger4 = stateno = 240 && !IsHelper
trigger4 = movecontact
trigger5 = stateno = 410 && !IsHelper
trigger5 = movecontact
trigger6 = stateno = 440 && !IsHelper
trigger6 = movecontact
;Heavy Attacks
trigger7 = stateno = 220 && !IsHelper
trigger7 = movecontact
trigger8 = stateno = 250 && !IsHelper
trigger8 = movecontact
trigger9 = stateno = 420 && !IsHelper
trigger9 = movecontact
trigger10 = stateno = 450 && !IsHelper
trigger10 = movecontact
trigger11 = stateno = 225 && !IsHelper
trigger11 = movecontact
trigger12 = stateno = 227 && !IsHelper
trigger12 = movecontact
value = 1400

;---------------------------------------------------------------------------
; Micro Wave (AIR)
[State -1, Micro Wave (AIR)]
type = ChangeState
triggerall = Var(9) < 9997
triggerall= var(59)<=0
triggerall = roundstate = 2
triggerall = command = "qcfx" || command = "qcfy" || command = "qcfz" 
trigger1 = statetype = A
trigger1 = ctrl
; Light Attacks
trigger2 = stateno = 600 && animelemtime(4) >= 0 && animelemtime(5) < 0 && !IsHelper
trigger3 = stateno = 610 && animelemtime(6) >= 0 && animelemtime(7) < 0 && !IsHelper
trigger4 = stateno = 630 && animelemtime(4) >= 0 && animelemtime(6) < 0 && !IsHelper
trigger5 = stateno = 640 && (animelemtime(5) >= 0 && animelemtime(6) < 0) && !IsHelper
trigger6 = stateno = 640 && animelemtime(8) >= 0  && !IsHelper
trigger7 = stateno = 1500 || stateno = 1510 || stateno = 1520
trigger7 = moveguarded
trigger7 = !IsHelper  && !NumExplod(1500)
value = 1370

;---------------------------------------------------------------------------
; Micro Wave
[State -1, Micro Wave]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = command = "qcfx" && NumExplod(20)=0 || command = "qcfy" && NumExplod(20)=0 || command = "qcfz" && NumExplod(20)=0|| command = "qcbx" && NumExplod(20)=1 || command = "qcby" && NumExplod(20)=1 || command = "qcbz" && NumExplod(20)=1
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 100 || stateno = 101
;Light Attacks
trigger3 = stateno = 200 && !IsHelper
trigger3 = movecontact
trigger4 = stateno = 400 && !IsHelper
trigger4 = movecontact
trigger5 = stateno = 230 && !IsHelper
trigger5 = movecontact
trigger6 = stateno = 430 && !IsHelper
trigger6 = movecontact
;Medium Attacks
trigger7 = stateno = 210 && !IsHelper
trigger7 = movecontact
trigger8 = stateno = 240 && !IsHelper
trigger8 = movecontact
trigger9 = stateno = 410 && !IsHelper
trigger9 = movecontact
trigger10 = stateno = 440 && !IsHelper
trigger10 = movecontact
;Heavy Attacks
trigger11 = stateno = 220 && !IsHelper
trigger11 = movecontact
trigger12 = stateno = 250 && !IsHelper
trigger12 = movecontact
trigger13 = stateno = 420 && !IsHelper
trigger13 = movecontact
trigger14 = stateno = 225 && !IsHelper
trigger14 = movecontact
trigger15 = stateno = 450 && !IsHelper
trigger15 = movecontact
trigger16 = stateno = 227 && !IsHelper
trigger16 = movecontact
value = 1350

;---------------------------------------------------------------------------
; Strong Mystic Harpoon
[State -1, Mystic Harpoon]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = roundstate = 2
triggerall = command = "qcbz" && NumExplod(20)=0 || command = "qcfz" && NumExplod(20)=1
trigger1 = statetype != A
trigger1 = ctrl && fvar(19) = 1
trigger1 = P2StateNo != 1662
value = 1602

;---------------------------------------------------------------------------
; Medium Mystic Harpoon
[State -1, Mystic Harpoon]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = roundstate = 2
triggerall = command = "qcby" && NumExplod(20)=0 || command = "qcfy" && NumExplod(20)=1
trigger1 = statetype != A
trigger1 = ctrl && fvar(19) = 1
value = 1601

;---------------------------------------------------------------------------
; Light Mystic Harpoon
[State -1, Mystic Harpoon]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = roundstate = 2
triggerall = command = "qcbx" && NumExplod(20)=0  || command = "qcfx" && NumExplod(20)=1
trigger1 = statetype != A
trigger1 = ctrl && fvar(19) = 1
value = 1600

;---------------------------------------------------------------------------
; Halo Stomp (EX)
[State -1, Halo Stomp (EX)]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = roundstate = 2
triggerall = power >= 500
triggerall = command = "qcf2k" 
triggerall = !IsHelper
triggerall = stateno != 1215
trigger1 = statetype = A
trigger1 = ctrl
; Light Attacks
trigger2 = stateno = 600 && animelemtime(4) >= 0 && animelemtime(5) < 0
trigger3 = stateno = 610 && animelemtime(6) >= 0 && animelemtime(7) < 0
trigger4 = stateno = 630 && animelemtime(4) >= 0 && animelemtime(6) < 0
trigger5 = stateno = 640 && (animelemtime(5) >= 0 && animelemtime(6) < 0)
trigger6 = stateno = 640 && animelemtime(8) >= 0  && !IsHelper
value = 1210



;---------------------------------------------------------------------------
; Halo Stomp
[State -1, Halo Stomp]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = roundstate = 2
triggerall = command = "qcfa" || command = "qcfb" || command = "qcfc"
trigger1 = statetype = A
trigger1 = ctrl
; Light Attacks
trigger2 = stateno = 600 && animelemtime(4) >= 0 && animelemtime(5) < 0 && !IsHelper
trigger3 = stateno = 610 && animelemtime(6) >= 0 && animelemtime(7) < 0 && !IsHelper
trigger4 = stateno = 630 && animelemtime(4) >= 0 && animelemtime(6) < 0 && !IsHelper
trigger5 = stateno = 640 && (animelemtime(5) >= 0 && animelemtime(6) < 0) && !IsHelper
trigger6 = stateno = 640 && animelemtime(8) >= 0  && !IsHelper
value = 1200


;---------------------------------------------------------------------------
; Hyakuretsu Kyaku
[State -1, Hyakuretsu Kyaku]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = roundstate = 2
triggerall = command = "mash_b"
trigger1 = statetype = A
trigger1 = ctrl
trigger1 = ifelse(stateno=50,time>=12,1)
; Light Attacks
trigger2 = stateno = 600 && animelemtime(4) >= 0 && animelemtime(5) < 0 && !IsHelper
trigger3 = stateno = 610 && animelemtime(6) >= 0 && animelemtime(7) < 0 && !IsHelper
trigger4 = stateno = 630 && animelemtime(4) >= 0 && animelemtime(6) < 0 && !IsHelper
trigger5 = stateno = 640 && animelemtime(5) >= 0 && animelemtime(6) < 0 && !IsHelper
trigger6 = stateno = 640 && animelemtime(8) >= 0  && !IsHelper
value = 1100

;---------------------------------------------------------------------------
; Sonic the Hedgehog
[State -1, Sonic the Hedgehog]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = roundstate = 2
triggerall = command != "holddown"
trigger1 = command = "ffC" 
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 100 && command = "c" 
;Medium Attacks
trigger3 = stateno = 210 && !IsHelper && command = "ffC"
trigger3 = movecontact
trigger4 = stateno = 240 && !IsHelper && command = "ffC"
trigger4 = movecontact
trigger5 = stateno = 410 && !IsHelper && command = "ffC"
trigger5 = movecontact
trigger6 = stateno = 440 && !IsHelper && command = "ffC"
trigger6 = movecontact
;Heavy Attacks
trigger7 = stateno = 220 && !IsHelper && command = "ffC"
trigger7 = movecontact
trigger8 = stateno = 250 && !IsHelper && command = "ffC"
trigger8 = movecontact
trigger9 = stateno = 420 && !IsHelper && command = "ffC"
trigger9 = movecontact
trigger10 = stateno = 450 && !IsHelper && command = "ffC"
trigger10 = movecontact
trigger11 = stateno = 225 && !IsHelper && command = "ffC"
trigger11 = movecontact
trigger12 = stateno = 227 && !IsHelper && command = "ffC"
trigger12 = movecontact
value = 1000

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

; Reverse Throw
[State -1, throw2]
type = changestate
triggerall = Var(9) < 9997
trigger1 = command = "a" && command = "x" && command="holdback"
trigger1 = roundstate=2 && ctrl && statetype=S && stateno!=100
value = 810

; Explode Throw
[State -1, throw1]
type = changestate
triggerall = Var(9) < 9997
trigger1 = command = "a" && command = "x" && command="holdfwd" || command = "a" && command = "x"
trigger1 = roundstate=2 && ctrl && statetype=S && stateno!=100
value = 800

;Power Charge
[State -1]
type = ChangeState
triggerall = Var(9) < 9997
triggerall = var(59)<=0
triggerall = roundstate = 2
triggerall = StateType != A
triggerall = Power < 3000
triggerall = stateno != 900
triggerall = Ctrl
trigger1 = command = "hold_b" && command = "hold_y"
trigger1 = !NumHelper(3310) 
value = 900

;Saving Attack
[State -1]
type = ChangeState
triggerall = Var(9) < 9997
triggerall = var(59)<=0
triggerall = roundstate = 2
triggerall = StateType != A
triggerall = Ctrl
triggerall = command = "z" && command = "c" || command = "hold_z" && command = "hold_c"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 100 || stateno = 101
value = 1300

;Zero Counter
[State -1, zero counter]
type = changestate
triggerall = Var(9) < 9997
trigger1 = AILevel <=0
trigger1 = stateno=150 || stateno=152
trigger1 = command="f2k" || command="f2p" || command="u2k"
trigger1 = roundstate=2 && power>=1000 && statetype!=A
value = 750

;Air Zero Counter
[State -1, air zero counter]
type = changestate
triggerall = Var(9) < 9997
trigger1 = AILevel<=0
trigger1 = stateno=154  ; && animelemtime(1)<6
trigger1 = command="f2k" || command="f2p"
trigger1 = roundstate=2 && power>=1000 && statetype=A
value = 760

;===========================================================================
; NORMALS
;===========================================================================
; j. d+MK (cancel ver.)
[State -1, j. d+MK (cancel ver.)]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = NumExplod(90000240)||command = "b"
triggerall = command = "holddown"
triggerall = statetype = A
trigger1 = stateno = 645 && movecontact && !IsHelper
value = 646

; j. d+MK
[State -1, j. d+MK]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = NumExplod(90000240)||command = "b"
triggerall = command = "holddown"  && !IsHelper
triggerall = stateno != 645
triggerall = statetype = A
trigger1 = ctrl
value = 645

; j. d+HP
[State -1, j. d+HP]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = NumExplod(90000220)||command = "z"
triggerall = command = "holddown"  && !IsHelper
triggerall = stateno != 625
triggerall = statetype = A
trigger1 = ctrl
trigger2 = stateno = 610 && movecontact  && !IsHelper
trigger3 = stateno = 640 && movecontact && !IsHelper
value = 625

; j.HK
[State -1, j.HK]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = NumExplod(90000250)||command = "c"
triggerall = stateno != 650
triggerall = statetype = A
trigger1 = ctrl
;Light Attacks
trigger2 = stateno = 600  && !IsHelper
trigger2 = movecontact
trigger3 = stateno = 630 && !IsHelper
trigger3 = movecontact
;Medium Attacks
trigger4 = stateno = 610  && !IsHelper
trigger4 = movecontact
trigger5 = stateno = 640  && !IsHelper
trigger5 = movecontact
value = 650

; j.HP
[State -1, j.HP]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = NumExplod(90000220)||command = "z"
triggerall = stateno != 620 
triggerall = statetype = A
trigger1 = ctrl
;Light Attacks
trigger2 = stateno = 600  && !IsHelper
trigger2 = movecontact
trigger3 = stateno = 630 && !IsHelper
trigger3 = movecontact
;Medium Attacks
trigger4 = stateno = 610  && !IsHelper
trigger4 = movecontact
trigger5 = stateno = 640  && !IsHelper
trigger5 = movecontact
value = 620

; j.MK
[State -1, j.MK]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = NumExplod(90000240)||command = "b"
triggerall = stateno != 640 
triggerall = statetype = A
trigger1 = ctrl
;Light Attacks
trigger2 = stateno = 600  && !IsHelper
trigger2 = movecontact
trigger3 = stateno = 630 && !IsHelper
trigger3 = movecontact
value = 640

; j.MP
[State -1, j.MP]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = NumExplod(90000210)||command = "y"
triggerall = stateno != 610 
triggerall = statetype = A
trigger1 = ctrl
;Light Attacks
trigger2 = stateno = 600  && !IsHelper
trigger2 = movecontact
trigger3 = stateno = 630 && !IsHelper
trigger3 = movecontact
value = 610

; j.LK
[State -1, j.LK]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = NumExplod(90000230)||command = "a"
triggerall = stateno != 640
triggerall = statetype = A
trigger1 = ctrl
value = 630

; j.LP
[State -1, j.LP]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = NumExplod(90000200)||command = "x"
triggerall = stateno != 600
triggerall = statetype = A
trigger1 = ctrl
value = 600

; Forward + s.HK
[State -1, s.HK]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = command = "c"
triggerall = command = "holdfwd"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 100 || stateno = 101
;Light Attacks
trigger3 = stateno = 200 && !IsHelper
trigger3 = movecontact
trigger4 = stateno = 400 && !IsHelper
trigger4 = movecontact
trigger5 = stateno = 230 && !IsHelper
trigger5 = movecontact
trigger6 = stateno = 430 && !IsHelper
trigger6 = movecontact
;Medium Attacks
trigger7 = stateno = 210 && !IsHelper
trigger7 = movecontact
trigger8 = stateno = 410 && !IsHelper
trigger8 = movecontact
trigger9 = stateno = 240 && !IsHelper
trigger9 = movecontact
trigger10 = stateno = 440 && !IsHelper
trigger10 = movecontact
value = 261

; s.HK
[State -1, s.HK]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = command = "c"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 100 || stateno = 101
;Light Attacks
trigger3 = stateno = 200 && !IsHelper
trigger3 = movecontact
trigger4 = stateno = 400 && !IsHelper
trigger4 = movecontact
trigger5 = stateno = 230 && !IsHelper
trigger5 = movecontact
trigger6 = stateno = 430 && !IsHelper
trigger6 = movecontact
;Medium Attacks
trigger7 = stateno = 210 && !IsHelper
trigger7 = movecontact
trigger8 = stateno = 410 && !IsHelper
trigger8 = movecontact
trigger9 = stateno = 240 && !IsHelper
trigger9 = movecontact
trigger10 = stateno = 440 && !IsHelper
trigger10 = movecontact
value = 250

; Back + s.HP
[State -1, s.HP]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = roundstate = 2
triggerall = command = "z"
triggerall = command = "holdback"
triggerall = command != "holddown"
triggerall = !IsHelper
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 100 || stateno = 101
;Light Attacks
trigger3 = stateno = 200 && !IsHelper
trigger3 = movecontact
trigger4 = stateno = 400 && !IsHelper
trigger4 = movecontact
trigger5 = stateno = 230 && !IsHelper
trigger5 = movecontact
trigger6 = stateno = 430 && !IsHelper
trigger6 = movecontact
;Medium Attacks
trigger7 = stateno = 210 && !IsHelper
trigger7 = movecontact
trigger8 = stateno = 410 && !IsHelper
trigger8 = movecontact
trigger9 = stateno = 240 && !IsHelper
trigger9 = movecontact
trigger10 = stateno = 440 && !IsHelper
trigger10 = movecontact
value = 227

; s.HP
[State -1, s.HP]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = roundstate = 2
triggerall = command = "z"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 100 || stateno = 101
;Light Attacks
trigger3 = stateno = 200 && !IsHelper
trigger3 = movecontact
trigger4 = stateno = 400 && !IsHelper
trigger4 = movecontact
trigger5 = stateno = 230 && !IsHelper
trigger5 = movecontact
trigger6 = stateno = 430 && !IsHelper
trigger6 = movecontact
;Medium Attacks
trigger7 = stateno = 210 && !IsHelper
trigger7 = movecontact
trigger8 = stateno = 410 && !IsHelper
trigger8 = movecontact
trigger9 = stateno = 240 && !IsHelper
trigger9 = movecontact
trigger10 = stateno = 440 && !IsHelper
trigger10 = movecontact
value = 220

; s.MK
[State -1, s.MK]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = command = "b"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 100 || stateno = 101
;Light Attacks
trigger3 = stateno = 200 && !IsHelper
trigger3 = movecontact
trigger4 = stateno = 400 && !IsHelper
trigger4 = movecontact
trigger5 = stateno = 230 && !IsHelper
trigger5 = movecontact
trigger6 = stateno = 430 && !IsHelper
trigger6 = movecontact
value = 240

; s.MP
[State -1, s.MP]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = command = "y"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 100 || stateno = 101
;Light Attacks
trigger3 = stateno = 200 && !IsHelper
trigger3 = movecontact
trigger4 = stateno = 400 && !IsHelper
trigger4 = movecontact
trigger5 = stateno = 230 && !IsHelper
trigger5 = movecontact
trigger6 = stateno = 430 && !IsHelper
trigger6 = movecontact
;----------------------------
value = 210

; s.LK
[State -1, s.LK]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = command = "a"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 100 || stateno = 101
value = 230

; s.LP
[State -1, s.LP]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = command = "x"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 100 || stateno = 101
value = 200

; c.HK
[State -1, c.HK]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = command = "holddown"
triggerall = command = "c"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 101
;Light Attacks
trigger3 = stateno = 200 && !IsHelper
trigger3 = movecontact
trigger4 = stateno = 400 && !IsHelper
trigger4 = movecontact
trigger5 = stateno = 230 && !IsHelper
trigger5 = movecontact
trigger6 = stateno = 430 && !IsHelper
trigger6 = movecontact
;Medium Attacks
trigger7 = stateno = 210 && !IsHelper
trigger7 = movecontact
trigger8 = stateno = 410 && !IsHelper
trigger8 = movecontact
trigger9 = stateno = 240 && !IsHelper
trigger9 = movecontact
trigger10 = stateno = 440 && !IsHelper
trigger10 = movecontact
value = 450

; 3HP
[State -1, 3HP]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = command = "holddown" && command = "holdfwd"
triggerall = command = "z"  && !IsHelper
triggerall = statetype != A  && NumProjID(426) = 0
trigger1 = ctrl
trigger2 = stateno = 100 || stateno = 101
;Light Attacks
trigger3 = stateno = 200 && !IsHelper
trigger3 = movecontact
trigger4 = stateno = 400 && !IsHelper
trigger4 = movecontact
trigger5 = stateno = 230 && !IsHelper
trigger5 = movecontact
trigger6 = stateno = 430 && !IsHelper
trigger6 = movecontact
;Medium Attacks
trigger7 = stateno = 210 && !IsHelper
trigger7 = movecontact
trigger8 = stateno = 410 && !IsHelper
trigger8 = movecontact
trigger9 = stateno = 240 && !IsHelper
trigger9 = movecontact
trigger10 = stateno = 440 && !IsHelper
trigger10 = movecontact
trigger11 = stateno = 1870 && !IsHelper
trigger11 = movecontact
value = 425

; c.HP
[State -1, c.HP]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = command = "holddown"
triggerall = command = "z"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 100 || stateno = 101
;Light Attacks
trigger3 = stateno = 200 && !IsHelper
trigger3 = movecontact
trigger4 = stateno = 400 && !IsHelper
trigger4 = movecontact
trigger5 = stateno = 230 && !IsHelper
trigger5 = movecontact
trigger6 = stateno = 430 && !IsHelper
trigger6 = movecontact
;Medium Attacks
trigger7 = stateno = 210 && !IsHelper
trigger7 = movecontact
trigger8 = stateno = 410 && !IsHelper
trigger8 = movecontact
trigger9 = stateno = 240 && !IsHelper
trigger9 = movecontact
trigger10 = stateno = 440 && !IsHelper
trigger10 = movecontact
value = 420

; c.MK
[State -1, c.MK]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = command = "holddown"
triggerall = command = "b"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 100 || stateno = 101
;Light Attacks
trigger3 = stateno = 200 && !IsHelper
trigger3 = movecontact
trigger4 = stateno = 400 && !IsHelper
trigger4 = movecontact
trigger5 = stateno = 230 && !IsHelper
trigger5 = movecontact
trigger6 = stateno = 430 && !IsHelper
trigger6 = movecontact
value = 440

; c.MP
[State -1, c.MP]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = command = "holddown"
triggerall = command = "y"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 100 || stateno = 101
;Light Attacks
trigger3 = stateno = 200 && !IsHelper
trigger3 = movecontact
trigger4 = stateno = 400 && !IsHelper
trigger4 = movecontact
trigger5 = stateno = 230 && !IsHelper
trigger5 = movecontact
trigger6 = stateno = 430 && !IsHelper 
trigger6 = movecontact
;----------------------------
value = 410

; c.LK
[State -1, c.LK]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = command = "holddown"
triggerall = command = "a"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 100 || stateno = 101
value = 430

; c.LP
[State -1, c.LP]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = command = "holddown"
triggerall = command = "x"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = stateno = 100 || stateno = 101
value = 400


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

; Taunt
[State -1, Taunt]
type = ChangeState
triggerall = !IsHelper
triggerall = Var(9) < 9997
triggerall= command != "holddown"
triggerall = command = "s" && stateno!=195
trigger1 = statetype != A
trigger1 = ctrl
value = 195

;Air Dash Forward
[State -1, Fwd]
type = ChangeState
value = 110
triggerall = Var(9) < 9997
triggerall = var(10) = 0 ;limiter
trigger1 = pos Y < -20
triggerall = stateno != 105
trigger1 = (command = "FF") && (statetype = A) && (ctrl)

;Air Dash Back
[State -1, Back]
type = ChangeState
value = 115
triggerall = Var(9) < 9997
triggerall = var(10) = 0 ;limiter
triggerall = vel x <= 0
trigger1 = pos Y < -20
triggerall = stateno != 105
trigger1 = (command = "BB") && (statetype = A) && (ctrl)

; Run Fwd
[State -1, Run Fwd]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = command = "FF"
trigger1 = statetype = S && ctrl
trigger1 = roundstate=2 && (stateno!=[100,106])
trigger2 = Anim = 221
trigger2 = AnimElemTime(10)>=0
trigger3 = stateno = 221 && !IsHelper
trigger3 = movecontact
value = 100

; Run Back
[State -1, Run Back]
type = ChangeState
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = command = "BB"
triggerall = statetype = S
trigger1 = ctrl
trigger2 = stateno=195 && animelemtime(3)>=0
value = 105

; Super Jump
;This state executes only after performing the air launcher
[State -1, Jump Launcher]
type = ChangeState
value = 10230
triggerall= var(59)<=0
triggerall = Var(9) < 9997
triggerall = command = "holdup"
trigger1 = (stateno = 450 || stateno = 450) && animelemtime(6)>0 && MoveHit  && !IsHelper

[State -1, Super Jump Straight Up]
type = ChangeState
value = 10231
triggerall= var(59)<=0
triggerall = Var(9) < 9997
trigger1 = statetype = S
trigger1 = ctrl
trigger1 = command = "superjump"

[State -1, Super Jump Forward]
type = ChangeState
value = 10232
triggerall= var(59)<=0
triggerall = Var(9) < 9997
trigger1 = statetype = S
trigger1 = ctrl
trigger1 = command = "superjumpforward"

[State -1, Super Jump Backward]
type = ChangeState
value = 10233
triggerall= var(59)<=0
triggerall = Var(9) < 9997
trigger1 = statetype = S
trigger1 = ctrl
trigger1 = command = "superjumpbackward"

;chickenblock
[State -1, ChangeState]
type = ChangeState
triggerall = AILevel = 0
triggerall = InGuardDist
triggerall = StateType = A
trigger1 = command = "holdback" && command = "holdup"
trigger1 = ctrl
trigger2 = StateNo = 5210 && Time = 14
trigger2 = (command = "holdback" && command = "holdup") || (command = "holdback" && command = "holddown") || (command = "holdback" )
value = 120

;Disable Clone
[State 0, VarSet]
type = VarSet
triggerall = !Var(31)
triggerall = !IsHelper
triggerall = Var(9) < 9997
triggerall = command = "s" || command = "hold_s"
trigger1 = P2MoveType = H
var(31) = 1

;Enable Clone
[State 0, VarSet]
type = VarSet
triggerall = Var(31)=1
triggerall = !IsHelper
triggerall = Var(9) < 9997
trigger1 = P2MoveType != H
var(31) = 0

;========================================
;Clone stuff


[State 0, HitOverride]
type = HitOverride
triggerall = IsHelper(3501) || IsHelper(3502)
trigger1 = StateNo != [120,155]
attr = SCA,HA,HP,HT       ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
slot = 0
stateno = 3520
time = 1
forceair = 0
ignorehitpause = 1
persistent = 1


[State 0, ChangeState]
type = ChangeState
trigger1 = IsHelper(3501) 
trigger1 = root, NumHelper(3502)
trigger1 = root, Var(41) = 2
trigger1 = helper(3502),StateNo = 3514
trigger2 = IsHelper(3502) 
trigger2 = root, Var(41) = 2
trigger2 = root, NumHelper(3501)
trigger2 = helper(3501),StateNo = 3514
value = 3517

[State 0, SprPriority]
type = SprPriority
trigger1 = IsHelper(3501) || IsHelper(3502)
trigger1 = StateNo != 3514
trigger1 = 1
value = -3 

[State 0, PlayerPush]
type = PlayerPush
trigger1 = IsHelper(3501) || IsHelper(3502)
trigger1 = Cond(!Alive,0,1)
value = 1

[State 0, ScreenBound]
type = ScreenBound
trigger1 = IsHelper(3501) || IsHelper(3502)
value = 1

[State 0, CtrlSet]
type = CTRLSet
triggerall = IsHelper(3501) || IsHelper(3502)
trigger1 = 1
trigger2 = command = "up"
trigger3 = command = "down"
trigger4 = command = "back"
trigger5 = command = "fwd"
trigger6 = command = "holdup"
trigger7 = command = "holddown"
trigger8 = command = "holdback"
trigger9 = command = "holdfwd"
trigger10 = PrevStateNo = [0,36000]
value = 0
ignorehitpause = 1
persistent = 1

[State 0, PalFXWiz]
type = PalFX
triggerall = IsHelper(3501) || IsHelper(3502)
trigger1 = StateNo != 3520
trigger1 = Life <= 30
trigger1 = Alive
trigger1 = GameTime%20 = 0
trigger1 = RoundState != 4
time = 4            ;time = 1
add = 128,0,0   ;add = 256,256,256
mul = 128,0,0   ;mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256

[State 0, Turn]
type = Turn
triggerall = IsHelper(3501) 
triggerall = root, StateNo = 3510
triggerall = facing = root,facing
triggerall = RootDist X <= 19 
triggerall = !(RootDist X >= -19)
trigger1 = StateNo = 35000 && root, Var(41)= 0
trigger2 = StateNo = 35011 && root, Var(41)= 0
trigger3 = StateNo = 35012 && root, Var(41)= 0
trigger4 = StateNo = 35020 && root, Var(41)= 0
trigger5 = StateNo = 35100 && root, Var(41)= 0
trigger6 = StateNo = 35106 && root, Var(41)= 0
trigger7 = StateNo = 35000 && root, Var(41)= 1  &&  !NumHelper(3502)
trigger8 = StateNo = 35011 && root, Var(41)= 1  &&  !NumHelper(3502)
trigger9 = StateNo = 35012 && root, Var(41)= 1  &&  !NumHelper(3502)
trigger10 = StateNo = 35020 && root, Var(41)= 1  &&  !NumHelper(3502)
trigger11 = StateNo = 35100 && root, Var(41)= 1  &&  !NumHelper(3502)
trigger12 = StateNo = 35106 && root, Var(41)= 1  &&  !NumHelper(3502)
trigger13 = StateNo = 35000 && root, Var(41)= 2
trigger14 = StateNo = 35011 && root, Var(41)= 2
trigger15 = StateNo = 35012 && root, Var(41)= 2
trigger16 = StateNo = 35020 && root, Var(41)= 2
trigger17 = StateNo = 35100 && root, Var(41)= 2
trigger18 = StateNo = 35106 && root, Var(41)= 2


[State 0, Turn]
type = Turn
triggerall = IsHelper(3502) 
triggerall = root, StateNo = 3510
triggerall = facing = root,facing
triggerall = RootDist X <= 19 
triggerall = !(RootDist X >= -19)
trigger1 = StateNo = 35000 && root, Var(41)= 0  &&  !NumHelper(3501)
trigger2 = StateNo = 35011 && root, Var(41)= 0  &&  !NumHelper(3501)
trigger3 = StateNo = 35012 && root, Var(41)= 0  &&  !NumHelper(3501)
trigger4 = StateNo = 35020 && root, Var(41)= 0  &&  !NumHelper(3501)
trigger5 = StateNo = 35100 && root, Var(41)= 0  &&  !NumHelper(3501)
trigger6 = StateNo = 35106 && root, Var(41)= 0  &&  !NumHelper(3501)
trigger7 = StateNo = 35000 && root, Var(41)= 1  
trigger8 = StateNo = 35011 && root, Var(41)= 1 
trigger9 = StateNo = 35012 && root, Var(41)= 1 
trigger10 = StateNo = 35020 && root, Var(41)= 1  
trigger11 = StateNo = 35100 && root, Var(41)= 1  
trigger12 = StateNo = 35106 && root, Var(41)= 1  
trigger13 = StateNo = 35000 && root, Var(41)= 2
trigger14 = StateNo = 35011 && root, Var(41)= 2
trigger15 = StateNo = 35012 && root, Var(41)= 2
trigger16 = StateNo = 35020 && root, Var(41)= 2
trigger17 = StateNo = 35100 && root, Var(41)= 2
trigger18 = StateNo = 35106 && root, Var(41)= 2

[State 0, 4] 
type = ChangeState
triggerall = NumEnemy && RoundState = 2
triggerall = IsHelper
trigger1 = Var(1) = 1
trigger1 = StateNo = 35020
trigger1 = RootDist X > 60
value = 35100
ctrl = 0

[State 0, 4] 
type = ChangeState
triggerall = NumEnemy && RoundState = 2
triggerall = IsHelper(3501)
triggerall = root, StateNo = 3510
triggerall = StateNo != 35100
triggerall = StateNo = 35000
trigger1 = root, Var(41)= 0
trigger2 = root, Var(41)= 1  && !NumHelper(3502)
trigger3 = root, Var(41)= 2
value = 35100
ctrl = 0

[State 0, 4] 
type = ChangeState
triggerall = NumEnemy && RoundState = 2
triggerall = IsHelper(3502)
triggerall = root, StateNo = 3510
triggerall = StateNo != 35100
triggerall = StateNo = 35000
trigger1 = root, Var(41)= 0  &&  !NumHelper(3501)
trigger2 = root, Var(41)= 1
trigger3 = root, Var(41)= 2
value = 35100
ctrl = 0

[State 0, 4] 
type = ChangeState
triggerall = NumEnemy && RoundState = 2
triggerall = IsHelper(3501) || IsHelper(3502)
triggerall = Var(1) = 1
trigger1 = StateNo = 35020
trigger1 = RootDist X < -80
value = 35105
ctrl = 0

[State 0, 4] 
type = ChangeState
triggerall = NumEnemy && RoundState = 2
triggerall = IsHelper(3501) || IsHelper(3502)
triggerall = !root,Var(31)
triggerall = Var(1) = 3
triggerall = StateNo = 5050
trigger1 = MoveType = H
trigger1 = StateType = A
trigger1 = Pos Y < -10
trigger1 = StateNo != 35210
trigger1 = StateNo != 35201
trigger1 = random < 20
trigger1 = Alive
value = 35210
ctrl = 0

[State 0, ChangeState]
type = ChangeState
triggerall = NumEnemy && RoundState = 2
triggerall = IsHelper(3501) || IsHelper(3502)
triggerall = !root,Var(31)
triggerall = Var(1) = 3
triggerall = root, StateNo != [3510,3511]
trigger1 = random > 700
trigger1 = P2BodyDist X <= 40
trigger1 = P2BodyDist Y >= -5
trigger1 = MoveType != H
trigger1 = StateType = A
trigger1 = MoveType != A
value = 630
ctrl = 0

[State 0, ChangeState]
type = ChangeState
triggerall = NumEnemy && RoundState = 2
triggerall = IsHelper(3501) || IsHelper(3502)
triggerall = !root,Var(31)
triggerall = Var(1) = 3
triggerall = root, StateNo != [3510,3511]
trigger1 = random < 500
trigger1 = P2BodyDist X <= 80
trigger1 = P2BodyDist Y >= -25
trigger1 = Vel Y >= 1
trigger1 = MoveType != H
trigger1 = StateType = A
trigger1 = MoveType != A
value = 620
ctrl = 0

[State 0, ChangeState]
type = ChangeState
triggerall = NumEnemy && RoundState = 2
triggerall = IsHelper(3501) || IsHelper(3502)
triggerall = !root,Var(31)
triggerall = Var(1) = 3
triggerall = root, StateNo != [3510,3511]
trigger1 = random > 700
trigger1 = P2BodyDist Y < -5
trigger1 = MoveType != H
trigger1 = StateType = A
trigger1 = MoveType != A
value = 650
ctrl = 0

[State 0, ChangeState]
type = ChangeState
triggerall = NumEnemy && RoundState = 2
triggerall = IsHelper(3501) || IsHelper(3502)
triggerall = !root,Var(31)
triggerall = Var(1) = 3
triggerall = root, StateNo != [3510,3511]
trigger1 = random > 970
trigger1 = P2BodyDist X <= 70
trigger1 = P2BodyDist Y >= -10
trigger1 = MoveType != H
trigger1 = StateType = A 
trigger1 = MoveType != A
value = 1395
ctrl = 0

[State 0, 4] 
type = ChangeState
triggerall = NumEnemy && RoundState = 2
triggerall = IsHelper(3501) || IsHelper(3502)
triggerall = !root,Var(31)
triggerall = Var(1) = 3
triggerall = StateNo = 5050
trigger1 = MoveType = H
trigger1 = StateType = A
trigger1 = Pos Y >= 0
trigger1 = StateNo != 35210
trigger1 = StateNo != 35201
trigger1 = Alive
trigger1 = random < 30
value = 35201
ctrl = 0

[State 0, 4] 
type = ChangeState
triggerall = NumEnemy && RoundState = 2
triggerall = IsHelper(3501) || IsHelper(3502)
triggerall = !root,Var(31)
triggerall = Var(1) = 1
triggerall = root, StateNo != [3510,3511]
trigger1 = StateNo = 35100  
trigger1 = facing = enemy,facing
trigger1 = random < 100
trigger1 = P2StateType != A
value = 35040
ctrl = 0

[State 0, 4] 
type = null;ChangeState
triggerall = NumEnemy && RoundState = 2
triggerall = IsHelper(3501) || IsHelper(3502)
triggerall = Var(1) = 2
triggerall = root, StateNo != [3510,3511]
trigger1 = StateNo = 35000  
trigger1 = facing = enemy,facing
trigger1 = random < 10
trigger1 = P2StateType != A
value = 35040
ctrl = 0

[State 0, 4] 
type = ChangeState
triggerall = NumEnemy && RoundState = 2
triggerall = IsHelper(3501) || IsHelper(3502)
triggerall = !root,Var(31)
triggerall = Var(1) = 1
triggerall = Random < 20
triggerall = root, StateNo != [3510,3511]
trigger1 = StateType = A
trigger1 = StateNo != [1200,1250]
trigger1 = MoveType != H
trigger1 = Pos Y <= -40
value = 1200
ctrl = 0

;clone DWave
[State 0, 4] 
type = ChangeState
triggerall = NumEnemy && RoundState = 2
triggerall = IsHelper(3501) || IsHelper(3502)
triggerall = !root,Var(31)
triggerall = facing != enemy,facing
triggerall = Var(1) = 1
triggerall = StateNo = 35000 || StateNo = 35020
triggerall = Random < 30
triggerall = root, StateNo != [3510,3511]
trigger1 = P2BodyDist X < 100
trigger2 = P2BodyDist X >= 30 && P2BodyDist X <= 120
trigger2 = enemy, Vel Y > 0
trigger2 = P2BodyDist Y >= -40
value = 1350
ctrl = 0

;Clone telesweep MK/HK
[State 0, 4] 
type = ChangeState
triggerall = NumEnemy && RoundState = 2
triggerall = IsHelper(3501) || IsHelper(3502)
triggerall = !root,Var(31)
triggerall = facing != enemy,facing
triggerall = Var(1) = 1
triggerall = StateNo = 35000 || StateNo = 35020
triggerall = root, StateNo != [3510,3511]
trigger1 = Random > 990
trigger1 = P2StateType !=A
trigger2 = !NumExplod(1802)
trigger2 = P2StateType = L
value = 1871
ctrl = 0

;clone mental shock
[State 0, 4] 
type = ChangeState
triggerall = NumEnemy && RoundState = 2
triggerall = IsHelper(3501) || IsHelper(3502)
triggerall = !root,Var(31)
triggerall = NumProjID(1451) = 0
triggerall = facing != enemy,facing
triggerall = Var(1) = 1
triggerall = StateNo = 35000 || StateNo = 35020
triggerall = Random >= 900 && Random < 990
triggerall = P2MoveType !=H
triggerall = root, StateNo != [3510,3511]
trigger1 = P2BodyDist X < 40
trigger1 = P2BodyDist Y < -10
value = 1400
ctrl = 0

;clone carnage blitz
[State 0, 4] 
type = ChangeState
triggerall = NumEnemy && RoundState = 2
triggerall = IsHelper(3501) || IsHelper(3502)
triggerall = !root,Var(31)
triggerall = Var(1) = 1
triggerall = root, StateNo != [3510,3511]
trigger1 = StateNo = 35100  
trigger1 = facing = enemy,facing
trigger1 = P2MoveType != H
trigger1 = Random >= 900
value = 1510
ctrl = 0

;clone Harpoon
[State 0, 4] 
type = ChangeState
triggerall = NumEnemy && RoundState = 2
triggerall = IsHelper(3501) || IsHelper(3502)
triggerall = !root,Var(31)
triggerall = NumProjID(1451) = 0
triggerall = facing != enemy,facing
triggerall = Var(1) = 1
triggerall = StateNo = 35000 || StateNo = 35020
triggerall = root, StateNo != [3510,3511]
triggerall = Random <= 4
trigger1 = P2BodyDist X > 121
trigger1 = P2BodyDist Y = 0
value = 1602
ctrl = 0

[state -1, remove Flip KO FX]
type = removeexplod
trigger1 = IsHelper
trigger1 = NumExplod(5938)
id = 5938
[state -1, remove Twist KO FX]
type = removeexplod
trigger1 = IsHelper
trigger1 = NumExplod(20152)
id = 20152
[state 17100, Shocked FX]
type = removeexplod
trigger1 = IsHelper(3501) || IsHelper(3502)
trigger1 = NumExplod(9011)
ID = 9011


; Stop SBC Charge SND1
[State -2, StopSnd]
type = StopSnd
triggerall = IsHelper
trigger1 = stateno = [3211,3213]
trigger2 = MoveType = H
trigger3 = stateno = [3516,3523]
trigger4 = MoveType = I
channel = 2

; Stop SBC Charge SND2
[State -2, StopSnd]
type = StopSnd
triggerall = IsHelper
trigger1 = stateno = [3211,3213]
trigger2 = MoveType = H
trigger3 = stateno = [3516,3523]
trigger4 = MoveType = I
channel = 8

;Stop Beam Snd
[State 0, StopSnd]
type = StopSnd
triggerall = IsHelper
trigger1 = MoveType = H
trigger2 = stateno = [3516,3523]
trigger3 = MoveType = I
channel = 7

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = MoveType = I
id = 3203
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = MoveType = I
id = 3204
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = MoveType = I
id = 3205
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = MoveType = I
id = 3206
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = MoveType = I
id = 3207
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = MoveType = I
id = 3208

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

[State -3, GetHitSnd Light]
type = playsnd
triggerall = IsHelper
triggerall = root,var(55)=0		;Voice=English	
triggerall = alive && (time = 1)
triggerall = stateno=5000||stateno=5010||stateno=5020||stateno=5070||stateno=5080
trigger1 = numenemy > 0
trigger1 = enemynear,hitdefattr = SCA,SA,HA
trigger2 = gethitvar(animtype)=0 && random<250
value = 5000,0+random%2
channel = 0
ignorehitpause = 1
persistent = 0
volumescale = 200

[State -3, GetHitSnd Medium]
type = playsnd
triggerall = IsHelper
triggerall = root,var(55)=0		;Voice=English
triggerall = alive && (time = 1)
triggerall = stateno=5000||stateno=5010||stateno=5020||stateno=5070||stateno=5080
trigger1 = numenemy > 0
trigger1 = enemynear,hitdefattr = SCA,SA,HA
trigger2 = gethitvar(animtype)=1 && random<375
value = 5000,1+random%2
channel = 0
ignorehitpause = 1
persistent = 0
volumescale = 200

[State -3, GetHitSnd Hard]
type = playsnd
triggerall = IsHelper
triggerall = root,var(55)=0		;Voice=English
triggerall = alive && (time = 1)
triggerall = stateno=5000||stateno=5010||stateno=5020||stateno=5070||stateno=5080
trigger1 = numenemy > 0
trigger1 = enemynear,hitdefattr = SCA,SA,HA
trigger2 = gethitvar(animtype)>=2 && random<500
value = 5000,2+random%2
channel = 0
ignorehitpause = 1
persistent = 0
volumescale = 200
;--------------------------------------
[State -3, GetHitSnd Light]
type = playsnd
triggerall = IsHelper
triggerall = root,var(55)=1		;Voice=Japan
triggerall = alive && (time = 1)
triggerall = stateno=5000||stateno=5010||stateno=5020||stateno=5070||stateno=5080
trigger1 = numenemy > 0
trigger1 = enemynear,hitdefattr = SCA,SA,HA
trigger2 = gethitvar(animtype)=0 && random<250
value = 5000,10+random%2
channel = 0
ignorehitpause = 1
persistent = 0
volumescale = 200

[State -3, GetHitSnd Medium]
type = playsnd
triggerall = IsHelper
triggerall = root,var(55)=1		;Voice=Japan
triggerall = alive && (time = 1)
triggerall = stateno=5000||stateno=5010||stateno=5020||stateno=5070||stateno=5080
trigger1 = numenemy > 0
trigger1 = enemynear,hitdefattr = SCA,SA,HA
trigger2 = gethitvar(animtype)=1 && random<375
value = 5000,11+random%2
channel = 0
ignorehitpause = 1
persistent = 0
volumescale = 200

[State -3, GetHitSnd Hard]
type = playsnd
triggerall = IsHelper
triggerall = root,var(55)=1		;Voice=Japan
triggerall = alive && (time = 1)
triggerall = stateno=5000||stateno=5010||stateno=5020||stateno=5070||stateno=5080
trigger1 = numenemy > 0
trigger1 = enemynear,hitdefattr = SCA,SA,HA
trigger2 = gethitvar(animtype)>=2 && random<500
value = 5000,12+random%2
channel = 0
ignorehitpause = 1
persistent = 0
volumescale = 200
;--------------------------------------
[State -3, GetHitSnd Light]
type = playsnd
triggerall = IsHelper
triggerall = root,var(55)=2		;Voice=Eng Sabbat
triggerall = alive && (time = 1)
triggerall = stateno=5000||stateno=5010||stateno=5020||stateno=5070||stateno=5080
trigger1 = numenemy > 0
trigger1 = enemynear,hitdefattr = SCA,SA,HA
trigger2 = gethitvar(animtype)=0 && random<250
value = 5000,20+random%2
channel = 0
ignorehitpause = 1
persistent = 0
volumescale = 200

[State -3, GetHitSnd Medium]
type = playsnd
triggerall = IsHelper
triggerall = root,var(55)=2		;Voice=Eng Sabbat
triggerall = alive && (time = 1)
triggerall = stateno=5000||stateno=5010||stateno=5020||stateno=5070||stateno=5080
trigger1 = numenemy > 0
trigger1 = enemynear,hitdefattr = SCA,SA,HA
trigger2 = gethitvar(animtype)=1 && random<375
value = 5000,21+random%2
channel = 0
ignorehitpause = 1
persistent = 0
volumescale = 200

[State -3, GetHitSnd Hard]
type = playsnd
triggerall = IsHelper
triggerall = root,var(55)=2		;Voice=Eng Sabbat
triggerall = alive && (time = 1)
triggerall = stateno=5000||stateno=5010||stateno=5020||stateno=5070||stateno=5080
trigger1 = numenemy > 0
trigger1 = enemynear,hitdefattr = SCA,SA,HA
trigger2 = gethitvar(animtype)>=2 && random<500
value = 5000,22+random%2
channel = 0
ignorehitpause = 1
persistent = 0
volumescale = 200


;----------------------------------------
;Cinematic Super! Leave!
[State 0, ChangeState]
type = ChangeState
triggerall = IsHelper(3501) || IsHelper(3502)
triggerall = StateNo != [3514,3523]
triggerall = StateNo != 5150
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 = 3521
ctrl = 0

;----------------------------------------
;Cinematic Super! Leave!
[State 0, ChangeState]
type = ChangeState
triggerall = IsHelper(3501) || IsHelper(3502)
triggerall = StateNo != [3514,3523]
triggerall = StateNo != 5150
triggerall = RoundState = 2
trigger1 = root, NumExplod(991901)
;trigger2 = root, StateNo = 3419
;trigger3 = root, StateNo = 3414
value = 3521
ctrl = 0

[State 0, Trans]
type = Trans
triggerall = IsHelper(3501) || IsHelper(3502)
trigger1 = StateNo = 5150
trigger1 = Time >= 10 
trans = addalpha
alpha = 256-time, 0+time

[State 0, DestroySelf]
type = DestroySelf
triggerall = IsHelper(3501) || IsHelper(3502)
triggerall = StateNo = 5150 
trigger1 = Time = 267
trigger2 = !enemy, AnimExist(5939)
trigger2 = root, Var(43)=1
trigger2 = root,var(48)-root,var(49)>=30
trigger3 = !enemy, AnimExist(5939)
trigger3 = root, Var(43)=2
trigger3 = root,var(48)-root,var(49)>=60
trigger4 = !enemy, AnimExist(5939)
trigger4 = root, Var(43)=3
trigger4 = root,var(48)-root,var(49)>=90
trigger5 = !enemy, AnimExist(5939)
trigger5 = root, Var(43)=4
trigger5 = root,var(48)-root,var(49)>=120
trigger6 = !enemy, AnimExist(5939)
trigger6 = root, Var(43)=5
trigger6 = root,var(48)-root,var(49)>=150
trigger7 = !enemy, AnimExist(5939)
trigger7 = root, Var(43)=6
trigger7 = root,var(48)-root,var(49)>=180
trigger8 = enemy, AnimExist(5939)
trigger8 = enemy, NumExplod(991901)
trigger9 = root, StateNo = 3411

;---------------------------------------------------------------------------
; LOSE

[State 0, 1]
type = ChangeState
triggerall = IsHelper(3501) || IsHelper(3502)
triggerall = StateNo != [3590,3593]
triggerall = Alive
triggerall = RoundState = 4
triggerall = StateType = S
trigger1 =  root, StateNo = 170
trigger2 =  !root, Alive
value = 3590+random%4

[State 0, AssertSpecial]
type = AssertSpecial
triggerall = IsHelper(3501) || IsHelper(3502)
trigger1 = enemy,name = "Shin Satan Z2"
trigger1 = enemy, StateNo = 189
flag = invisible

;---------------------------------------------------------------------------
; WIN STATE DECIDER

[State 0, 1]
type = ChangeState
triggerall = IsHelper(3501) || IsHelper(3502)
triggerall = StateNo != [3550,3556]
triggerall = Alive
triggerall = StateType = S
trigger1 =  root, StateNo = 181
trigger2 =  root, StateNo = 3418
trigger3 =  root, StateNo = 182
trigger4 =  root, StateNo = 183
trigger5 =  root, StateNo = 184
trigger6 =  root, StateNo = 185
trigger7 =  root, StateNo = 186
trigger8 =  root, StateNo = 187
trigger9 =  root, StateNo = 188
trigger10 =  root, StateNo = 189
value = 3550+random%7




