From 5afd1c399fa37ead1fdbac1acca56e106bea8d0a Mon Sep 17 00:00:00 2001 From: unanmed <1319491857@qq.com> Date: Thu, 29 Dec 2022 00:38:42 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=A7=E7=BB=AD=E5=AE=8C=E5=96=84=E6=A0=87?= =?UTF-8?q?=E8=AE=B0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugin/mark.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/plugin/mark.ts b/src/plugin/mark.ts index 21100ca..4254d83 100644 --- a/src/plugin/mark.ts +++ b/src/plugin/mark.ts @@ -85,7 +85,14 @@ export function checkMarkedEnemy(noMessage: boolean = false) { if (damage === -1) return; const info = enemyDamageInfo[v]!; const name = core.material.enemys[v].name; - if (damage < hp / 3) { + if (damage < 0) { + if (!noMessage) { + message.success({ + content: `${name}已经负伤了!`, + class: 'antdv-message' + }); + } + } else if (damage < hp / 3) { if (!info[3] && !noMessage) { message.success({ content: `${name}的伤害已降至勇士生命值的1/3!`, @@ -115,6 +122,10 @@ export function checkMarkedEnemy(noMessage: boolean = false) { info[1] = true; info[2] = false; info[3] = false; + } else { + info[1] = false; + info[2] = false; + info[3] = false; } }); }