[Statedef -2]

;-------------------------------------------------------------------------------
;EX GROOVE MODIFIERS
;-------------------------------------------------------------------------------
;These are the system techs,set their "value" to 1 if you want them enabled,set them to 0 to disable.

;----------
;Rolling
;----------
[State -2, VarSet]
type = VarSet
trigger1 = 1
v = 43
value = 1

;-----------
;Dodging
;-----------
[State -2, VarSet]
type = VarSet
trigger1 = 1
v = 44
value = 1

;-----------------------------------------------
;Guard Cancel Emergency Evade
;-----------------------------------------------
[State -2, VarSet]
type = VarSet
trigger1 = 1
v = 45
value = 1

;---------------------------------------------
;Guard Cancel Blowback Attack
;---------------------------------------------
[State -2, VarSet]
type = VarSet
trigger1 = 1
v = 46
value = 1

;----------------------
;Original Combo
;----------------------
[State -2, VarSet]
type = VarSet
trigger1 = 1
v = 47
value = 1

;----------------------
;Power Charging
;----------------------
[State -2, VarSet]
type = VarSet
trigger1 = 1
v = 48
value = 1

;-------------
;Shielding
;-------------
[State -2, VarSet]
type = VarSet
trigger1 = 1
v = 49
value = 1

;-------------------------
;Roman Canceling
;-------------------------
[State -2, VarSet]
type = VarSet
trigger1 = 1
v = 50
value = 1

;------------
;Air Dash
;------------
[State -2, VarSet]
type = VarSet
trigger1 = 1
v = 51
value = 1

;----------------------
;Alpha Counters
;----------------------
[State -2, VarSet]
type = VarSet
trigger1 = 1
v = 52
value = 1

;-----------------
;Blood Rage
;-----------------
[State -2, VarSet]
type = VarSet
trigger1 = 1
v = 53
value = 1

;--------
;Parry
;--------
[State -2, VarSet]
type = VarSet
trigger1 = 1
v = 54
value = 1

;-----------------
;Just Defend
;-----------------
[State -2, VarSet]
type = VarSet
trigger1 = 1
v = 55
value = 1

;--------------------
;Custom Move
;Hard Edge
;--------------------
[State -2, VarSet]
type = VarSet
trigger1 = 1
v = 56
value = 1

;---------------------
;Super Cancels
;---------------------
[State -2, VarSet]
type = VarSet
trigger1 = 1
v = 57
value = 1






















;===============================================================================
;No Groove Related Stuff Below This Line,Do Not Change Anything Below
;===============================================================================

[State 0, Explod]
type = Explod
trigger1 = numexplod(1130)=0
trigger1 = projhit = 1
trigger1 = p2stateno != 5110
trigger1 = p2stateno = [5000,5070]
anim = 1130
ID = 1130
pos = -5,-40
facing = -1
postype = p2
bindtime = -1
removetime = 30
scale = .5,.5
sprpriority = 6
ontop = 0
ownpal = 1
removeongethit = 0
ignorehitpause = 1

;Win KO BG (Super)

[State -2: Helper]
type = Helper
trigger1 = stateno >= 1056 && stateno <= 1117
trigger1 = (WinKO) && (NumHelper(3070) = 0)
trigger1 = stateno != 1070
helpertype = Normal
name = "WinKO"
id = 3070
pos = 0,0
postype = p1
facing = 0
stateno = 3070
keyctrl = 0
ownpal = 1
supermovetime = 1000
pausemovetime = 1000
ignorehitpause = 1

;Remove Explod's

[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != [1057,1068]
ID = 1059

[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != [1120,1123]
ID = 1121

[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != [970,974]
ID = 1126

;SNK Gauge Slot Power Add
[State -2, VarAdd]
type = VarAdd
trigger1 = var(40) = 1
trigger1 = roundstate = 2
trigger1 = var(42) < 1000
v = 42
value = 1
ignorehitpause = 1

[State -2, VarAdd]
type = VarAdd
trigger1 = var(40) = 1
trigger1 = roundstate = 2
trigger1 = var(42) >= 1000
trigger1 = (gametime%3) = 0
v = 42
value = 1
ignorehitpause = 1

;Blood Rage

[State -2, LifeAdd]
type = LifeAdd
trigger1 = var(16) > 0
trigger1 = (gametime%14) = 0
value = 5
ignorehitpause = 0

[State -2, AttackMulSet]
type = AttackMulSet
trigger1 = var(16) > 0
value = 1.2
ignorehitpause = 1

[State -2, AttackMulSet]
type = AttackMulSet
trigger1 = var(20) = 0
trigger1 = var(16) = 0
value = 1
ignorehitpause = 1

[State -2, PalFX]
type = PalFX
trigger1 = var(16) > 0
trigger1 = (gametime%20) = 0
time = 25
add = 100,-100,-100
mul = 256,256,256
sinadd = 40,40,30,17
invertall = 0
color = 0
ignorehitpause = 1

[State -2, VarSet]
type = VarSet
trigger1 = var(42) < 0
v = 42
value = 0
ignorehitpause = 1

[State -2, VarSet]
type = VarSet
trigger1 = 1
trigger1 = var(16) > 0
v = 41
value = 0
ignorehitpause = 1

[State -2, VarSet]
type = VarSet
trigger1 = var(16) <= 0 || roundstate != 2
var(16) = 0
ignorehitpause=1

[State -2, VarAdd]
type = VarAdd
trigger1 = var(16) >0
var(16) = -1
ignorehitpause = 1

;Gauge Reset
[State -2, VarSet]
type = VarSet
trigger1 = var(40) = 3
trigger1 = roundstate = 3
v = 41
value = 1000
ignorehitpause = 1

[State -2, VarSet]
type = VarSet
trigger1 = var(40) = 1
trigger1 = roundstate = 3
v = 42
value = 0
ignorehitpause = 1

;ONLY FOR BETA TESTING
[State -2, VarSet]
type = Null
trigger1 = var(40) != 2
v = 41
value = 4000
ignorehitpause = 1

;EX Gauge

[State -2, Helper]
type = Helper
triggerall = roundstate = 2
triggerall = var(40) = 3
triggerall = numhelper(999) = 0
triggerall = numenemy
trigger1 = !numpartner
trigger2 = numpartner
id = 999
name = "EX Gauge"
pos = 0,100
postype = P1
stateno = 999
helpertype = normal
keyctrl = 0
ownpal = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*ifelse(teamside=1,1,-1)

;SNK Gauge

[State -2, Helper]
type = Helper
triggerall = roundstate = 2
triggerall = var(40) = 1
triggerall = numhelper(3029) = 0
triggerall = numenemy
trigger1 = !numpartner
trigger2 = numpartner
id = 3029
name = "SNK Gauge"
pos = 0,100
postype = P1
stateno = 3029
helpertype = normal
keyctrl = 0
ownpal = 1
pausemovetime = 999999
supermovetime = 999999
facing = facing*ifelse(teamside=1,1,-1)

[State 0, VarSet]
type = VarSet
trigger1 = var(40) = 3
trigger1 = var(41) > 4000
v = 41
value = 4000
ignorehitpause = 1

[State 0, VarSet]
type = VarSet
trigger1 = var(40) != 3
v = 41
value = 0
ignorehitpause = 1

[State 0, VarSet]
type = VarSet
trigger1 = var(40) = 1
trigger1 = var(42) > 2000
v = 42
value = 2000
ignorehitpause = 1

;Groove Selector
[state -2, Helper]
type = Helper
trigger1 = time = 0
trigger1 = roundstate = 0
trigger1 = roundsexisted <= 0
ID = 900
stateno = 900+(random%3)
postype = p1
pos = 0,-15
name = "Groove Selector"
ontop = 1
bindtime = -1

;Display Variables,Etc.
[State -2, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "Groove = %d,EX Power = %d,SNK Power = %d,P2BodyDist x = %d,P2BodyDist y = %d"
params = var(40),var(41),var(42),floor(P2BodyDist x),floor(P2BodyDist y)

;Just Defend
[State -2, VarSet]
type = VarSet
trigger1 = 1
var(9) = GetHitVar(damage)

[State -2, VarSet]
type = VarSet
trigger1 = roundstate = 0
var(8) = -1

[State -2, VarAdd]
type = VarAdd
trigger1 = var(8) >= 0
var(8) = 1
ignorehitpause = 1

[State -2, VarSet]
type = VarSet
triggerall = var(40) != 2
triggerall = var(8) > 12
trigger1 = command != "holdback"
var(8) = -1

[State -2, VarSet]
type = VarSet
triggerall = var(40) != 2
triggerall = var(8) = -1
triggerall = stateno != [140,159]
trigger1 = command = "back"
trigger2 = command = "downback"
var(8) = 0

[State -2, VarSet]
type = VarSet
triggerall = var(40) != 2
triggerall = var(8) = [0,6]
trigger1 = command != "holdback"
var(8) = 7

[State -2, ChangeState]
type = ChangeState
triggerall = Ifelse(var(40)=3,var(55)=1,var(40) != 2)
triggerall = stateno = 150
triggerall = time = 0
trigger1 = (var(8) = [0,6])
value = 3000

[State -2, ChangeState]
type = ChangeState
triggerall = Ifelse(var(40)=3,var(55)=1,var(40) != 2)
triggerall = stateno = 152
triggerall = time = 0
trigger1 = (var(8) = [0,6])
value = 3001

[State -2, 3]
type = ChangeState
triggerall = Ifelse(var(40)=3,var(55)=1,var(40) != 2)
triggerall = stateno = 154
triggerall = time = 0
trigger1 = (var(8) = [0,6])
value = 3002

;Parry
[State -2: Null]
type = Null
triggerall = Ifelse(var(40)=3,var(54)=1,var(40) != 1)
trigger1 = (!Time) && (Var(5) = 0)
trigger1 = ((Command = "holdfwd") && (StateNo = 20)) ^^ ((Command = "holddown") && (StateNo = [10,11]))
trigger1 = (Var(4) := 8)
trigger2 = (Command != "holdfwd") && (Command != "holddown") && (Var(5) = 1)
trigger2 = (Var(5) := 0)
ignorehitpause = 1

[State -2: VarAdd]
type = VarAdd
trigger1 = (Var(4) > 0) && Ifelse(var(40)=3,var(54)=1,var(40) != 1)
var(4) = -1
ignorehitpause = 1

[State -2: Helper]
type = Helper
trigger1 = ((StateNo = 50) || (StateNo = 962)) && (Command = "holdfwd") && (NumHelper(963) = 0) && Ifelse(var(40)=3,var(54)=1,var(40) != 1)
helpertype = Normal
name = "Air Parry"
id = 963
pos = 0,0
postype = p1
facing = 0
stateno = 963
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
ignorehitpause = 1

[State -2: HitOverride]
type = HitOverride
triggerall = (StateType != A) && (Ctrl) && (Var(4) > 0) && Ifelse(var(40)=3,var(54)=1,var(40) != 1)
trigger1 = (Command != "holddown") && (Command != "holdback")
attr = SA, AA, AP
slot = 0
stateno = 960
ignorehitpause = 1

[State -2: HitOverride]
type = HitOverride
triggerall = (StateType != A) && (Ctrl) && (Var(4) > 0) && Ifelse(var(40)=3,var(54)=1,var(40) != 1)
trigger1 = (Command != "holdfwd") && (Command != "holdback")
attr = C, AA, AP
slot = 0
stateno = 961
ignorehitpause = 1

[State -2: HitOverride]
type = HitOverride
triggerall = ((StateNo = 50) || (StateNo = 962)) && (Var(4) > 0) && Ifelse(var(40)=3,var(54)=1,var(40) != 1)
trigger1 = (Command != "holddown") && (Command != "holdback")
attr = SCA, AA, AP
slot = 0
stateno = 962
ignorehitpause = 1

;Original Combo ;Coding By Phantom of the Server,borrowed with permission.

[State -2, AttackMulSet]
type = AttackMulSet
trigger1 = var(20) > 0
value = 0.5
ignorehitpause = 1

[State -2, AssertSpecial]
type = AssertSpecial
trigger1 = var(20) > 0
flag = nostandguard
flag2 = nocrouchguard
flag3 = noairguard
ignorehitpause = 1

[State -2, VarSet]
type = VarSet
trigger1 = var(20) > 0
trigger1 = GetHitVar(damage) >= 1
var(20) = 0

[State 0, PowerAdd]
type = PowerAdd
trigger1 = var(20) > 0
value = -10
ignorehitpause = 1

[State -2, ECturnoff]
type=varset
trigger1=var(20)<=0||roundstate!=2
var(20)=0
ignorehitpause=1
[State -2, ECvar]
type=varadd
trigger1=var(20)>0
var(20)=-1
ignorehitpause=1
[State -2, ECnhb]
type=nothitby
trigger1=var(20)>=285
time=1
value=SCA
ignorehitpause=1
[State -2, ECnojuggle]
type=assertspecial
trigger1=var(20)>0
flag=nojugglecheck
ignorehitpause=1
[State -2, ECglow]
type=palfx
trigger1=var(20)>60
time=2
add=32+ceil(sin(var(20)/5.0)*32),32+ceil(sin(var(20)/5.0)*32),32+ceil(sin(var(20)/5.0)*32)
ignorehitpause=1
[State -2, ECglow]
type=palfx
trigger1=(var(20)=[1,60])
time=2
add=64+ceil(sin(var(20)/2.0)*64),64+ceil(sin(var(20)/2.0)*64),64+ceil(sin(var(20)/2.0)*64)
ignorehitpause=1

;KO
[State -2,VarSet]
type = VarSet
trigger1 = 1
ignorehitpause = 1
fvar(4) = 0

[State -2,VarSet]
type = VarSet
trigger1 = anim = 906 || stateno = 906
ignorehitpause = 1
fvar(4) = 1

[State -2,VarSet]
type = VarSet
trigger1 = movetype != H
trigger1 = roundstate = 2
ignorehitpause = 1
var(6) = 0

[State -2,VarSet]
type = VarSet
trigger1 = stateno = 5000 || stateno = 5020 || stateno = 5070 || stateno = 5080
trigger1 = roundstate = 2
trigger1 = time = 0
ignorehitpause = 1
var(6) = gethitvar(hitshaketime)

[State -2, PlaySnd]
type = PlaySnd
triggerall = roundstate = 3
trigger1 = !fvar(4)
trigger1 = Var(5) = ifelse(!var(6),1,ifelse(var(6)>20,20,var(6)))
ignorehitpause = 1
value = 100, 30
channel = 5

[State -2, PlaySnd]
type = PlaySnd
triggerall = roundstate = 3
triggerall = fvar(4)
trigger1 = anim = 906 && animelemtime(1) = 2
ignorehitpause = 1
value = 100, 31
channel = 5

[State -2,VarAdd]
type = VarAdd
trigger1 = !alive
ignorehitpause = 1
var(5) = 1

[State -2,VarSet]
type = VarSet
trigger1 = alive
ignorehitpause = 1
var(5) = 0

;SNK Groove Power Add
[State -2, PowerAdd]
type = PowerAdd
trigger1 = var(40) = 1
trigger1 = Gethitvar(damage) > 0
value = 50
ignorehitpause = 1
persistent = 0

;Turn
[State -2,Turn]
type = Null
triggerall = P2Dist X < 0
trigger1 = stateno = [938,3100]
trigger1 = animtime = 1
ignorehitpause = 1
persistent = 0

;Cheese Kill
[State -2, Cheese Kill]
type = ChangeState
trigger1 = !alive
trigger1 = prevstateno = 130 || prevstateno = 131 || prevstateno = [150,153]
trigger1 = Stateno = [5000,5050]
value = 906

[State -2, Cheese Kill]
type = VarSet
triggerall = stateno = [120,155]
trigger1 = StateType = S
ignorehitpause = 1
fvar(2) = 0


;========================
;I AM THE KING OF DARKNESS
;========================
[State -2, VarSet]
type = VarSet
trigger1 = 1
v = 11
value = 0
;===============
;FEAR ME MORTAL
;lol
;===============