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.

60 lines
4.7 KiB
JavaScript

var nm1 = ["Aberrant", "Acrid", "Aloof", "Ancient", "Arctic", "Arid", "Bawdy", "Berserk", "Bitter", "Bleak", "Bouncy", "Broken", "Bruised", "Bulky", "Bumpy", "Clumsy", "Craven", "Dopey", "Droopy", "Empty", "Flashy", "Flawless", "Flimsy", "Fluffy", "Fragrant", "Frigid", "Furry", "Fuzzy", "Gaseous", "Glossy", "Greasy", "Grubby", "Hideous", "Hulking", "Jumbo", "Knobby", "Lanky", "Luminous", "Lumpy", "Meager", "Murky", "Noxious", "Numb", "Pale", "Pompous", "Pungent", "Putrid", "Rabid", "Radiant", "Scaly", "Scrawny", "Shady", "Shaggy", "Skeletal", "Slimy", "Smiling", "Spotty", "Stalky", "Striped", "Vagabond", "Volatile", "Waggish", "Webbed", "Wiggly", "Wobbly", "Wretched"];
var nm2 = ["Archer", "Babbler", "Basher", "Bawler", "Belcher", "Bruiser", "Butcher", "Cackler", "Carver", "Chanter", "Cleaver", "Clicker", "Crawler", "Creeper", "Dancer", "Dozer", "Drowner", "Echo", "Fisher", "Flincher", "Freezer", "Gasher", "Gazer", "Gnasher", "Griever", "Grinder", "Growler", "Hooter", "Avios", "Badger", "Beesting", "Birdbeak", "Boar", "Boartusk", "Bovinus", "Canidis", "Canus", "Carnivus", "Catclaw", "Cobra", "Corvinus", "Corvus", "Coyotis", "Crabclaw", "Crocodis", "Echidnus", "Equinos", "Falconis", "Felidas", "Fishscale", "Gastropodus", "Gator", "Gaurinis", "Gerbillis", "Goathorn", "Gorilla", "Grasshopper", "Harepaw", "Hippopus", "Jellyfish", "King Fisher", "Lionpaw", "Locust", "Lupinus", "Mammoth", "Mammutis", "Mandrill", "Piscis", "Ramhorn", "Ratitus", "Rattail", "Rhinohorn", "Sharktooth", "Simianis", "Sirenis", "Skunk", "Snakeskin", "Squidis", "Taurios", "Termite", "Tigerclaw", "Tigris", "Turtleshell", "Ursus", "Vulpus", "Walrus", "Howler", "Impaler", "Itcher", "Jingler", "Knocker", "Lasher", "Leaper", "Loomer", "Lurcher", "Lurker", "Masker", "Mesher", "Oozer", "Peeker", "Piercer", "Pincher", "Pitcher", "Prowler", "Rambler", "Retcher", "Reveler", "Schemer", "Screamer", "Screecher", "Shaker", "Shifter", "Shrieker", "Slasher", "Sleeper", "Smirker", "Sneaker", "Sniveler", "Spitter", "Stalker", "Stitcher", "Swiper", "Trickster", "Twister", "Twitcher", "Wheezer", "Whisker", "Whistler", "Wriggler"];
var nm3 = ["", "", "", "b", "d", "g", "h", "n", "r", "z"];
var nm4 = ["aa", "oo", "ie", "a", "e", "i", "o", "u", "a", "a", "u", "u", "a", "e", "i", "o", "u", "a", "a", "u", "u", "a", "e", "i", "o", "u", "a", "a", "u", "u"];
var nm5 = ["d", "dd", "g", "gg", "k", "ll", "l", "n", "ng", "nz", "t", "tt", "w", "y"];
var nm6 = ["", "", "", "d", "h", "l", "ll", "n", "ng", "r"];
var nm7 = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"];
var br = "";
function nameGen() {
$('#placeholder').css('textTransform', 'capitalize');
var element = document.createElement("div");
element.setAttribute("id", "result");
for (i = 0; i < 10; i++) {
nTp = Math.random() * 9 | 0;
if (nTp < 3) {
rnd = Math.random() * nm1.length | 0;
rnd2 = Math.random() * nm7.length | 0;
names = nm1[rnd] + " " + nm7[rnd2];
} else if (nTp < 6) {
rnd = Math.random() * nm2.length | 0;
names = nm2[rnd];
} else {
rnd = Math.random() * nm3.length | 0;
rnd2 = Math.random() * nm4.length | 0;
rnd3 = Math.random() * nm5.length | 0;
rnd4 = Math.random() * nm4.length | 0;
while (nm4[rnd4] < 3) {
rnd4 = Math.random() * nm4.length | 0;
}
if (nTp === 6) {
rnd5 = Math.random() * nm6.length | 0;
names = nm3[rnd] + nm4[rnd2] + nm5[rnd3] + nm4[rnd4] + nm6[rnd5];
} else if (nTp === 7) {
rnd5 = Math.random() * nm3.length | 0;
rnd6 = Math.random() * nm4.length | 0;
while (nm4[rnd6] < 3) {
rnd6 = Math.random() * nm4.length | 0;
}
while (nm3[rnd5] === "") {
rnd5 = Math.random() * nm3.length | 0;
}
names = nm3[rnd] + nm4[rnd2] + nm5[rnd3] + nm4[rnd4] + nm3[rnd5] + nm4[rnd6] + nm5[rnd3] + nm4[rnd4]
} else {
rnd5 = Math.random() * nm6.length | 0;
rnd6 = Math.random() * nm5.length | 0;
rnd7 = Math.random() * nm4.length | 0;
names = nm3[rnd] + nm4[rnd2] + nm5[rnd3] + nm4[rnd4] + nm5[rnd6] + nm4[rnd7] + nm6[rnd5];
}
}
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);
}