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.
29 lines
2.9 KiB
JavaScript
29 lines
2.9 KiB
JavaScript
function nameGen() {
|
|
var nm1 = ["Ancient", "Bleak", "Blind", "Cold", "Colossal", "Corrupt", "Crazed", "Dark", "Dead", "Enraged", "Eternal", "Ethereal", "Forsaken", "Frozen", "Gaping", "Gargantuan", "Ghastly", "Gigantic", "Grand", "Grave", "Great", "Grim", "Growing", "Hollow", "Hulking", "Hungry", "Imminent", "Impending", "Infernal", "Infinite", "Lone", "Marked", "Obsidian", "Parallel", "Prime", "Radiant", "Second", "Shadowed", "Silent", "Smiling", "Thundering", "Thunderous", "Unknown", "Veiled", "Volatile", "Wandering", "Wicked", "Wild", "Wretched"];
|
|
var nm2 = ["Abater", "Axe", "Betrayer", "Blade", "Bow", "Butcher", "Carver", "Champion", "Conqueror", "Dagger", "Decimator", "Desecrater", "Despoiler", "Destroyer", "Dominator", "Exterminator", "Harbinger", "Jaws", "Juggernaut", "Kiss", "Legacy", "Marauder", "Oath", "Obliterator", "Pact", "Ravager", "Razer", "Razor", "Reaper", "Reaver", "Ripper", "Ruiner", "Savage", "Shadow", "Silencer", "Slaughter", "Slayer", "Soul", "Spear", "Spine", "Sword", "Terminator", "Terror", "Titan", "Torturer", "Tyrant", "Undoer", "Vengeance", "Voice", "Warden", "Whisper"];
|
|
var nm3 = ["Amnesia", "Anger's Tear", "Apocalypse", "Armageddon", "Betrayer", "Blackest Heart", "Blade of the Grave", "Blight's Plight", "Broken Promise", "Darkheart", "Dawn of Ruins", "Dawnbreaker", "Deathbringer", "Deathraze", "Destiny's Requiem", "Devourer", "Doomblade", "Doombringer", "Draughtbane", "Echo", "Endbringer", "Epilogue", "Extinction", "Faithkeeper", "Fallen Champion", "Fleshrender", "Ghost Reaver", "Ghostwalker", "Grieving Blade", "Gutrender", "Hatred's Bite", "Heartseeker", "Heartstriker", "Hell's Scream", "Hellfire", "Hellreaver", "Hollow Silence", "Kinslayer", "Knight's Fall", "Last Rites", "Malice", "Massacre", "Mournblade", "Night's Edge", "Night's Fall", "Nightbane", "Oathbreaker", "Oblivion", "Perfect Storm", "Reaper", "Reaper's Toll", "Reckoning", "Reign of Misery", "Requiem", "Shadow Strike", "Shadowfang", "Soul Reaper", "Storm Breaker", "Stormbringer", "Stormcaller", "Unending Tyranny", "Vengeance", "Warmonger"];
|
|
var br = "";
|
|
var element = document.createElement("div");
|
|
element.setAttribute("id", "result");
|
|
for (i = 0; i < 10; i++) {
|
|
nTp = Math.random() * 3 | 0;
|
|
if (nTp === 0) {
|
|
rnd = Math.random() * nm3.length | 0;
|
|
names = nm3[rnd];
|
|
nm3.splice(rnd, 1);
|
|
} else {
|
|
rnd = Math.random() * nm1.length | 0;
|
|
rnd2 = Math.random() * nm2.length | 0;
|
|
names = "The " + nm1[rnd] + " " + nm2[rnd2];
|
|
nm2.splice(rnd2, 1);
|
|
}
|
|
br = document.createElement('br');
|
|
element.appendChild(document.createTextNode(names));
|
|
element.appendChild(br);
|
|
}
|
|
if (document.getElementById("result")) {
|
|
document.getElementById("placeholder").removeChild(document.getElementById("result"));
|
|
}
|
|
document.getElementById("placeholder").appendChild(element);
|
|
}
|