amp-web-push-widget button.amp-subscribe { display: inline-flex; align-items: center; border-radius: 5px; border: 0; box-sizing: border-box; margin: 0; padding: 10px 15px; cursor: pointer; outline: none; font-size: 15px; font-weight: 500; background: #4A90E2; margin-top: 7px; color: white; box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.5); -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .amp-logo amp-img{width:190px} .amp-menu input{display:none;}.amp-menu li.menu-item-has-children ul{display:none;}.amp-menu li{position:relative;display:block;}.amp-menu > li a{display:block;} .icon-widgets:before {content: "\e1bd";}.icon-search:before {content: "\e8b6";}.icon-shopping-cart:after {content: "\e8cc";}
// Descriptors based on government type const governmentDescriptors = { kingdom: ["Hereditary Monarchy", "Royal Dynasty", "Ancient Throne", "Noble Lineage"], empire: ["Imperial Might", "Expansionist Power", "Vast Territories", "Imperial Dominance"], republic: ["Senate Rule", "Elected Council", "Merchant Princes", "Democratic Traditions"], tribal: ["Clan Alliances", "Elder Council", "Warrior Bands", "Nomadic Tribes"], theocracy: ["Divine Mandate", "Priestly Rule", "Sacred Order", "Temple Authority"], citystates: ["Merchant League", "Independent Cities", "Trade Federation", "Coastal Powers"], magocracy: ["Arcane Rule", "Sorcerous Elite", "Enchanted Dominion", "Mage Council"] };
// Terrain descriptors const terrainDescriptors = { mixed: ["diverse landscapes", "varied terrain", "many ecosystems", "contrasting regions"], mountain: ["towering peaks", "high valleys", "mountain strongholds", "alpine passes"], forest: ["ancient woods", "verdant canopies", "forested realms", "timberlands"], plains: ["endless grasslands", "golden steppes", "vast plains", "rolling hills"], desert: ["arid wastes", "sun-baked dunes", "oasis cities", "scorching sands"], islands: ["coastal islands", "archipelago nations", "naval powers", "seafaring people"], tundra: ["frozen wastes", "northern expanses", "icebound territories", "permafrost lands"], jungle: ["lush jungles", "verdant canopies", "tropical expanse", "rainforest domains"], underdark: ["cavernous depths", "subterranean realms", "underground cities", "lightless domains"] };
// Nation adjectives const nationAdjectives = [ "Proud", "Ancient", "Mysterious", "Warlike", "Prosperous", "Secretive", "Enigmatic", "Scholarly", "Martial", "Arcane", "Devout", "Merchant", "Seafaring", "Nomadic", "Expansionist", "Isolationist", "Diplomatic", "Artistic", "Philosophical", "Mercantile", "Agricultural", "Industrial" ];
function generateNation() { const cultureType = document.getElementById('cultureType').value; const governmentType = document.getElementById('governmentType').value; const terrainType = document.getElementById('terrainType').value;
const components = nameComponents[cultureType];
// Generate name parts const prefix = randomElement(components.prefixes); const suffix = randomElement(components.suffixes); const title = randomElement(components.titles);
// 30% chance to add a second prefix let name = prefix; if (Math.random() > 0.7) { name = randomElement(components.prefixes) + name; }
name += suffix;
// 50% chance to add "of the" with an adjective let fullName = name; if (Math.random() > 0.5) { fullName = `${title} of ${name}`; } else { // 50% of these will be "The X Y" if (Math.random() > 0.5) { fullName = `The ${randomElement(['Grand', 'High', 'Holy', 'Eternal', 'Sacred', 'Mighty'])} ${name} ${title}`; } else { fullName = `${name} ${title}`; } }
document.getElementById('nationName').textContent = fullName;
// Generate descriptive text const govDesc = randomElement(governmentDescriptors[governmentType]); const terrainDesc = randomElement(terrainDescriptors[terrainType]); const adjective = randomElement(nationAdjectives);
const historyText = `A ${adjective.toLowerCase()} ${governmentType.replace(/_/g, ' ')} of ${terrainDesc}, ${fullName} is known for its ${govDesc.toLowerCase()}. The people are ${getPeopleDescriptor(cultureType)} and the land is ${getLandDescriptor(terrainType)}.`;
document.getElementById('nationHistory').textContent = historyText; }
function getPeopleDescriptor(culture) { const descriptors = { generic: ["steeped in tradition", "proud of their heritage", "suspicious of outsiders", "welcoming to travelers"], nordic: ["hardy and fierce", "loyal to their clans", "skilled sailors and warriors", "proud of their sagas"], arabic: ["renowned scholars", "skilled traders", "devout and pious", "master artisans"], asian: ["disciplined and orderly", "respectful of hierarchy", "artistic and refined", "philosophical thinkers"], celtic: ["passionate and poetic", "fiercely independent", "connected to nature", "bound by oaths"], roman: ["law-abiding citizens", "proud of their civilization", "militaristic", "engineering marvels"], slavic: ["resilient and strong", "deeply superstitious", "family-oriented", "seasoned by harsh winters"], african: ["storytellers and griots", "resourceful and adaptive", "community-focused", "spiritual and connected"], mesoamerican: ["astronomers and mathematicians", "fierce warriors", "artistic builders", "devout worshippers"] }; return randomElement(descriptors[culture]); }
function getLandDescriptor(terrain) { const descriptors = { mixed: ["bountiful and varied", "home to many peoples", "strategically located"], mountain: ["rich in minerals", "fortified by nature", "challenging to traverse"], forest: ["teeming with wildlife", "mystical and ancient", "protected by the trees"], plains: ["fertile and productive", "exposed to the elements", "ideal for cavalry"], desert: ["harsh but beautiful", "sparsely populated", "filled with hidden treasures"], islands: ["dependent on the sea", "vulnerable to storms", "culturally diverse"], tundra: ["bleak but majestic", "sparsely inhabited", "rich in furs and oil"], jungle: ["teeming with life", "dangerous but rewarding", "full of ancient ruins"], underdark: ["alien to surface dwellers", "rich in strange minerals", "filled with bioluminescent beauty"] }; return randomElement(descriptors[terrain]); }
function randomElement(array) { return array[Math.floor(Math.random() * array.length)]; }
// Generate initial nation on load
window.onload = generateNation;