;***************************************************************************
; This is for all of the non-gameplay states and taunts
;***************************************************************************

;***************************************************************************
; Taunts
;***************************************************************************
; Taunt
[Statedef 195]
type = S
ctrl = 0
velset = 0,0
movetype = I
physics = S
sprpriority = 0

[state 195, checkanim]
type = changeanim
trigger1 = anim != 0
value = 0

[State 195, VarSet]
type = VarSet
trigger1 = time = 0
var(7) = ceil((random + 1) / 334)

[State 195, EmoteHelper]
type = Helper
trigger1 = time = 0
helpertype = normal ;player
name = "RockPaperSissorsEmote"
ID = 907
stateno = 907
pos = ifelse(facing=1,backedgedist,frontedgedist),0
postype = left    ;p2,front,back,left,right
facing = 1

[State 195, 2]
type = ChangeState
trigger1 = time = 50
value = 0
ctrl = 1




;***************************************************************************
; Lose Poses
;***************************************************************************

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

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

[State 170, EmoteHelper]
type = Helper
trigger1 = time = 0
helpertype = normal ;player
name = "GrrEmote"
ID = 906
stateno = 906
pos = ifelse(facing=1,backedgedist,frontedgedist),0
postype = left    ;p2,front,back,left,right
facing = 1

;---------------------------------------------------------------------------
; Timeout Draw - Sweatbead Emote
[Statedef 175]
type = S
ctrl = 0
anim = 0
velset = 0,0

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

[State 175, BubbleHelper]
type = Helper
trigger1 = time = 0
helpertype = normal ;player
name = "EmoteBubble"
ID = 900
stateno = 900
pos = ifelse(facing=1,backedgedist,frontedgedist),0
postype = left    ;p2,front,back,left,right
facing = 1

[State 175, EmoteHelper]
type = Helper
trigger1 = time = 0
helpertype = normal ;player
name = "SweatbeadEmote"
ID = 905
stateno = 905
pos = ifelse(facing=1,backedgedist,frontedgedist),0
postype = left    ;p2,front,back,left,right
facing = 1



;***************************************************************************
; Win Poses
;***************************************************************************

;---------------------------------------------------------------------------
; Win state decider
[Statedef 180]
type = S

[state 180, MatchesWon]
type = varset
trigger1 = 1
var(13) = var(13) + 1

[State 180, FirstWin]
type = ChangeState
trigger1 = !matchover
value = ifelse(random < 500, 181, 182)

[state 180, LastWin]
type = changestate
trigger1 = matchover
value = 183

;---------------------------------------------------------------------------
; Win pose 1 - Ho Emote
[Statedef 181]
type = S
ctrl = 0
anim = 0
velset = 0,0

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

[State 181, BubbleHelper]
type = Helper
trigger1 = time = 0
helpertype = normal ;player
name = "EmoteBubble"
ID = 900
stateno = 901
pos = ifelse(facing=1,backedgedist,frontedgedist),0
postype = left    ;p2,front,back,left,right
facing = 1

[State 181, EmoteHelper]
type = Helper
trigger1 = time = 0
helpertype = normal ;player
name = "HoEmote"
ID = 901
stateno = 900
pos = ifelse(facing=1,backedgedist,frontedgedist),0
postype = left    ;p2,front,back,left,right
facing = 1

;---------------------------------------------------------------------------
; Win pose 2 - Sorry Emote
[Statedef 182]
type = S
ctrl = 0
anim = 0
velset = 0,0

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

[State 181, BubbleHelper]
type = Helper
trigger1 = time = 0
helpertype = normal ;player
name = "EmoteBubble"
ID = 900
stateno = 900
pos = ifelse(facing=1,backedgedist,frontedgedist),0
postype = left    ;p2,front,back,left,right
facing = 1

[State 182, EmoteHelper]
type = Helper
trigger1 = time = 0
helpertype = normal ;player
name = "SorryEmote"
ID = 902
stateno = 902
pos = ifelse(facing=1,backedgedist,frontedgedist),0
postype = left    ;p2,front,back,left,right
facing = 1

;---------------------------------------------------------------------------
; Win pose Last
[Statedef 183]
type = S
ctrl = 0
anim = 180
velset = 0,0

[State 183, ChangeAnim]
type = ChangeAnim
trigger1 = animtime = 0 && anim = 180
value = 181

[State 183, ChangeAnim2]
type = ChangeAnim
trigger1 = time > 60 && anim = 181
value = 182

[State 183, BGMOff]
type = AssertSpecial
trigger1 = 1
flag = nomusic
flag2 = nobardisplay

[State 183, RoundNotOver]
type = AssertSpecial
trigger1 = time < (ifelse(var(16)=0, 720, 600))
flag = roundnotover

[State 183, DarkenScreen]
type = BGPalFX
trigger1 = time > 30 && time < 60
time = 1
add = 0,0,0
mul = 256 - ((time - 30) * 2),256 - ((time - 30) * 2),256 - ((time - 30) * 2)

[State 183, DarkenScreen2]
type = BGPalFX
trigger1 = time = 60
time = 2000;ifelse(WinPerfect, 630, 510)
add = 0,0,0
mul = 200,200,200

[State 183, DarkenChar]
type = PalFX
trigger1 = time > 30 && time < 60
time = 1
add = 0,0,0
mul = 256 - ((time - 30) * 2),256 - ((time - 30) * 2),256 - ((time - 30) * 2)

[State 183, DarkenChar2]
type = PalFX
trigger1 = time = 60
time = 2000;ifelse(WinPerfect, 630, 510)
add = 0,0,0
mul = 200,200,200

[State 183, PlayMusic]
type = PlaySnd
trigger1 = time = 0
value = 180, ifelse(var(16)=0,1,0)

[State 183, setscreenratio]
type = VarSet
trigger1 = time = 0
fvar(5) = GameHeight / 480

[State 183, StageClearTxt]
type = Explod
trigger1 = time = 15
anim = 950
ID = 950
pos = 650, ceil(40 * fvar(5))
vel = -40, 0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1
[State 183, StopStageClearTxt]
type = ModifyExplod
trigger1 = time = 30
anim = 950
ID = 950
pos = 50, ceil(40 * fvar(5))
vel = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5), fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1

[State 183, ClearTimeTxt]
type = Explod
trigger1 = time = 25
anim = 951
ID = 951
pos = 670,ceil(170 * fvar(5))
vel = -40, 0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1
[State 183, StopClearTimeTxt]
type = ModifyExplod
trigger1 = time = 41
anim = 951
ID = 951
pos = 30,ceil(170 * fvar(5))
vel = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1

[State 183, PlayerLeftTxt]
type = Explod
trigger1 = time = 35
anim = 952
ID = 952
pos = 660,ceil(210 * fvar(5))
vel = -40, 0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1
[State 183, StopPlayerLeftTxt]
type = ModifyExplod
trigger1 = time = 50
anim = 952
ID = 952
pos = 20,ceil(220 * fvar(5))
vel = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1

[State 183, EnemyDamageTxt]
type = Explod
trigger1 = time = 45
anim = 953
ID = 953
pos = 660,ceil(250 * fvar(5))
vel = -40, 0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1
[State 183, StopEnemyDamageTxt]
type = ModifyExplod
trigger1 = time = 60
anim = 953
ID = 953
pos = 20,ceil(250 * fvar(5))
vel = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1

[State 183, PlayerDamageTxt]
type = Explod
trigger1 = time = 55
anim = 954
ID = 954
pos = 664,ceil(290 * fvar(5))
vel = -40, 0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1
[State 183, StopPlayerDamageTxt]
type = ModifyExplod
trigger1 = time = 70
anim = 954
ID = 954
pos = 24,ceil(290 * fvar(5))
vel = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1

[State 183, TotalExpTxt]
type = Explod
trigger1 = time = 65
anim = 955
ID = 955
pos = 658,ceil(410 * fvar(5))
vel = -20, 0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1
[State 183, StopTotalExpTxt]
type = ModifyExplod
trigger1 = time = 80
anim = 955
ID = 955
pos = 18,ceil(410 * fvar(5))
vel = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1

[State 183, PefectTxt]
type = Explod
trigger1 = var(16)=0 && time = 360
anim = 956
ID = 956
pos = 640,ceil(120 * fvar(5))
vel = -30, 0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1
[State 183, StopPerfectTxt]
type = ModifyExplod
trigger1 = var(16)=0 && time = 375
anim = 956
ID = 956
pos = 190,ceil(120 * fvar(5))
vel = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1

;Clear Time Numbers
[State 183, ClearTimeTick7]
type = Explod
trigger1 = time = 25
anim = 960 + (var(12) / 36000)
ID = 967
pos = 880,ceil(170 * fvar(5))
vel = -40, 0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1
[State 183, StopClearTimeTick7]
type = ModifyExplod
trigger1 = time = 40
anim = 960 + (var(12) / 36000)
ID = 967
pos = 240,ceil(170 * fvar(5))
vel = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1

[State 183, ClearTimeTick6]
type = Explod
trigger1 = time = 25
anim = 960 + ((var(12) / 3600) % 10)
ID = 966
pos = 900,ceil(170 * fvar(5))
vel = -40, 0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1
[State 183, StopClearTimeTick6]
type = ModifyExplod
trigger1 = time = 40
anim = 960 + ((var(12) / 3600) % 10)
ID = 966
pos = 300,ceil(170 * fvar(5))
vel = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1

[State 183, ClearTimeTickMinutes]
type = Explod
trigger1 = time = 25
anim = 957
ID = 965
pos = 920,ceil(170 * fvar(5))
vel = -40, 0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1
[State 183, StopClearTimeTickMinutes]
type = ModifyExplod
trigger1 = time = 40
anim = 957
ID = 965
pos = 320,ceil(170 * fvar(5))
vel = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1

[State 183, ClearTimeTick4]
type = Explod
trigger1 = time = 25
anim = 960 + ((var(12) % 3600) / 600) ;Mod under a minute, then divide by ticks and get 10s digit
ID = 964
pos = 930,ceil(170 * fvar(5))
vel = -40, 0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1
[State 183, StopClearTimeTick4]
type = ModifyExplod
trigger1 = time = 40
anim = 960 + ((var(12) % 3600) / 600)
ID = 964
pos = 330,ceil(170 * fvar(5))
vel = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1

[State 183, ClearTimeTick3]
type = Explod
trigger1 = time = 25
anim = 960 + ((var(12) / 60) % 10)
ID = 963
pos = 950,ceil(170 * fvar(5))
vel = -40, 0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1
[State 183, StopClearTimeTick3]
type = ModifyExplod
trigger1 = time = 40
anim = 960 + ((var(12) / 60) % 10)
ID = 963
pos = 350,ceil(170 * fvar(5))
vel = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1

[State 183, ClearTimeTickSecs]
type = Explod
trigger1 = time = 25
anim = 958
ID = 962
pos = 970,ceil(170 * fvar(5))
vel = -40, 0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1
[State 183, StopClearTimeTickSecs]
type = ModifyExplod
trigger1 = time = 40
anim = 958
ID = 962
pos = 370,ceil(170 * fvar(5))
vel = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1

[State 183, ClearTimeTick2]
type = Explod
trigger1 = time = 25
anim = 960 + ((var(12) % 60)/10)
ID = 961
pos = 990,ceil(170 * fvar(5))
vel = -40, 0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1
[State 183, StopClearTimeTick2]
type = ModifyExplod
trigger1 = time = 40
anim = 960 + ((var(12) % 60)/10)
ID = 961
pos = 390,ceil(170 * fvar(5))
vel = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1

[State 183, ClearTimeTick]
type = Explod
trigger1 = time = 25
anim = 960 + ((var(12) % 10))
ID = 960
pos = 1010,ceil(170 * fvar(5))
vel = -40, 0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1
[State 183, StopClearTimeTick]
type = ModifyExplod
trigger1 = time = 40
anim = 960 + ((var(12) % 10))
ID = 960
pos = 410,ceil(170 * fvar(5))
vel = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1

[State 183, NumPlayersLeft]
type = Explod
trigger1 = time = 35
anim = 960 + ((2 * var(13)) - RoundNo) - 1
ID = 968
pos = 1010,ceil(210 * fvar(5))
vel = -40, 0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1
[State 183, StopNumPlayersLeft]
type = ModifyExplod
trigger1 = time = 50
anim = 960 + ((2 * var(13)) - RoundNo) - 1
ID = 968
pos = 410,ceil(210 * fvar(5))
vel = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1

;TOTAL ENEMY DAMAGE
[State 183, NMGDmg5]
type = Explod
trigger1 = time = 45 && var(14) > 9999
anim = 960 + ((var(14)/10000) % 10)
ID = 973
pos = 930,ceil(250 * fvar(5))
vel = -40, 0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1
[State 183, StopNMEDmg5]
type = ModifyExplod
trigger1 = time = 60 && var(14) > 9999
anim = 960 + ((var(14)/10000) % 10)
ID = 973
pos = 330,ceil(250 * fvar(5))
vel = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1

[State 183, NMGDmg4]
type = Explod
trigger1 = time = 45 && var(14) > 999
anim = 960 + ((var(14)/1000) % 10)
ID = 972
pos = 950,ceil(250 * fvar(5))
vel = -40, 0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1
[State 183, StopNMEDmg4]
type = ModifyExplod
trigger1 = time = 60 && var(14) > 999
anim = 960 + ((var(14)/1000) % 10)
ID = 972
pos = 350,ceil(250 * fvar(5))
vel = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1

[State 183, NMGDmg3]
type = Explod
trigger1 = time = 45 && var(14) > 99
anim = 960 + ((var(14)/100) % 10)
ID = 971
pos = 970,ceil(250 * fvar(5))
vel = -40, 0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1
[State 183, StopNMEDmg3]
type = ModifyExplod
trigger1 = time = 60 && var(14) > 99
anim = 960 + ((var(14)/100) % 10)
ID = 971
pos = 370,ceil(250 * fvar(5))
vel = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1

[State 183, NMGDmg2]
type = Explod
trigger1 = time = 45 && var(14) > 9
anim = 960 + ((var(14)/10) % 10)
ID = 970
pos = 990,ceil(250 * fvar(5))
vel = -40, 0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1
[State 183, StopNMEDmg2]
type = ModifyExplod
trigger1 = time = 60 && var(14) > 9
anim = 960 + ((var(14)/10) % 10)
ID = 970
pos = 390,ceil(250 * fvar(5))
vel = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1

[State 183, NMGDmg1]
type = Explod
trigger1 = time = 45
anim = 960 + (var(14) % 10)
ID = 969
pos = 1010,ceil(250 * fvar(5))
vel = -40, 0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1
[State 183, StopNMEDmg1]
type = ModifyExplod
trigger1 = time = 60
anim = 960 + (var(14) % 10)
ID = 969
pos = 410,ceil(250 * fvar(5))
vel = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1

;TOTAL Player DAMAGE
[State 183, PlayerDmg5]
type = Explod
trigger1 = time = 55 && var(16) > 9999
anim = 960 + ((var(16)/10000) % 10)
ID = 978
pos = 930,ceil(290 * fvar(5))
vel = -40, 0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1
[State 183, StopPlayerDmg5]
type = ModifyExplod
trigger1 = time = 70 && var(16) > 9999
anim = 960 + ((var(16)/10000) % 10)
ID = 978
pos = 330,ceil(290 * fvar(5))
vel = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1

[State 183, PlayerDmg4]
type = Explod
trigger1 = time = 55 && var(16) > 999
anim = 960 + ((var(16)/1000) % 10)
ID = 977
pos = 950,ceil(290 * fvar(5))
vel = -40, 0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1
[State 183, StopPlayerDmg4]
type = ModifyExplod
trigger1 = time = 70 && var(16) > 999
anim = 960 + ((var(16)/1000) % 10)
ID = 977
pos = 350,ceil(290 * fvar(5))
vel = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1

[State 183, PlayerDmg3]
type = Explod
trigger1 = time = 55 && var(16) > 99
anim = 960 + ((var(16)/100) % 10)
ID = 976
pos = 970,ceil(290 * fvar(5))
vel = -40, 0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1
[State 183, StopPlayerDmg3]
type = ModifyExplod
trigger1 = time = 70 && var(16) > 99
anim = 960 + ((var(16)/100) % 10)
ID = 976
pos = 370,ceil(290 * fvar(5))
vel = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1

[State 183, PlayerDmg2]
type = Explod
trigger1 = time = 55 && var(16) > 9
anim = 960 + ((var(16)/10) % 10)
ID = 975
pos = 990,ceil(290 * fvar(5))
vel = -40, 0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1
[State 183, StopPlayerDmg2]
type = ModifyExplod
trigger1 = time = 70 && var(16) > 9
anim = 960 + ((var(16)/10) % 10)
ID = 975
pos = 390,ceil(290 * fvar(5))
vel = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1

[State 183, PlayerDmg1]
type = Explod
trigger1 = time = 55
anim = 960 + ((var(16)) % 10)
ID = 974
pos = 1010,ceil(290 * fvar(5))
vel = -40, 0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1
[State 183, StopPlayerDmg1]
type = ModifyExplod
trigger1 = time = 70
anim = 960 + ((var(16)) % 10)
ID = 974
pos = 410,ceil(290 * fvar(5))
vel = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1

;EXPERIENCE
[State 183, Exp5]
type = Explod
trigger1 = time = 65
trigger1 = var(14) / (roundno - var(13) + 1) > 9999
anim = 960 + ((var(14) / (roundno - var(13) + 1)/10000) % 10)
ID = 983
pos = 1120,ceil(410 * fvar(5))
vel = -40, 0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1
[State 183, StopExp5]
type = ModifyExplod
trigger1 = time = 80
trigger1 = var(14) / (roundno - var(13) + 1) > 9999
anim = 960 + ((var(14) / (roundno - var(13) + 1)/10000) % 10)
ID = 983
pos = 520,ceil(410 * fvar(5))
vel = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1

[State 183, Exp4]
type = Explod
trigger1 = time = 65
trigger1 = var(14) / (roundno - var(13) + 1) > 999
anim = 960 + ((var(14) / (roundno - var(13) + 1)/1000) % 10)
ID = 982
pos = 1140,205
vel = -40, 0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1
[State 183, StopExp4]
type = ModifyExplod
trigger1 = time = 80
trigger1 = var(14) / (roundno - var(13) + 1) > 999
anim = 960 + ((var(14) / (roundno - var(13) + 1)/1000) % 10)
ID = 982
pos = 540,ceil(410 * fvar(5))
vel = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1

[State 183, Exp3]
type = Explod
trigger1 = time = 65
trigger1 = var(14) / (roundno - var(13) + 1) > 99
anim = 960 + ((var(14) / (roundno - var(13) + 1)/100) % 10)
ID = 981
pos = 1160,ceil(410 * fvar(5))
vel = -40, 0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1
[State 183, StopExp3]
type = ModifyExplod
trigger1 = time = 80
trigger1 = var(14) / (roundno - var(13) + 1) > 99
anim = 960 + ((var(14) / (roundno - var(13) + 1)/100) % 10)
ID = 981
pos = 560,ceil(410 * fvar(5))
vel = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1

