dndGnollNames.js (3739B)
1 var nm1 = ["a", "e", "i", "o", "u"]; 2 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"]; 3 var nm3 = ["a", "e", "o", "u", "a"]; 4 var nm4 = ["b", "d", "g", "k", "kh", "l", "lk", "m", "r", "rk", "t", "th"]; 5 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"]; 6 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"]; 7 var br = ""; 8 9 function nameGen() { 10 $('#placeholder').css('textTransform', 'capitalize'); 11 var element = document.createElement("div"); 12 element.setAttribute("id", "result"); 13 for (i = 0; i < 10; i++) { 14 nameMas(); 15 while (nMs === "") { 16 nameMas(); 17 } 18 rnd = Math.random() * nm5.length | 0; 19 rnd2 = Math.random() * nm6.length | 0; 20 names = nMs + " of the " + nm5[rnd] + " " + nm6[rnd2]; 21 br = document.createElement('br'); 22 element.appendChild(document.createTextNode(names)); 23 element.appendChild(br); 24 } 25 if (document.getElementById("result")) { 26 document.getElementById("placeholder").removeChild(document.getElementById("result")); 27 } 28 document.getElementById("placeholder").appendChild(element); 29 } 30 31 function nameMas() { 32 rnd = Math.random() * nm1.length | 0; 33 rnd2 = Math.random() * nm2.length | 0; 34 rnd3 = Math.random() * nm3.length | 0; 35 rnd4 = Math.random() * nm4.length | 0; 36 while (nm2[rnd2] === nm4[rnd4]) { 37 rnd4 = Math.random() * nm4.length | 0; 38 } 39 nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm4[rnd4]; 40 testSwear(nMs); 41 }