fix: 非伤害性助攻不生效

Signed-off-by: 风吹落的叶子 <yezi@wrss.org>
This commit is contained in:
风吹落的叶子 2025-05-13 17:05:26 +08:00
parent 82538b9d93
commit 4f77f5bf7d

View File

@ -1640,10 +1640,10 @@ namespace Milimoe.FunGame.Core.Model
_stats[death].Deaths += 1;
int money = Random.Shared.Next(250, 350);
// 按伤害比分配金钱 只有造成 10% 伤害以上并且是在 30 内造成的伤害才能参与
// 现在 20 内的非伤害类型辅助也能参与助攻了
Character[] assists = [.. _assistDetail.Keys.Where(c => c != death && _assistDetail[c].GetPercentage(death) > 0.10 &&
(_assistDetail[c].GetLastTime(death) - TotalTime <= 30 || _assistDetail[c].GetNotDamageAssistLastTime(killer) - TotalTime <= 20))];
// 按伤害比分配金钱 只有造成 10% 伤害以上并且是在 30 时间内造成的伤害才能参与
// 现在 20 时间内的非伤害类型辅助也能参与助攻了
Character[] assists = [.. _assistDetail.Keys.Where(c => c != death && (_assistDetail[c].GetPercentage(death) > 0.10 &&
(_assistDetail[c].GetLastTime(death) - TotalTime <= 30) || (_assistDetail[c].GetNotDamageAssistLastTime(killer) - TotalTime <= 20)))];
double totalDamagePercentage = _assistDetail.Keys.Where(assists.Contains).Select(c => _assistDetail[c].GetPercentage(death)).Sum();
int totalMoney = Math.Min(Convert.ToInt32(money * totalDamagePercentage), 425); // 防止刷伤害设置金钱上限