dndDragonBrass.js (8654B)
1 var nm1 = ["", "b", "d", "g", "k", "m", "n", "r", "s", "th", "v"]; 2 var nm2 = ["a", "a", "a", "e", "i", "i", "i", "o", "u"]; 3 var nm3 = ["d", "g", "l", "n", "r", "s", "v", "z", "dr", "md", "mdr", "mn", "mr", "nd", "ndr", "ng", "ngr", "nr", "rd", "rn", "rdr", "rl", "rv", "sl", "sn", "sr", "str", "vd", "vdr", "vl", "vn", "zd"]; 4 var nm4 = ["eu", "aa", "y", "a", "a", "e", "i", "o", "u", "y", "a", "a", "e", "i", "o", "u", "y", "a", "a", "e", "i", "o", "u", "y", "a", "a", "e", "i", "o", "u"]; 5 var nm5 = ["l", "n", "r", "th", "v", "z", "dr", "ld", "lth", "nth", "thl", "thr"]; 6 var nm6 = ["ae", "io", "ia", "a", "a", "a", "e", "i", "o", "a", "a", "a", "e", "i", "o", "a", "a", "a", "e", "i", "o", "a", "a", "a", "e", "i", "o", "a", "a", "a", "e", "i", "o"]; 7 var nm7 = ["", "", "c", "d", "l", "m", "n", "r"]; 8 var nm8 = ["", "h", "l", "m", "n", "r", "s", "y", "z"]; 9 var nm9 = ["a", "e", "i", "o", "a", "e", "i", "o", "u"]; 10 var nm10 = ["d", "g", "l", "m", "n", "r", "s", "t", "th", "v", "z"]; 11 var nm11 = ["y", "a", "e", "i", "o", "a", "e", "i", "o", "u"]; 12 var nm12 = ["d", "l", "r", "s", "th", "x", "z"]; 13 var nm13 = ["ae", "ia", "ea", "a", "e", "i", "a", "e", "i", "a", "e", "i", "a", "e", "i"]; 14 var nm20 = ["Alder", "Arrow", "Bad", "Bane", "Battle", "Big", "Blaze", "Blind", "Bold", "Bone", "Boulder", "Bright", "Broad", "Bull", "Burn", "Burning", "Cloud", "Cold", "Dark", "Dawn", "Dead", "Death", "Doom", "Dread", "Dream", "Dull", "Dusk", "Elder", "Even", "Far", "Fate", "Fear", "Fierce", "Fire", "Flame", "Free", "Frost", "Fury", "Ghost", "Gloom", "Glow", "Gnaw", "Grand", "Grave", "Great", "Grim", "Half", "Hallow", "Hollow", "Hypno", "Iron", "Keen", "Last", "Light", "Little", "Lone", "Long", "Mad", "Marble", "Master", "Mighty", "Mind", "Moon", "Night", "Nimble", "Odd", "Old", "Pale", "Phantom", "Power", "Prey", "Primal", "Prime", "Rage", "Ragged", "Rapid", "Rash", "Razor", "Rumble", "Shade", "Shadow", "Sheep", "Shiver", "Silent", "Silver", "Smug", "Somber", "Steel", "Stone", "Storm", "Stout", "Strong", "Sun", "Swift", "Terror", "Thunder", "Twin", "Whirl", "Wicked", "Wild"]; 15 var nm21 = ["back", "beast", "belly", "brand", "breaker", "breath", "bringer", "brow", "claw", "claws", "cutter", "eye", "eyes", "fang", "fangs", "flayer", "flight", "fly", "forge", "forger", "glide", "grip", "hunter", "jaw", "mind", "mover", "reader", "ripper", "roar", "sight", "speaker", "striker", "tail", "teeth", "tooth", "watcher", "wing", "wings"]; 16 var nm22 = ["Abandonded", "Actor", "Adept", "Admired", "Adored", "Aggressor", "Agile", "Alert", "Ambitious", "Ancient", "Anguished", "Anxious", "Architect", "Assassin", "Awful", "Beautiful", "Behemoth", "Bewitched", "Bitter", "Blind", "Bold", "Bright", "Brilliant", "Brilliant Mind", "Bringer of Death", "Broken", "Brute", "Butcher", "Calm", "Careful", "Careless", "Cautious", "Celebrated", "Champion", "Charming", "Clever", "Conjurer", "Corrupt", "Corrupted", "Corruptor", "Cruel", "Cunning", "Cursed", "Damned", "Dangerous", "Dark", "Dead", "Defiant", "Delirious", "Deserter", "Destroyer", "Disguised", "Enchanted", "Enchanting", "Enigma", "Enormous", "Eternal", "Exalted", "Executioner", "False", "Fearless", "Fierce", "Forsaken", "Fury", "Generous", "Gentle", "Giant", "Gifted", "Glorious", "Grand", "Grave", "Great", "Greedy", "Grim", "Hollow", "Hungry", "Hunter", "Ill Tempered", "Illustrious", "Immortal", "Infinite", "Innocent", "Judge", "Last", "Lost", "Lost Mind", "Mad", "Majestic", "Mammoth", "Maneater", "Maniac", "Manslayer", "Marked", "Massive", "Master", "Menace", "Mighty", "Nocturnal", "Oracle", "Paragon", "Patient", "Powerful", "Prophet", "Proud", "Quiet", "Razor", "Rich", "Rotten", "Serpent", "Silent", "Stalker", "Swift", "Terrible", "Tyrant", "Vengeful", "Vicious", "Victorious", "Vigilant", "Violent", "Voiceless One", "Warmonger", "Warrior", "Watcher", "Whisperer", "Wicked", "Wild", "Wise", "Wrathful", "Wretched"]; 17 var br = ""; 18 19 function nameGen(type) { 20 $('#placeholder').css('textTransform', 'capitalize'); 21 var tp = type; 22 var element = document.createElement("div"); 23 element.setAttribute("id", "result"); 24 for (i = 0; i < 10; i++) { 25 if (i < 6) { 26 if (tp === 1) { 27 nameFem(); 28 while (nMs === "") { 29 nameFem(); 30 } 31 } else { 32 nameMas(); 33 while (nMs === "") { 34 nameMas(); 35 } 36 } 37 } else { 38 np = Math.random() * 2 | 0; 39 if (np === 0) { 40 rnd = Math.random() * nm22.length | 0; 41 nMs = "The " + nm22[rnd]; 42 } else { 43 rnd = Math.random() * nm20.length | 0; 44 rnd2 = Math.random() * nm21.length | 0; 45 nMs = nm20[rnd] + nm21[rnd2]; 46 } 47 } 48 br = document.createElement('br'); 49 element.appendChild(document.createTextNode(nMs)); 50 element.appendChild(br); 51 } 52 if (document.getElementById("result")) { 53 document.getElementById("placeholder").removeChild(document.getElementById("result")); 54 } 55 document.getElementById("placeholder").appendChild(element); 56 } 57 58 function nameFem() { 59 nTp = Math.random() * 6 | 0; 60 rnd = Math.random() * nm8.length | 0; 61 rnd2 = Math.random() * nm9.length | 0; 62 rnd4 = Math.random() * nm10.length | 0; 63 rnd5 = Math.random() * nm13.length | 0; 64 if (nTp === 0) { 65 while (nm10[rnd4] === nm8[rnd]) { 66 rnd4 = Math.random() * nm10.length | 0; 67 } 68 nMs = nm8[rnd] + nm9[rnd2] + nm10[rnd4] + nm13[rnd5]; 69 } else { 70 rnd6 = Math.random() * nm12.length | 0; 71 rnd7 = Math.random() * nm11.length | 0; 72 while (nm10[rnd4] === nm12[rnd6]) { 73 rnd6 = Math.random() * nm12.length | 0; 74 } 75 if (nTp < 4) { 76 nMs = nm8[rnd] + nm9[rnd2] + nm10[rnd4] + nm11[rnd7] + nm12[rnd6] + nm13[rnd5]; 77 } else { 78 rnd8 = Math.random() * nm12.length | 0; 79 rnd9 = Math.random() * nm11.length | 0; 80 while (nm12[rnd6] === nm12[rnd8]) { 81 rnd8 = Math.random() * nm12.length | 0; 82 } 83 nMs = nm8[rnd] + nm9[rnd2] + nm10[rnd4] + nm11[rnd7] + nm12[rnd6] + nm11[rnd7] + nm12[rnd8] + nm13[rnd5]; 84 } 85 } 86 testSwear(nMs); 87 } 88 89 function nameMas() { 90 nTp = Math.random() * 10 | 0; 91 rnd = Math.random() * nm1.length | 0; 92 rnd2 = Math.random() * nm2.length | 0; 93 rnd3 = Math.random() * nm7.length | 0; 94 rnd4 = Math.random() * nm3.length | 0; 95 rnd5 = Math.random() * nm4.length | 0; 96 if (nTp < 3) { 97 while (nm3[rnd4] === nm1[rnd] || nm3[rnd4] === nm7[rnd3]) { 98 rnd4 = Math.random() * nm3.length | 0; 99 } 100 nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd4] + nm4[rnd5] + nm7[rnd3]; 101 } else { 102 rnd6 = Math.random() * nm5.length | 0; 103 rnd7 = Math.random() * nm6.length | 0; 104 while (nm3[rnd4] === nm5[rnd6] || nm5[rnd6] === nm7[rnd3]) { 105 rnd6 = Math.random() * nm5.length | 0; 106 } 107 while (rnd5 < 2 && rnd7 < 3) { 108 rnd7 = Math.random() * nm6.length | 0; 109 } 110 if (nTp < 7) { 111 nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd4] + nm4[rnd5] + nm5[rnd6] + nm6[rnd7] + nm7[rnd3]; 112 } else { 113 rnd8 = Math.random() * 6 | 0; 114 rnd9 = Math.random() * nm4.length | 0; 115 while (nm5[rnd6] === nm5[rnd8]) { 116 rnd6 = Math.random() * nm5.length | 0; 117 } 118 if (rnd5 < 2 || rnd7 < 3) { 119 while (rnd9 < 2) { 120 rnd9 = Math.random() * nm4.length | 0; 121 } 122 } 123 if (nTp === 7) { 124 nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd4] + nm4[rnd5] + nm5[rnd6] + nm4[rnd9] + nm5[rnd8] + nm6[rnd7] + nm7[rnd3]; 125 } else if (nTp === 8) { 126 nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd4] + nm4[rnd5] + nm5[rnd8] + nm4[rnd9] + nm5[rnd6] + nm6[rnd7] + nm7[rnd3]; 127 } else { 128 rnd6 = Math.random() * 6 | 0; 129 rnd10 = Math.random() * 6 | 0; 130 rnd11 = Math.random() * nm4.length | 0; 131 while (rnd10 === rnd8) { 132 rnd10 = Math.random() * 6 | 0; 133 } 134 if (rnd5 < 2 || rnd7 < 3 || rnd9 < 2) { 135 while (rnd11 < 2) { 136 rnd11 = Math.random() * nm4.length | 0; 137 } 138 } 139 nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd4] + nm4[rnd5] + nm5[rnd8] + nm4[rnd9] + nm5[rnd6] + nm4[rnd11] + nm5[rnd10] + nm6[rnd7] + nm7[rnd3]; 140 } 141 } 142 } 143 testSwear(nMs); 144 }