From 775c90c594ce9c00211565c7d9dd019e5a1efd35 Mon Sep 17 00:00:00 2001 From: milimoe Date: Wed, 23 Oct 2024 00:10:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=A8=E6=80=81=E6=89=A9?= =?UTF-8?q?=E5=B1=95=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Library/Effects/ItemEffects/冷却缩减加成.cs | 2 +- .../Effects/ItemEffects/技能硬直时间减少.cs | 2 +- Library/Effects/ItemEffects/攻击力加成.cs | 2 +- .../Effects/ItemEffects/普攻硬直时间减少.cs | 2 +- Library/Effects/ItemEffects/物理护甲加成.cs | 2 +- Library/Effects/OpenEffects/ExATK.cs | 42 +++ Library/Effects/OpenEffects/ExDEF.cs | 42 +++ Library/Effects/OpenEffects/ExSTR.cs | 42 +++ Library/Effects/眩晕.cs | 2 +- Library/Effects/累积之压标记.cs | 2 +- Library/FunGame.Testing.csproj | 8 + Library/Main.cs | 2 +- Library/Skills/XinYin/心灵之火.cs | 4 +- Library/Solutions/TestPlugin.cs | 2 +- Library/Tests/FunGame.cs | 33 +-- Library/Tests/SkillJSONTest.cs | 239 ++++++++++++++++++ 16 files changed, 401 insertions(+), 27 deletions(-) create mode 100644 Library/Effects/OpenEffects/ExATK.cs create mode 100644 Library/Effects/OpenEffects/ExDEF.cs create mode 100644 Library/Effects/OpenEffects/ExSTR.cs create mode 100644 Library/Tests/SkillJSONTest.cs diff --git a/Library/Effects/ItemEffects/冷却缩减加成.cs b/Library/Effects/ItemEffects/冷却缩减加成.cs index ac4d6c1..cfdd5e8 100644 --- a/Library/Effects/ItemEffects/冷却缩减加成.cs +++ b/Library/Effects/ItemEffects/冷却缩减加成.cs @@ -26,7 +26,7 @@ namespace Milimoe.FunGame.Testing.Effects public 冷却缩减加成(Skill skill, Character? source, Item? item, double exCdr) : base(skill) { - ActionQueue = skill.ActionQueue; + GamingQueue = skill.GamingQueue; Source = source; Item = item; 实际冷却缩减加成 = exCdr; diff --git a/Library/Effects/ItemEffects/技能硬直时间减少.cs b/Library/Effects/ItemEffects/技能硬直时间减少.cs index 59a11d0..c4dc6b5 100644 --- a/Library/Effects/ItemEffects/技能硬直时间减少.cs +++ b/Library/Effects/ItemEffects/技能硬直时间减少.cs @@ -43,7 +43,7 @@ namespace Milimoe.FunGame.Testing.Effects public 技能硬直时间减少(Skill skill, Character? source, Item? item, double reduce) : base(skill) { - ActionQueue = skill.ActionQueue; + GamingQueue = skill.GamingQueue; Source = source; Item = item; 实际硬直时间减少 = reduce; diff --git a/Library/Effects/ItemEffects/攻击力加成.cs b/Library/Effects/ItemEffects/攻击力加成.cs index d0e8b7c..10afe56 100644 --- a/Library/Effects/ItemEffects/攻击力加成.cs +++ b/Library/Effects/ItemEffects/攻击力加成.cs @@ -26,7 +26,7 @@ namespace Milimoe.FunGame.Testing.Effects public 攻击力加成(Skill skill, Character? source, Item? item, double exATK) : base(skill) { - ActionQueue = skill.ActionQueue; + GamingQueue = skill.GamingQueue; Source = source; Item = item; 实际攻击力加成 = exATK; diff --git a/Library/Effects/ItemEffects/普攻硬直时间减少.cs b/Library/Effects/ItemEffects/普攻硬直时间减少.cs index 5c1e2e1..361d739 100644 --- a/Library/Effects/ItemEffects/普攻硬直时间减少.cs +++ b/Library/Effects/ItemEffects/普攻硬直时间减少.cs @@ -27,7 +27,7 @@ namespace Milimoe.FunGame.Testing.Effects public 普攻硬直时间减少(Skill skill, Character? source, Item? item, double reduce) : base(skill) { - ActionQueue = skill.ActionQueue; + GamingQueue = skill.GamingQueue; Source = source; Item = item; 实际硬直时间减少 = reduce; diff --git a/Library/Effects/ItemEffects/物理护甲加成.cs b/Library/Effects/ItemEffects/物理护甲加成.cs index 84c520e..aa2781e 100644 --- a/Library/Effects/ItemEffects/物理护甲加成.cs +++ b/Library/Effects/ItemEffects/物理护甲加成.cs @@ -26,7 +26,7 @@ namespace Milimoe.FunGame.Testing.Effects public 物理护甲加成(Skill skill, Character? source, Item? item, double exDef) : base(skill) { - ActionQueue = skill.ActionQueue; + GamingQueue = skill.GamingQueue; Source = source; Item = item; 实际物理护甲加成 = exDef; diff --git a/Library/Effects/OpenEffects/ExATK.cs b/Library/Effects/OpenEffects/ExATK.cs new file mode 100644 index 0000000..6b91089 --- /dev/null +++ b/Library/Effects/OpenEffects/ExATK.cs @@ -0,0 +1,42 @@ +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Constant; + +namespace Milimoe.FunGame.Testing.Effects +{ + public class ExATK : Effect + { + public override long Id => 8001; + public override string Name => "攻击力加成"; + public override string Description => $"增加角色 {实际攻击力加成} 点攻击力。" + (!TargetSelf ? $"来自:[ {Source} ]" + (Item != null ? $" 的 [ {Item.Name} ]" : "") : ""); + public override EffectType EffectType => EffectType.Item; + public override bool TargetSelf => true; + + public Item? Item { get; } + private readonly double 实际攻击力加成 = 0; + + public override void OnEffectGained(Character character) + { + character.ExATK2 += 实际攻击力加成; + } + + public override void OnEffectLost(Character character) + { + character.ExATK2 -= 实际攻击力加成; + } + + public ExATK(Skill skill, Character? source, Item? item) : base(skill) + { + GamingQueue = skill.GamingQueue; + Source = source; + Item = item; + if (skill.OtherArgs.Count > 0) + { + IEnumerable keys = skill.OtherArgs.Keys.Where(s => s.Equals("exatk", StringComparison.CurrentCultureIgnoreCase)); + if (keys.Any() && double.TryParse(skill.OtherArgs[keys.First()].ToString(), out double exATK)) + { + 实际攻击力加成 = exATK; + } + } + } + } +} diff --git a/Library/Effects/OpenEffects/ExDEF.cs b/Library/Effects/OpenEffects/ExDEF.cs new file mode 100644 index 0000000..55b3d0e --- /dev/null +++ b/Library/Effects/OpenEffects/ExDEF.cs @@ -0,0 +1,42 @@ +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Constant; + +namespace Milimoe.FunGame.Testing.Effects +{ + public class ExDEF : Effect + { + public override long Id => 8002; + public override string Name => "物理护甲加成"; + public override string Description => $"增加角色 {实际物理护甲加成} 点物理护甲。" + (!TargetSelf ? $"来自:[ {Source} ]" + (Item != null ? $" 的 [ {Item.Name} ]" : "") : ""); + public override EffectType EffectType => EffectType.Item; + public override bool TargetSelf => true; + + public Item? Item { get; } + private readonly double 实际物理护甲加成 = 0; + + public override void OnEffectGained(Character character) + { + character.ExDEF2 += 实际物理护甲加成; + } + + public override void OnEffectLost(Character character) + { + character.ExDEF2 -= 实际物理护甲加成; + } + + public ExDEF(Skill skill, Character? source, Item? item) : base(skill) + { + GamingQueue = skill.GamingQueue; + Source = source; + Item = item; + if (skill.OtherArgs.Count > 0) + { + IEnumerable keys = skill.OtherArgs.Keys.Where(s => s.Equals("exdef", StringComparison.CurrentCultureIgnoreCase)); + if (keys.Any() && double.TryParse(skill.OtherArgs[keys.First()].ToString(), out double exDEF)) + { + 实际物理护甲加成 = exDEF; + } + } + } + } +} diff --git a/Library/Effects/OpenEffects/ExSTR.cs b/Library/Effects/OpenEffects/ExSTR.cs new file mode 100644 index 0000000..e1d1706 --- /dev/null +++ b/Library/Effects/OpenEffects/ExSTR.cs @@ -0,0 +1,42 @@ +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Constant; + +namespace Milimoe.FunGame.Testing.Effects +{ + public class ExSTR : Effect + { + public override long Id => 8003; + public override string Name => "力量加成"; + public override string Description => $"增加角色 {实际力量加成} 点力量。" + (!TargetSelf ? $"来自:[ {Source} ]" + (Item != null ? $" 的 [ {Item.Name} ]" : "") : ""); + public override EffectType EffectType => EffectType.Item; + public override bool TargetSelf => true; + + public Item? Item { get; } + private readonly double 实际力量加成 = 0; + + public override void OnEffectGained(Character character) + { + character.ExDEF2 += 实际力量加成; + } + + public override void OnEffectLost(Character character) + { + character.ExDEF2 -= 实际力量加成; + } + + public ExSTR(Skill skill, Character? source, Item? item) : base(skill) + { + GamingQueue = skill.GamingQueue; + Source = source; + Item = item; + if (skill.OtherArgs.Count > 0) + { + IEnumerable keys = skill.OtherArgs.Keys.Where(s => s.Equals("exstr", StringComparison.CurrentCultureIgnoreCase)); + if (keys.Any() && double.TryParse(skill.OtherArgs[keys.First()].ToString(), out double exSTR)) + { + 实际力量加成 = exSTR; + } + } + } + } +} diff --git a/Library/Effects/眩晕.cs b/Library/Effects/眩晕.cs index e70ff68..4219d2a 100644 --- a/Library/Effects/眩晕.cs +++ b/Library/Effects/眩晕.cs @@ -22,7 +22,7 @@ namespace Milimoe.FunGame.Testing.Effects public 眩晕(Skill skill, Character sourceCharacter, bool durative = false, double duration = 0, int durationTurn = 1) : base(skill) { - ActionQueue = skill.ActionQueue; + GamingQueue = skill.GamingQueue; _sourceCharacter = sourceCharacter; _durative = durative; _duration = duration; diff --git a/Library/Effects/累积之压标记.cs b/Library/Effects/累积之压标记.cs index 28921cb..e02c728 100644 --- a/Library/Effects/累积之压标记.cs +++ b/Library/Effects/累积之压标记.cs @@ -17,7 +17,7 @@ namespace Milimoe.FunGame.Testing.Effects public 累积之压标记(Skill skill, Character sourceCharacter) : base(skill) { - ActionQueue = skill.ActionQueue; + GamingQueue = skill.GamingQueue; _sourceCharacter = sourceCharacter; } } diff --git a/Library/FunGame.Testing.csproj b/Library/FunGame.Testing.csproj index dd695a6..86c8c16 100644 --- a/Library/FunGame.Testing.csproj +++ b/Library/FunGame.Testing.csproj @@ -9,6 +9,14 @@ Milimoe.$(MSBuildProjectName.Replace(" ", "_")) + + 1701;1702;IDE0130 + + + + 1701;1702;IDE0130 + + ..\..\FunGame.Core\bin\Debug\net8.0\FunGame.Core.dll diff --git a/Library/Main.cs b/Library/Main.cs index 5ceaadc..038a917 100644 --- a/Library/Main.cs +++ b/Library/Main.cs @@ -1,3 +1,3 @@ using Milimoe.FunGame.Testing.Tests; -_ = new WebSocketTest(); +_ = new SkillJSONTest(); diff --git a/Library/Skills/XinYin/心灵之火.cs b/Library/Skills/XinYin/心灵之火.cs index e0a90eb..2279b5a 100644 --- a/Library/Skills/XinYin/心灵之火.cs +++ b/Library/Skills/XinYin/心灵之火.cs @@ -35,12 +35,12 @@ namespace Milimoe.FunGame.Testing.Skills public override void AfterDamageCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult) { - if (character == Skill.Character && isNormalAttack && 冷却时间 == 0 && !是否是嵌套普通攻击 && ActionQueue != null) + if (character == Skill.Character && isNormalAttack && 冷却时间 == 0 && !是否是嵌套普通攻击 && GamingQueue != null) { WriteLine($"[ {character} ] 发动了心灵之火!额外进行一次普通攻击!"); 冷却时间 = 基础冷却时间; 是否是嵌套普通攻击 = true; - character.NormalAttack.Attack(ActionQueue, character, enemy); + character.NormalAttack.Attack(GamingQueue, character, enemy); } if (character == Skill.Character && 是否是嵌套普通攻击) diff --git a/Library/Solutions/TestPlugin.cs b/Library/Solutions/TestPlugin.cs index 851d49e..e006bcb 100644 --- a/Library/Solutions/TestPlugin.cs +++ b/Library/Solutions/TestPlugin.cs @@ -20,7 +20,7 @@ namespace Addons public override string Author => "FunGamer"; - protected override bool BeforeLoad() + protected override bool BeforeLoad(params object[] objs) { EntityModuleConfig config = new(ExampleGameModuleConstant.Example, ExampleGameModuleConstant.ExampleCharacter) { diff --git a/Library/Tests/FunGame.cs b/Library/Tests/FunGame.cs index e1f73e8..96ca223 100644 --- a/Library/Tests/FunGame.cs +++ b/Library/Tests/FunGame.cs @@ -1,9 +1,10 @@ using System.Text; -using Milimoe.FunGame.Testing.Items; using Milimoe.FunGame.Core.Api.Utility; using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Library.Common.Addon; using Milimoe.FunGame.Core.Library.Constant; +using Milimoe.FunGame.Core.Model; +using Milimoe.FunGame.Testing.Items; using Milimoe.FunGame.Testing.Skills; namespace Milimoe.FunGame.Testing.Tests @@ -293,11 +294,11 @@ namespace Milimoe.FunGame.Testing.Tests if (PrintOut) characters.ForEach(c => Console.WriteLine(c.GetInfo())); // 创建顺序表并排序 - ActionQueue actionQueue = new(characters, WriteLine); + ActionQueue ActionQueue = new(characters, WriteLine); if (PrintOut) Console.WriteLine(); // 显示初始顺序表 - actionQueue.DisplayQueue(); + ActionQueue.DisplayQueue(); if (PrintOut) Console.WriteLine(); // 总游戏时长 @@ -305,7 +306,7 @@ namespace Milimoe.FunGame.Testing.Tests // 开始空投 Msg = ""; - 空投(actionQueue, totalTime); + 空投(ActionQueue, totalTime); if (isWeb) result.Add("=== 空投 ===\r\n" + Msg); // 总回合数 @@ -327,15 +328,15 @@ namespace Milimoe.FunGame.Testing.Tests foreach (Character c in characters.Where(c => c != winner && c.HP > 0)) { WriteLine("[ " + winner + " ] 对 [ " + c + " ] 造成了 99999999999 点真实伤害。"); - actionQueue.DeathCalculation(winner, c); + ActionQueue.DeathCalculation(winner, c); } - actionQueue.EndGameInfo(winner); + ActionQueue.EndGameInfo(winner); result.Add(Msg); break; } // 检查是否有角色可以行动 - Character? characterToAct = actionQueue.NextCharacter(); + Character? characterToAct = ActionQueue.NextCharacter(); // 处理回合 if (characterToAct != null) @@ -343,23 +344,23 @@ namespace Milimoe.FunGame.Testing.Tests WriteLine($"=== Round {i++} ==="); WriteLine("现在是 [ " + characterToAct + " ] 的回合!"); - bool isGameEnd = actionQueue.ProcessTurn(characterToAct); + bool isGameEnd = ActionQueue.ProcessTurn(characterToAct); if (isGameEnd) { result.Add(Msg); break; } - actionQueue.DisplayQueue(); + ActionQueue.DisplayQueue(); WriteLine(""); } // 模拟时间流逝 - totalTime += actionQueue.TimeLapse(); + totalTime += ActionQueue.TimeLapse(); - if (actionQueue.Eliminated.Count > deaths) + if (ActionQueue.Eliminated.Count > deaths) { - deaths = actionQueue.Eliminated.Count; + deaths = ActionQueue.Eliminated.Count; if (!isWeb) { string roundMsg = Msg; @@ -386,10 +387,10 @@ namespace Milimoe.FunGame.Testing.Tests int top = isWeb ? 12 : 6; Msg = $"=== 伤害排行榜 TOP{top} ===\r\n"; int count = 1; - foreach (Character character in actionQueue.CharacterStatistics.OrderByDescending(d => d.Value.TotalDamage).Select(d => d.Key)) + foreach (Character character in ActionQueue.CharacterStatistics.OrderByDescending(d => d.Value.TotalDamage).Select(d => d.Key)) { StringBuilder builder = new(); - CharacterStatistics stats = actionQueue.CharacterStatistics[character]; + CharacterStatistics stats = ActionQueue.CharacterStatistics[character]; builder.AppendLine($"{count}. [ {character.ToStringWithLevel()} ] ({stats.Kills} / {stats.Assists})"); builder.AppendLine($"存活时长:{stats.LiveTime} / 存活回合数:{stats.LiveRound} / 行动回合数:{stats.ActionTurn}"); builder.AppendLine($"总计伤害:{stats.TotalDamage} / 总计物理伤害:{stats.TotalPhysicalDamage} / 总计魔法伤害:{stats.TotalMagicDamage}"); @@ -457,9 +458,9 @@ namespace Milimoe.FunGame.Testing.Tests // 显示每个角色的信息 if (isWeb) { - for (i = actionQueue.Eliminated.Count - 1; i >= 0; i--) + for (i = ActionQueue.Eliminated.Count - 1; i >= 0; i--) { - Character character = actionQueue.Eliminated[i]; + Character character = ActionQueue.Eliminated[i]; result.Add($"=== 角色 [ {character} ] ===\r\n{character.GetInfo()}"); } } diff --git a/Library/Tests/SkillJSONTest.cs b/Library/Tests/SkillJSONTest.cs new file mode 100644 index 0000000..3000999 --- /dev/null +++ b/Library/Tests/SkillJSONTest.cs @@ -0,0 +1,239 @@ +using Milimoe.FunGame.Core.Api.Utility; +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Constant; +using Milimoe.FunGame.Testing.Effects; +using Milimoe.FunGame.Testing.Items; +using Milimoe.FunGame.Testing.Skills; +using MilimoeFunGame.Testing.Characters; + +namespace Milimoe.FunGame.Testing.Tests +{ + internal class SkillJSONTest + { + public SkillJSONTest() + { + //EntityModuleConfig config = new(nameof(SkillJSONTest), nameof(Character)) + //{ + // { "Oshima", OshimaCharacters.Oshima }, + // { "Xinyin", OshimaCharacters.Xinyin }, + // { "Yang", OshimaCharacters.Yang }, + // { "NanGanyu", OshimaCharacters.NanGanyu }, + // { "NiuNan", OshimaCharacters.NiuNan }, + // { "Mayor", OshimaCharacters.Mayor }, + // { "马猴烧酒", OshimaCharacters.马猴烧酒 }, + // { "QingXiang", OshimaCharacters.QingXiang }, + // { "QWQAQW", OshimaCharacters.QWQAQW }, + // { "ColdBlue", OshimaCharacters.ColdBlue }, + // { "绿拱门", OshimaCharacters.绿拱门 }, + // { "QuDuoduo", OshimaCharacters.QuDuoduo } + //}; + //config.SaveConfig(); + + EntityModuleConfig config2 = new(nameof(SkillJSONTest), nameof(Skill)); + Character c = Factory.GetCharacter(); + List listSkill = []; + listSkill.Add(new 精准打击(c)); + foreach (Skill s in listSkill) + { + config2.Add(s.Name, s); + } + config2.SaveConfig(); + + config2.LoadConfig(); + foreach (string key in config2.Keys) + { + Skill prev = config2[key]; + Skill? next = GetSkill(prev.Id, prev.Name, prev.SkillType); + if (next != null) + { + config2[key] = next; + } + Skill skill = config2[key]; + foreach (Effect effect in skill.Effects.ToList()) + { + Effect? newEffect = GetEffect(effect.Id, effect.Name, skill); + if (newEffect != null) + { + skill.Effects.Remove(effect); + skill.Effects.Add(newEffect); + } + } + } + Console.WriteLine(string.Join("\r\n", config2.Values)); + + EntityModuleConfig config3 = new(nameof(SkillJSONTest), nameof(Item)); ; + //EntityModuleConfig config3 = new(nameof(SkillJSONTest), nameof(Item)) + //{ + // { "攻击之爪10", new 攻击之爪10() } + //}; + //config3.SaveConfig(); + config3.LoadConfig(); + foreach (string key in config3.Keys) + { + Item prev = config3[key]; + Item? next = GetItem(prev.Id, prev.Name, prev.ItemType); + if (next != null) + { + prev.SetPropertyToItemModuleNew(next); + config3[key] = next; + } + Item item = config3[key]; + HashSet skills = item.Skills.Passives; + if (item.Skills.Active != null) skills.Add(item.Skills.Active); + foreach (Skill skill in skills.ToList()) + { + Skill? newSkill = GetSkill(skill.Id, skill.Name, skill.SkillType); + if (newSkill != null) + { + if (newSkill.IsActive) + { + item.Skills.Active = newSkill; + } + else + { + item.Skills.Passives.Remove(skill); + item.Skills.Passives.Add(newSkill); + } + } + Skill s = newSkill ?? skill; + foreach (Effect effect in s.Effects.ToList()) + { + Effect? newEffect = GetEffect(effect.Id, effect.Name, skill); + if (newEffect != null) + { + skill.Effects.Remove(effect); + skill.Effects.Add(newEffect); + } + } + } + } + Console.WriteLine(string.Join("\r\n", config3.Values)); + + } + + public static Item? GetItem(long id, string name, ItemType type) + { + if (type == ItemType.Accessory) + { + switch ((AccessoryID)id) + { + case AccessoryID.攻击之爪10: + return new 攻击之爪10(); + case AccessoryID.攻击之爪30: + return new 攻击之爪30(); + case AccessoryID.攻击之爪50: + return new 攻击之爪50(); + } + } + + return null; + } + + public static Skill? GetSkill(long id, string name, SkillType type) + { + if (type == SkillType.Magic) + { + switch ((MagicID)id) + { + case MagicID.冰霜攻击: + return new 冰霜攻击(); + } + } + + if (type == SkillType.Skill) + { + switch ((SkillID)id) + { + case SkillID.疾风步: + return new 疾风步(); + } + } + + if (type == SkillType.SuperSkill) + { + switch ((SuperSkillID)id) + { + case SuperSkillID.力量爆发: + return new 力量爆发(); + case SuperSkillID.天赐之力: + return new 天赐之力(); + case SuperSkillID.魔法涌流: + return new 魔法涌流(); + case SuperSkillID.三重叠加: + return new 三重叠加(); + case SuperSkillID.变幻之心: + return new 变幻之心(); + case SuperSkillID.精准打击: + return new 精准打击(); + case SuperSkillID.绝对领域: + return new 绝对领域(); + case SuperSkillID.能量毁灭: + return new 能量毁灭(); + case SuperSkillID.迅捷之势: + return new 迅捷之势(); + case SuperSkillID.嗜血本能: + return new 嗜血本能(); + case SuperSkillID.平衡强化: + return new 平衡强化(); + case SuperSkillID.血之狂欢: + return new 血之狂欢(); + } + } + + if (type == SkillType.Passive) + { + switch ((PassiveID)id) + { + case PassiveID.META马: + return new META马(); + case PassiveID.心灵之火: + return new 心灵之火(); + case PassiveID.魔法震荡: + return new 魔法震荡(); + case PassiveID.灵能反射: + return new 灵能反射(); + case PassiveID.智慧与力量: + return new 智慧与力量(); + case PassiveID.致命打击: + return new 致命打击(); + case PassiveID.毁灭之势: + return new 毁灭之势(); + case PassiveID.枯竭打击: + return new 枯竭打击(); + case PassiveID.玻璃大炮: + return new 玻璃大炮(); + case PassiveID.累积之压: + return new 累积之压(); + case PassiveID.敏捷之刃: + return new 敏捷之刃(); + case PassiveID.弱者猎手: + return new 弱者猎手(); + } + switch ((ItemPassiveID)id) + { + case ItemPassiveID.攻击之爪: + return new 攻击之爪技能(); + } + } + + return null; + } + + public static Effect? GetEffect(long id, string name, Skill skill) + { + switch (id) + { + case 8001: + return new ExATK(skill, null, null); + case 8002: + return new ExDEF(skill, null, null); + case 8003: + return new ExSTR(skill, null, null); + default: + break; + } + + return null; + } + } +}