This commit is contained in:
33333-33333 2026-06-28 13:40:41 +09:00
commit f500279abd
93 changed files with 1893 additions and 1198 deletions

View file

@ -31,8 +31,8 @@
function childSeed(worldSeed = "", serial = 0, parentSeeds = []) {
const safeSerial = Math.max(0, Math.floor(Number(serial) || 0));
const parents = (parentSeeds || []).filter(Boolean).join("+");
// 区切りを入れておくと、将来 birthSeed 自体を保存しない形式へ移る時に
// birthSerial を安全に取り出せる。
// \u533a\u5207\u308a\u3092\u5165\u308c\u3066\u304a\u304f\u3068\u3001\u5c06\u6765 birthSeed \u81ea\u4f53\u3092\u4fdd\u5b58\u3057\u306a\u3044\u5f62\u5f0f\u3078\u79fb\u308b\u6642\u306b
// birthSerial \u3092\u5b89\u5168\u306b\u53d6\u308a\u51fa\u305b\u308b\u3002
return `b${safeSerial.toString(36)}_${hashString(`${worldSeed}|${safeSerial}|${parents}`)}`;
}
@ -81,9 +81,9 @@
const len = 2 + Math.floor(seedUnit(seed, "name.len") * 6); // 2..7
const hasStop = len >= 2 && seedUnit(seed, "name.stop") < 0.30;
const middleLen = Math.max(0, len - 1 - (hasStop ? 1 : 0));
let name = "は";
for (let i = 0; i < middleLen; i++) name += seedUnit(seed, `name.u.${i}`) < 0.64 ? "う" : "ぅ";
if (hasStop) name += "っ";
let name = "\u306f";
for (let i = 0; i < middleLen; i++) name += seedUnit(seed, `name.u.${i}`) < 0.64 ? "\u3046" : "\u3045";
if (hasStop) name += "\u3063";
return name;
}
@ -122,11 +122,11 @@
function birthProfile(seed = "", opts = {}) {
const zunchiSlave = Boolean(opts.isZunchiSlave || opts.zunchiSlaveLocked);
const genetics = seededGenetics(seed);
const genetics = opts.genetics && typeof normalizeGenetics === "function" ? normalizeGenetics(opts.genetics, seed) : seededGenetics(seed);
const personality = zunchiSlave && typeof zunchiSlavePersonalityValue === "function" ? zunchiSlavePersonalityValue() : seededPersonality(seed);
return {
birthSeed: seed,
name: zunchiSlave ? "ずんちどれい" : seededName(seed),
name: zunchiSlave ? "\u305a\u3093\u3061\u3069\u308c\u3044" : seededName(seed),
type: zunchiSlave ? "zunchi_slave" : seededType(seed),
goodMode: zunchiSlave ? "zunchi_slave" : seededGoodMode(seed),
birthPersonality: personality,