diff --git a/Entity/Item/Item.cs b/Entity/Item/Item.cs
index 0358da2..16415fb 100644
--- a/Entity/Item/Item.cs
+++ b/Entity/Item/Item.cs
@@ -188,7 +188,7 @@ namespace Milimoe.FunGame.Core.Entity
/// 所属的玩家
///
public User? User { get; set; } = null;
-
+
///
/// 物品拥有的技能
///
@@ -650,6 +650,10 @@ namespace Milimoe.FunGame.Core.Entity
item.Skills.Magics.Add(newskill);
}
}
+ foreach (string key in itemDefined.Others.Keys)
+ {
+ item.Others[key] = itemDefined.Others[key];
+ }
return item;
}
diff --git a/Entity/System/Region.cs b/Entity/System/Region.cs
index 41caffb..fbd69a5 100644
--- a/Entity/System/Region.cs
+++ b/Entity/System/Region.cs
@@ -11,6 +11,7 @@ namespace Milimoe.FunGame.Core.Entity
public HashSet Characters { get; } = [];
public HashSet Units { get; } = [];
public HashSet- Crops { get; } = [];
+ public HashSet
- Items { get; } = [];
public string Weather { get; set; } = "";
public int Temperature { get; set; } = 15;
public Dictionary Weathers { get; } = [];
@@ -53,19 +54,31 @@ namespace Milimoe.FunGame.Core.Entity
if (Characters.Count > 0)
{
builder.AppendLine($"== 头目 ==");
- builder.AppendLine(string.Join(",", Characters.Select(o => o.Name)));
+ builder.AppendLine(string.Join(",", Characters.Select(c => c.Name)));
}
if (Units.Count > 0)
{
builder.AppendLine($"== 生物 ==");
- builder.AppendLine(string.Join(",", Units.Select(o => o.Name)));
+ builder.AppendLine(string.Join(",", Units.Select(u => u.Name)));
}
if (Crops.Count > 0)
{
builder.AppendLine($"== 作物 ==");
- builder.AppendLine(string.Join(",", Crops.Select(c => c.Name)));
+ builder.AppendLine(string.Join(",", Crops.Select(c => c.Name + (c.Description != "" ? $":{c.Description}" : "") + (c.BackgroundStory != "" ? $"\"{c.BackgroundStory}\"" : ""))));
+ }
+
+ if (Items.Count > 0)
+ {
+ builder.AppendLine($"== 掉落 ==");
+ builder.AppendLine(string.Join(",", Items.Select(i =>
+ {
+ string itemquality = ItemSet.GetQualityTypeName(i.QualityType);
+ string itemtype = ItemSet.GetItemTypeName(i.ItemType) + (i.ItemType == ItemType.Weapon && i.WeaponType != WeaponType.None ? "-" + ItemSet.GetWeaponTypeName(i.WeaponType) : "");
+ if (itemtype != "") itemtype = $"|{itemtype}";
+ return $"[{itemquality + itemtype}]{i.Name}";
+ })));
}
builder.AppendLine($"探索难度:{CharacterSet.GetRarityTypeName(Difficulty)}");
diff --git a/Model/GamingQueue.cs b/Model/GamingQueue.cs
index 4d1c828..906dcf4 100644
--- a/Model/GamingQueue.cs
+++ b/Model/GamingQueue.cs
@@ -290,6 +290,15 @@ namespace Milimoe.FunGame.Core.Model
_original.Add(original.Guid, original);
}
+ // 完全初始化
+ foreach (Character character in _allCharacters)
+ {
+ // 添加统计数据
+ _stats[character] = new();
+ // 添加助攻对象
+ _assistDetail[character] = new AssistDetail(character, _allCharacters.Where(c => c != character));
+ }
+
// 获取 HP 小于等于 0 的角色
List deadCharacters = [.. characters.Where(c => c.HP <= 0)];
foreach (Character death in deadCharacters)
@@ -325,8 +334,6 @@ namespace Milimoe.FunGame.Core.Model
// 如果只有一个角色,直接加入队列
Character character = group.First();
AddCharacter(character, Calculation.Round2Digits(_queue.Count * 0.1), false);
- _assistDetail.Add(character, new AssistDetail(character, _allCharacters.Where(c => c != character)));
- _stats.Add(character, new());
// 初始化技能
foreach (Skill skill in character.Skills)
{
@@ -379,8 +386,6 @@ namespace Milimoe.FunGame.Core.Model
if (selectedCharacter != null)
{
AddCharacter(selectedCharacter, Calculation.Round2Digits(_queue.Count * 0.1), false);
- _assistDetail.Add(selectedCharacter, new AssistDetail(selectedCharacter, _allCharacters.Where(c => c != selectedCharacter)));
- _stats.Add(selectedCharacter, new());
// 初始化技能
foreach (Skill skill in selectedCharacter.Skills)
{