1.4
This commit is contained in:
parent
ad2cc76429
commit
7455d630fc
82 changed files with 2179 additions and 900 deletions
|
|
@ -15,6 +15,13 @@ function tarinaiRoundRectPath(ctx, x, y, w, h, r) {
|
|||
ctx.quadraticCurveTo(x, y, x + rr, y);
|
||||
}
|
||||
|
||||
function tarinaiChampionName(name = "") {
|
||||
const map = { "\u306F": "\u8987", "\u3046": "\u5B87", "\u3045": "\u30A5", "\u3063": "\uFF01" };
|
||||
return String(name || "").replace(/[\u306F\u3046\u3045\u3063]/g, ch => map[ch] || ch);
|
||||
}
|
||||
if (typeof window !== "undefined") window.tarinaiChampionName = tarinaiChampionName;
|
||||
if (typeof globalThis !== "undefined") globalThis.tarinaiChampionName = tarinaiChampionName;
|
||||
|
||||
class Tarinai { constructor(world, opts = {}) {
|
||||
if (world && !opts.birthSeed && !opts.familyKey && !opts.id && globalThis.TarinaiSeedFactory.prepareAddOptions) {
|
||||
opts = globalThis.TarinaiSeedFactory.prepareAddOptions(world, opts) || opts;
|
||||
|
|
@ -130,6 +137,7 @@ class Tarinai { constructor(world, opts = {}) {
|
|||
this.intimidateTimer = opts.intimidateTimer ?? 0;
|
||||
this.intimidateTargetId = opts.intimidateTargetId || null;
|
||||
this.intimidatedTimer = opts.intimidatedTimer ?? 0;
|
||||
this.intimidationCooldown = opts.intimidationCooldown ?? 0;
|
||||
this.birthRitualTimer = opts.birthRitualTimer ?? 0;
|
||||
this.birthRitualMax = opts.birthRitualMax ?? 0;
|
||||
this.birthPartnerId = opts.birthPartnerId || null;
|
||||
|
|
@ -168,6 +176,7 @@ class Tarinai { constructor(world, opts = {}) {
|
|||
applyZunchiSlavePersonality(this, { record: false, birth: false });
|
||||
this.visibleSpriteId = "zunchi_slave";
|
||||
}
|
||||
if (this.isTarinaiChampion) this.name = tarinaiChampionName(this.name);
|
||||
this.tempComfort = opts.tempComfort ?? (CONFIG.standardTemperature ?? 15);
|
||||
this.feltTemperature = opts.feltTemperature ?? this.tempComfort;
|
||||
this.temperatureStatus = null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue