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

manananggalNames.js (3732B)


      1 var nm1 = ["", "", "", "b", "c", "d", "g", "j", "k", "l", "m", "p", "s", "t", "v", "y"];
      2 var nm2 = ["a", "e", "i", "u"];
      3 var nm3 = ["b", "c", "cl", "dc", "dl", "g", "gb", "gw", "gt", "j", "k", "l", "ld", "m", "ml", "n", "nch", "nd", "ng", "ns", "nt", "r", "s", "t", "tch", "td", "v", "y", "zv"];
      4 var nm4 = ["a", "e", "i", "o", "u"];
      5 var nm5 = ["b", "c", "g", "b", "c", "g", "gt", "l", "m", "l", "m", "mb", "n", "n", "nc", "nd", "ng", "nt", "r", "s", "r", "s", "st", "t", "y", "t", "y"];
      6 var nm6 = ["", "", "", "c", "d", "g", "k", "l", "m", "n", "ng", "r", "s", "t"];
      7 var nm7 = ["", "", "", "b", "ch", "d", "h", "k", "l", "m", "p", "s", "t", "v", "y"];
      8 var nm8 = ["a", "i", "u"];
      9 var nm9 = ["c", "cl", "cs", "g", "gm", "h", "l", "ld", "lh", "m", "ml", "mp", "n", "nd", "ng", "nt", "r", "rn", "t", "v", "w", "wl", "y", "z"];
     10 var nm10 = ["ui", "ee", "ia", "a", "i", "a", "i", "u"];
     11 var nm11 = ["b", "c", "g", "h", "k", "l", "m", "b", "c", "g", "h", "k", "l", "m", "mb", "n", "n", "nd", "ng", "ns", "p", "r", "s", "t", "w", "y", "p", "r", "s", "t", "w", "y"];
     12 var nm12 = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "d", "g", "l", "m", "n", "ng", "p", "s", "t", "y"];
     13 var br = "";
     14 
     15 function nameGen(type) {
     16     var tp = type;
     17     $('#placeholder').css('textTransform', 'capitalize');
     18     var element = document.createElement("div");
     19     element.setAttribute("id", "result");
     20     for (i = 0; i < 10; i++) {
     21         if (tp === 1) {
     22             nameFem();
     23             while (nMs === "") {
     24                 nameFem();
     25             }
     26         } else {
     27             nameMas();
     28             while (nMs === "") {
     29                 nameMas();
     30             }
     31         }
     32         br = document.createElement('br');
     33         element.appendChild(document.createTextNode(nMs));
     34         element.appendChild(br);
     35     }
     36     if (document.getElementById("result")) {
     37         document.getElementById("placeholder").removeChild(document.getElementById("result"));
     38     }
     39     document.getElementById("placeholder").appendChild(element);
     40 }
     41 
     42 function nameMas() {
     43     nTp = Math.random() * 6 | 0;
     44     rnd = Math.random() * nm1.length | 0;
     45     rnd2 = Math.random() * nm2.length | 0;
     46     rnd3 = Math.random() * nm3.length | 0;
     47     rnd4 = Math.random() * nm4.length | 0;
     48     rnd5 = Math.random() * nm6.length | 0;
     49     if (nTp < 4) {
     50         while (nm3[rnd3] === nm6[rnd5] || nm3[rnd3] === nm1[rnd]) {
     51             rnd3 = Math.random() * nm3.length | 0;
     52         }
     53         nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm4[rnd4] + nm6[rnd5];
     54     } else {
     55         rnd6 = Math.random() * nm5.length | 0;
     56         rnd7 = Math.random() * nm4.length | 0;
     57         while (nm6[rnd5] === nm5[rnd6] || nm5[rnd6] === nm3[rnd3]) {
     58             rnd6 = Math.random() * nm5.length | 0;
     59         }
     60         nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm4[rnd4] + nm5[rnd6] + nm4[rnd7] + nm6[rnd5];
     61     }
     62     testSwear(nMs);
     63 }
     64 
     65 function nameFem() {
     66     nTp = Math.random() * 6 | 0;
     67     rnd = Math.random() * nm7.length | 0;
     68     rnd2 = Math.random() * nm8.length | 0;
     69     rnd3 = Math.random() * nm9.length | 0;
     70     rnd4 = Math.random() * nm10.length | 0;
     71     rnd5 = Math.random() * nm12.length | 0;
     72     if (nTp < 4) {
     73         while (nm9[rnd3] === nm12[rnd5] || nm9[rnd3] === nm7[rnd]) {
     74             rnd3 = Math.random() * nm9.length | 0;
     75         }
     76         nMs = nm7[rnd] + nm8[rnd2] + nm9[rnd3] + nm10[rnd4] + nm12[rnd5];
     77     } else {
     78         rnd6 = Math.random() * nm11.length | 0;
     79         rnd7 = Math.random() * nm10.length | 0;
     80         while (nm12[rnd5] === nm11[rnd6] || nm11[rnd6] === nm9[rnd3]) {
     81             rnd6 = Math.random() * nm11.length | 0;
     82         }
     83         nMs = nm7[rnd] + nm8[rnd2] + nm9[rnd3] + nm10[rnd4] + nm11[rnd6] + nm10[rnd7] + nm12[rnd5];
     84     }
     85     testSwear(nMs);
     86 }