stable
This commit is contained in:
parent
8bd4405fe8
commit
d5c661bc22
53 changed files with 4264 additions and 950 deletions
|
|
@ -218,14 +218,22 @@
|
|||
applyFoodHungerRelief(amount = 0) {
|
||||
const raw = Math.max(0, Number(amount) || 0);
|
||||
const actual = this.hasItemEffect("laxative") ? raw * (EFFECT_REGISTRY?.modifier?.("laxative", "hungerReliefMultiplier", 0) ?? 0) : raw;
|
||||
if (actual > 0.2) this.lastAteAt = this.world?.time || 0;
|
||||
if (actual >= 6) {
|
||||
const now = this.world?.time || 0;
|
||||
if (actual > 0.2) this.lastAteAt = now;
|
||||
if (actual >= 3.5) {
|
||||
const day = Number(this.world?.config?.dayLength || CONFIG?.dayLength || 120) || 120;
|
||||
const base = day / 4;
|
||||
const base = day / 3.65;
|
||||
const jitter = typeof stableUnit === "function" ? (0.82 + stableUnit(this.familyKey || this.id, "meal-cooldown") * 0.36) : 1;
|
||||
this.mealCooldownUntil = Math.max(this.mealCooldownUntil || 0, (this.world?.time || 0) + base * jitter);
|
||||
this.mealCooldownUntil = Math.max(this.mealCooldownUntil || 0, now + base * jitter);
|
||||
this.needSatisfaction = this.needSatisfaction || (typeof createDefaultNeeds === "function" ? createDefaultNeeds() : {});
|
||||
this.needSatisfaction.food = Math.max(this.needSatisfaction.food || 0, Math.min(88, actual * 1.85));
|
||||
this.actionCooldowns = this.actionCooldowns || {};
|
||||
this.actionCooldowns.food = Math.max(this.actionCooldowns.food || 0, 5.2);
|
||||
}
|
||||
this.hunger -= actual;
|
||||
if (actual >= 3.5 && this.hunger < 68 && (typeof getTarinaiBehaviorNeed === "function" ? getTarinaiBehaviorNeed(this) : this.behavior?.need) === "food" && !((typeof currentTarinaiBehavior === "function" ? currentTarinaiBehavior(this) : this.behavior)?.forced)) {
|
||||
this.intentLockTimer = Math.min(this.intentLockTimer || 0, 0.25);
|
||||
}
|
||||
return actual;
|
||||
},
|
||||
|
||||
|
|
@ -267,7 +275,7 @@
|
|||
if (!this.world || this.dead) return;
|
||||
if (this.hasLodgedPinEffect?.("blocksZunchi")) {
|
||||
this.oshiriByoZunchiStock = Math.min(24, Math.max(0, this.oshiriByoZunchiStock || 0) + 1);
|
||||
this.thought = (this.oshiriByoZunchiStock || 0) >= 6 ? "おしり鋲でずんちが溜まってつらい" : "おしり鋲でずんちを我慢している";
|
||||
this.thought = (this.oshiriByoZunchiStock || 0) >= 6 ? "\u304a\u3057\u308a\u92f2\u3067\u305a\u3093\u3061\u304c\u6e9c\u307e\u3063\u3066\u3064\u3089\u3044" : "\u304a\u3057\u308a\u92f2\u3067\u305a\u3093\u3061\u3092\u6211\u6162\u3057\u3066\u3044\u308b";
|
||||
return;
|
||||
}
|
||||
const side = this.facingDir ? this.facingDir() : (this.facing || 1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue