mgtGolem.js (3981B)
1 var nm1 = ["b", "c", "d", "g", "j", "k", "q", "t", "v", "z"]; 2 var nm2 = ["a", "o", "u", "a", "o", "u", "a", "o", "u", "e", "i"]; 3 var nm3 = ["cc", "dd", "gg", "gh", "lc", "lg", "lk", "lm", "ln", "nd", "ng", "nk", "nq", "nt", "rb", "rd", "rc", "rg", "rk", "rm", "rn", "rr", "rt", "sc", "sh", "sk", "st", "th"]; 4 var nm4 = ["amber", "arc", "ash", "blight", "boulder", "bright", "bronze", "cinder", "clear", "cold", "crystal", "dark", "ember", "even", "flame", "flint", "fore", "full", "fuse", "glass", "glow", "grand", "great", "hard", "haze", "hex", "high", "iron", "keen", "light", "micro", "molten", "moon", "mourn", "nehter", "plain", "pure", "pyre", "rough", "rumble", "rune", "saber", "shadow", "soft", "solid", "soul", "steel", "stone", "storm", "strong", "terra", "thunder", "twilight", "void"]; 5 var nm5 = ["bane", "bash", "beam", "bend", "bough", "bound", "braid", "brand", "brow", "claw", "crest", "crown", "dust", "fist", "flaw", "force", "forge", "forged", "fury", "glow", "grip", "guard", "hammer", "helm", "husk", "limb", "mane", "mark", "maul", "might", "plate", "ridge", "shard", "shield", "spark", "spine", "splint", "stalk", "stand", "steel", "stride", "surge", "synth", "tether", "ward", "watch"]; 6 var nm6 = ["Attendant", "Automaton", "Beast", "Beast of Burden", "Brawler", "Bruiser", "Champion", "Colossus", "Construct", "Curator", "Custodian", "Drifter", "Golem", "Guard", "Guardian", "Herald", "Hulk", "Keeper", "Monstrosity", "Nomad", "Overseer", "Pilgrim", "Protector", "Rambler", "Reclaimer", "Retainer", "Roamer", "Sentinel", "Shepherd", "Statue", "Stroller", "Titan", "Vagabond", "Voyager", "Wanderer", "Warden", "Warrior", "Watcher", "Golem", "Golem", "Golem", "Golem", "Golem", "Golem", "Golem", "Construct", "Construct", "Construct"]; 7 var nm7 = ["Acidic", "Advanced", "Alabaster", "Alloy", "Altar", "Ancestral", "Anchored", "Ancient", "Animated", "Basalt", "Battered", "Brass", "Broken", "Bruised", "Buoyant", "Clay", "Cobalt", "Complex", "Corrupt", "Corrupted", "Crimson", "Crumbling", "Crystal", "Defiant", "Dense", "Emblazoned", "Enchanted", "Etched", "Flint", "Frost", "Frozen", "Gaseous", "Glass", "Gold", "Grand", "Grave", "Grim", "Hematite", "Hollow", "Igneous", "Iron", "Jade", "Jagged", "Junk", "Lead", "Limestone", "Lodestone", "Lunar", "Malachite", "Monstrous", "Mossy", "Motionless", "Obedient", "Obsidian", "Onyx", "Opal", "Ornate", "Platinum", "Primal", "Prime", "Pristine", "Pungent", "Radiant", "Ruby", "Rusted", "Sand", "Sandstone", "Sanguine", "Sapphire", "Shadow", "Shadowy", "Silent", "Silver", "Skeletal", "Solar", "Spire", "Steel", "Straw", "Titanium", "Twin", "Vacant", "Vibrant", "Volatile", "Winged"]; 8 var br = ""; 9 10 function nameGen() { 11 $('#placeholder').css('textTransform', 'capitalize'); 12 var element = document.createElement("div"); 13 element.setAttribute("id", "result"); 14 for (i = 0; i < 10; i++) { 15 if (i < 6) { 16 rnd = Math.random() * nm1.length | 0; 17 rnd2 = Math.random() * nm2.length | 0; 18 rnd3 = Math.random() * nm3.length | 0; 19 names = nm1[rnd] + nm2[rnd2] + nm3[rnd3]; 20 } else if (i < 8) { 21 rnd = Math.random() * nm4.length | 0; 22 rnd2 = Math.random() * nm5.length | 0; 23 while (nm4[rnd] === nm5[rnd2]) { 24 rnd2 = Math.random() * nm5.length | 0; 25 } 26 rnd3 = Math.random() * nm6.length | 0; 27 names = nm4[rnd] + nm5[rnd2] + " " + nm6[rnd3]; 28 } else { 29 rnd = Math.random() * nm7.length | 0; 30 rnd2 = Math.random() * nm6.length | 0; 31 names = nm7[rnd] + " " + nm6[rnd2]; 32 } 33 br = document.createElement('br'); 34 element.appendChild(document.createTextNode(names)); 35 element.appendChild(br); 36 } 37 if (document.getElementById("result")) { 38 document.getElementById("placeholder").removeChild(document.getElementById("result")); 39 } 40 document.getElementById("placeholder").appendChild(element); 41 }