You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

300 lines
9.1 KiB
JavaScript

function nameGen(type) {
var nm1 = [
["Ágæti", "Celebration"],
["Áræði", "Courage"],
["Ármaðr", "Steward"],
["Ásjá", "Protection"],
["Ást", "Affection"],
["Ætla", "Purpose"],
["Æztr", "Highest"],
["Íþrótt", "Accomplishment"],
["Íss", "Ice"],
["Óþýðr", "Unfriendly"],
["Ógæfa", "Misfortune"],
["Ójafnaðr", "Injustice"],
["Óminni", "Oblivion"],
["Ótti", "Dread"],
["Óvættr", "Monster"],
["Ör", "Arrow"],
["Þǫgn", "Silence"],
["Þjófr", "Thief"],
["Þoka", "Fog"],
["Þrá", "Persistence"],
["Þrek", "Fortitude"],
["Ǫflugr", "Strong"],
["Ǫlfuss", "Drunk"],
["Akkeri", "Anchor"],
["Angan", "Joy"],
["Arfr", "Inheritance"],
["Aska", "Ashes"],
["Auðr", "Treasure"],
["Auga", "Eye"],
["Awnd", "Envy"],
["Bál", "Fire"],
["Banamaðr", "Executioner"],
["Bani", "Bane"],
["Bani", "Slayer"],
["Bati", "Advantage"],
["Baugr", "Bracelet"],
["Bein", "Bone"],
["Bifask", "Quake"],
["Bjalla", "Bell"],
["Blóð", "Blood"],
["Blóm", "Flower"],
["Bogi", "Bow"],
["Brjóst", "Chest"],
["Broddr", "Spear point"],
["Bruni", "Heat"],
["Dómr", "Fame"],
["Dāræ", "Fool"],
["Daga", "Dawn"],
["Dagan", "Daybreak"],
["Dofni", "Dopey"],
["Dráp", "Killing"],
["Dráp", "Murder"],
["Draumr", "Dream"],
["Dreyma", "Dream"],
["Dugr", "Boldness"],
["Duna", "Thunderous noise"],
["Efja", "Mud"],
["Efla", "Support"],
["Eiðr", "Oath"],
["Elding", "Dawn"],
["Erfiðr", "Trouble"],
["Erja", "Scratch"],
["Félagi", "Companion"],
["Fúna", "Rot"],
["Fegrð", "Beauty"],
["Feldr", "Cloak"],
["Fiðri", "Feathers"],
["Fiþla", "Fiddle"],
["Fjǫðr", "Wing"],
["Flótti", "Flight"],
["Flœrð", "Deceit"],
["Flakka", "Roam"],
["Forvitni", "Curiosity"],
["Fróðr", "Clever"],
["Frœði", "Knowledge"],
["Frami", "Courage"],
["Fretr", "Fart"],
["Friðr", "Handsome"],
["Frosti", "Frosty"],
["Funi", "Flame"],
["Gáta", "Riddle"],
["Gætir", "Guard"],
["Góðvili", "Goodwill"],
["Gørsimi", "Treasure"],
["Geisl", "Light beam"],
["Gipta", "Good luck"],
["Girnd", "Desire"],
["Gjalla", "Bellow"],
["Glóa", "Glow"],
["Glaumr", "Merry noise"],
["Glita", "Glitter"],
["Glymja", "Roar"],
["Gráðr", "Hunger"],
["Gríma", "Mask"],
["Grǫn", "Beak"],
["Gramer", "Fierce"],
["Grautr", "Porridge"],
["Gretta", "Grimace"],
["Guðr", "Battle"],
["Háls", "Neck"],
["Háski", "Danger"],
["Hægr", "Gentle"],
["Hǫfgi", "Drowsiness"],
["Hagall", "Hail"],
["Hagr", "Skilled"],
["Haldorðr", "True of word"],
["Happ", "Fortune"],
["Harmr", "Grief"],
["Hath", "Hate"],
["Hauss", "Skull"],
["Haust", "Autumn"],
["Hefnd", "Vengeance"],
["Hegnan", "Aid"],
["Heill", "Good omen"],
["Heit", "Promise"],
["Hermaðr", "Warrior"],
["Hernaðr", "Raid"],
["Hildr", "Battle"],
["Hilly", "Allegiance"],
["Himinn", "Heaven"],
["Hiti", "Heat"],
["Hjǫrr", "Sword"],
["Hjala", "Chatter"],
["Hjarn", "Hard snow"],
["Hjarta", "Heart"],
["Hlátr", "Laughter"],
["Hlæja", "Laugh"],
["Hlíf", "Protection"],
["Hluti", "Fate"],
["Horskr", "Sensible"],
["Hræ", "Carrion"],
["Hræzla", "Terror"],
["Hrakning", "Insult"],
["Hreysti", "Valor"],
["Hvílð", "Rest"],
["Hvítr", "White"],
["Hvass", "Prickly"],
["Hylli", "Loyalty"],
["Hyrr", "Fire"],
["Illska", "Cruelty"],
["Jǫkull", "Icicle"],
["Jaðarr", "Edge"],
["Kæmpe", "Champion"],
["Kúla", "Hunchback"],
["Kappi", "Hero"],
["Kjǫptr", "Jaw"],
["Knífr", "Knife"],
["Knǫttr", "Sphere"],
["Kol", "Coal"],
["Kompān", "Companion"],
["Korn", "Corn"],
["Kvæði", "Poem"],
["Kveðja", "Greeting"],
["Kviðr", "Belly"],
["Kvistr", "Twig"],
["Lík", "Corpse"],
["Líki", "Form"],
["Lúðr", "Trumpet"],
["Lǫð", "Invitation"],
["Laufsblað", "Leaf"],
["Liði", "Follower"],
["Litlauss", "Colorless"],
["Ljómi", "Radiance"],
["Ljós", "Lantern"],
["Ljótr", "Ugly"],
["Ljúga", "Lie"],
["Lof", "Praise"],
["Lukkja", "Loop"],
["Málmr", "Metal"],
["Máni", "Moon"],
["Máttr", "Might"],
["Móðr", "Fury"],
["Mórðvíg", "Murder"],
["Möl", "Pebbles"],
["Mǫrk", "Mark"],
["Makt", "Power"],
["Megin", "Strength"],
["Men", "Jewel"],
["Mergr", "Marrow"],
["Metnaðr", "Glory"],
["Miskunn", "Grace"],
["Moli", "Fragment"],
["Mosi", "Moss"],
["Nál", "Needle"],
["Nátt", "Night"],
["Nāthæ", "Peace"],
["Nið", "Hostility"],
["Oddr", "Point"],
["Ofsi", "Pride"],
["Orka", "Might"],
["Ríkr", "Powerful"],
["Rök", "Doom"],
["Röskr", "Sturdy"],
["Røkr", "Twilight"],
["Rún", "Rune"],
["Rœða", "Conversation"],
["Rǫdd", "Voice"],
["Reiði", "Wrath"],
["Rekja", "Trace"],
["Reykr", "Smoke"],
["Sál", "Soul"],
["Sæla", "Happiness"],
["Sæmd", "Honor"],
["Sókn", "Fight"],
["Sól", "Sun"],
["Sólskin", "Sunshine"],
["Sýn", "Vision"],
["Seiðr", "Enchantment"],
["Silki", "Silk"],
["Sjá", "Gaze"],
["Skálm", "Cleaver"],
["Skálpr", "Scabbard"],
["Skóð", "Weapon"],
["Skaði", "Death"],
["Skam", "Shame"],
["Skat", "Tribute"],
["Skegg", "Beard"],
["Skikkja", "Cloak"],
["Skipta", "Change"],
["Skjótr", "Swift"],
["Skjöldr", "Shield"],
["Skjarr", "Shy"],
["Skoða", "Spy"],
["Skrípi", "Horror"],
["Slátra", "Slaughter"],
["Spánn", "Chip/Shaving"],
["Spekð", "Wisdom"],
["Spilla", "Spoil"],
["Spjót", "Lance"],
["Spretta", "Sprout"],
["Stórmerki", "Mystery"],
["Staþgi", "Agreement"],
["Steinn", "Stone"],
["Stjarna", "Star"],
["Stormr", "Storm"],
["Strïth", "War"],
["Sumar", "Summer"],
["Svar", "Reply"],
["Svartr", "Black"],
["Svefn", "Sleep"],
["Tíðindi", "News"],
["Tal", "Conversation"],
["Taufr", "Talisman"],
["Trǫll", "Troll"],
["Traust", "Confidence"],
["Undr", "Marvel"],
["Vápn", "Weapon"],
["Vættr", "Spirit"],
["Vé", "Banner"],
["Vísindi", "Intelligence"],
["Vamm", "Blemish"],
["Varnaðr", "Warning"],
["Veizla", "Feast"],
["Villr", "Wild"],
["Vindr", "Wind"],
["Vini", "Leader"],
["Vit", "Wit"]
];
var br = "";
var tp = type;
var element = document.createElement("div");
element.setAttribute("id", "result");
for (i = 0; i < 10; i++) {
rnd = Math.random() * nm1.length | 0;
fNm = nm1[rnd][0];
lsTwo = fNm.substr(fNm.length - 2, fNm.length);
lsOne = lsTwo.charAt(1);
lsFir = lsTwo.charAt(0);
if (lsOne !== "r" || lsFir === "e" || lsFir === "a" || lsFir === "i" || fNm.length < 3) {
nMs = nm1[rnd][0] + " (" + nm1[rnd][1] + ")";
} else {
nTp = Math.random() * 6 | 0;
if (lsTwo === "ðr" || lsTwo === "gr" || lsTwo === "nr") {
if (nTp < 2) {
nMs = fNm.substr(0, fNm.length - 1) + "i (" + fNm + " - " + nm1[rnd][1] + ")";
} else if (nTp < 4) {
nMs = fNm.substr(0, fNm.length - 1) + "in (" + fNm + " - " + nm1[rnd][1] + ")";
} else {
nMs = nm1[rnd][0] + " (" + nm1[rnd][1] + ")";
}
} else {
if (nTp < 3) {
nMs = fNm.substr(0, fNm.length - 1) + " (" + fNm + " - " + nm1[rnd][1] + ")";
} else {
nMs = nm1[rnd][0] + " (" + nm1[rnd][1] + ")";
}
}
}
br = document.createElement('br');
element.appendChild(document.createTextNode(nMs));
element.appendChild(br);
}
if (document.getElementById("result")) {
document.getElementById("placeholder").removeChild(document.getElementById("result"));
}
document.getElementById("placeholder").appendChild(element);
}