From ddea8ca367b0225a873c393ce46da7322a11346f Mon Sep 17 00:00:00 2001 From: milimoe Date: Mon, 28 Apr 2025 00:23:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=AD=BB=E4=BA=A1=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Entity/Character/Character.cs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Entity/Character/Character.cs b/Entity/Character/Character.cs index 9040926..f9c6d13 100644 --- a/Entity/Character/Character.cs +++ b/Entity/Character/Character.cs @@ -1336,7 +1336,7 @@ namespace Milimoe.FunGame.Core.Entity { StringBuilder builder = new(); - builder.AppendLine(showUser ? ToStringWithLevel() : ToStringWithLevelWithOutUser()); + builder.AppendLine((HP == 0 ? "[ 死亡 ] " : "") + (showUser ? ToStringWithLevel() : ToStringWithLevelWithOutUser())); if (showEXP) { builder.AppendLine($"等级:{Level} / {GameplayEquilibriumConstant.MaxLevel}(突破进度:{LevelBreak + 1} / {GameplayEquilibriumConstant.LevelBreakList.Count})"); @@ -1454,11 +1454,11 @@ namespace Milimoe.FunGame.Core.Entity builder.AppendLine("== 状态栏 =="); foreach (Effect effect in effects) { - builder.Append(effect.ToString()); + builder.AppendLine(effect.ToString()); } } - return builder.ToString(); + return builder.ToString().Trim(); } /// @@ -1469,7 +1469,7 @@ namespace Milimoe.FunGame.Core.Entity { StringBuilder builder = new(); - builder.AppendLine(showUser ? ToStringWithLevel() : ToStringWithLevelWithOutUser()); + builder.AppendLine((HP == 0 ? "[ 死亡 ] " : "") + (showUser ? ToStringWithLevel() : ToStringWithLevelWithOutUser())); if (showEXP) { builder.AppendLine($"等级:{Level} / {GameplayEquilibriumConstant.MaxLevel}(突破进度:{LevelBreak + 1} / {GameplayEquilibriumConstant.LevelBreakList.Count})"); @@ -1581,7 +1581,7 @@ namespace Milimoe.FunGame.Core.Entity { StringBuilder builder = new(); - builder.AppendLine(ToStringWithLevel()); + builder.AppendLine((HP == 0 ? "[ 死亡 ] " : "") + ToStringWithLevel()); double exHP = ExHP + ExHP2 + ExHP3; List shield = []; if (Shield.TotalPhysical > 0) shield.Add($"物理:{Shield.TotalPhysical:0.##}"); @@ -1617,11 +1617,11 @@ namespace Milimoe.FunGame.Core.Entity builder.AppendLine("== 状态栏 =="); foreach (Effect effect in effects) { - builder.Append(effect.ToString()); + builder.AppendLine(effect.ToString()); } } - return builder.ToString(); + return builder.ToString().Trim(); } /// @@ -1633,7 +1633,7 @@ namespace Milimoe.FunGame.Core.Entity { StringBuilder builder = new(); - builder.AppendLine(ToStringWithLevel()); + builder.AppendLine((HP == 0 ? "[ 死亡 ] " : "") + ToStringWithLevel()); double exHP = ExHP + ExHP2 + ExHP3; List shield = []; if (Shield.TotalPhysical > 0) shield.Add($"物理:{Shield.TotalPhysical:0.##}"); @@ -1665,7 +1665,7 @@ namespace Milimoe.FunGame.Core.Entity { StringBuilder builder = new(); - builder.AppendLine(showUser ? ToStringWithLevel() : ToStringWithLevelWithOutUser()); + builder.AppendLine((HP == 0 ? "[ 死亡 ] " : "") + (showUser ? ToStringWithLevel() : ToStringWithLevelWithOutUser())); if (CharacterState != CharacterState.Actionable) { @@ -1700,11 +1700,11 @@ namespace Milimoe.FunGame.Core.Entity builder.AppendLine("== 状态栏 =="); foreach (Effect effect in effects) { - builder.Append(effect.ToString()); + builder.AppendLine(effect.ToString()); } } - return builder.ToString(); + return builder.ToString().Trim(); } /// @@ -1715,7 +1715,7 @@ namespace Milimoe.FunGame.Core.Entity { StringBuilder builder = new(); - builder.AppendLine(showUser ? ToStringWithLevel() : ToStringWithLevelWithOutUser()); + builder.AppendLine((HP == 0 ? "[ 死亡 ] " : "") + (showUser ? ToStringWithLevel() : ToStringWithLevelWithOutUser())); if (showEXP) { builder.AppendLine($"等级:{Level} / {GameplayEquilibriumConstant.MaxLevel}(突破进度:{LevelBreak + 1} / {GameplayEquilibriumConstant.LevelBreakList.Count})");