[Data]
life = 1660          ;
attack = 100         ;
defence = 100        ;100% defensive power (more is stronger)
fall.defence_up = 20 ;Def go
liedown.time = 25    ;Time p
airjuggle = 18       
sparkno = 0        ;
guard.sparkno = -1   
KO.echo = 1        ;
volume = 10
IntPersistIndex = 58


[Size]
xscale = .98
yscale = .98
ground.back = 20     ;
ground.front = 20    ;
air.back = 15        ;
air.front = 15       ;P
height = 75	      
attack.width = 4,4   ;
attack.dist = 20    ;
proj.attack.dist = 20
proj.doscale = 1    ;
head.pos = -2, -93   
mid.pos = -2, -60    
shadowoffset = 0     

[Velocity]
walk.fwd  = 2.8
walk.back = -1.9
run.fwd  = 7, 0
run.back = -4.5,-3.8
jump.neu = 0,-9.8
jump.back = -4;-3.4
jump.fwd = 4;3.4

[Movement]
airjump.num = 0      
airjump.height = 0  ;
yaccel = .58;.45
stand.friction = .10  
crouch.friction = .10 


; WIN
[Statedef 180]
type = S


[State 180, 1]
type = ChangeState
trigger1 = Time = 1
value = 181

; WIN1
[Statedef 181]
type = S
movetype= A
ctrl = 0
anim = 180
velset = 0,0

[State 180, 461]
type = Playsnd
trigger1 = time = 4
triggerall = NumExplod(2000) = 0
triggerall = NumExplod(20004) = 0
triggerall = NumExplod(20001) = 0
value = 4,6
volume = 50

; --- Nombre Wins ---

[State 180, 461]
type = Playsnd
trigger1 = time = 5
trigger1 = NumPartner = 0
value = 6,0
volume = 50

[State 180, 461dfg]
type = Playsnd
trigger1 = time = 115
value = F5,34
trigger1 = NumPartner = 0
trigger1 = var(30) = 10010
volume = 50

[State 181, 1.5]
type = EnvColor
trigger1 = Var(23) = 1
value = 0,0,0
time = 1
under = 0

[State 181, 1.3]
type = AssertSpecial
trigger1 = time = [0, 320]
triggerall = Var(4) = 0
flag = roundnotover

[State 181, 1.3]
type = AssertSpecial
trigger1 = time = [0, 640]
triggerall = Var(4) != 0
flag = roundnotover

; --- Cosas de Flawless ---

[State 180, Flawless]
type = Playsnd
trigger1 = time = 140
trigger1 = WinPerfect
value = F5,9

[State 181, flawlessss]
type = Explod
trigger1 = time = 140
trigger1 = WinPerfect
trigger1 = Var(4) = 0
anim = F38
pos = 156*const(size.xscale),90*const(size.xscale)
postype = left
bindtime = -1
facing = 1
sprpriority = 2
ontop = 1
ownpal = 1
removetime = -1

[State 181, flawlessss]
type = Explod
trigger1 = time = 140
trigger1 = WinPerfect
trigger1 = Var(4) != 0
anim = F38
pos = 156*const(size.xscale),90*const(size.xscale)
postype = left
bindtime = -1
facing = 1
sprpriority = 2
ontop = 1
ownpal = 1
removetime = 115

; --- Carteles ---

[State 181, cartel]
type = Explod
triggerall = Var(4) != 0
trigger1 = time = 270
trigger1 = WinPerfect
trigger2 = time = 140
trigger2 = !WinPerfect
anim = F200+var(4)
id = 7000
pos = 168,100
postype = left
facing = 1
sprpriority = 2
ownpal = 1
ontop = 1

; --- Cosas de Fatality ---

[State 181, Fatality]
type = Playsnd
triggerall = Var(4) = 1
trigger1 = time = 270
trigger1 = WinPerfect
trigger2 = time = 140
trigger2 = !WinPerfect
value = F200, var(4)
volume = 50

; --- Cosas de Babality ---

[State 181, Babality]
type = Playsnd
triggerall = Var(4) = 2
trigger1 = time = 270
trigger1 = WinPerfect
trigger2 = time = 140
trigger2 = !WinPerfect
value = F200, var(4)
volume = 50

; --- Cosas de Friendship ---

[State 181, friendship]
type = Playsnd
triggerall = Var(4) = 3
trigger1 = time = 285
trigger1 = WinPerfect
trigger2 = time = 155
trigger2 = !WinPerfect
value = F200, var(4)
volume = 50

; --- Cosas de Animality ---

[State 210, 1]
type = StopSnd
trigger1 = time = 0
triggerall = Var(4) = 4
channel = -1

[State 210, 1]
type = Playsnd
trigger1 = time = 1
triggerall = Var(4) = 4
value = F5,53
volume = 600

[State 431, 3.2]
type = Varset
trigger1 = Time = 0
v = 45
value = 0

[State 431, 3.2]
type = VarRandom
trigger1 = Time = 1
v = 45
range = 0,1

[State 181, animality]
type = Playsnd
triggerall = Var(4) = 4
trigger1 = time = 260;270
trigger1 = WinPerfect
trigger2 = time = 130;140
trigger2 = !WinPerfect
value = F200, var(4)+(var(45)*10)
volume = 50

; --- Cosas de Brutality ---

;sonidos de brutality
[State 181, brutality]
type = Playsnd
trigger1 = time = 270
trigger2 = time = 273
trigger3 = time = 276
trigger4 = time = 279
trigger5 = time = 282
trigger6 = time = 285
trigger7 = time = 288
trigger8 = time = 291
trigger9 = time = 294
triggerall = Var(4) = 5
triggerall = WinPerfect
value = F5,21

[State 181, brutality]
type = Playsnd
trigger1 = time = 140
trigger2 = time = 143
trigger3 = time = 146
trigger4 = time = 149
trigger5 = time = 152
trigger6 = time = 155
trigger7 = time = 158
trigger8 = time = 161
trigger9 = time = 164
triggerall = Var(4) = 5
triggerall = !WinPerfect
value = F5,21

[State 181, brutality]
type = Playsnd
triggerall = Var(4) = 5
trigger1 = time = 310
trigger1 = WinPerfect
trigger2 = time = 180
trigger2 = !WinPerfect
value = F200, var(4)
volume = 50

; --- Cosas de Hara-Kiri ---

[State 181, harakiri]
type = Playsnd
triggerall = Var(4) = 6
trigger1 = time = 260;270
trigger1 = WinPerfect
trigger2 = time = 130;140
trigger2 = !WinPerfect
value = F200, var(4)
volume = 600

;---------------------------------------------------------------------------
; INTRO
[Statedef 191]
type = S
ctrl = 0
velset = 0,0,0
sprpriority = 5

[State 191, Enter]
type = ChangeState
trigger1 =  1
triggerall = var(30) = 10002
triggerall = numpartner = 0
triggerall = NumEnemy != 2
triggerall = p2name = "shao kahn,"
value = 193


[State 191, IntroAssert] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro


[State 191, Entesr]
type = ChangeState
triggerall =  1
trigger1 = var(30) != 10002
trigger1 = p2name != "shao kahn,"
trigger2 = numenemy = 2
trigger3 = numpartner = 1
trigger4 = p2name = "shao kahn,"
trigger4 = var(30) != 10002
trigger4 = time = 90
value = 0
ctrl = 0


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

[Statedef 193]
type = S
ctrl = 0
velset = 0,0,0
sprpriority = 1
anim = 888

[State 181, DIED]
type = Explod
trigger1 = time = 0
anim = 20
id = 20
pos = 90,180
vel = 2,.3
postype = left
facing = 1
sprpriority = 5
ownpal = 1
ontop = 1
removetime = -1

[State 181, DIEsD]
type = removeExplod
trigger1 = time = 40
trigger2 = time = 120
id = 20

[State 181, DIED3]
type = Explod
trigger1 = time = 40
anim = 0
id = 20
pos = 170,190
postype = left
facing = 1
sprpriority = 5
ownpal = 1
ontop = 1
removetime = -1


[State 181, DIED]
type = Explod
trigger1 = time = 0
anim = F39
;id = 789
pos = 380,240
postype = left
facing = 1
sprpriority = 3
ownpal = 1

[State 181, DIEDfg]
type = Explod
trigger1 = time = 120
anim = F40
;id = 789
pos = 320,240
postype = left
facing = 1
sprpriority = 4
ownpal = 1

[State 181, DIE34D]
type = Explod
trigger1 = time = 120
anim = F37
id = 37
pos = 254,189
postype = left
facing = 1
sprpriority = 5
ownpal = 1

[State 181, DdfIE34D]
type = removeExplod
trigger1 = time = 190
id = 37

[State 191, IntroAssert] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 181, DIED]
type = Explod
trigger1 = time = 460
anim = F39
;id = 789
pos = 330,240
postype = left
facing = 1
sprpriority = 5
ownpal = 1

[State 181, DsdD]
type = Explod
trigger1 = time = 460
anim = 100
pos = 130,190
postype = left
facing = 1
vel = 6,0
sprpriority = 5
ownpal = 1
ontop = 1
removetime = 50

[State 181, DdD]
type = Playsnd
trigger1 = time = 460
value = 1,0
volum = 100

[State 181, zssD]
type = Removeexplod
trigger1 = time = 520

[State 191, Enter]
type = ChangeState
trigger1 =  time = 520
value = 0
ctrl = 0

;----------------------------------------------
[Statedef 601]
type    = A
movetype= A
physics = A
juggle  = 1
ctrl = 0
;anim = 601


[State 620, 534]
type = VelSet
trigger1 = time = 0
Y = 3

[State 601, 1]
type = VelSet
trigger1 = Vel X != 0
X = 0

[State -1, 2]
type = Selfstate
value = 202
trigger1 = p2bodydist X <= 10
triggerall = command = "y" | command = "b"

[State -1, 23]
type = Selfstate
value = 204
trigger1 = p2bodydist X <= 10
triggerall = command = "x"

;PUNCH HITS (HEY! NO BLOOD)
[Statedef 611]
type    = A
movetype= A
physics = A
juggle  = 1
ctrl = 0
;anim = 611

[State 620, 4]
type = VelSet
trigger1 = time < 5
X = -.1

[State 620, 534]
type = VelSet
trigger1 = time = 0
Y = 2

[State -1, 2]
type = Selfstate
value = 202
trigger1 = p2bodydist X <= 10
triggerall = command = "y" | command = "b"

[State -1, 23]
type = Selfstate
value = 204
trigger1 = p2bodydist X <= 10
triggerall = command = "x"


[State 611, 4]
type = Changestate
trigger1 = Pos Y = 0
value = 0

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

[Statedef 24]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 27
sprpriority = 1

[State 800, 1]
type = HitDef
Trigger1 = animelem = 2
pausetime = 10,40
attr = S, NT          ;Attributes: Standing, Normal Throw
hitflag = CM          ;Affect only ground people who are not being hit
priority = 2, Miss    ;Throw has low priority, must be miss or dodge type.
damage = 240
sparkno = -1 
hitsound = 5,14         ;No spark
sprpriority = 1      ;Draw in front of p2
p2facing = -1       ;Force p2 to face KFM
p1stateno = 25       ;On success, KFM changes to state 810
p2stateno = 26       ;If hit, p2 changes to state 820 in KFM's cns
guard.dist = 0        ;This prevents p2 from going into a guard state if close
fall.recover = 0
kill       = (Var(9) = 0)
fall.kill  = (Var(9) = 0)
guard.kill = (Var(9) = 0)

[State 800, 2]
type = ChangeState
Trigger1 = Animtime = 0
value = 0
ctrl = 1

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

[Statedef 25]
type    = S
movetype= A
physics = N
anim = 25

[State 820, 1]
type = Sprpriority
Trigger1 = Time = 0
value = 1

;[State 810, Throw Sounder]
;type = PlaySnd
;trigger1 = AnimElem = 4
;value = 5, 14

[State 810, Bind 7]
type = TargetBind
trigger1 = TIME = 1
pos = 60, 0

;[State 810, nd]
;type = TURN
;trigger1 = Animtime =  0

[State 810, State End]
type = ChangeState
trigger1 = Animtime =  0
value = 0
ctrl = 1

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

[Statedef 26]
type    = A
movetype= H
physics = N
velset = 0,0
anim = 26
;sprpriority = -1

[State 9010, 0.1]
type = Sprpriority
trigger1 = animtime = 0
value  >= 2

