This commit is contained in:
33333-33333 2026-07-11 21:13:39 +09:00
commit d14550dad6
78 changed files with 2827 additions and 563 deletions

View file

@ -32,14 +32,16 @@ const HEALTH = (() => {
dwarfDrug: "\u77ee\u5c0f\u85ac",
freeze: "\u51CD\u7D50",
heatstroke: "\u71B1\u4E2D\u75C7",
cleaning: "掃除",
cleaning: "\u6383\u9664",
electrocution: "\u611f\u96fb",
});
const DISEASE_RE = /([^\u3001\u3002\s]+\u75c5)/;
function causeLabel(reason = "") {
const text = String(reason || "");
if (!text) return "";
if (/掃除|ロボ掃除機|robot.?cleaner|cleaned/.test(text)) return CAUSES.cleaning;
if (/\u6383\u9664|\u30ed\u30dc\u6383\u9664\u6a5f|robot.?cleaner|cleaned/.test(text)) return CAUSES.cleaning;
if (/\u611f\u96fb|\u901a\u96fb\u4e2d\u306e\u96fb\u7dda|electrocution|electric.?shock|shocked/i.test(text)) return CAUSES.electrocution;
if (text.includes(WEAKENED_SUFFIX)) return text.replace(/\u3067\u8870\u5f31.*$/, "");
if (/\u51CD\u7D50|\u4F4E\u6E29|\u5BD2\u3055|cold|freeze|freezing/i.test(text)) return CAUSES.freeze;
if (/\u71B1\u4E2D\u75C7|\u9AD8\u6E29|\u6691\u3055|heat|hot/i.test(text)) return CAUSES.heatstroke;
@ -273,6 +275,7 @@ const HEALTH = (() => {
const jitter = (Math.random() - 0.5) * Math.max(4, (t.radius || 22) * 0.25);
const x = t.x - side * (t.radius || 22) * (0.72 + Math.random() * 0.24);
const y = t.y + (t.radius || 22) * (0.24 + Math.random() * 0.25) + jitter;
// Damage-triggered release is involuntary and must never be redirected to a toilet.
t.world.spawnZunchi?.(x, y, t);
t.poopCount = (t.poopCount || 0) + 1;
t.digest = Math.max(0, Number(t.digest || 0) - 1.0);