You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
75 lines
4.8 KiB
JavaScript
75 lines
4.8 KiB
JavaScript
var nm1 = ["", "", "", "", "c", "d", "g", "r", "s", "t", "th", "v", "z"];
|
|
var nm2 = ["a", "e", "i", "o", "u"];
|
|
var nm3 = ["ch", "h", "hr", "l", "lr", "lth", "lv", "n", "nn", "nv", "r", "rr", "rv", "rz", "s", "sh", "th", "z", "zh", "zr"];
|
|
var nm4 = ["y", "a", "a", "e", "i", "o", "u", "u"];
|
|
var nm5 = ["h", "m", "n", "r", "s", "th", "v", "z"];
|
|
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"];
|
|
var nm7 = ["", "", "", "", "", "", "", "d", "l", "r", "s", "th", "v", "z"];
|
|
var br = "";
|
|
|
|
function nameGen() {
|
|
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"];
|
|
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"];
|
|
var nm10 = ["", " "];
|
|
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"];
|
|
$('#placeholder').css('textTransform', 'capitalize');
|
|
var element = document.createElement("div");
|
|
element.setAttribute("id", "result");
|
|
for (i = 0; i < 10; i++) {
|
|
nameMas();
|
|
while (nMs === "") {
|
|
nameMas();
|
|
}
|
|
nTp = Math.random() * 2 | 0;
|
|
if (nTp === 0) {
|
|
rnd = Math.random() * nm8.length | 0;
|
|
rnd2 = Math.random() * nm9.length | 0;
|
|
rnd3 = Math.random() * nm10.length | 0;
|
|
nMs += " the " + nm8[rnd] + nm10[rnd3] + nm9[rnd2];
|
|
} else {
|
|
rnd = Math.random() * nm11.length | 0;
|
|
nTs = Math.random() * 2 | 0;
|
|
if (nTs === 0) {
|
|
if (rnd < 50) {
|
|
nMs += " of " + nm11[rnd] + "s";
|
|
} else {
|
|
nMs += " of " + nm11[rnd];
|
|
}
|
|
} else {
|
|
nMs = nm11[rnd] + " of " + nMs;
|
|
}
|
|
nm11.splice(rnd, 1);
|
|
}
|
|
br = document.createElement('br');
|
|
element.appendChild(document.createTextNode(nMs));
|
|
element.appendChild(br);
|
|
}
|
|
if (document.getElementById("result")) {
|
|
document.getElementById("placeholder").removeChild(document.getElementById("result"));
|
|
}
|
|
document.getElementById("placeholder").appendChild(element);
|
|
}
|
|
|
|
function nameMas() {
|
|
nTp = Math.random() * 9 | 0;
|
|
rnd = Math.random() * nm1.length | 0;
|
|
rnd2 = Math.random() * nm2.length | 0;
|
|
rnd3 = Math.random() * nm7.length | 0;
|
|
rnd4 = Math.random() * nm3.length | 0;
|
|
rnd5 = Math.random() * nm6.length | 0;
|
|
while (nm3[rnd4] === nm1[rnd] || nm3[rnd4] === nm7[rnd3]) {
|
|
rnd4 = Math.random() * nm3.length | 0;
|
|
}
|
|
if (nTp < 5) {
|
|
nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd4] + nm6[rnd5] + nm7[rnd3];
|
|
} else {
|
|
rnd6 = Math.random() * nm4.length | 0;
|
|
rnd7 = Math.random() * nm5.length | 0;
|
|
while (nm3[rnd4] === nm5[rnd7] || nm5[rnd7] === nm7[rnd3]) {
|
|
rnd7 = Math.random() * nm5.length | 0;
|
|
}
|
|
nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd4] + nm4[rnd6] + nm5[rnd7] + nm6[rnd5] + nm7[rnd3];
|
|
}
|
|
testSwear(nMs);
|
|
}
|