hm
This commit is contained in:
parent
7455d630fc
commit
4d3fc2cd47
84 changed files with 3429 additions and 3480 deletions
|
|
@ -7,12 +7,13 @@
|
|||
if (!tarinai || tarinai.dead || !ctx || !it || it.dead) return false;
|
||||
const { foodActionActive = false } = ctx;
|
||||
|
||||
if (!it || it.dead) return false;
|
||||
const ceremonialContact = it.type === "slave_chain" || it.type === "golden_crown";
|
||||
const d = it?.type === "duplicator" ? foodInteractionDistance(tarinai, it) : dist(tarinai, it);
|
||||
const baseReach = foodInteractionReach(tarinai, it, ceremonialContact ? "medicine" : "food");
|
||||
const contactReach = baseReach + (it === tarinai.target && foodActionActive && it?.type !== "duplicator" ? (ceremonialContact ? 10 : 4) : 0);
|
||||
if (d > contactReach) return false;
|
||||
const contact = global.TarinaiItemInteractionContext.contactForCandidate(tarinai, ctx, it, {
|
||||
role: ceremonialContact ? "medicine" : "food",
|
||||
activeTargetBonus: it?.type === "duplicator" ? 0 : (ceremonialContact ? 10 : 4),
|
||||
});
|
||||
if (!contact) return false;
|
||||
const d = contact.distance;
|
||||
|
||||
if (ceremonialContact) {
|
||||
const itemLabel = typeof toolLabel === "function" ? toolLabel(it.type) : (it.type === "slave_chain" ? "\u5974\u96B7\u306E\u9396" : "\u9EC4\u91D1\u306E\u51A0");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue