From 5085567281870712b02379413282e6789294d258 Mon Sep 17 00:00:00 2001 From: Andrew Rose Date: Wed, 6 Apr 2022 13:05:12 +0100 Subject: [PATCH] A bit variety of points of interest added --- modules/markers-generator.js | 124 +++++++++++++++++++++++++++++++++-- 1 file changed, 118 insertions(+), 6 deletions(-) diff --git a/modules/markers-generator.js b/modules/markers-generator.js index 6c3e0398..8a1b6e85 100644 --- a/modules/markers-generator.js +++ b/modules/markers-generator.js @@ -1,5 +1,11 @@ "use strict"; +/* +To add: +migrating herds of animals +archery contests +*/ + window.Markers = (function () { let config = []; let occupied = []; @@ -28,8 +34,12 @@ window.Markers = (function () { {type: "brigands", icon: "💰", px: 13, min: 50, each: 100, multiplier: 1, list: listBrigands, add: addBrigands}, {type: "pirates", icon: "ðŸī‍☠ïļ", dx: 51, min: 40, each: 300, multiplier: 1, list: listPirates, add: addPirates}, {type: "statues", icon: "ðŸ—ŋ", min: 80, each: 1200, multiplier: 1, list: listStatues, add: addStatue}, - {type: "ruines", icon: "🏚", min: 80, each: 1200, multiplier: 1, list: listRuins, add: addRuins}, - {type: "portals", icon: "🌀", px: 14, min: 16, each: 8, multiplier: +isFantasy, list: listPortals, add: addPortal} + {type: "ruins", icon: "🏚", min: 80, each: 1200, multiplier: 1, list: listRuins, add: addRuins}, + {type: "circuses", icon: "🎊", min: 80, each: 1000, multiplier: 1, list: listCircuses, add: addCircuses}, + {type: "jousts", icon: "ðŸĪš", min: 1, each: 25, multiplier: 1, list: listJousts, add: addJousts}, + {type: "canoes", icon: "ðŸ›ķ", min: 20, each: 250, multiplier: 1, list: listCanoes, add: addCanoes}, + {type: "portals", icon: "🌀", px: 14, min: 16, each: 8, multiplier: +isFantasy, list: listPortals, add: addPortal}, + {type: "rifts", icon: "🌌", min: 50, each: 2000, multiplier: +isFantasy, list: listRifts, add: addRifts} ]; } @@ -407,14 +417,14 @@ window.Markers = (function () { const drinks = [ "wine", "brandy", - "jinn", + "gin", "whisky", "rom", "beer", "cider", "mead", "liquor", - "spirit", + "spirits", "vodka", "tequila", "absinthe", @@ -777,6 +787,75 @@ window.Markers = (function () { notes.push({id, name, legend}); } + function listCircuses({cells}) { + return cells.i.filter(i => !occupied[i] && cells.culture[i] && cells.h[i] >= 20 && pack.cells.road[i]); + } + + function addCircuses(id, cell) { + const adjectives = [ + "Fantastical", + "Wonderous", + "Incomprehensible", + "Magical", + "Extraordinary", + "Unmissable", + "World-famous", + "Breathtaking" + ]; + + const adjective = ra(adjectives); + const name = `Travelling ${adjective} Circus`; + const legend = `Roll up, roll up, this ${adjective.toLowerCase()} circus is here for a limited time only.`; + notes.push({id, name, legend}); + } + + function listJousts({cells, burgs}) { + return cells.i.filter(i => !occupied[i] && cells.burg[i] && burgs[cells.burg[i]].population > 20); + } + + function addJousts(id, cell) { + const {cells, burgs} = pack; + const types = [ + "Joust", + "Competition", + "Melee", + "Tournament", + "Contest" + ]; + const virtues = [ + "cunning", + "might", + "speed", + "the greats", + "acumen", + "brutality" + ]; + + // Jousts can only be added to burgs + if (!cells.burg[cell]) return; + const burgName = burgs[cells.burg[cell]].name; + const type = ra(types) + const virtue = ra(virtues) + + const name = `${burgName} ${type}`; + const legend = `Warriors from around the land gather for a ${type.toLowerCase()} of ${virtue} in ${burgName}, with fame, fortune and favour on offer to the victor`; + notes.push({id, name, legend}); + } + + function listCanoes({cells}) { + return cells.i.filter(i => !occupied[i] && cells.r[i]); + } + + function addCanoes(id, cell) { + const {cells} = pack; + const river = pack.rivers.find(r => r.i === pack.cells.r[cell]); + + + const name = `Minor Jetty`; + const legend = `A small location along the ${river} to launch boats from sits here, along with a weary looking owner, willing to sell passage along the river`; + notes.push({id, name, legend}); + } + function listPortals({burgs}) { return burgs .slice(1, Math.ceil(burgs.length / 10) + 1) @@ -788,13 +867,46 @@ window.Markers = (function () { const {cells, burgs} = pack; // Portals can only be added to burgs - if (cells.burg[cell]) return; + if (!cells.burg[cell]) return; const burgName = burgs[cells.burg[cell]].name; const name = `${burgName} Portal`; - const legend = `An element of the magic portal system connecting major cities. Portals installed centuries ago, but still work fine`; + const legend = `An element of the magic portal system connecting major cities. The portals were installed centuries ago, but still work fine`; notes.push({id, name, legend}); } + function listRifts({cells}) { + return cells.i.filter(i => !occupied[i] && pack.cells.pop[i] <= 3); + } + + function addRifts(id, cell) { + const types = [ + "Demonic", + "Interdimensional", + "Abyssal", + "Cosmic", + "Cataclysmic", + "Subterranean", + "Ancient" + ]; + + const descriptions = [ + "all known nearby beings to flee in terror", + "cracks in reality itself to form", + "swarms of foes to spill forth", + "the life of nearby plants to wither and decay", + "an emmissary to step through with an all-powerful relic" + ] + + const riftType = ra(types); + const name = `${riftType} Rift`; + const legend = `A rumoured ${riftType.toLowerCase()} rift in this area is causing ${ra(descriptions)}.`; + notes.push({id, name, legend}); + } + + function listRifts({cells}) { + return cells.i.filter(i => !occupied[i] && pack.cells.pop[i] <= 3); + } + return {add, generate, regenerate, getConfig, setConfig}; })();