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

wowGnoll.js (3036B)


      1 var nm1 = ["", "", "b", "br", "d", "dr", "g", "gr", "h", "j", "m", "n", "r", "s", "v", "z"];
      2 var nm2 = ["a", "e", "i", "o", "u"];
      3 var nm3 = ["bl", "cd", "ckl", "ct", "dj", "dl", "g", "gd", "gl", "gt", "j", "kl", "lj", "ld", "nd", "ng", "nt", "rgl", "rkl", "rd", "rj", "rt"];
      4 var nm4 = ["a", "e", "i", "o"];
      5 var nm5 = ["", "", "", "", "", "", "", "c", "d", "f", "ff", "g", "gg", "hh", "k", "kk", "n", "r", "rg", "rk", "z", "zg", "zk", "zz"];
      6 var nm6 = ["back", "bark", "bash", "bat", "blight", "blot", "blotch", "bold", "brash", "bruise", "bunk", "cane", "champ", "chaw", "chew", "chomp", "crunch", "crush", "dart", "dash", "dirt", "gash", "glum", "gnarl", "gnaw", "grim", "growl", "guff", "howl", "lash", "mash", "mold", "muck", "mud", "munch", "mutter", "quick", "rash", "raw", "razz", "rend", "rib", "ridge", "rip", "rot", "rush", "sage", "scourge", "shred", "snaggle", "snap", "snarl", "snatch", "speck", "spot", "squash", "swift", "taint", "tear", "thrash", "trash", "whip", "yap", "yelp"];
      7 var nm7 = ["axe", "back", "bite", "blade", "bone", "brawn", "chaser", "chopper", "claw", "club", "coat", "crest", "crook", "fang", "flesh", "fringe", "fur", "gore", "hide", "hook", "mane", "meat", "muzzle", "nose", "paw", "pelt", "pike", "ridge", "skull", "sniffer", "snout", "spear", "stick", "teeth", "tooth", "tuft"];
      8 var br = "";
      9 
     10 function nameGen(type) {
     11     var tp = type;
     12     $('#placeholder').css('textTransform', 'capitalize');
     13     var element = document.createElement("div");
     14     element.setAttribute("id", "result");
     15     for (i = 0; i < 10; i++) {
     16         nameMas();
     17         while (nMs === "") {
     18             nameMas();
     19         }
     20         rnd = Math.random() * nm6.length | 0;
     21         rnd2 = Math.random() * nm7.length | 0;
     22         while (nm6[rnd] === nm7[rnd2]) {
     23             rnd2 = Math.random() * nm7.length | 0;
     24         }
     25         nMs = nMs + " " + nm6[rnd] + nm7[rnd2];
     26         br = document.createElement('br');
     27         element.appendChild(document.createTextNode(nMs));
     28         element.appendChild(br);
     29     }
     30     if (document.getElementById("result")) {
     31         document.getElementById("placeholder").removeChild(document.getElementById("result"));
     32     }
     33     document.getElementById("placeholder").appendChild(element);
     34 }
     35 
     36 function nameMas() {
     37     nTp = Math.random() * 2 | 0;
     38     rnd = Math.random() * nm1.length | 0;
     39     rnd2 = Math.random() * nm2.length | 0;
     40     rnd3 = Math.random() * nm5.length | 0;
     41     if (nTp === 0) {
     42         while (nm1[rnd] === "") {
     43             rnd = Math.random() * nm1.length | 0;
     44         }
     45         while (nm1[rnd] === nm5[rnd3] || nm5[rnd3] === "") {
     46             rnd3 = Math.random() * nm5.length | 0;
     47         }
     48         nMs = nm1[rnd] + nm2[rnd2] + nm5[rnd3];
     49     } else {
     50         rnd4 = Math.random() * nm3.length | 0;
     51         rnd5 = Math.random() * nm4.length | 0;
     52         while (nm3[rnd4] === nm1[rnd] || nm3[rnd4] === nm5[rnd3]) {
     53             rnd4 = Math.random() * nm3.length | 0;
     54         }
     55         nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd4] + nm4[rnd5] + nm5[rnd3];
     56     }
     57     testSwear(nMs);
     58 }