,
[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 = "cbfbfp"
command = ~45$B, $F, $B, F, x
time = 30
[Command]
name = "cbfbfp"
command = ~45$B, $F, $B, F, y
time = 30
[Command]
name = "cbfbfp"
command = ~45$B, $F, $B, F, z
time = 30
[Command]
name = "cbfbfp"
command = ~45$B, $F, $B, F, ~x
time = 30
[Command]
name = "cbfbfp"
command = ~45$B, $F, $B, F, ~y
time = 30
[Command]
name = "cbfbfp"
command = ~45$B, $F, $B, F, ~z
time = 30

[Command]
name = "hcbf_Pa"
;command = ~F, $D, B, F, x
command = ~$D, B, F, x
time = 20
[Command]
name = "hcbf_Pa"
command = ~D, B, F, ~x
time = 20
[Command]
name = "hcbf_Pb"
command = ~D, B, F, y
time = 20
[Command]
name = "hcbf_Pb"
command = ~D, B, F, ~y
time = 20
[Command]
name = "hcbf_Pc"
command = ~D, B, F, z
time = 20
[Command]
name = "hcbf_Pc"
command = ~$D, B, F, ~z
time = 20

[Command]
name = "hcfb_Pa"
;command = ~F, $D, B, F, x
command = ~$D, F, B, x
time = 20
[Command]
name = "hcfb_Pa"
command = ~D, F, B, ~x
time = 20
[Command]
name = "hcfb_Pb"
command = ~D, F, B, y
time = 20
[Command]
name = "hcfb_Pb"
command = ~D, F, B, ~y
time = 20
[Command]
name = "hcfb_Pc"
command = ~D, F, B, z
time = 20
[Command]
name = "hcfb_Pc"
command = ~$D, F, B, ~z
time = 20

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

[Command]
name = "qcbf_P"
command = ~D, DB, B, F, x
time = 20
[Command]
name = "qcbf_P"
command = ~D, DB, B, F, ~x
time = 20
[Command]
name = "qcbf_P"
command = ~D, DB, B, F, y
time = 20
[Command]
name = "qcbf_P"
command = ~D, DB, B, F, ~y
time = 20
[Command]
name = "qcbf_P"
command = ~D, DB, B, F, z
time = 20
[Command]
name = "qcbf_P"
command = ~D, DB, B, F, ~z
time = 20

[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 = "2qcb3p"
command = ~D, DB, B, D, DB, x+y+z
time = 20

[Command]
name = "2qcf3p"
command = ~D, DF, F, D, DF, x+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 = "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 = "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 = "2qcf3k"
command = ~D, DF, F, D, DF, a+b+c
time = 20

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


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

[Command]
name = "hcfa"
command = ~DB, D, F, a
time = 20
[Command]
name = "hcfb"
command = ~DB, D, F, b
time = 20
[Command]
name = "hcfc"
command = ~DB, D, F, c
time = 20

[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 = "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

[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 = "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

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

[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 = "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 = "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 = "rdpx"
command = ~B, D, DB, x
[Command]
name = "rdpx"
command = ~B, D, DB, ~x
[Command]
name = "rdpy"
command = ~B, D, DB, y
[Command]
name = "rdpy"
command = ~B, D, DB, ~y
[Command]
name = "rdpz"
command = ~B, D, DB, z
[Command]
name = "rdpz"
command = ~B, D, DB, ~z

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

[Command]
name = "ddxy"
command = D, D, x+y
[Command]
name = "ddxz"
command = D, D, x+z
[Command]
name = "ddyz"
command = D, D, y+z
[Command]
name = "ddxyz"
command = D, D, x+y+z

[Command]
name = "ddab"
command = D, D, a+b
[Command]
name = "ddac"
command = D, D, a+c
[Command]
name = "ddbc"
command = D, D, b+c
[Command]
name = "ddabc"
command = D, D, a+b+c

[Command]
name = "Us"
command = U,s
time = 5
[Command]
name = "UFs"
command = UF,s
time = 5
[Command]
name = "UBs"
command = UB,s
time = 5

[Command]
name = "Ds"
command = D,s
time = 5
[Command]
name = "DFs"
command = DF,s
time = 5
[Command]
name = "DBs"
command = DB,s
time = 5

[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


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

;-| 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 = "DD"
command = D, D
time = 10

[Command]
name = "tripleS"
command = s,s,s
time = 20

;-| 2/3 Button Combination |-----------------------------------------------

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

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

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

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

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

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

[Command]
name = "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 = "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
;===========================================================================

; Death Charge (Flaming Headbutt)
[State -1, Death Charge]
type = ChangeState
triggerall = AILevel<=0
;triggerall = roundstate = 2
triggerall = var(50)>0 ;in sadism mode
triggerall = command = "emo" || command = "cbfbfp" 
triggerall = statetype != A  && !WinKo
triggerall = stateno != 2680 && stateno<2100
trigger1 = Ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
trigger7 = numhelper(1110)
trigger7 = helper(1110),movecontact
trigger8 = numhelper(1111)
trigger8 = helper(1111),movecontact
trigger9 = numhelper(1112)
trigger9 = helper(1112),movecontact
trigger10 = numhelper(1210)
trigger10 = helper(1210),movecontact
trigger11 = numhelper(1211)
trigger11 = helper(1211),movecontact
trigger12 = numhelper(1212)
trigger12 = helper(1212),movecontact
trigger13 = (stateno=1400 || stateno=1450) && anim=48 && movecontact
trigger14 = numhelper(1151)
trigger14 = helper(1151),movecontact
trigger15 = numhelper(1251)
trigger15 = helper(1251),movecontact
trigger16 = stateno=1801 && movecontact   ;Torture Gun
trigger17 = StateNo = 900
value = 2680

; Sadism Mode
[State -1, sadism activation]
type = ChangeState
triggerall = TeamMode != Simul
triggerall = enemyNear,TeamMode != Simul
triggerall = (enemy,Name != "Saibamen Z2")
triggerall = AILevel<=0
triggerall = roundstate = 2
triggerall = var(50)=0 ;No sadism mode
triggerall = command = "emo"
triggerall = statetype != A  && !WinKo
triggerall = power >= 2000 && stateno != 2600
trigger1 = Ctrl
trigger2 = stateno = 900
value = 2600

;Tail Press Nightmare Lv3
[State -1, Tail Press Nightmare Lv3]
type = ChangeState
triggerall= AILevel<=0
;triggerall = roundstate = 2
;triggerall = command = "2qcf2k"
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) || (power>=2000 && var(50)>0)
triggerall = stateno!=2500 && stateno<2000
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
trigger7 = numhelper(1110)
trigger7 = helper(1110),movecontact
trigger8 = numhelper(1111)
trigger8 = helper(1111),movecontact
trigger9 = numhelper(1112)
trigger9 = helper(1112),movecontact
trigger10 = numhelper(1210)
trigger10 = helper(1210),movecontact
trigger11 = numhelper(1211)
trigger11 = helper(1211),movecontact
trigger12 = numhelper(1212)
trigger12 = helper(1212),movecontact
trigger13 = (stateno=1400 || stateno=1450) && anim=48 && movecontact
trigger14 = numhelper(1151)
trigger14 = helper(1151),movecontact
trigger15 = numhelper(1251)
trigger15 = helper(1251),movecontact
trigger16 = stateno=1801 && movecontact   ;Torture Gun
value = 2500

;Death Ball Lv3 AIR
[State -1, Death Ball Lv3 AIR]
type = ChangeState
triggerall= AILevel<=0
;triggerall = roundstate = 2
triggerall = command = "2qcb3p"
triggerall = power >= 3000
triggerall = numhelper(2205) = 0 && numhelper(2210) = 0
triggerall = statetype=A && !WinKo
triggerall = pos Y < -10
trigger1 = ctrl
trigger2 = (StateNo = 600) || (StateNo = 610) || (StateNo = 620) || (StateNo = 630) || (StateNo = 640) || (StateNo = 650) || (StateNo = 660)
trigger2 = movecontact
trigger3 = stateno = 1400 || stateno = 1450		;Air headbutt
trigger3 = movecontact
trigger4 = numhelper(1210) 
trigger4 = helper(1210),movecontact
trigger5 = numhelper(1211) 
trigger5 = helper(1211),movecontact
trigger6 = numhelper(1212) 
trigger6 = helper(1212),movecontact
trigger7 = numhelper(1251) 
trigger7 = helper(1251),movecontact
trigger8 = stateno=1566 && anim=1510
trigger9 = ((stateno = 1600) || (stateno = 1601) || (stateno = 1602)) && movecontact
value = 2470

;Death Ball Lv3
[State -1, Death Ball Lv3]
type = ChangeState
triggerall= AILevel<=0
;triggerall = roundstate = 2
triggerall = (command = "2qcb3p" && NumExplod(20)=0) || (command = "2qcf3p" && NumExplod(20)=1)
triggerall = statetype!=A && !WinKo
triggerall = power >= 3000 && stateno<2000
triggerall = numhelper(2205) = 0 && numhelper(2210) = 0
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
trigger7 = numhelper(1110)
trigger7 = helper(1110),movecontact
trigger8 = numhelper(1111)
trigger8 = helper(1111),movecontact
trigger9 = numhelper(1112)
trigger9 = helper(1112),movecontact
trigger10 = numhelper(1210)
trigger10 = helper(1210),movecontact
trigger11 = numhelper(1211)
trigger11 = helper(1211),movecontact
trigger12 = numhelper(1212)
trigger12 = helper(1212),movecontact
trigger13 = (stateno=1400 || stateno=1450) && anim=48 && movecontact
trigger14 = numhelper(1151)
trigger14 = helper(1151),movecontact
trigger15 = numhelper(1251)
trigger15 = helper(1251),movecontact
trigger16 = stateno=1801 && movecontact   ;Torture Gun
value = 2450

;Death Ball Lv2 AIR
[State -1, Death Ball Lv2 AIR]
type = ChangeState
triggerall= AILevel<=0
;triggerall = roundstate = 2
triggerall = command = "2qcb2p"
triggerall = power >= 2000
triggerall = numhelper(2205) = 0 && numhelper(2210) = 0
triggerall = statetype=A && !WinKo
triggerall = pos Y < -10
trigger1 = ctrl
trigger2 = (StateNo = 600) || (StateNo = 610) || (StateNo = 620) || (StateNo = 630) || (StateNo = 640) || (StateNo = 650) || (StateNo = 660)
trigger2 = movecontact
trigger3 = stateno = 1400 || stateno = 1450		;Air headbutt
trigger3 = movecontact
trigger4 = numhelper(1210) 
trigger4 = helper(1210),movecontact
trigger5 = numhelper(1211) 
trigger5 = helper(1211),movecontact
trigger6 = numhelper(1212) 
trigger6 = helper(1212),movecontact
trigger7 = numhelper(1251) 
trigger7 = helper(1251),movecontact
trigger8 = stateno=1566 && anim=1510
trigger9 = ((stateno = 1600) || (stateno = 1601) || (stateno = 1602)) && movecontact
value = 2420

;Death Ball Lv2
[State -1, Death Ball Lv2]
type = ChangeState
triggerall= AILevel<=0
;triggerall = roundstate = 2
triggerall = (command = "2qcb2p" && NumExplod(20)=0) || (command = "2qcf2p" && NumExplod(20)=1)
triggerall = statetype!=A && !WinKo
triggerall = power >= 2000 && stateno<2000
triggerall = numhelper(2205) = 0 && numhelper(2210) = 0
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
trigger7 = numhelper(1110)
trigger7 = helper(1110),movecontact
trigger8 = numhelper(1111)
trigger8 = helper(1111),movecontact
trigger9 = numhelper(1112)
trigger9 = helper(1112),movecontact
trigger10 = numhelper(1210)
trigger10 = helper(1210),movecontact
trigger11 = numhelper(1211)
trigger11 = helper(1211),movecontact
trigger12 = numhelper(1212)
trigger12 = helper(1212),movecontact
trigger13 = (stateno=1400 || stateno=1450) && anim=48 && movecontact
trigger14 = numhelper(1151)
trigger14 = helper(1151),movecontact
trigger15 = numhelper(1251)
trigger15 = helper(1251),movecontact
trigger16 = stateno=1801 && movecontact   ;Torture Gun
value = 2400

;Death Beam Lv2
[State -1, Death Beam Lv2]
type = ChangeState
triggerall= AILevel<=0
;triggerall = roundstate = 2
triggerall = (command = "2qcf2p" && NumExplod(20)=0) || (command = "2qcb2p" && NumExplod(20)=1)
triggerall = statetype!=A && !WinKo
triggerall = power >= 2000 && stateno<2100
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
trigger7 = numhelper(1110)
trigger7 = helper(1110),movecontact
trigger8 = numhelper(1111)
trigger8 = helper(1111),movecontact
trigger9 = numhelper(1112)
trigger9 = helper(1112),movecontact
trigger10 = numhelper(1210)
trigger10 = helper(1210),movecontact
trigger11 = numhelper(1211)
trigger11 = helper(1211),movecontact
trigger12 = numhelper(1212)
trigger12 = helper(1212),movecontact
trigger13 = (stateno=1400 || stateno=1450) && anim=48 && movecontact
trigger14 = numhelper(1151)
trigger14 = helper(1151),movecontact
trigger15 = numhelper(1251)
trigger15 = helper(1251),movecontact
trigger16 = numhelper(2015)
trigger16 = helper(2015),movecontact
trigger17 = stateno=1801 && movecontact   ;Torture Gun
value = 2100

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

;Death Saw C
[State -1, Death Saw C]
type = ChangeState
triggerall= AILevel<=0
;triggerall = roundstate = 2
triggerall = (command = "hcbf_Pc" && NumExplod(20)=0) || (command = "hcfb_Pc" && NumExplod(20)=1)
triggerall = statetype!=A && !WinKo
triggerall = numhelper(2310) = 0
triggerall = stateno != [2300,2399]
triggerall = (power >= 1000) || (var(50) > 0)
triggerall = stateno<2000
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
trigger7 = numhelper(1110)
trigger7 = helper(1110),movecontact
trigger8 = numhelper(1111)
trigger8 = helper(1111),movecontact
trigger9 = numhelper(1112)
trigger9 = helper(1112),movecontact
trigger10 = numhelper(1210)
trigger10 = helper(1210),movecontact
trigger11 = numhelper(1211)
trigger11 = helper(1211),movecontact
trigger12 = numhelper(1212)
trigger12 = helper(1212),movecontact
trigger13 = (stateno=1400 || stateno=1450) && anim=48 && movecontact
trigger14 = numhelper(1151)
trigger14 = helper(1151),movecontact
trigger15 = numhelper(1251)
trigger15 = helper(1251),movecontact
trigger16 = stateno=1801 && movecontact   ;Torture Gun
value = 2304

;Death Saw B
[State -1, Death Saw B]
type = ChangeState
triggerall= AILevel<=0
;triggerall = roundstate = 2
triggerall = (command = "hcbf_Pb" && NumExplod(20)=0) || (command = "hcfb_Pb" && NumExplod(20)=1)
triggerall = statetype!=A && !WinKo
triggerall = numhelper(2310) = 0
triggerall = stateno != [2300,2399]
triggerall = (power >= 1000) || (var(50) > 0)
triggerall = stateno<2000
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
trigger7 = numhelper(1110)
trigger7 = helper(1110),movecontact
trigger8 = numhelper(1111)
trigger8 = helper(1111),movecontact
trigger9 = numhelper(1112)
trigger9 = helper(1112),movecontact
trigger10 = numhelper(1210)
trigger10 = helper(1210),movecontact
trigger11 = numhelper(1211)
trigger11 = helper(1211),movecontact
trigger12 = numhelper(1212)
trigger12 = helper(1212),movecontact
trigger13 = (stateno=1400 || stateno=1450) && anim=48 && movecontact
trigger14 = numhelper(1151)
trigger14 = helper(1151),movecontact
trigger15 = numhelper(1251)
trigger15 = helper(1251),movecontact
trigger16 = stateno=1801 && movecontact   ;Torture Gun
value = 2302

;Death Saw A
[State -1, Death Saw A]
type = ChangeState
triggerall= AILevel<=0
;triggerall = roundstate = 2
triggerall = (command = "hcbf_Pa" && NumExplod(20)=0) || (command = "hcfb_Pa" && NumExplod(20)=1)
triggerall = statetype!=A && !WinKo
triggerall = numhelper(2310) = 0
triggerall = stateno != [2300,2399]
triggerall = (power >= 1000) || (var(50) > 0)
triggerall = stateno<2000
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
trigger7 = numhelper(1110)
trigger7 = helper(1110),movecontact
trigger8 = numhelper(1111)
trigger8 = helper(1111),movecontact
trigger9 = numhelper(1112)
trigger9 = helper(1112),movecontact
trigger10 = numhelper(1210)
trigger10 = helper(1210),movecontact
trigger11 = numhelper(1211)
trigger11 = helper(1211),movecontact
trigger12 = numhelper(1212)
trigger12 = helper(1212),movecontact
trigger13 = (stateno=1400 || stateno=1450) && anim=48 && movecontact
trigger14 = numhelper(1151)
trigger14 = helper(1151),movecontact
trigger15 = numhelper(1251)
trigger15 = helper(1251),movecontact
trigger16 = stateno=1801 && movecontact   ;Torture Gun
value = 2300

;Death Ball 25%
[State -1, Death Ball 25]
type = ChangeState
triggerall= AILevel<=0
;triggerall = roundstate = 2
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 >= 1000) || (var(50) > 0)
triggerall = stateno<2000
triggerall = numhelper(2205) = 0 && numhelper(2210) = 0
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
trigger7 = numhelper(1110)
trigger7 = helper(1110),movecontact
trigger8 = numhelper(1111)
trigger8 = helper(1111),movecontact
trigger9 = numhelper(1112)
trigger9 = helper(1112),movecontact
trigger10 = numhelper(1210)
trigger10 = helper(1210),movecontact
trigger11 = numhelper(1211)
trigger11 = helper(1211),movecontact
trigger12 = numhelper(1212)
trigger12 = helper(1212),movecontact
trigger13 = (stateno=1400 || stateno=1450) && anim=48 && movecontact
trigger14 = numhelper(1151)
trigger14 = helper(1151),movecontact
trigger15 = numhelper(1251)
trigger15 = helper(1251),movecontact
trigger16 = stateno=1801 && movecontact   ;Torture Gun
value = 2200

;Air Death Ball 25%
[State -1, Air Death Ball 25]
type = ChangeState
triggerall= AILevel<=0
;triggerall = roundstate = 2
triggerall = stateno != 2220
triggerall = command = "2qcbx" || command = "2qcby" || command = "2qcbz"
triggerall = (power >= 1000) || (var(50) > 0)
triggerall = stateno<2000
triggerall = numhelper(2205) = 0 && numhelper(2210) = 0
triggerall = statetype=A && !WinKo
triggerall = pos Y < -10
trigger1 = ctrl
trigger2 = (StateNo = 600) || (StateNo = 610) || (StateNo = 620) || (StateNo = 630) || (StateNo = 640) || (StateNo = 650) || (StateNo = 660)
trigger2 = movecontact
trigger3 = stateno = 1400 || stateno = 1450		;Air headbutt
trigger3 = movecontact
trigger4 = numhelper(1210) 
trigger4 = helper(1210),movecontact
trigger5 = numhelper(1211) 
trigger5 = helper(1211),movecontact
trigger6 = numhelper(1212) 
trigger6 = helper(1212),movecontact
trigger7 = numhelper(1251) 
trigger7 = helper(1251),movecontact
trigger8 = stateno=1566 && anim=1510
trigger9 = ((stateno = 1600) || (stateno = 1601) || (stateno = 1602)) && movecontact
value = 2220

;Death Beam
[State -1, Death Beam]
type = ChangeState
triggerall= AILevel<=0
;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(50) > 0)
triggerall = stateno<2000
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
trigger7 = numhelper(1110)
trigger7 = helper(1110),movecontact
trigger8 = numhelper(1111)
trigger8 = helper(1111),movecontact
trigger9 = numhelper(1112)
trigger9 = helper(1112),movecontact
trigger10 = numhelper(1210)
trigger10 = helper(1210),movecontact
trigger11 = numhelper(1211)
trigger11 = helper(1211),movecontact
trigger12 = numhelper(1212)
trigger12 = helper(1212),movecontact
trigger13 = (stateno=1400 || stateno=1450) && anim=48 && movecontact
trigger14 = numhelper(1151)
trigger14 = helper(1151),movecontact
trigger15 = numhelper(1251)
trigger15 = helper(1251),movecontact
trigger16 = stateno=1801 && movecontact   ;Torture Gun
value = 2000

;===========================================================================
; SPECIALS
;===========================================================================
;Counter
[State -1, Counter]
type = ChangeState
triggerall= AILevel<=0
; triggerall = var(50)=0 ;No sadism mode
;triggerall = roundstate = 2
triggerall =  ((command = "rdpa" || command = "rdpb" || command = "rdpc") && NumExplod(20)=0) || ((command = "dpa" || command = "dpb" || command = "dpc") && NumExplod(20)=1)
triggerall = statetype != A  && !WinKo
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
value = 1700

;EX Dancing Elbow
[State -1, EX Dancing Elbow]
type = ChangeState
triggerall= AILevel<=0
triggerall = var(50)=0 ;No sadism mode
;triggerall = roundstate = 2
triggerall = (command = "qcb2k" && NumExplod(20)=0) || (command = "qcf2k" && NumExplod(20)=1)
triggerall = statetype != A  && !WinKo && power>=500
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
value = 1650

;Dancing Elbow 
[State -1, Dancing Elbow]
type = ChangeState
triggerall= AILevel<=0
triggerall = var(50)=0 ;No sadism mode
;triggerall = roundstate = 2
triggerall = (((command = "qcba") || (command = "qcbb") || (command = "qcbc")) && NumExplod(20)=0) || (((command = "qcfa") || (command = "qcfb") || (command = "qcfc")) && NumExplod(20)=1)
triggerall = statetype != A  && !WinKo
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
value = ifelse((Command = "qcba"||Command = "qcfa"), 1600, ifelse((Command = "qcbb"||Command = "qcfb"), 1601, 1602))

; EX Head Charge (ground)
[State -1, EX Head Charge (ground)]
type = ChangeState
triggerall= AILevel<=0
triggerall = var(50)=0 ;No sadism mode  ;#MakeHeadbuttGreatAgain!!!
;triggerall = roundstate = 2
triggerall = (command = "qcf2p" && NumExplod(20)=0) || (command = "qcb2p" && NumExplod(20)=1)
triggerall = statetype != A  && !WinKo && (power>=500 || var(50)>0)
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
value = 1550

;Torture Gun
[State -1, Torture Gun]
type = ChangeState
triggerall= AILevel<=0
triggerall = var(50)>0 ;in sadism mode
;triggerall = roundstate = 2
triggerall = (((command = "qcfx") || (command = "qcfy") || (command = "qcfz")) && NumExplod(20)=0) || (((command = "qcbx") || (command = "qcby") || (command = "qcbz")) && NumExplod(20)=1)
;triggerall = (((command = "dpx") || (command = "dpy") || (command = "dpz")) && NumExplod(20)=0) || (((command = "rdpx") || (command = "rdpy") || (command = "rdpz")) && NumExplod(20)=1)
triggerall = statetype != A  && !WinKo && stateno!=1800
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
value = 1800

;Head Charge (ground)
[State -1, Head Charge (ground)]
type = ChangeState
triggerall= AILevel<=0
triggerall = var(50)=0 ;No sadism mode ;#MakeHeadbuttGreatAgain!!!
;triggerall = roundstate = 2
triggerall = (((command = "qcfx") || (command = "qcfy") || (command = "qcfz")) && NumExplod(20)=0) || (((command = "qcbx") || (command = "qcby") || (command = "qcbz")) && NumExplod(20)=1)
triggerall = statetype != A  && !WinKo
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
value = 1500

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

;Ki Blast (Light) 1
[State -1, Ki Blast (Light)]
type = null;ChangeState
triggerall= AILevel<=0
;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)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
value = 1000

;Ki Blast (Medium) 1
[State -1, Ki Blast (Medium)]
type = null;ChangeState
triggerall= AILevel<=0
;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)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
value = 1003

;Ki Blast (Hard) 1
[State -1, Ki Blast (Hard)]
type = null;ChangeState
triggerall= AILevel<=0
;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)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
value = 1006

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

;EX Air Headbutt
[State -1, EX Air Headbutt]
type = ChangeState
triggerall= AILevel<=0
triggerall = var(50)=0 ;No sadism mode ;#MakeHeadbuttGreatAgain!!!
;triggerall = roundstate = 2
triggerall = stateno != 1450 && (power>=500 || var(50)>0)
;triggerall = ((command = "qcf2p") && NumExplod(20)=0) || ((command = "qcb2p") && NumExplod(20)=1)
triggerall = command = "qcf2p"
triggerall = statetype=A && !WinKo
trigger1 = ctrl
trigger2 = (StateNo = 600) || (StateNo = 610) || (StateNo = 620) || (StateNo = 630) || (StateNo = 640) || (StateNo = 650)
trigger2 = movecontact
trigger3 = stateno=1566 && anim=1510
value = 1450

;Air Headbutt
[State -1, Air Headbutt]
type = ChangeState
triggerall= AILevel<=0
triggerall = var(50)=0 ;No sadism mode ;#MakeHeadbuttGreatAgain!!!
;triggerall = roundstate = 2
triggerall = stateno != 1400
;triggerall = (((command = "qcfx") || (command = "qcfy") || (command = "qcfz")) && NumExplod(20)=0) || (((command = "qcbx") || (command = "qcby") || (command = "qcbz")) && NumExplod(20)=1)
triggerall = (command = "qcfx") || (command = "qcfy") || (command = "qcfz")
triggerall = var(19):=((command = "qcfx")||(command = "qcbx")) + 2*((command = "qcfy")||(command = "qcby")) + 3*((command = "qcfz")||(command = "qcbz"))
triggerall = statetype=A && !WinKo
trigger1 = ctrl
trigger2 = (StateNo = 600) || (StateNo = 610) || (StateNo = 620) || (StateNo = 630) || (StateNo = 640) || (StateNo = 650)
trigger2 = movecontact
trigger3 = stateno=1566 && anim=1510
value = 1400

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

;EX Death Wave
[State -1, EX Death Wave]
type = ChangeState
triggerall= AILevel<=0
;triggerall = roundstate = 2
triggerall = (command = "qcb2p" && NumExplod(20)=0) || (command = "qcf2p" && NumExplod(20)=1)
triggerall = statetype != A  && !WinKo
triggerall = power >= 500
;triggerall = !numhelper(1110) && !numhelper(1111) && !numhelper(1112) && !numhelper(1151)
;triggerall = !numhelper(1210) && !numhelper(1211) && !numhelper(1212) && !numhelper(1251)
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
;trigger7 = stateno=300 && animelemtime(10)>=2 && movecontact		;Superior Dash
value = 1150

;Death Wave (Light)
[State -1, Death Wave (Light)]
type = ChangeState
triggerall= AILevel<=0
;triggerall = roundstate = 2
triggerall = (command = "qcbx" && NumExplod(20)=0) || (command = "qcfx" && NumExplod(20)=1)
triggerall = statetype != A  && !WinKo
;triggerall = !numhelper(1110) && !numhelper(1111) && !numhelper(1112) && !numhelper(1151)
;triggerall = !numhelper(1210) && !numhelper(1211) && !numhelper(1212) && !numhelper(1251)
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
value = 1100

;Death Wave (Medium)
[State -1, Death Wave (Medium)]
type = ChangeState
triggerall= AILevel<=0
;triggerall = roundstate = 2
triggerall = (command = "qcby" && NumExplod(20)=0) || (command = "qcfy" && NumExplod(20)=1)
triggerall = statetype != A  && !WinKo
;triggerall = !numhelper(1110) && !numhelper(1111) && !numhelper(1112) && !numhelper(1151)
;triggerall = !numhelper(1210) && !numhelper(1211) && !numhelper(1212) && !numhelper(1251)
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
value = 1101

;Death Wave (Hard)
[State -1, Death Wave (Hard)]
type = ChangeState
triggerall= AILevel<=0
;triggerall = roundstate = 2
triggerall = (command = "qcbz" && NumExplod(20)=0) || (command = "qcfz" && NumExplod(20)=1)
triggerall = statetype != A  && !WinKo
;triggerall = !numhelper(1110) && !numhelper(1111) && !numhelper(1112) && !numhelper(1151)
;triggerall = !numhelper(1210) && !numhelper(1211) && !numhelper(1212) && !numhelper(1251)
trigger1 = ctrl
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact
trigger6 = stateno = 100 || stateno = 101
value = 1102

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

;EX Air Death Wave
[State -1, EX Air Death Wave]
type = ChangeState
triggerall= AILevel<=0
;triggerall = roundstate = 2
triggerall = command = "qcb2p"
triggerall = statetype=A && !WinKo
triggerall = power >= 500
;triggerall = !numhelper(1110) && !numhelper(1111) && !numhelper(1112) && !numhelper(1151)
;triggerall = !numhelper(1210) && !numhelper(1211) && !numhelper(1212) && !numhelper(1251)
trigger1 = ctrl
trigger2 = (StateNo = 600) || (StateNo = 610) || (StateNo = 620) || (StateNo = 630) || (StateNo = 640) || (StateNo = 650)
trigger2 = movecontact
trigger3 = stateno=1566 && anim=1510
value = 1250

;Air Death Wave (Light)
[State -1, Air Death Wave (Light)]
type = ChangeState
triggerall= AILevel<=0
;triggerall = roundstate = 2
triggerall = command = "qcbx"
triggerall = statetype=A && !WinKo
;triggerall = !numhelper(1110) && !numhelper(1111) && !numhelper(1112) && !numhelper(1151)
;triggerall = !numhelper(1210) && !numhelper(1211) && !numhelper(1212) && !numhelper(1251)
trigger1 = ctrl
trigger2 = (StateNo = 600) || (StateNo = 610) || (StateNo = 620) || (StateNo = 630) || (StateNo = 640) || (StateNo = 650)
trigger2 = movecontact
trigger3 = stateno=1566 && anim=1510
value = 1200

;Air Death Wave (Medium)
[State -1, Air Death Wave (Medium)]
type = ChangeState
triggerall= AILevel<=0
;triggerall = roundstate = 2
triggerall = command = "qcby"
triggerall = statetype=A && !WinKo
;triggerall = !numhelper(1110) && !numhelper(1111) && !numhelper(1112) && !numhelper(1151)
;triggerall = !numhelper(1210) && !numhelper(1211) && !numhelper(1212) && !numhelper(1251)
trigger1 = ctrl
trigger2 = (StateNo = 600) || (StateNo = 610) || (StateNo = 620) || (StateNo = 630) || (StateNo = 640) || (StateNo = 650)
trigger2 = movecontact
trigger3 = stateno=1566 && anim=1510
value = 1201

;Air Death Wave (Strong)
[State -1, Air Death Wave (Strong)]
type = ChangeState
triggerall= AILevel<=0
;triggerall = roundstate = 2
triggerall = command = "qcbz"
triggerall = statetype=A && !WinKo
;triggerall = !numhelper(1110) && !numhelper(1111) && !numhelper(1112) && !numhelper(1151)
;triggerall = !numhelper(1210) && !numhelper(1211) && !numhelper(1212) && !numhelper(1251)
trigger1 = ctrl
trigger2 = (StateNo = 600) || (StateNo = 610) || (StateNo = 620) || (StateNo = 630) || (StateNo = 640) || (StateNo = 650)
trigger2 = movecontact
trigger3 = stateno=1566 && anim=1510
value = 1202

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

; Focus Smash
[State -1, Slashing Chop]
type = ChangeState
triggerall= AILevel<=0
triggerall = roundstate = 2
triggerall = stateno !=[1300,1302]
triggerall = stateno != 106
triggerall = command = "z" && command = "c"
trigger1 = statetype = S
trigger1 = ctrl
value = 1300

;Zero Counter
[State -1, zero counter]
type = changestate
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
trigger1 = AILevel<=0
trigger1 = stateno=154
trigger1 = command="f2k" || command="f2p"
trigger1 = roundstate=2 && power>=1000 && statetype=A
value = 760

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

;Dive Kick
[State -1, Dive Kick]
type = changestate
triggerall = AILevel<=0
;triggerall = roundstate = 2
triggerall= command = "holddown" && command = "b"
triggerall= vel x > 0 && (vel y = [-3,3])
triggerall = statetype=A && !WinKo
trigger1 = ctrl
;trigger1 = pos Y < -50
trigger2 = (stateno = 600) || (stateno = 610) || (stateno = 630) || (stateno = 640)
trigger2 = movecontact
value = 660

; Superior Dash
[State -1, Superior Dash]
type = changestate
triggerall = AILevel<=0
;triggerall = roundstate = 2
triggerall = statetype!=A
trigger1 = stateno = 100 || stateno = 101
trigger1 = command="c" && command!="holddown" && command!="holdback"
value = 300

;Power Charge
[State -1]
type = ChangeState
triggerall = AILevel<=0
triggerall = roundstate = 2
triggerall = StateType != A
triggerall = Power < 3000
triggerall = stateno != 900
triggerall = Ctrl
trigger1 = command = "hold_b" && command = "hold_y"
value = 900

; Back Throw
[State -1, throw1]
type = changestate
triggerall= AILevel<=0
triggerall = roundstate=2 && ctrl && statetype=S && stateno!=100
trigger1 = command="xa" && command="holdback"
value = 800

; Forward Throw
[State -1, throw2]
type = changestate
triggerall= AILevel<=0
triggerall = roundstate=2 && ctrl && statetype=S && stateno!=100
trigger1 = command="xa" && command="holdfwd"
trigger2 = command="xa" && command!="holdfwd" && command!="holdback"
value = 820


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

; Stand Light Punch
[State -1, Stand Light Punch]
type = ChangeState
triggerall= AILevel<=0
;triggerall = roundstate = 2
triggerall = 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
;triggerall = roundstate = 2
triggerall = 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)
value = 210

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

; Stand Light Kick
[State -1, Stand Light Kick]
type = ChangeState
triggerall= AILevel<=0
;triggerall = roundstate = 2
triggerall = 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
;triggerall = roundstate = 2
triggerall = 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)
value = 240

; Axe Kick
[State -1, Standing Axe Strong Kick]
type = ChangeState
triggerall= AILevel<=0
;triggerall = roundstate = 2
triggerall = command = "c"
triggerall = command = "holdfwd" && command != "holddown"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = StateType != A
trigger2 = (stateno = 200) || (stateno = 230) || (stateno = 210) || (stateno = 240)
trigger2 = movecontact
trigger3 = stateno = 100 || stateno = 101
trigger4 = StateType != A && movecontact
trigger4 = (stateno = 400) || (stateno = 430) || (stateno = 410) || (stateno = 440)
value = 255

; Standing Strong Kick
[State -1, Standing Strong Kick]
type = ChangeState
triggerall= AILevel<=0
;triggerall = roundstate = 2
triggerall = command = "c"
triggerall = command != "holddown"
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = StateType != A
trigger2 = (stateno = 200) || (stateno = 230) || (stateno = 210) || (stateno = 240)
trigger2 = movecontact
trigger3 = stateno = 100 || stateno = 101
trigger4 = StateType != A && movecontact
trigger4 = (stateno = 400) || (stateno = 430) || (stateno = 410) || (stateno = 440)
value = 250

; Crouching Light Punch
[State -1, Crouching Light Punch]
type = ChangeState
triggerall= AILevel<=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
;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
value = 410

; Crouching Strong Punch
[State -1, Close Uppercut]
type = ChangeState
triggerall= AILevel<=0
;triggerall = roundstate = 2
triggerall = command = "z" && 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)
value = 420

; Crouching Light Kick
[State -1, Crouching Light Kick]
type = ChangeState
triggerall= AILevel<=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
;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
value = 440

; Crouching Strong Kick (Launcher)
[State -1, Crouching Strong Kick]
type = ChangeState
triggerall= AILevel<=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)
value = 450

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

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

;Jump Light Kick
[State -1, Jump Light Kick]
type = ChangeState
triggerall= AILevel<=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
;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

;Jump Strong Kick
[State -1, Jump Strong Kick]
type = ChangeState
triggerall= AILevel<=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 = 640)
trigger2 = MoveContact
value = 650

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

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

;Teleport to ground (sadism mode)
[State -1, teleport to ground]
type = changestate
triggerall = AILevel<=0
triggerall = var(50)>0 ;in sadism mode
;triggerall = roundstate = 2
triggerall= command = "DD"
triggerall= (vel y = [-3,3]) && stateno!=2690
triggerall = statetype=A && !WinKo
trigger1 = ctrl
trigger1 = pos Y < -60
value = 2690

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

;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
triggerall = pos Y < -20
triggerall = stateno != 105
trigger1 = (command = "BB") && (statetype = A) && (ctrl)

; Run Fwd
[State -1, Run Fwd]
type = ChangeState
triggerall= AILevel<=0
triggerall = var(50) = 0 ;no Sadism mode
;triggerall = roundstate = 2
trigger1 = statetype = S && ctrl
trigger1 = roundstate=2 && (stateno!=[100,106])
trigger1 = (command = "FF" && NumExplod(20)=0) || (command = "BB" && NumExplod(20)=1)
value = 100

; Teleport Fwd (or run)
[State -1, RTeleportFwd]
type = ChangeState
triggerall= AILevel<=0
triggerall = var(50) > 0 ;Sadism mode
;triggerall = roundstate = 2
trigger1 = statetype = S && ctrl
trigger1 = roundstate=2 && (stateno!=[100,106])
trigger1 = (command = "FF" && NumExplod(20)=0) || (command = "BB" && NumExplod(20)=1)
value = ifelse(P2bodydist X <20,102,100)

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

; Teleport Back
[State -1, Teleport Back]
type = ChangeState
triggerall= AILevel<=0
triggerall = var(50) > 0 ;Sadism mode
;triggerall = roundstate = 2
trigger1 = statetype = S && ctrl
trigger1 = stateno != 107
trigger1 = (command = "BB" && NumExplod(20)=0) || (command = "FF" && NumExplod(20)=1)
value = 107

; Super Jump
;This state executes only after performing the air launcher
[State -1, Jump Launcher]
type = ChangeState
value = 10230
triggerall= AILevel<=0
triggerall = var(28) = 0
;triggerall = roundstate = 2
triggerall = command = "holdup"
triggerall = stateno < 2000   ;not in a super state
trigger1 = (stateno = 450) && animelemtime(13)>0 && MoveHit
trigger2 = var(26)=[1,20] ;EX Wave timer
trigger2 = numhelper(1151) && statetype!=A && stateno!=10230
trigger2 = (helper(1151),movehit)>10 && (helper(1151),movehit)<40
trigger3 = var(26)=[1,20] ;EX Wave timer
trigger3 = numhelper(1251) && stateno!=10230
trigger3 = (helper(1251),movehit)>10 && (helper(1251),movehit)<15
trigger3 = (helper(1251),stateno)=1151 || (helper(1251),stateno)=1115

;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

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

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

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

;____________________________________________________________________________
; AI
;____________________________________________________________________________

;===========================================================================
; SYSTEM AI
;===========================================================================
[State -1, AI ctrlset]
type = null ;CtrlSet  ;Freeza able to cancel move during SP and go back to state 0... WTF
triggerall = AILevel>0
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*(AIlevel ** 2 / 64.0)),(50*(AIlevel ** 2 / 64.0)))
trigger2= (p2bodydist x=[0,80]) && backedgebodydist>=80
trigger2= enemynear,stateno=5120 && enemynear,animtime=-3 && random < 500*(AIlevel ** 2 / 64.0)

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

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

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

[State -1, AI Guard]
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 = 450) && MoveHit ;&& random<800
trigger2 = var(26)=[1,20] ;EX Wave timer
trigger2 = numhelper(1151) && statetype!=A && stateno!=10230
trigger2 = (helper(1151),movehit)>10 && (helper(1151),movehit)<40
trigger2 = random < 150*(AIlevel ** 2 / 64.0)
trigger3 = var(26)=[1,20] ;EX Wave timer
trigger3 = numhelper(1251) && stateno!=10230
trigger3 = (helper(1251),movehit)>10 && (helper(1251),movehit)<15
trigger3 = (helper(1251),stateno)=1151 || (helper(1251),stateno)=1115
trigger3 = random < 250*(AIlevel ** 2 / 64.0)

[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 = 450
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(32)
triggerall= power<const(data.power) && enemynear,Movetype!=A && !(enemynear,ctrl)
triggerall=  power < const(data.power) && power < powermax
triggerall= !inguarddist && random<900 && p2bodydist x>=120;*((powermax-power)/powermax) ;random < 300*(AIlevel ** 2 / 64.0)
triggerall = stateno != [900,901]
triggerall= ctrl
trigger1=(enemynear,Movetype=H||enemynear,statetype=L)
trigger2=enemynear,vel x<0
trigger3=enemynear,stateno=[120,155]
trigger4=enemynear,Movetype=I

[State -1, AI Throw]
type = ChangeState
value = Ifelse(random<=500,800,820)
triggerall = AILevel>0 && !var(32)
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)

; AI Stand Light Punch
[State -1, AI Stand Light Punch]
type = ChangeState
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 < 600*(AIlevel ** 2 / 64.0)
value = 200


; AI Stand Medium Punch
[State -1, AI Stand Medium Punch]
type = ChangeState
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) || (stateno = 230) || (stateno = 400) || (stateno = 430))&& movehit
trigger2 = random < 600*(AIlevel ** 2 / 64.0)
trigger3 = (stateno = [100,101]) && random < 250*(AIlevel ** 2 / 64.0)
value = 210

; AI Stand Strong Punch
[State -1, AI Stand Strong Punch]
type = ChangeState
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 = 200) || (stateno = 230) || (stateno = 210) || (stateno = 240))&& movehit
trigger2 = random < 600*(AIlevel ** 2 / 64.0)
trigger3 = ((stateno = 400) || (stateno = 430) || (stateno = 410) || (stateno = 440))&& movehit
trigger3 = random < 400*(AIlevel ** 2 / 64.0)
value = 220

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

; AI Standing Medium Kick
[State -1, AI Standing Medium Kick]
type = ChangeState
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 = 200) || (stateno = 230) || (stateno = 400) || (stateno = 430))&& movehit
trigger2 = random < 550*(AIlevel ** 2 / 64.0)
value = 240

; AI Axe Kick
[State -1, AI Standing Axe Strong Kick]
type = ChangeState
triggerall = AILevel>0&& numenemy && roundstate=2 && StateType != A && P2statetype != C
triggerall = (p2bodydist x = [0,30]) && (p2bodydist y = [ -70, 50]) && p2statetype != L
trigger1 = ctrl && random < 250*(AIlevel ** 2 / 64.0)
trigger2 = ((stateno = 200) || (stateno = 230) || (stateno = 210) || (stateno = 240))&& movehit
trigger2 = random < 200*(AIlevel ** 2 / 64.0)
trigger3 = ((stateno = 400) || (stateno = 430) || (stateno = 410) || (stateno = 440))&& movehit
trigger3 = random < 400*(AIlevel ** 2 / 64.0)
trigger4 = stateno = 100 || stateno = 101
value = 255


; AI Standing Strong Kick
[State -1, AI Standing Strong Kick]
type = ChangeState
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 = 200) || (stateno = 230) || (stateno = 210) || (stateno = 240))&& movehit
trigger2 = random < 200*(AIlevel ** 2 / 64.0)
trigger3 = ((stateno = 400) || (stateno = 430) || (stateno = 410) || (stateno = 440))&& movehit
trigger3 = random < 400*(AIlevel ** 2 / 64.0)
trigger4 = stateno = 100 || stateno = 101
value = 250

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

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

; AI Crouching Strong Punch
[State -1, AI Close Uppercut]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType = C
triggerall = (p2bodydist x = [0, 35]) &&(p2bodydist y = [-90,5]) && P2statetype != L
trigger1 = ((ctrl)|| (stateno = 100) ||(stateno = 101)) && random < 100*(AIlevel ** 2 / 64.0)
trigger2 = ((StateNo = 400) || (stateno = 410) || (stateno = 430) || (stateno = 440))&& movehit
trigger2 = random < 800*(AIlevel ** 2 / 64.0)
trigger3 = ((StateNo = 200) || (stateno = 210) || (stateno = 230) || (stateno = 240))&& movehit
trigger3 = random < 400*(AIlevel ** 2 / 64.0)
value = 420

; AI Crouching Light Kick
[State -1, AI Crouching Light Kick]
type = ChangeState
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
trigger3 = ((StateNo = 200) || (stateno = 230))&& movehit
trigger3 = random < 400*(AIlevel ** 2 / 64.0)
value = 430

; AI Crouching Medium Kick
[State -1, AI Crouching Medium Kick]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType = C
triggerall = (p2bodydist x = [20, 52]) &&(p2bodydist y = [-50,25]) && P2statetype != A
trigger1 = ((ctrl)|| (stateno = 100) ||(stateno = 101)) && random < 100*(AIlevel ** 2 / 64.0) && P2statetype != L
trigger2 = ((StateNo = 400) || (stateno = 200) || (stateno = 230) || (stateno = 430))&& 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
value = 440

; AI Crouching Strong Kick (Launcher)
[State -1, AI Crouching Strong Kick]
type = ChangeState
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)|| (stateno = 100) ||(stateno = 101)) && random < 25*(AIlevel ** 2 / 64.0) && P2statetype != L
trigger2 = ((StateNo = 400) || (stateno = 410) || (stateno = 430) || (stateno = 440))&& movehit
trigger2 = random < 350*(AIlevel ** 2 / 64.0)
trigger3 = ((StateNo = 200) || (stateno = 210) || (stateno = 230) || (stateno = 240))&& movehit
trigger3 = random < 200*(AIlevel ** 2 / 64.0)
value = 450

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

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

;AI Jump Strong Punch (two fists)
[State -1, AI Jump Strong Punch]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && statetype = A && (p2bodydist y = [ -70, -30]) && p2statetype != L
trigger1 = ctrl && random < 100*(AIlevel ** 2 / 64.0) && (p2bodydist x = [10, 60])
trigger2 = ((StateNo = 600) || (StateNo = 610))&& movehit && random < 300*(AIlevel ** 2 / 64.0)
trigger3 = ((StateNo = 630) || (StateNo = 640))&& movehit && random < 350*(AIlevel ** 2 / 64.0)
value = 620

