1.4
This commit is contained in:
parent
ad2cc76429
commit
7455d630fc
82 changed files with 2179 additions and 900 deletions
|
|
@ -116,10 +116,7 @@ function consumeBehaviorTarget(t, world, target, role = "food", dt = 0.12) {
|
|||
if (target.type === "zunchi" && (target.amount || 0) > 0) {
|
||||
const foodNeed = Number(t.needRaw?.food ?? t.needs?.food ?? 0) || 0;
|
||||
if (zunchiEatingBlocked(t, target, world)) return false;
|
||||
if (!t.isZunchiSlave && hasBetterFoodThanZunchiNearby(t, world, 240)) return false;
|
||||
const emergencyHunger = (t.hunger || 0) >= 104 || foodNeed >= 94;
|
||||
if (!emergencyHunger && !t.isZunchiSlave && target.stage === "fresh" && (target.age || 0) < 150 && foodNeed < 94 && (t.hunger || 0) < 104) return false;
|
||||
if (!t.isZunchiSlave && foodNeed < 90 && (t.hunger || 0) < 100) return false;
|
||||
if (!t.isZunchiSlave && hasBetterFoodThanZunchiNearby(t, world, 900)) return false;
|
||||
const servingScale = Number.isFinite(target.foodServingScale) ? target.foodServingScale : (target.toolSize === "large" ? 1.18 : (target.toolSize === "small" ? 0.82 : 1));
|
||||
const bite = Math.min(target.amount, (t.isZunchiSlave ? rand(4.8, 7.4) : rand(3.4, 5.8)) * servingScale);
|
||||
if (!(bite > 0)) return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue