offline-fantasy-name-generators

Offline version of www.fantasynamegenerators.com
git clone https://git.neptards.moe/neptards/offline-fantasy-name-generators.git
Log | Files | Refs | README

warhammerHighelves.js (4458B)


      1 var nm = ["Bel-", "", "", "", ""];
      2 var nm1 = ["", "", "", "", "", "c", "d", "f", "g", "gh", "h", "k", "m", "s", "sh", "t", "th", "v", "z"];
      3 var nm2 = ["a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "a", "e", "e", "o", "o", "ye", "ae", "io", "ya", "aa"];
      4 var nm3 = ["b", "d", "l", "n", "r", "z", "b", "d", "l", "n", "r", "z", "b", "br", "cl", "cr", "d", "dr", "dh", "gr", "l", "lv", "lr", "ln", "ld", "n", "nd", "nn", "nt", "nth", "ntr", "r", "rh", "rv", "rt", "rth", "rd", "rh", "th", "thl", "z", "zr"];
      5 var nm4 = ["c", "l", "n", "r", "s"];
      6 var nm5 = ["", "", "", "", "d", "f", "h", "kh", "l", "m", "n", "r", "s", "sh", "t", "th", "z"];
      7 var nm6 = ["a", "e", "i", "a", "e", "i", "a", "e", "i", "a", "e", "i", "a", "e", "i", "a", "e", "i", "o", "o", "o", "ie", "ia", "ae", "ye", "ei"];
      8 var nm7 = ["c", "d", "f", "h", "k", "l", "m", "n", "r", "s", "t", "v", "z", "c", "d", "dh", "dd", "f", "ff", "fn", "gh", "h", "hh", "k", "kh", "l", "ll", "lr", "lv", "lm", "ln", "lf", "lg", "m", "mm", "mn", "n", "nn", "nr", "nv", "r", "rr", "rh", "rn", "rl", "s", "sh", "ss", "t", "tt", "th", "v", "z", "zz"];
      9 var nm8 = ["Academic", "Acclaimed", "Admired", "Agile", "Ancient", "Angel", "Angelic", "Artist", "Austere", "Beast", "Beautiful", "Blessed", "Bold", "Brave", "Brilliant", "Celebrated", "Clever", "Composed", "Conqueror", "Defender", "Defiant", "Devoted", "Diligent", "Discrete", "Earnest", "Educated", "Elegant", "Enchanted", "Enchanting", "Enforcer", "Enlightened", "Exalted", "Executioner", "Expert", "Explorer", "Fearless", "Flamboyant", "Flawless", "Generous", "Gentle", "Gifted", "Giving", "Glorious", "Graceful", "Grand", "Great", "Grim", "Guardian", "Honest", "Honorable", "Honored", "Humble", "Illustrious", "Immortal", "Impetuous", "Incredible", "Just", "Learned", "Light", "Loremaster", "Loyal", "Magnificent", "Majestic", "Marvelous", "Merciful", "Mighty", "Oracle", "Paragon", "Patient", "Peacemaker", "Pious", "Pleasant", "Poet", "Powerful", "Prime", "Proud", "Radiant", "Sage", "Seafarer", "Serene", "Silent", "Slayer", "Specialist", "Stark", "Stout", "Strict", "Swift", "Valiant", "Vengeful", "Warrior", "Wild", "Wise"];
     10 var br = "";
     11 
     12 function nameGen(type) {
     13     $('#placeholder').css('textTransform', 'capitalize');
     14     var tp = type;
     15     var element = document.createElement("div");
     16     element.setAttribute("id", "result");
     17     for (i = 0; i < 10; i++) {
     18         rnd = Math.floor(Math.random() * nm8.length);
     19         nameL = nm8[rnd];
     20         if (tp === 1) {
     21             rnd = Math.floor(Math.random() * nm5.length);
     22             rnd2 = Math.floor(Math.random() * nm6.length);
     23             rnd3 = Math.floor(Math.random() * nm7.length);
     24             rnd4 = Math.floor(Math.random() * nm6.length);
     25             rnd5 = Math.floor(Math.random() * nm7.length);
     26             rnd6 = Math.floor(Math.random() * nm6.length);
     27             if (i < 5) {
     28                 names = nm5[rnd] + nm6[rnd2] + nm7[rnd3] + nm6[rnd4] + nm7[rnd5] + nm6[rnd6] + " the " + nameL;
     29             } else {
     30                 rnd7 = Math.floor(Math.random() * nm7.length);
     31                 rnd8 = Math.floor(Math.random() * nm6.length);
     32                 names = nm5[rnd] + nm6[rnd2] + nm7[rnd3] + nm6[rnd4] + nm7[rnd5] + nm6[rnd6] + nm7[rnd7] + nm6[rnd8] + " the " + nameL;
     33             }
     34         } else {
     35             rnd0 = Math.floor(Math.random() * nm.length);
     36             rnd = Math.floor(Math.random() * nm1.length);
     37             rnd2 = Math.floor(Math.random() * nm2.length);
     38             rnd3 = Math.floor(Math.random() * nm3.length);
     39             rnd4 = Math.floor(Math.random() * nm2.length);
     40             rnd5 = Math.floor(Math.random() * nm4.length);
     41             if (i < 5) {
     42                 names = nm[rnd0] + nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm4[rnd5] + " the " + nameL;
     43             } else {
     44                 rnd6 = Math.floor(Math.random() * nm3.length);
     45                 rnd7 = Math.floor(Math.random() * nm2.length);
     46                 names = nm[rnd0] + nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm3[rnd6] + nm2[rnd5] + nm4[rnd5] + " the " + nameL;
     47             }
     48         }
     49         br = document.createElement('br');
     50         element.appendChild(document.createTextNode(names));
     51         element.appendChild(br);
     52     }
     53     if (document.getElementById("result")) {
     54         document.getElementById("placeholder").removeChild(document.getElementById("result"));
     55     }
     56     document.getElementById("placeholder").appendChild(element);
     57 }