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.

42 lines
3.7 KiB
JavaScript

var nm1 = ["a", "e", "i", "o", "u"];
var nm2 = ["b", "br", "d", "dr", "dn", "gn", "gr", "l", "ld", "lg", "lb", "lt", "lth", "mm", "mn", "md", "nd", "nr", "r", "rb", "rd", "rg", "rr", "rt", "rth", "st", "sn", "sm", "t", "th", "y"];
var nm3 = ["a", "e", "o", "u", "a"];
var nm4 = ["b", "d", "g", "k", "kh", "l", "lk", "m", "r", "rk", "t", "th"];
var nm5 = ["Abandoned", "Aberrant", "Abyssal", "Adamant", "Angry", "Attacking", "Barging", "Barking", "Barren", "Battling", "Berserk", "Berserking", "Bickering", "Biting", "Bitter", "Blaring", "Bleeding", "Blood", "Bloody", "Bribing", "Broken", "Burning", "Burrowing", "Bursting", "Charging", "Chasing", "Cheating", "Conquering", "Corrupted", "Corrupting", "Cowering", "Crawling", "Crazed", "Crazy", "Crooked", "Dark", "Decayed", "Defiant", "Defiling", "Dire", "Disobedient", "Enraged", "Fading", "Feeding", "Fierce", "Fighting", "Forging", "Forsaken", "Frightening", "Gazing", "Ghastly", "Glaring", "Gloating", "Grave", "Grim", "Grimacing", "Growling", "Grumbling", "Grunting", "Heckling", "Hideous", "Hissing", "Hoarding", "Hollow", "Howling", "Hulking", "Hungry", "Hunting", "Impish", "Infamous", "Infernal", "Jaded", "Jealous", "Juvenile", "Laughing", "Lone", "Lost", "Lurking", "Mad", "Marked", "Meddling", "Menacing", "Mumbling", "Muttering", "Noisy", "Noxious", "Outlandish", "Pacing", "Proud", "Prowling", "Putrid", "Quick", "Rabid", "Ragged", "Rambling", "Ravaging", "Rebel", "Reckless", "Reigning", "Repulsing", "Retched", "Roaming", "Roaring", "Rotted", "Rotten", "Rustling", "Ruthless", "Scrawny", "Screaming", "Shady", "Shaggy", "Shallow", "Shifting", "Silent", "Skeletal", "Smirking", "Snarling", "Stark", "Stout", "Swift", "Thrifty", "Thundering", "Torn", "Trampling", "Twisting", "Twitching", "Vagabond", "Vengeful", "Vicious", "Violent", "Volatile", "Wicked", "Wrathful", "Wretched"];
var nm6 = ["Assassins", "Barbarians", "Battlers", "Beasts", "Boors", "Bootleggers", "Brawlers", "Bruisers", "Brutes", "Bullies", "Butchers", "Chasers", "Critters", "Devils", "Executioners", "Exterminators", "Ferals", "Fiends", "Finks", "Freaks", "Gluttons", "Gorgers", "Harbingers", "Hellions", "Heralds", "Hogs", "Hoodlums", "Hunters", "Killers", "Loafers", "Massacrers", "Mavericks", "Mercenaries", "Miscreants", "Miscreations", "Mongrels", "Monsters", "Mutilators", "Mutts", "Outcasts", "Outlaws", "Pugilists", "Ramblers", "Rascals", "Rats", "Ravagers", "Rovers", "Sadists", "Savagages", "Slayers", "Stalkers", "Trappers", "Vagabonds", "Vagrants", "Vandals", "Varmints", "Vermin", "Wanderers", "Warlords", "Wildlings"];
var br = "";
function nameGen() {
$('#placeholder').css('textTransform', 'capitalize');
var element = document.createElement("div");
element.setAttribute("id", "result");
for (i = 0; i < 10; i++) {
nameMas();
while (nMs === "") {
nameMas();
}
rnd = Math.random() * nm5.length | 0;
rnd2 = Math.random() * nm6.length | 0;
names = nMs + " of the " + nm5[rnd] + " " + nm6[rnd2];
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);
}
function nameMas() {
rnd = Math.random() * nm1.length | 0;
rnd2 = Math.random() * nm2.length | 0;
rnd3 = Math.random() * nm3.length | 0;
rnd4 = Math.random() * nm4.length | 0;
while (nm2[rnd2] === nm4[rnd4]) {
rnd4 = Math.random() * nm4.length | 0;
}
nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm4[rnd4];
testSwear(nMs);
}