From ea80e22dc6163b79ed3e5f0f7332eccb471fb4fd Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Sat, 18 Apr 2015 14:13:05 -0700 Subject: [PATCH] Don't point out Lost Viking, since most players shouldn't attempt it. Adjust autocomplete default parameter from string to variable for Known Enemy. --- app/views/play/CampaignView.coffee | 2 +- app/views/play/level/tome/SpellView.coffee | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/play/CampaignView.coffee b/app/views/play/CampaignView.coffee index d81973175..f8b981dd7 100644 --- a/app/views/play/CampaignView.coffee +++ b/app/views/play/CampaignView.coffee @@ -302,7 +302,7 @@ module.exports = class CampaignView extends RootView unless foundNext for nextLevelOriginal in level.nextLevels nextLevel = _.find levels, original: nextLevelOriginal - if nextLevel and not nextLevel.locked and @levelStatusMap[nextLevel.slug] isnt 'complete' and ( + if nextLevel and not nextLevel.locked and @levelStatusMap[nextLevel.slug] isnt 'complete' and nextLevel.slug isnt 'lost-viking' and ( me.isPremium() or not nextLevel.requiresSubscription or nextLevel.slug is 'apocalypse' or diff --git a/app/views/play/level/tome/SpellView.coffee b/app/views/play/level/tome/SpellView.coffee index cf824f8b9..55cc20947 100644 --- a/app/views/play/level/tome/SpellView.coffee +++ b/app/views/play/level/tome/SpellView.coffee @@ -446,8 +446,9 @@ module.exports = class SpellView extends CocoView # TODO: Generalize this snippet replacement # TODO: Where should this logic live, and what format should it be in? if attackEntry? - unless haveFindNearestEnemy or haveFindNearest + unless haveFindNearestEnemy or haveFindNearest or @options.level.get('slug') is 'known-enemy' # No findNearestEnemy, so update attack snippet to string-based target + # (On Known Enemy, we are introducing enemy2 = "Gert", so we want them to do attack(enemy2).) attackEntry.content = attackEntry.content.replace '${1:enemy}', '"${1:Enemy Name}"' snippetEntries.push attackEntry