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
3.6 KiB
JavaScript
29 lines
3.6 KiB
JavaScript
function nameGen() {
|
|
var nm1 = ["Alien", "Ancient God", "Android", "Assassin", "Bandit", "Banshee", "Bigfoot", "Bounty Hunter", "Cave Dweller", "Changeling", "Clockwork Creature", "Clown", "Corpse", "Crypt Keeper", "Cthulhu", "Cyborg", "Dark Angel", "Dark Druid", "Dark Elf", "Dark Wizard", "Death", "Demon", "Demonic Butler", "Devil", "Djinn", "Draugr", "Dryad", "Ent/Tree-Creature", "Faun", "Fishfolk", "Frankenstein's Monster", "Gargoyle", "Genie", "Ghost", "Ghoul", "Goblin", "Golem", "Gorgon", "Grim Reaper", "Hag", "Hagraven", "Half-Orc", "Harpie", "Headless Horseman", "Human Pumpkin Carving", "Humanoid Animal", "Humanoid Insect", "Ifrit", "Imp", "Lich", "Mad Scientist", "Masked Horror", "Medusa", "Mid-Mutation Mutant", "Minotaur", "Mix of Monsters", "Monster Cop", "Monster Doctor", "Monster Hunter", "Monster Nurse", "Mothman", "Mummy", "Mutant", "Naga", "Necromancer", "Nephilim", "Ogre", "Oni", "Orc", "Pirate", "Pop-Culture Killer", "Pop-Culture Monster", "Possessed Animatronic", "Possessed Puppet", "Rakshasa", "Reptilian", "Revenant", "Satyr", "Scarecrow", "Siren", "Skeleton", "Skeleton Mime", "Spider Monster", "Spore-Infested Human", "Sprite", "Stitched-Up Monster", "Succubus/Incubus", "Super Villain", "Defeated Superhero", "Swamp Creature", "Troll", "Undead Construct", "Undead Knight", "Undead Clergy", "Undead Princess", "Undead Soldier", "Undead Version of a Pop-Culture Icon", "Undead Warrior", "Valkyrie", "Vampire", "Ventriloquist Dummy", "Viking", "Voodoo Doll", "Warlock", "Wendigo", "Werebear", "Werecat", "Werefrog", "Wererat", "Werewolf", "Witch", "Wraith", "Yeti", "Zombie"];
|
|
var nm2 = ["Alien", "Blight", "Clockwork", "Corrupted", "Crazed", "Cursed", "Decaying", "Deformed", "Demonic", "Diabolic", "Diseased", "Draconic", "Eyeless", "Faceless", "Phantom", "Haunted", "Infected", "Infernal", "Insane", "Masked", "Monster", "Mutant", "Patchwork", "Plague", "Possessed", "Rabid", "Reanimated", "Rotten", "Shadow", "Skeleton", "Spirit", "Stitched-Up", "Undead", "Voodoo", "Wounded"];
|
|
var nm3 = ["Alien", "Android", "Angel", "Ape", "Assassin", "Bandit", "Banshee", "Beast", "Bride", "Butcher", "Butler", "Clergy", "Clown", "Construct", "Cop", "Corpse", "Creature", "Cyborg", "Demon", "Dentist", "Djinn", "Doctor", "Doll", "Draugr", "Druid", "Dryad", "Elf", "Faun", "Genie", "Ghost", "Ghoul", "Goblin", "God", "Golem", "Gorgon", "Groom", "Hag", "Harpie", "Hunter", "Jester", "Killer", "King", "Knight", "Lich", "Marionette", "Mime", "Monster", "Mummy", "Mutant", "Naga", "Nurse", "Ogre", "Orc", "Patient", "Pirate", "Politician", "Pop-Icon", "Puppet", "Queen", "Reaper", "Reptilian", "Robot", "Scarecrow", "Scientist", "Servant", "Skeleton", "Soldier", "Sprite", "Superhero", "Surgeon", "Vampire", "Viking", "Warlock", "Warlord", "Warrior", "Werewolf", "Witch", "Wizard", "Wraith", "Yeti", "Zombie"];
|
|
var br = "";
|
|
var element = document.createElement("div");
|
|
element.setAttribute("id", "result");
|
|
for (i = 0; i < 10; i++) {
|
|
if (i < 5) {
|
|
rnd = Math.random() * nm2.length | 0;
|
|
rnd2 = Math.random() * nm3.length | 0;
|
|
names = nm2[rnd] + " " + nm3[rnd2];
|
|
nm2.splice(rnd, 1);
|
|
nm3.splice(rnd2, 1);
|
|
} else {
|
|
rnd = Math.random() * nm1.length | 0;
|
|
names = nm1[rnd];
|
|
nm1.splice(rnd, 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);
|
|
}
|