更新查物品、列表、技能

This commit is contained in:
milimoe 2024-11-12 00:52:51 +08:00
parent 7a7218f062
commit 1813dca1fa
Signed by: milimoe
GPG Key ID: 05D280912DA6C69E
5 changed files with 19 additions and 32 deletions

View File

@ -437,7 +437,7 @@ namespace Oshima.Core.Controllers
[HttpGet("cwp")] [HttpGet("cwp")]
public string GetItemInfo([FromQuery] long? id = null) public string GetItemInfo([FromQuery] long? id = null)
{ {
IEnumerable<Item> items = FunGameSimulation.Items; IEnumerable<Item> items = FunGameSimulation.Equipment;
if (id != null) if (id != null)
{ {
List<string> msg = []; List<string> msg = [];
@ -445,7 +445,7 @@ namespace Oshima.Core.Controllers
if (i != null) if (i != null)
{ {
i.SetLevel(1); i.SetLevel(1);
msg.Add(i.ToString()); msg.Add(i.ToString(false, true));
} }
return NetworkUtility.JsonSerialize(string.Join("\r\n\r\n", msg)); return NetworkUtility.JsonSerialize(string.Join("\r\n\r\n", msg));

View File

@ -15,6 +15,7 @@ namespace Oshima.Core.Utils
public static List<Character> Characters { get; } = []; public static List<Character> Characters { get; } = [];
public static List<Skill> Skills { get; } = []; public static List<Skill> Skills { get; } = [];
public static List<Skill> Magics { get; } = []; public static List<Skill> Magics { get; } = [];
public static List<Item> Equipment { get; } = [];
public static List<Item> Items { get; } = []; public static List<Item> Items { get; } = [];
public static Dictionary<Character, CharacterStatistics> CharacterStatistics { get; } = []; public static Dictionary<Character, CharacterStatistics> CharacterStatistics { get; } = [];
public static Dictionary<Character, CharacterStatistics> TeamCharacterStatistics { get; } = []; public static Dictionary<Character, CharacterStatistics> TeamCharacterStatistics { get; } = [];
@ -502,7 +503,7 @@ namespace Oshima.Core.Utils
if (roundMsg != "") if (roundMsg != "")
{ {
if (isWeb) if ((isTeam && deathMatchRoundDetail || !isTeam) && isWeb)
{ {
roundMsg += "\r\n" + Msg; roundMsg += "\r\n" + Msg;
} }
@ -727,10 +728,10 @@ namespace Oshima.Core.Utils
WriteLine($"社区送温暖了,现在随机发放空投!!"); WriteLine($"社区送温暖了,现在随机发放空投!!");
foreach (Character character in queue.Queue) foreach (Character character in queue.Queue)
{ {
Item[] = Items.Where(i => i.Id.ToString().StartsWith("11") && (int)i.QualityType == wQuality).ToArray(); Item[] = Equipment.Where(i => i.Id.ToString().StartsWith("11") && (int)i.QualityType == wQuality).ToArray();
Item[] = Items.Where(i => i.Id.ToString().StartsWith("12") && (int)i.QualityType == aQuality).ToArray(); Item[] = Equipment.Where(i => i.Id.ToString().StartsWith("12") && (int)i.QualityType == aQuality).ToArray();
Item[] = Items.Where(i => i.Id.ToString().StartsWith("13") && (int)i.QualityType == sQuality).ToArray(); Item[] = Equipment.Where(i => i.Id.ToString().StartsWith("13") && (int)i.QualityType == sQuality).ToArray();
Item[] = Items.Where(i => i.Id.ToString().StartsWith("14") && (int)i.QualityType == acQuality).ToArray(); Item[] = Equipment.Where(i => i.Id.ToString().StartsWith("14") && (int)i.QualityType == acQuality).ToArray();
Item? a = null, b = null, c = null, d = null; Item? a = null, b = null, c = null, d = null;
if (.Length > 0) if (.Length > 0)
{ {
@ -808,8 +809,10 @@ namespace Oshima.Core.Utils
} }
Dictionary<string, Item> exItems = Factory.GetGameModuleInstances<Item>(OshimaGameModuleConstant.General, OshimaGameModuleConstant.Item); Dictionary<string, Item> exItems = Factory.GetGameModuleInstances<Item>(OshimaGameModuleConstant.General, OshimaGameModuleConstant.Item);
Items.AddRange(exItems.Values); Equipment.AddRange(exItems.Values.Where(i => (int)i.ItemType >= 0 && (int)i.ItemType < 5));
Items.AddRange([new 10(), new 30(), new 50()]); Equipment.AddRange([new 10(), new 30(), new 50()]);
Items.AddRange(exItems.Values.Where(i => (int)i.ItemType > 4));
Skills.AddRange([new ()]); Skills.AddRange([new ()]);
@ -821,7 +824,7 @@ namespace Oshima.Core.Utils
Characters.Clear(); Characters.Clear();
CharacterStatistics.Clear(); CharacterStatistics.Clear();
TeamCharacterStatistics.Clear(); TeamCharacterStatistics.Clear();
Items.Clear(); Equipment.Clear();
Skills.Clear(); Skills.Clear();
Magics.Clear(); Magics.Clear();

View File

@ -43,7 +43,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
break; break;
case MagicType.None: case MagicType.None:
default: default:
character.MDF.SetAllValue(, false); character.MDF.AddAllValue();
break; break;
} }
} }
@ -78,7 +78,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
break; break;
case MagicType.None: case MagicType.None:
default: default:
character.MDF.SetAllValue(-, false); character.MDF.AddAllValue(-);
break; break;
} }
} }

View File

@ -52,29 +52,13 @@ namespace Oshima.FunGame.OshimaModules.Skills
{ {
= true; = true;
character.ExEvadeRate += ; character.ExEvadeRate += ;
character.MDF.None += ; character.MDF.AddAllValue();
character.MDF.Particle += ;
character.MDF.Fleabane += ;
character.MDF.Element += ;
character.MDF.Shadow += ;
character.MDF.Bright += ;
character.MDF.PurityContemporary += ;
character.MDF.PurityNatural += ;
character.MDF.Starmark += ;
} }
else else
{ {
= false; = false;
character.ExEvadeRate -= ; character.ExEvadeRate -= ;
character.MDF.None -= ; character.MDF.AddAllValue(-);
character.MDF.Particle -= ;
character.MDF.Fleabane -= ;
character.MDF.Element -= ;
character.MDF.Shadow -= ;
character.MDF.Bright -= ;
character.MDF.PurityContemporary -= ;
character.MDF.PurityNatural -= ;
character.MDF.Starmark -= ;
} }
} }

View File

@ -41,7 +41,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
= ; = ;
= ; = ;
character.ExPDR += ; character.ExPDR += ;
character.MDF.SetAllValue(, false); character.MDF.AddAllValue();
WriteLine($"[ {character} ] 提升了 {实际物理伤害减免 * 100:0.##}% 物理伤害减免,{实际魔法抗性 * 100:0.##}% 魔法抗性!!"); WriteLine($"[ {character} ] 提升了 {实际物理伤害减免 * 100:0.##}% 物理伤害减免,{实际魔法抗性 * 100:0.##}% 魔法抗性!!");
} }
@ -49,7 +49,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
{ {
character.NormalAttack.SetMagicType(false, character.MagicType); character.NormalAttack.SetMagicType(false, character.MagicType);
character.ExPDR -= ; character.ExPDR -= ;
character.MDF.SetAllValue(-, false); character.MDF.AddAllValue(-);
= 0; = 0;
= 0; = 0;
} }