fixed issueeessss
This commit is contained in:
parent
aea08dc3fb
commit
874911821f
20 changed files with 1947 additions and 897 deletions
17
js/health.js
17
js/health.js
|
|
@ -10,12 +10,12 @@ const HEALTH = (() => {
|
|||
poke: "\u3064\u3064\u304b\u308c\u3059\u304e\u305f",
|
||||
firecracker: "\u7206\u7af9",
|
||||
accident: "\u4e8b\u6545",
|
||||
collision: "衝突",
|
||||
outOfBounds: "仕様により画面外で削除",
|
||||
lifespan: "天寿を全うした",
|
||||
collision: "\u885d\u7a81",
|
||||
outOfBounds: "\u4ed5\u69d8\u306b\u3088\u308a\u753b\u9762\u5916\u3067\u524a\u9664",
|
||||
lifespan: "\u5929\u5bff\u3092\u5168\u3046\u3057\u305f",
|
||||
sleepDisease: "\u306d\u3080\u308a\u75c5",
|
||||
explosionDisease: "\u7206\u767a\u75c5",
|
||||
fightDisease: "きずつき病",
|
||||
fightDisease: "\u304d\u305a\u3064\u304d\u75c5",
|
||||
zunchiDisease: "\u305a\u3093\u3061\u75c5",
|
||||
});
|
||||
const DISEASE_RE = /([^\u3001\u3002\s]+\u75c5)/;
|
||||
|
|
@ -26,12 +26,12 @@ const HEALTH = (() => {
|
|||
if (text.includes(WEAKENED_SUFFIX)) return text.replace(/\u3067\u8870\u5f31.*$/, "");
|
||||
if (/\u55a7\u5629|fight|headbutt/.test(text)) return CAUSES.fight;
|
||||
if (/\u7206\u7af9|firecracker|explosion/.test(text)) return CAUSES.firecracker;
|
||||
if (/仕様により画面外で削除|画面外で削除|out.*bounds|offscreen/.test(text)) return CAUSES.outOfBounds;
|
||||
if (/衝突|collision/.test(text)) return CAUSES.collision;
|
||||
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;
|
||||
if (/\u3064\u3064\u304b\u308c|\u3064\u3064\u304d|poke/.test(text)) return CAUSES.poke;
|
||||
if (/\u306d\u3080\u308a\u75c5|sleep.*disease/.test(text)) return CAUSES.sleepDisease;
|
||||
if (/\u7206\u767a\u75c5|explosion.*disease/.test(text)) return CAUSES.explosionDisease;
|
||||
if (/\u3051\u3093\u304b\u75c5|喧嘩傷病|きずつき病|fight.*disease/.test(text)) return CAUSES.fightDisease;
|
||||
if (/\u3051\u3093\u304b\u75c5|\u304d\u305a\u3064\u304d\u75c5|fight.*disease/.test(text)) return CAUSES.fightDisease;
|
||||
if (/\u305a\u3093\u3061\u75c5|zunchi_sick|zunchi.*\u75c5/.test(text)) return CAUSES.zunchiDisease;
|
||||
if (/\u75c5/.test(text)) {
|
||||
const disease = text.match(DISEASE_RE);
|
||||
|
|
@ -40,7 +40,7 @@ const HEALTH = (() => {
|
|||
if (/\u98e2|\u7a7a\u8179|\u98df\u3079\u7269|hunger/.test(text)) return CAUSES.hunger;
|
||||
if (/\u30b9\u30c8\u30ec\u30b9|stress/.test(text)) return CAUSES.stress;
|
||||
if (/\u30dc\u30fc\u30eb|\u843d\u3061|\u843d\u4e0b|\u77f3|\u9053\u5177|\u4e8b\u6545|\u5f53\u305f|ball|drop|stone|accident/.test(text)) return CAUSES.accident;
|
||||
if (/\u5bff\u547d|天寿を全うした/.test(text)) return CAUSES.lifespan;
|
||||
if (/\u5bff\u547d|\u5929\u5bff/.test(text)) return CAUSES.lifespan;
|
||||
return "";
|
||||
}
|
||||
|
||||
|
|
@ -121,6 +121,7 @@ const HEALTH = (() => {
|
|||
cause = rememberDamage(t, actualLoss, reason);
|
||||
if (cause === CAUSES.fight || /\u55a7\u5629|fight/.test(String(reason || ""))) t.recordBleedExposure();
|
||||
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);
|
||||
t.showHpBar();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue