
[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 = 3 ;1

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

[Command]
name = "qcbf_K"
command = ~D, $B, F, a
time = 20
[Command]
name = "qcbf_K"
command = ~D, $B, F, ~a
time = 20
[Command]
name = "qcbf_K"
command = ~D, $B, F, b
time = 20
[Command]
name = "qcbf_K"
command = ~D, $B, F, ~b
time = 20
[Command]
name = "qcbf_K"
command = ~D, $B, F, c
time = 20
[Command]
name = "qcbf_K"
command = ~D, $B, F, ~c
time = 20

[Command]
name = "qcbhcf_K"
command = ~D, DB, B, D, F, a
time = 30
[Command]
name = "qcbhcf_K"
command = ~D, DB, B, D, F, ~a
time = 30
[Command]
name = "qcbhcf_K"
command = ~D, DB, B, D, F, b
time = 30
[Command]
name = "qcbhcf_K"
command = ~D, DB, B, D, F, ~b
time = 30
[Command]
name = "qcbhcf_K"
command = ~D, DB, B, D, F, c
time = 30
[Command]
name = "qcbhcf_K"
command = ~D, DB, B, D, F, ~c
time = 30

[Command]
name = "qcfhcb_K"
command = ~D, F, D, B, a
time = 30
[Command]
name = "qcfhcb_K"
command = ~D, F, D, B, ~a
time = 30
[Command]
name = "qcfhcb_K"
command = ~D, F, D, B, b
time = 30
[Command]
name = "qcfhcb_K"
command = ~D, F, D, B, ~b
time = 30
[Command]
name = "qcfhcb_K"
command = ~D, F, D, B, c
time = 30
[Command]
name = "qcfhcb_K"
command = ~D, F, D, B, ~c
time = 30

[Command]
name = "qcfhcb_P"
command = ~D, DF, F, D, B, x
time = 30
[Command]
name = "qcfhcb_P"
command = ~D, DF, F, D, B, ~x
time = 30
[Command]
name = "qcfhcb_P"
command = ~D, DF, F, D, B, y
time = 30
[Command]
name = "qcfhcb_P"
command = ~D, DF, F, D, B, ~y
time = 30
[Command]
name = "qcfhcb_P"
command = ~D, DF, F, D, B, z
time = 30
[Command]
name = "qcfhcb_P"
command = ~D, DF, F, D, B, ~z
time = 30

[Command]
name = "2qcf2p"
command = ~D, DF, F, D, DF, x+y
time = 20
[Command]
name = "2qcf2p"
command = ~D, DF, F, D, DF, x+z
time = 20
[Command]
name = "2qcf2p"
command = ~D, DF, F, D, DF, y+z
time = 20

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

[Command]
name = "2qcf2k"
command = ~D, DF, F, D, DF, a+b
time = 20
[Command]
name = "2qcf2k"
command = ~D, DF, F, D, DF, a+c
time = 20
[Command]
name = "2qcf2k"
command = ~D, DF, F, D, DF, b+c
time = 20

[Command]
name = "qcbf3p"
command = ~D, $B, F, x+y+z
time = 20

[Command]
name = "qcfb3p"
command = ~D, $F, B, x+y+z
time = 20

[Command]
name = "qcbf2p"
command = ~D, $B, F, x+y
time = 20
[Command]
name = "qcbf2p"
command = ~D, $B, F, x+z
time = 20
[Command]
name = "qcbf2p"
command = ~D, $B, F, y+z
time = 20

[Command]
name = "qcfb2p"
command = ~D, $F, B, x+y
time = 20
[Command]
name = "qcfb2p"
command = ~D, $F, B, x+z
time = 20
[Command]
name = "qcfb2p"
command = ~D, $F, B, y+z
time = 20

[Command]
name = "rage"
command = D, D, y+b
time = 30


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

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

[Command]
name = "qcfbx"
command = ~D, $F, B, x
time = 15
[Command]
name = "qcfbx"
command = ~D, $F, B, ~x
time = 15
[Command]
name = "qcfby"
command = ~D, $F, B, y
time = 15
[Command]
name = "qcfby"
command = ~D, $F, B, ~y
time = 15
[Command]
name = "qcfbz"
command = ~D, $F, B, z
time = 15
[Command]
name = "qcfbz"
command = ~D, $F, B, ~z
time = 15

[Command]
name = "qcbfa"
command = ~D, $B, F, a
time = 15
[Command]
name = "qcbfa"
command = ~D, $B, F, ~a
time = 15
[Command]
name = "qcbfb"
command = ~D, $B, F, b
time = 15
[Command]
name = "qcbfb"
command = ~D, $B, F, ~b
time = 15
[Command]
name = "qcbfc"
command = ~D, $B, F, c
time = 15
[Command]
name = "qcbfc"
command = ~D, $B, F, ~c
time = 15

[Command]
name = "qcfba"
command = ~D, $F, B, a
time = 15
[Command]
name = "qcfba"
command = ~D, $F, B, ~a
time = 15
[Command]
name = "qcfbb"
command = ~D, $F, B, b
time = 15
[Command]
name = "qcfbb"
command = ~D, $F, B, ~b
time = 15
[Command]
name = "qcfbc"
command = ~D, $F, B, c
time = 15
[Command]
name = "qcfbc"
command = ~D, $F, B, ~c
time = 15

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[Command]
name = "fbfx"
command = ~F, B, F, x
[Command]
name = "fbfx"
command = ~F, B, F, ~x
[Command]
name = "fbfy"
command = ~F, B, F, y
[Command]
name = "fbfy"
command = ~F, B, F, ~y
[Command]
name = "fbfz"
command = ~F, B, F, z
[Command]
name = "fbfz"
command = ~F, B, F, ~z

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

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

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

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

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

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

[Command]
name = "rdpx"
command = ~B, DB, D, x
[Command]
name = "rdpx"
command = ~B, DB, D, ~x
[Command]
name = "rdpy"
command = ~B, DB, D, y
[Command]
name = "rdpy"
command = ~B, DB, D, ~y
[Command]
name = "rdpz"
command = ~B, DB, D, z
[Command]
name = "rdpz"
command = ~B, DB, D, ~z

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

[Command]
name = "f2p"
command = $F, x+y
;time = 1
[Command]
name = "f2p"
command = $F, x+z
;time = 1
[Command]
name = "f2p"
command = $F, y+z
;time = 1

[Command]
name = "f2k"
command = $F, a+b
;time = 1
[Command]
name = "f2k"
command = $F, a+c
;time = 1
[Command]
name = "f2k"
command = $F, b+c
;time = 1

[Command]
name = "BBz"
command = B, B, z
time = 10


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

;-| Double Tap button |-----------------------------------------------------------
[Command]
name = "FFc"
command = F, F, c
time = 15

;-| 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 = "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 = "tripleS"
command = s,s,s
time = 20

;-| 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

[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 = "s"
command = s
time = 1

[Command]
name = "mp_sp"
command = y+z
time = 10

[Command]
name = "mk_sk"
command = b+c
time = 10

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

[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





[Statedef -1]

;===========================================================================
; HYPERS
;===========================================================================

;Air Galactic Gunfire (Rage Mode)
[State -1, air GG]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall = roundstate = 2
triggerall = var(53)>0
;triggerall = (((command = "2qcfa") || (command = "2qcfb") || (command = "2qcfc")) && NumExplod(20)=0) || (((command = "2qcba") || (command = "2qcbb") || (command = "2qcbc")) && NumExplod(20)=1)
triggerall = (command = "2qcfa") || (command = "2qcfb") || (command = "2qcfc")
triggerall = statetype = A  && !WinKo
triggerall = power >= 1000 && var(58) >= 700
triggerall = stateno != 2803
trigger1 = stateno=1501 && movecontact=[1,30]
trigger2 = stateno=1551 && movecontact=[1,30]
value = 2803

;Galactic Gunfire (Rage Mode)
[State -1, GG]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall = roundstate = 2
triggerall = var(53)>0
triggerall = (((command = "2qcfa") || (command = "2qcfb") || (command = "2qcfc")) && NumExplod(20)=0) || (((command = "2qcba") || (command = "2qcbb") || (command = "2qcbc")) && NumExplod(20)=1)
triggerall = statetype != A  && !WinKo
triggerall = power >= 1000 && var(58) >= 700
triggerall = stateno != 2800
trigger1 = Ctrl
trigger2 = stateno = 100 || stateno = 101
trigger3 = stateno = 1300 && movecontact  ;Slash Chop
trigger4 = ((stateno = 200) || (stateno = 210) || (stateno = 220) || (stateno = 221)) && movecontact
trigger5 = ((stateno = 230) || (stateno = 240) || (stateno = 241) || (stateno = 242) || (stateno = 250) || (stateno = 256) || (stateno = 257)) && movecontact
trigger6 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger7 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger8 = stateno=1050 && AnimElemTime(3)>=0
value = 2800

;Galactic Gunfire (Normal)
[State -1, GG]
type = ChangeState
triggerall = TeamMode != Simul
triggerall = enemyNear,TeamMode != Simul
triggerall = (enemy,Name != "Saibamen Z2")
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall = roundstate = 2
triggerall = var(53)=0 ;No rage mode
triggerall = (((command = "2qcfa") || (command = "2qcfb") || (command = "2qcfc")) && NumExplod(20)=0) || (((command = "2qcba") || (command = "2qcbb") || (command = "2qcbc")) && NumExplod(20)=1)
triggerall = statetype != A  && !WinKo
triggerall = power >= 3000
triggerall = stateno != 2600
trigger1 = Ctrl
trigger2 = stateno = 100 || stateno = 101
trigger3 = stateno = 1300 && movecontact  ;Slash Chop
trigger4 = ((stateno = 200) || (stateno = 210) || (stateno = 220) || (stateno = 221)) && movecontact
trigger5 = ((stateno = 230) || (stateno = 240) || (stateno = 241) || (stateno = 242) || (stateno = 250) || (stateno = 256) || (stateno = 257)) && movecontact
trigger6 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger7 = ((stateno = 430) || (stateno = 440)) && movecontact
value = 2600

;Air Final Flash
[State -1, Air Final Flash]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall = roundstate = 2
triggerall = var(53)=0 ;No rage mode
triggerall = (((command = "2qcbx") || (command = "2qcby") || (command = "2qcbz")) && NumExplod(20)=0) || (((command = "2qcfx") || (command = "2qcfy") || (command = "2qcfz")) && NumExplod(20)=1)
triggerall = statetype = A  && !WinKo
triggerall = power >= 3000 && stateno != 2550
trigger1 = Ctrl
trigger2 = (StateNo = 600) || (StateNo = 610) || (StateNo = 615) || (StateNo = 620)
trigger2 = MoveContact
trigger3 = (StateNo = 630) || (StateNo = 640) || (StateNo = 650)
trigger3 = MoveContact
value = 2550

;Final Flash
[State -1, Final Flash]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall = roundstate = 2
triggerall = var(53)=0 ;No rage mode
triggerall = (((command = "2qcbx") || (command = "2qcby") || (command = "2qcbz")) && NumExplod(20)=0) || (((command = "2qcfx") || (command = "2qcfy") || (command = "2qcfz")) && NumExplod(20)=1)
triggerall = statetype != A  && !WinKo
triggerall = power >= 3000 && stateno != 2500
trigger1 = Ctrl
trigger2 = stateno = 100 || stateno = 101
trigger3 = stateno = 1300 && movecontact  ;Slash Chop
trigger4 = ((stateno = 200) || (stateno = 210) || (stateno = 220) || (stateno = 221)) && movecontact
trigger5 = ((stateno = 230) || (stateno = 240) || (stateno = 241) || (stateno = 242) || (stateno = 250) || (stateno = 256) || (stateno = 257)) && movecontact
trigger6 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger7 = ((stateno = 430) || (stateno = 440)) && movecontact
value = 2500

;[MAJIN]
;Saiyan Pride Beatdown Lv3
[State -1, SPB]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 2 ;Majin only
triggerall = roundstate = 2
triggerall = (var(53)=0 && power >= 3000) || (var(53)>0 && power >= 2000)
;triggerall = (var(53)=0 && power >= 3000) || (var(53)>0)  ;TEST
;triggerall = var(53)=0 ;No rage mode
triggerall = (((command = "2qcba") || (command = "2qcbb") || (command = "2qcbc")) && NumExplod(20)=0) || (((command = "2qcfa") || (command = "2qcfb") || (command = "2qcfc")) && NumExplod(20)=1)
triggerall = statetype != A  && !WinKo
;triggerall = power >= 2000
triggerall = stateno != 3700
trigger1 = Ctrl
;SPB is not comboable
;trigger2 = stateno = 100 || stateno = 101
;trigger3 = stateno = 1300 && movecontact  ;Slash Chop
;trigger4 = ((stateno = 200) || (stateno = 210) || (stateno = 220) || (stateno = 221)) && movecontact
;trigger5 = ((stateno = 230) || (stateno = 240) || (stateno = 241) || (stateno = 242) || (stateno = 250) || (stateno = 256) || (stateno = 257)) && movecontact
;trigger6 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
;trigger7 = ((stateno = 430) || (stateno = 440)) && movecontact
value = 3700

;Bakuhatsuha Lv3
[State -1, Bakuhatsuha Lv3]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall = roundstate = 2
triggerall = var(53)=0 ;No rage mode
triggerall = (command = "qcbf3p" && NumExplod(20)=0) ||(command = "qcfb3p" && NumExplod(20)=1)
triggerall = statetype != A  && !WinKo
triggerall = power >= 3000 && stateno != 2340
trigger1 = Ctrl
trigger2 = stateno = 100 || stateno = 101
trigger3 = stateno = 1300 && movecontact  ;Slash Chop
trigger4 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact
trigger5 = ((stateno = 230) || (stateno = 240) || (stateno = 242) || (stateno = 250)) && movecontact
trigger6 = ((stateno = 400) || (stateno = 410) || (stateno = 420) || (stateno = 421)) && movecontact
trigger7 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger8 = stateno=1120 && movecontact		;Wolvie Dash Elbow
value = 2340

;Air Bakuhatsuha Lv3
[State -1, Air Bakuhatsuha Lv3]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall = roundstate = 2
triggerall = var(53)=0 ;No rage mode
;triggerall = (command = "qcbf3p" && NumExplod(20)=0) ||(command = "qcfb3p" && NumExplod(20)=1)
triggerall = command = "qcbf3p"
triggerall = statetype = A  && !WinKo
triggerall = power >= 3000 && stateno != 2350
trigger1 = Ctrl
trigger2 = (StateNo = 600) || (StateNo = 610) || (StateNo = 615) || (StateNo = 620)
trigger2 = MoveContact
trigger3 = (StateNo = 630) || (StateNo = 640) || (StateNo = 650)
trigger3 = MoveContact
value = 2350

;===========================================================================
; SUPERS LV.2
;===========================================================================


;Chou Galick Ho
[State -1, Chou Galick Ho]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall = roundstate = 2
triggerall = var(53)=0 ;No rage mode
triggerall = (command = "2qcf2p" && NumExplod(20)=0) || (command = "2qcb2p" && NumExplod(20)=1)
triggerall = statetype != A  && !WinKo
triggerall = power >= 2000 && stateno != 2400
trigger1 = Ctrl
trigger2 = stateno = 100 || stateno = 101
trigger3 = stateno = 1300 && movecontact  ;Slash Chop
trigger4 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact
trigger5 = ((stateno = 230) || (stateno = 240) || (stateno = 242) || (stateno = 250)) && movecontact
trigger6 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger7 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger8 = stateno=1050 && AnimElemTime(3)>=0
trigger9 = stateno=1120 && MoveContact		;Wolvie Dash Elbow
value = 2400

;[MAJIN]

;Air Chou Galick Ho
[State -1, Air Chou Galick Ho]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall = roundstate = 2
triggerall = var(53)=0 ;No rage mode
;triggerall = (command = "2qcf2p" && NumExplod(20)=0) || (command = "2qcb2p" && NumExplod(20)=1)
triggerall = command = "2qcf2p"
triggerall = statetype = A  && !WinKo
triggerall = power >= 2000 && stateno != 2450
trigger1 = Ctrl
trigger2 = (StateNo = 600) || (StateNo = 610) || (StateNo = 615) || (StateNo = 620)
trigger2 = MoveContact
trigger3 = (StateNo = 630) || (StateNo = 640) || (StateNo = 650)
trigger3 = MoveContact
trigger4 = numhelper(2102)
trigger4 = helper(2102),movecontact			;Air Galick Ho
value = 2450

;Bakuhatsuha Lv2
[State -1, Bakuhatsuha Lv2]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall = roundstate = 2
triggerall = var(53)=0 ;No rage mode
triggerall = (command = "qcbf2p" && NumExplod(20)=0) || (command = "qcfb2p" && NumExplod(20)=1)
triggerall = statetype != A  && !WinKo
triggerall = power >= 2000 && stateno != 2320
trigger1 = Ctrl
trigger2 = stateno = 100 || stateno = 101
trigger3 = stateno = 1300 && movecontact  ;Slash Chop
trigger4 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact
trigger5 = ((stateno = 230) || (stateno = 240) || (stateno = 242) || (stateno = 250)) && movecontact
trigger6 = ((stateno = 400) || (stateno = 410) || (stateno = 420) || (stateno = 421)) && movecontact
trigger7 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger8 = stateno=1050 && AnimElemTime(3)>=0
trigger9 = stateno=1120 && movecontact		;Wolvie Dash Elbow
value = 2320

;Air Bakuhatsuha Lv2
[State -1, Air Bakuhatsuha Lv2]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall = roundstate = 2
triggerall = var(53)=0 ;No rage mode
;triggerall = (command = "qcbf2p" && NumExplod(20)=0) || (command = "qcfb2p" && NumExplod(20)=1)
triggerall = command = "qcbf2p"
triggerall = statetype = A  && !WinKo
triggerall = power >= 2000 && stateno != 2330
trigger1 = Ctrl
trigger2 = (StateNo = 600) || (StateNo = 610) || (StateNo = 615) || (StateNo = 620)
trigger2 = MoveContact
trigger3 = (StateNo = 630) || (StateNo = 640) || (StateNo = 650)
trigger3 = MoveContact
value = 2330

;[MAJIN]
; Aura Burst
[State -1]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 2 ;Majin only
triggerall = roundstate = 2
triggerall = var(53)>0 ;SANITY mode
triggerall = command = "rage"
triggerall = statetype != A  && !WinKo
;triggerall = power >= 2000 && stateno != 2700
trigger1 = Ctrl
trigger2 = stateno=900
value = 3800

; Rage Mode
[State -1]
type = ChangeState
triggerall = TeamMode != Simul
triggerall = enemyNear,TeamMode != Simul
triggerall = (enemy,Name != "Saibamen Z2")
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall = roundstate = 2
triggerall = var(53)=0 ;No rage mode
triggerall = command = "rage"
triggerall = statetype != A  && !WinKo
triggerall = power >= 2000 && stateno != 2700
trigger1 = Ctrl
trigger2 = stateno=900
value = 2700

;[MAJIN]
; SANITY Mode
[State -1]
type = ChangeState
triggerall = TeamMode != Simul
triggerall = enemyNear,TeamMode != Simul
triggerall = (enemy,Name != "Saibamen Z2")
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 2 ;Majin only
triggerall = roundstate = 2
triggerall = var(53)=0 ;No SANITY mode
triggerall = command = "rage"
triggerall = statetype != A  && !WinKo
triggerall = power >= 2000 && stateno != 4700
trigger1 = Ctrl
trigger2 = stateno=900
value = 4700



;===========================================================================
; SUPERS LV.1
;===========================================================================

;Galick Ho
[State -1, Galick Ho]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall = roundstate = 2
triggerall = (((command = "2qcfx") || (command = "2qcfy") || (command = "2qcfz")) && NumExplod(20)=0) || (((command = "2qcbx") || (command = "2qcby") || (command = "2qcbz")) && NumExplod(20)=1)
triggerall = statetype != A  && !WinKo
triggerall = (power >= 1000 || var(53)>0) && stateno != 2000
trigger1 = Ctrl
trigger2 = stateno = 100 || stateno = 101
trigger3 = stateno = 1300 && movecontact  ;Slash Chop
trigger4 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact
trigger5 = ((stateno = 230) || (stateno = 240) || (stateno = 242) || (stateno = 250)) && movecontact
trigger6 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger7 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger8 = stateno=1050 && AnimElemTime(3)>=0
trigger9 = stateno=1120 && MoveContact		;Wolvie Dash Elbow
value = 2000

;[MAJIN]
[State -1, Photon Bomber Lv.1]
type = ChangeState
triggerall = var(1) = 2 ;Majin only
triggerall = AILevel<=0 && var(52)<=0
triggerall = roundstate = 2
;triggerall = (power >= 1000 || var(53)>0) && stateno != 3300
triggerall = (var(53)=0 && power >= 1000) || (var(53)>0 && var(58) >= 700) ;TEST
triggerall = stateno != 3300
triggerall = (((command = "2qcfx") || (command = "2qcfy") || (command = "2qcfz")) && NumExplod(20)=0) || (((command = "2qcbx") || (command = "2qcby") || (command = "2qcbz")) && NumExplod(20)=1)
triggerall = statetype != A  && !WinKo
triggerall = !NumHelper(9999)   ;Limit timer
trigger1 = Ctrl
trigger2 = stateno = 100 || stateno = 101
trigger3 = stateno = 1300 && movecontact  ;Slash Chop
trigger4 = ((stateno = 200) || (stateno = 210) || (stateno = 220) || (stateno = 221)) && movecontact
trigger5 = ((stateno = 230) || (stateno = 240) || (stateno = 241) || (stateno = 242) || (stateno = 250) || (stateno = 256) || (stateno = 257)) && movecontact
trigger6 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger7 = ((stateno = 430) || (stateno = 440)) && movecontact
;trigger8 = stateno=1050 && AnimElemTime(3)>=0
;trigger9 = stateno=1120 && MoveContact		;Wolvie Dash Elbow
value = 3300

;[MAJIN]
[State -1, Air Photon Bomber Lv.1]
type = ChangeState
triggerall = var(1) = 2 ;Majin only
triggerall = AILevel<=0 && var(52)<=0
triggerall = roundstate = 2
;triggerall = (power >= 1000 || var(53)>0) && stateno != 3300
triggerall = (var(53)=0 && power >= 1000) || (var(53)>0 && var(58) >= 700) ;TEST
triggerall = stateno != 3350
;triggerall = (((command = "2qcfx") || (command = "2qcfy") || (command = "2qcfz")) && NumExplod(20)=0) || (((command = "2qcbx") || (command = "2qcby") || (command = "2qcbz")) && NumExplod(20)=1)
triggerall = (command = "2qcfx") || (command = "2qcfy") || (command = "2qcfz")
triggerall = statetype = A  && !WinKo
triggerall = !NumHelper(9999)   ;Limit timer
trigger1 = Ctrl
trigger2 = (StateNo = 600) || (StateNo = 610) || (StateNo = 615) || (StateNo = 620)
trigger2 = MoveContact
trigger3 = (StateNo = 630) || (StateNo = 640) || (StateNo = 650)
trigger3 = MoveContact
trigger4 = stateno=3001 && vel y>-3 ;Stomp kick
value = 3350

;Air Galick Ho
[State -1, Air Galick Ho]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall = roundstate = 2
;triggerall = (((command = "2qcfx") || (command = "2qcfy") || (command = "2qcfz")) && NumExplod(20)=0) || (((command = "2qcbx") || (command = "2qcby") || (command = "2qcbz")) && NumExplod(20)=1)
triggerall = (command = "2qcfx") || (command = "2qcfy") || (command = "2qcfz")
triggerall = statetype = A  && !WinKo
triggerall = (power >= 1000 || var(53)>0) && stateno != 2100
trigger1 = Ctrl
trigger2 = (StateNo = 600) || (StateNo = 610) || (StateNo = 615) || (StateNo = 620)
trigger2 = MoveContact
trigger3 = (StateNo = 630) || (StateNo = 640) || (StateNo = 650)
trigger3 = MoveContact
value = 2100


;[MAJIN]
;Royal Edict
[State -1, Royal Edict]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 2 ;Majin only
triggerall = roundstate = 2
triggerall = (((command = "2qcfa") || (command = "2qcfb") || (command = "2qcfc")) && NumExplod(20)=0) || (((command = "2qcba") || (command = "2qcbb") || (command = "2qcbc")) && NumExplod(20)=1)
triggerall = statetype != A  && !WinKo
;triggerall = (power >= 1000 || var(53)>0) && stateno != 3550
triggerall = (var(53)=0 && power >= 1000) || (var(53)>0 && var(58) >= 700) ;TEST
triggerall = stateno != 3550
trigger1 = Ctrl
trigger2 = stateno = 100 || stateno = 101
trigger3 = stateno = 1300 && movecontact  ;Slash Chop
trigger4 = ((stateno = 200) || (stateno = 210) || (stateno = 220) || (stateno = 221)) && movecontact
trigger5 = ((stateno = 230) || (stateno = 240) || (stateno = 241) || (stateno = 242) || (stateno = 250) || (stateno = 256) || (stateno = 257)) && movecontact
trigger6 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger7 = ((stateno = 430) || (stateno = 440)) && movecontact
value = 3550

;Bakuhatsuha
[State -1, Bakuhatsuha]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall = roundstate = 2
triggerall = !NumHelper(9995) ;Baku Limiter
;triggerall = (command = "2qcbx") || (command = "2qcby") || (command = "2qcbz")
triggerall = (((command = "qcbfx") || (command = "qcbfy") || (command = "qcbfz")) && NumExplod(20)=0) || (((command = "qcfbx") || (command = "qcfby") || (command = "qcfbz")) && NumExplod(20)=1)
triggerall = statetype != A  && !WinKo
triggerall = (power >= 1000 || var(53)>0) && stateno != 2300
trigger1 = Ctrl
trigger2 = stateno = 100 || stateno = 101
trigger3 = stateno = 1300 && movecontact  ;Slash Chop
trigger4 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact
trigger5 = ((stateno = 230) || (stateno = 240) || (stateno = 242) || (stateno = 250)) && movecontact
trigger6 = ((stateno = 400) || (stateno = 410) || (stateno = 420) || (stateno = 421)) && movecontact
trigger7 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger8 = stateno=1050 && AnimElemTime(3)>=0
trigger9 = stateno=1120 && movecontact		;Wolvie Dash Elbow
value = 2300

;Air Bakuhatsuha
[State -1, Air Bakuhatsuha]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall = roundstate = 2
triggerall = !NumHelper(9995) ;Baku Limiter
;triggerall = (((command = "qcbfx") || (command = "qcbfy") || (command = "qcbfz")) && NumExplod(20)=0) || (((command = "qcfbx") || (command = "qcfby") || (command = "qcfbz")) && NumExplod(20)=1)
triggerall = (command = "qcbfx") || (command = "qcbfy") || (command = "qcbfz")
triggerall = statetype = A  && !WinKo
triggerall = (power >= 1000 || var(53)>0) && stateno != 2310
trigger1 = Ctrl
trigger2 = (StateNo = 600) || (StateNo = 610) || (StateNo = 615) || (StateNo = 620)
trigger2 = MoveContact
trigger3 = (StateNo = 630) || (StateNo = 640) || (StateNo = 650)
trigger3 = MoveContact
value = 2310

;[MAJIN]
;Machine Gun Tantrum
[State -1, Machine Gun Tantrum]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 2 ;Majin only
triggerall = roundstate = 2
triggerall = (((command = "qcbfx") || (command = "qcbfy") || (command = "qcbfz")) && NumExplod(20)=0) || (((command = "qcfbx") || (command = "qcfby") || (command = "qcfbz")) && NumExplod(20)=1)
triggerall = statetype!=A && !WinKo
;triggerall = (power >= 1000 || var(53)>0) && stateno != 3400
triggerall = (var(53)=0 && power >= 1000) || (var(53)>0 && var(58) >= 700) ;TEST
triggerall = stateno != 3400
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220) || (stateno = 221)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 241) || (stateno = 242) || (stateno = 250) || (stateno = 256) || (stateno = 257)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420) || (stateno = 421)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
value = 3400

;[MAJIN]
;Air Machine Gun Tantrum
[State -1, Air Machine Gun Tantrum]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 2 ;Majin only
triggerall = !NumHelper(9994) ;No limiter
triggerall = roundstate = 2
;triggerall = (((command = "qcbfx") || (command = "qcbfy") || (command = "qcbfz")) && NumExplod(20)=0) || (((command = "qcfbx") || (command = "qcfby") || (command = "qcfbz")) && NumExplod(20)=1)
triggerall = (command = "qcbfx") || (command = "qcbfy") || (command = "qcbfz")
triggerall = var(15):=((command = "qcbfx")||(command = "qcfbx")) + 2*((command = "qcbfy")||(command = "qcfby")) + 3*((command = "qcbfz")||(command = "qcfbz"))
triggerall = statetype=A && !WinKo
;triggerall = (power >= 1000 || var(53)>0) && stateno != 3430
triggerall = (var(53)=0 && power >= 1000) || (var(53)>0 && var(58) >= 700) ;TEST
triggerall = stateno != 3430
triggerall = pos Y < -60
trigger1 = ctrl
trigger2 = (StateNo = 600) || (StateNo = 630) || (StateNo = 610) || (StateNo = 615) || (StateNo = 620) || (StateNo = 621) || (StateNo = 640)
trigger2 = movecontact
trigger3 = stateno=3001 && vel y>-3 ;Stomp kick
value = 3430

;[MAJIN]
;Atomic Blast
[State -1, Atomic Blast]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 2 ;Majin only
triggerall = roundstate = 2
triggerall = (((command = "qcbfa") || (command = "qcbfb") || (command = "qcbfc")) && NumExplod(20)=0) || (((command = "qcfba") || (command = "qcfbb") || (command = "qcfbc")) && NumExplod(20)=1)
triggerall = statetype != A  && !WinKo
;triggerall = (power >= 1000 || var(53)>0) && stateno != 3200
triggerall = (var(53)=0 && power >= 1000) || (var(53)>0 && var(58) >= 700) ;TEST
triggerall = stateno != 3200
triggerall = !NumHelper(3209)   ;No AB
triggerall = enemy,movetype!=H ;stateno != 5000 ;Prevent Majin from comboing AB too early
triggerall = facing != enemynear,facing
trigger1 = Ctrl
trigger2 = stateno = 100 || stateno = 101
trigger3 = stateno = 1300 && movecontact  ;Slash Chop
trigger4 = ((stateno = 200) || (stateno = 210) || (stateno = 221)) && movecontact
trigger5 = ((stateno = 230) || (stateno = 241) || (stateno = 256)) && movecontact
trigger6 = ((stateno = 400) || (stateno = 410) || (stateno = 250)) && movecontact
trigger7 = ((stateno = 430) || (stateno = 440)) && movecontact
;trigger8 = stateno=1050 && AnimElemTime(3)>=0
;trigger9 = stateno=1120 && MoveContact		;Wolvie Dash Elbow
;trigger10 = stateno=3110 && MoveContact		;Weak Surprise Elbow
value = 3200

;Big Bang Attack Lv.1
[State -1, Big Bang Attack Lv.1]
type = ChangeState
triggerall = !NumHelper(33210)
triggerall = !NumProjID(3335)
triggerall = var(1) = 2 ;Majin only
triggerall = AILevel<=0 && var(52)<=0
triggerall = roundstate = 2
;triggerall = (var(53)=0 && power >= 2000) || (var(53)>0 && power >= 1000)
triggerall = (var(53)=0 && power >= 1000) || (var(53)>0 && var(58) >= 700) ;TEST
;triggerall = (command = "2qcf2p" && NumExplod(20)=0) || (command = "2qcb2p" && NumExplod(20)=1)
triggerall = (((command = "2qcbx") || (command = "2qcby") || (command = "2qcbz")) && NumExplod(20)=0) || (((command = "2qcfx") || (command = "2qcfy") || (command = "2qcfz")) && NumExplod(20)=1)
triggerall = statetype != A  && !WinKo
triggerall = stateno != 3320
trigger1 = Ctrl
trigger2 = stateno = 100 || stateno = 101
trigger3 = stateno = 1300 && movecontact  ;Slash Chop
trigger4 = ((stateno = 200) || (stateno = 210) || (stateno = 220) || (stateno = 221)) && movecontact
trigger5 = ((stateno = 230) || (stateno = 240) || (stateno = 241) || (stateno = 242) || (stateno = 250) || (stateno = 256) || (stateno = 257)) && movecontact
trigger6 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger7 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger8 = stateno=1050 && AnimElemTime(3)>=0
value = 3320


;===========================================================================
; AIR SPECIALS
;===========================================================================

;Air EX Machine Gun Temper (only in Rage Mode)
[State -1, Air EX Machine Gun Temper]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall = !NumHelper(9997)   ;Limit timer
triggerall = roundstate = 2
;triggerall = (command = "qcb2p" && NumExplod(20)=0) || (command = "qcf2p" && NumExplod(20)=1)
triggerall = command = "qcb2p"
triggerall = statetype=A && !WinKo
triggerall = var(53)>0
triggerall = power >= 500
triggerall = pos Y < -60
trigger1 = ctrl
trigger2 = (StateNo = 600) || (StateNo = 630) || (StateNo = 610) || (StateNo = 615) || (StateNo = 620) || (StateNo = 640)
trigger2 = movecontact
value = 1730

;Air Machine Gun Temper (Light)
[State -1, Air Machine Gun Temper (Light)]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall = !NumHelper(9997)   ;Limit timer
triggerall = roundstate = 2
;triggerall = (command = "qcbx" && NumExplod(20)=0) || (command = "qcfx" && NumExplod(20)=1)
triggerall = command = "qcbx"
triggerall = statetype=A && !WinKo
triggerall = pos Y < -60
trigger1 = ctrl
trigger2 = (StateNo = 600) || (StateNo = 630) || (StateNo = 610) || (StateNo = 615) || (StateNo = 620) || (StateNo = 640)
trigger2 = movecontact
value = 1700

;Air Machine Gun Temper (Medium)
[State -1, Air Machine Gun Temper (Medium)]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall = !NumHelper(9997)   ;Limit timer
triggerall = roundstate = 2
;triggerall = (command = "qcby" && NumExplod(20)=0) || (command = "qcfy" && NumExplod(20)=1)
triggerall = command = "qcby"
triggerall = statetype=A && !WinKo
triggerall = pos Y < -60
trigger1 = ctrl
trigger2 = (StateNo = 600) || (StateNo = 630) || (StateNo = 610) || (StateNo = 615) || (StateNo = 620) || (StateNo = 640)
trigger2 = movecontact
value = 1710

;Air Machine Gun Temper (Strong)
[State -1, Air Machine Gun Temper (Strong)]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall = !NumHelper(9997)   ;Limit timer
triggerall = roundstate = 2
;triggerall = (command = "qcbz" && NumExplod(20)=0) || (command = "qcfz" && NumExplod(20)=1)
triggerall = command = "qcbz"
triggerall = statetype=A && !WinKo
triggerall = pos Y < -60
trigger1 = ctrl
trigger2 = (StateNo = 600) || (StateNo = 630) || (StateNo = 610) || (StateNo = 615) || (StateNo = 620) || (StateNo = 640)
trigger2 = movecontact
value = 1720

;Air Ki Blast (Light)
[State -1, Air Ki Blast (Light)]
type = Null ;ChangeState
triggerall = AILevel<=0 && var(52)<=0
;triggerall = (command = "qcfx" && NumExplod(20)=0) || (command = "qcbx" && NumExplod(20)=1)
triggerall = command = "qcfx"
triggerall = statetype=A && !WinKo
trigger1 = ctrl
trigger1 = pos Y < -50
trigger2 = (StateNo = 600) || (StateNo = 630) || (StateNo = 610) || (StateNo = 615) || (StateNo = 620) || (StateNo = 621) || (StateNo = 640)
trigger2 = movecontact
value = 1600

;Air Ki Blast (Medium)
[State -1, Air Ki Blast (Medium)]
type = Null ;ChangeState
triggerall = AILevel<=0 && var(52)<=0
;triggerall = (command = "qcfy" && NumExplod(20)=0) || (command = "qcby" && NumExplod(20)=1)
triggerall = command = "qcfy"
triggerall = statetype=A && !WinKo
trigger1 = ctrl
trigger1 = pos Y < -50
trigger2 = (StateNo = 600) || (StateNo = 630) || (StateNo = 610) || (StateNo = 615) || (StateNo = 620) || (StateNo = 621) || (StateNo = 640)
trigger2 = movecontact
value = 1610

;Air Ki Blast (Strong)
[State -1, Air Ki Blast (Strong)]
type = Null ;ChangeState
triggerall = AILevel<=0 && var(52)<=0
;triggerall = (command = "qcfz" && NumExplod(20)=0) || (command = "qcbz" && NumExplod(20)=1)
triggerall = command = "qcfz"
triggerall = statetype=A && !WinKo
trigger1 = ctrl
trigger1 = pos Y < -50
trigger2 = (StateNo = 600) || (StateNo = 630) || (StateNo = 610) || (StateNo = 615) || (StateNo = 620) || (StateNo = 621) || (StateNo = 640)
trigger2 = movecontact
value = 1620


;===========================================================================
; GROUND SPECIALS
;===========================================================================

;[MAJIN]
;EX Royal Bullseye
[State -1, EX Royal Bullseye]
type = changestate
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 2 ;Majin only
;triggerall = !NumHelper(9992) ;Ex RB Limiter
triggerall = roundstate = 2
triggerall = (command = "dp2p" && NumExplod(20)=0) || (command = "rdp2p" && NumExplod(20)=1)
triggerall = power >= 500 || var(53)>0
triggerall = statetype!=A && !WinKo
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220) || (stateno = 221)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 241) || (stateno = 242) || (stateno = 250) || (stateno = 256) || (stateno = 257)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
trigger7 = stateno = 455 && movecontact		; Sliding Kick
trigger8 = stateno = 300 && movecontact		; Dash Elbow
value = 3520

;EX Ki Blast/Majin Bakuhatsuha
[State -1, EX Ki Blast/Majin Bakuhatsuha]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = roundstate = 2
triggerall = power >= 500 || var(53)>0
triggerall = (command = "qcf2p" && NumExplod(20)=0) || (command = "qcb2p" && NumExplod(20)=1)
triggerall = statetype != A  && !WinKo
triggerall = !NumHelper(9998)   ;Limit timer
triggerall = !NumHelper(3331) ; No Big Bang Attack onscreen
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220) || (stateno = 221)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 241) || (stateno = 242) || (stateno = 250) || (stateno = 256) || (stateno = 257)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
value = IfElse(var(1)=1,1050,3050)

;EX Machine Gun Temper
[State -1, EX Machine Gun Temper]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall = roundstate = 2
;triggerall = var(53)>0
;triggerall = (command = "qcb2p" && NumExplod(20)=0) || (command = "qcf2p" && NumExplod(20)=1)
triggerall = command = "qcb2p"
triggerall = power >= 500 || var(53)>0
triggerall = statetype!=A && !WinKo
triggerall = !NumHelper(9997)   ;Limit timer
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 241) || (stateno = 242) || (stateno = 250) || (stateno = 256) || (stateno = 257)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420) || (stateno = 421)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
value = 1450

;EX Rising Knee/Double Slash Kick
[State -1, EX Rising Knee/Double Slash Kick]
type = changestate
triggerall = AILevel<=0 && var(52)<=0
triggerall = roundstate = 2
triggerall = (command = "dp2k" && NumExplod(20)=0) || (command = "rdp2k" && NumExplod(20)=1)
triggerall = power >= 500 || var(53)>0
triggerall = statetype!=A && !WinKo
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220) || (stateno = 221)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 241) || (stateno = 242) || (stateno = 250) || (stateno = 256) || (stateno = 257)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
trigger7 = stateno = 455 && movecontact		; Sliding Kick
value = IfElse(var(1)=1,1550,3650)


;[MAJIN]
;Surprise EX Elbow Attack
[State -1, EX Surprise Elbow Attack]
type = changestate
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 2 ;Majin only
triggerall = NumHelper(9993)<2   ;Limit 2 elbows per combo
triggerall = roundstate = 2
triggerall = (command = "qcb2p" && NumExplod(20)=0) || (command = "qcf2p" && NumExplod(20)=1)
triggerall = power >= 500 || var(53)>0
;triggerall = var(15):=(command = "qcba") + 2*(command = "qcbb") + 3*(command = "qcbc")
triggerall = statetype!=A && !WinKo
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220) || (stateno = 221)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 241) || (stateno = 242) || (stateno = 250) || (stateno = 256) || (stateno = 257)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
trigger7 = stateno = 455 && movecontact		; Sliding Kick
trigger8 = stateno = 300 && movecontact		; Dash Elbow
value = 3120

;[MAJIN]
;Royal Fist
[State -1, Royal Fist]
type = changestate
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 2 ;Majin only
triggerall = roundstate = 2
;triggerall = var(53)=0 ;No rage mode
triggerall = (((command = "dpx") || (command = "dpy") || (command = "dpz")) && NumExplod(20)=0) || (((command = "rdpx") || (command = "rdpy") || (command = "rdpz")) && NumExplod(20)=1)
;triggerall = var(15):=(command = "dpa") + 2*(command = "dpb") + 3*(command = "dpc")
triggerall = statetype!=A && !WinKo
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220) || (stateno = 221)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 241) || (stateno = 242) || (stateno = 250) || (stateno = 256) || (stateno = 257)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
trigger7 = stateno = 455 && movecontact		; Sliding Kick
trigger8 = stateno = 300 && movecontact		; Dash Elbow
value = 3500


;Rising Knee/Double Slash Kick
[State -1, Rising Knee/Double Slash Kick]
type = changestate
triggerall = AILevel<=0 && var(52)<=0
triggerall = roundstate = 2
;triggerall = var(53)=0 ;No rage mode
triggerall = (((command = "dpa") || (command = "dpb") || (command = "dpc")) && NumExplod(20)=0) || (((command = "rdpa") || (command = "rdpb") || (command = "rdpc")) && NumExplod(20)=1)
triggerall = var(15):=((command = "dpa")||(command = "rdpa")) + 2*((command = "dpb")||(command = "rdpb")) + 3*((command = "dpc")||(command = "rdpc"))
triggerall = statetype!=A && !WinKo
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220) || (stateno = 221)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 241) || (stateno = 242) || (stateno = 250) || (stateno = 256) || (stateno = 257)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
trigger7 = stateno = 455 && movecontact		; Sliding Kick
value = IfElse(var(1)=1,1500,3600)

;[MAJIN]
;Majin Bakuhatsuha
[State -1, Majin Bakuhatsuha]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 2 ;Majin only
triggerall = roundstate = 2
triggerall = (((command = "qcfx") || (command = "qcfy") || (command = "qcfz")) && NumExplod(20)=0) || (((command = "qcbx") || (command = "qcby") || (command = "qcbz")) && NumExplod(20)=1)
;triggerall = var(15):=(command = "qcfx") + 2*(command = "qcfy") + 3*(command = "qcfz")
triggerall = statetype != A  && !WinKo
triggerall = !NumHelper(9998)   ;Limit timer
triggerall = !NumHelper(33210) ;No Big Bang Attack onscreen
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220) || (stateno = 221)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 241) || (stateno = 242) || (stateno = 250) || (stateno = 256) || (stateno = 257)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420) || (stateno = 421)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
trigger7 = stateno = 455 && movecontact		; Sliding Kick
value = 3010

;Ki Blast (Light) 1
[State -1, Ki Blast (Light)]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall = roundstate = 2
triggerall = (command = "qcfx" && NumExplod(20)=0) || (command = "qcbx" && NumExplod(20)=1)
triggerall = statetype != A  && !WinKo
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220) || (stateno = 221)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 241) || (stateno = 242) || (stateno = 250) || (stateno = 256) || (stateno = 257)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420) || (stateno = 421)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
trigger7 = stateno = 455 && movecontact		; Sliding Kick
value = 1000

;Ki Blast (Medium) 1
[State -1, Ki Blast (Medium)]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall = roundstate = 2
triggerall = (command = "qcfy" && NumExplod(20)=0) || (command = "qcby" && NumExplod(20)=1)
triggerall = statetype != A  && !WinKo
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220) || (stateno = 221)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 241) || (stateno = 242) || (stateno = 250) || (stateno = 256) || (stateno = 257)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420) || (stateno = 421)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
value = 1010

