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

swYarkoraNames.js (4229B)


      1 var nm1 = ["b", "br", "ch", "d", "dr", "g", "gr", "h", "s", "sh", "sch", "t", "th", "v", "vr", "vh", "w", "wh"];
      2 var nm2 = ["a", "u", "y", "a", "u", "y", "a", "u", "y", "i", "i", "e", "e", "ei", "ee", "ae"];
      3 var nm3 = ["b", "d", "g", "l", "ll", "m", "n", "r", "s", "v", "z"];
      4 var nm4 = ["a", "e", "a", "e", "a", "e", "a", "e", "a", "e", "a", "e", "i", "i", "i", "ie", "ae", "ee"];
      5 var nm5 = ["", "", "", "", "", "d", "l", "lk", "ll", "ld", "m", "n", "nd", "r", "rd", "rk"];
      6 var nm6 = ["c", "ch", "f", "h", "l", "m", "n", "rh", "s", "sh", "t", "th", "z", "zh"];
      7 var nm7 = ["e", "e", "e", "e", "i", "i", "a", "a"];
      8 var nm8 = ["d", "f", "g", "l", "m", "n", "r", "s", "v", "z"];
      9 var nm9 = ["a", "i", "e", "a", "i", "e", "y"];
     10 var nm10 = ["", "", "", "c", "d", "l", "m", "n", "s", "t", "th"];
     11 var nm11 = ["c", "ch", "d", "dh", "f", "h", "l", "m", "n", "s", "t", "th", "v", "z", "zh"];
     12 var nm12 = ["e", "i", "e", "i", "a"];
     13 var nm13 = ["c", "d", "g", "k", "l", "ll", "m", "n", "r", "s", "v", "z"];
     14 var nm14 = ["a", "a", "e", "i"];
     15 var nm15 = ["", "", "", "", "", "ch", "d", "l", "m", "n", "s", "sh", "t", "th", "tch"];
     16 var br = "";
     17 
     18 function nameGen(type) {
     19     var tp = type;
     20     $('#placeholder').css('textTransform', 'capitalize');
     21     var element = document.createElement("div");
     22     element.setAttribute("id", "result");
     23     for (i = 0; i < 10; i++) {
     24         nameSur();
     25         while (nSr === "") {
     26             nameSur();
     27         }
     28         if (tp === 1) {
     29             nameFem();
     30             while (nMs === "") {
     31                 nameFem();
     32             }
     33         } else {
     34             nameMas();
     35             while (nMs === "") {
     36                 nameMas();
     37             }
     38         }
     39         names = nMs + " " + nSr;
     40         br = document.createElement('br');
     41         element.appendChild(document.createTextNode(names));
     42         element.appendChild(br);
     43     }
     44     if (document.getElementById("result")) {
     45         document.getElementById("placeholder").removeChild(document.getElementById("result"));
     46     }
     47     document.getElementById("placeholder").appendChild(element);
     48 }
     49 
     50 function nameMas() {
     51     rnd = Math.random() * nm1.length | 0;
     52     rnd2 = Math.random() * nm2.length | 0;
     53     rnd3 = Math.random() * nm5.length | 0;
     54     if (i < 3) {
     55         while (nm5[rnd3] === nm1[rnd]) {
     56             rnd3 = Math.random() * nm5.length | 0;
     57         }
     58         nMs = nm1[rnd] + nm2[rnd2] + nm5[rnd3];
     59     } else {
     60         rnd4 = Math.random() * nm3.length | 0;
     61         rnd5 = Math.random() * nm4.length | 0;
     62         if (i < 6) {
     63             while (nm3[rnd4] === nm5[rnd3] || nm3[rnd4] === nm1[rnd]) {
     64                 rnd4 = Math.random() * nm3.length | 0;
     65             }
     66             nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd4] + nm4[rnd5] + nm5[rnd3];
     67         } else {
     68             rnd6 = Math.random() * nm1.length | 0;
     69             rnd7 = Math.random() * nm2.length | 0;
     70             rnd8 = Math.random() * nm3.length | 0;
     71             rnd9 = Math.random() * nm4.length | 0;
     72             rnd10 = Math.random() * nm5.length | 0;
     73             while (nm3[rnd8] === nm5[rnd10] || nm3[rnd8] === nm1[rnd6]) {
     74                 rnd8 = Math.random() * nm3.length | 0;
     75             }
     76             nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd4] + nm4[rnd5] + nm5[rnd3] + "-" + nm1[rnd6] + nm2[rnd7] + nm3[rnd8] + nm4[rnd9] + nm5[rnd10];
     77         }
     78     }
     79     testSwear(nMs);
     80 }
     81 
     82 function nameFem() {
     83     rnd = Math.random() * nm6.length | 0;
     84     rnd2 = Math.random() * nm7.length | 0;
     85     rnd3 = Math.random() * nm8.length | 0;
     86     rnd4 = Math.random() * nm9.length | 0;
     87     rnd5 = Math.random() * nm10.length | 0;
     88     while (nm6[rnd] === nm8[rnd3] || nm8[rnd3] === nm10[rnd5]) {
     89         rnd3 = Math.random() * nm8.length | 0;
     90     }
     91     nMs = nm6[rnd] + nm7[rnd2] + nm8[rnd3] + nm9[rnd4] + nm10[rnd5];
     92     testSwear(nMs);
     93 }
     94 
     95 function nameSur() {
     96     rnd = Math.random() * nm11.length | 0;
     97     rnd2 = Math.random() * nm12.length | 0;
     98     rnd3 = Math.random() * nm13.length | 0;
     99     rnd4 = Math.random() * nm14.length | 0;
    100     rnd5 = Math.random() * nm15.length | 0;
    101     while (nm11[rnd] === nm13[rnd3] || nm13[rnd3] === nm15[rnd5]) {
    102         rnd3 = Math.random() * nm13.length | 0;
    103     }
    104     nSr = nm11[rnd] + nm12[rnd2] + nm13[rnd3] + nm14[rnd4] + nm15[rnd5];
    105     testSwear(nSr);
    106 }