[State 820, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 26

;[State 820, 435E1]
;type = velset
;Trigger1 = animtime = 0
;Y = -.3

;[State 820, 4435E1]
;type = velSET
;Trigger1 = animtime = 0
;X = -1

[State 820, 4351]
type = VelAdd
Trigger1 = time >= 8
Trigger1 = time <= 14
x = -1.9
;y = -.3 

;[State 820, 4351]
;type = VelAdd
;Trigger1 = Animtime = 0
;y = 5 
;x = -5

[State 810, nd]
type = TURN
trigger1 = Animtime =  0

[State 821, 4] ;Hit ground
type = SelfState
trigger1 = animtime =  0
value = 5050 ;Hit ground

;---------------------------
[Statedef 10101]
type    = S
movetype= H
physics = N
velset = 0,999
ctrl = 0
anim = 702

[State 9125, 0.3]
type = SprPriority
trigger1 = time = 0
value = 0

[State 9125, 2.6]
type = Posset
trigger1 = time = 0
Y = 900

[State 9125, OkayYouCanStop]
type = PalFX
trigger1 = time = 1
time = 1
add = 0, 0, 0
mul = 0, 0, 0

[State 9100, NoBGM]
type = AssertSpecial
trigger1 = Time >= 1
flag = nokoslow

[State 9125, 3]
type = Lifeadd
trigger1 = Time = 1
Value = -9999

[State 9125, 2]
type = Selfstate
trigger1 = Time = 20
value = 5150

;------------------------SPECIALLLLLLLL
[Statedef 2]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
velset = 20,0,0
anim = 2

[State 210, snd2]
type = Playsnd
trigger1 = AnimElem = 4
value = 4,16

[State 210, snd222]
type = Playsnd
trigger1 = AnimElem = 8
value = 3,9

[State 210, 2b]
type = HitDef
trigger1 = AnimElem = 8
trigger1 = p2stateno != 10210
attr = S, NA
animtype  = Medium
damage    = 150, 29
guardflag = L
;hitflag = MAF
pausetime = 20,2
sparkno = -1
guard.sparkno = -1
p2stateno = 10210
ground.type = Low
ground.velocity = 0,0
air.velocity = 0,0
air.hittime = 0
envshake.time = 30
envshake.freq = 90
envshake.ampl = 12
fall.recover = 0
kill       = (Var(9) = 0)
fall.kill  = (Var(9) = 0)
guard.kill = (Var(9) = 0)


[State 200, 7]
type = ChangeState
trigger1 = Animtime = 0
value = 5120
ctrl = 1

 ;------------------------------------
;;----------------
[Statedef 10210]
type    = S
movetype= H
physics = S
velset = 0,0,0
ctrl = 0

[State 10210, 1]
type = Changeanim
trigger1 = animexist(5300)
trigger1 = anim != 5300
trigger1 = Vel Y = 0
trigger1 = statetype != A
value = 5300

[State 10210, 2]
type = Changeanim2
trigger1 = !animexist(5300)
trigger1 = anim != 9010
trigger1 = Vel Y = 0
trigger1 = statetype != A
value = 9010


[State 9010, 034.1]
type = PosSet
trigger1 = p2stateno =[0,9999]
Y = 0

[State 9010, 034.12]
type = VELSet
trigger1 = p2stateno =[0,9999]
Y = 0


[State 10210, 3]
type = Selfstate
trigger1 = time = 120
value = 0
ctrl = 1

[State 821, 4] ;Hit ground
type = SelfState
trigger1 = roundstate = 3
trigger1 = time = 100
value = 5050
ctrl = 1

;;----------------
[Statedef 10211]
type    = s
movetype= H
physics = S
velset = 0,0
ctrl = 0

[State 10211, 1]
type = Changeanim
trigger1 = animexist(5300)
trigger1 = anim != 5300
trigger1 = Vel Y = 0
trigger1 = statetype != A
value = 5300

[State 9010, 034.1]
type = PosSet
trigger1 = p2stateno =[0,9999]
Y = 0

[State 9010, 034.12]
type = VELSet
trigger1 = p2stateno =[0,9999]
Y = 0

[State 10211, 2]
type = Changeanim2
trigger1 = !animexist(5300)
trigger1 = anim != 9010
trigger1 = Vel Y = 0
trigger1 = statetype != A
value = 9010

[State 10211, 22]
type = LifeAdd
trigger1 = time = 1
value = -50

[State 10211, 22]
type = Playsnd
trigger1 = time = 1
value = 3,10
channel = 1 
lowpriority = 1

[State 10211, 22]
type = Playsnd
trigger1 = time = 1
value = 14,0
channel = 2
lowpriority = 2

[State 10211, 3]
type = Selfstate
trigger1 = time = 220
value = 0
ctrl = 1

[State 821, 4] ;Hit ground
type = SelfState
trigger1 = roundstate = 3
trigger1 = time = 100
value = 5050
ctrl = 1

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

;COMBO
[Statedef 202]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
juggle  = 1                      ;Number of air juggle points move takes
velset = 10,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0        
anim = 2242                       ;Change animation (Def: no change)

[State 201, 347]
type = EnvShake
trigger1 = p2stateno = [130,155]
trigger1 = time = 5
time = 10
freq = 30
ampl = 5   

[State 200, Play]
type = PlaySnd
trigger1 = time = 1
trigger1 = 1
value = F5, 15

[State 200, Pl]
type = HitFallSet
trigger1 = 1
value = 0

[State 200, P23l]
type = PosSet
trigger1 = 1
Y = 0

[State 201, 1]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA                     ;Attribute: Standing, Normal Attack
damage    = 45, 22                   ;Damage that move inflicts
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
air.animtype = Back
guardflag = HL
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 2, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
p2facing = 1
pausetime = 0,2                  ;Time attacker pauses, time victim shakes
sparkno = -1
ground.cornerpush.veloff = 0    
sparkxy = -10,-105
guard.sparkno = -1
hitsound = 5,1
guardsound = 5,14             
ground.type = High                 ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5
ground.hittime  = 20
guard.velocity = -15
guard.slidetime = 20
guard.ctrltime = 20 
ground.velocity = 0,0              ;Time to regain control after guard (def: guard.slidetime)
guard.velocity = -2
air.velocity = -2, 1
airguard.velocity = -1.9            ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.fall = 1
fall.recover = 0
kill       = (Var(9) = 0)
fall.kill  = (Var(9) = 0)
guard.kill = (Var(9) = 0)
envshake.time = 10
envshake.freq = 30
envshake.ampl = 5   

[State 201, 7]
type = ChangeState
trigger1 = AnimTime = 0 
value = 0
ctrl = 1

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

[Statedef 203]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
juggle  = 1                      ;Number of air juggle points move takes
velset = 20,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0        
anim = 210                       ;Change animation (Def: no change)

[State 2, blood111]
type = Helper
trigger1 = movehit
trigger1 = numhelper(27) < 1
ID = 27
stateno = 27
pos = 0, 0
postype = p1
persistent = 0
ignorehitpause = 1

[State 201, 347]
type = EnvShake
trigger1 = p2stateno = [130,155]
trigger1 = time = 5
time = 10
freq = 30
ampl = 5   

[State 200, Play]
type = PlaySnd
trigger1 = time = 1
trigger1 = 1
value = F5, 15

[State 201, 1]
type = HitDef
trigger1 = AnimElem = 6
attr = S, NA                     ;Attribute: Standing, Normal Attack
damage    = 30, 10                   ;Damage that move inflicts
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
air.animtype = Back
ground.cornerpush.veloff = 0           
guardflag = HL
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 2, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
pausetime = 0,2                  ;Time attacker pauses, time victim shakes
sparkno = -1
sparkxy = -10,-105
p2facing = 1
guard.sparkno = -1
hitsound = 5,21
guardsound = 5,14             
ground.type = High                 ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5
ground.hittime  = 20
guard.velocity = -15
guard.slidetime = 20
guard.ctrltime = 20 
ground.velocity = 0,0              ;Time to regain control after guard (def: guard.slidetime)
guard.velocity = -2
air.velocity = -2, 1
airguard.velocity = -1.9            ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.fall = 1
fall.recover = 0


kill       = (Var(9) = 0)
fall.kill  = (Var(9) = 0)
guard.kill = (Var(9) = 0)
envshake.time = 10
envshake.freq = 30
envshake.ampl = 5   

[State 201, 7]
type = ChangeState
trigger1 = AnimTime = 0 
value = 0
ctrl = 1
;-----------------

[Statedef 204]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
juggle  = 1                      ;Number of air juggle points move takes
velset = 20,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0        
anim = 222                       ;Change animation (Def: no change)

[State 2, blood111]
type = Helper
trigger1 = movehit
trigger1 = numhelper(26) < 1
ID = 26
stateno = 27
pos = 0, 0
postype = p1
persistent = 0
ignorehitpause = 1

[State 201, 347]
type = EnvShake
trigger1 = p2stateno = [130,155]
trigger1 = time = 5
time = 10
freq = 30
ampl = 5   


[State 200, Play]
type = PlaySnd
trigger1 = time = 1
trigger1 = 1
value = F5, 15

[State 200, Pl]
type = HitFallSet
trigger1 = 1
value = 0

[State 200, P23l]
type = PosSet
trigger1 = 1
Y = 0

[State 201, 1]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA                     ;Attribute: Standing, Normal Attack
damage    = 30, 10                   ;Damage that move inflicts
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
air.animtype = Back
ground.cornerpush.veloff = 0           
guardflag = HL
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 2, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
pausetime = 0,2                  ;Time attacker pauses, time victim shakes
sparkno = -1
sparkxy = -10,-105
guard.sparkno = -1
hitsound = 5,1
guardsound = 5,14             
p2facing = 1
ground.type = HIGH                 ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5
ground.hittime  = 20
guard.velocity = -15
guard.slidetime = 20
guard.ctrltime = 20 
ground.velocity = 0,0              ;Time to regain control after guard (def: guard.slidetime)
guard.velocity = -2
air.velocity = -2, 1
airguard.velocity = -1.9            ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.fall = 1
fall.recover = 0
kill       = (Var(9) = 0)
fall.kill  = (Var(9) = 0)
guard.kill = (Var(9) = 0)
envshake.time = 10
envshake.freq = 30
envshake.ampl = 5   



[State 201, 7]
type = ChangeState
trigger1 = AnimTime = 0 
value = 0
ctrl = 1
;-----------------

[Statedef 205]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
juggle  = 1                      ;Number of air juggle points move takes
velset = 10,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0        
anim = 223          ;Change animation (Def: no change)

[State 2, blood111]
type = Helper
trigger1 = movehit
trigger1 = numhelper(25) < 1
ID = 25
stateno = 27
pos = 0, 0
postype = p1
persistent = 0
ignorehitpause = 1

[State 201, 347]
type = EnvShake
trigger1 = p2stateno = [130,155]
trigger1 = time = 5
time = 10
freq = 30
ampl = 5   

[State 200, Play]
type = PlaySnd
trigger1 = time = 1
trigger1 = 1
value = F5, 15

[State 201, 1]
type = HitDef
trigger1 = AnimElem = 4
attr = S, NA                     ;Attribute: Standing, Normal Attack
damage    = 30, 10                   ;Damage that move inflicts
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
air.animtype = Back
guardflag = HL
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 2, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
pausetime = 0,2                  ;Time attacker pauses, time victim shakes
sparkno = -1
sparkxy = -10,-105
guard.sparkno = -1
hitsound = 5,21
guardsound = 5,14             
ground.type = High                 ;Type: High, Low, Trip (def: Normal)
p2facing = 1
ground.slidetime = 5
ground.hittime  = 20
guard.velocity = -15
guard.slidetime = 20
guard.ctrltime = 20 
ground.velocity = 0,0              ;Time to regain control after guard (def: guard.slidetime)
guard.velocity = -2
air.velocity = -2, 1
airguard.velocity = -1.9            ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.fall = 1
ground.cornerpush.veloff = 0    
fall.recover = 0


kill       = (Var(9) = 0)
fall.kill  = (Var(9) = 0)
guard.kill = (Var(9) = 0)
envshake.time = 10
envshake.freq = 30
envshake.ampl = 5   

[State 201, 7]
type = ChangeState
trigger1 = AnimTime = 0 
value = 0
ctrl = 1

[Statedef 206]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
juggle  = 1                      ;Number of air juggle points move takes
velset = 10,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0        
anim = 222                       ;Change animation (Def: no change)

[State 2, blood111]
type = Helper
trigger1 = movehit
trigger1 = numhelper(24) < 1
ID = 24
stateno = 27
pos = 0, 0
postype = p1
persistent = 0
ignorehitpause = 1

[State 201, 347]
type = EnvShake
trigger1 = p2stateno = [130,155]
trigger1 = time = 5
time = 10
freq = 30
ampl = 5   

[State 200, Play]
type = PlaySnd
trigger1 = time = 5
trigger1 = 1
value = F5, 15

[State 201, 1]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA                     ;Attribute: Standing, Normal Attack
damage    = 20, 10                   ;Damage that move inflicts
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
air.animtype = Back
guardflag = HL
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 2, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
pausetime = 0,2                  ;Time attacker pauses, time victim shakes
sparkno = -1
sparkxy = -10,-105
guard.sparkno = -1
hitsound = 5,21
guardsound = 5,14             
ground.type = High                 ;Type: High, Low, Trip (def: Normal)
p2facing = 1
ground.slidetime = 5
ground.hittime  = 20
guard.velocity = -15
guard.slidetime = 20
guard.ctrltime = 20 
ground.cornerpush.veloff = 0    
ground.velocity = 0,0              ;Time to regain control after guard (def: guard.slidetime)
guard.velocity = -2
air.velocity = -2, 1
airguard.velocity = -1.9            ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.fall = 1
fall.recover = 0


kill       = (Var(9) = 0)
fall.kill  = (Var(9) = 0)
guard.kill = (Var(9) = 0)
envshake.time = 10
envshake.freq = 30
envshake.ampl = 5   

[State 201, 7]
type = ChangeState
trigger1 = AnimTime = 0 
value = 0
ctrl = 1


[Statedef 207]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
juggle  = 1                      ;Number of air juggle points move takes
velset = 15,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0        
anim = 223                       ;Change animation (Def: no change)

[State 2, blood111]
type = Helper
trigger1 = movehit
trigger1 = numhelper(23) < 1
ID = 23
stateno = 27
pos = 0, 0
postype = p1
persistent = 0
ignorehitpause = 1

[State 201, 347]
type = EnvShake
trigger1 = p2stateno = [130,155]
trigger1 = time = 5
time = 10
freq = 30
ampl = 5   

[State 200, Play]
type = PlaySnd
trigger1 = time = 1
trigger1 = 1
value = F5, 15

[State 201, 1]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA                     ;Attribute: Standing, Normal Attack
damage    = 40, 10                   ;Damage that move inflicts
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
air.animtype = Back
guardflag = HL
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 2, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
pausetime = 0,2                  ;Time attacker pauses, time victim shakes
sparkno = -1
sparkxy = -10,-105
guard.sparkno = -1
hitsound = 5,21
guardsound = 5,14             
ground.type = Low                 ;Type: High, Low, Trip (def: Normal)
p2facing = 1
ground.cornerpush.veloff = 0    
ground.slidetime = 5
ground.hittime  = 20
guard.velocity = -15
guard.slidetime = 20
guard.ctrltime = 20 
ground.velocity = 0,0              ;Time to regain control after guard (def: guard.slidetime)
guard.velocity = -2
air.velocity = -2, 1
airguard.velocity = -1.9            ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.fall = 1
fall.recover = 0


kill       = (Var(9) = 0)
fall.kill  = (Var(9) = 0)
guard.kill = (Var(9) = 0)
envshake.time = 10
envshake.freq = 30
envshake.ampl = 5   

[State 201, 7]
type = ChangeState
trigger1 = AnimTime = 0 
value = 0
ctrl = 1


[Statedef 208]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
juggle  = 1                      ;Number of air juggle points move takes
velset = 15,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0        
anim = 232                       ;Change animation (Def: no change)

[State 2, blood111]
type = Helper
trigger1 = movehit
trigger1 = numhelper(22) < 1
ID = 22
stateno = 27
pos = 0, 0
postype = p1
persistent = 0
ignorehitpause = 1

[State 201, 347]
type = EnvShake
trigger1 = p2stateno = [130,155]
trigger1 = time = 5
time = 10
freq = 30
ampl = 5   

[State 200, Play]
type = PlaySnd
trigger1 = time = 1
trigger1 = 1
value = F5, 15

[State 201, 1]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA                     ;Attribute: Standing, Normal Attack
damage    = 40, 10                   ;Damage that move inflicts
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
air.animtype = Back
guardflag = HL
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 2, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
pausetime = 0,2                  ;Time attacker pauses, time victim shakes
sparkno = -1
ground.cornerpush.veloff = 0    
sparkxy = -10,-105
guard.sparkno = -1
hitsound = 5,21
guardsound = 5,14             
ground.type = High                 ;Type: High, Low, Trip (def: Normal)
p2facing = 1
ground.slidetime = 5
ground.hittime  = 20
guard.velocity = -15
guard.slidetime = 20
guard.ctrltime = 20 
ground.velocity = 0,0              ;Time to regain control after guard (def: guard.slidetime)
guard.velocity = -2
air.velocity = -2, 1
airguard.velocity = -1.9            ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.fall = 1
fall.recover = 0


kill       = (Var(9) = 0)
fall.kill  = (Var(9) = 0)
guard.kill = (Var(9) = 0)
envshake.time = 10
envshake.freq = 30
envshake.ampl = 5   

[State 201, 7]
type = ChangeState
trigger1 = AnimTime = 0 
value = 0
ctrl = 1
;------
[Statedef 209]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
juggle  = 1                      ;Number of air juggle points move takes
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0        
anim = 224                       ;Change animation (Def: no change)

[State 2, blood111]
type = Helper
trigger1 = movehit
trigger1 = numhelper(21) < 1
ID = 21
stateno = 28
pos = 60, 0
postype = p1
persistent = 0
ignorehitpause = 1

[State 201, 347]
type = EnvShake
trigger1 = p2stateno = [130,155]
trigger1 = time = 5
time = 10
freq = 30
ampl = 5   

[State 200, Play]
type = PlaySnd
trigger1 = time = 1
trigger1 = 1
value = F5, 15

[State 201, 1]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA                     ;Attribute: Standing, Normal Attack
damage    = 90, 10                   ;Damage that move inflicts
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
air.animtype = Back
guardflag = HL
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 2, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
pausetime = 0,2                  ;Time attacker pauses, time victim shakes
sparkno = -1
ground.cornerpush.veloff = 0    
sparkxy = -60,-105
guard.sparkno = -1
hitsound = 5,21
guardsound = 5,14             
ground.type = High                 ;Type: High, Low, Trip (def: Normal)
p2facing = 1
ground.slidetime = 5
ground.hittime  = 20
guard.velocity = -15
guard.slidetime = 20
guard.ctrltime = 20 
ground.velocity = -30,0              ;Time to regain control after guard (def: guard.slidetime)
guard.velocity = -2
air.velocity = -2, 1
airguard.velocity = -1.9            ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.fall = 1
fall.recover = 0


kill       = (Var(9) = 0)
fall.kill  = (Var(9) = 0)
guard.kill = (Var(9) = 0)
envshake.time = 10
envshake.freq = 30
envshake.ampl = 5   

[State 201, 7]
type = ChangeState
trigger1 = AnimTime = 0 
value = 0
ctrl = 1
;--------------------------
[Statedef -2]


[State -2, Asser3t]
type = AssertSpecial
trigger1 = var(26) = 1
triggerall = 1
flag = invisible

[State -2, PIT1]
type = Helper
;triggerall = teammode != simul
;triggerall = teammode != single
;triggerall = teammode != turns
;triggerall = numpartner = 0
triggerall = p2stateno != 713
triggerall = p2stateno != 712
triggerall = stateno != 713
triggerall = stateno != 712
trigger1 = roundstate = 0
trigger2 = roundstate = 2
trigger3 = roundstate = 1
trigger4 = roundstate != 3
trigger5 = roundstate != 4
;triggerall = roundno = 1
;triggerall = time = 0
triggerall = time = 5
triggerall = var(30) = 10000
triggerall = NumHelper(4301) < 1
triggerall = var(24) = 0
triggerall = var(24) != 1
triggerall = var(58) = 0
triggerall = var(58) != 1
ID = 4301
stateno = 43001
pos = 25, -110
postype = left


[State -2, 2at]
type = Helper
trigger1 = roundstate = 0
trigger2 = roundstate = 2
triggerall = var(30) = 10005
triggerall = 1
triggerall = NumHelper(768) < 1
ID = 768
stateno = 767
pos = -670, -15
postype = Right


[State -2, Fn]
type = VelSet
trigger1 = NumExplod(18) = 1
trigger1 = 1
trigger1 = FrontEdgeDist <= 390
trigger2 = FrontEdgeDist >= 390
triggerall = var(30) = 10006
trigggerall = stateno = [0,9999]
X = 0

[State -2, BONUSSSCH]
type = Changestate
trigger1 = roundstate = 0
trigger2 = roundstate = 1
trigger3 = roundstate = 2
triggerall = 1
triggerall = var(30) = 10006
;triggerall = NumExplod(14) < 1
triggerall  = stateno = [0,650]
value = 770

[State -2, BONUS]
type = Helper
trigger1 = roundstate = 0
trigger2 = roundstate = 2
triggerall = var(30) = 10006
triggerall = 1
triggerall = NumHelper(767) < 1
ID = 774
stateno = 774
pos = 70, -140
postype = P1


[State 181, Finim]
type = Null
trigger1 = var(30) = 10006
;trigger1 = 1
value = [0,650]

[State -2, Go2]
type = POSFREEZE
trigger1 = var(30) = 10006
trigger1 = life >= 1
VALUE = 1

[State -2, SUBWAY]
type = Explod
triggerall = time = 5
trigger1 = roundstate = 0
trigger2 = roundstate = 1
trigger3 = roundstate = 2
triggerall = Numexplod(7878) = 0
triggerall = Numexplod(787) = 0
triggerall = var(30) = 10007
triggerall = var(6) = 0
anim = F78
ID = 7878
pos = 157,-25
postype = Left
facing = 1
removeongethit = 0
sprpriority = -4
ownpal = 0
time = -1
removetime = -1

[State -2, subwayy]
type = VarSet
triggerall = var(30) = 10007
trigger1 = movetype = A
trigger2 = movetype = H
trigger3 = movetype = A
trigger4 = movetype = H
trigger5 = Numexplod(787) = 1
trigger7 = Numexplod(7878) = 1
trigger9 = p2movetype = A
trigger10 = p2movetype = H
trigger11 = p2movetype = A
trigger12 = p2movetype = H
V = 6
value = 1

[State -2, SUBWAYexx]
type = Explod
triggerall = time = 6
trigger1 = roundstate = 0
trigger2 = roundstate = 1
trigger3 = roundstate = 2
triggerall = Numexplod(787) = 0
triggerall = var(30) = 10007
triggerall = var(6) = 0
anim = F888
ID = 787
pos = 157,-25
postype = Left
facing = 1
removeongethit = 0
sprpriority = -4
ownpal = 0
time = -1
removetime = -1

[State -2,REMOVESUBWAY ]
type = REmoveexplod
trigger1 = stateno = 660
trigger2 = p2stateno = 660
trigger3 = stateno = 512
trigger4 = p2stateno = 512
ID = 7878

[State -2, coourty]
type = Explod
triggerall = time = 5
trigger1 = roundstate = 0
trigger2 = roundstate = 1
trigger3 = roundstate = 2
triggerall = Numexplod(801) = 0
triggerall = Numexplod(802) = 0
triggerall = var(30) = 10010
triggerall = var(6) = 0
triggerall = p2name != "shao kahn,"
triggerall = p1name != "shao kahn,"
triggerall = p3name != "shao kahn,"
triggerall = p4name != "shao kahn,"
anim = F23
ID = 801
pos = 157,200
postype = Left
facing = 1
removeongethit = 0
sprpriority = -4
ownpal = 0
time = -1
removetime = -1
scale = .92,.92

[State -2, courtyexx]
type = Explod
triggerall = time = 6
trigger1 = roundstate = 0
trigger2 = roundstate = 1
trigger3 = roundstate = 2
triggerall = Numexplod(802) = 0
triggerall = var(30) = 10010
triggerall = var(6) = 0
anim = F888
ID = 802
pos = 157,-25
postype = Left
facing = 1
removeongethit = 0
sprpriority = -4
ownpal = 0
time = -1
removetime = -1

[State -2, atasa]
type = Helper
trigger1 = roundstate = 0
trigger2 = roundstate = 2
triggerall = var(30) = 10008
triggerall = 1
triggerall = NumHelper(790) < 1
ID = 790
stateno = 790
pos = 950, 160
postype = Left

[State -2, pit3shao]
type = Explod
triggerall = time = 5
trigger1 = roundstate = 0
trigger2 = roundstate = 1
trigger3 = roundstate = 2
triggerall = Numexplod(801) = 0
triggerall = Numexplod(802) = 0
triggerall = var(30) = 10002
triggerall = var(6) = 0
triggerall = p2name != "shao kahn,"
triggerall = p1name != "shao kahn,"
triggerall = p3name != "shao kahn,"
triggerall = p4name != "shao kahn,"
anim = F37
ID = 801
pos = 680,193
postype = Left
facing = 1
removeongethit = 0
sprpriority = -4
ownpal = 0
time = -1
removetime = -1

[State -2, THRONE]
type = Helper
triggerall = p2name != "shao kahn,"
triggerall = p1name != "shao kahn,"
triggerall = p3name != "shao kahn,"
triggerall = p4name != "shao kahn,"
triggerall = p2stateno != 713
triggerall = p2stateno != 712
triggerall = stateno != 713
triggerall = stateno != 712
trigger1 = roundstate = 0
trigger2 = roundstate = 2
trigger3 = roundstate = 1
triggerall = time = 5
triggerall = var(30) = 10016
triggerall = NumHelper(810) < 1
triggerall = var(24) = 0
triggerall = var(24) != 1
triggerall = var(58) = 0
triggerall = var(58) != 1
ID = 810
stateno = 810
pos = 161, -50
postype = left

[State -2, stageID ]
type = VarSet
;triggerall = var(59) < 3
triggerall = var(30) = 0
trigger1 = ScreenPos Y = 10000 ;pit I
trigger2 = ScreenPos Y = 10001 ;bellpit 
trigger3 = ScreenPos Y = 10002 ;pit III
trigger4 = ScreenPos Y = 10003 ;prison
trigger5 = ScreenPos Y = 10004 ;blood
trigger6 = ScreenPos Y = 10005 ;saw
trigger7 = ScreenPos Y = 10006 ;bonus
trigger8 = ScreenPos Y = 10007 ;subway
trigger9 = ScreenPos Y = 10008 ;press
trigger10 = ScreenPos Y = 10009 ;karena
trigger11 = ScreenPos Y = 10010 ;courtyard
trigger12 = ScreenPos Y = 10011 ;balcony
trigger13 = ScreenPos Y = 10012 ;golden
trigger14 = ScreenPos Y = 10013 ;shouse
trigger15 = ScreenPos Y = 10014 ;pit2
trigger16 = ScreenPos Y = 10015 ;tomb
trigger17 = ScreenPos Y = 10016 ;throne
trigger17 = p2name != "shao kahn,"
trigger17 = p1name != "shao kahn,"
trigger17 = p3name != "shao kahn,"
trigger17 = p4name != "shao kahn,"
v = 30
value = floor( ScreenPos Y )


[State -2, Asert]
type = AssertSpecial
trigger1 = var(30) = 22
trigger2 = numexplod(4302) >= 1
flag = noBG
flag2 = noFG

[State -2, Aser]
type = AssertSpecial
trigger1 = 1
flag = nostandguard
flag2 = nocrouchguard

[State -2, Balcony]
type = Helper
;triggerall = teammode != simul
triggerall = teammode != single
;triggerall = teammode != turns
triggerall = numpartner = 0
triggerall = p2stateno != 713
triggerall = p2stateno != 712
triggerall = stateno != 713
triggerall = stateno != 712
trigger1 = roundstate = 0
trigger2 = roundstate = 2
trigger3 = roundstate = 1
trigger4 = roundstate != 3
trigger5 = roundstate != 4
;triggerall = roundno = 1
;triggerall = time = 0
triggerall = 1
triggerall = var(30) = 10011
triggerall = NumHelper(711) < 1
triggerall = var(24) = 0
triggerall = var(24) != 1
triggerall = var(58) = 0
triggerall = var(58) != 1
ID = 711
stateno = 821
pos = 25, -110
postype = left

[State -2, balconyex2e]
type = VarSet
trigger1 = stateno = 713
trigger1 = p2stateno = 712
trigger2 = p2stateno = 713
trigger2 = stateno = 712
V = 22
value = 1

[State -2, balconyex2eds]
type = VarSet
trigger1 = stateno = 713
trigger1 = p2stateno = 712
trigger2 = p2stateno = 713
trigger2 = stateno = 712
V = 58
value = 1

[State -2, balconyex]
type = Explod
triggerall = numpartner = 0
triggerall = time = 0
triggerall = 1
trigger1 = roundstate = 0
trigger2 = roundstate = 1
trigger3 = roundstate = 2
triggerall = Numexplod(712) < 1
triggerall = var(30) = 10011
anim = 888
ID = 712
pos = 0*const(size.xscale),0*const(size.xscale)
postype = p1
bindtime = -1
facing = 1
sprpriority = 2
ontop = 1
ownpal = 1
removetime = -1

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


[State -2, Frosty color]
type = palFX
triggerall = time = 1
trigger1 = palno = 6
add = 100,150,250	
mul = 200,200,200
time = 9999

[State -2, 234]
type = VelAdd
trigger1 = p2stateno = 210
trigger2 = p2stateno = 225
;triggerall = movetype = H
triggerall = time < 12
triggerall = p2bodydist X < 80
;triggerall = p2bodydist X > 0
triggerall = stateno = [5000,5012]
triggerall = stateno != [130,155]
x = -5

[State -2, 2234]
type = VelAdd
trigger1 = p2stateno = [400,420]
;triggerall = movetype = H
triggerall = time < 12
triggerall = p2bodydist X < 80
triggerall = p2bodydist X > 0
triggerall = stateno = [5000,5012]
triggerall = stateno != [130,155]
x = -6

[State -2, 22340]
type = VelAdd
trigger1 = p2stateno = [400,420]
;triggerall = movetype = H
triggerall = time > 4
triggerall = time < 12
triggerall = p2bodydist X < 80
triggerall = p2bodydist X > 0
triggerall = stateno = [5000,5012]
triggerall = stateno != [130,155]
x = 5

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

[State -2, 34]
type = Playsnd
triggerall = time = 0
trigger1 = p2stateno = [600,621]
triggerall = movetype = H
triggerall = stateno != [120,155]
value = 3,8
channel = 3

[State -2, 4]
type = Playsnd
triggerall = time = 1
trigger1 = Anim = 21238
trigger2 = Anim = 5010
trigger3 = Anim = 5020
triggerall = movetype = H
value = 3,8
channel = 3
persistent = 1

[State -2, 4]
type = Playsnd
triggerall = Time = 1
triggerall = Var(1) = [0, 24]
triggerall = anim != [100, 300]
triggerall = stateno != 12001
triggerall = anim != [5000, 5025]
triggerall = anim != [5025, 5027]
triggerall = anim != [5035, 5050]
triggerall = anim != [5080, 5150]
triggerall = anim != [5160, 9999]
triggerall = stateno != 5150
triggerall = p2stateno != 245
triggerall = p2stateno != 25
triggerall = p2stateno != 1001
triggerall = p2statetype != A
trigger1 = movetype = H
triggerall = p2stateno != [3000,3999]
triggerall = stateno != [9000,9999]
value = 3,0
channel = 3

[State -2, 4.1]
type = Playsnd
triggerall = Time = 1
triggerall = Var(1) = [25, 49]
triggerall = anim != [100, 300]
triggerall = anim != [5000, 5025]
triggerall = stateno != 12001
triggerall = p2stateno != 25
triggerall = anim != [5035, 5050]
triggerall = anim != [5080, 5100]
triggerall = anim != [5110, 9999]
triggerall = stateno != 5150
triggerall = p2stateno != 245
triggerall = p2stateno != 1001
triggerall = p2statetype != A
trigger1 = movetype = H
triggerall = p2stateno != [3000,3999]
triggerall = stateno != [9000,9999]
value = 5,14
channel = 3

[State -2, jumpup]
type = PlaySnd
triggerall = anim = 40
trigger1 = time = 4
value = 3, 9
channel = 3

;[State -2, adddasa]
;type = assertspecial
;trigger1 = p2life <= 1 
;;trigger2 = life <= 1 
;triggerall = NumEnemy != 2
;trigger3 = stateno = 180
;trigger4 = stateno = 660
;flag = nomusic

[State -2, nd]
type = PlaySnd
triggerall = anim  = 441
trigger1 = animelem = 7
trigger2 = animelem = 9
value = F7,0
channel = 3

[State -2, ndsd]
type = PlaySnd
triggerall = anim  = 441
trigger1 = time = 2
channel = 4
value = 4,1

[State -2, 23ndsdert]
type = PlaySnd
triggerall = anim  = 441
trigger1 = time = 2
trigger2 = time = 4
channel = 5
value = 1,1

[State -2, nd34sd]
type = PlaySnd
triggerall = stateno  = 2457
trigger1 = time = 6
channel = 4
value = 4,1

[State -2, 23ndsd]
type = PlaySnd
triggerall = stateno  = 2457
trigger1 = time = 2
trigger2 = time = 4
channel = 5
value = 1,1


[State =2, Bolt]
type = Superpause
trigger1 = time = 8
trigger2 = time = 14
trigger3 = time = 20
trigger4 = time = 25
trigger5 = time = 28
trigger6 = time = 35
trigger7 = time = 42
trigger8 = time = 53
trigger9 = time = 66
triggerall = anim = 441
anim = 3
darken = 0
time = 0
pos = 0,-110

[State -2, Bolt]
type = EnvShake
triggerall = anim = 661
trigger1 = animelem = 7
trigger2 = animelem = 11
freq = 48
time = 10
ampl = 7

[State -2, ound]
type = PlaySnd
triggerall = anim = 661
trigger1 = Animelem = 11
value = F7, 0
volume = 100

[State =2, Boltdfg]
type = Superpause
trigger1 = time = 8
trigger2 = time = 14
trigger3 = time = 20
trigger4 = time = 25
trigger5 = time = 28
trigger6 = time = 35
trigger9 = time = 66
triggerall = anim = 701
anim = 3
darken = 0
time = 0
pos = 10,-70

[State -2, Btdfg]
type = Superpause
trigger1 = time = 8
trigger2 = time = 14
trigger3 = time = 20
trigger4 = time = 25
trigger5 = time = 28
trigger6 = time = 35
trigger7 = time = 42
triggerall = anim = 701
anim = 1
darken = 0
time = 0
pos = 0,-65

[State -2, sh]
type = EnvShake
triggerall = anim = 441
trigger1 = Animelem = 7
trigger2 = Animelem = 9
freq = 110
time = 15
ampl = -10


[State -2, shdgf]
type = Playsnd
triggerall = anim = 701
trigger1 = Animelem = 4
trigger2 = Animelem = 6
value = F7,0

[State -2, shxcv]
type = EnvShake
triggerall = anim = 701
trigger1 = Animelem = 4
trigger2 = Animelem = 6
freq = 110
time = 15
ampl = -10


[State -2, shdfghfgf]
type = Playsnd
triggerall = anim = 701
trigger1 = time = 27
value = F7,0

[State -2, shfxcv]
type = EnvShake
triggerall = anim = 701
trigger1 = time = 27
freq = 80
time = 10
ampl = -10

; Carga completa al empezar los rounds
[State -2, cargabarra]
type = PowerAdd
trigger1 = RoundState != 2
value = 3000

[State -2, runbar]
type = VarSet
trigger1 = time = 0
v = 47
value = power

; recarga de barra de run

[State -2, cargabarra]
type = PowerAdd
trigger1 = command != "run"
trigger1 = command != "holdfwd"
trigger1 = var(47) > 0
trigger2 = command != "run"
trigger2 = command != "holdfwd"
trigger2 = NumExplod(7081) = 0
trigger2 = var(47) <= 0
trigger3 = command != "run"
trigger3 = command = "holdfwd"
trigger3 = var(47) > 0
trigger4 = command != "run"
trigger4 = command = "holdfwd"
trigger4 = NumExplod(7081) = 0
trigger4 = var(47) <= 0
trigger5 = command = "run"
trigger5 = command != "holdfwd"
trigger5 = var(47) > 0
trigger6 = command = "run"
trigger6 = command != "holdfwd"
trigger6 = NumExplod(7081) = 0
trigger6 = var(47) <= 0
triggerall = NumExplod(7080) = 0
value = power + (time*62);62.5 es en arcade

;======================================================================
; FATALITY RELATED

[Statedef -3]

;tututunnnn!
[State 210, 1]
type = Playsnd
trigger1 = (((stateno%100 = 0) || (stateno = 3997) || (stateno = 3503)) && stateno = [3000, 4999])
triggerall = time = 2
value = F5,11
volume = 60
channel = 1

[State 8000, sad]
type = BGPalFX
triggerall = (time%5 = 0) && (time < 31)
trigger1 = (((stateno%100 = 0) || (stateno = 3997) || (stateno = 3503)) && stateno = [3000, 3999])
time = 9999
add = -(time + 10),-(time + 10),-(time + 10)

[State -2, adasa]
type = assertspecial
trigger1 = roundstate = 3
trigger2 = roundstate = 4
trigger3= stateno = [3000, 4999]
trigger4= p2stateno = [9000, 9999]
flag = nomusic

;fuera sonidos en fatales o mercy
[State -2, fgnd]
type = Stopsnd
trigger1 = (((stateno%100 = 0) || (stateno = 3997) || (stateno = 3503)) && stateno = [3000, 4999])
triggerall = time = 1
channel = -1

;arregla el bug del tiempo
[State -2, 1]
type = AssertSpecial
trigger1 = stateno = [3000,4999]
trigger2 = stateno = [9000,9999]
flag = timerfreeze

[State -2,99]
type = Changestate
trigger1 = numexplod(7050)= 1
value = 9010

[State -3, Landing Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52 ;Jump land
value = F20, 0

[State -2, Check Fatal]
type = VarSet
trigger1 = p2Name != "Shao Kahn"
trigger1 = p2life <= 1
trigger1 = p2MoveType = H
trigger1 = p2stateno != 1020
trigger1 = stateno != 1020
trigger1 = p2stateno != 1021
trigger1 = stateno != 1021
trigger1 = Var(9) = 1
triggerall = p2stateno != [3500,3599]
v = 3
value = 1

[State -2, 7.644]
type = Varset
trigger1 = p2stateno = 9010
v = 19
value = 1

[State -2, 0] 
type = varset
triggerall = Win = 1
triggerall = NumHelper(9010) = 0
trigger1 = teammode = single
trigger2 = teammode = simul
trigger3 = teammode = turns
;trigger4 = Var(12) != 1
;trigger4 = Win = 1
;trigger4 = NumHelper(9010) = 0
v = 59 
value = 1

[State -2, 1] 
type = varset
trigger1 = Win = 1
trigger1 = NumHelper(9010) = 1
trigger1 = p2life != 0
trigger2 = teammode = simul
trigger3 = NumEnemy = 2
;trigger4 = Var(12) = 1
v = 59 
value = 0

[State -2,9459]
type = Lifeset
trigger1 = life <= 1
trigger1 = p2life <= 1
trigger1 = MoveType = H
trigger1 = p2MoveType = H
value = 2


[state -2, 1]
type = Helper
trigger1 = p2Name != "Shao Kahn"
trigger1 = NumHelper(9010) = 1 ; invisible one ought to be ON the screen
trigger1 = NumHelper(9011) = 0 ; this one shouldn't be ON the screen
trigger1 = enemy(0), stateno = 9010 ; enemy have to be in this state
trigger1 = Var(4) = 0
trigger1 = Var(19) = 0
trigger1 = Var(12) != 1
ID = 9011 ; IMPORTANT!
pos = 160, -140
postype = left
stateno = 9000
helpertype = normal
name = "Finish Him!! MSG"
keyctrl = 0
ownpal = 1

;FINISH SOUND SAMPLE
[State -2, 5.999]
type = Playsnd
trigger1 = P2Name != "jade"
trigger1 = P2Name != "sheeva"
trigger1 = P2Name != "kitana"
trigger1 = P2Name != "sindel"
trigger1 = P2Name != "sonya"
trigger1 = P2Name != "mileena"
triggerall = Var(3) = 1
triggerall = Var(19) = 0
triggerall = Var(13) = 0
triggerall = p2life = 1 
triggerall = p2life != 0
triggerall = p2stateno != 5050
triggerall = p2stateno != 5150
triggerall = p2stateno != 5090
triggerall = Var(59) = 1
value = F5, 7
Channel = 4
persistent = 3
volume = 110

;FINISH SOUND SAMPLE
[State -2, 599]
type = Playsnd
trigger1 = P2Name = "jade"
trigger2 = P2Name = "kitana"
trigger3 = P2Name = "sheeva"
trigger4 = P2Name = "sindel"
trigger5 = P2Name = "sonya"
trigger6 = P2Name = "mileena"
triggerall = Var(3) = 1
triggerall = Var(19) = 0
triggerall = Var(13) = 0
triggerall = p2life = 1 
triggerall = p2life != 0
triggerall = p2stateno != 5050
triggerall = p2stateno != 5150
triggerall = p2stateno != 5090
triggerall = Var(59) = 1
value = F5, 25
Channel = 4
persistent = 3
volume = 110

[State 181, FinishHim]
type = Explod
trigger1 = P2Name != "jade"
trigger1 = P2Name != "sheeva"
trigger1 = P2Name != "kitana"
trigger1 = P2Name != "sindel"
trigger1 = P2Name != "sonya"
trigger1 = P2Name != "mileena"
triggerall = Var(3) = 1
triggerall = Var(19) = 0
triggerall = Var(13) = 0
triggerall = p2life = 1 
triggerall = p2life != 0
triggerall = p2stateno != 5050
triggerall = p2stateno != 5150
triggerall = p2stateno != 5090
anim = F5
pos = 156*const(size.xscale),80*const(size.xscale)
postype = left
bindtime = -1
facing = 1
sprpriority = 2
ontop = 1
ownpal = 1

[State 181, FinishHer]
type = Explod
trigger1 = P2Name = "jade"
trigger2 = P2Name = "kitana"
trigger3 = P2Name = "sheeva"
trigger4 = P2Name = "sindel"
trigger5 = P2Name = "sonya"
trigger6 = P2Name = "mileena"
triggerall = Var(3) = 1
triggerall = Var(19) = 0
triggerall = Var(13) = 0
triggerall = p2life = 1 
triggerall = p2life != 0
triggerall = p2stateno != 5050
triggerall = p2stateno != 5150
triggerall = p2stateno != 5090
anim = F8
pos = 156*const(size.xscale),80*const(size.xscale)
postype = left
bindtime = -1
facing = 1
sprpriority = 2
ontop = 1
ownpal = 1

[State -2, fgnd]
type = Stopsnd
trigger1 = time = 1
trigger1 = p2stateno = [5000,5200]
trigger1 = life <= 1 
trigger2 = RoundState = 4
channel = 1

[State -2, 6]
type = Helper
trigger1 = Var(3) = 1
trigger1 = p2Name != "Shao Kahn"
trigger1 = p2life != 0
trigger1 = Var(19) = 0
trigger1 = p2life = 1 
trigger1 = p2stateno != 5090
trigger1 = p2stateno != 5050
trigger1 = p2stateno != 5150
trigger1 = Var(4) = 0 
trigger1 = Var(59) = 1
stateno = 9000
name = "Fatality"
id = 9000
pos = 0, 0
helpertype = normal
sprpriority = 1
keyctrl = 0
ownpal = 1
under = 1

[State -2, 7.6]
type = Varset
trigger1 = Var(59) = 1
v = 9
value = 1

[State -2, 7.7]
type = Varset
trigger1 = Var(59) = 0
v = 9
value = 0

[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
trigger1 = p2Name != "Shao Kahn"
triggerall = p2Life != 0
triggerall = win != 1
triggerall = lose != 1
;trigger1 = power >= 1500
trigger1 = Var(13) = 1
trigger1 = Var(59) = 0
trigger1 = p2stateno = 9010
stateno = 9020
name = "Doesn't hit person"
id = 9020
pos = 0, 0
helpertype = normal
sprpriority = 1
keyctrl = 0
ownpal = 1
under = 1

[State -2, 7.9]
type = Varset
trigger1 = p2stateno = 9010
v = 9
value = 0


[State -2, NoBGM]
type = AssertSpecial
trigger1 = Var(26) = 1
flag = nomusic
flag2 = globalnoshadow

[State -2, Tripped]
type = VarSet
trigger1 = anim = 5070
v = 15
value = 1000

[State -2, notTripped]
type = VarSet
trigger1 = anim = [5000, 5040]
trigger2 = anim = 5120
trigger3 = anim = 5200
trigger4 = anim = 5210
;trigger1 = power >= 1500
v = 15
value = 0


[State -2, 100]
type = VarSet
triggerall = var(13) = 1
trigger1 = Time >= 6
trigger1 = (stateno = 0) || (stateno = 11)
v = 13
value = 0

[State -2, hit]
type = VarSet
triggerall = var(17) = 1
trigger1 = movetype = H
var(17) = 0

[State -2, 100]
type = VarSet
triggerall = var(2) > 0
trigger1 = (stateno != [200,204]) && (stateno != [220,224])
v = 2
value = 0

[State -2, hit];friendship/babality si esta en cero se puede hacer
type = VarSet
trigger1 = roundstate = 2
trigger1 = command = "blok"
v = 54
value = 1

; Cosas de Danger

[State -3, variable danger]
type = varset
trigger1 = life > 90
trigger1 = var(44) = 1
v = 44
value = 0

[State -3, sonido danger]
type = PlaySnd
trigger1 = life <= 90
trigger1 = alive = 1
trigger1 = var(44) = 0
value = F5, 44

[State -3]
type = Explod
trigger1 = teamside = 1
trigger1 = life <= 90
trigger1 = alive = 1
trigger1 = var(44) = 0
anim = F27
Postype = left
pos = 130,32
bindtime = -1
scale = .8,.8
removetime = 100

[State -3]
type = Explod
trigger1 = teamside = 2
trigger1 = life <= 90
trigger1 = alive = 1
trigger1 = var(44) = 0
anim = F27
Postype = right
pos = -134,32
bindtime = -1
scale = .8,.8
removetime = 100

[State -3, variable danger]
type = varset
trigger1 = life <= 90
trigger1 = alive = 1
trigger1 = var(44) = 0
v = 44
value = 1
;-- fin de cosas de danger

[Statedef -3]


[State -3, Shake on Ground hit]
type = EnvShake
trigger1 = stateno = 5100
freq = 110
time = 10
ampl = -5


