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

warhammerTombKings.js (4067B)


      1 var nm1 = ["", "", "", "", "ch", "f", "h", "k", "kh", "m", "n", "r", "s", "t", "th"];
      2 var nm2 = ["a", "e", "o", "a", "e", "o", "a", "e", "o", "a", "e", "o", "i", "i"];
      3 var nm3 = ["b", "ch", "f", "h", "k", "kh", "l", "m", "mh", "n", "p", "ph", "r", "s", "sh", "t", "th", "y", "b", "bd", "ch", "ct", "f", "h", "k", "kh", "kht", "kt", "l", "m", "mh", "mkh", "mt", "n", "nkh", "ns", "p", "ph", "phk", "phr", "pht", "pr", "pth", "r", "rkh", "rs", "rt", "s", "sf", "sh", "shk", "skh", "sph", "ss", "st", "t", "th", "tm", "tr", "ttr", "y"];
      4 var nm4 = ["", "", "f", "h", "kh", "m", "n", "nb", "p", "ph", "r", "rs", "s"];
      5 var nm5 = ["b", "h", "k", "kh", "m", "n", "p", "ph", "r", "s", "sh", "t", "th"];
      6 var nm6 = ["a", "e", "i", "a", "e", "i", "a", "e", "i", "a", "e", "i", "o", "o"];
      7 var nm7 = ["b", "d", "f", "fr", "g", "gt", "gh", "h", "k", "kh", "kt", "l", "m", "mkh", "mph", "n", "nkh", "nph", "nth", "nkhn", "ns", "nt", "p", "ph", "phr", "pth", "r", "rh", "rm", "rt", "ry", "s", "st", "t", "tr", "th", "thy", "y", "z", "zh"];
      8 var nm8 = ["Academic", "Acclaimed", "Adept", "Ambitious", "Ancient", "Architect", "Artist", "Austere", "Black", "Blessed", "Bright", "Brilliant", "Celebrated", "Chaste", "Composed", "Conjurer", "Content", "Crimson", "Cunning", "Devoted", "Diligent", "Earnest", "Educated", "Elegant", "Enchanted", "Enlightened", "Euphoric", "Exalted", "Flawless", "Generous", "Gifted", "Giving", "Glorious", "Graceful", "Grand", "Great", "Hallowed", "Herald", "Hierpohant", "Holy", "Honorable", "Honored", "Humble", "Idealist", "Illustrious", "Immortal", "Imperishable", "Incredible", "Infinite", "Knowing", "Learned", "Light", "Loyal", "Magnificent", "Majestic", "Marvelous", "Oracle", "Paragon", "Patient", "Powerful", "Prestigious", "Prime", "Prophet", "Soothsayer", "Sophisticated", "Terrific", "Treasure", "Treasured", "Valiant", "Visionary", "Watcher", "White", "Zealous"];
      9 var br = "";
     10 
     11 function nameGen(type) {
     12     $('#placeholder').css('textTransform', 'capitalize');
     13     var tp = type;
     14     var element = document.createElement("div");
     15     element.setAttribute("id", "result");
     16     for (i = 0; i < 10; i++) {
     17         rnd = Math.floor(Math.random() * nm8.length);
     18         nameL = " the " + nm8[rnd];
     19         if (tp === 1) {
     20             rnd = Math.floor(Math.random() * nm5.length);
     21             rnd2 = Math.floor(Math.random() * nm6.length);
     22             rnd3 = Math.floor(Math.random() * nm7.length);
     23             rnd4 = Math.floor(Math.random() * nm6.length);
     24             if (i < 5) {
     25                 names = nm5[rnd] + nm6[rnd2] + nm7[rnd3] + nm6[rnd4] + nameL;
     26             } else {
     27                 rnd5 = Math.floor(Math.random() * nm7.length);
     28                 rnd6 = Math.floor(Math.random() * nm6.length);
     29                 names = nm5[rnd] + nm6[rnd2] + nm7[rnd3] + nm6[rnd4] + nm7[rnd5] + nm6[rnd6] + nameL;
     30             }
     31         } else {
     32             rnd = Math.floor(Math.random() * nm1.length);
     33             rnd2 = Math.floor(Math.random() * nm2.length);
     34             rnd3 = Math.floor(Math.random() * nm3.length);
     35             rnd4 = Math.floor(Math.random() * nm2.length);
     36             rnd5 = Math.floor(Math.random() * nm4.length);
     37             if (rnd < 4) {
     38                 while (rnd5 < 2) {
     39                     rnd5 = Math.floor(Math.random() * nm4.length);
     40                 }
     41             }
     42             if (i < 5) {
     43                 names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm4[rnd5] + nameL;
     44             } else {
     45                 rnd6 = Math.floor(Math.random() * nm3.length);
     46                 rnd7 = Math.floor(Math.random() * nm2.length);
     47                 names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm3[rnd6] + nm2[rnd7] + nm4[rnd5] + nameL;
     48             }
     49         }
     50         br = document.createElement('br');
     51         element.appendChild(document.createTextNode(names));
     52         element.appendChild(br);
     53     }
     54     if (document.getElementById("result")) {
     55         document.getElementById("placeholder").removeChild(document.getElementById("result"));
     56     }
     57     document.getElementById("placeholder").appendChild(element);
     58 }