;AI Jump Light Kick
[State -1, AI Jump Light Kick]
type = ChangeState
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)
value = 630

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

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

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

; AI Death Charge (Flaming Headbutt)
[State -1, AI Death Charge]
type = ChangeState
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype != A && stateno != 2680 && stateno<2100
triggerall = (p2bodydist x =[5,175]) && (p2bodydist y =[-70,5])
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 = var(50)>0
trigger1 = ctrl && random < 300*(AIlevel ** 2 / 64.0)
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger6 = (stateno = 100 || stateno = 101) && movecontact && random < 100*(AIlevel ** 2 / 64.0)
trigger7 = numhelper(1110)
trigger7 = helper(1110),movecontact
trigger7 = random < 100*(AIlevel ** 2 / 64.0)
trigger8 = numhelper(1111)
trigger8 = helper(1111),movecontact
trigger8 = random < 100*(AIlevel ** 2 / 64.0)
trigger9 = numhelper(1112)
trigger9 = helper(1112),movecontact
trigger9 = random < 100*(AIlevel ** 2 / 64.0)
trigger10 = numhelper(1210)
trigger10 = helper(1210),movecontact
trigger10 = random < 100*(AIlevel ** 2 / 64.0)
trigger11 = numhelper(1211)
trigger11 = helper(1211),movecontact
trigger11 = random < 100*(AIlevel ** 2 / 64.0)
trigger12 = numhelper(1212)
trigger12 = helper(1212),movecontact
trigger12 = random < 100*(AIlevel ** 2 / 64.0)
trigger13 = (stateno=1400 || stateno=1450) && anim=48 && movecontact && random < 100*(AIlevel ** 2 / 64.0)
trigger14 = numhelper(1151)
trigger14 = helper(1151),movecontact
trigger14 = random < 100*(AIlevel ** 2 / 64.0)
trigger15 = numhelper(1251)
trigger15 = helper(1251),movecontact
trigger15 = random < 100*(AIlevel ** 2 / 64.0)
trigger16 = stateno=1801 && movecontact && random < 100*(AIlevel ** 2 / 64.0) ;Torture Gun
value = 2680

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


;AI Tail Press Nightmare Lv3
[State -1, AI Tail Press Nightmare Lv3]
type = ChangeState
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype != A && stateno != 2500 && stateno<2000
triggerall = (power >= 3000) || (power>=2000 && var(50)>0)
triggerall= (enemy,stateno!=[5100,5120])&&(enemynear,statetype!=L) && (p2bodydist x<=150) && (p2bodydist y=[-90,5]) && (enemynear,vel y=0)
trigger1 = ctrl && random < 300*(AIlevel ** 2 / 64.0)
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger6 = (stateno = 100 || stateno = 101) && movecontact && random < 100*(AIlevel ** 2 / 64.0)
trigger7 = numhelper(1110)
trigger7 = helper(1110),movecontact
trigger7 = random < 100*(AIlevel ** 2 / 64.0)
trigger8 = numhelper(1111)
trigger8 = helper(1111),movecontact
trigger8 = random < 100*(AIlevel ** 2 / 64.0)
trigger9 = numhelper(1112)
trigger9 = helper(1112),movecontact
trigger9 = random < 100*(AIlevel ** 2 / 64.0)
trigger10 = numhelper(1210)
trigger10 = helper(1210),movecontact
trigger10 = random < 100*(AIlevel ** 2 / 64.0)
trigger11 = numhelper(1211)
trigger11 = helper(1211),movecontact
trigger11 = random < 100*(AIlevel ** 2 / 64.0)
trigger12 = numhelper(1212)
trigger12 = helper(1212),movecontact
trigger12 = random < 100*(AIlevel ** 2 / 64.0)
trigger13 = (stateno=1400 || stateno=1450) && anim=48 && movecontact && random < 100*(AIlevel ** 2 / 64.0)
trigger14 = numhelper(1151)
trigger14 = helper(1151),movecontact
trigger14 = random < 100*(AIlevel ** 2 / 64.0)
trigger15 = numhelper(1251)
trigger15 = helper(1251),movecontact
trigger15 = random < 100*(AIlevel ** 2 / 64.0)
trigger16 = stateno=1801 && movecontact && random < 100*(AIlevel ** 2 / 64.0) ;Torture Gun
value = 2500

;AI Death Ball Lv3 AIR
[State -1, AI Death Ball Lv3 AIR]
type = ChangeState
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype = A   && (power >= 3000) && stateno<2000
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))
triggerall = stateno != 2470
triggerall = numhelper(2205) = 0 && numhelper(2210) = 0
triggerall = pos Y < -10
trigger1 = ctrl && random < 300*(AIlevel ** 2 / 64.0)
trigger2 = ((StateNo = 600) || (StateNo = 610) || (StateNo = 620) || (StateNo = 630) || (StateNo = 640) || (StateNo = 650) || (StateNo = 660)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger3 = (stateno = 1400 || stateno = 1450) && movecontact && random < 100*(AIlevel ** 2 / 64.0)		;Air headbutt
trigger4 = numhelper(1210)
trigger4 = helper(1210),movecontact
trigger4 = random < 100*(AIlevel ** 2 / 64.0)
trigger5 = numhelper(1211)
trigger5 = helper(1211),movecontact
trigger5 = random < 100*(AIlevel ** 2 / 64.0)
trigger6 = numhelper(1212)
trigger6 = helper(1212),movecontact
trigger6 = random < 100*(AIlevel ** 2 / 64.0)
trigger7 = numhelper(1251)
trigger7 = helper(1251),movecontact
trigger7 = random < 100*(AIlevel ** 2 / 64.0)
trigger8 = stateno=1566 && anim=1510 && random < 100*(AIlevel ** 2 / 64.0)
trigger9 = ((stateno = 1600) || (stateno = 1601) || (stateno = 1602)) && movecontact && random < 100*(AIlevel ** 2 / 64.0) ;Torture Gun
value = 2470

;AI Death Ball Lv3
[State -1, AI Death Ball Lv3]
type = ChangeState
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype != A && (power >= 3000) && stateno<2000
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(2205) = 0 && numhelper(2210) = 0
trigger1 = ctrl && random < 300*(AIlevel ** 2 / 64.0)
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger6 = (stateno = 100 || stateno = 101) && movecontact && random < 100*(AIlevel ** 2 / 64.0)
trigger7 = numhelper(1110)
trigger7 = helper(1110),movecontact
trigger7 = random < 100*(AIlevel ** 2 / 64.0)
trigger8 = numhelper(1111)
trigger8 = helper(1111),movecontact
trigger8 = random < 100*(AIlevel ** 2 / 64.0)
trigger9 = numhelper(1112)
trigger9 = helper(1112),movecontact
trigger9 = random < 100*(AIlevel ** 2 / 64.0)
trigger10 = numhelper(1210)
trigger10 = helper(1210),movecontact
trigger10 = random < 100*(AIlevel ** 2 / 64.0)
trigger11 = numhelper(1211)
trigger11 = helper(1211),movecontact
trigger11 = random < 100*(AIlevel ** 2 / 64.0)
trigger12 = numhelper(1212)
trigger12 = helper(1212),movecontact
trigger12 = random < 100*(AIlevel ** 2 / 64.0)
trigger13 = (stateno=1400 || stateno=1450) && anim=48 && movecontact && random < 100*(AIlevel ** 2 / 64.0)
trigger14 = numhelper(1151)
trigger14 = helper(1151),movecontact
trigger14 = random < 100*(AIlevel ** 2 / 64.0)
trigger15 = numhelper(1251)
trigger15 = helper(1251),movecontact
trigger15 = random < 100*(AIlevel ** 2 / 64.0)
trigger16 = stateno=1801 && movecontact && random < 100*(AIlevel ** 2 / 64.0) ;Torture Gun
value = 2450

;AI Death Ball Lv2 AIR
[State -1, AI Death Ball Lv2 AIR]
type = ChangeState
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype = A   && (power >= 2000) && stateno<2000
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))
triggerall = stateno != 2420
triggerall = numhelper(2205) = 0 && numhelper(2210) = 0
triggerall = pos Y < -10
trigger1 = ctrl && random < 300*(AIlevel ** 2 / 64.0)
trigger2 = ((StateNo = 600) || (StateNo = 610) || (StateNo = 620) || (StateNo = 630) || (StateNo = 640) || (StateNo = 650) || (StateNo = 660)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger3 = (stateno = 1400 || stateno = 1450) && movecontact && random < 100*(AIlevel ** 2 / 64.0)		;Air headbutt
trigger4 = numhelper(1210)
trigger4 = helper(1210),movecontact
trigger4 = random < 100*(AIlevel ** 2 / 64.0)
trigger5 = numhelper(1211)
trigger5 = helper(1211),movecontact
trigger5 = random < 100*(AIlevel ** 2 / 64.0)
trigger6 = numhelper(1212)
trigger6 = helper(1212),movecontact
trigger6 = random < 100*(AIlevel ** 2 / 64.0)
trigger7 = numhelper(1251)
trigger7 = helper(1251),movecontact
trigger7 = random < 100*(AIlevel ** 2 / 64.0)
trigger8 = stateno=1566 && anim=1510 && random < 100*(AIlevel ** 2 / 64.0)
trigger9 = ((stateno = 1600) || (stateno = 1601) || (stateno = 1602)) && movecontact && random < 100*(AIlevel ** 2 / 64.0) ;Torture Gun
value = 2420

;AI Death Ball Lv2
[State -1, AI Death Ball Lv2]
type = ChangeState
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype != A   && (power >= 2000) && stateno<2000
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(2205) = 0 && numhelper(2210) = 0
trigger1 = ctrl && random < 300*(AIlevel ** 2 / 64.0)
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger6 = (stateno = 100 || stateno = 101) && movecontact && random < 100*(AIlevel ** 2 / 64.0)
trigger7 = numhelper(1110)
trigger7 = helper(1110),movecontact
trigger7 = random < 100*(AIlevel ** 2 / 64.0)
trigger8 = numhelper(1111)
trigger8 = helper(1111),movecontact
trigger8 = random < 100*(AIlevel ** 2 / 64.0)
trigger9 = numhelper(1112)
trigger9 = helper(1112),movecontact
trigger9 = random < 100*(AIlevel ** 2 / 64.0)
trigger10 = numhelper(1210)
trigger10 = helper(1210),movecontact
trigger10 = random < 100*(AIlevel ** 2 / 64.0)
trigger11 = numhelper(1211)
trigger11 = helper(1211),movecontact
trigger11 = random < 100*(AIlevel ** 2 / 64.0)
trigger12 = numhelper(1212)
trigger12 = helper(1212),movecontact
trigger12 = random < 100*(AIlevel ** 2 / 64.0)
trigger13 = (stateno=1400 || stateno=1450) && anim=48 && movecontact && random < 100*(AIlevel ** 2 / 64.0)
trigger14 = numhelper(1151)
trigger14 = helper(1151),movecontact
trigger14 = random < 100*(AIlevel ** 2 / 64.0)
trigger15 = numhelper(1251)
trigger15 = helper(1251),movecontact
trigger15 = random < 100*(AIlevel ** 2 / 64.0)
trigger16 = stateno=1801 && movecontact && random < 100*(AIlevel ** 2 / 64.0) ;Torture Gun
value = 2400

;AI Death Beam Lv2
[State -1, AI Death Beam Lv2]
type = ChangeState
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype != A   && (power >= 2000) && stateno<2000
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))
trigger1 = ctrl && random < 300*(AIlevel ** 2 / 64.0)
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger6 = (stateno = 100 || stateno = 101) && movecontact && random < 100*(AIlevel ** 2 / 64.0)
trigger7 = numhelper(1110)
trigger7 = helper(1110),movecontact
trigger7 = random < 100*(AIlevel ** 2 / 64.0)
trigger8 = numhelper(1111)
trigger8 = helper(1111),movecontact
trigger8 = random < 100*(AIlevel ** 2 / 64.0)
trigger9 = numhelper(1112)
trigger9 = helper(1112),movecontact
trigger9 = random < 100*(AIlevel ** 2 / 64.0)
trigger10 = numhelper(1210)
trigger10 = helper(1210),movecontact
trigger10 = random < 100*(AIlevel ** 2 / 64.0)
trigger11 = numhelper(1211)
trigger11 = helper(1211),movecontact
trigger11 = random < 100*(AIlevel ** 2 / 64.0)
trigger12 = numhelper(1212)
trigger12 = helper(1212),movecontact
trigger12 = random < 100*(AIlevel ** 2 / 64.0)
trigger13 = (stateno=1400 || stateno=1450) && anim=48 && movecontact && random < 100*(AIlevel ** 2 / 64.0)
;trigger14 = numhelper(1151)
;trigger14 = helper(1151),movecontact
;trigger14 = random < 100*(AIlevel ** 2 / 64.0)
trigger14 = numhelper(1251)
trigger14 = helper(1251),movecontact
trigger14 = random < 100*(AIlevel ** 2 / 64.0)
trigger15 = stateno=1801 && movecontact && random < 100*(AIlevel ** 2 / 64.0) ;Torture Gun
value = 2100


;===========================================================================
; SPECIALS
;===========================================================================
;AI Counter
[State -1, AI Counter]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A
triggerall =(p2bodydist x=[0,50])&& P2statetype != A
triggerall = stateno!=[1700,1701]
triggerall = prevstateno!=[1700,1701]
triggerall =(enemynear,Movetype!=H||enemynear,statetype!=L)
trigger1 = ctrl && random < 500*(AIlevel ** 2 / 64.0)
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact && random < 200*(AIlevel ** 2 / 64.0)
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact && random < 200*(AIlevel ** 2 / 64.0)
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact && random < 200*(AIlevel ** 2 / 64.0)
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact && random < 200*(AIlevel ** 2 / 64.0)
trigger6 = (stateno = 100 || stateno = 101) && random < 200*(AIlevel ** 2 / 64.0)
trigger7 = ctrl && (enemynear,movetype = A) && (enemynear,ctrl=0) && random < 100*(AIlevel ** 2 / 64.0)
value = 1700

;AI (EX) Dancing Elbow
[State -1, AI (EX) Dancing Elbow]
type = ChangeState
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)
triggerall = var(50)=0 ;No sadism mode
triggerall = stateno!=[1600,1665]
trigger1 = ctrl && random < 150*(AIlevel ** 2 / 64.0)
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact && random < 100*(AIlevel ** 2 / 64.0)
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact && random < 100*(AIlevel ** 2 / 64.0)
trigger6 = (stateno = 100 || stateno = 101)&& random < 150*(AIlevel ** 2 / 64.0)
;trigger7 = ctrl && random < 150*(AIlevel ** 2 / 64.0) && enemynear,movetype=H && enemynear,statetype=A
value = IfElse(((power>=500)&&random%10),1650,(1600+random%3))


;AI EX Head Charge (ground)
[State -1, AI EX Head Charge (ground)]
type = ChangeState
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)
triggerall = var(50)=0 ;No sadism mode  ;#MakeHeadbuttGreatAgain!!!
triggerall = stateno!=[1550,1566]
triggerall = (power>=500 || var(50)>0)&&random%10
trigger1 = ctrl && random < 150*(AIlevel ** 2 / 64.0)
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact && random < 100*(AIlevel ** 2 / 64.0)
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact && random < 100*(AIlevel ** 2 / 64.0)
trigger6 = (stateno = 100 || stateno = 101)&& random < 150*(AIlevel ** 2 / 64.0)
trigger7 = ctrl && numtarget
trigger7 = target,movetype=H ;stateno=5050
trigger7 = random < 400*(AIlevel ** 2 / 64.0)
;trigger7 = ctrl && random < 18*(AIlevel ** 2 / 64.0) && enemynear,movetype=H && enemynear,statetype=A
value = 1550


;AI Torture Gun
[State -1, AI Torture Gun]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate=2 && StateType != A
triggerall =(p2bodydist x=[0,50])&& P2statetype != A
triggerall = var(50)>0 ;in sadism mode
triggerall = stateno!=1800
trigger1 = ctrl && random < 550*(AIlevel ** 2 / 64.0)
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact && random < 300*(AIlevel ** 2 / 64.0)
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact && random < 300*(AIlevel ** 2 / 64.0)
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact && random < 300*(AIlevel ** 2 / 64.0)
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact && random < 300*(AIlevel ** 2 / 64.0)
trigger6 = (stateno = 100 || stateno = 101) && random < 30*(AIlevel ** 2 / 64.0)
value = 1800

;AI Head Charge (ground)
[State -1, AI Head Charge (ground)]
type = ChangeState
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)
triggerall = var(50)=0 ;No sadism mode ;#MakeHeadbuttGreatAgain!!!
triggerall = stateno!=1500
trigger1 = ctrl && random < 150*(AIlevel ** 2 / 64.0)
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact && random < 100*(AIlevel ** 2 / 64.0)
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact && random < 100*(AIlevel ** 2 / 64.0)
trigger6 = (stateno = 100 || stateno = 101)&& random < 150*(AIlevel ** 2 / 64.0)
trigger7 = ctrl && numtarget
trigger7 = target,movetype=H ;stateno=5050
trigger7 = random < 400*(AIlevel ** 2 / 64.0)
;trigger7 = ctrl && random < 18*(AIlevel ** 2 / 64.0) && enemynear,movetype=H && enemynear,statetype=A
value = 1500


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

;AI (EX) Air Headbutt
[State -1, AI (EX) Air Headbutt]
type = ChangeState
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 = var(50)=0 ;No sadism mode ;#MakeHeadbuttGreatAgain!!!
triggerall = stateno != [1400,1450]
trigger1 = ctrl && random < 150*(AIlevel ** 2 / 64.0)
trigger2 = ((StateNo = 600) || (StateNo = 610) || (StateNo = 620) || (StateNo = 630) || (StateNo = 640) || (StateNo = 650)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger3 = stateno=1566 && anim=1510 && random < 150*(AIlevel ** 2 / 64.0)
trigger4 = enemynear,statetype=L && ctrl && random < 300*(AIlevel ** 2 / 64.0)
;value = IfElse(((power>=500 || var(50)>0)&&random%10),1450,1400)
value = IfElse(((power>=500)&&random%10),1450,1400)

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

;AI (EX) Death Wave
[State -1, AI (EX) Death Wave]
type = ChangeState
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>=35) && (p2bodydist y=[-70,5])
trigger1 = ctrl && random < 300*(AIlevel ** 2 / 64.0)
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger6 = (stateno = 100 || stateno = 101) && movecontact && random < 100*(AIlevel ** 2 / 64.0)
value = IfElse(((power>=500)&&random%10),1150,(1100+random%3))

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

;AI (EX) Air Death Wave
[State -1, AI (EX) Air Death Wave]
type = ChangeState
triggerall = AILevel>0 && numenemy && roundstate = 2 && statetype = A && pos Y < -60 && vel x>=0
triggerall= (enemy,stateno!=[120,155]) && (p2bodydist x=[35,125]) && (p2bodydist y=[40,355])
triggerall = stateno != [1200,1250]
trigger1 = ctrl && random < 150*(AIlevel ** 2 / 64.0)
trigger2 = ((StateNo = 600) || (StateNo = 610) || (StateNo = 620) || (StateNo = 630) || (StateNo = 640) || (StateNo = 650)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger3 = stateno=1566 && anim=1510 && random < 150*(AIlevel ** 2 / 64.0)
trigger4 = enemynear,statetype=L && ctrl && random < 300*(AIlevel ** 2 / 64.0)
value = IfElse(((power>=500)&&random%10),1250,(1200+random%3))

;===========================================================================
; SUPERS
;===========================================================================
;AI Death Saw
[State -1, AI Death Saw]
type = ChangeState
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype != A   && ((power >= 1000) || (var(50) > 0)) && stateno<2000
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 = stateno != [2300,2399]
triggerall = numhelper(2310) = 0
trigger1 = ctrl && random < 300*(AIlevel ** 2 / 64.0)
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger6 = (stateno = 100 || stateno = 101) && movecontact && random < 100*(AIlevel ** 2 / 64.0)
trigger7 = numhelper(1110)
trigger7 = helper(1110),movecontact
trigger7 = random < 100*(AIlevel ** 2 / 64.0)
trigger8 = numhelper(1111)
trigger8 = helper(1111),movecontact
trigger8 = random < 100*(AIlevel ** 2 / 64.0)
trigger9 = numhelper(1112)
trigger9 = helper(1112),movecontact
trigger9 = random < 100*(AIlevel ** 2 / 64.0)
trigger10 = numhelper(1210)
trigger10 = helper(1210),movecontact
trigger10 = random < 100*(AIlevel ** 2 / 64.0)
trigger11 = numhelper(1211)
trigger11 = helper(1211),movecontact
trigger11 = random < 100*(AIlevel ** 2 / 64.0)
trigger12 = numhelper(1212)
trigger12 = helper(1212),movecontact
trigger12 = random < 100*(AIlevel ** 2 / 64.0)
trigger13 = (stateno=1400 || stateno=1450) && anim=48 && movecontact && random < 12*(AIlevel ** 2 / 64.0)
trigger14 = numhelper(1151)
trigger14 = helper(1151),movecontact
trigger14 = random < 100*(AIlevel ** 2 / 64.0)
trigger15 = numhelper(1251)
trigger15 = helper(1251),movecontact
trigger15 = random < 100*(AIlevel ** 2 / 64.0)
trigger16 = stateno=1801 && movecontact && random < 100*(AIlevel ** 2 / 64.0) ;Torture Gun
value = IfElse((random%3=0),2300,(IfElse((random%2=0),2302,2304)))

;AI Death Ball 25%
[State -1, AI Death Ball 25]
type = ChangeState
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype != A && ((power >= 1000) || (var(50) > 0)) && stateno<2000
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(2205) = 0 && numhelper(2210) = 0
trigger1 = ctrl && random < 300*(AIlevel ** 2 / 64.0)
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger6 = (stateno = 100 || stateno = 101) && movecontact && random < 100*(AIlevel ** 2 / 64.0)
trigger7 = numhelper(1110)
trigger7 = helper(1110),movecontact
trigger7 = random < 100*(AIlevel ** 2 / 64.0)
trigger8 = numhelper(1111)
trigger8 = helper(1111),movecontact
trigger8 = random < 100*(AIlevel ** 2 / 64.0)
trigger9 = numhelper(1112)
trigger9 = helper(1112),movecontact
trigger9 = random < 100*(AIlevel ** 2 / 64.0)
trigger10 = numhelper(1210)
trigger10 = helper(1210),movecontact
trigger10 = random < 100*(AIlevel ** 2 / 64.0)
trigger11 = numhelper(1211)
trigger11 = helper(1211),movecontact
trigger11 = random < 100*(AIlevel ** 2 / 64.0)
trigger12 = numhelper(1212)
trigger12 = helper(1212),movecontact
trigger12 = random < 100*(AIlevel ** 2 / 64.0)
trigger13 = (stateno=1400 || stateno=1450) && anim=48 && movecontact && random < 100*(AIlevel ** 2 / 64.0)
trigger14 = numhelper(1151)
trigger14 = helper(1151),movecontact
trigger14 = random < 100*(AIlevel ** 2 / 64.0)
trigger15 = numhelper(1251)
trigger15 = helper(1251),movecontact
trigger15 = random < 100*(AIlevel ** 2 / 64.0)
trigger16 = stateno=1801 && movecontact && random < 100*(AIlevel ** 2 / 64.0) ;Torture Gun
trigger17 = ctrl && numtarget
trigger17 = target,movetype=H ;stateno=5050
trigger17 = random < 400*(AIlevel ** 2 / 64.0)
value = 2200

;AI Air Death Ball 25%
[State -1, AI Air Death Ball 25]
type = ChangeState
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype = A   && ((power >= 1000) || (var(50) > 0)) && stateno<2000
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))
triggerall = stateno != 2220
triggerall = numhelper(2205) = 0 && numhelper(2210) = 0
triggerall = pos Y < -10
trigger1 = ctrl && random < 300*(AIlevel ** 2 / 64.0)
trigger2 = ((StateNo = 600) || (StateNo = 610) || (StateNo = 620) || (StateNo = 630) || (StateNo = 640) || (StateNo = 650) || (StateNo = 660)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger3 = (stateno = 1400 || stateno = 1450) && movecontact && random < 100*(AIlevel ** 2 / 64.0)		;Air headbutt
trigger4 = numhelper(1210)
trigger4 = helper(1210),movecontact
trigger4 = random < 100*(AIlevel ** 2 / 64.0)
trigger5 = numhelper(1211)
trigger5 = helper(1211),movecontact
trigger5 = random < 100*(AIlevel ** 2 / 64.0)
trigger6 = numhelper(1212)
trigger6 = helper(1212),movecontact
trigger6 = random < 100*(AIlevel ** 2 / 64.0)
trigger7 = numhelper(1251)
trigger7 = helper(1251),movecontact
trigger7 = random < 100*(AIlevel ** 2 / 64.0)
trigger8 = stateno=1566 && anim=1510 && random < 100*(AIlevel ** 2 / 64.0)
trigger9 = ((stateno = 1600) || (stateno = 1601) || (stateno = 1602)) && movecontact && random < 100*(AIlevel ** 2 / 64.0) ;Torture Gun
trigger10 = ctrl && numtarget
trigger10 = target,movetype=H ;stateno=5050
trigger10 = random < 400*(AIlevel ** 2 / 64.0)
value = 2220

;AI Death Beam
[State -1, AI Death Beam]
type = ChangeState
triggerall= AILevel>0 && numenemy && roundstate = 2 && statetype != A   && ((power >= 1000) || (var(50) > 0)) && stateno<2000
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))
trigger1 = ctrl && random < 300*(AIlevel ** 2 / 64.0)
trigger2 = ((stateno = 200) || (stateno = 210) || (stateno = 220)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger3 = ((stateno = 230) || (stateno = 240) || (stateno = 250) || (stateno = 255)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger4 = ((stateno = 400) || (stateno = 410) || (stateno = 420)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger5 = ((stateno = 430) || (stateno = 440)) && movecontact && random < 150*(AIlevel ** 2 / 64.0)
trigger6 = (stateno = 100 || stateno = 101) && movecontact && random < 100*(AIlevel ** 2 / 64.0)
trigger7 = numhelper(1110)
trigger7 = helper(1110),movecontact
trigger7 = random < 100*(AIlevel ** 2 / 64.0)
trigger8 = numhelper(1111)
trigger8 = helper(1111),movecontact
trigger8 = random < 100*(AIlevel ** 2 / 64.0)
trigger9 = numhelper(1112)
trigger9 = helper(1112),movecontact
trigger9 = random < 100*(AIlevel ** 2 / 64.0)
trigger10 = numhelper(1210)
trigger10 = helper(1210),movecontact
trigger10 = random < 100*(AIlevel ** 2 / 64.0)
trigger11 = numhelper(1211)
trigger11 = helper(1211),movecontact
trigger11 = random < 100*(AIlevel ** 2 / 64.0)
trigger12 = numhelper(1212)
trigger12 = helper(1212),movecontact
trigger12 = random < 100*(AIlevel ** 2 / 64.0)
trigger13 = (stateno=1400 || stateno=1450) && anim=48 && movecontact && random < 100*(AIlevel ** 2 / 64.0)
;trigger14 = numhelper(1151)
;trigger14 = helper(1151),movecontact
;trigger14 = random < 100*(AIlevel ** 2 / 64.0)
trigger14 = numhelper(1251)
trigger14 = helper(1251),movecontact
trigger14 = random < 100*(AIlevel ** 2 / 64.0)
trigger15 = stateno=1801 && movecontact && random < 100*(AIlevel ** 2 / 64.0) ;Torture Gun
value = 2000



