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

mgtOrcs.js (7377B)


      1 var nm1 = ["d", "g", "k", "m", "n", "s", "t", "v", "z"];
      2 var nm1b = ["", "", "", "", "", "", "d", "g", "k", "m", "n", "s", "t", "v", "z"];
      3 var nm2 = ["a", "e", "o", "u"];
      4 var nm3 = ["c", "d", "g", "k", "q", "r", "z"];
      5 var nm4 = ["d", "g", "k", "m", "n", "s", "t", "v", "z"];
      6 var nm5 = ["'", "-"];
      7 var nm6 = ["a", "e", "o", "u", "a", "e", "o", "u", "a", "e", "o", "u", "ua", "uu", "aa", "au", "ao", "ia", "ou"];
      8 var nm7 = ["d", "dh", "dr", "g", "gr", "gn", "k", "kn", "kr", "m", "n", "s", "st", "t", "tr", "v", "z", "zh"];
      9 var nm8 = ["c", "cr", "cd", "d", "dr", "dg", "dk", "g", "gr", "gn", "gd", "gz", "k", "kr", "kd", "kv", "kz", "m", "mm", "n", "nn", "ng", "nd", "q", "qr", "r", "rr", "rk", "rz", "rv", "rd", "rg", "z", "zk", "zr", "zz"];
     10 var nm9 = ["", "", "", "", "", "", "", "", "", "", "", "g", "h", "l", "m", "n", "r", "t", "z"];
     11 var nm10 = ["d", "g", "l", "m", "n", "r", "v", "z"];
     12 var nm11 = ["d", "g", "k", "m", "n", "r", "s", "sh", "t", "th", "v", "z"];
     13 var nm12 = ["alder", "ash", "bane", "black", "blood", "boulder", "brass", "bronze", "cinder", "dark", "dawn", "dead", "death", "doom", "dust", "ember", "fire", "flame", "gloom", "haze", "heavy", "hell", "iron", "keen", "lone", "molten", "mourn", "nether", "proud", "rage", "rapid", "rough", "scream", "shadow", "sharp", "silent", "skull", "slate", "steel", "stern", "stone", "storm", "swift", "thunder", "void", "war", "wild"];
     14 var nm13 = ["bane", "bellow", "blade", "blaze", "blood", "bone", "brace", "brand", "brow", "burn", "claw", "cleave", "crest", "cut", "doom", "eye", "fang", "fist", "flaw", "force", "forge", "fury", "gaze", "gloom", "grip", "growl", "hand", "heart", "keep", "mane", "mantle", "mark", "maul", "maw", "mourn", "rage", "reach", "ridge", "run", "scar", "shade", "shard", "spark", "stalk", "stride", "surge", "sworn", "thorn"];
     15 var nm14 = ["Artificer", "Artisan", "Assailant", "Assassin", "Barbarian", "Bigwig", "Brawler", "Bruiser", "Brute", "Cannoneer", "Captain", "Chief", "Colonist", "Conscript", "Enforcer", "Executioner", "Fanatic", "General", "Gladiator", "Healer", "Horde", "Hordechief", "Hunter", "Looter", "Lumberjack", "Maniac", "Marauder", "Mechanic", "Mercenary", "Militant", "Operative", "Orc", "Outlaw", "Overlord", "Overseer", "Paratrooper", "Patrol", "Pillager", "Pioneer", "Raider", "Ravager", "Recruit", "Rider", "Roughrider", "Sadist", "Savage", "Scout", "Settler", "Shaman", "Slayer", "Soldier", "Spy", "Technician", "Vanguard", "Veteran", "Warbringer", "Warlord", "Warmonger", "Watcher", "Zealot"];
     16 var nm15 = ["Acclaimed", "Aggressive", "Agitated", "Ambush", "Angry", "Anguished", "Battle", "Bellowing", "Bitter", "Blind", "Broken", "Brutal", "Careless", "Corrupt", "Corrupted", "Crazed", "Crazy", "Cruel", "Daring", "Defiant", "Delirious", "Devoted", "Diligent", "Disguised", "Dutiful", "Eager", "Enraged", "Fearless", "Forsaken", "Gleeful", "Grave", "Grim", "Grumpy", "Idle", "Insane", "Ire", "Jealous", "Mad", "Merciless", "Monstrous", "Obedient", "Pitiless", "Powerful", "Proud", "Puzzled", "Raging", "Rash", "Reckless", "Sadistic", "Shady", "Stark", "Swift", "Terrifying", "Thick", "Trifling", "Unfit", "Unwilling", "Vengeful", "Vicious", "Villainous", "Violent", "Wicked", "Wild", "Wretched"];
     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         if (tp === 1) {
     26             if (i < 6) {
     27                 rnd = Math.floor(Math.random() * nm9.length);
     28                 rnd2 = Math.floor(Math.random() * nm2.length);
     29                 rnd3 = Math.floor(Math.random() * nm10.length);
     30                 while (nm9[rnd] === nm10[rnd3]) {
     31                     rnd3 = Math.floor(Math.random() * nm10.length);
     32                 }
     33                 rnd4 = Math.floor(Math.random() * nm2.length);
     34                 rnd5 = Math.floor(Math.random() * nm11.length);
     35                 while (nm11[rnd5] === nm10[rnd3]) {
     36                     rnd5 = Math.floor(Math.random() * nm11.length);
     37                 }
     38                 rnd6 = Math.floor(Math.random() * nm2.length);
     39                 names = nm9[rnd] + nm2[rnd2] + nm10[rnd3] + nm2[rnd4] + nm11[rnd5] + nm2[rnd6];
     40             } else if (i < 8) {
     41                 rnd = Math.floor(Math.random() * nm12.length);
     42                 rnd2 = Math.floor(Math.random() * nm13.length);
     43                 while (nm12[rnd] === nm13[rnd2]) {
     44                     rnd2 = Math.floor(Math.random() * nm13.length);
     45                 }
     46                 rnd3 = Math.floor(Math.random() * nm14.length);
     47                 names = nm12[rnd] + nm13[rnd2] + " " + nm14[rnd3];
     48             } else {
     49                 rnd = Math.floor(Math.random() * nm15.length);
     50                 rnd2 = Math.floor(Math.random() * nm14.length);
     51                 names = nm15[rnd] + " " + nm14[rnd2];
     52             }
     53         } else {
     54             if (i < 6) {
     55                 rnd2 = Math.floor(Math.random() * nm2.length);
     56                 rnd4 = Math.floor(Math.random() * nm4.length);
     57                 if (i < 3) {
     58                     rnd = Math.floor(Math.random() * nm1.length);
     59                     rnd3 = Math.floor(Math.random() * nm3.length);
     60                     while (nm1[rnd] === nm3[rnd3]) {
     61                         rnd3 = Math.floor(Math.random() * nm3.length);
     62                     }
     63                     rnd5 = Math.floor(Math.random() * nm1b.length);
     64                     rnd6 = Math.floor(Math.random() * nm6.length);
     65                     rnd7 = Math.floor(Math.random() * nm4.length);
     66                     while (nm1b[rnd5] === nm4[rnd7]) {
     67                         rnd7 = Math.floor(Math.random() * nm7.length);
     68                     }
     69                     rnd8 = Math.floor(Math.random() * nm5.length);
     70                     names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm5[rnd8] + nm1b[rnd5] + nm6[rnd6] + nm4[rnd7];
     71                 } else {
     72                     rnd = Math.floor(Math.random() * nm7.length);
     73                     rnd3 = Math.floor(Math.random() * nm8.length);
     74                     rnd5 = Math.floor(Math.random() * nm6.length);
     75                     while (nm8[rnd3] === nm7[rnd]) {
     76                         rnd3 = Math.floor(Math.random() * nm8.length);
     77                     }
     78                     names = nm7[rnd] + nm2[rnd2] + nm8[rnd3] + nm6[rnd5] + nm4[rnd4];
     79                 }
     80             } else if (i < 8) {
     81                 rnd = Math.floor(Math.random() * nm12.length);
     82                 rnd2 = Math.floor(Math.random() * nm13.length);
     83                 while (nm12[rnd] === nm13[rnd2]) {
     84                     rnd2 = Math.floor(Math.random() * nm13.length);
     85                 }
     86                 rnd3 = Math.floor(Math.random() * nm14.length);
     87                 names = nm12[rnd] + nm13[rnd2] + " " + nm14[rnd3];
     88             } else {
     89                 rnd = Math.floor(Math.random() * nm15.length);
     90                 rnd2 = Math.floor(Math.random() * nm14.length);
     91                 names = nm15[rnd] + " " + nm14[rnd2];
     92             }
     93         }
     94         br = document.createElement('br');
     95         element.appendChild(document.createTextNode(names));
     96         element.appendChild(br);
     97     }
     98     if (document.getElementById("result")) {
     99         document.getElementById("placeholder").removeChild(document.getElementById("result"));
    100     }
    101     document.getElementById("placeholder").appendChild(element);
    102 }