1.4
This commit is contained in:
parent
ad2cc76429
commit
7455d630fc
82 changed files with 2179 additions and 900 deletions
|
|
@ -8,24 +8,26 @@
|
|||
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 contactReach = foodInteractionReach(tarinai, it, "food") + (it === tarinai.target && foodActionActive && it?.type !== "duplicator" ? 4 : 0);
|
||||
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;
|
||||
|
||||
if (it.type === "slave_chain" || it.type === "golden_crown") {
|
||||
const itemLabel = typeof toolLabel === "function" ? toolLabel(it.type) : (it.type === "slave_chain" ? "奴隷の鎖" : "黄金の冠");
|
||||
if (ceremonialContact) {
|
||||
const itemLabel = typeof toolLabel === "function" ? toolLabel(it.type) : (it.type === "slave_chain" ? "\u5974\u96B7\u306E\u9396" : "\u9EC4\u91D1\u306E\u51A0");
|
||||
if (it.type === "slave_chain") {
|
||||
tarinai.isTarinaiChampion = false;
|
||||
tarinai.tarinaiChampionSince = 0;
|
||||
tarinai.becomeZunchiSlave?.({ locked: true, forcedItem: true });
|
||||
tarinai.bubble("鎖", 2.4, "rgba(74,64,56,0.82)");
|
||||
tarinai.world?.log?.(`${tarinai.name}は${itemLabel}に触れてずんちどれいになった。`, "event", { participants: [tarinai], sound: false });
|
||||
tarinai.bubble("\u9396", 2.4, "rgba(74,64,56,0.82)");
|
||||
tarinai.world?.log?.(`${tarinai.name}\u306F${itemLabel}\u306B\u89E6\u308C\u3066\u305A\u3093\u3061\u3069\u308C\u3044\u306B\u306A\u3063\u305F\u3002`, "event", { participants: [tarinai], sound: false });
|
||||
} else {
|
||||
tarinai.becomeTarinaiChampion?.({ force: true, forcePersonality: true, forcedItem: true });
|
||||
tarinai.bubble("王", 2.4, "rgba(166,112,22,0.84)");
|
||||
tarinai.world?.log?.(`${tarinai.name}は${itemLabel}に触れてたりない王になった。`, "event", { participants: [tarinai], sound: false });
|
||||
tarinai.bubble("\u738B", 2.4, "rgba(166,112,22,0.84)");
|
||||
tarinai.world?.log?.(`${tarinai.name}\u306F${itemLabel}\u306B\u89E6\u308C\u3066\u305F\u308A\u306A\u3044\u738B\u306B\u306A\u3063\u305F\u3002`, "event", { participants: [tarinai], sound: false });
|
||||
}
|
||||
global.TarinaiStructureLifecycle?.deleteItem?.(tarinai.world, it, { reason: `consumed-${it.type}`, userReason: `${itemLabel}が使われた`, wake: false, panicOwner: false });
|
||||
global.TarinaiStructureLifecycle?.deleteItem?.(tarinai.world, it, { reason: `consumed-${it.type}`, userReason: `${itemLabel}\u304C\u4F7F\u308F\u308C\u305F`, wake: false, panicOwner: false });
|
||||
tarinai.world?.recordFamily?.(tarinai);
|
||||
tarinai.world?.markFamilyTreeDirty?.(`consume-${it.type}`);
|
||||
if (global.uiCache) global.uiCache.selectedSnapshot = "";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue