p
This commit is contained in:
parent
d14550dad6
commit
63e10af865
86 changed files with 5400 additions and 1209 deletions
|
|
@ -83,7 +83,7 @@
|
|||
updateZunchiDisease(dt) {
|
||||
this.zunchiStain = clamp(this.zunchiStain || 0, 0, 100);
|
||||
this.zunchiDiseaseCooldown = Math.max(0, (this.zunchiDiseaseCooldown || 0) - dt);
|
||||
const shelteredFromRain = globalThis.TarinaiRainShelterSystem?.isSheltered?.(this.world, this.x, this.y) || false;
|
||||
const shelteredFromRain = globalThis.TarinaiRainShelterSystem?.isSheltered?.(this.world, this.x, this.y, this) || false;
|
||||
if (this.world?.weather === "light_rain" && !shelteredFromRain) {
|
||||
this.zunchiStain = clamp(this.zunchiStain - dt * 2.4, 0, 100);
|
||||
if (this.zunchiDisease) this.zunchiDiseaseSeverity = Math.max(0, (this.zunchiDiseaseSeverity || 1) - dt * 0.006);
|
||||
|
|
@ -576,8 +576,11 @@
|
|||
if (this.dead) return false;
|
||||
const already = Boolean(this.burning || (this.burnTimer || 0) > 0.02);
|
||||
if (already && !force) return false;
|
||||
const ignitedDuringBirthRitual = !already && Boolean((this.birthRitualTimer || 0) > 0.04 || this.state === "birth_ritual");
|
||||
const text = globalThis.TarinaiItemDynamicToolSystem?.fireBurningText || "\u71c3\u3048\u3066\u9003\u3052\u307e\u3069\u3063\u3066\u3044\u308b\u3002";
|
||||
this.burning = true;
|
||||
const dangerSource = source?.roles?.danger ? source : (source?._achievementDangerSource?.roles?.danger ? source._achievementDangerSource : null);
|
||||
if (dangerSource) this._achievementDangerSource = dangerSource;
|
||||
this.burnTimer = Math.max(Number(this.burnTimer || 0) || 0, 5.2 + deterministicRange(this.world, "tarinai-burn-duration", 0, 2.8, this, source || null));
|
||||
this.firePanicTimer = 0;
|
||||
this.lastPanicCause = "burning";
|
||||
|
|
@ -599,6 +602,7 @@
|
|||
this.bubble?.("\u3042\u3061\u3085\u3044\uff01", 1.35, "rgba(214,82,38,0.90)", { force: true });
|
||||
}
|
||||
this.recordChangeCause?.("\u708e\u4e0a", "\u708e\u4e0a");
|
||||
if (ignitedDuringBirthRitual) globalThis.TarinaiAchievements?.recordIgnition?.({ world: this.world, tarinai: this, source });
|
||||
return true;
|
||||
},
|
||||
|
||||
|
|
@ -606,6 +610,7 @@
|
|||
if (!this.burning && !(this.burnTimer > 0)) return false;
|
||||
this.burning = false;
|
||||
this.burnTimer = 0;
|
||||
this._achievementDangerSource = null;
|
||||
this.firePanicTimer = Math.max(this.firePanicTimer || 0, 0.25);
|
||||
this.hurtTimer = Math.max(this.hurtTimer || 0, 0.35);
|
||||
if (reason) this.thought = reason;
|
||||
|
|
@ -642,7 +647,7 @@
|
|||
return;
|
||||
}
|
||||
if (typeof applyNeedShock === "function") applyNeedShock(this, { health: dt * 6.2, safety: dt * 3.0 });
|
||||
if (typeof this.damage === "function") this.damage(dt * 3.8, "\u708e\u4e0a");
|
||||
if (typeof this.damage === "function") this.damage(dt * 3.8, "\u708e\u4e0a", { source: this._achievementDangerSource || null });
|
||||
else this.energy = clamp((this.energy || 0) - dt * 0.12, 0, typeof tarinaiMaxEnergy === "function" ? tarinaiMaxEnergy(this) : (Number(this.maxEnergy) || 100));
|
||||
this.hurtTimer = Math.max(this.hurtTimer || 0, 0.22);
|
||||
const water = globalThis.TarinaiItemDynamicToolSystem?.contactWaterDrop?.(this.world, this.x, this.y, Math.max(this.radius || 18, 16));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue