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.

46 lines
4.2 KiB
JavaScript

var nm1 = ["Amber", "Azure", "Bronze", "Cardinal", "Cerulean", "Copper", "Crimson", "Emerald", "Golden", "Indigo", "Ivory", "Jade", "Lavender", "Magenta", "Maroon", "Rose", "Ruby", "Saffron", "Sanguine", "Sapphire", "Scarlet", "Silver", "Teal", "Verdant", "Violet", "Viridian", "Ancient", "Blissful", "Brave", "Broken", "Bruised", "Carefree", "Cheeky", "Cheerful", "Clumsy", "Curious", "Defiant", "Evasive", "Evergreen", "Fierce", "Fragile", "Fragrant", "Gentle", "Handsome", "Hasty", "Honest", "Humble", "Idle", "Jovial", "Juvenile", "Lazy", "Lone", "Loyal", "Lucky", "Mad", "Mellow", "Merry", "Mysterious", "Nebulous", "Nimble", "Odd", "Outstanding", "Passionate", "Playful", "Pleasant", "Powerful", "Precious", "Protective", "Proud", "Quick", "Quiet", "Radiant", "Reckless", "Serene", "Short", "Silent", "Skillful", "Smiling", "Snowy", "Somber", "Sparkling", "Strange", "Superior", "Talented", "Tiny", "Tranquil", "Turbulent", "Vagabond", "Vibrant", "Voiceless", "Volatile", "Watchful"];
var nm2 = ["in Summer", "in Winter", "in Autumn", "in Spring", "Air", "Autumn", "Beach", "Bubble", "Cloud", "Color", "Dew", "Dirt", "Dust", "Faith", "Fate", "Flame", "Fog", "Frost", "Gift", "Gold", "Grace", "Hope", "Ice", "Iron", "Lake", "Life", "Light", "Love", "Might", "Mist", "Moon", "Mud", "Peace", "Plant", "Pond", "Rain", "River", "Rock", "Sand", "Sea", "Shade", "Shadow", "Smoke", "Snow", "Soil", "Song", "Spell", "Spring", "Storm", "Summer", "Sun", "Tale", "Thrill", "Thunder", "Time", "Trick", "Truth", "Warmth", "Water", "Wave", "Web", "Wind", "Winter"];
var nm3 = ["babbler", "basker", "bather", "binder", "blender", "breather", "catcher", "changer", "chaser", "dancer", "dasher", "defender", "dreamer", "drifter", "drinker", "fetcher", "finder", "former", "gardener", "giver", "harvester", "heaper", "hoarder", "holder", "hunter", "leaper", "lifter", "listener", "marcher", "mender", "nestler", "painter", "rambler", "reader", "roamer", "runner", "shifter", "singer", "sketcher", "sleeper", "soother", "summoner", "tamer", "tender", "walker", "weaver"];
var nm4 = ["Acacia", "Alder", "Ash", "Aspen", "Azalea", "Balsa", "Bamboo", "Baobab", "Bayonet", "Beech", "Birch", "Box", "Buckeye", "Buckthorn", "Bunya", "Bush", "Cassava", "Catalpa", "Cedar", "Conifer", "Cycad", "Cypress", "Elder", "Elm", "Eucalyptus", "Fir", "Hawthorn", "Hazel", "Hemlock", "Hickory", "Holly", "Hornbeam", "Juniper", "Larch", "Leaf", "Locust", "Magnolia", "Mahogany", "Mangrove", "Maple", "Medlar", "Milkbark", "Oak", "Oleander", "Palm", "Palmetto", "Persimmon", "Pine", "Poplar", "Privet", "Rhododendron", "Rowan", "Sequoia", "Spruce", "Strongbark", "Sumac", "Sycamore", "Tree", "Viburnum", "Willow", "Wood", "Yew", "Yucca"];
var nm5 = ["Bark", "Branch", "Bud", "Child", "Crown", "Leaf", "Root", "Sapling", "Trunk", "Twig"];
var br = "";
function nameGen() {
var element = document.createElement("div");
element.setAttribute("id", "result");
for (i = 0; i < 10; i++) {
nTp = Math.random() * 7 | 0;
if (nTp < 4) {
rnd2 = Math.random() * nm2.length | 0;
if (rnd2 < 4) {
rnd = Math.random() * 26 | 0;
nMs = nm1[rnd] + " " + nm2[rnd2];
} else {
rnd = Math.random() * nm1.length | 0;
if (nTp < 2) {
nMs = nm1[rnd] + " " + nm2[rnd2];
} else {
rnd3 = Math.random() * nm3.length | 0;
nMs = nm1[rnd] + " " + nm2[rnd2] + nm3[rnd3];
}
}
} else {
rnd = Math.random() * nm4.length | 0;
rnd2 = Math.random() * nm5.length | 0;
if (nTp < 6) {
nMs = nm4[rnd] + " " + nm5[rnd2];
} else {
rnd3 = Math.random() * nm1.length | 0;
nMs = nm1[rnd3] + " " + nm4[rnd] + " " + nm5[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);
}