From 1813dca1faa40d72bad3c3d18e3b4dca03e5c3fa Mon Sep 17 00:00:00 2001 From: milimoe Date: Tue, 12 Nov 2024 00:52:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=9F=A5=E7=89=A9=E5=93=81?= =?UTF-8?q?=E3=80=81=E5=88=97=E8=A1=A8=E3=80=81=E6=8A=80=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OshimaCore/Controllers/FunGameController.cs | 4 ++-- OshimaCore/Utils/FunGameUtil.cs | 19 +++++++++++-------- OshimaModules/Effects/OpenEffects/ExMDF.cs | 4 ++-- OshimaModules/Skills/NiuNan/智慧与力量.cs | 20 ++------------------ OshimaModules/Skills/QWQAQW/迅捷之势.cs | 4 ++-- 5 files changed, 19 insertions(+), 32 deletions(-) diff --git a/OshimaCore/Controllers/FunGameController.cs b/OshimaCore/Controllers/FunGameController.cs index 86519b4..5d02980 100644 --- a/OshimaCore/Controllers/FunGameController.cs +++ b/OshimaCore/Controllers/FunGameController.cs @@ -437,7 +437,7 @@ namespace Oshima.Core.Controllers [HttpGet("cwp")] public string GetItemInfo([FromQuery] long? id = null) { - IEnumerable items = FunGameSimulation.Items; + IEnumerable items = FunGameSimulation.Equipment; if (id != null) { List msg = []; @@ -445,7 +445,7 @@ namespace Oshima.Core.Controllers if (i != null) { i.SetLevel(1); - msg.Add(i.ToString()); + msg.Add(i.ToString(false, true)); } return NetworkUtility.JsonSerialize(string.Join("\r\n\r\n", msg)); diff --git a/OshimaCore/Utils/FunGameUtil.cs b/OshimaCore/Utils/FunGameUtil.cs index 885382c..c41b452 100644 --- a/OshimaCore/Utils/FunGameUtil.cs +++ b/OshimaCore/Utils/FunGameUtil.cs @@ -15,6 +15,7 @@ namespace Oshima.Core.Utils public static List Characters { get; } = []; public static List Skills { get; } = []; public static List Magics { get; } = []; + public static List Equipment { get; } = []; public static List Items { get; } = []; public static Dictionary CharacterStatistics { get; } = []; public static Dictionary TeamCharacterStatistics { get; } = []; @@ -502,7 +503,7 @@ namespace Oshima.Core.Utils if (roundMsg != "") { - if (isWeb) + if ((isTeam && deathMatchRoundDetail || !isTeam) && isWeb) { roundMsg += "\r\n" + Msg; } @@ -727,10 +728,10 @@ namespace Oshima.Core.Utils WriteLine($"社区送温暖了,现在随机发放空投!!"); foreach (Character character in queue.Queue) { - Item[] 武器 = Items.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[] 鞋子 = Items.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("11") && (int)i.QualityType == wQuality).ToArray(); + Item[] 防具 = Equipment.Where(i => i.Id.ToString().StartsWith("12") && (int)i.QualityType == aQuality).ToArray(); + Item[] 鞋子 = Equipment.Where(i => i.Id.ToString().StartsWith("13") && (int)i.QualityType == sQuality).ToArray(); + Item[] 饰品 = Equipment.Where(i => i.Id.ToString().StartsWith("14") && (int)i.QualityType == acQuality).ToArray(); Item? a = null, b = null, c = null, d = null; if (武器.Length > 0) { @@ -808,8 +809,10 @@ namespace Oshima.Core.Utils } Dictionary exItems = Factory.GetGameModuleInstances(OshimaGameModuleConstant.General, OshimaGameModuleConstant.Item); - Items.AddRange(exItems.Values); - Items.AddRange([new 攻击之爪10(), new 攻击之爪30(), new 攻击之爪50()]); + Equipment.AddRange(exItems.Values.Where(i => (int)i.ItemType >= 0 && (int)i.ItemType < 5)); + Equipment.AddRange([new 攻击之爪10(), new 攻击之爪30(), new 攻击之爪50()]); + + Items.AddRange(exItems.Values.Where(i => (int)i.ItemType > 4)); Skills.AddRange([new 疾风步()]); @@ -821,7 +824,7 @@ namespace Oshima.Core.Utils Characters.Clear(); CharacterStatistics.Clear(); TeamCharacterStatistics.Clear(); - Items.Clear(); + Equipment.Clear(); Skills.Clear(); Magics.Clear(); diff --git a/OshimaModules/Effects/OpenEffects/ExMDF.cs b/OshimaModules/Effects/OpenEffects/ExMDF.cs index 0c3a124..95b825b 100644 --- a/OshimaModules/Effects/OpenEffects/ExMDF.cs +++ b/OshimaModules/Effects/OpenEffects/ExMDF.cs @@ -43,7 +43,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects break; case MagicType.None: default: - character.MDF.SetAllValue(实际加成, false); + character.MDF.AddAllValue(实际加成); break; } } @@ -78,7 +78,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects break; case MagicType.None: default: - character.MDF.SetAllValue(-实际加成, false); + character.MDF.AddAllValue(-实际加成); break; } } diff --git a/OshimaModules/Skills/NiuNan/智慧与力量.cs b/OshimaModules/Skills/NiuNan/智慧与力量.cs index 913a6d0..1b80d51 100644 --- a/OshimaModules/Skills/NiuNan/智慧与力量.cs +++ b/OshimaModules/Skills/NiuNan/智慧与力量.cs @@ -52,29 +52,13 @@ namespace Oshima.FunGame.OshimaModules.Skills { 已经加过 = true; character.ExEvadeRate += 实际增加闪避率; - character.MDF.None += 实际增加魔法抗性; - character.MDF.Particle += 实际增加魔法抗性; - character.MDF.Fleabane += 实际增加魔法抗性; - character.MDF.Element += 实际增加魔法抗性; - character.MDF.Shadow += 实际增加魔法抗性; - character.MDF.Bright += 实际增加魔法抗性; - character.MDF.PurityContemporary += 实际增加魔法抗性; - character.MDF.PurityNatural += 实际增加魔法抗性; - character.MDF.Starmark += 实际增加魔法抗性; + character.MDF.AddAllValue(实际增加魔法抗性); } else { 已经加过 = false; character.ExEvadeRate -= 实际增加闪避率; - character.MDF.None -= 实际增加魔法抗性; - character.MDF.Particle -= 实际增加魔法抗性; - character.MDF.Fleabane -= 实际增加魔法抗性; - character.MDF.Element -= 实际增加魔法抗性; - character.MDF.Shadow -= 实际增加魔法抗性; - character.MDF.Bright -= 实际增加魔法抗性; - character.MDF.PurityContemporary -= 实际增加魔法抗性; - character.MDF.PurityNatural -= 实际增加魔法抗性; - character.MDF.Starmark -= 实际增加魔法抗性; + character.MDF.AddAllValue(-实际增加魔法抗性); } } diff --git a/OshimaModules/Skills/QWQAQW/迅捷之势.cs b/OshimaModules/Skills/QWQAQW/迅捷之势.cs index b055d87..ec73d51 100644 --- a/OshimaModules/Skills/QWQAQW/迅捷之势.cs +++ b/OshimaModules/Skills/QWQAQW/迅捷之势.cs @@ -41,7 +41,7 @@ namespace Oshima.FunGame.OshimaModules.Skills 实际物理伤害减免 = 物理伤害减免; 实际魔法抗性 = 魔法抗性; character.ExPDR += 实际物理伤害减免; - character.MDF.SetAllValue(实际魔法抗性, false); + character.MDF.AddAllValue(实际魔法抗性); WriteLine($"[ {character} ] 提升了 {实际物理伤害减免 * 100:0.##}% 物理伤害减免,{实际魔法抗性 * 100:0.##}% 魔法抗性!!"); } @@ -49,7 +49,7 @@ namespace Oshima.FunGame.OshimaModules.Skills { character.NormalAttack.SetMagicType(false, character.MagicType); character.ExPDR -= 实际物理伤害减免; - character.MDF.SetAllValue(-实际魔法抗性, false); + character.MDF.AddAllValue(-实际魔法抗性); 实际物理伤害减免 = 0; 实际魔法抗性 = 0; }