;Ki Blast (Hard) 1
[State -1, Ki Blast (Hard)]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall = roundstate = 2
triggerall = (command = "qcfz" && NumExplod(20)=0) || (command = "qcbz" && NumExplod(20)=1)
triggerall = statetype != A  && !WinKo
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220) || (stateno = 221)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 241) || (stateno = 242) || (stateno = 250) || (stateno = 256) || (stateno = 257)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
value = 1020

;Wolverine Flip (back)
[State -1, Wolverine Flip (back)]
type = changestate
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall = roundstate = 2
triggerall = var(53)=0 ;No rage mode
triggerall = (((command = "qcba") || (command = "qcbb") || (command = "qcbc")) && NumExplod(20)=0) || (((command = "qcfa") || (command = "qcfb") || (command = "qcfc")) && NumExplod(20)=1)
triggerall = var(15):=((command = "qcba")||(command = "qcfa")) + 2*((command = "qcbb")||(command = "qcfb")) + 3*((command = "qcbc")||(command = "qcfc"))
triggerall = statetype!=A && !WinKo
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 241) || (stateno = 242) || (stateno = 250) || (stateno = 256) || (stateno = 257)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
;trigger7 = stateno = 455 && movecontact		; Sliding Kick    ;disabled to prevent blockstring infinite
trigger7 = stateno = 300 && movecontact		; Dash Elbow
value = 1100

;[MAJIN]
;Surprise Elbow Attack
[State -1, Surprise Elbow Attack]
type = changestate
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 2 ;Majin only
triggerall = roundstate = 2
triggerall = NumHelper(9993)<2   ;Limit 2 elbows per combo
;triggerall = var(53)=0 ;No rage mode
triggerall = var(3)<3 ;Elbow weak dash limiter
triggerall = (((command = "qcbx") || (command = "qcby") || (command = "qcbz")) && NumExplod(20)=0) || (((command = "qcfx") || (command = "qcfy") || (command = "qcfz")) && NumExplod(20)=1)
;triggerall = var(15):=(command = "qcba") + 2*(command = "qcbb") + 3*(command = "qcbc")
triggerall = statetype!=A && !WinKo
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220) || (stateno = 221)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 241) || (stateno = 242) || (stateno = 250) || (stateno = 256) || (stateno = 257)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
trigger7 = stateno = 455 && movecontact		; Sliding Kick
trigger8 = stateno = 300 && command != "qcbx" && movecontact		; Dash Elbow
value = IfElse((command = "qcbx")||(command = "qcfx"),3110,3100)


;Wolverine Flip (Forward)
[State -1, Wolverine Flip (forward)]
type = changestate
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall = roundstate = 2
triggerall = var(53)=0 ;No rage mode
triggerall = (((command = "qcfa") || (command = "qcfb") || (command = "qcfc")) && NumExplod(20)=0) || (((command = "qcba") || (command = "qcbb") || (command = "qcbc")) && NumExplod(20)=1)
triggerall = var(15):=((command = "qcfa")||(command = "qcba")) + 2*((command = "qcfb")||(command = "qcbb")) + 3*((command = "qcfc")||(command = "qcbc"))
triggerall = statetype!=A && !WinKo
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 242) || (stateno = 250)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
;trigger7 = stateno = 455 && movecontact		; Sliding Kick   ;disabled to prevent blockstring infinite
trigger7 = stateno = 300 && movecontact		; Dash Elbow
value = 1200

;Machine Gun Temper Light
[State -1, Machine Gun Temper]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall = roundstate = 2
triggerall = (command = "qcbx" && NumExplod(20)=0) || (command = "qcfx" && NumExplod(20)=1)
triggerall = statetype!=A && !WinKo
triggerall = !NumHelper(9997)   ;Limit timer
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 242) || (stateno = 250)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420) || (stateno = 421)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
value = 1400

;Machine Gun Temper Medium
[State -1, Machine Gun Temper]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall = roundstate = 2
triggerall = (command = "qcby" && NumExplod(20)=0) || (command = "qcfy" && NumExplod(20)=1)
triggerall = statetype!=A && !WinKo
triggerall = !NumHelper(9997)   ;Limit timer
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 242) || (stateno = 250)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420) || (stateno = 421)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
value = 1401

;Machine Gun Temper Strong
[State -1, Machine Gun Temper]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall = roundstate = 2
triggerall = (command = "qcbz" && NumExplod(20)=0) || (command = "qcfz" && NumExplod(20)=1)
triggerall = statetype!=A && !WinKo
triggerall = !NumHelper(9997)   ;Limit timer
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 242) || (stateno = 250)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420) || (stateno = 421)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
value = 1402

; Slashing Chop (aka Focus Attack)
[State -1, Slashing Chop]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = roundstate = 2
triggerall = stateno !=[1300,1302]
triggerall = stateno != 106
;triggerall = command = "hold_z" && command = "hold_c"
triggerall = command = "z" && command = "c"
trigger1 = statetype = S
trigger1 = ctrl
value = 1300

;Zero Counter
[State -1, zero counter]
type = changestate
triggerall = (var(1)=1 && var(53)=0) || (var(1)=2) ;No rage mode for Normal Vegeta
trigger1 = AILevel<=0
trigger1 = stateno=150 || stateno=152
trigger1 = command="f2k" || command="f2p"
trigger1 = roundstate=2 && power>=1000 && statetype!=A
value = 750

;Air Zero Counter
[State -1, air zero counter]
type = changestate
triggerall = (var(1)=1 && var(53)=0) || (var(1)=2) ;No rage mode for Normal Vegeta
trigger1 = AILevel<=0
trigger1 = stateno=154  ; && animelemtime(1)<6
trigger1 = command="f2k" || command="f2p"
trigger1 = roundstate=2 && power>=1000 && statetype=A
value = 760


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

; Sliding Kick
[State -1, Launcher Kick]
type = changestate
triggerall = AILevel<=0 && var(52)<=0
triggerall = roundstate = 2
triggerall = statetype!=A
trigger1 = stateno = 100 || stateno = 101
trigger1 = command="c" && command!="holddown"
value = 455

;Power Charge
[State -1]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(53)=0 ;No rage mode
triggerall = roundstate = 2
triggerall = StateType != A
triggerall = Power < 3000
triggerall = stateno != 900
triggerall = Ctrl
;trigger1 = command = "b" && command = "y"
trigger1 = command = "hold_b" && command = "hold_y"
value = 900

;SANITY Power Charge
[State -1]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 2 ;Majin only
triggerall = var(53)>0 ;SANITY mode
triggerall = var(58)<2100
triggerall = roundstate = 2
triggerall = StateType != A
;triggerall = Power < 3000
triggerall = stateno != 910
triggerall = Ctrl
;trigger1 = command = "b" && command = "y"
trigger1 = command = "hold_b" && command = "hold_y"
trigger1 = command != "holddown"
value = 910

; Punch Throw (Close Explosion)/Elbow Thrust
[State -1, throw2]
type = changestate
triggerall = AILevel<=0 && var(52)<=0
triggerall = roundstate=2 && ctrl && statetype=S && stateno!=100
trigger1 = command="xa" && command="holdfwd"
trigger2 = command="xa" && command!="holdfwd" && command!="holdback"
value = IfElse(var(1)=1,800,820)

; Kick Throw (Suplex)/Reverse Throw
[State -1, throw1]
type = changestate
triggerall = AILevel<=0 && var(52)<=0
triggerall = roundstate=2 && ctrl && statetype=S && stateno!=100
trigger1 = command="xa" && command="holdback"
value = IfElse(var(1)=1,810,830)


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

; Stand Light Punch
[State -1, Stand Light Punch]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = roundstate = 2
triggerall = NumExplod(90000200)||command = "x"
triggerall = command != "holddown"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 100 || stateno = 101
value = 200

; Stand Medium Punch
[State -1, Stand Medium Punch]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = roundstate = 2
triggerall = NumExplod(90000210)||command = "y"
triggerall = command != "holddown"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = StateType != A && movecontact
trigger2 = (stateno = 200) || (stateno = 230)
trigger3 = stateno = 100 || stateno = 101
trigger4 = StateType != A && movecontact
trigger4 = (stateno = 400) || (stateno = 430)
trigger5 = stateno=300 && MoveContact
value = 210

; Stand Strong Punch
[State -1, Stand Strong Punch]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = roundstate = 2
triggerall = NumExplod(90000220)||command = "z"
triggerall = command != "holddown"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = StateType != A && movecontact
trigger2 = (stateno = 200) || (stateno = 230) || (stateno = 210) || (stateno = 240) || (stateno = 241) || (stateno = 242)
trigger3 = stateno = 100 || stateno = 101
trigger4 = StateType != A && movecontact
trigger4 = (stateno = 400) || (stateno = 430) || (stateno = 410) || (stateno = 440)
trigger5 = stateno=300 && MoveContact
value = IfElse(var(1)=1,220,221)

; Stand Light Kick
[State -1, Stand Light Kick]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = roundstate = 2
triggerall = NumExplod(90000230)||command = "a"
triggerall = command != "holddown"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = stateno = 100 || stateno = 101
value = 230

; Standing Medium Kick
[State -1, Standing Medium Kick]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = roundstate = 2
triggerall = NumExplod(90000240)||command = "b"
triggerall = command != "holddown"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = StateType != A
trigger2 = (stateno = 200) || (stateno = 230)
trigger2 = movecontact
trigger3 = stateno = 100 || stateno = 101
trigger4 = StateType != A && movecontact
trigger4 = (stateno = 400) || (stateno = 430)
trigger5 = stateno=300 && MoveContact
value = IfElse(var(1)=1,240,241)

; Standing Medium Kick Combo
[State -1, Standing Medium Kick Combo]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall = roundstate = 2
triggerall = NumExplod(90000240)||command = "b"
triggerall = command != "holddown"
trigger1 = (stateno = 240) || (stateno = 210)
trigger1 = movecontact
value = 242 ;IfElse(var(1)=1,242,241)

; Standing Strong Kick
[State -1, Standing Strong Kick]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = roundstate = 2
triggerall = NumExplod(90000250)||command = "c"
triggerall = var(1)=1 || (var(1)=2 && command != "holdfwd")
triggerall = command != "holddown"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = 200) || (stateno = 230) || (stateno = 210) || (stateno = 240) || (stateno = 241) || (stateno = 242)
trigger2 = movecontact
trigger3 = stateno = 100 || stateno = 101
trigger4 = StateType != A && movecontact
trigger4 = (stateno = 400) || (stateno = 430) || (stateno = 410) || (stateno = 440) 
trigger5 = stateno=300 && MoveContact
trigger6 = stateno = 455 && MoveHit
value = IfElse(var(1)=1,250,IfElse(stateno=250&&MoveContact,756,256))



;[MAJIN]
; Standing Close Strong Kick
[State -1, Standing Close Strong Kick]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1)=2 ; Majin only
triggerall = roundstate = 2
triggerall = command = "c" && command = "holdfwd"
triggerall = command != "holddown"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = 200) || (stateno = 230) || (stateno = 210) || (stateno = 240) || (stateno = 241) || (stateno = 242)
trigger2 = movecontact
trigger3 = stateno = 100 || stateno = 101
trigger4 = StateType != A && movecontact
trigger4 = (stateno = 400) || (stateno = 430) || (stateno = 410) || (stateno = 440)
trigger5 = stateno=300 && MoveContact
value = 257

; Crouching Light Punch
[State -1, Crouching Light Punch]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = roundstate = 2
triggerall = command = "x"
triggerall = command = "holddown"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = StateType != A & MoveContact
trigger2 = (stateno = 200) || (stateno = 230)
trigger3 = stateno = 100 || stateno = 101
value = 400

; Crouching Medium Punch
[State -1, Crouching Medium Punch]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = roundstate = 2
triggerall = command = "y"
triggerall = command = "holddown"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = StateType != A & MoveContact
trigger2 = (StateNo = 400) || (stateno = 200) || (stateno = 230) || (stateno = 430)
trigger3 = stateno = 100 || stateno = 101
trigger4 = stateno=300 && MoveContact
value = 410

; Crouching Strong Punch = Close Uppercut combo'd
[State -1, Close Uppercut]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = roundstate = 2
triggerall = command = "z" && command = "holddown"
trigger1 = (stateno = 200) || (stateno = 230) || (stateno = 210) || (stateno = 240) || (stateno = 241) || (stateno = 242)
trigger1 = movecontact
trigger2 = (stateno = 400) || (stateno = 430) || (stateno = 410) || (stateno = 440)
trigger2 = movecontact
trigger3 = stateno=300 && MoveContact
value = 421

; Crouching Strong Punch = Close Uppercut
[State -1, Close Uppercut]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = roundstate = 2
triggerall = command = "z" && command = "holddown"
triggerall = statetype !=A
trigger1 = ctrl
trigger2 = stateno = 100 || stateno = 101
trigger3 = stateno=300 && MoveContact
value = 420

; Crouching Light Kick
[State -1, Crouching Light Kick]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = roundstate = 2
triggerall = command = "a"
triggerall = command = "holddown"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = StateType != A & MoveContact
trigger2 = (stateno = 200) || (stateno = 230)
trigger3 = stateno = 100 || stateno = 101
value = 430

; Crouching Medium Kick
[State -1, Crouching Medium Kick]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = roundstate = 2
triggerall = command = "b"
triggerall = command = "holddown"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = StateType != A && MoveContact
trigger2 = (StateNo = 400) || (stateno = 200) || (stateno = 230) || (stateno = 430)
trigger3 = stateno = 100 || stateno = 101
trigger4 = stateno=300 && MoveContact
value = 440

; Crouching Strong Kick
[State -1, Crouching Strong Kick]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = roundstate = 2
triggerall = command = "c"
triggerall = command = "holddown"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = StateType != A & MoveContact
trigger2 = (StateNo = 400) || (stateno = 410) || (stateno = 430) || (stateno = 440)
trigger3 = stateno = 100 || stateno = 101
trigger4 = StateType != A & MoveContact
trigger4 = (StateNo = 200) || (stateno = 210) || (stateno = 230) || (stateno = 240) || (stateno = 241) || (stateno = 242)
trigger5 = stateno=300 && MoveContact
trigger6 = StateType != A & MoveContact
trigger6 = (Var(1)=2) && (stateno = 455)
;trigger7 = stateno=3110 && MoveContact ; Weak Surprise Elbow Attack --> INFINITE!!!
value = IfElse(var(1)=1,450,250)

;Jump Light Punch
[State -1, Jump Light Punch]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = roundstate = 2
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<=0 && var(52)<=0
triggerall = roundstate = 2
triggerall = NumExplod(90000210)||command = "y"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = (StateNo = 600) || (StateNo = 630)
trigger2 = MoveContact
value = 610

;Jump Medium Punch Combo
[State -1, Jump Medium Punch Combo]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = roundstate = 2
triggerall = command = "y"
triggerall = statetype = A
trigger1 = (StateNo = 610) || (StateNo = 640)
trigger1 = MoveContact
value = 615

;Jump Strong Punch (two fists)
[State -1, Jump Strong Punch]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = roundstate = 2
triggerall = NumExplod(90000220)||command = "z"
triggerall = statetype = A
trigger1 = ctrl
trigger2 = (StateNo = 600) || (StateNo = 630) || (StateNo = 610) || (StateNo = 615) || (StateNo = 640)
trigger2 = MoveContact
value = IfElse(var(1)=1,620,621)

;Jump Light Kick
[State -1, Jump Light Kick]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = roundstate = 2
triggerall = NumExplod(90000230)||command = "a"
triggerall = statetype = A
trigger1 = ctrl
value = 630

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

;[MAJIN]
;Stomp Kick
[State -1, Stomp Kick]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = var(1) = 2 ;Majin only
triggerall = roundstate = 2
triggerall = NumExplod(90000250)||command = "c" 
triggerall = command = "holddown"
triggerall = statetype = A
trigger1 = ctrl
trigger1 = stateno != 650 ; && stateno != 660
trigger2 = (StateNo = 600) || (StateNo = 630) || (StateNo = 610) || (StateNo = 615) || (StateNo = 640)
trigger2 = MoveContact
value = 3000

;Jump Strong Kick
[State -1, Jump Strong Kick]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = roundstate = 2
triggerall = NumExplod(90000250)||command = "c"
triggerall = statetype = A
trigger1 = ctrl
trigger1 = stateno != 650  ;&& stateno != 660
trigger2 = (StateNo = 600) || (StateNo = 630) || (StateNo = 610) || (StateNo = 615) || (StateNo = 640)
trigger2 = MoveContact
value = 650



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

; Taunt
[State -1, Taunt]
type = ChangeState
triggerall = AILevel<=0 && var(52)<=0
triggerall = roundstate = 2
triggerall = command = "s" && stateno!=195
trigger1 = statetype != A
trigger1 = ctrl
value = 195

;Air Dash Forward
[State -1, Fwd]
type = ChangeState
value = 110
triggerall = AILevel<= 0
triggerall = roundstate = 2
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 = AILevel<= 0
triggerall = roundstate = 2
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 = AILevel<=0 && var(52)<=0
triggerall = roundstate = 2
trigger1 = (command = "FF" && NumExplod(20)=0) || (command = "BB" && NumExplod(20)=1)
;trigger1 = command = "FF"
trigger1 = statetype = S && ctrl
trigger1 = roundstate=2 && (stateno!=[100,106])
value = 100

; Run Back
[State -1, Run Back]
type = ChangeState
value = 105
triggerall = AILevel<=0 && var(52)<=0
triggerall = roundstate = 2
trigger1 = (command = "BB" && NumExplod(20)=0) || (command = "FF" && NumExplod(20)=1)
;trigger1 = command = "BB"
trigger1 = statetype = S
trigger1 = ctrl

;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

; Super Jump
;This state executes only after performing the air launcher
[State -1, Jump Launcher]
type = ChangeState
value = 10230
triggerall = AILevel<=0 && var(52)<=0
triggerall = roundstate = 2
triggerall = command = "holdup"
trigger1 = (stateno = 420 || stateno = 421)  && animelemtime(5)>0 && MoveHit
trigger1 = statetype = S ;add

[State -1, Super Jump Straight Up]
type = ChangeState
value = 10231
triggerall = AILevel<=0 && var(52)<=0
triggerall = roundstate = 2
trigger1 = statetype = S
trigger1 = ctrl
trigger1 = command = "superjump"

[State -1, Super Jump Forward]
type = ChangeState
value = 10232
triggerall = AILevel<=0 && var(52)<=0
triggerall = roundstate = 2
trigger1 = statetype = S
trigger1 = ctrl
trigger1 = command = "superjumpforward"

[State -1, Super Jump Backward]
type = ChangeState
value = 10233
triggerall = AILevel<=0 && var(52)<=0
triggerall = roundstate = 2
trigger1 = statetype = S
trigger1 = ctrl
trigger1 = command = "superjumpbackward"

;____________________________________________________________________________
; AI
;____________________________________________________________________________

;===========================================================================
; SYSTEM AI
;===========================================================================
[State -1, AI ctrlset]
type = null;CtrlSet
triggerall = AILevel>0
triggerall= roundstate=2
triggerall = ctrl = 0
trigger1 = stateno = 0 && time=2
value = 1

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

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

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

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


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

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

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

[State -1, AI Guard]
type= changestate
value=120
trigger1= AILevel>0 && numenemy
trigger1= roundstate=2 && inguarddist
trigger1= ctrl && (stateno!=[120,155])&& !(enemynear,ctrl)
trigger1= !(enemynear,hitdefattr=SCA,AT) && (enemynear,time<120)
trigger1= statetype!=A || p2statetype=A
;trigger1= random<ifelse((p2stateno=[200,699]), 300, ifelse((p2stateno=[1000,2999]), 650, 1000))
trigger1= random<ifelse((p2stateno=[200,699]), 150, ifelse((p2stateno=[1000,2999]), 175, 200))

[State -1, AI Guard]
type = null ;ChangeState
value = 120
triggerall= AILevel>0 && numenemy&& StateNo!=[120,155]
triggerall= Ctrl||stateno = 21
triggerall= enemynear,Movetype=A && random<800*((AIlevel**2)/64.0)
triggerall= !(enemynear,hitdefattr=SCA,AT)
trigger1 = inguarddist

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

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

[State -1, AI Super Jump after launcher]
type = ChangeState
value = 10230
triggerall = AILevel>0 && numenemy && statetype != A && roundstate = 2 && (p2bodydist y = [-320,-40])
triggerall = stateno != 100 && pos y = 0 && (enemynear,Statetype=A)
trigger1 = ((stateno = 420)||(stateno = 421)) && MoveHit ;&& random<800

[State -1, AI Zero Counter]
type=changestate
value=750
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)

[State -1, AI Air Zero Counter]
type=changestate
value=760
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)

[State -1, AI Launcher Kick]
type = changestate
value = 455
triggerall = AILevel>0 && numenemy && roundstate = 2 && statetype!=A
triggerall= (enemy,stateno!=[120,155])&&(enemy,stateno!=[5100,5120])&&(enemynear,statetype!=L)&&(enemynear,statetype!=A)&&(enemynear,stateno!=[1000,4999])
triggerall= (enemynear,stateno!=40) && (p2bodydist x=[30,100]) && (p2bodydist y=[-30,5])
trigger1 = (stateno = 100 || stateno = 101) && random<300*((AIlevel**2)/64.0)

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

[State -1, AI Majin Sanity Charge]
type=changestate
value=910
triggerall = var(1) = 2 ;Majin only
triggerall= AILevel>0 && numenemy && roundstate=2 && statetype!=A && var(53)>0
triggerall= enemynear,Movetype!=A && !(enemynear,ctrl)
triggerall= (var(58)<2100)
triggerall= !inguarddist && p2bodydist x>=100 && random<800*((AIlevel**2)/64.0)
triggerall = stateno != 910
triggerall= ctrl
trigger1=(enemynear,Movetype=H||enemynear,statetype=L)
trigger2=enemynear,vel x<=0
trigger3=enemynear,stateno=[120,155]

[State -1, AI Throw]
type = ChangeState
value = Ifelse(random<=500,800,810)
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall = AILevel>0 && random < 500*((AIlevel**2)/64.0) && !var(53)
triggerall = roundstate=2 && statetype!=A && enemynear,statetype!=L && (enemynear,stateno!=[5120,5201])
triggerall = enemynear,movetype!=H && enemynear,statetype!=A && enemynear,Hitover && (p2bodydist x =[0,30])
triggerall = ctrl||stateno=100||stateno=52
trigger1 = random<200*((AIlevel**2)/64.0)
trigger2 = enemynear,stateno=[120,155]
trigger2 = random<500*((AIlevel**2)/64.0)
trigger3 = stateno=100
trigger4=(p2bodydist x=[0,30]) && random<250*((AIlevel**2)/64.0)
trigger5=(p2stateno=[120,155]) && (p2bodydist x=[0,30]) && random<500*((AIlevel**2)/64.0)

[State -1, AI Majin Throw]
type = ChangeState
value = Ifelse(random<=500,820,830)
triggerall = var(1) = 2 ;Majin only
triggerall = AILevel>0
triggerall = roundstate=2 && statetype!=A && enemynear,statetype!=L && (enemynear,stateno!=[5120,5201])
triggerall = enemynear,movetype!=H && enemynear,statetype!=A && enemynear,Hitover && (p2bodydist x =[0,30])
triggerall = ctrl||stateno=100||stateno=52
trigger1 = random<100*((AIlevel**2)/64.0)
trigger2 = enemynear,stateno=[120,155]
trigger2 = random<250*((AIlevel**2)/64.0)


[State -1, AI Standing Low Punch]
type = ChangeState
value = 200
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A
triggerall =(p2bodydist x = [-10, 42])&&(p2bodydist y = [-80,5])&&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 < 700*((AIlevel**2)/64.0)

[State -1, AI Standing Medium Punch]
type = ChangeState
value = 210
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A  && P2statetype != C
triggerall = (p2bodydist x = [-15, 45]) && p2statetype != L
trigger1 = ctrl && random < 150*((AIlevel**2)/64.0)
trigger2 = ((stateno = [200,209])|| (stateno = [230,239])||(stateno = [400,409])||(stateno = [430,439]))&& movehit
trigger2 = random < 700*((AIlevel**2)/64.0)

[State -1, AI Standing High Punch]
type = ChangeState
value = IfElse(var(1)=1,220,221)
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A
triggerall = (p2bodydist x = [-10, 50]) && (p2bodydist y = [ -80, 80]) && p2statetype != L
trigger1 = ctrl && random < 200*((AIlevel**2)/64.0)
trigger2 = ((stateno = [210,219])|| (stateno = [240,249])||(stateno = [410,419])||(stateno = [440,449]))&& movehit
trigger2 = random < 750*((AIlevel**2)/64.0)

[State -1, AI Standing Low Kick]
type = ChangeState
value = 230
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A && (p2bodydist x = [0, 45]) && p2statetype != L
trigger1 = ctrl && random < 550*((AIlevel**2)/64.0)
trigger2 = (stateno = [100,101]) && random < 100*((AIlevel**2)/64.0)
trigger3 = ctrl&&(enemynear,ctrl) && random < 600*((AIlevel**2)/64.0)

[State -1, AI Standing Medium Kick]
type = ChangeState
value = IfElse(var(1)=1,240,241)
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A && P2statetype != C
triggerall = (p2bodydist x = [5, 45]) && p2statetype != L
trigger1 = ctrl && random < 150*((AIlevel**2)/64.0)
trigger2 = ((stateno = [210,219])|| (stateno = [230,239])||(stateno = [410,419])||(stateno = [430,439]))&& movehit
trigger2 = random < 550*((AIlevel**2)/64.0)

[State -1, AI Standing Medium Kick Combo]
type = ChangeState
value = 242
triggerall = AILevel<=0 && var(52)<=0
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A && P2statetype != C
triggerall = (p2bodydist x = [-10, 50]) && p2statetype != L && random < 150*((AIlevel**2)/64.0)
trigger1 = stateno=240 && Movehit

[State -1, AI Standing High Kick]
type = ChangeState
value = IfElse(var(1)=1,250,IfElse(stateno=250&&MoveContact,756,256))
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A && P2statetype != C
triggerall = (p2bodydist x = [5, 44]) && (p2bodydist y = [ -70, 50]) && p2statetype != L
trigger1 = ctrl && random < 250*((AIlevel**2)/64.0)
trigger2 = ((stateno = [240,249])|| (stateno = [440,449]))&& movehit
trigger2 = random < 200*((AIlevel**2)/64.0)

[State -1, AI Crouching Low Punch]
type = ChangeState
value = 400
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType = C
triggerall = (p2bodydist x = [-2, 38]) &&(p2bodydist y = [-50,25]) && P2statetype != A && P2statetype != L
trigger1 = ((ctrl)|| (stateno = 100) ||(stateno = 101)) && random < 250*((AIlevel**2)/64.0)

[State -1, AI Crouching Medium Punch]
type = ChangeState
value = 410
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType = C
triggerall = (p2bodydist x = [5, 40]) &&(p2bodydist y = [-50,25]) && P2statetype != A && P2statetype != L
trigger1 = ctrl && random < 100*((AIlevel**2)/64.0)
trigger2 = ((stateno = [200,209])|| (stateno = [230,239])||(stateno = [400,409])||(stateno = [430,439]))&& movehit
trigger2 = random < 800*((AIlevel**2)/64.0)

[State -1, AI Crouching High Punch]
type = ChangeState
value = 420
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType = C
triggerall = (p2bodydist x = [0, 35]) &&(p2bodydist y = [-90,5]) && P2statetype != L
trigger1 = ctrl && random < 100*((AIlevel**2)/64.0)

[State -1, AI Launcher]
type = ChangeState
value = 421
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType = C
triggerall = (p2bodydist x = [0, 45]) &&(p2bodydist y = [-85,5]) && P2statetype != L
trigger1 = ((stateno = [210,219])|| (stateno = [240,249])||(stateno = [410,419])||(stateno = [440,449]))&& movehit
trigger1 = random < 800*((AIlevel**2)/64.0)
trigger2 = ((ctrl)|| (stateno = 100) ||(stateno = 101))&& random < 300*((AIlevel**2)/64.0)
trigger3 = stateno = 455 && movehit && random<300*((AIlevel**2)/64.0)

[State -1, AI Crouching Low Kick]
type = ChangeState
value = 430
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType = C
triggerall = (p2bodydist x = [-6, 46]) &&(p2bodydist y = [-50,25]) && P2statetype != A
trigger1 = ((ctrl)|| (stateno = 100) ||(stateno = 101))&& random < 100*((AIlevel**2)/64.0) && P2statetype != L
trigger2 = ctrl && !numtarget(1098) && random < 100*((AIlevel**2)/64.0) &&(p2bodydist x = [-8, 22])
trigger2 = enemynear,statetype=L && enemynear,stateno!=5120 && p2dist y=0

[State -1, AI Crouching Medium Kick]
type = ChangeState
value = 440
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType = C
triggerall = (p2bodydist x = [20, 52]) &&(p2bodydist y = [-50,25]) && P2statetype != A
trigger1 = ctrl && random < 150*((AIlevel**2)/64.0) && P2statetype != L
trigger2 = ((stateno = [210,219])|| (stateno = [230,239])||(stateno = [410,419])||(stateno = [430,439]))&& movehit
trigger2 = random < 350*((AIlevel**2)/64.0) && P2statetype != L
trigger3 = ctrl && random < 100*((AIlevel**2)/64.0) && (enemynear,stateno=5110)&&(p2bodydist x = [-8, 22])
trigger3 = enemynear,statetype=L && enemynear,stateno!=5120 && p2dist y=0

[State -1, AI Crouching High Kick]
type = ChangeState
value = IfElse(var(1)=1,450,250)
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A && P2statetype != A
triggerall = (p2bodydist x = [20, 100]) && (p2bodydist y = [ -50, 50]) && p2statetype != L && p2statetype = S
trigger1 = ctrl && random < 25*((AIlevel**2)/64.0)
trigger2 = ((stateno = [200,219])|| (stateno = [230,249])||(stateno = [400,419])||(stateno = [430,449]))&& movehit
trigger2 = random < 200*((AIlevel**2)/64.0)

