--
This commit is contained in:
parent
5ed977788c
commit
f500279abd
93 changed files with 1893 additions and 1198 deletions
|
|
@ -43,7 +43,7 @@ function roleMatches(item, role) {
|
|||
|
||||
function foodInteractionPoint(item) {
|
||||
if (!item) return { x: 0, y: 0 };
|
||||
if (item.type === "duplicator") return { x: item.x + (item.r || 34) * 0.62, y: item.y + (item.r || 34) * 0.24 };
|
||||
if (item.type === "duplicator") return { x: item.x + (item.r || 34) * 0.44, y: item.y + (item.r || 34) * 0.18 };
|
||||
return { x: item.x, y: item.y };
|
||||
}
|
||||
|
||||
|
|
@ -54,7 +54,7 @@ function foodInteractionDistance(tarinai, item) {
|
|||
}
|
||||
|
||||
function foodInteractionReach(tarinai, item, role = "food") {
|
||||
if (item?.type === "duplicator") return Math.max(14, (tarinai?.radius || 20) * 0.44 + 5);
|
||||
if (item?.type === "duplicator") return Math.max(30, (tarinai?.radius || 20) * 0.72 + (item?.r || 34) * 0.36);
|
||||
if (role === "drink") return Math.max(16, (tarinai?.radius || 20) * 0.58 + (item?.r || 12) * 0.40);
|
||||
return Math.max(13, (tarinai?.radius || 20) * 0.50 + (item?.r || 12) * 0.28);
|
||||
}
|
||||
|
|
@ -92,7 +92,7 @@ function foodPriorityScore(tarinai, item, distance = 0) {
|
|||
if (!tarinai?.isZunchiSlave) rank -= 1400;
|
||||
if (effectiveFoodTypeForItem(item) === "zunchi" && !tarinai?.isZunchiSlave && hunger < 104) rank -= 1200;
|
||||
}
|
||||
if (item?.type === "duplicator") rank += 85;
|
||||
if (item?.type === "duplicator") rank += 420;
|
||||
return rank - Math.max(0, Number(distance) || 0) * 0.65;
|
||||
}
|
||||
|
||||
|
|
@ -121,8 +121,8 @@ function zunchiEatingBlocked(tarinai, item, world) {
|
|||
if (protectedUntil > 0 && (world?.time || 0) < protectedUntil) return true;
|
||||
const foodNeed = Number(tarinai.needRaw?.food ?? tarinai.needs?.food ?? 0) || 0;
|
||||
const hunger = Number(tarinai.hunger || 0) || 0;
|
||||
// 排泄直後のずんちは観察・接触対象であり、通常食として即消費させない。
|
||||
// ずんちどれいも数秒は待つ。通常個体は極限飢餓でも最低90秒は食べない。
|
||||
// \u6392\u6cc4\u76f4\u5f8c\u306e\u305a\u3093\u3061\u306f\u89b3\u5bdf\u30fb\u63a5\u89e6\u5bfe\u8c61\u3067\u3042\u308a\u3001\u901a\u5e38\u98df\u3068\u3057\u3066\u5373\u6d88\u8cbb\u3055\u305b\u306a\u3044\u3002
|
||||
// \u305a\u3093\u3061\u3069\u308c\u3044\u3082\u6570\u79d2\u306f\u5f85\u3064\u3002\u901a\u5e38\u500b\u4f53\u306f\u6975\u9650\u98e2\u9913\u3067\u3082\u6700\u4f4e90\u79d2\u306f\u98df\u3079\u306a\u3044\u3002
|
||||
const emergency = hunger >= 104 || foodNeed >= 94;
|
||||
const grace = tarinai.isZunchiSlave ? (emergency ? 4 : 18) : (emergency ? 20 : 90);
|
||||
if (protectedAge < grace) return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue