;================================================================================
; Kim kaphwan, parte 1: Lo principal
;================================================================================
; VAR:  9 = AI
;      12 = Projectile hit slowdown
;      VAR59 is for the EX mode/stand

[Data]
life = 1000
attack = 100
defence = 100
power = 3000
fall.defence_up = 50
liedown.time = 60
airjuggle = 15
sparkno = 0
guard.sparkno = 0
KO.echo = 0
volume = 100
IntPersistIndex = 59
FloatPersistIndex = 40

[Size]
xscale = 1
yscale = 1
ground.back = 15
ground.front = 16
air.back = 12
air.front = 12
height = 60
attack.dist = 160
proj.attack.dist = 90
proj.doscale = 0
head.pos = -5, -80
mid.pos = -5, -40
shadowoffset = 0
draw.offset = 0,2

[Velocity]
walk.fwd  = 3
walk.back = -3
run.fwd  = 6
run.back = -8,-6
jump.neu = 0,-10
jump.back = -3.25
jump.fwd = 3.25
runjump.back = -4,-10
runjump.fwd = 4,-12
airjump.neu = 0,-8.2
airjump.back = -2.55
airjump.fwd = 2.5

[Movement]
airjump.num = 0
airjump.height = 35
yaccel = .58
stand.friction = .8
crouch.friction = .8
;-------------------------------------------------------------
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; Stand
[Statedef 0]
type = S
physics = S
sprpriority = 0

[State 0, 1]
type = ChangeAnim
triggerall = palno = [0,12]
trigger1 = Anim != 0
value = 0

[State 0, 2]
type = VelSet
trigger1 = Time = 0
y = 0

[State 0, 3] ;Stop moving if low velocity or 4 ticks pass
type = VelSet
trigger1 = abs(vel x) < 2
trigger2 = Time = 4
x = 0

[State 0, 4] ;Are you dead?
type = ChangeState
trigger1 = !alive
value = 5050

; Jump Start
[Statedef 40]
type = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1

[State 40, 1]
type = VarSet
trigger1 = Time = 0
sysvar(1) = 0

[State 40, 2]
type = VarSet
trigger1 = Time = 0
var(5) = 0

[State 40, 3]
type = VarSet
trigger1 = command = "longjump" && (command="holdfwd" || command = "holdback") && command != "!longjump"
trigger2 = prevstateno = 101 && command = "holdfwd"
var(5) = 1

[State 40, 4]
type = VarSet
trigger1 = command = "holdfwd"
sysvar(1) = 1

[State 40, 5]
type = VarSet
trigger1 = command = "holdback"
sysvar(1) = -1

[State 40, 6]
type = VelSet
trigger1 = AnimTime = 0
x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))
y = const(velocity.jump.y)

[State 40, 9]
type = ChangeState
trigger1 = AnimTime = 0 && command != "holdup"
value = 950
ctrl = 1

[State 40, 10]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1

; Jump Up
[Statedef 50]
type    = A
physics = A

[State 50, 1]
type = VarSet
trigger1 = Time = 0
sysvar(1) = 0

[State 50, 2]
type = VelSet
trigger1 = Time = 0 && Var(5)
x = IfElse(vel x = 0,0,IfElse(vel x < 0,-5,6))

[State 50, 3]
type = ChangeAnim
trigger1 = Time = 0
value = ifelse((vel x)=0, 41, ifelse((vel x)>0, 42, 43))

[State 50, 4]
type = AfterImage
trigger1 = Time = 0 && Var(5) && Vel X != 0
time = 10
trans = add1
timegap = 1
framegap = 2
length = 8
palbright = 12,12,12
palcontrast = 225,225,225
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1

; Short jump
[Statedef 950]
type = A
movetype = I
physics = A
anim = 950

[State 950, 1]
type = VelSet
trigger1 = Time = 0
x = IfElse(vel x = 0,0,IfElse(vel x < 0,-3.1,3.4))
y = -6.5

[State 950, 2]
type = VelSet
trigger1 = Time = 0 && Var(5)
x = IfElse(vel x = 0,0,IfElse(vel x < 0,-5,5))

[State 950, 3]
type = AfterImage
trigger1 = Time = 0 && Var(5) && Vel X != 0
time = 10
trans = add1
timegap = 1
framegap = 2
length = 8
palbright = 0,0,0
palcontrast = 128,128,128
palmul = 1,1,1

[State 950, 4]
type = ChangeState
trigger1 = Pos Y >= 0 && Vel Y > 0
value = 52

; Jump Land
[Statedef 52]
type    = S
physics = S
ctrl = 1
anim = 47
velset = 0,0
facep2 = 1

[State 52, Landing Sound]
type = PlaySnd
trigger1 = Time = 0
value = 0, 2

[State 52, 1]
type = VelSet
trigger1 = Time = 0
y = 0

[State 52, 2]
type = PosSet
trigger1 = Time = 0
y = 0

[State 52, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;-----RUN
[Statedef 100]
type = S
movetype = I
physics = S
anim = 100
velset = 0
ctrl = 0

[State 100, 1]
type = ChangeState
trigger1 = AnimTime = 0
value = 101

[Statedef 101]
type = S
movetype = I
physics = S
anim = 101
ctrl = 0

[State 100, 1]
type = VelSet
trigger1 = 1
x = const(velocity.run.fwd.x)

[State 100, 0]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0,3
loop = 1
channel = 1

[State 101, 3]
type = ChangeState
trigger1 = command = "holdup"
value = 40

[State 100, 5.1]
type = ChangeState
triggerall = var(9) = 0
trigger1 = AnimElem = 3, >= 0
trigger1 = command != "holdfwd"
value = 102

[State 100, 5.2]
type = ChangeState
trigger1 = var(9) = 1
trigger1 = AnimElem = 3, >= 0
trigger1 = P2bodydist X <= 40
value = 102

[Statedef 102]
type = S
movetype = I
physics = S
anim = 102

[State 102, 1]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1; RUN_BACK2 (land)

; RUN_BACK
[Statedef 105]
type    = A
physics = N
ctrl = 0
anim = 105
sprpriority = 1

[State 105, 1]
type = VelSet
trigger1 = Time = 0
x = const(velocity.run.back.x)
y = const(velocity.run.back.y)

[State 105, 1]
type = Veladd
trigger1 = Time > 0
x = .3
y = .75

[State 105, 3]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 106
;-------------------------Crouch Walk
[Statedef 15]
type = C
movetype = I
physics = C
anim = 15
ctrl = 1

[State 100, 1]
type = VelSet
trigger1 = 1
x = 1.1

[State 100, 5.1]
type = ChangeState
trigger1 = command != "holdfwd"
value = 11
ctrl = 1

;------------------------------------------------------------------
;------------------------------------------------------------------
; Lose by Time Over
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0

[State 170, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; Introduction

[Statedef 190]
type = S

[State 190, 2]; Intro vs maldad 
type = ChangeState
trigger1 = p2name = "Mr.Big"
trigger2 = p2name = "Geese Howard"
trigger3 = p2name = "Wolfgang Krauser"
trigger4 = p2name = "Rugal Bernstein"
trigger5 = p2name = "Ryuji Yamazaki"
value = 192

[State 190, 2]; Intro vs Chars pro
type = ChangeState
trigger1 = p2name = "Kyo-98"
trigger2 = p2name = "Terry Bogard"
trigger3 = p2name = "Andy Bogard"
trigger- = p2name = "Ryo Sakazaki"
trigger- = p2name = "Kofab Garcia"
trigger- = p2name = "Billy_ByEhnyd"
value = 191

[State 190, 2]; intro vs Rugal
type = ChangeState
trigger1 = p2name = "R1"
trigger2 = p2name = "Rugal Bernstein"
value = 193

[State 190, 2]; intro vs Rugal Full power
type = ChangeState
trigger1 = p2name = "R_Fullpower"
value = 0

[State 190, 2]
type = ChangeState
trigger1 = Time = 0
value = 194

; Intro 1 (Romper bloques de hielo, decir insultos varios.)
[Statedef 191]
type = S
ctrl = 0
anim = 191
velset = 0,0

[State 705, 2]
type = Explod
trigger1 = AnimElem = 31, < 0
trigger1 = NumExplod(190) = 0
anim = 715
ID = 190
sprpriority = 3
postype = p1
pos = 0,0
bindtime = 1
ownpal = 1

[State 705, 2]
type = RemoveExplod
trigger1 = AnimElem = 31
ID = 190

[State 705, 2]
type = Explod
trigger1 = AnimElem = 31
anim = 716
ID = 191
sprpriority = 3
postype = p1
pos = 0,0
bindtime = 1
ownpal = 1

[State 705, 2]
type = RemoveExplod
trigger1 = AnimElem = 37
ID = 191

[State 705, 2]
type = Explod
trigger1 = AnimElem = 37
anim = 717
ID = 192
sprpriority = 3
postype = p1
pos = 0,0
bindtime = 1
ownpal = 1

[State 705, 2]
type = Explod
trigger1 = AnimElem = 37
anim = 718
ID = 192
sprpriority = 3
postype = p1
pos = 0,0
bindtime = 1
ownpal = 1

[State 705, 2]
type = Explod
trigger1 = AnimElem = 37
anim = 720
ID = 192
sprpriority = 4
postype = p1
pos = 0,-20
bindtime = 1
ownpal = 1

[State 350, snd]
type = PlaySnd
trigger1 = AnimElem = 1, = 55
value = 191,3

[State 350, snd]
type = PlaySnd
trigger1 = AnimElem = 7
value = 191,0

[State 350, snd]
type = PlaySnd
trigger1 = AnimElem = 31
value = 191,1

[State 350, snd]
type = PlaySnd
trigger1 = AnimElem = 46
value = 191,2

[State 191, 1]
type = ChangeAnim
trigger1 = RoundState = 0
value = 191

[State 191, 2]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 191, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

; Intro 2 (vs Maldad 98 Style)
[Statedef 192]
type = S
ctrl = 0
anim = 192
velset = 0,0

[State 350, snd]
type = PlaySnd
trigger1 = AnimElem = 5
value = 192,0

[State 350, snd]
type = PlaySnd
trigger1 = AnimElem = 18
value = 191,3

[State 191, 1]
type = ChangeAnim
trigger1 = RoundState = 0
value = 192

[State 191, 2]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 191, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

; Intro 3 (vs Maldad 02 Style)
[Statedef 193]
type = S
ctrl = 0
anim = 193
velset = 0,0

[State 350, snd]
type = PlaySnd
trigger1 = AnimElem = 18
value = 193,0

[State 350, snd]
type = PlaySnd
trigger1 = AnimElem = 28
value = 191,3

[State 191, 1]
type = ChangeAnim
trigger1 = RoundState = 0
value = 193

[State 191, 2]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 191, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

; Intro 4 (Normal)
[Statedef 194]
type = S
ctrl = 0
anim = 194
velset = 0,0

[State 705, 2]
type = Explod
trigger1 = AnimElem = 9, < 0
trigger1 = NumExplod(196) = 0
anim = 196
ID = 196
sprpriority = 3
postype = p1
pos = -50,0
bindtime = 1
ownpal = 1

[State 705, 2]
type = RemoveExplod
trigger1 = AnimElem = 14
ID = 196

[State 705, 2]
type = Explod
trigger1 = AnimElem = 14
anim = 197
ID = 197
sprpriority = 3
postype = p1
pos = -50,0
bindtime = 1
ownpal = 1
vel = -5,-3.5
accel = 0,.5

[State 705, 2]
type = Explod
trigger1 = AnimElem = 8, < 0
trigger1 = NumExplod(198) = 0
anim = 198
ID = 198
sprpriority = 3
postype = p1
pos = -10,0
bindtime = 1
ownpal = 1

[State 705, 2]
type = RemoveExplod
trigger1 = AnimElem = 12
ID = 198

[State 705, 2]
type = Explod
trigger1 = AnimElem = 12
anim = 199
ID = 198
sprpriority = 3
postype = p1
pos = -10,0
bindtime = 1
ownpal = 1
vel = -9,-3.5
accel = 0,.5

[State -3, Jumping Sound]
type = PlaySnd
trigger1 = AnimElem = 12
trigger2 = AnimElem = 14
value = 0, 4

[State 350, snd]
type = PlaySnd
trigger1 = AnimElem = 2
value = 194,0

[State 191, 1]
type = ChangeAnim
trigger1 = RoundState = 0
value = 194

[State 191, 2]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 191, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;Burla
[Statedef 195]
type = S
movetype = A
physics = S
anim = 195
ctrl = 0

[State 350, snd]
type = PlaySnd
trigger1 = AnimElem = 2
value = 195,0

[State 195, ctrl]
type = Ctrlset
trigger1 = time = 0
value = 1

[State 195, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;------------------------------------------------------------------------
;----------------------------------DODGES--------------------------------
;------------------------------------------------------------------------
; roll adelante normal
[Statedef 361]
type = S
physics = S
anim = 361
sprpriority = -1
poweradd = 0
velset = 0,0
ctrl = 0

[State 360, push]
type = PlayerPush
trigger1 = 1
value = 0

[State 350, snd]
type = PlaySnd
trigger1 = AnimElem = 2
value = 350,0

[State 350, hit]
type = HitBy
trigger1 = 1
value =  , AT

[State 350, hit]
type = NotHitBy
trigger1 = 1
value = , AA, AP

[State 3050, Super B]
type = AfterImage
trigger1 = AnimElem = 2
time = 2

[State 3050, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 0
trigger1 = animelem = 7, < 0
time = 2

[State 705, 1]
type = velset
trigger1 = Time = [10,25]
x = 5

[State 220, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

; roll adelante DM escape
[Statedef 366]
type = S
physics = S
anim = 361
sprpriority = -1
poweradd = 0
velset = 0,0
ctrl = 0

[State 290, Drain]
type = VarAdd
trigger1 = time = 0
v = 7
value = -1000

[State 360, push]
type = PlayerPush
trigger1 = 1
value = 0

[State 350, snd]
type = PlaySnd
trigger1 = AnimElem = 2
value = 350,0

[State 350, hit]
type = HitBy
trigger1 = 1
value =  , AT

[State 350, hit]
type = NotHitBy
trigger1 = 1
value = , AA, AP

[State 3050, Super B]
type = AfterImage
trigger1 = AnimElem = 2
time = 2

[State 3050, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 0
trigger1 = animelem = 7, < 0
time = 2

[State 705, 1]
type = velset
trigger1 = Time = [10,25]
x = 5

[State 220, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;Roll Back normal
[Statedef 360]
type = S
physics = S
anim = 360
poweradd = 0
sprpriority = -1
velset = 0,0
ctrl = 0

[State 360, push]
type = PlayerPush
trigger1 = 1
value = 0

[State 350, hit]
type = HitBy
trigger1 = 1
value =  , AT

[State 350, hit]
type = NotHitBy
trigger1 = 1
value = , AA, AP

[State 350, snd]
type = PlaySnd
trigger1 = AnimElem = 3
value = 350,0

[State 3050, Super B]
type = AfterImage
trigger1 = AnimElem = 2
time = 2

[State 3050, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 0
trigger1 = animelem = 7, < 0
time = 2

[State 705, 1]
type = velset
trigger1 = Time = [10,25]
x = -5

[State 220, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;Roll Back DM escape
[Statedef 365]
type = S
physics = S
anim = 360
poweradd = 0
sprpriority = -1
velset = 0,0
ctrl = 0

[State 360, push]
type = PlayerPush
trigger1 = 1
value = 0

[State 350, hit]
type = HitBy
trigger1 = 1
value =  , AT

[State 350, hit]
type = NotHitBy
trigger1 = 1
value = , AA, AP

[State 350, snd]
type = PlaySnd
trigger1 = AnimElem = 3
value = 350,0

[State 290, Drain]
type = VarAdd
trigger1 = time = 0
v = 7
value = -1000

[State 3050, Super B]
type = AfterImage
trigger1 = AnimElem = 2
time = 2

[State 3050, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 0
trigger1 = animelem = 7, < 0
time = 2

[State 705, 1]
type = velset
trigger1 = Time = [10,25]
x = -5

[State 220, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; States that are always executed (use statedef -2)
;---------------------------------------------------------------------------
[Statedef -2]

[State -2, run sound]
type = stopsnd
trigger1 = stateno != 101 && stateno != 1000 && stateno != 1011
channel = 1

[State -2, run sound]
type = stopsnd
trigger1 = stateno != 2305 && stateno != 2306
channel = 0

[State 1100, dm spark]
type = RemoveExplod
trigger1 = stateno != 3200 && stateno != 3205 && stateno != 3206 && stateno != 3207 && stateno != 3208 && stateno != 3209 && stateno != 3210
ID = 1111

[State -2, cheese!!!]
type = ChangeState
trigger1 = prevstateno = [120,152]
;trigger1 = statetype != A
trigger1 = !alive
value = 6010
ignorehitpause = 1

; ADVANCE MODE (Codigos adicionales)
[State -2, StartOnLeft]
type = VarSet
trigger1 = var(30) = 0
trigger1 = Pos X < 0
v = 30
value = 1

[State -2, StartOnRight]
type = VarSet
trigger1 = var(30) = 0
trigger1 = Pos X >= 0
v = 30
value = 2

[State -2, CountDown]
type = VarSet
trigger1 = var(7) < 0
var(7) = 0
ignorehitpause = 1

[State -2, CountDown]
type = VarAdd
trigger1 = var(7) > 0
v = 7
ignorehitpause = 1
value = -1

[State -2, ExplodCountdown]
type = ModifyExplod
trigger1 = Var(7) != 0
ID = 4102
scale = (1100 - Var(7)) / 1100.0,1
ontop = 1

[State -2, ResetDamageBonus]
type = AttackMulSet
trigger1 = Var(7) <= 0 && NumExplod(4100) != 0
value = 1

[State -2, BarRemovalAnimLeft]
type = Explod
trigger1 = Var(7) <= 0 && Var(30) = 1 && NumExplod(4100) != 0
anim = 4101
postype = left
pos = 7,208
ontop = 1
supermove = 1
ignorehitpause = 1
ignoresuperpause = 1
bindtime = 30
ownpal = 1

[State -2, BarRemovalAnimRight]
type = Explod
trigger1 = Var(7) <= 0 && Var(30) = 2 && NumExplod(4100) != 0
anim = 4106
postype = right
pos = -84,208
ontop = 1
supermove = 1
ignorehitpause = 1
ignoresuperpause = 1
bindtime = 30
ownpal = 1

[State -2, RemoveMAXCounterBar]
type = RemoveExplod
trigger1 = Var(7) <= 0 && NumExplod(4100) != 0
id = 4102

[State -2, RemoveMAXBar]
type = RemoveExplod
trigger1 = Var(7) <= 0 & NumExplod(4100) != 0
id = 4100

[State 3500, KillMAX]
type = VarSet
trigger1 = Life = 0
v = 7
value = 0

[State -2, No 98 Bars]
type = AssertSpecial
trigger1 = roundstate = [0,1]
trigger2 = roundstate = 4
trigger3 = Ctrl = 0 && (Anim = [0,2]) && MoveType != H
flag = NoBarDisplay
ignorehitpause = 1
;----------------------------------------------------------
;Deteccion de enemigos
;----------------------------------------------------------

[State -2, detect]
type = VarSet
trigger1 = p2name = "Mr.Big"
trigger2 = p2name = "Billy_ByEhnyd"
trigger3 = p2name = "Eiji Kisaragi"
trigger4 = p2name = "Geese Howard"
trigger5 = p2name = "Iori-98"
trigger6 = p2name = "Wolfgang Krauser"
trigger7 = p2name = "Rugal Bernstein"
trigger8 = p2name = "Ryuji Yamazaki"
var(15) = 1

[State -2, detect]
type = VarSet
trigger1 = p2name = "R1" || p4name = "R1"
trigger2 = p2name = "R_FullPower" || p4name = "R_FullPower"
var(16) = 1

;---------------------------------------------------------------------------
; States that are executed when in self's state file (use statedef -3)
;---------------------------------------------------------------------------

[Statedef -3]

[State -3, StopChargeSND]
type = StopSnd
trigger1 = PrevStateNo = 311 && StateNo !=311
channel = 2

[State -3, Corner]
type = Velset
trigger1 = FrontEdgeDist < 10 && vel x > 0.1
x = 0.1

[State 52, Landing Sound]
type = PlaySnd
trigger1 = Time = 1
trigger1 = stateno = 106
value = 0, 2

[State 350, snd]
type = PlaySnd
trigger1 = Time = 1
trigger1 = stateno = 5201
value = 400,0

[State -3, Jumping Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 50
trigger2 = stateno = 950
value = 0,(var(5)>0)

[State -3, Jumping Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 105
value = 0, 4

[State -2, 4]
type = VarRandom
triggerall = Time = 1
trigger1 = stateno = 5000
trigger2 = stateno = 5010
trigger3 = stateno = 5020
v = 4
range = 0,8

[State -2, 5]
type = PlaySnd
triggerall = Time = 1
triggerall = Var(4) = [0,2]
triggerall = alive = 1
trigger1 = stateno = 5000
trigger2 = stateno = 5010
trigger3 = stateno = 5020
value = 5000,0

[State -2, 6]
type = PlaySnd
triggerall = Time = 1
triggerall = Var(4) = [3,5]
triggerall = alive = 1
trigger1 = stateno = 5000
trigger2 = stateno = 5010
trigger3 = stateno = 5020
value = 5000,1

[State -3, ai1]
type = Varset
triggerall = var(9) != 1
triggerall = RoundState != 3
trigger1 = command = "AI_1"
trigger2 = command = "AI_2"
trigger3 = command = "AI_3"
trigger4 = command = "AI_4"
trigger5 = command = "AI_5"
trigger6 = command = "AI_6"
trigger7 = command = "AI_7"
trigger8 = command = "AI_8"
trigger9 = command = "AI_9"
trigger10 = command = "AI_10"
var(9) = 1

[State -3, ai1]
type = Varset
triggerall = var(9) != 1
triggerall = RoundState != 3
trigger1 = command = "AI_11"
trigger2 = command = "AI_12"
trigger3 = command = "AI_13"
trigger4 = command = "AI_14"
trigger5 = command = "AI_15"
trigger6 = command = "AI_16"
trigger7 = command = "AI_17"
trigger8 = command = "AI_18"
trigger9 = command = "AI_19"
trigger10 = command = "AI_20"
var(9) = 1

[State -3, SetAI]
type = VarSet
triggerall = Alive && RoundState = 2
triggerall = IsHomeTeam && !IsHelper
trigger1 = TeamSide = 2
trigger2 = MatchNo > 1
var(9) = 1

[State -3, ai2]
type = Varset
trigger1 = RoundState = 3
var(9) = 0
