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

mgtMerfolk.js (7257B)


      1 var nm1 = ["d", "g", "j", "n", "s", "t", "v", "z"];
      2 var nm2 = ["a", "e", "i", "o", "a", "e", "i", "o", "u"];
      3 var nm3 = ["d", "dd", "dr", "fr", "fl", "l", "ll", "lr", "ln", "n", "nn", "nd", "r", "rd", "rz", "rs", "rv", "t", "tt", "tr", "y", "z", "zz"];
      4 var nm4 = ["d", "g", "gg", "l", "n", "nd", "ng", "t"];
      5 var nm5 = ["", "", "", "c", "g", "h", "j", "k", "l", "m", "n", "t", "th"];
      6 var nm6 = ["a", "a", "i", "o", "o", "u"];
      7 var nm7 = ["d", "l", "m", "n", "r", "s", "t", "z"];
      8 var nm8 = ["d", "h", "l", "m", "n", "r", "y"];
      9 var nm9 = ["", "", "", "", "", "b", "d", "g", "k", "m", "n", "r", "v", "z"];
     10 var nm10 = ["a", "e", "a", "e", "a", "e", "a", "e", "o", "i", "u"];
     11 var nm11 = ["d", "dd", "g", "gg", "l", "ll", "n", "nn", "r", "rr", "t", "tt", "z", "zz"];
     12 var nm12 = ["c", "k", "l", "m", "n", "r"];
     13 var nm13 = ["azure", "blue", "bright", "clear", "cloud", "coral", "coven", "crystal", "deep", "depth", "down", "dream", "fallow", "fore", "grand", "gravel", "haze", "ink", "keen", "light", "low", "mellow", "mer", "mild", "moon", "night", "ocean", "orb", "pale", "prism", "pure", "razor", "rip ", "root", "rough", "sand", "sea", "shadow", "shore", "silver", "soft", "star", "storm", "strong", "surge", "swift", "tidal", "tide", "void", "wake", "wander", "water", "wave", "well", "whit", "wild", "wind"];
     14 var nm14 = ["bar", "bend", "bender", "bind", "binder", "bough", "bow", "brand", "breath", "breeze", "brine", "brook", "brooke", "brow", "caller", "channel", "crag", "crash", "creek", "crest", "dancer", "dew", "dream", "dreamer", "fallow", "fathom", "fin", "flow", "front", "gabber", "gill", "glade", "glide", "helm", "line", "might", "more", "rider", "ridge", "river", "sage", "scape", "seeker", "shaper", "shard", "shine", "sigh", "singer", "soar", "spanner", "spout", "stand", "stream", "surge", "sworn", "tail", "tide", "trapper", "tread", "vigor", "wake", "ward", "water", "weaver", "wine"];
     15 var nm15 = ["Adept", "Ambassador", "Angler", "Apothecary", "Assassin", "Bouncer", "Commander", "Disciple", "Diver", "Douser", "Drowner", "Elite", "Entangler", "Explorer", "Fighter", "Fluxmage", "Guard", "Guardian", "Guide", "Harbinger", "Hero", "Hunter", "Hypnotist", "Illusionist", "Infiltrator", "Knight", "Legate", "Mage", "Mentor", "Merchant", "Merfolk", "Mesmerist", "Mystic", "Patrol", "Pilferer", "Priest", "Prophet", "Raider", "Rider", "Sage", "Scout", "Scryer", "Seer", "Selkie", "Sentinel", "Shaman", "Spy", "Stalker", "Summoner", "Thief", "Tracker", "Trader", "Trapper", "Trasher", "Triton", "Visionary", "Warrior", "Watch", "Weaver"];
     16 var nm16 = ["Abyss", "Abyssal", "Agile", "Arctic", "Atoll", "Azure", "Barrier", "Basin", "Bay", "Brave", "Buoyant", "Cape", "Careful", "Careless", "Coral", "Coven", "Darting", "Defiant", "Depth", "Diligent", "Diving", "Enclave", "Energetic", "Esteemed", "Exalted", "Expanse", "Experienced", "Fearless", "Gifted", "Glorious", "Grand", "Gulf", "Harbor", "Hasty", "Intrepid", "Jolting", "Juvenile", "Keen", "Lagoon", "Marine", "Maritime", "Nautical", "Nimble", "Oceanic", "Prime", "Prism", "Radiant", "Reckless", "Reef", "Salty", "Shore", "Slippery", "Stark", "Storm", "Surf", "Surfing", "Surge", "Swift", "Tidal", "Tide", "Turbulent", "Vicious", "Vigilant", "Void", "Wake", "Wave", "Webbed", "Wharf", "Whirlpool", "Wild", "Zealous"];
     17 var br = "";
     18 
     19 function nameGen(type) {
     20     $('#placeholder').css('textTransform', 'capitalize');
     21     var tp = type;
     22     var element = document.createElement("div");
     23     element.setAttribute("id", "result");
     24     for (i = 0; i < 10; i++) {
     25         rnd = Math.floor(Math.random() * nm9.length);
     26         rnd2 = Math.floor(Math.random() * nm10.length);
     27         rnd3 = Math.floor(Math.random() * nm12.length);
     28         if (i % 2 === 0) {
     29             lName = nm9[rnd] + nm10[rnd2] + nm12[rnd3];
     30         } else {
     31             rnd4 = Math.floor(Math.random() * nm11.length);
     32             rnd5 = Math.floor(Math.random() * nm10.length);
     33             lName = nm9[rnd] + nm10[rnd2] + nm11[rnd4] + nm10[rnd5] + nm12[rnd3];
     34         }
     35         if (tp === 1) {
     36             if (i < 6) {
     37                 rnd = Math.floor(Math.random() * nm5.length);
     38                 rnd2 = Math.floor(Math.random() * nm6.length);
     39                 rnd3 = Math.floor(Math.random() * nm7.length);
     40                 rnd4 = Math.floor(Math.random() * nm6.length);
     41                 if (i < 3) {
     42                     names = nm5[rnd] + nm6[rnd2] + nm7[rnd3] + nm6[rnd4] + " " + lName;
     43                 } else {
     44                     while (nm7[rnd3] === nm5[rnd]) {
     45                         rnd3 = Math.floor(Math.random() * nm7.length);
     46                     }
     47                     rnd5 = Math.floor(Math.random() * nm6.length);
     48                     rnd6 = Math.floor(Math.random() * nm8.length);
     49                     names = nm5[rnd] + nm6[rnd2] + nm7[rnd3] + nm6[rnd4] + nm8[rnd6] + nm6[rnd5] + " " + lName;
     50                 }
     51             } else if (i < 8) {
     52                 rnd = Math.floor(Math.random() * nm13.length);
     53                 rnd2 = Math.floor(Math.random() * nm14.length);
     54                 while (nm13[rnd] === nm14[rnd2]) {
     55                     rnd2 = Math.floor(Math.random() * nm14.length);
     56                 }
     57                 rnd3 = Math.floor(Math.random() * nm15.length);
     58                 names = nm13[rnd] + nm14[rnd2] + " " + nm15[rnd3];
     59             } else {
     60                 rnd = Math.floor(Math.random() * nm15.length);
     61                 rnd2 = Math.floor(Math.random() * nm16.length);
     62                 names = nm15[rnd] + " " + nm16[rnd2];
     63             }
     64         } else {
     65             if (i < 6) {
     66                 rnd = Math.floor(Math.random() * nm1.length);
     67                 rnd2 = Math.floor(Math.random() * nm2.length);
     68                 rnd3 = Math.floor(Math.random() * nm4.length);
     69                 if (i < 3) {
     70                     names = nm1[rnd] + nm2[rnd2] + nm4[rnd3] + " " + lName;
     71                 } else {
     72                     rnd4 = Math.floor(Math.random() * nm3.length);
     73                     rnd5 = Math.floor(Math.random() * nm2.length);
     74                     while (nm3[rnd4] === nm1[rnd]) {
     75                         rnd4 = Math.floor(Math.random() * nm3.length);
     76                     }
     77                     names = nm1[rnd] + nm2[rnd2] + nm3[rnd4] + nm2[rnd5] + nm4[rnd3] + " " + lName;
     78                 }
     79             } else if (i < 8) {
     80                 rnd = Math.floor(Math.random() * nm13.length);
     81                 rnd2 = Math.floor(Math.random() * nm14.length);
     82                 while (nm13[rnd] === nm14[rnd2]) {
     83                     rnd2 = Math.floor(Math.random() * nm14.length);
     84                 }
     85                 rnd3 = Math.floor(Math.random() * nm15.length);
     86                 names = nm13[rnd] + nm14[rnd2] + " " + nm15[rnd3];
     87             } else {
     88                 rnd = Math.floor(Math.random() * nm15.length);
     89                 rnd2 = Math.floor(Math.random() * nm16.length);
     90                 names = nm15[rnd] + " " + nm16[rnd2];
     91             }
     92         }
     93         br = document.createElement('br');
     94         element.appendChild(document.createTextNode(names));
     95         element.appendChild(br);
     96     }
     97     if (document.getElementById("result")) {
     98         document.getElementById("placeholder").removeChild(document.getElementById("result"));
     99     }
    100     document.getElementById("placeholder").appendChild(element);
    101 }