[State -1, AI Majin Sliding Kick Combo 1]
type = ChangeState
value = 250
triggerall = var(1) = 2 ;Majin only
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A && P2statetype != A
triggerall = (p2bodydist x = [20, 100]) && (p2bodydist y = [ -50, 50]) && p2statetype != L && p2statetype = S
trigger1 = stateno = 455 && movehit && (AnimElemTime(6) >= 0) && random < 250*((AIlevel**2)/64.0)

[State -1, AI Majin Sliding Kick Combo 2]
type = ChangeState
value = 756
triggerall = var(1) = 2 ;Majin only
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A && P2statetype != A
triggerall = (p2bodydist x = [20, 100]) && (p2bodydist y = [ -50, 50]) && p2statetype != L && p2statetype = S
trigger1 = stateno = 250 && movehit && animelemtime(10)>2 && random < 250*((AIlevel**2)/64.0)

[State -1, AI Jumping Low Punch]
type = ChangeState
value = 600
triggerall = AILevel>0 && numenemy && roundstate=2 && statetype = A && stateno != 600
triggerall = (p2bodydist x = [2,40]) && (p2bodydist y = [-80,-40]) && p2statetype != L
trigger1 = ctrl && random < 700*((AIlevel**2)/64.0)

[State -1, AI Jumping Medium Punch]
type = ChangeState
value = 610
triggerall = AILevel>0 && numenemy && roundstate=2 && statetype = A
triggerall = (p2bodydist x = [-5, 65]) && (p2bodydist y = [ -80, -40]) && p2statetype != L
trigger1 = ctrl && random < (ifelse((vel x > 0 && p2statetype = A), 350, 150))
trigger2 = ((stateno = 600)||(stateno = 630))&& movehit && random<700*((AIlevel**2)/64.0)

[State -1, AI Jumping High Punch]
type = ChangeState
value = IfElse(var(1)=1,620,621)
triggerall = AILevel>0 && numenemy && roundstate=2 && statetype = A && (p2bodydist y = [ -70, -30]) && p2statetype != L
trigger1 = ctrl && random < 100 && (p2bodydist x = [10, 60])
trigger2 = (stateno = 610)&& movehit && random < 300*((AIlevel**2)/64.0)
trigger3 = (stateno = 640)&& movehit && random < 150*((AIlevel**2)/64.0)

[State -1, AI Jumping Low Kick]
type = ChangeState
value = 630
triggerall = AILevel>0 && numenemy && roundstate=2 && statetype = A && enemynear,Statetype=A
triggerall = (p2bodydist x = [-5,25]) && (p2bodydist y = [ -50, 20]) && p2statetype != L
trigger1 = ctrl && random < 800*((AIlevel**2)/64.0)

[State -1, AI Jumping Medium Kick]
type = ChangeState
value = 640
triggerall = AILevel>0 && numenemy && roundstate=2 && statetype = A
triggerall = (p2bodydist y = [ -40, 45]) && p2statetype != L
trigger1 = ctrl && random < 200*((AIlevel**2)/64.0) && (p2bodydist x = [-25,40])
trigger2 = ((stateno = 600)||(stateno = 630))&& movehit && random<700*((AIlevel**2)/64.0)

[State -1, AI Jumping High Kick]
type = ChangeState
value = 650
triggerall = AILevel>0 && numenemy && roundstate=2 && statetype = A && (p2bodydist y = [ -60, 50]) && p2statetype != L
trigger1 = ctrl && random < 150*((AIlevel**2)/64.0) && p2statetype != A && (p2bodydist x = [40,90])
trigger2 = (stateno = 610)&& movehit && random < 250*((AIlevel**2)/64.0) && enemynear,Statetype=A
trigger3 = (stateno = 640)&& movehit 

[State -1, AI Majin Stomp Kick]
type = ChangeState
value = 3000
triggerall = var(1) = 2 ;Majin only
triggerall = AILevel>0 && numenemy && roundstate=2 && statetype = A && (p2bodydist y = [ -20, 90]) && (p2stateno != [120, 155])
trigger1 = ctrl && random < 50*((AIlevel**2)/64.0) && p2statetype != A && (p2bodydist x = [40,90])
trigger2 = (stateno = 610)&& movehit && random < 250*((AIlevel**2)/64.0) && enemynear,Statetype=A
trigger3 = (stateno = 640)&& movehit && random < 250*((AIlevel**2)/64.0)

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

[State -1, AI Rising Knee]
type = changestate
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype != A
triggerall= (p2stateno != [120, 155]) && p2statetype != L && (p2bodydist x = [-5,50]) && (p2bodydist y =[-105,5]) && (enemynear, statetype != C)
trigger1 = ctrl && (enemynear, vel y > -1) && random<300*((AIlevel**2)/64.0)
trigger2 = ((stateno = [200, 220]) || (stateno = [230, 250]) || (stateno = [400, 440])) && (movehit = [1, 16]) && random < 100*((AIlevel**2)/64.0)
trigger3 = stateno = 455 && movehit && random<200*((AIlevel**2)/64.0)
trigger4 = ((stateno = 420)|(stateno = 421)) && MoveHit && random<50*((AIlevel**2)/64.0)
trigger5 = ctrl && random<150*((AIlevel**2)/64.0) && enemynear,stateno=652 && enemynear,movetype=H && enemynear,statetype=A
value = Ifelse((power >= 500 && random < 50), 1550, 1500)

[State -1, AI Majin Double Slash Kick]
type = changestate
triggerall = var(1) = 2 ;Majin only
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype != A
triggerall= (p2stateno != [120, 155]) && p2statetype != L && (p2bodydist x = [-5,50]) && (p2bodydist y =[-105,5]) && (enemynear, statetype != C)
trigger1 = ctrl && (enemynear, vel y > -1) && random<250*((AIlevel**2)/64.0)
trigger2 = ((stateno = [200, 221]) || (stateno = [230, 257]) || (stateno = [400, 440])) && (movehit = [1, 16]) && random < 100*((AIlevel**2)/64.0)
trigger3 = stateno = 455 && movehit && random<75*((AIlevel**2)/64.0)
trigger4 = ((stateno = 420)|(stateno = 421)) && MoveHit && random<50*((AIlevel**2)/64.0)
trigger5 = ctrl && random<150*((AIlevel**2)/64.0) && enemynear,stateno=652 && enemynear,movetype=H && enemynear,statetype=A
value = Ifelse((power >= 500 && random < 50), 3650, 3600)


[State -1, AI Wolverine Flip (Backward)]
type = ChangeState
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype != A && !var(53) && (p2bodydist x =[-30,65]) && (p2bodydist y =[-70,5])
triggerall=(p2stateno != [120, 155]) && (enemynear,statetype = S) && (enemynear,statetype != L) && (enemynear,stateno!=[5100,5220]) 
trigger1 = ctrl && random<200*((AIlevel**2)/64.0) && enemynear,vel x>3 && enemynear,Movetype!=A
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movehit && random<50*((AIlevel**2)/64.0)
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250)) && movehit && random<50*((AIlevel**2)/64.0)
trigger4 = ((stateno = 400) || (stateno = 410)) && movehit && random<50*((AIlevel**2)/64.0)
trigger5 = ((stateno = 430) || (stateno = 440)) && movehit && random<50*((AIlevel**2)/64.0)
;trigger6 = stateno = 455 && movehit && random<20*((AIlevel**2)/64.0)  ;disabled to prevent blockstring infinite
trigger6 = ctrl && random<20*((AIlevel**2)/64.0) && enemynear,stateno=652 && enemynear,movetype=H && enemynear,statetype=A
value = 1100

[State -1, AI Wolverine Flip (forward)]
type = ChangeState
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype != A && !var(53) && (p2bodydist x =[5,90]) && (p2bodydist y =[-70,5])
triggerall=(p2stateno != [120, 155]) && (enemynear,statetype = S) && (enemynear,statetype != L) ;&& (enemynear,stateno!=[5100,5220]) 
trigger1 = ctrl && random<150*((AIlevel**2)/64.0)
trigger2 = ((stateno = [200, 220]) || (stateno = [230, 250]) || (stateno = [400, 440])) && (movehit = [1, 16]) && random < 350*((AIlevel**2)/64.0)
;trigger3 = stateno = 455 && movehit && random<100*((AIlevel**2)/64.0)    ;disabled to prevent blockstring infinite
trigger3 = ctrl && random<100*((AIlevel**2)/64.0) && enemynear,stateno=652 && enemynear,movetype=H && enemynear,statetype=A
value = 1200

[State -1, AI Air Machine Gun Temper]
type = ChangeState
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype = A && pos Y < -60 && vel x>=0
triggerall= (enemy,stateno!=[120,155]) && (p2bodydist x=[0,65]) && (p2bodydist y=[40,355])
triggerall = !NumHelper(9997)   ;Limit timer
trigger1 = ctrl && random<200*((AIlevel**2)/64.0) && (prevstateno!=[600,650])
trigger2 = (stateno=[600,640]) && movehit && random<50*((AIlevel**2)/64.0)
trigger3 = enemynear,statetype=L && ctrl && random<300*((AIlevel**2)/64.0)
value = Ifelse(var(53),1730,Ifelse(p2bodydist x>=35,1720,Ifelse((p2bodydist x=[5,35]),1710,1700)))

[State -1, AI Ki Blast]
type = ChangeState
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype != A
triggerall= (enemy,stateno!=[120,155])&&(enemy,stateno!=[5100,5120])&&(enemynear,statetype!=L)&&(enemynear,Statetype!=A)
triggerall= (enemynear,stateno!=40) && (p2bodydist x>=15) && (p2bodydist y=[-70,5])
trigger1 = ctrl && (Random<70*((AIlevel**2)/64.0))
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movehit && (Random<20*((AIlevel**2)/64.0))
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250)) && movehit && (Random<20*((AIlevel**2)/64.0))
trigger4 = ((stateno = 400) || (stateno = 410)) && movehit && (Random<20*((AIlevel**2)/64.0))
trigger5 = ((stateno = 430) || (stateno = 440)) && movehit && (Random<20*((AIlevel**2)/64.0))
trigger6 = ctrl && random<500*((AIlevel**2)/64.0) && enemynear,stateno=652 && enemynear,movetype=H && enemynear,statetype=A
value = Ifelse(power>1000&&random<10,1050,Ifelse(random<600,1020,Ifelse(random<250,1010,1000)))

[State -1, AI Majin Bakuhatsu]
type = ChangeState
triggerall = var(1) = 2 ;Majin only
triggerall = !NumHelper(3331) ; No Big Bang Attack onscreen
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype != A
triggerall= (enemy,stateno!=[120,155])&&(enemy,stateno!=[5100,5120]);&&(enemynear,statetype!=L)&&(enemynear,Statetype!=A)
triggerall= (enemynear,stateno!=40) && (p2bodydist x>=15) && (p2bodydist y=[-70,5])
trigger1 = ctrl && (Random<70*((AIlevel**2)/64.0))
trigger2 = ((stateno = [200, 221]) || (stateno = [230, 257]) || (stateno = [400, 440])) && (movehit = [1, 16]) && (Random<20*((AIlevel**2)/64.0))
trigger3 = stateno = 455 && movehit && random<200*((AIlevel**2)/64.0)
trigger4 = enemynear,statetype=L && random<150*((AIlevel**2)/64.0)
trigger5 = ctrl && random<250*((AIlevel**2)/64.0) && enemynear,stateno=652 && enemynear,movetype=H && enemynear,statetype=A
value = Ifelse(power>500,3050,3010)


[State -1, AI Majin Royal Fist/EX Bullseye]
type = changestate
triggerall = var(1) = 2 ;Majin only
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype != A
triggerall= (p2stateno != [120, 155]) && p2statetype != L && (p2bodydist x = [-5,50]) && (p2bodydist y =[-105,5]) && (enemynear, statetype != A)
trigger1 = ctrl && random<150*((AIlevel**2)/64.0)
trigger2 = ((stateno = [200, 221]) || (stateno = [230, 256]) || (stateno = [400, 440])) && (movehit = [1, 16]) && random < 150*((AIlevel**2)/64.0)
trigger3 = stateno = 455 && movehit && random<200*((AIlevel**2)/64.0)
trigger4 = ctrl && random<150*((AIlevel**2)/64.0) && enemynear,stateno=652 && enemynear,movetype=H && enemynear,statetype=A
;value = 3500
value = Ifelse(power>500,3520,3500)

[State -1, AI Majin Surprise Elbow]
type = ChangeState
triggerall = var(1) = 2 ;Majin only
triggerall = NumHelper(9993)<2   ;Limit 2 elbows per combo
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype != A && (p2bodydist x =[5,175]) && (p2bodydist y =[-70,5])
triggerall=(p2stateno != [120, 155]) && (enemynear,statetype = S) && (enemynear,statetype != L) ;&& (enemynear,stateno!=[5100,5220])
trigger1 = ctrl && random<250*((AIlevel**2)/64.0)
trigger2 = ((stateno = [200, 221]) || (stateno = [230, 257]) || (stateno = [400, 440])) && (movehit = [1, 16]) && random < 150*((AIlevel**2)/64.0)
trigger3 = stateno = 455 && movehit && random<100*((AIlevel**2)/64.0)
trigger4 = ctrl && random<100*((AIlevel**2)/64.0) && enemynear,stateno=652 && enemynear,movetype=H && enemynear,statetype=A
value = Ifelse(power>500,3120,IfElse(random<300,3110,3100))


[State -1, AI Machine Gun Temper]
type = ChangeState
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype != A
triggerall= (enemy,stateno!=[120,155])&&(enemy,stateno!=[5100,5120])&&(enemynear,statetype!=L)&&(enemynear,Statetype!=A)
triggerall= (enemynear,stateno!=40) && (p2bodydist x>=15) && (p2bodydist y=[-70,5])
triggerall = !NumHelper(9997)   ;Limit timer
trigger1 = ctrl && random<200*((AIlevel**2)/64.0)
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movehit && random<250*((AIlevel**2)/64.0)
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250)) && movehit && random<170*((AIlevel**2)/64.0)
trigger4 = ((stateno = 400) || (stateno = 410)) && movehit && random<200*((AIlevel**2)/64.0)
trigger5 = ((stateno = 430) || (stateno = 440)) && movehit && random<150*((AIlevel**2)/64.0)
trigger6 = ctrl && random<50*((AIlevel**2)/64.0) && enemynear,stateno=652 && enemynear,movetype=H && enemynear,statetype=A
value = Ifelse(power>500&&random<50,1450,Ifelse(random<600,1402,Ifelse(random<250,1401,1400)))

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

;===========================================================================
; SUPERS LV.2 AI
;===========================================================================

