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

diabloSeraphim.js (2961B)


      1 var nm1 = ["", "", "", "", "b", "c", "dr", "g", "h", "l", "m", "n", "p", "r", "s", "t", "th", "v", "y", "z"];
      2 var nm2 = ["a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "ae", "ai"];
      3 var nm3 = ["br", "d", "dr", "f", "g", "l", "lt", "ll", "lg", "lth", "lz", "m", "mp", "mph", "mphr", "mr", "n", "nd", "nn", "nny", "nr", "nl", "ph", "r", "s", "sr", "st", "th", "z", "zr"];
      4 var nm4 = ["al", "ael", "eon", "iel", "ial", "il", "el", "ius", "ion", "on", "os", "ual", "us"];
      5 var nm5 = ["c", "dr", "f", "g", "h", "k", "l", "m", "n", "p", "ph", "s", "th", "v"];
      6 var nm6 = ["a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "ae", "ai", "au"];
      7 var nm7 = ["br", "c", "dr", "dy", "f", "g", "gh", "gl", "hn", "hr", "l", "ll", "lth", "ls", "lz", "ln", "lm", "lf", "m", "mr", "ml", "mn", "mph", "nl", "ny", "nph", "nd", "r", "rd", "s", "sh", "sr", "th", "z"];
      8 var nm8 = ["el", "ael", "il", "on", "uen", "uel", "eil", "iel", "is", "ith", "oelle", "oenne", "aelle"];
      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         if (tp === 1) {
     18             nameFem();
     19             while (nMs === "") {
     20                 nameFem();
     21             }
     22         } else {
     23             nameMas();
     24             while (nMs === "") {
     25                 nameMas();
     26             }
     27         }
     28         br = document.createElement('br');
     29         element.appendChild(document.createTextNode(nMs));
     30         element.appendChild(br);
     31     }
     32     if (document.getElementById("result")) {
     33         document.getElementById("placeholder").removeChild(document.getElementById("result"));
     34     }
     35     document.getElementById("placeholder").appendChild(element);
     36 }
     37 
     38 function nameFem() {
     39     rnd = Math.floor(Math.random() * nm5.length);
     40     rnd2 = Math.floor(Math.random() * nm6.length);
     41     rnd3 = Math.floor(Math.random() * nm7.length);
     42     rnd4 = Math.floor(Math.random() * nm8.length);
     43     if (i < 5) {
     44         nMs = nm5[rnd] + nm6[rnd2] + nm7[rnd3] + nm8[rnd4];
     45     } else {
     46         rnd5 = Math.floor(Math.random() * nm7.length);
     47         rnd6 = Math.floor(Math.random() * nm6.length);
     48         nMs = nm5[rnd] + nm6[rnd2] + nm7[rnd3] + nm6[rnd6] + nm7[rnd5] + nm8[rnd4];
     49     }
     50     testSwear(nMs);
     51 }
     52 
     53 function nameMas() {
     54     rnd = Math.floor(Math.random() * nm1.length);
     55     rnd2 = Math.floor(Math.random() * nm2.length);
     56     rnd3 = Math.floor(Math.random() * nm3.length);
     57     rnd4 = Math.floor(Math.random() * nm4.length);
     58     if (i < 5) {
     59         nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm4[rnd4];
     60     } else {
     61         rnd5 = Math.floor(Math.random() * nm3.length);
     62         rnd6 = Math.floor(Math.random() * nm2.length);
     63         nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd6] + nm3[rnd5] + nm4[rnd4];
     64     }
     65     testSwear(nMs);
     66 }