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

pfSkinwalker.js (1480B)


      1 var br = "";
      2 
      3 function nameGen() {
      4     var nm1 = ["Bear", "Wolf", "Boar", "Croc", "Rat", "Tiger", "Wild", "Beast", "Feral", "Savage", "Eagle", "Hawk", "Falcon", "Raptor", "Owl", "Bat", "Shark", "Fang", "Claw", "Eye", "Feather", "Plume", "Fin", "Fur", "Pelt", "Talon"];
      5     var nm2 = ["maw", "jaw", "skin", "tamer", "marked", "blood", "might", "force", "vigor", "strength", "fury", "scream", "rage", "sworn", "strike", "stride", "sorrow", "song", "shield", "shadow", "crest", "heart", "chaser", "breaker", "bane", "blight", "cure", "trial", "heart", "crown", "soul", "mind", "spirit", "will", "bound", "fate", "mark", "sight"];
      6     $('#placeholder').css('textTransform', 'capitalize');
      7     var element = document.createElement("div");
      8     element.setAttribute("id", "result");
      9     for (i = 0; i < 10; i++) {
     10         rnd = Math.random() * nm1.length | 0;
     11         rnd2 = Math.random() * nm2.length | 0;
     12         if (rnd > 9) {
     13             while (rnd2 < 3) {
     14                 rnd2 = Math.random() * nm2.length | 0;
     15             }
     16         }
     17         nMs = nm1[rnd] + nm2[rnd2];
     18         nm1.splice(rnd, 1);
     19         nm2.splice(rnd2, 1);
     20         br = document.createElement('br');
     21         element.appendChild(document.createTextNode(nMs));
     22         element.appendChild(br);
     23     }
     24     if (document.getElementById("result")) {
     25         document.getElementById("placeholder").removeChild(document.getElementById("result"));
     26     }
     27     document.getElementById("placeholder").appendChild(element);
     28 }