;================================================================================
; kim Kaphwan, parte 6: Poses de "Winner"
;================================================================================
; Win state decider
[Statedef 180]
type = S

[State 180, 2]
type = ChangeState
trigger1 = Time = 0
trigger1 = var(15) = 1
trigger1 = matchover
value = 183

[State 180, 2]
type = ChangeState
trigger1 = Time = 0
trigger1 = var(16) = 1
trigger1 = matchover
value = 189

[State 180, 2]
type = ChangeState
trigger1 = Time = 0
trigger1 = matchover
value = 181

[State 180, 2]
type = ChangeState
trigger1 = Time = 0
value = 182
;---------------------------------------------------------------------------
; Win pose 1 (secarse el sudor de la frente)
[Statedef 181]
type = S
ctrl = 0
anim = 181
velset = 0,0

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

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

[State 182, over?]
type = AssertSpecial
trigger1 = Animelem = 1, >= 0
trigger1 = Animelem = 17, <= 80
flag = RoundNotOver

; Winpose Finish
[State 181, 4]
type = AssertSpecial
triggerall = Matchover
trigger1 = time = [119,610]
flag = roundnotover

[State 3800, KillMAX]
type = VarSet
trigger1 = time = 0
v = 7
value = 0

[State 181, 5]
type = EnvColor
trigger1 = MatchOver && time = 150
value = 0,0,0
time = 3

[State 181, 6]
type = EnvColor
trigger1 = MatchOver && time = 154
value = 255,255,255
time = 3

[State 181, 7]
type = AssertSpecial
trigger1 = Matchover && time > 150
flag = NoMusic

[State 181, 17]
type = PlaySnd
triggerall = MatchOver
trigger1 = time = 154
value = S2,6

[State 181, 8]; Box (up)
type = Explod
trigger1 = time = 157 && MatchOver
anim = 9410
pos = 0,0
postype = left
sprpriority = 99990
ownpal = 1
removetime = 999999

[State 181, 8]; Box (up)
type = Explod
trigger1 = time = 330 && MatchOver
anim = 9400
pos = 0,0
postype = left
sprpriority = 99991
ownpal = 1
removetime = 999999

[State 181, 8]; Box (up)
type = Explod
trigger1 = time = 350 && MatchOver
anim = 9500+(random%5)
pos = 0,0
postype = left
sprpriority = 99999
ownpal = 1
removetime = 999999

[State 181, 16]
type = AssertSpecial
trigger1 = MatchOver = 1 && time >= 150
flag = nobardisplay
flag2 = noFG
flag3 = invisible

;---------------------------------------------------------------------------
; Win pose 2 (patadas varias)
[Statedef 182]
type = S
ctrl = 0
anim = 182
velset = 0,0

[State 100, 0]
type = PlaySnd
trigger1 = AnimElem = 3
trigger2 = AnimElem = 8
trigger3 = AnimElem = 12
trigger4 = AnimElem = 20
value = 4,1

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

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

[State 182, over?]
type = AssertSpecial
trigger1 = Animelem = 1, >= 0
trigger1 = Animelem = 33, <= 40
flag = RoundNotOver

; Winpose Finish
[State 181, 4]
type = AssertSpecial
triggerall = Matchover
trigger1 = time = [119,610]
flag = roundnotover

[State 3800, KillMAX]
type = VarSet
trigger1 = time = 0
v = 7
value = 0

[State 181, 5]
type = EnvColor
trigger1 = MatchOver && time = 150
value = 0,0,0
time = 3

[State 181, 6]
type = EnvColor
trigger1 = MatchOver && time = 154
value = 255,255,255
time = 3

[State 181, 7]
type = AssertSpecial
trigger1 = Matchover && time > 150
flag = NoMusic

[State 181, 17]
type = PlaySnd
triggerall = MatchOver
trigger1 = time = 154
value = S2,6

[State 181, 8]; Box (up)
type = Explod
trigger1 = time = 157 && MatchOver
anim = 9410
pos = 0,0
postype = left
sprpriority = 99990
ownpal = 1
removetime = 999999