[State -1, AI Chou Galick Ho]
type = ChangeState
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype != A   && power >= 2000 && stateno != 2400 && !var(53)
triggerall= (enemynear,stateno != [120, 155]) && (enemy,stateno!=[5100,5120])&&(enemynear,statetype!=L) && (enemynear,vel y>=-1) && (enemynear,vel x=[0,2])
triggerall= (p2bodydist x=[20,140]) && ((p2bodydist y=[-70,5])||(enemynear,vel y=0 && enemynear,statetype!=A))
trigger1 = (Ctrl || stateno = 100 || stateno = 101) && random<100*((AIlevel**2)/64.0)
trigger2 = stateno = 1300 && movehit && random<50*((AIlevel**2)/64.0)
trigger3 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movehit && random<150*((AIlevel**2)/64.0)
trigger4 = ((stateno = 230) || (stateno = 240) || (stateno = 242) || (stateno = 250)) && movehit && random<250*((AIlevel**2)/64.0)
trigger5 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movehit && random<50*((AIlevel**2)/64.0)
trigger6 = ((stateno = 430) || (stateno = 440)) && movehit && random<50*((AIlevel**2)/64.0)
trigger7 = stateno=1050 && AnimElemTime(3)>=0 && enemynear,Movetype=H && enemynear,Statetype=S && random<100*((AIlevel**2)/64.0)
trigger8 = stateno=1120 && Movehit && random<50*((AIlevel**2)/64.0)
value = 2400

[State -1, AI Air Chou Galick Ho]
type = ChangeState
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype = A   && power >= 2000 && stateno != 2450 && !var(53)
triggerall= (enemynear,stateno != [120, 155]) && (enemy,stateno!=[5100,5120]) && (enemynear,statetype!=L)
triggerall= (p2bodydist x=[-5,25]) && (p2bodydist y=[40,355]) && (enemynear,vel x=[0,2]) && (enemynear,pos y=0||enemynear,pos y<=-30)
trigger1 = Ctrl && random<150*((AIlevel**2)/64.0)
trigger2 = (StateNo = [600,650]) && movehit && (p2bodydist x=[-10,10]) && random<100*((AIlevel**2)/64.0)
trigger3 = stateno=2101 && anim =2101 && animelemtime(7)>=1
trigger3 = numhelper(2102)
trigger3 = helper(2102),movehit
value = 2450

[State -1, AI Bakuhatsuha Lv2]
type = ChangeState
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype != A   && power >= 2000 && stateno != 2320 && !var(53)
triggerall= (enemy,stateno!=[120,155])&&(enemy,stateno!=[5100,5120])&&(enemynear,statetype!=L) && (enemynear,vel y>=-2)
triggerall= (p2bodydist x=[20,80]) && (p2bodydist y=[-110,5]) && (enemynear,vel x=[0,2])
trigger1 = (Ctrl || stateno = 100 || stateno = 101) && random<150*((AIlevel**2)/64.0)
trigger2 = stateno = 1300 && movehit && random<100*((AIlevel**2)/64.0)
trigger3 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movehit && random<150*((AIlevel**2)/64.0)
trigger4 = ((stateno = 230) || (stateno = 240) || (stateno = 242) || (stateno = 250)) && movehit && random<150*((AIlevel**2)/64.0)
trigger5 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movehit && random<150*((AIlevel**2)/64.0)
trigger6 = ((stateno = 430) || (stateno = 440)) && movehit && random<100*((AIlevel**2)/64.0)
trigger7 = stateno=1050 && AnimElemTime(3)>=0 && enemynear,Movetype=H && enemynear,Statetype=S && random<150*((AIlevel**2)/64.0)
trigger8 = stateno=1120 && Movehit && random<100*((AIlevel**2)/64.0)
value = 2320

[State -1, AI Air Bakuhatsuha Lv2]
type = ChangeState
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype != A && power >= 2000 && stateno != 2330 && !var(53)
triggerall= (enemy,stateno!=[120,155]) && (enemy,stateno!=[5100,5120]) && (enemynear,statetype!=L) && enemynear,backedgedist>50
triggerall= (enemynear,vel y>=-2) && (p2bodydist x=[20,60]) && (p2bodydist y=[-40,355]) && (enemynear,vel x=[0,2])
trigger1 = Ctrl && random<150*((AIlevel**2)/64.0)
trigger2 = (StateNo = [600,650]) && movehit && random<100*((AIlevel**2)/64.0)
value = 2330

[State -1, AI Rage Mode]
type = ChangeState
triggerall = TeamMode != Simul
triggerall = enemyNear,TeamMode != Simul
triggerall = (enemy,Name != "Saibamen Z2")
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall= AILevel>0 && numenemy && roundstate = 2 && (statetype != A) && power >= 2000 && stateno != 2700 && !var(53)
triggerall= (enemynear,Movetype!=A) && (enemynear,Statetype=L) && (p2bodydist x>=120) && random<150*((AIlevel**2)/64.0)
trigger1 = Ctrl
trigger2 = stateno=900
value = 2700

[State -1, AI Majin Sanity Mode]
type = ChangeState
triggerall = TeamMode != Simul
triggerall = enemyNear,TeamMode != Simul
triggerall = (enemy,Name != "Saibamen Z2")
triggerall = var(1) = 2 ;Majin only
triggerall= AILevel>0 && numenemy && roundstate = 2 && (statetype != A) && power >= 2000 && stateno != 4700 && !var(53)
triggerall= (enemynear,Movetype!=A) && (enemynear,Statetype=L) && (p2bodydist x>=120) && random<550*((AIlevel**2)/64.0)
trigger1 = Ctrl
trigger2 = stateno=900
value = 4700

;===========================================================================
; SUPERS LV.1 AI
;===========================================================================

[State -1, AI Galick Ho]
type = ChangeState
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype != A   && ((power >= 1000)||(var(53)>0)) && stateno != 2000
triggerall= (enemynear,stateno != [120, 155]) && (enemy,stateno!=[5100,5120])&&(enemynear,statetype!=L) && (enemynear,vel y>=-1) && (enemynear,vel x=[0,2])
triggerall= (p2bodydist x=[20,100]) && ((p2bodydist y=[-70,5])||(enemynear,vel y=0 && enemynear,statetype!=A))
trigger1 = (Ctrl || stateno = 100 || stateno = 101) && random<50*((AIlevel**2)/64.0)
trigger2 = stateno = 1300 && movehit && Ifelse(var(53),random<150*((AIlevel**2)/64.0),random<50*((AIlevel**2)/64.0))
trigger3 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movehit && Ifelse(var(53),random<200*((AIlevel**2)/64.0),random<100*((AIlevel**2)/64.0))
trigger4 = ((stateno = 230) || (stateno = 240) || (stateno = 242) || (stateno = 250)) && movehit && Ifelse(var(53),random<250*((AIlevel**2)/64.0),random<150*((AIlevel**2)/64.0))
trigger5 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movehit && Ifelse(var(53),random<150*((AIlevel**2)/64.0),random<50*((AIlevel**2)/64.0))
trigger6 = ((stateno = 430) || (stateno = 440)) && movehit && Ifelse(var(53),random<150*((AIlevel**2)/64.0),random<50*((AIlevel**2)/64.0))
trigger7 = stateno=1050 && AnimElemTime(3)>=0 && enemynear,Movetype=H && enemynear,Statetype=S && Ifelse(var(53),random<150*((AIlevel**2)/64.0),random<50*((AIlevel**2)/64.0))
trigger8 = stateno=1120 && Movehit && random<50*((AIlevel**2)/64.0)
value = 2000

[State -1, AI Air Galick Ho]
type = ChangeState
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype = A   && ((power >= 1000)||(var(53)>0)) && stateno != 2100
triggerall= (enemynear,stateno != [120, 155]) && (enemy,stateno!=[5100,5120]) && (enemynear,statetype!=L)
triggerall= (p2bodydist x=[-5,25]) && (p2bodydist y=[40,355]) && (enemynear,vel x=[0,2]) && (enemynear,pos y=0||enemynear,pos y<=-30)
trigger1 = Ctrl && Ifelse(var(53),random<250*((AIlevel**2)/64.0),random<100*((AIlevel**2)/64.0))
trigger2 = (StateNo = [600,650]) && movehit && (p2bodydist x=[-10,10]) && Ifelse(var(53),random<250*((AIlevel**2)/64.0),random<150*((AIlevel**2)/64.0))
value = 2100


;[MAJIN]
[State -1, AI Air Photon Bomber Lv.1]
type = ChangeState
triggerall = var(1) = 2 ;Majin only
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype = A
triggerall = roundstate = 2
triggerall = (var(53)=0 && power >= 1000) || (var(53)>0 && var(58) >= 700) ;TEST
triggerall = stateno != 3350
;triggerall = (((command = "2qcfx") || (command = "2qcfy") || (command = "2qcfz")) && NumExplod(20)=0) || (((command = "2qcbx") || (command = "2qcby") || (command = "2qcbz")) && NumExplod(20)=1)
triggerall = (command = "2qcfx") || (command = "2qcfy") || (command = "2qcfz")
triggerall = statetype = A  && !WinKo
triggerall = !NumHelper(9999)   ;Limit timer
triggerall= (p2bodydist x=[-5,25]) && (p2bodydist y=[40,355]) && (enemynear,vel x=[0,2]) && (enemynear,pos y=0||enemynear,pos y<=-30)
trigger1 = Ctrl && Ifelse(var(53),random<250*((AIlevel**2)/64.0),random<100*((AIlevel**2)/64.0))
trigger2 = (StateNo = [600,650]) && movehit && (p2bodydist x=[-10,10]) && Ifelse(var(53),random<250*((AIlevel**2)/64.0),random<150*((AIlevel**2)/64.0))
value = 3350

[State -1, AI Bakuhatsuha]
type = ChangeState
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall = !NumHelper(9995) ;Baku Limiter
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype != A   && ((power >= 1000)||(var(53)>0)) && stateno != 2300
triggerall= (enemy,stateno!=[120,155]) && (enemy,stateno!=[5100,5120]) && (enemynear,statetype!=L) && (enemynear,vel y>=-2)
triggerall= (p2bodydist x=[20,80]) && (p2bodydist y=[-110,5]) && (enemynear,vel x=[0,2])
trigger1 = (Ctrl || stateno = 100 || stateno = 101) && Ifelse(var(53),random<200*((AIlevel**2)/64.0),random<100*((AIlevel**2)/64.0))
trigger2 = stateno = 1300 && movehit && Ifelse(var(53),random<200*((AIlevel**2)/64.0),random<100*((AIlevel**2)/64.0))
trigger3 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movehit && Ifelse(var(53),random<200*((AIlevel**2)/64.0),random<100*((AIlevel**2)/64.0))
trigger4 = ((stateno = 230) || (stateno = 240) || (stateno = 242) || (stateno = 250)) && movehit && Ifelse(var(53),random<250*((AIlevel**2)/64.0),random<150*((AIlevel**2)/64.0))
trigger5 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movehit && Ifelse(var(53),random<100*((AIlevel**2)/64.0),random<50*((AIlevel**2)/64.0))
trigger6 = ((stateno = 430) || (stateno = 440)) && movehit && Ifelse(var(53),random<100*((AIlevel**2)/64.0),random<50*((AIlevel**2)/64.0))
trigger7 = stateno=1050 && AnimElemTime(3)>=0 && enemynear,Movetype=H && enemynear,Statetype=S && Ifelse(var(53),random<200*((AIlevel**2)/64.0),random<100*((AIlevel**2)/64.0))
trigger8 = stateno=1120 && Movehit && random<50*((AIlevel**2)/64.0)
value = 2300

[State -1, AI Air Bakuhatsuha]
type = ChangeState
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall = !NumHelper(9995) ;Baku Limiter
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype = A   && ((power >= 1000)||(var(53)>0)) && stateno != 2310
triggerall= (enemy,stateno!=[120,155]) && (enemy,stateno!=[5100,5120]) && (enemynear,statetype!=L) 
triggerall= (enemynear,vel y>=-2) && (p2bodydist x=[20,60]) && (p2bodydist y=[-40,355]) && (enemynear,vel x=[0,2])
trigger1 = Ctrl && Ifelse(var(53),random<150*((AIlevel**2)/64.0),random<50*((AIlevel**2)/64.0))
trigger2 = (StateNo = [600,650]) && movehit && Ifelse(var(53),random<250*((AIlevel**2)/64.0),random<100*((AIlevel**2)/64.0))
value = 2310

[State -1, AI Majin Atomic Blast]
type = ChangeState
triggerall = var(1) = 2 ;Majin only
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype != A   && ((power >= 1000)||(var(53)>0)) && stateno != 3200
triggerall= (enemy,stateno!=[5100,5120])&&(enemynear,statetype!=L) && (enemynear,vel y>=-1) && (enemynear,vel x=[0,2])
triggerall= (p2bodydist x=[0,50]) && ((p2bodydist y=[-70,5])||(enemynear,vel y=0 && enemynear,statetype!=A))
triggerall = facing != enemynear,facing
triggerall = enemynear,movetype!=H
triggerall = var(43)!=1 ;Super Move Checker
trigger1 = (Ctrl || stateno = 100 || stateno = 101) && random<50*((AIlevel**2)/64.0)
trigger2 = stateno = 1300 && movehit && Ifelse(var(53),random<100*((AIlevel**2)/64.0),random<50*((AIlevel**2)/64.0))
trigger3 = ((stateno = 200) || (stateno = 210) || (stateno = 221)) && movehit && Ifelse(var(53),random<100*((AIlevel**2)/64.0),random<50*((AIlevel**2)/64.0))
trigger4 = ((stateno = 230) || (stateno = 241) || (stateno = 256)) && movehit && Ifelse(var(53),random<150*((AIlevel**2)/64.0),random<100*((AIlevel**2)/64.0))
trigger5 = ((stateno = 400) || (stateno = 410) || (stateno = 250)) && movehit && Ifelse(var(53),random<200*((AIlevel**2)/64.0),random<150*((AIlevel**2)/64.0))
trigger6 = ((stateno = 430) || (stateno = 440)) && movehit && Ifelse(var(53),random<250*((AIlevel**2)/64.0),random<200*((AIlevel**2)/64.0))
trigger7 = Ctrl && (p2stateno=[120,155]) && random<250*((AIlevel**2)/64.0)
value = 3200

