Treat Elemental Wars like Ace of Coders for mirror match and hero equipment

This commit is contained in:
Nick Winter 2016-01-26 13:20:23 -08:00
parent aa18e71388
commit 4ae8eacd90
6 changed files with 7 additions and 7 deletions

View file

@ -125,7 +125,7 @@ module.exports = class LevelBus extends Bus
onWinnabilityUpdated: (e) ->
return unless @onPoint() and e.winnable
return unless e.level.get('slug') in ['ace-of-coders'] # Mirror matches don't otherwise show victory, so we win here.
return unless e.level.get('slug') in ['ace-of-coders', 'elemental-wars'] # Mirror matches don't otherwise show victory, so we win here.
return if @session.get('state')?.complete
@onVictory()

View file

@ -64,7 +64,7 @@ module.exports = class LevelSetupManager extends CocoClass
@session.set 'heroConfig', {"thangType":sorcerer,"inventory":{"misc-0":"53e2396a53457600003e3f0f","programming-book":"546e266e9df4a17d0d449be5","minion":"54eb5dbc49fa2d5c905ddf56","feet":"53e214f153457600003e3eab","right-hand":"54eab7f52b7506e891ca7202","left-hand":"5463758f3839c6e02811d30f","wrists":"54693797a2b1f53ce79443e9","gloves":"5469425ca2b1f53ce7944421","torso":"546d4a549df4a17d0d449a97","neck":"54693274a2b1f53ce79443c9","eyes":"546941fda2b1f53ce794441d","head":"546d4ca19df4a17d0d449abf"}}
@onInventoryModalPlayClicked()
return
if @level.get('slug') is 'ace-of-coders'
if @level.get('slug') in ['ace-of-coders', 'elemental-wars']
goliath = '55e1a6e876cb0948c96af9f8'
@session.set 'heroConfig', {"thangType":goliath,"inventory":{"eyes":"53eb99f41a100989a40ce46e","neck":"54693274a2b1f53ce79443c9","wrists":"54693797a2b1f53ce79443e9","feet":"546d4d8e9df4a17d0d449acd","minion":"54eb5bf649fa2d5c905ddf4a","programming-book":"557871261ff17fef5abee3ee"}}
@onInventoryModalPlayClicked()

View file

@ -117,7 +117,7 @@ module.exports = class MyMatchesTabView extends CocoView
placeholder = $(el)
sessionID = placeholder.data('session-id')
session = _.find @sessions.models, {id: sessionID}
if @level.get('slug') in ['ace-of-coders']
if @level.get('slug') in ['ace-of-coders', 'elemental-wars']
mirrorSession = (s for s in @sessions.models when s.get('team') isnt session.get('team'))[0]
ladderSubmissionView = new LadderSubmissionView session: session, level: @level, mirrorSession: mirrorSession
@insertSubView ladderSubmissionView, placeholder

View file

@ -284,7 +284,7 @@ module.exports = class PlayLevelView extends RootView
if e.session.get('creator') is '532dbc73a622924444b68ed9' # Wizard Dude gets his own avatar
sorcerer = '53e126a4e06b897606d38bef'
e.session.set 'heroConfig', {"thangType":sorcerer,"inventory":{"misc-0":"53e2396a53457600003e3f0f","programming-book":"546e266e9df4a17d0d449be5","minion":"54eb5dbc49fa2d5c905ddf56","feet":"53e214f153457600003e3eab","right-hand":"54eab7f52b7506e891ca7202","left-hand":"5463758f3839c6e02811d30f","wrists":"54693797a2b1f53ce79443e9","gloves":"5469425ca2b1f53ce7944421","torso":"546d4a549df4a17d0d449a97","neck":"54693274a2b1f53ce79443c9","eyes":"546941fda2b1f53ce794441d","head":"546d4ca19df4a17d0d449abf"}}
else if e.level.get('slug') is 'ace-of-coders'
else if e.level.get('slug') in ['ace-of-coders', 'elemental-wars']
goliath = '55e1a6e876cb0948c96af9f8'
e.session.set 'heroConfig', {"thangType":goliath,"inventory":{"eyes":"53eb99f41a100989a40ce46e","neck":"54693274a2b1f53ce79443c9","wrists":"54693797a2b1f53ce79443e9","feet":"546d4d8e9df4a17d0d449acd","minion":"54eb5bf649fa2d5c905ddf4a","programming-book":"557871261ff17fef5abee3ee"}}
else if e.level.get('slug') is 'assembly-speed'

View file

@ -31,7 +31,7 @@ module.exports = class CastButtonView extends CocoView
@castShortcut = '⇧↵'
@updateReplayabilityInterval = setInterval @updateReplayability, 1000
@observing = options.session.get('creator') isnt me.id
@loadMirrorSession() if @options.level.get('slug') in ['ace-of-coders']
@loadMirrorSession() if @options.level.get('slug') in ['ace-of-coders', 'elemental-wars']
@autoSubmitsToLadder = @options.level.get('slug') in ['wakka-maul']
destroy: ->

View file

@ -34,7 +34,7 @@ module.exports = class GameMenuModal extends ModalView
submenus = ['guide', 'options', 'save-load', 'multiplayer']
submenus = _.without submenus, 'guide' unless docs.specificArticles?.length or docs.generalArticles?.length
submenus = _.without submenus, 'save-load' unless me.isAdmin() or /https?:\/\/localhost/.test(window.location.href)
submenus = _.without submenus, 'multiplayer' unless me.isAdmin() or (@level?.get('type') in ['ladder', 'hero-ladder', 'course-ladder'] and @level.get('slug') not in ['ace-of-coders'])
submenus = _.without submenus, 'multiplayer' unless me.isAdmin() or (@level?.get('type') in ['ladder', 'hero-ladder', 'course-ladder'] and @level.get('slug') not in ['ace-of-coders', 'elemental-wars'])
@includedSubmenus = submenus
context.showTab = @options.showTab ? submenus[0]
context.submenus = submenus
@ -47,7 +47,7 @@ module.exports = class GameMenuModal extends ModalView
showsChooseHero: ->
return false if @level?.get('type') in ['course', 'course-ladder']
return false if @options.levelID in ['zero-sum', 'ace-of-coders']
return false if @options.levelID in ['zero-sum', 'ace-of-coders', 'elemental-wars']
return true
afterRender: ->