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.

223 lines
5.9 KiB
JavaScript

var nm1 = [
["bao", "leopard"],
["da", "elephant"],
["da", "rat"],
["duan", "alligator"],
["gou", "dog"],
["he", "hippo"],
["hei", "chimp"],
["hou", "monkey"],
["hu", "fox"],
["zhu", "spider"],
["chong", "insect"],
["lang", "wolf"],
["lao", "tiger"],
["lie", "hyena"],
["lu", "deer"],
["ma", "horse"],
["mao", "cat"],
["niao", "bird"],
["shan", "goat"],
["she", "snake"],
["shi", "lion"],
["tu", "rabbit"],
["xi", "rhino"],
["xiao", "mouse"],
["xiong", "bear"],
["xiong", "panda"],
["yang", "sheep"],
["ying", "eagle"],
["yu", "fish"],
["cao", "grass"],
["di", "Earth"],
["guo", "orchard"],
["hua", "flower"],
["pu", "waterfall"],
["xuan", "cliff"],
["yuan", "garden"],
["yun", "cloud"],
["xin", "heart"],
["shi", "stone"],
["jing", "mind"],
["mu", "tomb"],
["wan", "night"],
["pingheng", "balance"],
["dou", "fight"],
["zandou", "battle"],
["meili", "beauty"],
["wuxian", "infinity"],
["xue", "blood"],
["yonggan", "bravery"],
["lian", "chain"],
["hundun", "chaos"],
["yongqi", "courage"],
["wangguan", "crown"],
["xi", "delight"],
["huoli", "energy"],
["yongheng", "eternity"],
["yan", "flame"],
["huo", "fire"],
["hexie", "harmony"],
["rongyu", "honor"],
["zhengyi", "justice"],
["zhishi", "knowledge"],
["zhongcheng", "loyalty"],
["dalishi", "marble"],
["naixin", "patience"],
["du", "poison"],
["duye", "venom"],
["zihoa", "pride"],
["fengboa", "storm"],
["mimi", "secret"],
["si", "silk"],
["yin", "silver"],
["lei", "thunder"],
["wangzuo", "throne"],
["sheng", "victory"],
["zhihui", "wisdom"],
["zhide", "worth"],
["hefeng", "zephyr"]
];
var nm2 = [
["shan", "mountain"],
["sen", "forest"],
["sha", "desert"],
["he", "river"],
["hu", "lake"],
["an", "shore"],
["dao", "island"],
["hai", "ocean"],
["hai", "sea"],
["men", "gate"]
];
var nm3 = [
["an", "quiet"],
["bai", "white"],
["bo", "thin"],
["chang", "long"],
["cheng", "orange"],
["da", "big"],
["duan", "short"],
["fei", "flying"],
["fen", "pink"],
["guo", "foreign"],
["han", "cold"],
["hao", "good"],
["hei", "black"],
["hei", "dark"],
["hong", "red"],
["hou", "thick"],
["huan", "slow"],
["huang", "yellow"],
["hui", "gray"],
["jin", "gold"],
["kuan", "wide"],
["lan", "blue"],
["lao", "old"],
["li", "maroon"],
["lu", "green"],
["nian", "young"],
["pan", "coiled"],
["qiang", "powerful"],
["qing", "light"],
["qiu", "curling"],
["re", "hot"],
["ruan", "soft"],
["ruo", "weak"],
["shen", "spirit"],
["shu", "tree"],
["tai", "sun"],
["teng", "soaring"],
["tian", "heavenly"],
["tian", "sky"],
["wu", "fog"],
["xing", "star"],
["xue", "snow"],
["yao", "herb"],
["yin", "silver"],
["ying", "hard"],
["ying", "responsive"],
["yu", "rain"],
["zhai", "narrow"],
["zhong", "heavy"],
["zi", "purple"],
["gu", "ancient"],
["jingren", "amazing"],
["yan", "austere"],
["jing", "brilliant"],
["niao", "delicate"],
["ya", "elegant"],
["ti", "exalted"],
["kaiming", "enlightened"],
["dadan", "fearless"],
["yan", "glamorous"],
["qinqie", "gracious"],
["youmei", "graceful"],
["xie", "harmonious"],
["tian", "heavenly"],
["yin", "hidden"],
["xiang", "infinite"],
["wuxing", "invisible"],
["shuo", "luminous"],
["juan", "illustrious"],
["gui", "marvelous"],
["zhuangli", "magnificent"],
["xiongwei", "majestic"],
["shenmi", "mysterious"],
["anxiang", "serene"],
["zuigao", "supreme"],
["ningjing", "tranquil"],
["liu", "wandering"]
];
var nm4 = [
["pai", "sect"],
["bang", "gang"],
["pai", "sect"],
["bang", "gang"],
["men", "sect"],
["men", "cult"],
["jiao", "cult"],
["hui", "society"],
["gong", "palace"],
["jiao", "cult"],
["hui", "society"],
["gong", "palace"]
];
var br = "";
function nameGen() {
$('#placeholder').css('textTransform', 'capitalize');
var element = document.createElement("div");
element.setAttribute("id", "result");
for (i = 0; i < 10; i++) {
rnd = Math.random() * nm4.length | 0;
nTp = Math.random() * 10 | 0;
if (nTp < 2) {
rnd2 = Math.random() * nm3.length | 0;
names = nm3[rnd2][0] + nm4[rnd][0] + " (" + nm3[rnd2][1] + " + " + nm4[rnd][1] + ")";
} else if (nTp < 4) {
rnd2 = Math.random() * nm3.length | 0;
rnd3 = Math.random() * nm1.length | 0;
names = nm3[rnd2][0] + nm1[rnd3][0] + nm4[rnd][0] + " (" + nm3[rnd2][1] + " + " + nm1[rnd3][1] + " + " + nm4[rnd][1] + ")";
} else if (nTp < 6) {
rnd2 = Math.random() * nm3.length | 0;
rnd3 = Math.random() * nm2.length | 0;
names = nm3[rnd2][0] + nm2[rnd3][0] + nm4[rnd][0] + " (" + nm3[rnd2][1] + " + " + nm2[rnd3][1] + " + " + nm4[rnd][1] + ")";
} else if (nTp < 8) {
rnd2 = Math.random() * nm1.length | 0;
rnd3 = Math.random() * nm2.length | 0;
names = nm1[rnd2][0] + nm2[rnd3][0] + nm4[rnd][0] + " (" + nm1[rnd2][1] + " + " + nm2[rnd3][1] + " + " + nm4[rnd][1] + ")";
} else {
rnd2 = Math.random() * nm1.length | 0;
names = nm1[rnd2][0] + nm4[rnd][0] + " (" + nm1[rnd2][1] + " + " + nm4[rnd][1] + ")";
}
br = document.createElement('br');
element.appendChild(document.createTextNode(names));
element.appendChild(br);
}
if (document.getElementById("result")) {
document.getElementById("placeholder").removeChild(document.getElementById("result"));
}
document.getElementById("placeholder").appendChild(element);
}