[State 183, Exp2]
type = Explod
trigger1 = time = 65
trigger1 = var(14) / (roundno - var(13) + 1) > 9
anim = 960 + ((var(14) / (roundno - var(13) + 1)/10) % 10)
ID = 980
pos = 1180,ceil(410 * fvar(5))
vel = -40, 0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1
[State 183, StopExp2]
type = ModifyExplod
trigger1 = time = 80
trigger1 = var(14) / (roundno - var(13) + 1) > 9
anim = 960 + ((var(14) / (roundno - var(13) + 1) / 10) % 10)
ID = 980
pos = 580,ceil(410 * fvar(5))
vel = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1

[State 183, Exp1]
type = Explod
trigger1 = time = 65
anim = 960 + ((var(14) / (roundno - var(13) + 1)) % 10)
ID = 979
pos = 1200,ceil(410 * fvar(5))
vel = -40, 0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1
[State 183, StopExp1]
type = ModifyExplod
trigger1 = time = 80
anim = 960 + ((var(14) / (roundno - var(13) + 1)) % 10)
ID = 979
pos = 600,ceil(410 * fvar(5))
vel = 0,0
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 2000
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 1
ownpal = 1

[State 183, TextWooshSnd]
type = PlaySnd
trigger1 = time = 15
trigger2 = time = 25
trigger3 = time = 35
trigger4 = time = 45
trigger5 = time = 55
trigger6 = time = 65
value = 181,0






;***************************************************************************
; Introduction
;***************************************************************************

;---------------------------------------------------------------------------
; Introduction
[Statedef 191]
type = S
physics = S
ctrl = 0
anim = 44
velset = 0,0

; Start with power
[State 191, PowerAdd]
type = PowerSet
trigger1 = time = 0
value = 9000

[State 191, ScreenBound]
type = ScreenBound
trigger1 = 1
ignorehitpause = 1
value = 0

[State 191, Helper]
type = Helper
trigger1 = time = 0
helpertype = normal ;player
name = "buildselector"
ID = 970
stateno = 970

[State 191, 2] ;Change to actual intro when over
type = ChangeState
trigger1 = time = 0
value = cond(random < 500, 192, 193)

;Falling intro
[statedef 192]
type = A
physics = N
ctrl = 0
anim = 44

[State 191, 1]
type = posset
trigger1 = time = 0
y = -600

[State 192, ScreenBound]
type = ScreenBound
trigger1 = 1
ignorehitpause = 1
value = 0

[state 192, stay]
type = assertspecial
trigger1 = pos y < 0
flag = intro

[state 192, gravity]
type = veladd
trigger1 = pos y < 0
y = const(size.yscale)

[State 192, 1]
type = velset
trigger1 = pos y >= 0
y = 0

[State 192, 2]
type = posset
trigger1 = pos y >= 0
y = 0

[State 192, 3] ;Change to stand state when done
type = changeanim
trigger1 = pos y >= 0
value = 0
persistent = 0

;Walking intro
[statedef 193]
type = A
physics = N
ctrl = 0
anim = 20

[State 191, 1]
type = posadd
trigger1 = time = 0
x = -(const(velocity.walk.fwd.x) * 100)

[State 192, ScreenBound]
type = ScreenBound
trigger1 = 1
ignorehitpause = 1
value = 0

[state 192, stay]
type = assertspecial
trigger1 = time < 100
flag = intro

[state 192, gravity]
type = posadd
trigger1 = time < 100
x = const(velocity.walk.fwd.x)

[State 192, 3] ;Change to stand state when done
type = changeanim
trigger1 = time = 100
value = 0
persistent = 0





;---------------------------------------------------------------------------
; EMOTICONS GO HERE
;---------------------------------------------------------------------------

; Emoticon Bubble
[statedef 900]
type = A
movetype = I
physics = N
anim = 1
ctrl = 0

[State 900, BindToRoot]
type = BindToRoot
trigger1 = 1
time = 1
facing = 0
pos = 0,0

[state 900, bubbleinit]
type = Explod
trigger1 = time = 0
anim = 900
ID = 900
pos = -10,-150 * const(size.yscale)
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 100
scale = const(size.xscale), const(size.yscale)
sprpriority = 1
trans = addalpha
alpha = 3, 128

[state 900, bubblein]
type = ModifyExplod
trigger1 = time < 20
anim = 900
ID = 900
pos = -10,-150 * (root, const(size.yscale))
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 100
scale = const(size.xscale), const(size.yscale)
sprpriority = 1
trans = addalpha
alpha = 12.8 * time, 200

[state 900, bubble]
type = ModifyExplod
trigger1 = time = 20
anim = 900
ID = 900
pos = -10,-150 * const(size.yscale)
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 100
scale = const(size.xscale), const(size.yscale)
sprpriority = 1
trans = none

[state 900, bubbleout]
type = ModifyExplod
trigger1 = time > 80
anim = 900
ID = 900
pos = -10,-150 * const(size.yscale)
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 100
scale = const(size.xscale), const(size.yscale)
sprpriority = 1
trans = addalpha
alpha = (100 - time) * 12.8, 200

[state 900, end]
type = destroyself
trigger1 = time > 100


; ------------------------------------------------
; Ho emote
[statedef 901]
type = A
movetype = I
physics = N
anim = 1
ctrl = 0

[State 901, BindToRoot]
type = BindToRoot
trigger1 = 1
time = 1
facing = 0
pos = 0,0

[state 901, honoteinit]
type = Explod
trigger1 = time = 5
anim = 901 ;spell id
ID = 901
pos = -35 * const(size.xscale) * .9, -175 * const(size.yscale)
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
vel = 0,0
bindtime = 1
removetime = 70
scale = const(size.xscale), const(size.yscale)
sprpriority = 5
trans = addalpha
alpha = 1, 255

[state 901, honotein]
type = modifyExplod
trigger1 = time > 5
trigger1 = time < 15
anim = 901
ID = 901
pos = (time - 40) * const(size.xscale) * .9, -175 * const(size.yscale)
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
vel = 0,0
bindtime = 1
removetime = 70
scale = const(size.xscale), const(size.yscale)
sprpriority = 5
trans = addalpha
alpha = 25 * (time - 5), 255 - (25 * (time - 5))

[state 901, honote]
type = ModifyExplod
trigger1 = time >= 15 && time <= 65
anim = 901
ID = 901
pos = (time - 40) * const(size.xscale) * .9, (-175 + (3.0 * sin(time * pi / 20.0))) * const(size.yscale)
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
vel = 0,0
bindtime = 1
removetime = 70
scale = const(size.xscale), const(size.yscale)
sprpriority = 5
trans = addalpha
alpha = 256, 0

[state 901, honoteout]
type = ModifyExplod
trigger1 = time > 65
anim = 901
ID = 901
pos = (time - 40) * const(size.xscale) * .9, -175 * const(size.yscale)
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
vel = 0,0
bindtime = 1
removetime = 70
scale = const(size.xscale), const(size.yscale)
sprpriority = 5
trans = addalpha
alpha = (75 - time) * 25, (time - 65) * 25

[state 901, end]
type = destroyself
trigger1 = time > 100

;---------------------------------------------------------------------------
; Sorry emote
[statedef 902]
type = A
movetype = I
physics = N
anim = 1
ctrl = 0

[State 902, BindToRoot]
type = BindToRoot
trigger1 = 1
time = 1
facing = 0
pos = 0,0

[state 902, headinit]
type = Explod
trigger1 = time = 0
anim = 902
ID = 902
pos = -7 * const(size.xscale), -174 * const(size.yscale)
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 100
scale = const(size.xscale), const(size.yscale)
sprpriority = 3
trans = addalpha
alpha = 3, 128

[state 902, headin]
type = ModifyExplod
trigger1 = time < 20
anim = 902
ID = 902
pos = -7 * const(size.xscale), -174 * const(size.yscale)
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 100
scale = const(size.xscale), const(size.yscale)
sprpriority = 3
trans = addalpha
alpha = 12.8 * time, 256 - (12.8 * time)

[state 902, head]
type = ModifyExplod
trigger1 = time = 20
anim = 902
ID = 902
pos = -7 * const(size.xscale), -174 * const(size.yscale)
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 100
scale = const(size.xscale), const(size.yscale)
sprpriority = 3
trans = addalpha
alpha = 256, 0

[state 902, headout]
type = ModifyExplod
trigger1 = time > 80
anim = 902
ID = 902
pos = -7 * const(size.xscale), -174 * const(size.yscale)
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 100
scale = const(size.xscale), const(size.yscale)
sprpriority = 3
trans = addalpha
alpha = (100 - time) * 12.8, 256 - ((100 - time) * 12.8)

[State 902, Eye1]
type = Explod
trigger1 = time = 20
trigger2 = time = 50
anim = 903
ID = 903
pos = -11 * const(size.xscale), -178 * const(size.yscale)
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0.5
removetime = 30
scale = const(size.xscale), const(size.yscale)
sprpriority = 4

[State 902, ModEye1]
type = ModifyExplod
trigger1 = time = 40
trigger2 = time = 70
anim = 903
ID = 903
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,-1
removetime = 30
scale = const(size.xscale), const(size.yscale)
sprpriority = 4

[State 902, Eye2]
type = Explod
trigger1 = time = 20
trigger2 = time = 50
anim = 903
ID = 901
pos = -3 * const(size.xscale), -178 * const(size.yscale)
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0.5
removetime = 30
scale = const(size.xscale), const(size.yscale)
sprpriority = 4

[State 902, ModEye2]
type = ModifyExplod
trigger1 = time = 40
trigger2 = time = 70
anim = 903
ID = 901
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,-1
removetime = 30
scale = const(size.xscale), const(size.yscale)
sprpriority = 4

[State 902, SorryStart1]
type = Explod
trigger1 = time = 35
trigger2 = time = 65
anim = 904
ID = 904
pos = -4 * const(size.xscale),-165 * const(size.yscale)
vel = 0,-1
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 20
scale = const(size.xscale), const(size.yscale)
sprpriority = 5
trans = addalpha
alpha = 6, 250

[State 902, SorryStart2]
type = ModifyExplod
trigger1 = time = 36
trigger2 = time = 66
ID = 904
trans = addalpha
alpha = 56, 200

[State 902, SorryStart3]
type = ModifyExplod
trigger1 = time = 37
trigger2 = time = 67
ID = 904
trans = addalpha
alpha = 106, 150

[State 902, SorryStart4]
type = ModifyExplod
trigger1 = time = 38
trigger2 = time = 68
ID = 904
trans = addalpha
alpha = 156, 100

[State 902, SorryStart5]
type = ModifyExplod
trigger1 = time = 39
trigger2 = time = 69
ID = 904
trans = addalpha
alpha = 206, 50

[State 902, Sorry]
type = ModifyExplod
trigger1 = time = 40
trigger2 = time = 70
ID = 904
trans = none

[State 902, SorryEnd1]
type = ModifyExplod
trigger1 = time = 50
trigger2 = time = 80
ID = 904
trans = addalpha
alpha = 225, 25

[State 902, SorryEnd2]
type = ModifyExplod
trigger1 = time = 51
trigger2 = time = 81
ID = 904
trans = addalpha
alpha = 200, 50

[State 902, SorryEnd3]
type = ModifyExplod
trigger1 = time = 52
trigger2 = time = 82
ID = 904
trans = addalpha
alpha = 175, 75

[State 902, SorryEnd4]
type = ModifyExplod
trigger1 = time = 53
trigger2 = time = 83
ID = 904
trans = addalpha
alpha = 150, 100

[State 902, SorryEnd5]
type = ModifyExplod
trigger1 = time = 54
trigger2 = time = 84
ID = 904
trans = addalpha
alpha = 125, 125

[state 902, end]
type = destroyself
trigger1 = time > 100

;---------------------------------------------------------------------------
; Sweatbead emote
[statedef 905]
type = A
movetype = I
physics = N
anim = 1
ctrl = 0

[State 905, BindToRoot]
type = BindToRoot
trigger1 = 1
time = 1
facing = 0
pos = 0,0

[state 905, init]
type = Explod
trigger1 = time = 0
anim = 905
ID = 905
pos = -7 * const(size.xscale), -192 * const(size.yscale)
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 30
vel = 0, const(size.yscale)
scale = const(size.xscale), const(size.yscale)
sprpriority = 5
trans = addalpha
alpha = 3, 128

[state 902, fadein]
type = ModifyExplod
trigger1 = time < 20
ID = 905
trans = addalpha
alpha = 12.8 * time, 256 - (12.8 * time)

[state 902, full]
type = ModifyExplod
trigger1 = time = 20
ID = 905
trans = none

[state 905, init]
type = Explod
trigger1 = time = 30
anim = 905
ID = 905
pos = -7 * const(size.xscale), -162 * const(size.yscale)
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 60
vel = 0, 0
scale = const(size.xscale), const(size.yscale)
sprpriority = 5

[state 902, fadeout]
type = ModifyExplod
trigger1 = time > 80
ID = 905
trans = addalpha
alpha = (100 - time) * 12.8, 256 - ((100 - time) * 12.8)

[state 902, end]
type = destroyself
trigger1 = time > 100


;---------------------------------------------------------------------------
; Grr emote
[statedef 906]
type = A
movetype = I
physics = N
anim = 1
ctrl = 0

[State 906, BindToRoot]
type = BindToRoot
trigger1 = 1
time = 1
facing = 0
pos = 0,0

[state 906, init]
type = Explod
trigger1 = time = 0
anim = 906
ID = 906
pos = -10 * const(size.xscale), -170 * const(size.yscale)
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 70
vel = 0, 0
scale = const(size.xscale), const(size.yscale)
sprpriority = 5

[state 906, fadeout]
type = ModifyExplod
trigger1 = time > 50
ID = 906
trans = addalpha
alpha = (70 - time) * 12.8, 256 - ((70 - time) * 12.8)

[state 902, end]
type = destroyself
trigger1 = time > 70


;---------------------------------------------------------------------------
; RockPaperSissors emote
[statedef 907]
type = A
movetype = I
physics = N
anim = 1
ctrl = 0

[State 907, BindToRoot]
type = BindToRoot
trigger1 = 1
time = 1
facing = 0
pos = 0,0

[state 907, bubble]
type = Explod
trigger1 = time = 0
anim = 900
ID = 900
pos = -10,-150 * const(size.yscale)
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 50
scale = const(size.xscale), const(size.yscale)
sprpriority = 1

[state 907, init]
type = Explod
trigger1 = time = 0
anim = 907 + (root, var(7))
ID = 907
pos = -5 * const(size.xscale), -160 * const(size.yscale)
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = 50
vel = 0, 0
scale = const(size.xscale), const(size.yscale)
sprpriority = 5
trans = addalpha
alpha = 3, 128

[state 902, fadein]
type = ModifyExplod
trigger1 = time < 12
ID = 907
trans = addalpha
alpha = 20 * time, 250 - (20 * time)

[state 902, full]
type = ModifyExplod
trigger1 = time = 25
ID = 907
trans = none

[state 902, fadeout]
type = ModifyExplod
trigger1 = time > 37
ID = 907
trans = addalpha
alpha = (50 - time) * 20, 250 - ((50 - time) * 20)

[state 902, end]
type = destroyself
trigger1 = time > 50










;------------------------
;---- Build Selector ----
;------------------------

;Build Selector
[statedef 970]
type = S
physics = N
ctrl = 0
anim = 1

[State 970, VarSet]
type = VarSet
trigger1 = time = 0
fvar(5) = GameHeight / 480.0

[state 970, choose var];starts round with a random groove.
type = VarRandom
trigger1 = time = 0
v = 19
range = 0, 2

[state 970, select up]
type = varset
trigger1 = root, command = "down"
var(19) = var(19) + cond(var(19)=3,-3,1)

[state 970, select down]
type = varset
trigger1 = root, command = "up"
var(19) = var(19) + cond(var(19)=0,3,-1)

[state 970, select sound]
type = playsnd
trigger1 = root, command = "up"
trigger2 = root, command = "down"
value = 194, 0

[state 970, stay]
type = assertspecial
trigger1 = 1
flag = intro

[State 970, Select]
type = Explod
trigger1 = time = 0
anim = 970
ID = 970
pos = cond(TeamSide = 2, GameWidth / 2, 0) + 25, 100
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -1
scale = fvar(5),fvar(5)
sprpriority = 5
shadow = 0,0,0

[State 970, Battle]
type = Explod
trigger1 = time = 0
anim = 971
ID = 971
pos = cond(TeamSide = 2, GameWidth / 2, 0) + 60, 150
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -1
scale = fvar(5),fvar(5)
sprpriority = 5
shadow = 0,0,0

[State 970, Magic]
type = Explod
trigger1 = time = 0
anim = 972
ID = 972
pos = cond(TeamSide = 2, GameWidth / 2, 0) + 60, 180
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -1
scale = fvar(5),fvar(5)
sprpriority = 5
shadow = 0,0,0

[State 970, Hybrid]
type = Explod
trigger1 = time = 0
anim = 973
ID = 973
pos = cond(TeamSide = 2, GameWidth / 2, 0) + 60, 210
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -1
scale = fvar(5),fvar(5)
sprpriority = 5
shadow = 0,0,0

[State 970, GM]
type = Explod
trigger1 = time = 0
anim = 974
ID = 974
pos = cond(TeamSide = 2, GameWidth / 2, 0) + 60, 240
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -1
scale = fvar(5),fvar(5)
sprpriority = 5
shadow = 0,0,0

[State 970, ArrowStart]
type = Explod
trigger1 = time = 0
anim = 975
ID = 975
pos = cond(TeamSide = 2, GameWidth / 2, 0) + 50, 150 + (var(19) * 30)
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -1
scale = fvar(5),fvar(5)
sprpriority = 5
shadow = 0,0,0

[State 970, ModifyExplod]
type = ModifyExplod
trigger1 = time > 0
ID = 975
pos = cond(TeamSide = 2, GameWidth / 2, 0) + 50, 150 + (var(19) * 30)
postype = left  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
supermovetime = 0
pausemovetime = 0
scale = fvar(5),fvar(5)
sprpriority = 5
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0

[State 971, ParentVarSet]
type = ParentVarSet
trigger1 = 1
v = 19
value = var(19)

[State 970, Switch]
type = ChangeState
trigger1 = root, command = "start"
trigger2 = root, command = "a"
trigger3 = root, command = "b"
trigger4 = root, command = "c"
trigger5 = root, command = "x"
trigger6 = root, command = "y"
trigger7 = root, command = "z"
trigger8 = time >= 60*10
trigger9 = (root, AILevel > 0) && time > 60
value = 971

; End build selector
[statedef 971]
type = S
physics = N
ctrl = 0
anim = 1

[State 971, SelectSound]
type = PlaySnd
trigger1 = 1
value = 194,1

[state 971, stay]
type = assertspecial
trigger1 = 1
flag = intro

[State 971, RemoveSelect]
type = RemoveExplod
trigger1 = 1

[State 971, RemoveMe]
type = destroyself
trigger1 = 1
