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

mgtKor.js (6534B)


      1 var nm1 = ["g", "h", "l", "m", "n", "t", "d", "y", "b", "z"];
      2 var nm2 = ["a", "e", "o", "u"];
      3 var nm3 = ["b", "bb", "bh", "d", "dd", "dh", "lb", "ld", "lg", "ln", "md", "ml", "m", "mm", "n", "nd", "nn", "ng", "nk", "nl", "nm"];
      4 var nm4 = ["", "", "", "", "", "", "", "l", "n", "r", "y"];
      5 var nm5 = ["f", "h", "l", "n", "t", "v", "y"];
      6 var nm6 = ["a", "e", "i"];
      7 var nm7 = ["hn", "hl", "hm", "l", "lm", "ln", "ly", "lf", "ll", "mn", "m", "mm", "mh", "my", "mw", "n", "ny", "nm", "nh", "nw", "ph", "phr", "phl", "sh", "sl", "sn", "sm", "st", "th", "thn", "thl", "thy", "yl", "yn"];
      8 var nm8 = ["Aged", "Ambush", "Ancient", "Armament", "Austere", "Bold", "Brilliant", "Cruel", "Defiant", "Dependent", "Devoted", "Devout", "Diligent", "Discrete", "Dutiful", "Eager", "Eternal", "Exalted", "Fearless", "Feline", "Forsaken", "Ghostly", "Gifted", "Glorious", "Grand", "Great", "Grim", "Hollow", "Honored", "Illustrious", "Intrepid", "Juvenile", "Kor", "Lone", "Lost", "Loyal", "Mellow", "Minor", "Monstrous", "Nocturnal", "Obedient", "Outlandish", "Powerful", "Prime", "Rapid", "Reckless", "Relief", "Rigid", "Selfish", "Shadow", "Shadowy", "Shady", "Silent", "Sneaky", "Sniveling", "Somber", "Spirited", "Swift", "Vengeful", "Vicious", "Vigilant", "Violent", "Wicked", "Wild", "Wrathful", "Wretched"];
      9 var nm9 = ["Aeronaut", "Apprentice", "Artisan", "Augur", "Blademaster", "Brawler", "Bruiser", "Burglar", "Captain", "Champion", "Cleric", "Commander", "Dancer", "Diviner", "Duelist", "Enchanter", "Explorer", "Fighter", "Firewalker", "Glider", "Guard", "Guardian", "Guide", "Harbinger", "Herald", "Hero", "Hookmaster", "Infiltrator", "Leader", "Lookout", "Medic", "Mercenary", "Missionary", "Mole", "Mystic", "Navigator", "Neophyte", "Oracle", "Outfitter", "Pilgrim", "Protector", "Prowler", "Ringleader", "Sage", "Sanctifier", "Scout", "Scythemaster", "Sear", "Seer", "Sentinel", "Shieldmate", "Soothsayer", "Specialist", "Spiritdancer", "Spy", "Tender", "Thief", "Vanguard", "Wanderer", "Warrior", "Watcher", "Wildcat"];
     10 var nm10 = ["alder", "amber", "barren", "bitter", "boulder", "cinder", "coven", "crest", "dark", "dawn", "deep", "dew", "down", "dream", "dusk", "elm", "ember", "fall", "farrow", "fist", "flame", "flint", "fore", "free", "frost", "gloom", "grand", "gray", "great", "hard", "haven", "high", "keen", "kind", "light", "lone", "long", "meadow", "mirth", "mist", "moon", "mourn", "night", "plain", "pride", "proud", "rapid", "regal", "river", "rough", "shade", "shadow", "silent", "silken", "silver", "simple", "single", "solid", "soul", "spring", "stern", "stone", "storm", "tall", "thunder", "vine", "water", "whit", "wild"];
     11 var nm11 = ["bane", "beam", "bend", "blaze", "bluff", "bough", "bound", "brace", "branch", "brand", "breeze", "brook", "brooke", "brow", "call", "copse", "crag", "crest", "dane", "down", "fall", "fist", "flaw", "flow", "force", "forge", "fury", "gaze", "glade", "glare", "grove", "guard", "heart", "helm", "husk", "keep", "lance", "lash", "lock", "mane", "mantle", "mark", "more", "mourne", "ridge", "root", "run", "shade", "shard", "shot", "soar", "song", "spine", "spire", "stalk", "stand", "stride", "surge", "sworn", "thorn", "thorne", "track", "vale"];
     12 var br = "";
     13 
     14 function nameGen(type) {
     15     $('#placeholder').css('textTransform', 'capitalize');
     16     var tp = type;
     17     var element = document.createElement("div");
     18     element.setAttribute("id", "result");
     19     for (i = 0; i < 10; i++) {
     20         rnd12 = Math.floor(Math.random() * nm2.length);
     21         if (tp === 1) {
     22             if (i < 6) {
     23                 rnd = Math.floor(Math.random() * nm5.length);
     24                 rnd2 = Math.floor(Math.random() * nm6.length);
     25                 rnd3 = Math.floor(Math.random() * nm7.length);
     26                 rnd4 = Math.floor(Math.random() * nm6.length);
     27                 rnd5 = Math.floor(Math.random() * nm8.length);
     28                 rnd6 = Math.floor(Math.random() * nm9.length);
     29                 while (nm7[rnd3] === nm5[rnd]) {
     30                     rnd3 = Math.floor(Math.random() * nm7.length);
     31                 }
     32                 names = nm5[rnd] + nm6[rnd2] + nm7[rnd3] + nm6[rnd4] + ", " + nm8[rnd5] + " " + nm9[rnd6];
     33             } else if (i < 8) {
     34                 rnd = Math.floor(Math.random() * nm8.length);
     35                 rnd2 = Math.floor(Math.random() * nm9.length);
     36                 names = nm8[rnd] + " " + nm9[rnd2];
     37             } else {
     38                 rnd = Math.floor(Math.random() * nm10.length);
     39                 rnd2 = Math.floor(Math.random() * nm11.length);
     40                 while (nm10[rnd] === nm11[rnd2]) {
     41                     rnd2 = Math.floor(Math.random() * nm11.length);
     42                 }
     43                 rnd3 = Math.floor(Math.random() * nm9.length);
     44                 names = nm10[rnd] + nm11[rnd2] + " " + nm9[rnd2];
     45             }
     46         } else {
     47             if (i < 6) {
     48                 rnd = Math.floor(Math.random() * nm1.length);
     49                 rnd2 = Math.floor(Math.random() * nm2.length);
     50                 rnd3 = Math.floor(Math.random() * nm3.length);
     51                 rnd4 = Math.floor(Math.random() * nm2.length);
     52                 rnd1 = Math.floor(Math.random() * nm4.length);
     53                 rnd5 = Math.floor(Math.random() * nm8.length);
     54                 rnd6 = Math.floor(Math.random() * nm9.length);
     55                 while (nm3[rnd3] === nm1[rnd]) {
     56                     rnd3 = Math.floor(Math.random() * nm3.length);
     57                 }
     58                 names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm4[rnd1] + ", " + nm8[rnd5] + " " + nm9[rnd6];
     59             } else if (i < 8) {
     60                 rnd = Math.floor(Math.random() * nm8.length);
     61                 rnd2 = Math.floor(Math.random() * nm9.length);
     62                 names = nm8[rnd] + " " + nm9[rnd2];
     63             } else {
     64                 rnd = Math.floor(Math.random() * nm10.length);
     65                 rnd2 = Math.floor(Math.random() * nm11.length);
     66                 while (nm10[rnd] === nm11[rnd2]) {
     67                     rnd2 = Math.floor(Math.random() * nm11.length);
     68                 }
     69                 rnd3 = Math.floor(Math.random() * nm9.length);
     70                 names = nm10[rnd] + nm11[rnd2] + " " + nm9[rnd2];
     71             }
     72         }
     73         br = document.createElement('br');
     74         element.appendChild(document.createTextNode(names));
     75         element.appendChild(br);
     76     }
     77     if (document.getElementById("result")) {
     78         document.getElementById("placeholder").removeChild(document.getElementById("result"));
     79     }
     80     document.getElementById("placeholder").appendChild(element);
     81 }