From ae1135ce06207a1d947a38bdcc20e0681dc23715 Mon Sep 17 00:00:00 2001 From: milimoe Date: Mon, 5 Jan 2026 01:24:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=BB=E5=87=BB=E8=80=85=E7=9A=84=E7=94=9F?= =?UTF-8?q?=E5=91=BD=E5=81=B7=E5=8F=96=E5=92=8C=E8=83=BD=E9=87=8F=E4=B8=8D?= =?UTF-8?q?=E5=86=8D=E6=98=AF=E5=85=A8=E9=A2=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Model/GamingQueue.cs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Model/GamingQueue.cs b/Model/GamingQueue.cs index abc34d2..f5cfb94 100644 --- a/Model/GamingQueue.cs +++ b/Model/GamingQueue.cs @@ -2130,8 +2130,8 @@ namespace Milimoe.FunGame.Core.Model } WriteLine(strDamageMessage); - // 生命偷取,攻击者为全额 - double steal = damage * actor.Lifesteal; + // 生命偷取 + double steal = actualDamage * actor.Lifesteal; await HealToTargetAsync(actor, actor, steal, false); effects = [.. characters.SelectMany(c => c.Effects.Where(e => e.IsInEffect)).Distinct()]; foreach (Effect effect in effects) @@ -2139,8 +2139,8 @@ namespace Milimoe.FunGame.Core.Model effect.AfterLifesteal(actor, enemy, damage, steal); } - // 造成伤害和受伤都可以获得能量。攻击者为全额,被攻击者为 actualDamage,护盾抵消的伤害不算 - double ep = GetEP(damage, GameplayEquilibriumConstant.DamageGetEPFactor, GameplayEquilibriumConstant.DamageGetEPMax); + // 造成伤害和受伤都可以获得能量。护盾抵消的伤害不算 + double ep = GetEP(actualDamage, GameplayEquilibriumConstant.DamageGetEPFactor, GameplayEquilibriumConstant.DamageGetEPMax); if (ep > 0) { effects = [.. actor.Effects.Where(e => e.IsInEffect)]; @@ -2432,13 +2432,12 @@ namespace Milimoe.FunGame.Core.Model return; } - double realHeal = heal; if (target.HP > 0 || (isDead && canRespawn)) { // 用于数据统计,不能是全额,溢出的部分需要扣除 if (target.HP + heal > target.MaxHP) { - realHeal = target.MaxHP - target.HP; + heal = target.MaxHP - target.HP; } target.HP += heal; if (!LastRound.Heals.TryAdd(target, heal)) @@ -2475,7 +2474,7 @@ namespace Milimoe.FunGame.Core.Model // 统计数据 if (_stats.TryGetValue(actor, out CharacterStatistics? stats) && stats != null) { - stats.TotalHeal += realHeal; + stats.TotalHeal += heal; } await OnHealToTargetAsync(actor, target, heal, isRespawn);