[State 181, 8]; Box (up)
type = Explod
trigger1 = time = 330 && MatchOver
anim = 9400
pos = 0,0
postype = left
sprpriority = 99991
ownpal = 1
removetime = 999999

[State 181, 8]; Box (up)
type = Explod
trigger1 = time = 350 && MatchOver
anim = 9500+(random%5)
pos = 0,0
postype = left
sprpriority = 99999
ownpal = 1
removetime = 999999

[State 181, 16]
type = AssertSpecial
trigger1 = MatchOver = 1 && time >= 150
flag = nobardisplay
flag2 = noFG
flag3 = invisible

;---------------------------------------------------------------------------
; Win pose 3 (Justicia sobre la maldad)
[Statedef 183]
type = S
ctrl = 0
anim = 183
velset = 0,0

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

[State 100, 0]
type = PlaySnd
trigger1 = AnimElem = 5
trigger2 = AnimElem = 11
value = 4,1

[State 1002, Landing Sound]
type = PlaySnd
trigger1 = AnimElem = 12
value = 0,2

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

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

; Winpose Finish
[State 181, 4]
type = AssertSpecial
triggerall = Matchover
trigger1 = time = [119,610]
flag = roundnotover

[State 3800, KillMAX]
type = VarSet
trigger1 = time = 0
v = 7
value = 0

[State 181, 5]
type = EnvColor
trigger1 = MatchOver && time = 150
value = 0,0,0
time = 3

[State 181, 6]
type = EnvColor
trigger1 = MatchOver && time = 154
value = 255,255,255
time = 3

[State 181, 7]
type = AssertSpecial
trigger1 = Matchover && time > 150
flag = NoMusic

[State 181, 17]
type = PlaySnd
triggerall = MatchOver
trigger1 = time = 154
value = S2,6

[State 181, 8]; Box (up)
type = Explod
trigger1 = time = 157 && MatchOver
anim = 9410
pos = 0,0
postype = left
sprpriority = 99990
ownpal = 1
removetime = 999999

[State 181, 8]; Box (up)
type = Explod
trigger1 = time = 330 && MatchOver
anim = 9400
pos = 0,0
postype = left
sprpriority = 99991
ownpal = 1
removetime = 999999

[State 181, 8]; Box (up)
type = Explod
trigger1 = time = 350 && MatchOver
anim = 9500+(random%5)
pos = 0,0
postype = left
sprpriority = 99999
ownpal = 1
removetime = 999999

[State 181, 16]
type = AssertSpecial
trigger1 = MatchOver = 1 && time >= 150
flag = nobardisplay
flag2 = noFG
flag3 = invisible

[State 1000, vels]
type = Posadd
trigger1 = animelem = 5
x = 20

[State 1000, vels]
type = Posadd
trigger1 = time = [11,26]
x = 4

[State 1000, vels]
type = Posadd
trigger1 = time = 11
y = -3

[State 1000, vels]
type = Posadd
trigger1 = time = [12,15]
y = -2

[State 1000, vels]
type = Posadd
trigger1 = time = [16,17]
y = -1

[State 1000, vels]
type = Posadd
trigger1 = time = [20,21]
y = 1

[State 1000, vels]
type = Posadd
trigger1 = time = [22,25]
y = 2

[State 1000, vels]
type = Posadd
trigger1 = time = 26
y = 3

[State 1000, vels]
type = PosSet
trigger1 = time = 27
y = 0

[State 182, over?]
type = AssertSpecial
trigger1 = Animelem = 1, >= 0
trigger1 = Animelem = 19, <= 60
flag = RoundNotOver

;---------------------------------------------------------------------------
; Winpos 4: la de los Rugal.
[Statedef 189]
type = S
movetype = I
physics = S
anim = 0

[State 184, 1]
type = AssertSpecial
trigger1 = Time = 0
flag = RoundNotOver
;===========================================================================