mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
markers - bandits and pirates
This commit is contained in:
parent
2f2697e60f
commit
d176e3188c
1 changed files with 48 additions and 3 deletions
|
|
@ -24,6 +24,8 @@ window.Markers = (function () {
|
||||||
addSacredForests();
|
addSacredForests();
|
||||||
addSacredPineries();
|
addSacredPineries();
|
||||||
addSacredPalmGroves();
|
addSacredPalmGroves();
|
||||||
|
addBrigands();
|
||||||
|
addPirates();
|
||||||
|
|
||||||
TIME && console.timeEnd("addMarkers");
|
TIME && console.timeEnd("addMarkers");
|
||||||
};
|
};
|
||||||
|
|
@ -134,7 +136,7 @@ window.Markers = (function () {
|
||||||
const colors = ["Dark", "Light", "Bright", "Golden", "White", "Black", "Red", "Pink", "Purple", "Blue", "Green", "Yellow", "Amber", "Orange", "Brown", "Grey"];
|
const colors = ["Dark", "Light", "Bright", "Golden", "White", "Black", "Red", "Pink", "Purple", "Blue", "Green", "Yellow", "Amber", "Orange", "Brown", "Grey"];
|
||||||
const animals = ["Antelope", "Ape", "Badger", "Bear", "Beaver", "Bison", "Boar", "Buffalo", "Cat", "Crane", "Crocodile", "Crow", "Deer", "Dog", "Eagle", "Elk", "Fox", "Goat", "Goose", "Hare", "Hawk", "Heron", "Horse", "Hyena", "Ibis", "Jackal", "Jaguar", "Lark", "Leopard", "Lion", "Mantis", "Marten", "Moose", "Mule", "Narwhal", "Owl", "Panther", "Rat", "Raven", "Rook", "Scorpion", "Shark", "Sheep", "Snake", "Spider", "Swan", "Tiger", "Turtle", "Wolf", "Wolverine", "Camel", "Falcon", "Hound", "Ox"];
|
const animals = ["Antelope", "Ape", "Badger", "Bear", "Beaver", "Bison", "Boar", "Buffalo", "Cat", "Crane", "Crocodile", "Crow", "Deer", "Dog", "Eagle", "Elk", "Fox", "Goat", "Goose", "Hare", "Hawk", "Heron", "Horse", "Hyena", "Ibis", "Jackal", "Jaguar", "Lark", "Leopard", "Lion", "Mantis", "Marten", "Moose", "Mule", "Narwhal", "Owl", "Panther", "Rat", "Raven", "Rook", "Scorpion", "Shark", "Sheep", "Snake", "Spider", "Swan", "Tiger", "Turtle", "Wolf", "Wolverine", "Camel", "Falcon", "Hound", "Ox"];
|
||||||
const adjectives = ["New", "Good", "High", "Old", "Great", "Big", "Major", "Happy", "Main", "Huge", "Far", "Beautiful", "Fair", "Prime", "Ancient", "Golden", "Proud", "Lucky", "Fat", "Honest", "Giant", "Distant", "Friendly", "Loud", "Hungry", "Magical", "Superior", "Peaceful", "Frozen", "Divine", "Favorable", "Brave", "Sunny", "Flying"];
|
const adjectives = ["New", "Good", "High", "Old", "Great", "Big", "Major", "Happy", "Main", "Huge", "Far", "Beautiful", "Fair", "Prime", "Ancient", "Golden", "Proud", "Lucky", "Fat", "Honest", "Giant", "Distant", "Friendly", "Loud", "Hungry", "Magical", "Superior", "Peaceful", "Frozen", "Divine", "Favorable", "Brave", "Sunny", "Flying"];
|
||||||
const methods = ["Boiled", "Grilled", "Roasted", "Spit-roasted", "Stewed", "Stuffed", "Jugged", "Mashed", "Baked", "Braised", "Poached", "Marinated", "Pickled", "Smoked", "Dried", "Dry-aged", "Corned", "Fried", "Pan-fried", "Deep-fried", "Dressed", "Steamed", "Cured", "Syrupped"];
|
const methods = ["Boiled", "Grilled", "Roasted", "Spit-roasted", "Stewed", "Stuffed", "Jugged", "Mashed", "Baked", "Braised", "Poached", "Marinated", "Pickled", "Smoked", "Dried", "Dry-aged", "Corned", "Fried", "Pan-fried", "Deep-fried", "Dressed", "Steamed", "Cured", "Syrupped", "Flame-Broiled"];
|
||||||
const courses = ["beef", "pork", "bacon", "chicken", "lamb", "chevon", "hare", "rabbit", "hart", "deer", "antlers", "bear", "buffalo", "badger", "beaver", "turkey", "pheasant", "duck", "goose", "teal", "quail", "pigeon", "seal", "carp", "bass", "pike", "catfish", "sturgeon", "escallop", "pie", "cake", "pottage", "pudding", "onions", "carrot", "potato", "beet", "garlic", "cabbage", "eggplant", "eggs", "broccoli", "zucchini", "pepper", "olives", "pumpkin", "spinach", "peas", "chickpea", "beans", "rice", "pasta", "bread", "apples", "peaches", "pears", "melon", "oranges", "mango", "tomatoes", "cheese", "corn", "rat tails", "pig ears"];
|
const courses = ["beef", "pork", "bacon", "chicken", "lamb", "chevon", "hare", "rabbit", "hart", "deer", "antlers", "bear", "buffalo", "badger", "beaver", "turkey", "pheasant", "duck", "goose", "teal", "quail", "pigeon", "seal", "carp", "bass", "pike", "catfish", "sturgeon", "escallop", "pie", "cake", "pottage", "pudding", "onions", "carrot", "potato", "beet", "garlic", "cabbage", "eggplant", "eggs", "broccoli", "zucchini", "pepper", "olives", "pumpkin", "spinach", "peas", "chickpea", "beans", "rice", "pasta", "bread", "apples", "peaches", "pears", "melon", "oranges", "mango", "tomatoes", "cheese", "corn", "rat tails", "pig ears"];
|
||||||
const types = ["hot", "cold", "fire", "ice", "smoky", "misty", "shiny", "sweet", "bitter", "salty", "sour", "sparkling", "smelly"];
|
const types = ["hot", "cold", "fire", "ice", "smoky", "misty", "shiny", "sweet", "bitter", "salty", "sour", "sparkling", "smelly"];
|
||||||
const drinks = ["wine", "brandy", "jinn", "whisky", "rom", "beer", "cider", "mead", "liquor", "spirit", "vodka", "tequila", "absinthe", "nectar", "milk", "kvass", "kumis", "tea", "water", "juice", "sap"];
|
const drinks = ["wine", "brandy", "jinn", "whisky", "rom", "beer", "cider", "mead", "liquor", "spirit", "vodka", "tequila", "absinthe", "nectar", "milk", "kvass", "kumis", "tea", "water", "juice", "sap"];
|
||||||
|
|
@ -176,7 +178,7 @@ window.Markers = (function () {
|
||||||
const {cells} = pack;
|
const {cells} = pack;
|
||||||
|
|
||||||
const waterfalls = Array.from(cells.i.filter(i => cells.r[i] && cells.h[i] >= 50 && cells.c[i].some(c => cells.h[c] < 40 && cells.r[c])));
|
const waterfalls = Array.from(cells.i.filter(i => cells.r[i] && cells.h[i] >= 50 && cells.c[i].some(c => cells.h[c] < 40 && cells.r[c])));
|
||||||
const quantity = getQuantity(waterfalls, 1, 3);
|
const quantity = getQuantity(waterfalls, 1, 5);
|
||||||
if (!quantity) return;
|
if (!quantity) return;
|
||||||
addMarker("waterfall", "⟱", 50, 54, 16);
|
addMarker("waterfall", "⟱", 50, 54, 16);
|
||||||
|
|
||||||
|
|
@ -276,7 +278,7 @@ window.Markers = (function () {
|
||||||
addMarker("hill_monster", "👹", 50, 54, 13);
|
addMarker("hill_monster", "👹", 50, 54, 13);
|
||||||
|
|
||||||
const subjects = ["Locals", "Old folks", "Old books", "Tipplers"];
|
const subjects = ["Locals", "Old folks", "Old books", "Tipplers"];
|
||||||
const species = ["Ogre", "Troll", "Cyclopes", "Giant", "Monster", "Beast", "Dragon", "Undead", "Ghoul", "Vampire"];
|
const species = ["Ogre", "Troll", "Cyclops", "Giant", "Monster", "Beast", "Dragon", "Undead", "Ghoul", "Vampire"];
|
||||||
const modusOperandi = ["steals their cattle", "doesn't mind eating children", "doesn't mind of human flesh", "keeps the region at bay", "eats their kids", "abducts young women"];
|
const modusOperandi = ["steals their cattle", "doesn't mind eating children", "doesn't mind of human flesh", "keeps the region at bay", "eats their kids", "abducts young women"];
|
||||||
|
|
||||||
while (quantity) {
|
while (quantity) {
|
||||||
|
|
@ -368,6 +370,49 @@ window.Markers = (function () {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function addBrigands() {
|
||||||
|
const {cells} = pack;
|
||||||
|
|
||||||
|
let roads = Array.from(cells.i.filter(i => cells.culture[i] && cells.road[i] > 4));
|
||||||
|
let quantity = getQuantity(roads, 50, 100);
|
||||||
|
if (!quantity) return;
|
||||||
|
addMarker("brigands", "💰", 50, 50, 13);
|
||||||
|
|
||||||
|
const animals = ["Apes", "Badgers", "Bears", "Beavers", "Bisons", "Boars", "Cats", "Crows", "Dogs", "Foxes", "Hares", "Hawks", "Hyenas", "Jackals", "Jaguars", "Leopards", "Lions", "Owls", "Panthers", "Rats", "Ravens", "Rooks", "Scorpions", "Sharks", "Snakes", "Spiders", "Tigers", "Wolfs", "Wolverines", "Falcons"];
|
||||||
|
const types = {brigands: 4, bandits: 3, robbers: 1, highwaymen: 1};
|
||||||
|
|
||||||
|
while (quantity) {
|
||||||
|
const [cell] = extractAnyElement(roads);
|
||||||
|
const id = appendMarker(cell, "brigands");
|
||||||
|
const culture = cells.culture[cell];
|
||||||
|
const biome = cells.biome[cell];
|
||||||
|
const height = cells.p[cell];
|
||||||
|
const locality = height >= 70 ? "highlander" : [1, 2].includes(biome) ? "desert" : [3, 4].includes(biome) ? "mounted" : [5, 6, 7, 8, 9].includes(biome) ? "forest" : biome === 12 ? "swamp" : "angry";
|
||||||
|
const name = `${Names.getCulture(culture)} ${ra(animals)}`;
|
||||||
|
const legend = `A gang of ${locality} ${rw(types)}`;
|
||||||
|
notes.push({id, name, legend});
|
||||||
|
quantity--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function addPirates() {
|
||||||
|
const {cells} = pack;
|
||||||
|
|
||||||
|
let searoutes = Array.from(cells.i.filter(i => cells.h[i] < 20 && cells.road[i]));
|
||||||
|
let quantity = getQuantity(searoutes, 40, 300);
|
||||||
|
if (!quantity) return;
|
||||||
|
addMarker("pirates", "🏴☠️", 51, 50, 12);
|
||||||
|
|
||||||
|
while (quantity) {
|
||||||
|
const [cell] = extractAnyElement(searoutes);
|
||||||
|
const id = appendMarker(cell, "pirates");
|
||||||
|
const name = `Pirates`;
|
||||||
|
const legend = `Pirate ships have been spotted in these waters`;
|
||||||
|
notes.push({id, name, legend});
|
||||||
|
quantity--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function addMarker(id, icon, x, y, size) {
|
function addMarker(id, icon, x, y, size) {
|
||||||
const markers = svg.select("#defs-markers");
|
const markers = svg.select("#defs-markers");
|
||||||
if (markers.select("#marker_" + id).size()) return;
|
if (markers.select("#marker_" + id).size()) return;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue