This commit is contained in:
Michael Schmatz 2014-07-23 14:44:17 -07:00
commit c4e3044a81
4 changed files with 12 additions and 9 deletions
app
lib/surface
templates/play/ladder
views/play/level/tome
server/queues

View file

@ -597,7 +597,7 @@ module.exports = CocoSprite = class CocoSprite extends CocoClass
if @thangType.get('name') in ['Arrow', 'Spear'] and @thang.action is 'die'
@marks.shadow?.hide()
mark.update() for name, mark of @marks
#@thang.effectNames = ['berserk', 'confuse', 'control', 'curse', 'fear', 'poison', 'paralyze', 'regen', 'sleep', 'slow', 'haste']
#@thang.effectNames = ['warcry', 'confuse', 'control', 'curse', 'fear', 'poison', 'paralyze', 'regen', 'sleep', 'slow', 'haste']
@updateEffectMarks() if @thang?.effectNames?.length or @previousEffectNames?.length
updateEffectMarks: ->

View file

@ -26,7 +26,7 @@ div#columns.row
td.score-cell= Math.round(session.get('totalScore') * 100)
td.name-col-cell= session.get('creatorName') || "Anonymous"
td.fight-cell
a(href="/play/level/#{level.get('slug') || level.id}/?team=#{team.otherTeam}&opponent=#{session.id}")
a(href="/play/level/#{level.get('slug') || level.id}?team=#{team.otherTeam}&opponent=#{session.id}")
span(data-i18n="ladder.fight") Fight!
if !showJustTop && team.leaderboard.nearbySessions().length
@ -40,7 +40,7 @@ div#columns.row
td.score-cell= Math.round(session.get('totalScore') * 100)
td.name-col-cell= session.get('creatorName') || "Anonymous"
td.fight-cell
a(href="/play/level/#{level.get('slug') || level.id}/?team=#{team.otherTeam}&opponent=#{session.id}")
a(href="/play/level/#{level.get('slug') || level.id}?team=#{team.otherTeam}&opponent=#{session.id}")
span(data-i18n="ladder.fight") Fight!
if teamIndex == 1
.btn.btn-sm.load-more-ladder-entries More

View file

@ -84,13 +84,16 @@ module.exports = class SpellPaletteView extends CocoView
snippets: 'programmableSnippets'
else
propStorage =
'this': 'apiProperties'
'this': ['apiProperties', 'apiMethods']
count = 0
propGroups = {}
for owner, storage of propStorage
props = _.reject @thang[storage] ? [], (prop) -> prop[0] is '_' # no private properties
added = propGroups[owner] = _.sortBy(props).slice()
count += added.length
for owner, storages of propStorage
storages = [storages] if _.isString storages
for storage in storages
props = _.reject @thang[storage] ? [], (prop) -> prop[0] is '_' # no private properties
added = _.sortBy(props).slice()
propGroups[owner] = (propGroups[owner] ? []).concat added
count += added.length
shortenize = count > 6
tabbify = count >= 10

View file

@ -124,7 +124,7 @@ module.exports.getTwoGames = (req, res) ->
#if userIsAnonymous req then return errors.unauthorized(res, 'You need to be logged in to get games.')
humansGameID = req.body.humansGameID
ogresGameID = req.body.ogresGameID
ladderGameIDs = ['greed', 'criss-cross', 'brawlwood', 'dungeon-arena', 'gold-rush']
ladderGameIDs = ['greed', 'criss-cross', 'brawlwood', 'dungeon-arena', 'gold-rush', 'sky-span']
levelID = _.sample ladderGameIDs
unless ogresGameID and humansGameID
#fetch random games here