a
This commit is contained in:
parent
d163ceb291
commit
f6d7412744
94 changed files with 3836 additions and 1226 deletions
|
|
@ -73,6 +73,8 @@ function foodPriorityRank(tarinai, item) {
|
|||
const need = getTarinaiBehaviorNeed(tarinai);
|
||||
const socialNeed = Number(tarinai?.needRaw?.social ?? tarinai?.needs?.social ?? 0) || 0;
|
||||
const healthNeed = Number(tarinai?.needRaw?.health ?? tarinai?.needs?.health ?? 0) || 0;
|
||||
if (tarinai?.isZunchiSlave && type === "sweet") return -1;
|
||||
if (tarinai?.isZunchiSlave && type === "zunchi") return 6200;
|
||||
if (type === "sweet") return 4300 + Math.min(120, Math.max(0, healthNeed - 40) * 3);
|
||||
if (type === "water") return 3650 + Math.max(0, healthNeed - 42) * 7;
|
||||
if (type === "zunda_juice") return 3720 + Math.max(0, healthNeed - 42) * 6;
|
||||
|
|
@ -106,6 +108,7 @@ function foodPriorityScore(tarinai, item, distance = 0) {
|
|||
|
||||
function hasBetterFoodThanZunchiNearby(tarinai, world, maxDist = 180) {
|
||||
if (!tarinai || !world) return false;
|
||||
if (tarinai.isZunchiSlave) return false;
|
||||
const source = world.nearbyFood?.(tarinai.x, tarinai.y, maxDist, true) || world.nearbyItems?.(tarinai.x, tarinai.y, maxDist, true) || world.items || [];
|
||||
for (const it of source) {
|
||||
if (!it || it.dead) continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue