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

dndAarakocra.js (1801B)


      1 var nm1 = ["", "", "", "", "", "c", "cl", "cr", "d", "g", "gr", "h", "k", "kh", "kl", "kr", "q", "qh", "ql", "qr", "r", "rh", "s", "y", "z"];
      2 var nm2 = ["a", "e", "i", "u", "a", "e", "i", "u", "a", "e", "i", "u", "a", "e", "i", "u", "a", "e", "i", "u", "a", "e", "i", "u", "a", "e", "i", "u", "ae", "aia", "ee", "oo", "ou", "ua", "uie"];
      3 var nm3 = ["c", "cc", "k", "kk", "l", "ll", "q", "r", "rr"];
      4 var nm4 = ["a", "e", "i", "a", "e", "i", "a", "e", "i", "a", "e", "i", "a", "e", "i", "aa", "ea", "ee", "ia", "ie"];
      5 var nm5 = ["", "", "", "", "c", "ck", "d", "f", "g", "hk", "k", "l", "r", "rr", "rc", "rk", "rrk", "s", "ss"];
      6 var br = "";
      7 
      8 function nameGen() {
      9     $('#placeholder').css('textTransform', 'capitalize');
     10     var element = document.createElement("div");
     11     element.setAttribute("id", "result");
     12     for (i = 0; i < 10; i++) {
     13         nameMas();
     14         while (nMs === "") {
     15             nameMas();
     16         }
     17         br = document.createElement('br');
     18         element.appendChild(document.createTextNode(nMs));
     19         element.appendChild(br);
     20     }
     21     if (document.getElementById("result")) {
     22         document.getElementById("placeholder").removeChild(document.getElementById("result"));
     23     }
     24     document.getElementById("placeholder").appendChild(element);
     25 }
     26 
     27 function nameMas() {
     28     rnd = Math.random() * nm1.length | 0;
     29     rnd2 = Math.random() * nm2.length | 0;
     30     rnd3 = Math.random() * nm5.length | 0;
     31     if (i < 5) {
     32         while (nm1[rnd] === nm5[rnd3]) {
     33             rnd3 = Math.random() * nm5.length | 0;
     34         }
     35         nMs = nm1[rnd] + nm2[rnd2] + nm5[rnd3];
     36     } else {
     37         rnd4 = Math.random() * nm3.length | 0;
     38         rnd5 = Math.random() * nm4.length | 0;
     39         nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd4] + nm4[rnd5] + nm5[rnd3];
     40     }
     41     testSwear(nMs);
     42 }