From c701ca9eb0d3fea7191ed037da05e925e9b94266 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Wed, 26 Nov 2014 09:22:30 -0800 Subject: [PATCH 1/3] Sorting items by tier instead of gems so that the unlock order will be consistent, and so that we can show the Ring of Speed early despite its high price. --- app/views/game-menu/InventoryModal.coffee | 2 +- app/views/play/modal/PlayItemsModal.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/game-menu/InventoryModal.coffee b/app/views/game-menu/InventoryModal.coffee index c1a921d7f..b47f93f9a 100644 --- a/app/views/game-menu/InventoryModal.coffee +++ b/app/views/game-menu/InventoryModal.coffee @@ -72,7 +72,7 @@ module.exports = class InventoryModal extends ModalView @itemGroups.availableItems = new Backbone.Collection() @itemGroups.restrictedItems = new Backbone.Collection() @itemGroups.lockedItems = new Backbone.Collection() - itemGroup.comparator = ((m) -> m.get('gems') ? m.get('tier')) for itemGroup in _.values @itemGroups + itemGroup.comparator = ((m) -> m.get('tier') ? m.get('gems')) for itemGroup in _.values @itemGroups equipped = _.values(@equipment) @sortItem(item, equipped) for item in @items.models diff --git a/app/views/play/modal/PlayItemsModal.coffee b/app/views/play/modal/PlayItemsModal.coffee index f8e20fe59..b5bc70440 100644 --- a/app/views/play/modal/PlayItemsModal.coffee +++ b/app/views/play/modal/PlayItemsModal.coffee @@ -87,7 +87,7 @@ module.exports = class PlayItemsModal extends ModalView category = slotToCategory[model.getAllowedSlots()[0]] or 'misc' @itemCategoryCollections[category] ?= new Backbone.Collection() collection = @itemCategoryCollections[category] - collection.comparator = (m) -> m.get('gems') ? m.get('tier') + collection.comparator = (m) -> m.get('tier') ? m.get('gems') collection.add(model) model.name = utils.i18n model.attributes, 'name' model.affordable = cost <= gemsOwned From 55eaed0cd2c00498128a1a5e9f9365709308ad3f Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Wed, 26 Nov 2014 10:51:30 -0800 Subject: [PATCH 2/3] Updated AI/Vision pathfinding/line-of-sight default terrain updates. --- .../level/systems/SystemsTabView.coffee | 31 ++++++++++++------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/app/views/editor/level/systems/SystemsTabView.coffee b/app/views/editor/level/systems/SystemsTabView.coffee index 8608578ef..de97b7ca0 100644 --- a/app/views/editor/level/systems/SystemsTabView.coffee +++ b/app/views/editor/level/systems/SystemsTabView.coffee @@ -128,17 +128,26 @@ module.exports = class SystemsTabView extends CocoView onTerrainChanged: (e) -> defaultPathfinding = e.terrain in ['Dungeon', 'Indoor'] - return unless AI = @systemsTreema.get 'original=528110f30268d018e3000001' - return if AI.config?.findsPaths is defaultPathfinding - AI.config ?= {} - AI.config.findsPaths = defaultPathfinding - @systemsTreema.set 'original=528110f30268d018e3000001', AI - noty { - text: "AI System defaulted pathfinding to #{defaultPathfinding} for terrain #{e.terrain}." - layout: 'topCenter' - timeout: 5000 - type: 'information' - } + changed = false + if AI = @systemsTreema.get 'original=528110f30268d018e3000001' + unless AI.config?.findsPaths is defaultPathfinding + AI.config ?= {} + AI.config.findsPaths = defaultPathfinding + @systemsTreema.set 'original=528110f30268d018e3000001', AI + changed = true + if Vision = @systemsTreema.get 'original=528115040268d018e300001b' + unless Vision.config?.checksLineOfSight is defaultPathfinding + Vision.config ?= {} + Vision.config.checksLineOfSight = defaultPathfinding + @systemsTreema.set 'original=528115040268d018e300001b', Vision + changed = true + if changed + noty { + text: "AI/Vision System defaulted pathfinding/line-of-sight to #{defaultPathfinding} for terrain #{e.terrain}." + layout: 'topCenter' + timeout: 5000 + type: 'information' + } buildDefaultSystems: -> [ From e8ed2050388fe6d7b3acbf0901b15102889f44de Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Wed, 26 Nov 2014 11:03:24 -0800 Subject: [PATCH 3/3] Added original data to all WorldMapView levels. --- app/views/play/WorldMapView.coffee | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/app/views/play/WorldMapView.coffee b/app/views/play/WorldMapView.coffee index 65ba2b01f..eac98c32a 100644 --- a/app/views/play/WorldMapView.coffee +++ b/app/views/play/WorldMapView.coffee @@ -621,7 +621,7 @@ forest = [ name: 'Endangered Burl' type: 'hero' id: 'endangered-burl' - original: '' + original: '546e97033f1c1c1be898402b' description: 'Hunt ogres in the woods, but watch out for lumbering beasts.' nextLevels: continue: 'village-guard' @@ -665,6 +665,7 @@ forest = [ name: 'Ogre Encampment' type: 'hero' id: 'ogre-encampment' + original: '5456b3c8d5ada30000525605' description: 'Recover stolen treasure from an ogre encampment.' nextLevels: continue: 'woodland-cleaver' @@ -675,6 +676,7 @@ forest = [ name: 'Woodland Cleaver' type: 'hero' id: 'woodland-cleaver' + original: '5456bb8dd5ada30000525613' description: 'Use your new cleave ability to fend off munchkins.' nextLevels: continue: 'shield-rush' @@ -685,6 +687,7 @@ forest = [ name: 'Shield Rush' type: 'hero' id: 'shield-rush' + original: '5459570bb4461871053292f5' description: 'Combine cleave and shield to endure an ogre onslaught.' nextLevels: continue: 'peasant-protection' @@ -697,6 +700,7 @@ forest = [ name: 'Peasant Protection' type: 'hero' id: 'peasant-protection' + original: '545ec477e7f60fd6c55760e9' description: 'Stay close to Victor.' nextLevels: continue: 'munchkin-swarm' @@ -707,6 +711,7 @@ forest = [ name: 'Munchkin Swarm' type: 'hero' id: 'munchkin-swarm' + original: '545edba9e7f60fd6c5576133' description: 'Loot a gigantic chest while surrounded by a swarm of ogre munchkins.' nextLevels: continue: 'coinucopia' @@ -719,6 +724,7 @@ forest = [ name: 'Munchkin Harvest' type: 'hero' id: 'munchkin-harvest' + original: '5470001860f6cc376131525d' description: 'Join forces with a new hero: Amara Arrowhead.' nextLevels: continue: 'swift-dagger' @@ -730,6 +736,7 @@ forest = [ name: 'Swift Dagger' type: 'hero' id: 'swift-dagger' + original: '54701f7860f6cc37613152a1' description: 'Deal damage from a distance with your new hero.' nextLevels: continue: 'shrapnel' @@ -741,6 +748,7 @@ forest = [ name: 'Shrapnel' type: 'hero' id: 'shrapnel' + original: '5470291c60f6cc37613152d1' description: 'Explore the explosive arts.' nextLevels: continue: 'coinucopia' @@ -754,6 +762,7 @@ forest = [ name: 'Arcane Ally' type: 'hero' id: 'arcane-ally' + original: '5470b98ceb739dbc9d2402c7' description: 'Stand your ground against large ogres with a new hero: Ms. Hushbaum.' nextLevels: continue: 'touch-of-death' @@ -765,6 +774,7 @@ forest = [ name: 'Touch of Death' type: 'hero' id: 'touch-of-death' + original: '5470ca33eb739dbc9d2402ee' description: 'Learn your first spell to siphon life from your foes.' nextLevels: continue: 'bonemender' @@ -776,6 +786,7 @@ forest = [ name: 'Bonemender' type: 'hero' id: 'bonemender' + original: '5470d013eb739dbc9d240323' description: 'Cast regeneration on allied soldiers to withstand a siege.' nextLevels: continue: 'coinucopia' @@ -788,6 +799,7 @@ forest = [ name: 'Coinucopia' type: 'hero' id: 'coinucopia' + original: '545bb1181e649a4495f887df' description: 'Start playing in real-time with input flags as you collect gold coins!' nextLevels: continue: 'copper-meadows' @@ -798,6 +810,7 @@ forest = [ name: 'Copper Meadows' type: 'hero' id: 'copper-meadows' + original: '5462491c688f333d05d8af38' description: 'This level exercises: if/else, object members, variables, flag placement, and collection.' nextLevels: continue: 'drop-the-flag' @@ -808,6 +821,7 @@ forest = [ name: 'Drop the Flag' type: 'hero' id: 'drop-the-flag' + original: '54626472f3c64b7b0598590c' description: 'This level exercises: flag position, object members.' nextLevels: continue: 'deadly-pursuit' @@ -818,6 +832,7 @@ forest = [ name: 'Deadly Pursuit' type: 'hero' id: 'deadly-pursuit' + original: '54626f270cacde3f055434ac' description: 'This level exercises: if/else, flag placement and timing, item collection.' nextLevels: continue: 'rich-forager' @@ -828,6 +843,7 @@ forest = [ name: 'Rich Forager' type: 'hero' id: 'rich-forager' + original: '546283ddfdd66af405fa8209' description: 'This level exercises: if/else if, collection, combat.' nextLevels: continue: 'multiplayer-treasure-grove' @@ -838,6 +854,7 @@ forest = [ name: 'Siege of Stonehold' type: 'hero' id: 'siege-of-stonehold' + original: '54712072eb739dbc9d24034b' description: 'Unlock the desert world, if you are strong enough to win this epic battle!' #nextLevels: # continue: '' @@ -849,6 +866,7 @@ forest = [ name: 'Multiplayer Treasure Grove' type: 'hero-ladder' id: 'multiplayer-treasure-grove' + original: '5469643c37600b40e0e09c5b' description: 'Mix collection, flags, and combat in this multiplayer coin-gathering arena.' x: 67.54 y: 25.94