aaa
This commit is contained in:
parent
2e90add2e1
commit
db81a509cf
6 changed files with 56 additions and 21 deletions
|
|
@ -263,10 +263,7 @@
|
|||
if (colonyMoodId === "zunda_party" || colonyMoodId === "ball_party") this.stress = clamp((this.stress || 0) - dt * 0.34, 0, 130);
|
||||
if (colonyMoodId === "ant_overrun" && this.state !== "panic") {
|
||||
const antSeen = (this.world?.nearbyAnts?.(this.x, this.y, 110, true) || []).some(a => a && !a.dead);
|
||||
if (antSeen) {
|
||||
if (this.enterPanic) this.enterPanic({ target: null, reason: "アリだ!", fear: 1.1, wake: true, cause: "colony_ant_overrun" });
|
||||
else { this.setActionState?.("panic", { target: null, reason: "アリだ!", wake: true }); this.fearTimer = Math.max(this.fearTimer || 0, 1.1 * this.personalityProfile().fear); }
|
||||
}
|
||||
if (antSeen) window.TarinaiNeedSystem?.addNeedShock?.(this, { safety: 18 }, null);
|
||||
}
|
||||
const wasFighting = this.fightTimer > 0.04;
|
||||
this.fightTimer = Math.max(0, this.fightTimer - dt);
|
||||
|
|
@ -378,6 +375,7 @@
|
|||
if (this.world.resolveFenceCollision) this.world.resolveFenceCollision(this);
|
||||
const sleepingAtFrameEnd = this.state === "sleep" || this.sleeping;
|
||||
if (wasSleepingAtFrameStart && !sleepingAtFrameEnd && !this.dead) this.awakeLockTimer = Math.max(this.awakeLockTimer || 0, 10);
|
||||
if (this.needsInitialized && window.TarinaiNeedSystem?.deriveStressFromNeeds) this.stress = window.TarinaiNeedSystem.deriveStressFromNeeds(this.needs || {});
|
||||
this.checkLife(dt);
|
||||
},
|
||||
|
||||
|
|
@ -586,13 +584,11 @@
|
|||
const pin = this.currentLodgedPin?.() || null;
|
||||
const pinBehavior = this.currentLodgedPinBehavior?.() || null;
|
||||
if (pin && pinBehavior?.panicOnAttach) {
|
||||
if (this.enterPanic) this.enterPanic({ threat: pin, reason: "画鋲が刺さってパニックになっている", fear: 0.60, hurtTimer: 0.24, awakeLockTimer: 1.8, bubble: "!!", bubbleColor: "rgba(168,72,72,0.82)", cause: "pushpin_stuck" });
|
||||
else { this.setActionState?.("panic", { target: this.panicDestination(pin), reason: "画鋲が刺さってパニックになっている", wake: true }); this.fearTimer = Math.max(this.fearTimer || 0, 0.60); }
|
||||
window.TarinaiNeedSystem?.addNeedShock?.(this, { safety: 45, health: 20 }, pin);
|
||||
this.hurtTimer = Math.max(this.hurtTimer || 0, 0.24);
|
||||
this.awakeLockTimer = Math.max(this.awakeLockTimer || 0, 1.8);
|
||||
this.bubble("!!", 0.9, "rgba(168,72,72,0.82)");
|
||||
this.thought = "\u753b\u92f2\u304c\u523a\u3055\u3063\u3066\u30d1\u30cb\u30c3\u30af\u306b\u306a\u3063\u3066\u3044\u308b";
|
||||
return;
|
||||
this.thought = "\u753b\u92f2\u304c\u523a\u3055\u3063\u3066\u3044\u308b";
|
||||
}
|
||||
this.stuckPushpinId = null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue