;If there are any -3 states, you can cut and paste them at the bottom of this 
;file.
;---------------------------------------------------------------------------

[Statedef -2]

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

;Insert all your -2 states here...

;---------------------------------------------------------------------------
; The background states :
;---------------------------------------------------------------------------

; Shadows are turned off when a fatality occurs. They cause fatalites a heap of trouble.
[State -2, NoGuard1]
type = AssertSpecial
trigger1 = var(21) != 1
trigger1 = 1
flag = nostandguard

[State -2, NoGuard2]
type = AssertSpecial
trigger1 = var(21) != 1
trigger1 = 1
flag = nocrouchguard

[State -2, NoGuard3]
type = AssertSpecial
trigger1 = 1
flag = noairguard

[State -2, NOSimulFatals ]
type = VarSet
trigger1 = var(9) != 0
trigger1 = TeamMode = Simul ;Turns
v = 9
value = 0

[State -2, stageID ]
type = VarSet
trigger1 = var(51) = 0
trigger1 = ScreenPos Y >= 26000
v = 51
value = floor( ScreenPos Y )

[State -2, Fatality=ShadowRemove]
type = AssertSpecial
trigger1 = var(4) >= 1
flag = globalnoshadow

[State -2, NoFatalGuys]
type = Varset
triggerall = 1
triggerall = TeamMode != Turns
trigger1 = p2name = "elque"
trigger2 = p2name = "Omake: Mr. Wood"
trigger3 = p2name = "nemesis"
trigger4 = p2name = "Psycho Shredder[S]"
v = 9
value = 0

[State -2, TurnsFatalites]
type = Varset
triggerall = TeamMode = Turns
triggerall = p2stateno != 9010
trigger1 = 1
trigger2 = roundno >= 3
v = 9
value = 1

[State -2, 3.3]
type = VarRandom
trigger1 = movetype = H
v = 1
range = 0, 125

[State -2, 0.3]
type = playsnd
trigger1 = movetype = H
triggerall = time = 2
triggerall = anim = 5100
triggerall = anim = 5170
value = 5, 4

[State -2, 4]
type = Playsnd
triggerall = Time = 2
triggerall = Var(1) = [0, 14]
triggerall = anim != [100, 300]
triggerall = anim != [5005, 5007]
triggerall = anim != [5015, 5017]
triggerall = anim != [5025, 5027]
triggerall = anim != [5035, 5050]
triggerall = anim != [5080, 5100]
triggerall = anim != [5110, 5999]
triggerall = anim != [5070, 5072]
trigger1 = movetype = H
value = 5,0
loop = 0

[State -2, 4.1]
type = Playsnd
triggerall = Time = 2
triggerall = Var(1) = [15, 39]
triggerall = anim != [100, 300]
triggerall = anim != [5005, 5007]
triggerall = anim != [5015, 5017]
triggerall = anim != [5025, 5027]
triggerall = anim != [5035, 5050]
triggerall = anim != [5080, 5100]
triggerall = anim != [5110, 5999]
triggerall = anim != [5070, 5072]
trigger1 = movetype = H
value = 5,1
loop = 0

[State -2, 4.2]
type = Playsnd
triggerall = Time = 2
triggerall = Var(1) = [40, 75]
triggerall = anim != [100, 300]
triggerall = anim != [5005, 5007]
triggerall = anim != [5015, 5017]
triggerall = anim != [5025, 5027]
triggerall = anim != [5035, 5050]
triggerall = anim != [5080, 5100]
triggerall = anim != [5110, 5999]
triggerall = anim != [5070, 5072]
trigger1 = movetype = H
value = 5,2
loop = 0

[State -2, 4.2]
type = Playsnd
triggerall = Time = 2
triggerall = Var(1) = [76, 100]
triggerall = anim != [100, 300]
triggerall = anim != [5005, 5007]
triggerall = anim != [5015, 5017]
triggerall = anim != [5025, 5027]
triggerall = anim != [5035, 5050]
triggerall = anim != [5080, 5100]
triggerall = anim != [5110, 5999]
triggerall = anim != [5070, 5072]
trigger1 = movetype = H
value = 5,3
loop = 0

;[State -2, TripSound]
;type = Playsnd
;trigger1 = time = 0
;trigger1 = anim = 5070
;value = 5,8

;FATALITY TIME BEGINS.  This activates when P2 is on the ground and has a small amount of live left.
[State -2, 6]
type = Helper
trigger1 = p2life <= 1
trigger1 = p2movetype != H
trigger1 = Pos Y = 0
trigger1 = p2stateno != 5080
trigger1 = p2stateno != 5090
trigger1 = p2stateno != 5100
trigger1 = p2stateno != 5110
trigger1 = p2stateno != 5120
trigger1 = p2stateno != [9100, 9999]
trigger1 = stateno != [9010, 9999]
trigger1 = Var(9) = 1
trigger1 = Var(4) = 0
trigger1 = NumHelper(9000) = 0
stateno = 9000
name = "Fatality"
id = 9000
pos = 0, 0
helpertype = normal
sprpriority = 1
keyctrl = 0
ownpal = 0
under = 1

;THE FATALITY COUNT DOWN
[State -2, 7.9]
type = Varadd
trigger1 = Var(13) != 0
V = 13
value = -1

;THIS IS THE END OF FATALITY TIME
[State -2,8]
type = Helper
triggerall = p2Life != 0
triggerall = win != 1
triggerall = lose != 1
trigger1 = Var(13) = 1
trigger1 = Var(9) = 0
trigger1 = p2stateno = 9010
stateno = 9020
name = "Doesn't hit person"
id = 9020
pos = 0, 0
helpertype = normal
sprpriority = 1
keyctrl = 0
ownpal = 0
under = 1

;MAKES IT SO IF YOU HIT THE PERSON, MOVES KILL AGAIN...
[State -2, 7.9]
type = Varset
trigger1 = p2stateno = 9010
v = 9
value = 0

[State -2, 9]
type = Playsnd
trigger1 = time = 4
trigger1 = anim = [41, 45]
value = 1,8

;****************************************************************************************************
;Blood Color Changes
[State -2, YellowBlood]
type = palFX
;triggerall = 6000 = ID
;triggerall = 1
triggerall = IsHelper(6000)
trigger1 = p2name = "Yellow Devil"
add = 255,255,-255
mul = 128,128,-128
time = 9999

[Statedef -3]

[State -3, VarRandom]
type = VarRandom
triggerall = var(21) = 1
;triggerall = PalNo = 12
trigger1 = TimeMod = 5,0
v = 0
range = 5

:****************KNOCK 'EM OUTTA THE SKY********************
[State -3, Punch]
type = ChangeState
;triggerall = PalNo = 12
triggerall = var(21) = 1
triggerall = MatchOver = 0
triggerall = StateType != A
triggerall = NumProj = 0
triggerall = Random <= 200
triggerall = ctrl = 1
triggerall = var(0) = [4,5]
triggerall = stateno != 9010
triggerall = stateno != 130
triggerall = stateno != 131
triggerall = Life > 5
triggerall = p2stateno != 9010
triggerall = p2life > 7
triggerall = Win = 0
triggerall = Var(4) = 0
trigger1 = p2bodydist X <= 65
trigger1 = p2dist Y < 0
value = 203

[State -3, Flying Kick]
type = ChangeState
;triggerall = PalNo = 12
triggerall = var(21) = 1
triggerall = MatchOver = 0
triggerall = StateType != A
triggerall = NumProj = 0
triggerall = Random <= 200
triggerall = ctrl = 1
triggerall = var(0) = 1
triggerall = stateno != 9010
triggerall = stateno != 130
triggerall = stateno != 131
triggerall = Life > 5
triggerall = p2stateno != 9010
triggerall = p2life > 7
triggerall = Win = 0
triggerall = Var(4) = 0
trigger1 = p2bodydist X < 65
trigger1 = p2dist Y < 0
value = 1040

[State -3, Fire]
type = ChangeState
;triggerall = PalNo = 12
triggerall = var(21) = 1
triggerall = MatchOver = 0
triggerall = StateType != A
triggerall = NumProj = 0
triggerall = Random <= 200
triggerall = ctrl = 1
triggerall = var(0) = [2,3]
triggerall = stateno != 9010
triggerall = stateno != 130
triggerall = stateno != 131
triggerall = Life > 5
triggerall = NumHelper(2010) = 0
triggerall = NumHelper(2011) = 0
triggerall = NumHelper(2012) = 0
triggerall = NumHelper(2013) = 0
triggerall = p2stateno != 9010
triggerall = p2life > 7
triggerall = Win = 0
triggerall = Var(4) = 0
trigger1 = p2bodydist X < 65
trigger1 = p2dist Y < 0
value = 1000

;***************************TICK AWAY AT A DISTANCE***********************
[State -3, FlyKick]
type = ChangeState
triggerall = var(21) = 1
triggerall = MatchOver = 0
triggerall = ctrl = 1
triggerall = stateno != 9010
triggerall = stateno != 130
triggerall = stateno != 131
triggerall = Life > 5
triggerall = var(0) = [1,2]
triggerall = p2stateno != 9010
triggerall = p2life > 7
triggerall = Win = 0
triggerall = Var(4) = 0
triggerall = StateType != A
trigger1 = Random <= 60
;trigger1 = p2bodydist X >= 80
;trigger1 = p2bodydist X <= 140
value = 1040

[State -3, Fire]
type = ChangeState
triggerall = var(21) = 1
triggerall = MatchOver = 0
triggerall = ctrl = 1
triggerall = StateType != A
triggerall = stateno != 9010
triggerall = stateno != 130
triggerall = stateno != 131
triggerall = Life > 5
triggerall = var(0) = [3,4]
triggerall = p2stateno != 9010
triggerall = p2life > 7
triggerall = Win = 0
triggerall = Var(4) = 0
trigger1 = Random <= 75
;trigger1 = p2bodydist X >= 80
;trigger1 = p2bodydist X <= 140
value = 1000

[State -3, DuckFire]
type = ChangeState
triggerall = var(21) = 1
triggerall = MatchOver = 0
triggerall = StateType != A
triggerall = ctrl = 1
triggerall = stateno != 9010
triggerall = stateno != 130
triggerall = stateno != 131
triggerall = Life > 5
triggerall = var(0) = 5
triggerall = p2stateno != 9010
triggerall = p2life > 7
triggerall = Win = 0
triggerall = Var(4) = 0
trigger1 = Random <= 50
trigger1 = p2bodydist X >= 80
;trigger1 = p2bodydist X <= 140
value = 1010

[State -3, Bike Kick]
type = ChangeState
triggerall = time >= 30
triggerall = var(21) = 1
triggerall = MatchOver = 0
triggerall = StateType != A
triggerall = ctrl = 1
triggerall = stateno != 9010
triggerall = stateno != 130
triggerall = stateno != 131
triggerall = Life > 5
triggerall = var(0) = [3,5]
triggerall = p2stateno != 9010
triggerall = p2life > 7
triggerall = Win = 0
triggerall = Var(4) = 0
trigger1 = Random <= 75
trigger1 = p2bodydist X <= 192
value = 1030

;*********************DEFENCE*******************************

[State -3, Blocking]
type = ChangeState
triggerall = var(21) = 1
triggerall = MatchOver = 0
triggerall = P2bodydist X <= 70
triggerall = random <= 150
triggerall = statetype = S
triggerall = ctrl = 1
triggerall = stateno != 9010
triggerall = Pos Y >= 0
triggerall = Life > 5
triggerall = p2stateno != 9010
triggerall = p2life > 7
triggerall = Win = 0
triggerall = Var(4) = 0
;triggerall = StateType != A
trigger1 = P2MoveType = A
trigger1 = stateno != 120
value = 130

[State -3, Crouch Blocking]
type = ChangeState
;triggerall = PalNo = 12
triggerall = var(21) = 1
triggerall = MatchOver = 0
triggerall = P2bodydist X <= 80
triggerall = random <= 150
triggerall = ctrl = 1
triggerall = P2MoveType = A
triggerall = stateno != 9010
;triggerall = StateType != A
triggerall = Pos Y >= 0
triggerall = Life > 5
triggerall = p2stateno != 9010
triggerall = p2life > 7
triggerall = Win = 0
triggerall = Var(4) = 0
;trigger1 = statetype = C
trigger1 = stateno != 121
trigger1 = P2StateType = C
value = 131

