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.
41 lines
2.6 KiB
JavaScript
41 lines
2.6 KiB
JavaScript
var br = "";
|
|
|
|
function nameGen() {
|
|
var nm1 = ["Bluster", "Buster", "Clanker", "Clatter", "Crackle", "Dither", "Flutter", "Jangle", "Jingle", "Quaver", "Quiver", "Rattle", "Scatter", "Shatter", "Shiver", "Shudder", "Smatter", "Splinter", "Tremble", "Tumble", "Waver", "Wiggle", "Wobble"];
|
|
var nm2 = ["jaw", "bone", "bones", "skull", "rib", "ribs", "spine", "toes"];
|
|
var nm3 = ["", "", "", "", "", "", "", "Final", "Ultimate", "Willing", "Unaware", "Enthusiastic", "Prepared", "Favored", "Zealous", "Unbidden", "Bidden", "Reliable", "Voluntary", "Involuntary", "Heedless", "Oblivious", "Careless", "Unknowing", "Unsuspecting", "Arranged", "Primed", "Available", "Qualified", "Disposable", "Adequate", "Proven", "Tested", "Reborn", "Eternal", "Trivial", "Useless", "Replacable"];
|
|
var nm4 = ["Sacrifice", "Demise", "Doom", "End", "Ending", "Terminus", "Fate", "Fatality", "Casualty", "Offering", "Forfeit", "Calamity", "Disaster", "Annihilation", "Tragedy", "Verdict", "Destination", "Cataclysm", "Curtains", "Scourge", "Wreck", "Wreckage", "Collapse", "Misfortune", "Departure"];
|
|
var nm5 = ["Cannon", "Mace", "Sword", "Arrow", "Spear", "Javelin", "Bullet", "Bow", "Archer", "Club", "Knife", "Dart", "Sickle", "Axe", "Hammer", "Flail", "Sling", "Crossbow", "Pistol"];
|
|
var nm6 = ["fodder", "sink", "lure", "dodger", "bait", "decoy", "trap", "trick", "snare", "con", "ditcher", "swerver", "juker", "fudger", "trickster"];
|
|
$('#placeholder').css('textTransform', 'capitalize');
|
|
var element = document.createElement("div");
|
|
element.setAttribute("id", "result");
|
|
for (i = 0; i < 10; i++) {
|
|
nTp = Math.random() * 3 | 0;
|
|
if (nTp === 0) {
|
|
rnd = Math.random() * nm1.length | 0;
|
|
rnd2 = Math.random() * nm2.length | 0;
|
|
nMs = nm1[rnd] + nm2[rnd2];
|
|
} else if (nTp === 1) {
|
|
rnd = Math.random() * nm3.length | 0;
|
|
rnd2 = Math.random() * nm4.length | 0;
|
|
if (nm3[rnd] === "") {
|
|
nMs = nm4[rnd2];
|
|
} else {
|
|
nMs = nm3[rnd] + " " + nm4[rnd2];
|
|
}
|
|
} else {
|
|
rnd = Math.random() * nm5.length | 0;
|
|
rnd2 = Math.random() * nm6.length | 0;
|
|
nMs = nm5[rnd] + nm6[rnd2];
|
|
}
|
|
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);
|
|
}
|