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

hollowKnight.js (7412B)


      1 var nm1 = ["b", "br", "c", "gr", "l", "m", "n", "r", "sh", "t", "z", "", ""];
      2 var nm2 = ["eo", "ia", "ea", "y", "a", "e", "i", "o", "u", "y", "a", "e", "i", "o", "u", "y", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u"];
      3 var nm3 = ["r", "rd", "rn", "rr", "s", "t", "v"];
      4 var nm4 = ["a", "e", "i"];
      5 var nm5 = ["f", "l", "r", "s", "v"];
      6 var nm6 = ["oo", "ie", "a", "e", "e", "i", "o", "o", "a", "e", "e", "i", "o", "o", "a", "e", "e", "i", "o", "o"];
      7 var nm7 = ["mm", "k", "l", "n", "r", "", "", ""];
      8 var nm8 = ["", "", "", "br", "h", "j", "m", "n", "s", "t", "w", "", ""];
      9 var nm9 = ["y", "a", "e", "i", "o", "a", "e", "i", "o", "u", "y", "a", "e", "i", "o", "a", "e", "i", "o", "u"];
     10 var nm10 = ["j", "l", "ll", "m", "n", "r", "rr", "s", "tt"];
     11 var nm11 = ["a", "e", "i", "o", "u"];
     12 var nm12 = ["l", "m", "n", "s", "r", "t"];
     13 var nm13 = ["a", "e", "i"];
     14 var nm14 = ["br", "ld", "ll", "n", "nt", "r", "t", "tt"];
     15 var nm15 = ["ia", "ea", "a", "e", "i", "o"];
     16 var nm16 = ["h", "n", "", "", "", "", "", "", "", "", ""];
     17 var nm17 = ["Amphipod", "Ant", "Aphid", "Arachnid", "Bee", "Beetle", "Billbug", "Borer", "Bug", "Bumblebee", "Butterfly", "Caterpillar", "Centipede", "Chigger", "Cicada", "Cockroach", "Crawler", "Cricket", "Damselfly", "Dragonfly", "Earwig", "Flatworm", "Flea", "Fly", "Grasshopper", "Grub", "Hopper", "Horntail", "Katydid", "Lacewing", "Ladybird", "Larva", "Leech", "Locust", "Longhorn", "Louse", "Maggot", "Mantid", "Mantis", "Mayfly", "Millipede", "Mite", "Mosquito", "Moth", "Nepidae", "Parasite", "Peripatus", "Psocid", "Pupa", "Scarab", "Silverfish", "Slater", "Slug", "Snail", "Sowbug", "Spider", "Spittlebug", "Springtail", "Stick", "Stonefly", "Termite", "Thrip", "Tick", "Wasp", "Weevil", "Weta", "Worm", "Ash", "Ashes", "Bandit", "Blitz", "Boots", "Buddy", "Buttons", "Chuck", "Chuckles", "Cinder", "Cookie", "Echo", "Fangs", "Fuzz", "Gadget", "Gambit", "Ghost", "Jiggles", "Jitters", "Junior", "Lance", "Marble", "Midnight", "Mittens", "Muffin", "Nemesis", "Nightmare", "Noodle", "Nugget", "Patches", "Rebel", "Rider", "Scooter", "Scratch", "Scruff", "Shadow", "Spike", "Spinner", "Stitches", "Tinker", "Truffle", "Venom", "Whiskers", "Whisper"];
     18 var nm18 = ["Amphipod", "Ant", "Aphid", "Arachnid", "Bee", "Beetle", "Billbug", "Borer", "Bug", "Bumblebee", "Butterfly", "Caterpillar", "Centipede", "Chigger", "Cicada", "Cockroach", "Crawler", "Cricket", "Damselfly", "Dragonfly", "Earwig", "Flatworm", "Flea", "Fly", "Grasshopper", "Grub", "Hopper", "Horntail", "Katydid", "Lacewing", "Ladybird", "Larva", "Leech", "Locust", "Longhorn", "Louse", "Maggot", "Mantid", "Mantis", "Mayfly", "Millipede", "Mite", "Mosquito", "Moth", "Nepidae", "Parasite", "Peripatus", "Psocid", "Pupa", "Scarab", "Silverfish", "Slater", "Slug", "Snail", "Sowbug", "Spider", "Spittlebug", "Springtail", "Stick", "Stonefly", "Termite", "Thrip", "Tick", "Wasp", "Weevil", "Weta", "Worm", "Amber", "Arachne", "Arack", "Aragi", "Arania", "Ash", "Aura", "Aurora", "Bitsy", "Blossom", "Breeze", "Bumble", "Buttercup", "Button", "Buttons", "Charm", "Cheeky", "Cinders", "Coco", "Cookie", "Cotton", "Crystal", "Cuddles", "Daisy", "Dawn", "Dot", "Echo", "Ember", "Enigma", "Fancy", "Fangs", "Fuzzles", "Gadget", "Giggles", "Happy", "Iris", "Ivory", "Jewel", "Jinx", "Legs", "Lucky", "Mittens", "Mothrine", "Pebble", "Pebbles", "Phobia", "Poison", "Princess", "Scarlet", "Socks", "Spindle", "Sugar", "Sunshine", "Twilight", "Twitch", "Velvet", "Venom", "Violet"];
     19 
     20 function nameGen(type) {
     21     $('#placeholder').css('textTransform', 'capitalize');
     22     var tp = type;
     23     var br = "";
     24     var element = document.createElement("div");
     25     element.setAttribute("id", "result");
     26     for (i = 0; i < 10; i++) {
     27         rNd = Math.random() * 2 | 0;
     28         if (rNd === 0) {
     29             if (tp === 1) {
     30                 nameFem();
     31                 while (nMs === "") {
     32                     nameFem();
     33                 }
     34             } else {
     35                 nameMas();
     36                 while (nMs === "") {
     37                     nameMas();
     38                 }
     39             }
     40         } else {
     41             if (tp === 1) {
     42                 rnd = Math.random() * nm18.length | 0;
     43                 nMs = nm18[rnd];
     44             } else {
     45                 rnd = Math.random() * nm17.length | 0;
     46                 nMs = nm17[rnd];
     47             }
     48         }
     49         br = document.createElement('br');
     50         element.appendChild(document.createTextNode(nMs));
     51         element.appendChild(br);
     52     }
     53     if (document.getElementById("result")) {
     54         document.getElementById("placeholder").removeChild(document.getElementById("result"));
     55     }
     56     document.getElementById("placeholder").appendChild(element);
     57 }
     58 
     59 function nameMas() {
     60     nTp = Math.random() * 8 | 0;
     61     rnd = Math.random() * nm1.length | 0;
     62     rnd2 = Math.random() * nm2.length | 0;
     63     rnd3 = Math.random() * nm7.length | 0;
     64     if (nTp < 2) {
     65         while (nm1[rnd] === "") {
     66             rnd = Math.random() * nm1.length | 0;
     67         }
     68         if (nm7[rnd3] === "" && rnd2 > 2) {
     69             rnd2 = Math.random() * 3 | 0;
     70         } else {
     71             while (nm7[rnd3] === "") {
     72                 rnd3 = Math.random() * nm7.length | 0;
     73             }
     74         }
     75         nMs = nm1[rnd] + nm2[rnd2] + nm7[rnd3];
     76     } else if (nTp < 7) {
     77         rnd4 = Math.random() * nm3.length | 0;
     78         rnd7 = Math.random() * nm6.length | 0;
     79         while (nm7[rnd3] === "mm") {
     80             rnd3 = Math.random() * nm7.length | 0;
     81         }
     82         while (nm3[rnd4] === nm1[rnd] && nm3[rnd4] === nm7[rnd3]) {
     83             rnd4 = Math.random() * nm3.length | 0;
     84         }
     85         nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd4] + nm6[rnd7] + nm7[rnd3];
     86     } else {
     87         while (nm7[rnd3] === "mm") {
     88             rnd3 = Math.random() * nm7.length | 0;
     89         }
     90         rnd5 = Math.random() * nm4.length | 0;
     91         rnd6 = Math.random() * nm5.length | 0;
     92         while (nm3[rnd4] === nm5[rnd6] && nm5[rnd6] === nm7[rnd3]) {
     93             rnd6 = Math.random() * nm5.length | 0;
     94         }
     95         nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd4] + nm4[rnd5] + nm5[rnd6] + nm6[rnd7] + nm7[rnd3];
     96     }
     97     testSwear(nMs);
     98 }
     99 
    100 function nameFem() {
    101     nTp = Math.random() * 7 | 0;
    102     rnd = Math.random() * nm8.length | 0;
    103     rnd2 = Math.random() * nm9.length | 0;
    104     rnd4 = Math.random() * nm10.length | 0;
    105     rnd5 = Math.random() * nm15.length | 0;
    106     rnd3 = Math.random() * nm16.length | 0;
    107     while (nm8[rnd] === nm10[rnd4] || nm10[rnd4] === nm16[rnd3]) {
    108         rnd4 = Math.random() * nm10.length | 0;
    109     }
    110     if (nTp < 4) {
    111         nMs = nm8[rnd] + nm9[rnd2] + nm10[rnd4] + nm15[rnd5] + nm16[rnd3];
    112     } else {
    113         rnd6 = Math.random() * nm11.length | 0;
    114         rnd7 = Math.random() * nm12.length | 0;
    115         while (nm10[rnd4] === nm12[rnd7] || nm12[rnd7] === nm16[rnd3]) {
    116             rnd7 = Math.random() * nm12.length | 0;
    117         }
    118         if (nTp < 6) {
    119             nMs = nm8[rnd] + nm9[rnd2] + nm10[rnd4] + nm11[rnd6] + nm12[rnd7] + nm15[rnd5] + nm16[rnd3];
    120         } else {
    121             rnd8 = Math.random() * nm13.length | 0;
    122             rnd9 = Math.random() * nm14.length | 0;
    123             while (nm12[rnd7] === nm13[rnd8] || nm13[rnd8] === nm16[rnd3]) {
    124                 rnd8 = Math.random() * nm13.length | 0;
    125             }
    126             nMs = nm8[rnd] + nm9[rnd2] + nm10[rnd4] + nm11[rnd6] + nm12[rnd7] + nm13[rnd8] + nm14[rnd9] + nm15[rnd5] + nm16[rnd3];
    127         }
    128     }
    129     testSwear(nMs);
    130 }