地区显示优化

This commit is contained in:
milimoe 2025-08-12 01:09:27 +08:00
parent 547a8b3457
commit 93f7205a1f
Signed by: milimoe
GPG Key ID: 9554D37E4B8991D0
3 changed files with 13 additions and 9 deletions

View File

@ -50,7 +50,7 @@ namespace Oshima.FunGame.OshimaModules.Regions
builder.AppendLine($"☆--- {Name} ---☆"); builder.AppendLine($"☆--- {Name} ---☆");
builder.AppendLine($"编号:{Id}"); builder.AppendLine($"编号:{Id}");
builder.AppendLine($"天气:{Weather}"); builder.AppendLine($"天气:{Weather}");
builder.AppendLine($"温度:{Temperature} °C"); builder.AppendLine($"温度:{Temperature} ");
builder.AppendLine($"{Description}"); builder.AppendLine($"{Description}");
if (Characters.Count > 0) if (Characters.Count > 0)

View File

@ -9,7 +9,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
public override long Id => (long)MagicID.; public override long Id => (long)MagicID.;
public override string Name => "根源屏障"; public override string Name => "根源屏障";
public override string Description => string.Join("", Effects.Select(e => e.Description)); public override string Description => string.Join("", Effects.Select(e => e.Description));
public override string DispelDescription => "被驱散性:魔法免疫可弱驱散" + (Level > 4 ? $",技能免疫需强驱散" : ""); public override string DispelDescription => "被驱散性:可弱驱散";
public override double MPCost => Level > 0 ? 200 + (75 * (Level - 1)) : 200; public override double MPCost => Level > 0 ? 200 + (75 * (Level - 1)) : 200;
public override double CD => Level > 0 ? 120 - (3 * (Level - 1)) : 120; public override double CD => Level > 0 ? 120 - (3 * (Level - 1)) : 120;
public override double CastTime => Level > 0 ? 12 - (0.5 * (Level - 1)) : 12; public override double CastTime => Level > 0 ? 12 - (0.5 * (Level - 1)) : 12;

View File

@ -66,6 +66,7 @@ namespace Oshima.FunGame.OshimaServers.Model
} }
} }
List<string> winners = [];
foreach (Horse horse in horses) foreach (Horse horse in horses)
{ {
turnSteps[horse] = 0; turnSteps[horse] = 0;
@ -168,25 +169,28 @@ namespace Oshima.FunGame.OshimaServers.Model
if (horse.CurrentPosition >= maxLength) if (horse.CurrentPosition >= maxLength)
{ {
builder.AppendLine($"\r\n🎯 恭喜 [ {horse} ] 冲过终点线!它赢得了比赛!\r\n"); winners.Add(horse.Name);
builder.AppendLine($"\r\n🎯 [ {horse} ] 冲过终点线!\r\n");
raceFinished = true; raceFinished = true;
break;
} }
} }
builder.AppendLine("☆--- 赛道状况 ---☆"); builder.AppendLine("\r\n☆--- 赛道状况 ---☆");
for (int i = 0; i < horses.Count; i++) for (int i = 0; i < horses.Count; i++)
{ {
builder.AppendLine(GenerateTrackString(horses[i], i + 1, maxLength, turnSteps)); builder.AppendLine(GenerateTrackString(horses[i], i + 1, maxLength, turnSteps));
} }
msgs.Add($"{builder.ToString().Trim()}\r\n");
builder.Clear();
if (raceFinished) if (raceFinished)
{ {
builder.AppendLine($"\r\n🎯 赢家:[ {string.Join(" ] / [ ", winners)} ]");
msgs.Add($"{builder.ToString().Trim()}\r\n");
builder.Clear();
break; break;
} }
msgs.Add($"{builder.ToString().Trim()}\r\n");
builder.Clear();
} }
builder.Clear(); builder.Clear();
@ -205,7 +209,7 @@ namespace Oshima.FunGame.OshimaServers.Model
lastPosition = currentHorse.CurrentPosition; lastPosition = currentHorse.CurrentPosition;
horsesAtCurrentRankCount = 1; horsesAtCurrentRankCount = 1;
} }
else if (currentHorse.CurrentPosition == lastPosition) // 与前一匹马平局 else if (currentHorse.CurrentPosition == lastPosition || currentHorse.CurrentPosition >= maxLength) // 与前一匹马平局或都是冠军
{ {
horsesAtCurrentRankCount++; horsesAtCurrentRankCount++;
} }