;******************KEEP 'EM IN CHECK***********************
[State -3, Sweep]
type = ChangeState
triggerall = MatchOver = 0
triggerall = var(21) = 1
triggerall = ctrl = 1
triggerall = stateno != 9010
triggerall = stateno != 130
triggerall = stateno != 131
triggerall = Life > 5
triggerall = p2BodyDist X <= 100
triggerall = Random <= 100
triggerall = StateType != A
triggerall = p2stateno != 9010
triggerall = p2life > 7
triggerall = Win = 0
triggerall = Var(4) = 0
trigger1 = p2StateNo = 120
trigger2 = p2StateNo = 121
trigger3 = p2StateNo = 130
trigger4 = p2StateNo = 131
value = 1310

[State -3, UpperCutTheStunnedGuy]
type = ChangeState
triggerall = MatchOver = 0
;triggerall = PalNo = 12
triggerall = var(21) = 1
triggerall = ctrl = 1
triggerall = stateno != 9010
triggerall = stateno != 130
triggerall = stateno != 131
triggerall = Life > 5
triggerall = p2BodyDist X <= 16
;triggerall = p2BodyDist Y >= -150
triggerall = StateType != A
triggerall = p2stateno != 9010
triggerall = p2life > 7
triggerall = Win = 0
triggerall = Var(4) = 0
trigger1 = p2stateno = 1547
trigger2 = p2stateno = 1502
trigger3 = p2stateno = 1501
value = 1100

*******************FATALITY RANDOM*******************
;[State -3, Random]
;type = VarRandom
;trigger1 = p2stateno = 9010
;trigger1 = stateno != 4010
;trigger1 = stateno != 4100
;trigger1 = stateno != 4200
;trigger1 = stateno != 4300
;trigger1 = stateno != 4020
;trigger1 = ctrl = 1
;v = 6
;Range = 1, 80

;[State -3, Lightning Splat Fatality]
;type = ChangeState
;;triggerall = PalNo = 12
;triggerall = var(21) = 1
;triggerall = MatchOver = 0
;trigger1 = p2BodyDist X >= 20
;trigger1 = p2stateno = 9010
;trigger1 = var(6) = [1,20]
;trigger1 = stateno != 4010 
;trigger1 = stateno != 4100
;trigger1 = stateno != 4200
;trigger1 = stateno != 4300
;trigger1 = stateno != 4020
;trigger1 = ctrl = 1
;value = 4100

;[State -3, Acid Rain]
;type = ChangeState
;;triggerall = PalNo = 12
;triggerall = var(21) = 1
;triggerall = MatchOver = 0
;trigger1 = p2BodyDist X >= 20
;trigger1 = p2stateno = 9010
;trigger1 = var(6) = [21,40]
;trigger1 = stateno != 4020 
;trigger1 = stateno != 4100
;trigger1 = stateno != 4200
;trigger1 = stateno != 4010
;trigger1 = stateno != 4300
;trigger1 = ctrl = 1
;value = 4300

;[State -3, Flowers]
;type = ChangeState
;;triggerall = PalNo = 12
;triggerall = var(21) = 1
;triggerall = MatchOver = 0
;trigger1 = p2BodyDist X >= 20
;trigger1 = p2stateno = 9010
;trigger1 = var(6) = [41,50]
;trigger1 = stateno != 4020 
;trigger1 = stateno != 4600
;trigger1 = stateno != 4130
;trigger1 = stateno != 4010
;trigger1 = stateno != 4140
;trigger1 = ctrl = 1
;value = 4020

;[State -3, Doll]
;type = ChangeState
;;triggerall = PalNo = 12
;triggerall = var(21) = 1
;triggerall = MatchOver = 0
;trigger1 = p2BodyDist X >= 20
;trigger1 = p2stateno = 9010
;trigger1 = var(6) = [51,60]
;trigger1 = stateno != 4020 
;trigger1 = stateno != 4600
;trigger1 = stateno != 4130
;trigger1 = stateno != 4010
;trigger1 = stateno != 4140
;trigger1 = ctrl = 1
;value = 4010

;[State -3, Lightning Fry Fatality]
;type = ChangeState
;;triggerall = PalNo = 12
;triggerall = var(21) = 1
;triggerall = MatchOver = 0
;trigger1 = p2BodyDist X >= 20
;trigger1 = p2stateno = 9010
;trigger1 = var(6) = [61,80]
;trigger1 = stateno != 4010 
;trigger1 = stateno != 4100
;trigger1 = stateno != 4200
;trigger1 = stateno != 4300
;trigger1 = stateno != 4020
;trigger1 = ctrl = 1
;value = 4200