This commit is contained in:
33333-33333 2026-06-30 22:30:37 +09:00
commit 7455d630fc
82 changed files with 2179 additions and 900 deletions

View file

@ -145,9 +145,18 @@
becomeTarinaiChampion(options = {}) {
if (!this.tarinaiChampionEligible?.() && !options.force) return false;
if (this.isTarinaiChampion && !options.forcePersonality) return false;
if (this.isTarinaiChampion && !options.forcePersonality) {
if (typeof tarinaiChampionName === "function") this.name = tarinaiChampionName(this.name);
return false;
}
this.isTarinaiChampion = true;
this.tarinaiChampionSince = Number.isFinite(this.tarinaiChampionSince) && this.tarinaiChampionSince > 0 ? this.tarinaiChampionSince : (this.world?.time || 0);
if (typeof tarinaiChampionName === "function") {
this.name = tarinaiChampionName(this.name);
} else {
const map = { "\u306F": "\u8987", "\u3046": "\u5B87", "\u3045": "\u30A5", "\u3063": "\uFF01" };
this.name = String(this.name || "").replace(/[\u306F\u3046\u3045\u3063]/g, ch => map[ch] || ch);
}
ensurePersonality(this);
const boosted = [];
for (const key of ["aggression", "openness", "sociability"]) {
@ -159,7 +168,7 @@
}
this.surpriseTimer = Math.max(this.surpriseTimer || 0, 0.65);
this.focusPulseTimer = Math.max(this.focusPulseTimer || 0, 1.0);
if (boosted.length) this.recordChangeCause?.("たりない王者", boosted.join("・"), { value: +1 });
if (boosted.length) this.recordChangeCause?.("\u305F\u308A\u306A\u3044\u738B\u8005", boosted.join("\u30FB"), { value: +1 });
this.world?.recordFamily?.(this);
return true;
},
@ -454,7 +463,7 @@
},
lowHealthSprite() {
// 体力比率による段階表示: 30%以下 cry、20%以下 weak、10%以下 stretch。
// \u4F53\u529B\u6BD4\u7387\u306B\u3088\u308B\u6BB5\u968E\u8868\u793A: 30%\u4EE5\u4E0B cry\u300120%\u4EE5\u4E0B weak\u300110%\u4EE5\u4E0B stretch\u3002
const maxEnergy = typeof tarinaiMaxEnergy === "function" ? tarinaiMaxEnergy(this) : (Number(this.maxEnergy) || 100);
const energyRatio = (Number(this.energy) || 0) / Math.max(1, Number(maxEnergy) || 100);
if (energyRatio <= 0.10) return "stretch";