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

pfVishkanyan.js (4933B)


      1 var nm1 = ["", "", "", "", "c", "d", "g", "r", "s", "t", "th", "v", "z"];
      2 var nm2 = ["a", "e", "i", "o", "u"];
      3 var nm3 = ["ch", "h", "hr", "l", "lr", "lth", "lv", "n", "nn", "nv", "r", "rr", "rv", "rz", "s", "sh", "th", "z", "zh", "zr"];
      4 var nm4 = ["y", "a", "a", "e", "i", "o", "u", "u"];
      5 var nm5 = ["h", "m", "n", "r", "s", "th", "v", "z"];
      6 var nm6 = ["ee", "ia", "ea", "a", "a", "e", "i", "i", "o", "u", "a", "a", "e", "i", "i", "o", "u", "a", "a", "e", "i", "i", "o", "u", "a", "a", "e", "i", "i", "o", "u", "a", "a", "e", "i", "i", "o", "u", "a", "a", "e", "i", "i", "o", "u", "a", "a", "e", "i", "i", "o", "u", "a", "a", "e", "i", "i", "o", "u"];
      7 var nm7 = ["", "", "", "", "", "", "", "d", "l", "r", "s", "th", "v", "z"];
      8 var br = "";
      9 
     10 function nameGen() {
     11     var nm8 = ["Battle", "Bear", "Blood", "Bone", "Boulder", "Bright", "Dark", "Dead", "Death", "Demon", "Doom", "Dragon", "Ember", "Fire", "Fist", "Frost", "Fuse", "Giant", "Gold", "Gore", "Grand", "Great", "Hell", "Iron", "Light", "Mammoth", "Molten", "Night", "Phoenix", "Proud", "Rage", "Raven", "Red", "Rock", "Rumble", "Shadow", "Sharp", "Shield", "Silent", "Silver", "Single", "Skull", "Spirit", "Steel", "Stone", "Storm", "Stout", "Strong", "Swift", "Thunder", "True", "Void", "War", "Wild", "Wolf"];
     12     var nm9 = ["bane", "blade", "blood", "blow", "bolt", "bow", "breaker", "brow", "chaser", "claw", "cleaver", "crest", "cut", "eye", "fang", "fist", "flayer", "fury", "gaze", "grim", "grimace", "grip", "hair", "hallow", "hammer", "hand", "head", "heart", "helm", "hide", "mane", "mantle", "might", "pelt", "rage", "roar", "scar", "scream", "shade", "shadow", "shield", "shout", "snarl", "song", "sorrow", "stare", "stride", "strike", "sword", "sworn", "talon", "thorn", "tongue", "visage"];
     13     var nm10 = ["", " "];
     14     var nm11 = ["Riddle", "War", "Adventure", "Ambition", "Battle", "Beginning", "Border", "Breath", "Light", "Chain", "Challenge", "Comfort", "Creation", "Death", "Delay", "Puzzle", "Dream", "Escape", "Failure", "Faith", "Fear", "Flow", "Fortune", "Friendship", "Gift", "Horror", "Image", "Impulse", "Joke", "Journey", "Mask", "Pleasure", "Prize", "Price", "Storm", "Redemption", "Requiem", "Risk", "River", "Path", "Rumor", "Shadow", "Secret", "Song", "Sorrow", "Spirit", "Soul", "Thrill", "Surprise", "Thunder", "Wisdom", "Wealth", "Victory", "Strength", "Silver", "Riches", "Pride", "Power", "Patience", "Mercy", "Magic", "Luck", "Love", "Life", "Liberty", "Lessons", "Laughter", "Justice", "Kindness", "History", "Happiness", "Grief", "Grace", "Gold", "Generosity", "Elegance", "Dreams", "Distance", "Guidance", "Discovery", "Dance", "Curiosity", "Courage", "Clouds", "Charity", "Light", "Darkness", "Brilliance", "Bravery", "Blood", "Advice", "Might", "Prowess"];
     15     $('#placeholder').css('textTransform', 'capitalize');
     16     var element = document.createElement("div");
     17     element.setAttribute("id", "result");
     18     for (i = 0; i < 10; i++) {
     19         nameMas();
     20         while (nMs === "") {
     21             nameMas();
     22         }
     23         nTp = Math.random() * 2 | 0;
     24         if (nTp === 0) {
     25             rnd = Math.random() * nm8.length | 0;
     26             rnd2 = Math.random() * nm9.length | 0;
     27             rnd3 = Math.random() * nm10.length | 0;
     28             nMs += " the " + nm8[rnd] + nm10[rnd3] + nm9[rnd2];
     29         } else {
     30             rnd = Math.random() * nm11.length | 0;
     31             nTs = Math.random() * 2 | 0;
     32             if (nTs === 0) {
     33                 if (rnd < 50) {
     34                     nMs += " of " + nm11[rnd] + "s";
     35                 } else {
     36                     nMs += " of " + nm11[rnd];
     37                 }
     38             } else {
     39                 nMs = nm11[rnd] + " of " + nMs;
     40             }
     41             nm11.splice(rnd, 1);
     42         }
     43         br = document.createElement('br');
     44         element.appendChild(document.createTextNode(nMs));
     45         element.appendChild(br);
     46     }
     47     if (document.getElementById("result")) {
     48         document.getElementById("placeholder").removeChild(document.getElementById("result"));
     49     }
     50     document.getElementById("placeholder").appendChild(element);
     51 }
     52 
     53 function nameMas() {
     54     nTp = Math.random() * 9 | 0;
     55     rnd = Math.random() * nm1.length | 0;
     56     rnd2 = Math.random() * nm2.length | 0;
     57     rnd3 = Math.random() * nm7.length | 0;
     58     rnd4 = Math.random() * nm3.length | 0;
     59     rnd5 = Math.random() * nm6.length | 0;
     60     while (nm3[rnd4] === nm1[rnd] || nm3[rnd4] === nm7[rnd3]) {
     61         rnd4 = Math.random() * nm3.length | 0;
     62     }
     63     if (nTp < 5) {
     64         nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd4] + nm6[rnd5] + nm7[rnd3];
     65     } else {
     66         rnd6 = Math.random() * nm4.length | 0;
     67         rnd7 = Math.random() * nm5.length | 0;
     68         while (nm3[rnd4] === nm5[rnd7] || nm5[rnd7] === nm7[rnd3]) {
     69             rnd7 = Math.random() * nm5.length | 0;
     70         }
     71         nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd4] + nm4[rnd6] + nm5[rnd7] + nm6[rnd5] + nm7[rnd3];
     72     }
     73     testSwear(nMs);
     74 }