[State -1, AI Majin Photon Bomber]
type = ChangeState
triggerall = var(1) = 2 ;Majin only
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype != A   && ((power >= 1000)||(var(53)>0)) && stateno != 3300
triggerall= (enemy,stateno!=[120,155]) && (enemy,stateno!=[5100,5120]) && (enemynear,statetype!=L) && (enemynear,vel y>=-2)
triggerall= (p2bodydist x=[50,180]) && (p2bodydist y=[-110,5]) && (enemynear,vel x=[0,2])
triggerall = !NumHelper(9999)   ;Limit timer
triggerall = var(43)!=2 ;Super Move Checker
trigger1 = (Ctrl || stateno = 100 || stateno = 101) && random<50*((AIlevel**2)/64.0)
trigger2 = stateno = 1300 && movehit && Ifelse(var(53),random<150*((AIlevel**2)/64.0),random<50*((AIlevel**2)/64.0))
trigger3 = ((stateno = 200) || (stateno = 210) || (stateno = 221)) && movehit && Ifelse(var(53),random<100*((AIlevel**2)/64.0),random<50*((AIlevel**2)/64.0))
trigger4 = ((stateno = 230) || (stateno = 241) || (stateno = 256)) && movehit && Ifelse(var(53),random<150*((AIlevel**2)/64.0),random<100*((AIlevel**2)/64.0))
trigger5 = ((stateno = 400) || (stateno = 410) || (stateno = 250)) && movehit && Ifelse(var(53),random<200*((AIlevel**2)/64.0),random<150*((AIlevel**2)/64.0))
trigger6 = ((stateno = 430) || (stateno = 440)) && movehit && Ifelse(var(53),random<250*((AIlevel**2)/64.0),random<200*((AIlevel**2)/64.0))
value = 3300

[State -1, AI Majin Machine Gun Tantrum]
type = ChangeState
triggerall = var(1) = 2 ;Majin only
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype != A   && ((power >= 1000)||(var(53)>0)) && stateno != 3400
triggerall= (enemy,stateno!=[120,155])&&(enemy,stateno!=[5100,5120])&&(enemynear,statetype!=L)&&(enemynear,Statetype!=A)
triggerall= (enemynear,stateno!=40) && (p2bodydist x>=15) && (p2bodydist y=[-70,5])
triggerall = var(43)!=3 ;Super Move Checker
trigger1 = ctrl && random<150*((AIlevel**2)/64.0)
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movehit && random<175*((AIlevel**2)/64.0)
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250)) && movehit && random<170*((AIlevel**2)/64.0)
trigger4 = ((stateno = 400) || (stateno = 410)) && movehit && random<100*((AIlevel**2)/64.0)
trigger5 = ((stateno = 430) || (stateno = 440)) && movehit && random<125*((AIlevel**2)/64.0)
trigger6 = ctrl && random<50*((AIlevel**2)/64.0) && enemynear,stateno=652 && enemynear,movetype=H && enemynear,statetype=A
value = 3400

[State -1, AI Majin Air Machine Gun Tantrum]
type = ChangeState
triggerall = var(1) = 2 ;Majin only
triggerall = !NumHelper(9994) ;No limiter
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype = A && pos Y < -60 && vel x>=0
triggerall = ((power >= 1000)||(var(53)>0)) && stateno != 3430 ;&&(enemynear,Statetype!=A)
triggerall= (enemy,stateno!=[120,155]) && (p2bodydist x=[0,65]) && (p2bodydist y=[0,120])
triggerall = var(43)!=3 ;Super Move Checker
trigger1 = ctrl && random<100*((AIlevel**2)/64.0) && (prevstateno!=[600,650])
trigger2 = (stateno=[600,640]) && movehit && random<50*((AIlevel**2)/64.0)
trigger3 = enemynear,statetype=L && ctrl && random<150*((AIlevel**2)/64.0)
value = 3430

[State -1, AI Majin Big Bang Attack Lv1]
type = ChangeState
triggerall = var(1) = 2 ;Majin only
triggerall = !NumHelper(33210)
triggerall = !NumProjID(3335)
triggerall = AILevel>0 && numenemy && roundstate = 2 && statetype != A
triggerall = ((power >= 1000)&&(var(53)=0)) || ((var(53)>0 && var(58) >= 700))
triggerall = stateno != 3320
triggerall= (enemynear,stateno != [120, 155]) && (enemy,stateno!=[5100,5120])&&(enemynear,statetype!=L) && (enemynear,vel y>=-1) && (enemynear,vel x=[0,2])
triggerall = var(43)!=5 ;Super Move Checker
;triggerall= (p2bodydist x=[20,140]) && ((p2bodydist y=[-70,5])||(enemynear,vel y=0 && enemynear,statetype!=A))
trigger1 = (Ctrl || stateno = 100 || stateno = 101) && random<100*((AIlevel**2)/64.0)
trigger2 = stateno = 1300 && movehit && random<50*((AIlevel**2)/64.0)
trigger3 = ((stateno = 200) || (stateno = 210) || (stateno = 220) || (stateno = 221)) && movehit && random<150*((AIlevel**2)/64.0)
trigger4 = ((stateno = 230) || (stateno = 240) || (stateno = 241) || (stateno = 242) || (stateno = 250) || (stateno = 256) || (stateno = 257)) && movehit && random<150*((AIlevel**2)/64.0)
trigger5 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movehit && random<50*((AIlevel**2)/64.0)
trigger6 = ((stateno = 430) || (stateno = 440)) && movehit && random<50*((AIlevel**2)/64.0)
trigger7 = Ctrl && enemynear,Movetype=H && enemynear,Statetype=S && random<50*((AIlevel**2)/64.0)
value = 3320

[State -1, AI Majin BB Detonation Lv1]
type = ChangeState
triggerall = var(1) = 2 ;Majin only
triggerall = NumHelper(33210)
triggerall = movetype = I
triggerall = statetype = S
triggerall= AILevel>0 && numenemy && roundstate = 2 ;&& statetype != A && stateno = 3322
;triggerall = time < 120
triggerall = ctrl
trigger1 = (enemynear,stateno != [120, 155]) && (enemy,stateno!=[5100,5120]) && random<10*((AIlevel**2)/64.0)
trigger2 = helper(33210),p2bodydist x =[-5,50]
trigger2 = helper(33210),p2bodydist y =[-105,5]
trigger2= random<100*((AIlevel**2)/64.0)
trigger3 = enemynear,movetype=H && random<50*((AIlevel**2)/64.0)
value = 3325

[State -1, AI Majin Royal Edict]
type = changestate
triggerall = var(1) = 2 ;Majin only
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype != A
triggerall= (p2stateno != [120, 155]) && p2statetype != L && (p2bodydist x = [-5,50]) && (p2bodydist y =[-105,5]) && (enemynear, statetype != A)
triggerall = ((power >= 1000)||(var(53)>0)) && stateno != 3550
triggerall = var(43)!=4 ;Super Move Checker
trigger1 = ctrl && random<200*((AIlevel**2)/64.0)
trigger2 = ((stateno = [200, 221]) || (stateno = [230, 256]) || (stateno = [400, 440])) && (movehit = [1, 16]) && random < 100*((AIlevel**2)/64.0)
trigger3 = stateno = 455 && movehit && random<200*((AIlevel**2)/64.0)
trigger4 = ((stateno=3500 && random<50) || (stateno=3501 && random<100*((AIlevel**2)/64.0))) && (AnimElemTime(3)>=2) && movehit
trigger5 = ctrl && random<150*((AIlevel**2)/64.0) && enemynear,stateno=652 && enemynear,movetype=H && enemynear,statetype=A
value = 3550

;===========================================================================
; HYPERS
;===========================================================================

[State -1, AI Air Galactic Gunfire]
type = ChangeState
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype = A
triggerall= (enemy,stateno!=[5100,5120])&&(enemynear,statetype!=L) && (enemynear,vel y>=-1) && (enemynear,vel x=[0,2])
triggerall= (p2bodydist x=[5,60]) && (p2bodydist y=[-90,5]) && (enemynear,statetype!=C)
triggerall = var(53)>0 && power >= 1000 && var(58) >= 700 && stateno != 2803
trigger1 = stateno=1501 && (movehit=[1,30]) && random<250*((AIlevel**2)/64.0)
trigger2 = stateno=1551 && (movehit=[1,30]) && random<250*((AIlevel**2)/64.0)
value = 2803

[State -1, AI Galactic Gunfire (Rage)]
type = ChangeState
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype != A   && (var(53)>0) && stateno != 2800
triggerall= (enemy,stateno!=[5100,5120])&&(enemynear,statetype!=L) && (enemynear,vel y>=-1) && (enemynear,vel x=[0,2])
triggerall= (p2bodydist x=[5,60]) && (p2bodydist y=[-90,5]) && (enemynear,statetype!=C)
triggerall = power >= 1000 && var(58) >= 700
trigger1 = (Ctrl || stateno = 100 || stateno = 101) && random<300*((AIlevel**2)/64.0)
trigger2 = stateno = 1300 && movehit && random<200*((AIlevel**2)/64.0)
trigger3 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movehit && random<200*((AIlevel**2)/64.0)
trigger4 = ((stateno = 230) || (stateno = 240) || (stateno = 242) || (stateno = 250)) && movehit && random<100*((AIlevel**2)/64.0)
trigger5 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movehit && random<150*((AIlevel**2)/64.0)
trigger6 = ((stateno = 430) || (stateno = 440)) && movehit && random<100*((AIlevel**2)/64.0)
trigger7 = stateno=1050 && AnimElemTime(3)>=0 && enemynear,Movetype=H && enemynear,Statetype=S && random<100*((AIlevel**2)/64.0)
value = 2800

[State -1, AI Galactic Gunfire (Normal)]
type = ChangeState
triggerall = TeamMode != Simul
triggerall = enemyNear,TeamMode != Simul
triggerall = (enemy,Name != "Saibamen Z2")
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype != A   && (var(53)=0) && stateno != 2600
triggerall= (enemy,stateno!=[5100,5120])&&(enemynear,statetype!=L) && (enemynear,vel y>=-1) && (enemynear,vel x=[0,2])
triggerall= (p2bodydist x=[5,60]) && (p2bodydist y=[-90,5]) && (enemynear,statetype!=C)
triggerall = power >= 3000
trigger1 = (Ctrl || stateno = 100 || stateno = 101) && random<250*((AIlevel**2)/64.0)
trigger2 = stateno = 1300 && movehit && random<100*((AIlevel**2)/64.0)
trigger3 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movehit && random<150*((AIlevel**2)/64.0)
trigger4 = ((stateno = 230) || (stateno = 240) || (stateno = 242) || (stateno = 250)) && movehit && random<50*((AIlevel**2)/64.0)
trigger5 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movehit && random<100*((AIlevel**2)/64.0)
trigger6 = ((stateno = 430) || (stateno = 440)) && movehit && random<50*((AIlevel**2)/64.0)
value = 2600

[State -1, AI Final Flash]
type = ChangeState
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype != A   && (power >= 3000) && (var(53)=0) && stateno != 2500
triggerall= (enemy,stateno!=[5100,5120])&&(enemynear,statetype!=L) && (p2bodydist x>=150) && (p2bodydist y=[-90,5]) && (enemynear,vel y=0) 
trigger1 = (Ctrl || stateno = 100 || stateno = 101) && random<350
trigger2 = stateno = 1300 && movehit && random<50*((AIlevel**2)/64.0)
trigger3 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movehit && random<50*((AIlevel**2)/64.0)
trigger4 = ((stateno = 230) || (stateno = 240) || (stateno = 242) || (stateno = 250)) && movehit && random<50*((AIlevel**2)/64.0)
trigger5 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movehit && random<100*((AIlevel**2)/64.0)
trigger6 = ((stateno = 430) || (stateno = 440)) && movehit && random<50*((AIlevel**2)/64.0)
value = 2500

[State -1, AI Bakuhatsuha Lv3]
type = ChangeState
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype != A   && power >= 3000 && stateno != 2340 && !var(53)
triggerall= (enemy,stateno!=[120,155])&&(enemy,stateno!=[5100,5120])&&(enemynear,statetype!=L) && (enemynear,vel y>=-2)
triggerall= (p2bodydist x=[20,90]) && (p2bodydist y=[-110,5]) && (enemynear,vel x=[0,2]) && enemynear,backedgedist>90
trigger1 = (Ctrl || stateno = 100 || stateno = 101) && random<250*((AIlevel**2)/64.0)
trigger2 = stateno = 1300 && movehit && random<200*((AIlevel**2)/64.0)
trigger3 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movehit && random<250*((AIlevel**2)/64.0)
trigger4 = ((stateno = 230) || (stateno = 240) || (stateno = 242) || (stateno = 250)) && movehit && random<250*((AIlevel**2)/64.0)
trigger5 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movehit && random<250*((AIlevel**2)/64.0)
trigger6 = ((stateno = 430) || (stateno = 440)) && movehit && random<200*((AIlevel**2)/64.0)
trigger7 = stateno=1050 && AnimElemTime(3)>=0 && enemynear,Movetype=H && enemynear,Statetype=S && random<250*((AIlevel**2)/64.0)
trigger8 = stateno=1120 && Movehit && random<200*((AIlevel**2)/64.0)
value = 2340

[State -1, AI Air Bakuhatsuha Lv3]
type = ChangeState
triggerall = var(1) = 1 ;Normal Vegeta only
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype != A   && power >= 3000 && stateno != 2350 && !var(53)
triggerall= (enemy,stateno!=[120,155]) && (enemy,stateno!=[5100,5120]) && (enemynear,statetype!=L) && enemynear,backedgedist>80
triggerall= (enemynear,vel y>=-2) && (p2bodydist x=[20,80]) && (p2bodydist y=[-40,355]) && (enemynear,vel x=[0,2])
trigger1 = Ctrl && random<300*((AIlevel**2)/64.0)
trigger2 = (StateNo = [600,650]) && movehit && random<250*((AIlevel**2)/64.0)
value = 2350

[State -1, AI Majin Aura Burst]
type = ChangeState
triggerall = var(1) = 2 ;Majin only
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype != A && (var(53)>0) && stateno != 3800
triggerall= (enemy,stateno!=[5100,5120])&&(enemynear,statetype!=L) && (p2bodydist x<=175) && (p2bodydist y=[-90,5]) && (enemynear,vel y=0)
trigger1 = Ctrl && ((var(58)=[350,700])&&random<50*((AIlevel**2)/64.0)) || ((var(58)=[701,1400])&&random<100*((AIlevel**2)/64.0)) || ((var(58)=[1401,2100])&&random<150*((AIlevel**2)/64.0))
trigger2 = stateno = 1300 && movehit && random<50*((AIlevel**2)/64.0)
trigger3 = ((stateno = 221) || (stateno = 256) || (stateno = 420)|| (stateno = 250)) && movehit && random<50*((AIlevel**2)/64.0)
value = 3800

[State -1, AI Majin SPB]
type = changestate
triggerall = var(1) = 2 ;Majin only
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype != A
triggerall= (p2stateno != [120, 155]) && p2movetype != H && (p2bodydist x = [-5,50]) && (p2bodydist y =[-105,5]) && (enemynear, statetype != A)
triggerall = ((power >= 3000) && (var(53)=0)) || ((power >= 2000) && (var(53)>0))
triggerall = stateno != 3700
triggerall = ctrl
trigger1 = enemynear,life<450 && (((var(58)=[350,700])&&random<250*((AIlevel**2)/64.0)) || ((var(58)=[701,1400])&&random<300*((AIlevel**2)/64.0)) || ((var(58)=[1401,2100])&&random<350*((AIlevel**2)/64.0)))
trigger2 = life<200 && random<450*((AIlevel**2)/64.0)
value = 3700


