fullmetalAlchemist.js (2287B)
1 function nameGen(type) { 2 var nm1 = ["Absorbing", "Adapting", "Age", "Age-Reverse", "Air", "Alcohol", "Anger-Catalyst", "Balance", "Balancing", "Bell", "Blade", "Blending", "Blood", "Bone", "Brass", "Brass Knuckle", "Brawn", "Bursting", "Chain", "Change", "Chaos", "Chrono", "Cleansing", "Climate", "Clockwork", "Cloud", "Cloudburst", "Cold", "Comet", "Condensing", "Crown", "Darkmetal", "Diamond", "Dream", "Dreamscape", "Drunken", "Echo", "Electric", "Emotion", "Emotion-Catalyst", "Emphasising", "Emulating", "Enchantment", "Energy", "Energy-Convert", "Engine", "Enhancement", "Equinox", "Equivalence", "Extracting", "Fear-Fuel", "Feather-Works", "Feigning", "Fire", "Firework", "Fleshwork", "Fluke", "Flux", "Foundation", "Friction-Field", "Garden", "Gas", "Giantwork", "Glass", "Glasswork", "Golden", "Ground", "Growth", "Growth-Matter", "Hate-Fuel", "Heart", "Ice", "Icicle", "Impulse", "Ink", "Inkwork", "Ironbark", "Ironscale", "Ivory", "Jewel", "Jewelcraft", "Lead", "Leatherwork", "Life", "Life-Blood", "Life-Breath", "Life-Gift", "Light", "Lightmetal", "Lightning", "Liquid", "Lunar", "Machine", "Machinework", "Marble", "Mass", "Mind", "Mirror", "Mirror-Image", "Mist", "Moonrock", "Nightmare", "Obsidian", "Oil", "Paper", "Photo", "Powder", "Prism", "Purifying", "Pyro", "Quicksand", "Rain", "Rainstorm", "Rebirth", "Reflection", "Refraction", "Sand", "Sanguine", "Scale", "Scalework", "Silk", "Smoke", "Snow", "Solar", "Solstice", "Spark", "Spark-Work", "Spell", "Splitting", "Star", "Stardust", "Steam", "Storm", "Time-Sand", "Time-Warp", "Timebound", "Vapor", "Volcano"]; 3 var br = ""; 4 $('#placeholder').css('textTransform', 'capitalize'); 5 var tp = type; 6 var element = document.createElement("div"); 7 element.setAttribute("id", "result"); 8 for (i = 0; i < 10; i++) { 9 rnd = Math.random() * nm1.length | 0; 10 names = "The " + nm1[rnd] + " Alchemist"; 11 nm1.splice(rnd, 1); 12 br = document.createElement('br'); 13 element.appendChild(document.createTextNode(names)); 14 element.appendChild(br); 15 } 16 if (document.getElementById("result")) { 17 document.getElementById("placeholder").removeChild(document.getElementById("result")); 18 } 19 document.getElementById("placeholder").appendChild(element); 20 }