继续完善标记功能

This commit is contained in:
unanmed 2022-12-29 00:38:42 +08:00
parent 9cb38820aa
commit 5afd1c399f

View File

@ -85,7 +85,14 @@ export function checkMarkedEnemy(noMessage: boolean = false) {
if (damage === -1) return; if (damage === -1) return;
const info = enemyDamageInfo[v]!; const info = enemyDamageInfo[v]!;
const name = core.material.enemys[v].name; 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) { if (!info[3] && !noMessage) {
message.success({ message.success({
content: `${name}的伤害已降至勇士生命值的1/3`, content: `${name}的伤害已降至勇士生命值的1/3`,
@ -115,6 +122,10 @@ export function checkMarkedEnemy(noMessage: boolean = false) {
info[1] = true; info[1] = true;
info[2] = false; info[2] = false;
info[3] = false; info[3] = false;
} else {
info[1] = false;
info[2] = false;
info[3] = false;
} }
}); });
} }