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

wowHarpies.js (3288B)


      1 var nm1 = ["", "", "", "", "", "", "f", "fr", "g", "gr", "h", "l", "m", "n", "ph", "r", "s", "sh", "v", "vr", "z"];
      2 var nm2 = ["a", "e", "i", "a", "e", "i", "u", "y"];
      3 var nm3 = ["b", "d", "g", "gn", "gl", "gr", "l", "ld", "lr", "lm", "ln", "m", "mg", "md", "n", "nd", "ng", "nk", "nt", "r", "rl", "rm", "rn", "rv", "s", "sh", "th", "v", "z"];
      4 var nm4 = ["a", "e", "i", "o", "a", "e", "i", "o", "a", "e", "i", "o", "a", "e", "i", "o", "a", "e", "i", "o", "a", "e", "i", "o", "a", "e", "i", "o", "ia", "eo", "ie", "io"];
      5 var nm5 = ["d", "dr", "h", "l", "ld", "lm", "ll", "n", "nn", "nd", "ndr", "r", "rr", "t", "th", "v", "w"];
      6 var nm6 = ["a", "e", "i"];
      7 var nm7 = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "n", "l", "h", "s"];
      8 var nm8 = ["anger", "bird", "bite", "bitter", "blood", "burst", "chain", "chaos", "cold", "course", "craft", "crazy", "crook", "crow", "crown", "crush", "dark", "death", "dirt", "dread", "edge", "end", "fear", "feast", "flight", "flock", "flow", "fluke", "fork", "foul", "fury", "ghost", "glass", "grand", "grief", "grim", "gust", "half", "hate", "hell", "horror", "ice", "iron", "light", "moon", "nest", "owl", "pain", "poison", "pride", "queen", "quill", "rage", "raw", "rip", "scorn", "shade", "shadow", "shift", "slice", "smoke", "snow", "solar", "sorrow", "spark", "spell", "spirit", "spite", "stitch", "storm", "strike", "sun", "talon", "tear", "terror", "thunder", "trail", "twist", "venom", "war", "wild", "worm"];
      9 var nm9 = ["barb", "claw", "crest", "crook", "cry", "feather", "fringe", "hook", "plume", "plumes", "quill", "scream", "screech", "shriek", "shrill", "song", "squawk", "talon", "wail", "wing"];
     10 var br = "";
     11 
     12 function nameGen(type) {
     13     var tp = type;
     14     $('#placeholder').css('textTransform', 'capitalize');
     15     var element = document.createElement("div");
     16     element.setAttribute("id", "result");
     17     for (i = 0; i < 10; i++) {
     18         nameMas();
     19         while (nMs === "") {
     20             nameMas();
     21         }
     22         rnd = Math.random() * nm8.length | 0;
     23         rnd2 = Math.random() * nm9.length | 0;
     24         while (nm8[rnd] === nm9[rnd2]) {
     25             rnd2 = Math.random() * nm9.length | 0;
     26         }
     27         nMs = nMs + " " + nm8[rnd] + nm9[rnd2]
     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 nameMas() {
     39     nTp = Math.random() * 3 | 0;
     40     rnd = Math.random() * nm1.length | 0;
     41     rnd2 = Math.random() * nm2.length | 0;
     42     rnd3 = Math.random() * nm3.length | 0;
     43     rnd4 = Math.random() * nm4.length | 0;
     44     rnd5 = Math.random() * nm7.length | 0;
     45     while (nm3[rnd3] === nm1[rnd] || nm3[rnd3] === nm7[rnd5]) {
     46         rnd3 = Math.random() * nm3.length | 0;
     47     }
     48     if (nTp === 0) {
     49         rnd6 = Math.random() * nm5.length | 0;
     50         rnd7 = Math.random() * nm6.length | 0;
     51         nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm4[rnd4] + nm5[rnd6] + nm6[rnd7] + nm7[rnd5];
     52     } else {
     53         nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm4[rnd4] + nm7[rnd5];
     54     }
     55     testSwear(nMs);
     56 }