This commit is contained in:
33333-33333 2026-06-21 14:09:35 +09:00
commit 37087d08a7
189 changed files with 12864 additions and 9589 deletions

View file

@ -9,6 +9,7 @@ const HEALTH = (() => {
stress: "\u30b9\u30c8\u30ec\u30b9\u904e\u591a",
poke: "\u3064\u3064\u304b\u308c\u3059\u304e\u305f",
firecracker: "\u7206\u7af9",
genkotsu: "\u3052\u3093\u3053\u3064",
accident: "\u4e8b\u6545",
collision: "\u885d\u7a81",
outOfBounds: "\u4ed5\u69d8\u306b\u3088\u308a\u753b\u9762\u5916\u3067\u524a\u9664",
@ -18,6 +19,8 @@ const HEALTH = (() => {
fightDisease: "\u304d\u305a\u3064\u304d\u75c5",
zunchiDisease: "\u305a\u3093\u3061\u75c5",
antEaten: "\u30a2\u30ea\u306b\u98df\u3079\u3089\u308c\u305f",
giantDrug: "巨大薬",
dwarfDrug: "矮小薬",
});
const DISEASE_RE = /([^\u3001\u3002\s]+\u75c5)/;
@ -26,6 +29,9 @@ const HEALTH = (() => {
if (!text) return "";
if (text.includes(WEAKENED_SUFFIX)) return text.replace(/\u3067\u8870\u5f31.*$/, "");
if (/\u55a7\u5629|fight|headbutt/.test(text)) return CAUSES.fight;
if (/\u3052\u3093\u3053\u3064|genkotsu/.test(text)) return CAUSES.genkotsu;
if (/巨大薬|giant/.test(text)) return CAUSES.giantDrug;
if (/矮小薬|dwarf/.test(text)) return CAUSES.dwarfDrug;
if (/\u7206\u7af9|firecracker|explosion/.test(text)) return CAUSES.firecracker;
if (/\u4ed5\u69d8\u306b\u3088\u308a\u753b\u9762\u5916\u3067\u524a\u9664|\u753b\u9762\u5916\u3067\u524a\u9664|out.*bounds|offscreen/.test(text)) return CAUSES.outOfBounds;
if (/\u885d\u7a81|collision/.test(text)) return CAUSES.collision;
@ -108,7 +114,7 @@ const HEALTH = (() => {
if (text.includes(WEAKENED_SUFFIX)) return text;
const cause = dominantDeathCause(t, text, opts) || CAUSES.accident;
if (cause.includes(WEAKENED_SUFFIX)) return cause;
const canWeaken = cause && !cause.endsWith("\u75c5") && cause !== CAUSES.hunger && cause !== CAUSES.stress && cause !== CAUSES.lifespan && cause !== CAUSES.outOfBounds && cause !== CAUSES.collision;
const canWeaken = cause && !cause.endsWith("\u75c5") && cause !== CAUSES.hunger && cause !== CAUSES.stress && cause !== CAUSES.lifespan && cause !== CAUSES.outOfBounds && cause !== CAUSES.collision && cause !== CAUSES.genkotsu;
if (canWeaken && (opts.weakened || (hasRecentMajorDamage(t) && cause === t.lastMajorDamageCause))) return weakenedDeathReasonFor(cause);
return cause;
}
@ -122,6 +128,7 @@ const HEALTH = (() => {
if (actualLoss > 0.01) {
cause = rememberDamage(t, actualLoss, reason);
if (cause === CAUSES.fight || /\u55a7\u5629|fight/.test(String(reason || ""))) t.recordBleedExposure();
audio.damage?.(actualLoss);
if (t.sleepDisease) t.recoverSleepDisease("\u30c0\u30e1\u30fc\u30b8\u3067\u306d\u3080\u308a\u75c5\u304c\u6cbb\u3063\u305f");
if (t.wakeFromDamage) t.wakeFromDamage(cause || reason);
if (t.maybeBecomeTimidAfterDamage) t.maybeBecomeTimidAfterDamage(cause || reason);