From 1acabf28ee69fafc28f0ca66d0e9aa5d4a21f085 Mon Sep 17 00:00:00 2001 From: milimoe Date: Thu, 8 Jan 2026 01:34:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=BC=82=E6=AD=A5=EF=BC=8C?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=96=B0=E6=8A=80=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OshimaModules/Characters/CHAOS.cs | 29 +++++++ OshimaModules/Characters/Neptune.cs | 29 +++++++ OshimaModules/Characters/Ryuko.cs | 29 +++++++ OshimaModules/Characters/ShiYu.cs | 29 +++++++ OshimaModules/Characters/TheGodK.cs | 29 +++++++ OshimaModules/Characters/XReouni.cs | 29 +++++++ OshimaModules/Effects/ItemEffects/GetEP.cs | 6 +- OshimaModules/Effects/ItemEffects/GetEXP.cs | 6 +- .../Effects/ItemEffects/RecoverHP.cs | 6 +- .../Effects/ItemEffects/RecoverHP2.cs | 6 +- .../Effects/ItemEffects/RecoverMP.cs | 6 +- .../Effects/ItemEffects/RecoverMP2.cs | 6 +- .../Effects/SkillEffects/吸取生命值.cs | 2 +- .../Effects/SkillEffects/吸取能量值.cs | 2 +- .../Effects/SkillEffects/吸取魔法值.cs | 2 +- .../Effects/SkillEffects/基于属性的伤害.cs | 2 +- .../基于攻击力的伤害_带基础伤害.cs | 2 +- .../基于攻击力的伤害_无基础伤害.cs | 2 +- .../SkillEffects/基于核心属性的伤害.cs | 2 +- .../Effects/SkillEffects/增加混合护盾值.cs | 2 +- .../SkillEffects/增加物理护盾_护盾值型.cs | 2 +- .../SkillEffects/增加物理护盾_特效持续型.cs | 2 +- .../SkillEffects/增加魔法护盾_护盾值型.cs | 2 +- .../SkillEffects/增加魔法护盾_特效持续型.cs | 2 +- .../Effects/SkillEffects/弱驱散特效.cs | 2 +- .../Effects/SkillEffects/强驱散特效.cs | 2 +- .../Effects/SkillEffects/打断施法.cs | 12 ++- .../Effects/SkillEffects/提升友方行动速度.cs | 2 +- .../Effects/SkillEffects/施加免疫.cs | 2 +- .../Effects/SkillEffects/施加持续性弱驱散.cs | 2 +- .../Effects/SkillEffects/施加持续性强驱散.cs | 2 +- .../Effects/SkillEffects/施加概率负面.cs | 26 +++--- .../Effects/SkillEffects/百分比回复生命值.cs | 2 +- .../Effects/SkillEffects/纯数值伤害.cs | 2 +- .../Effects/SkillEffects/纯数值回复生命值.cs | 2 +- .../Effects/SkillEffects/造成封技.cs | 13 +-- .../Effects/SkillEffects/造成气绝.cs | 13 +-- .../Effects/SkillEffects/造成眩晕.cs | 13 +-- .../Effects/SkillEffects/造成虚弱.cs | 17 ++-- .../Effects/SkillEffects/降低敌方行动速度.cs | 19 +++-- OshimaModules/OshimaModules.csproj | 7 ++ OshimaModules/Skills/ColdBlue/嗜血本能.cs | 2 +- OshimaModules/Skills/MagicalGirl/绝对领域.cs | 2 +- OshimaModules/Skills/Mayor/精准打击.cs | 2 +- OshimaModules/Skills/NanGanyu/三重叠加.cs | 2 +- OshimaModules/Skills/Neptune/深海之戟.cs | 79 +++++++++++++++++++ OshimaModules/Skills/NiuNan/变幻之心.cs | 2 +- OshimaModules/Skills/NiuNan/智慧与力量.cs | 2 +- OshimaModules/Skills/Oshima/力量爆发.cs | 2 +- OshimaModules/Skills/QWQAQW/迅捷之势.cs | 2 +- OshimaModules/Skills/QingXiang/能量毁灭.cs | 2 +- OshimaModules/Skills/QuDuoduo/血之狂欢.cs | 2 +- OshimaModules/Skills/SkillExtension.cs | 12 +-- OshimaModules/Skills/XReouni/八卦阵.cs | 70 ++++++++++++++++ OshimaModules/Skills/XReouni/归元环.cs | 74 +++++++++++++++++ OshimaModules/Skills/XinYin/天赐之力.cs | 2 +- OshimaModules/Skills/Yang/魔法涌流.cs | 2 +- OshimaModules/Skills/dddovo/平衡强化.cs | 2 +- OshimaModules/Skills/战技/养命功.cs | 4 +- OshimaModules/Skills/战技/助威.cs | 4 +- OshimaModules/Skills/战技/双连击.cs | 2 +- OshimaModules/Skills/战技/挑拨.cs | 35 ++++---- OshimaModules/Skills/战技/疾走.cs | 2 +- OshimaModules/Skills/战技/疾风步.cs | 4 +- OshimaModules/Skills/战技/绝影.cs | 2 +- OshimaModules/Skills/战技/金刚击.cs | 1 + OshimaModules/Skills/战技/闪现.cs | 13 ++- OshimaModules/Skills/战技/魔眼.cs | 2 +- OshimaModules/Skills/魔法/反魔法领域.cs | 3 + OshimaModules/Skills/魔法/圣灵术.cs | 2 +- OshimaModules/Skills/魔法/地狱之门.cs | 3 + OshimaModules/Skills/魔法/大地之墙.cs | 5 +- OshimaModules/Skills/魔法/岩石之息.cs | 3 + OshimaModules/Skills/魔法/弧光消耗.cs | 7 +- OshimaModules/Skills/魔法/强音之力.cs | 2 +- OshimaModules/Skills/魔法/强音之力复.cs | 4 +- OshimaModules/Skills/魔法/时间减速.cs | 4 +- OshimaModules/Skills/魔法/时间减速复.cs | 32 +++++--- OshimaModules/Skills/魔法/时间减速改.cs | 32 +++++--- OshimaModules/Skills/魔法/时间加速.cs | 2 +- OshimaModules/Skills/魔法/时间加速复.cs | 4 +- OshimaModules/Skills/魔法/时间加速改.cs | 2 +- OshimaModules/Skills/魔法/根源屏障.cs | 6 +- OshimaModules/Skills/魔法/水蓝轰炸.cs | 3 + OshimaModules/Skills/魔法/治愈术复.cs | 3 + OshimaModules/Skills/魔法/火山咆哮.cs | 3 + OshimaModules/Skills/魔法/灾难冲击波.cs | 39 ++++----- OshimaModules/Skills/魔法/神圣祝福.cs | 2 +- OshimaModules/Skills/魔法/神圣祝福复.cs | 4 +- OshimaModules/Skills/魔法/结晶防护.cs | 2 +- OshimaModules/Skills/魔法/结晶防护复.cs | 4 +- OshimaModules/Skills/魔法/虚弱领域.cs | 2 +- OshimaModules/Skills/魔法/银色荆棘.cs | 33 ++++---- OshimaModules/Skills/魔法/风之守护.cs | 2 +- OshimaModules/Skills/魔法/风之守护复.cs | 4 +- OshimaServers/FastAutoServer.cs | 10 +-- OshimaServers/Service/FunGameActionQueue.cs | 16 ++-- OshimaServers/Service/FunGameSimulation.cs | 35 ++------ 98 files changed, 718 insertions(+), 257 deletions(-) create mode 100644 OshimaModules/Characters/CHAOS.cs create mode 100644 OshimaModules/Characters/Neptune.cs create mode 100644 OshimaModules/Characters/Ryuko.cs create mode 100644 OshimaModules/Characters/ShiYu.cs create mode 100644 OshimaModules/Characters/TheGodK.cs create mode 100644 OshimaModules/Characters/XReouni.cs create mode 100644 OshimaModules/Skills/Neptune/深海之戟.cs create mode 100644 OshimaModules/Skills/XReouni/八卦阵.cs create mode 100644 OshimaModules/Skills/XReouni/归元环.cs diff --git a/OshimaModules/Characters/CHAOS.cs b/OshimaModules/Characters/CHAOS.cs new file mode 100644 index 0000000..960092c --- /dev/null +++ b/OshimaModules/Characters/CHAOS.cs @@ -0,0 +1,29 @@ +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Constant; + +namespace Oshima.FunGame.OshimaModules.Characters +{ + public class CHAOS : Character + { + public CHAOS() : base() + { + Id = 16; + Name = "CHAO"; + FirstName = "SHI"; + NickName = "超市"; + PrimaryAttribute = PrimaryAttribute.STR; + InitialATK = 27; + InitialHP = 100; + InitialMP = 40; + InitialSTR = 14; + STRGrowth = 1.8; + InitialAGI = 12; + AGIGrowth = 1.1; + InitialINT = 4; + INTGrowth = 0.1; + InitialSPD = 300; + InitialHR = 4; + InitialMR = 2; + } + } +} diff --git a/OshimaModules/Characters/Neptune.cs b/OshimaModules/Characters/Neptune.cs new file mode 100644 index 0000000..dc1b9d0 --- /dev/null +++ b/OshimaModules/Characters/Neptune.cs @@ -0,0 +1,29 @@ +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Constant; + +namespace Oshima.FunGame.OshimaModules.Characters +{ + public class Neptune : Character + { + public Neptune() : base() + { + Id = 15; + Name = "Nep"; + FirstName = "tune"; + NickName = "海王星"; + PrimaryAttribute = PrimaryAttribute.STR; + InitialATK = 26; + InitialHP = 95; + InitialMP = 55; + InitialSTR = 16; + STRGrowth = 1.4; + InitialAGI = 7; + AGIGrowth = 1; + InitialINT = 7; + INTGrowth = 0.6; + InitialSPD = 300; + InitialHR = 4; + InitialMR = 2; + } + } +} diff --git a/OshimaModules/Characters/Ryuko.cs b/OshimaModules/Characters/Ryuko.cs new file mode 100644 index 0000000..9311960 --- /dev/null +++ b/OshimaModules/Characters/Ryuko.cs @@ -0,0 +1,29 @@ +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Constant; + +namespace Oshima.FunGame.OshimaModules.Characters +{ + public class Ryuko : Character + { + public Ryuko() : base() + { + Id = 17; + Name = "Ryu"; + FirstName = "ko"; + NickName = "流"; + PrimaryAttribute = PrimaryAttribute.AGI; + InitialATK = 22; + InitialHP = 100; + InitialMP = 45; + InitialSTR = 11; + STRGrowth = 1.3; + InitialAGI = 15; + AGIGrowth = 1.4; + InitialINT = 4; + INTGrowth = 0.3; + InitialSPD = 300; + InitialHR = 4; + InitialMR = 2; + } + } +} diff --git a/OshimaModules/Characters/ShiYu.cs b/OshimaModules/Characters/ShiYu.cs new file mode 100644 index 0000000..e767ed4 --- /dev/null +++ b/OshimaModules/Characters/ShiYu.cs @@ -0,0 +1,29 @@ +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Constant; + +namespace Oshima.FunGame.OshimaModules.Characters +{ + public class ShiYu : Character + { + public ShiYu() : base() + { + Id = 13; + Name = "Shi"; + FirstName = "Yu"; + NickName = "时雨"; + PrimaryAttribute = PrimaryAttribute.AGI; + InitialATK = 20; + InitialHP = 105; + InitialMP = 65; + InitialSTR = 7; + STRGrowth = 0.7; + InitialAGI = 14; + AGIGrowth = 1.5; + InitialINT = 9; + INTGrowth = 0.8; + InitialSPD = 300; + InitialHR = 4; + InitialMR = 2; + } + } +} diff --git a/OshimaModules/Characters/TheGodK.cs b/OshimaModules/Characters/TheGodK.cs new file mode 100644 index 0000000..c9d72eb --- /dev/null +++ b/OshimaModules/Characters/TheGodK.cs @@ -0,0 +1,29 @@ +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Constant; + +namespace Oshima.FunGame.OshimaModules.Characters +{ + public class TheGodK : Character + { + public TheGodK() : base() + { + Id = 18; + Name = "The God"; + FirstName = "K"; + NickName = "K神"; + PrimaryAttribute = PrimaryAttribute.INT; + InitialATK = 23; + InitialHP = 80; + InitialMP = 70; + InitialSTR = 6; + STRGrowth = 0.6; + InitialAGI = 11; + AGIGrowth = 1.1; + InitialINT = 13; + INTGrowth = 1.3; + InitialSPD = 300; + InitialHR = 4; + InitialMR = 2; + } + } +} diff --git a/OshimaModules/Characters/XReouni.cs b/OshimaModules/Characters/XReouni.cs new file mode 100644 index 0000000..eeafa0a --- /dev/null +++ b/OshimaModules/Characters/XReouni.cs @@ -0,0 +1,29 @@ +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Constant; + +namespace Oshima.FunGame.OshimaModules.Characters +{ + public class XReouni : Character + { + public XReouni() : base() + { + Id = 14; + Name = "X"; + FirstName = "Reouni"; + NickName = "雷欧尼"; + PrimaryAttribute = PrimaryAttribute.INT; + InitialATK = 19; + InitialHP = 90; + InitialMP = 75; + InitialSTR = 9; + STRGrowth = 0.9; + InitialAGI = 9; + AGIGrowth = 0.6; + InitialINT = 12; + INTGrowth = 1.5; + InitialSPD = 300; + InitialHR = 4; + InitialMR = 2; + } + } +} diff --git a/OshimaModules/Effects/ItemEffects/GetEP.cs b/OshimaModules/Effects/ItemEffects/GetEP.cs index 16a08aa..63b49b3 100644 --- a/OshimaModules/Effects/ItemEffects/GetEP.cs +++ b/OshimaModules/Effects/ItemEffects/GetEP.cs @@ -29,7 +29,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects } } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character target in targets) { @@ -38,9 +38,9 @@ namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects } } - public override async Task OnSkillCasted(User user, List targets, Dictionary others) + public override void OnSkillCasted(User user, List targets, Dictionary others) { - await base.OnSkillCasted(user, targets, others); + base.OnSkillCasted(user, targets, others); foreach (Character target in targets) { target.EP += 实际获得; diff --git a/OshimaModules/Effects/ItemEffects/GetEXP.cs b/OshimaModules/Effects/ItemEffects/GetEXP.cs index ef643ac..4f2496e 100644 --- a/OshimaModules/Effects/ItemEffects/GetEXP.cs +++ b/OshimaModules/Effects/ItemEffects/GetEXP.cs @@ -29,7 +29,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects } } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character target in targets) { @@ -38,9 +38,9 @@ namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects } } - public override async Task OnSkillCasted(User user, List targets, Dictionary others) + public override void OnSkillCasted(User user, List targets, Dictionary others) { - await base.OnSkillCasted(user, targets, others); + base.OnSkillCasted(user, targets, others); foreach (Character target in targets) { target.EXP += 实际获得; diff --git a/OshimaModules/Effects/ItemEffects/RecoverHP.cs b/OshimaModules/Effects/ItemEffects/RecoverHP.cs index aa39a80..f212a9a 100644 --- a/OshimaModules/Effects/ItemEffects/RecoverHP.cs +++ b/OshimaModules/Effects/ItemEffects/RecoverHP.cs @@ -35,7 +35,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects } } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character target in targets) { @@ -43,9 +43,9 @@ namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects } } - public override async Task OnSkillCasted(User user, List targets, Dictionary others) + public override void OnSkillCasted(User user, List targets, Dictionary others) { - await base.OnSkillCasted(user, targets, others); + base.OnSkillCasted(user, targets, others); foreach (Character target in targets) { target.HP += 实际回复; diff --git a/OshimaModules/Effects/ItemEffects/RecoverHP2.cs b/OshimaModules/Effects/ItemEffects/RecoverHP2.cs index 1f93188..e4d0882 100644 --- a/OshimaModules/Effects/ItemEffects/RecoverHP2.cs +++ b/OshimaModules/Effects/ItemEffects/RecoverHP2.cs @@ -35,7 +35,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects } } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character target in targets) { @@ -43,9 +43,9 @@ namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects } } - public override async Task OnSkillCasted(User user, List targets, Dictionary others) + public override void OnSkillCasted(User user, List targets, Dictionary others) { - await base.OnSkillCasted(user, targets, others); + base.OnSkillCasted(user, targets, others); foreach (Character target in targets) { target.HP += 回复比例 * (target?.MaxHP ?? 0); diff --git a/OshimaModules/Effects/ItemEffects/RecoverMP.cs b/OshimaModules/Effects/ItemEffects/RecoverMP.cs index c0d67b2..dc206cb 100644 --- a/OshimaModules/Effects/ItemEffects/RecoverMP.cs +++ b/OshimaModules/Effects/ItemEffects/RecoverMP.cs @@ -29,7 +29,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects } } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character target in targets) { @@ -38,9 +38,9 @@ namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects } } - public override async Task OnSkillCasted(User user, List targets, Dictionary others) + public override void OnSkillCasted(User user, List targets, Dictionary others) { - await base.OnSkillCasted(user, targets, others); + base.OnSkillCasted(user, targets, others); foreach (Character target in targets) { target.MP += 实际回复; diff --git a/OshimaModules/Effects/ItemEffects/RecoverMP2.cs b/OshimaModules/Effects/ItemEffects/RecoverMP2.cs index e5d79a7..22c8e8a 100644 --- a/OshimaModules/Effects/ItemEffects/RecoverMP2.cs +++ b/OshimaModules/Effects/ItemEffects/RecoverMP2.cs @@ -29,7 +29,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects } } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character target in targets) { @@ -39,9 +39,9 @@ namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects } } - public override async Task OnSkillCasted(User user, List targets, Dictionary others) + public override void OnSkillCasted(User user, List targets, Dictionary others) { - await base.OnSkillCasted(user, targets, others); + base.OnSkillCasted(user, targets, others); foreach (Character target in targets) { target.MP += 回复比例 * (target?.MaxHP ?? 0); diff --git a/OshimaModules/Effects/SkillEffects/吸取生命值.cs b/OshimaModules/Effects/SkillEffects/吸取生命值.cs index 0b1ebe8..b2b0117 100644 --- a/OshimaModules/Effects/SkillEffects/吸取生命值.cs +++ b/OshimaModules/Effects/SkillEffects/吸取生命值.cs @@ -27,7 +27,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects this.转化百分比 = Calculation.PercentageCheck(转化百分比); } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { double total = 0; foreach (Character target in targets) diff --git a/OshimaModules/Effects/SkillEffects/吸取能量值.cs b/OshimaModules/Effects/SkillEffects/吸取能量值.cs index e6d1225..d3e7276 100644 --- a/OshimaModules/Effects/SkillEffects/吸取能量值.cs +++ b/OshimaModules/Effects/SkillEffects/吸取能量值.cs @@ -27,7 +27,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects this.转化百分比 = Calculation.PercentageCheck(转化百分比); } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { double total = 0; foreach (Character target in targets) diff --git a/OshimaModules/Effects/SkillEffects/吸取魔法值.cs b/OshimaModules/Effects/SkillEffects/吸取魔法值.cs index 22d2599..4b90d65 100644 --- a/OshimaModules/Effects/SkillEffects/吸取魔法值.cs +++ b/OshimaModules/Effects/SkillEffects/吸取魔法值.cs @@ -27,7 +27,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects this.转化百分比 = Calculation.PercentageCheck(转化百分比); } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { double total = 0; foreach (Character target in targets) diff --git a/OshimaModules/Effects/SkillEffects/基于属性的伤害.cs b/OshimaModules/Effects/SkillEffects/基于属性的伤害.cs index 012a992..f1871fd 100644 --- a/OshimaModules/Effects/SkillEffects/基于属性的伤害.cs +++ b/OshimaModules/Effects/SkillEffects/基于属性的伤害.cs @@ -49,7 +49,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects MagicType = magicType; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character enemy in targets) { diff --git a/OshimaModules/Effects/SkillEffects/基于攻击力的伤害_带基础伤害.cs b/OshimaModules/Effects/SkillEffects/基于攻击力的伤害_带基础伤害.cs index 58af144..8dc6f44 100644 --- a/OshimaModules/Effects/SkillEffects/基于攻击力的伤害_带基础伤害.cs +++ b/OshimaModules/Effects/SkillEffects/基于攻击力的伤害_带基础伤害.cs @@ -31,7 +31,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects MagicType = magicType; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character enemy in targets) { diff --git a/OshimaModules/Effects/SkillEffects/基于攻击力的伤害_无基础伤害.cs b/OshimaModules/Effects/SkillEffects/基于攻击力的伤害_无基础伤害.cs index c8e8493..f8444e8 100644 --- a/OshimaModules/Effects/SkillEffects/基于攻击力的伤害_无基础伤害.cs +++ b/OshimaModules/Effects/SkillEffects/基于攻击力的伤害_无基础伤害.cs @@ -26,7 +26,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects MagicType = magicType; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character enemy in targets) { diff --git a/OshimaModules/Effects/SkillEffects/基于核心属性的伤害.cs b/OshimaModules/Effects/SkillEffects/基于核心属性的伤害.cs index c7d1f63..0ced85f 100644 --- a/OshimaModules/Effects/SkillEffects/基于核心属性的伤害.cs +++ b/OshimaModules/Effects/SkillEffects/基于核心属性的伤害.cs @@ -31,7 +31,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects MagicType = magicType; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character enemy in targets) { diff --git a/OshimaModules/Effects/SkillEffects/增加混合护盾值.cs b/OshimaModules/Effects/SkillEffects/增加混合护盾值.cs index 204156a..7fab1d5 100644 --- a/OshimaModules/Effects/SkillEffects/增加混合护盾值.cs +++ b/OshimaModules/Effects/SkillEffects/增加混合护盾值.cs @@ -22,7 +22,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects this.基础护盾等级成长 = 基础护盾等级成长; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character target in targets) { diff --git a/OshimaModules/Effects/SkillEffects/增加物理护盾_护盾值型.cs b/OshimaModules/Effects/SkillEffects/增加物理护盾_护盾值型.cs index 70a0bf0..c27111c 100644 --- a/OshimaModules/Effects/SkillEffects/增加物理护盾_护盾值型.cs +++ b/OshimaModules/Effects/SkillEffects/增加物理护盾_护盾值型.cs @@ -22,7 +22,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects this.基础护盾等级成长 = 基础护盾等级成长; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character target in targets) { diff --git a/OshimaModules/Effects/SkillEffects/增加物理护盾_特效持续型.cs b/OshimaModules/Effects/SkillEffects/增加物理护盾_特效持续型.cs index c34e979..02dc396 100644 --- a/OshimaModules/Effects/SkillEffects/增加物理护盾_特效持续型.cs +++ b/OshimaModules/Effects/SkillEffects/增加物理护盾_特效持续型.cs @@ -30,7 +30,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects _durationTurn = durationTurn; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character target in targets) { diff --git a/OshimaModules/Effects/SkillEffects/增加魔法护盾_护盾值型.cs b/OshimaModules/Effects/SkillEffects/增加魔法护盾_护盾值型.cs index 3edf660..39c8c96 100644 --- a/OshimaModules/Effects/SkillEffects/增加魔法护盾_护盾值型.cs +++ b/OshimaModules/Effects/SkillEffects/增加魔法护盾_护盾值型.cs @@ -22,7 +22,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects this.基础护盾等级成长 = 基础护盾等级成长; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character target in targets) { diff --git a/OshimaModules/Effects/SkillEffects/增加魔法护盾_特效持续型.cs b/OshimaModules/Effects/SkillEffects/增加魔法护盾_特效持续型.cs index 85530f3..d671c41 100644 --- a/OshimaModules/Effects/SkillEffects/增加魔法护盾_特效持续型.cs +++ b/OshimaModules/Effects/SkillEffects/增加魔法护盾_特效持续型.cs @@ -30,7 +30,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects _durationTurn = durationTurn; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character target in targets) { diff --git a/OshimaModules/Effects/SkillEffects/弱驱散特效.cs b/OshimaModules/Effects/SkillEffects/弱驱散特效.cs index d0d89bb..679399e 100644 --- a/OshimaModules/Effects/SkillEffects/弱驱散特效.cs +++ b/OshimaModules/Effects/SkillEffects/弱驱散特效.cs @@ -17,7 +17,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects GamingQueue = skill.GamingQueue; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { Dictionary isTeammateDictionary = GamingQueue?.GetIsTeammateDictionary(caster, targets) ?? []; foreach (Character target in targets) diff --git a/OshimaModules/Effects/SkillEffects/强驱散特效.cs b/OshimaModules/Effects/SkillEffects/强驱散特效.cs index 842ae7c..023e725 100644 --- a/OshimaModules/Effects/SkillEffects/强驱散特效.cs +++ b/OshimaModules/Effects/SkillEffects/强驱散特效.cs @@ -17,7 +17,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects GamingQueue = skill.GamingQueue; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { Dictionary isTeammateDictionary = GamingQueue?.GetIsTeammateDictionary(caster, targets) ?? []; foreach (Character target in targets) diff --git a/OshimaModules/Effects/SkillEffects/打断施法.cs b/OshimaModules/Effects/SkillEffects/打断施法.cs index ecba1e1..3e7c16f 100644 --- a/OshimaModules/Effects/SkillEffects/打断施法.cs +++ b/OshimaModules/Effects/SkillEffects/打断施法.cs @@ -1,5 +1,7 @@ using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Library.Common.Addon; +using Milimoe.FunGame.Core.Library.Constant; +using Oshima.FunGame.OshimaModules.Skills; namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects { @@ -7,18 +9,22 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects { public override long Id => Skill.Id; public override string Name => Skill.Name; - public override string Description => $"打断施法:中断目标正在进行的吟唱。"; + public override string Description => $"对{Skill.TargetDescription()}施加打断施法效果:中断其正在进行的吟唱。"; + public override EffectType EffectType => EffectType.InterruptCasting; public 打断施法(Skill skill) : base(skill) { GamingQueue = skill.GamingQueue; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character target in targets) { - InterruptCasting(target, caster); + if (!CheckExemption(caster, target, this)) + { + InterruptCasting(target, caster); + } } } } diff --git a/OshimaModules/Effects/SkillEffects/提升友方行动速度.cs b/OshimaModules/Effects/SkillEffects/提升友方行动速度.cs index 1dea49e..358c845 100644 --- a/OshimaModules/Effects/SkillEffects/提升友方行动速度.cs +++ b/OshimaModules/Effects/SkillEffects/提升友方行动速度.cs @@ -30,7 +30,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects _durationTurn = durationTurn; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character target in targets) { diff --git a/OshimaModules/Effects/SkillEffects/施加免疫.cs b/OshimaModules/Effects/SkillEffects/施加免疫.cs index d67197d..e541983 100644 --- a/OshimaModules/Effects/SkillEffects/施加免疫.cs +++ b/OshimaModules/Effects/SkillEffects/施加免疫.cs @@ -38,7 +38,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects }; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character target in targets) { diff --git a/OshimaModules/Effects/SkillEffects/施加持续性弱驱散.cs b/OshimaModules/Effects/SkillEffects/施加持续性弱驱散.cs index 966402f..ceddf94 100644 --- a/OshimaModules/Effects/SkillEffects/施加持续性弱驱散.cs +++ b/OshimaModules/Effects/SkillEffects/施加持续性弱驱散.cs @@ -36,7 +36,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects } } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { Dictionary isTeammateDictionary = GamingQueue?.GetIsTeammateDictionary(caster, targets) ?? []; foreach (Character target in targets) diff --git a/OshimaModules/Effects/SkillEffects/施加持续性强驱散.cs b/OshimaModules/Effects/SkillEffects/施加持续性强驱散.cs index 124a948..43ff853 100644 --- a/OshimaModules/Effects/SkillEffects/施加持续性强驱散.cs +++ b/OshimaModules/Effects/SkillEffects/施加持续性强驱散.cs @@ -36,7 +36,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects } } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { Dictionary isTeammateDictionary = GamingQueue?.GetIsTeammateDictionary(caster, targets) ?? []; foreach (Character target in targets) diff --git a/OshimaModules/Effects/SkillEffects/施加概率负面.cs b/OshimaModules/Effects/SkillEffects/施加概率负面.cs index 7e531a0..04a8bd6 100644 --- a/OshimaModules/Effects/SkillEffects/施加概率负面.cs +++ b/OshimaModules/Effects/SkillEffects/施加概率负面.cs @@ -50,7 +50,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects SetDescription(); } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character target in targets) { @@ -58,18 +58,19 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects Effect? e = null; double duration = _duration + _levelGrowth * (Level - 1); int durationTurn = Convert.ToInt32(_durationTurn + _levelGrowth * (Level - 1)); + string tip = ""; switch (_effectType) { case EffectType.Silence: - WriteLine($"[ {caster} ] 对 [ {target} ] 造成了封技和施法解除!持续时间:{持续时间}!"); + tip = $"[ {caster} ] 对 [ {target} ] 造成了封技和施法解除!持续时间:{持续时间}!"; e = new 封技(Skill, caster, _durative, duration, durationTurn); break; case EffectType.Confusion: - WriteLine($"[ {target} ] 陷入了混乱!!持续时间:{持续时间}!"); + tip = $"[ {target} ] 陷入了混乱!!持续时间:{持续时间}!"; e = new 混乱(Skill, caster, _durative, duration, durationTurn); break; case EffectType.Taunt: - WriteLine($"[ {target} ] 被 [ {caster} ] 嘲讽了!持续时间:{持续时间}!"); + tip = $"[ {target} ] 被 [ {caster} ] 嘲讽了!持续时间:{持续时间}!"; e = new 愤怒(Skill, caster, target, _durative, duration, durationTurn); break; case EffectType.Delay: @@ -78,19 +79,19 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects { healingReductionPercent = healingReduce; } - WriteLine($"[ {caster} ] 对 [ {target} ] 造成了迟滞!普通攻击和技能的硬直时间、当前行动等待时间延长了 {healingReductionPercent * 100:0.##}%!持续时间:{持续时间}!"); + tip = $"[ {caster} ] 对 [ {target} ] 造成了迟滞!普通攻击和技能的硬直时间、当前行动等待时间延长了 {healingReductionPercent * 100:0.##}%!持续时间:{持续时间}!"; e = new 迟滞(Skill, caster, _durative, duration, durationTurn, healingReductionPercent); break; case EffectType.Stun: - WriteLine($"[ {caster} ] 对 [ {target} ] 造成了眩晕!持续时间:{持续时间}!"); + tip = $"[ {caster} ] 对 [ {target} ] 造成了眩晕!持续时间:{持续时间}!"; e = new 眩晕(Skill, caster, _durative, duration, durationTurn); break; case EffectType.Freeze: - WriteLine($"[ {caster} ] 对 [ {target} ] 造成了冻结!持续时间:{持续时间}!"); + tip = $"[ {caster} ] 对 [ {target} ] 造成了冻结!持续时间:{持续时间}!"; e = new 冻结(Skill, caster, _durative, duration, durationTurn); break; case EffectType.Petrify: - WriteLine($"[ {caster} ] 对 [ {target} ] 造成了石化!持续时间:{持续时间}!"); + tip = $"[ {caster} ] 对 [ {target} ] 造成了石化!持续时间:{持续时间}!"; e = new 石化(Skill, caster, _durative, duration, durationTurn); break; case EffectType.Vulnerable: @@ -106,7 +107,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects } if (exDamagePercent > 0) { - WriteLine($"[ {caster} ] 对 [ {target} ] 造成了易伤,额外受到 {exDamagePercent * 100:0.##}% {CharacterSet.GetDamageTypeName(damageType)}!持续时间:{持续时间}!"); + tip = $"[ {caster} ] 对 [ {target} ] 造成了易伤,额外受到 {exDamagePercent * 100:0.##}% {CharacterSet.GetDamageTypeName(damageType)}!持续时间:{持续时间}!"; e = new 易伤(Skill, target, caster, _durative, duration, durationTurn, damageType, exDamagePercent); } break; @@ -136,19 +137,20 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects if (Level > 0) durationDamage += durationDamageLevelGrowth * (Level - 1); if (Level > 0) durationDamagePercent += durationDamageLevelGrowth * (Level - 1); string damageString = isPercentage ? $"流失 {durationDamagePercent * 100:0.##}% 当前生命值" : $"流失 {durationDamage:0.##} 点生命值"; - WriteLine($"[ {caster} ] 对 [ {target} ] 造成了气绝! [ {target} ] 进入行动受限状态且每{GameplayEquilibriumConstant.InGameTime}{damageString}!持续时间:{持续时间}!"); + tip = $"[ {caster} ] 对 [ {target} ] 造成了气绝! [ {target} ] 进入行动受限状态且每{GameplayEquilibriumConstant.InGameTime}{damageString}!持续时间:{持续时间}!"; e = new 气绝(Skill, target, caster, _durative, duration, durationTurn, isPercentage, durationDamage, durationDamagePercent); } break; case EffectType.Cripple: - WriteLine($"[ {caster} ] 对 [ {target} ] 造成了战斗不能,禁止普通攻击和使用技能(魔法、战技和爆发技)!持续时间:{持续时间}!"); + tip = $"[ {caster} ] 对 [ {target} ] 造成了战斗不能,禁止普通攻击和使用技能(魔法、战技和爆发技)!持续时间:{持续时间}!"; e = new 战斗不能(Skill, caster, _durative, duration, durationTurn); break; default: break; } - if (e != null) + if (e != null && !CheckExemption(caster, target, e)) { + WriteLine(tip); target.Effects.Add(e); e.OnEffectGained(target); GamingQueue?.LastRound.AddApplyEffects(target, e.EffectType); diff --git a/OshimaModules/Effects/SkillEffects/百分比回复生命值.cs b/OshimaModules/Effects/SkillEffects/百分比回复生命值.cs index c2004f1..ef8c62c 100644 --- a/OshimaModules/Effects/SkillEffects/百分比回复生命值.cs +++ b/OshimaModules/Effects/SkillEffects/百分比回复生命值.cs @@ -23,7 +23,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects CanRespawn = canRespawn; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character target in targets) { diff --git a/OshimaModules/Effects/SkillEffects/纯数值伤害.cs b/OshimaModules/Effects/SkillEffects/纯数值伤害.cs index ad03b68..35b75ba 100644 --- a/OshimaModules/Effects/SkillEffects/纯数值伤害.cs +++ b/OshimaModules/Effects/SkillEffects/纯数值伤害.cs @@ -25,7 +25,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects MagicType = magicType; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character enemy in targets) { diff --git a/OshimaModules/Effects/SkillEffects/纯数值回复生命值.cs b/OshimaModules/Effects/SkillEffects/纯数值回复生命值.cs index 8894a11..0d3a4ac 100644 --- a/OshimaModules/Effects/SkillEffects/纯数值回复生命值.cs +++ b/OshimaModules/Effects/SkillEffects/纯数值回复生命值.cs @@ -23,7 +23,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects CanRespawn = canRespawn; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character target in targets) { diff --git a/OshimaModules/Effects/SkillEffects/造成封技.cs b/OshimaModules/Effects/SkillEffects/造成封技.cs index 81a9b98..71ea8fe 100644 --- a/OshimaModules/Effects/SkillEffects/造成封技.cs +++ b/OshimaModules/Effects/SkillEffects/造成封技.cs @@ -30,15 +30,18 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects _levelGrowth = levelGrowth; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character enemy in targets) { - WriteLine($"[ {caster} ] 对 [ {enemy} ] 造成了封技和施法解除!持续时间:{封技时间}!"); 封技 e = new(Skill, caster, _durative, _duration + _levelGrowth * (Level - 1), Convert.ToInt32(_durationTurn + _levelGrowth * (Level - 1))); - enemy.Effects.Add(e); - e.OnEffectGained(enemy); - GamingQueue?.LastRound.AddApplyEffects(enemy, e.EffectType); + if (!CheckExemption(caster, enemy, e)) + { + WriteLine($"[ {caster} ] 对 [ {enemy} ] 造成了封技和施法解除!持续时间:{封技时间}!"); + enemy.Effects.Add(e); + e.OnEffectGained(enemy); + GamingQueue?.LastRound.AddApplyEffects(enemy, e.EffectType); + } } } } diff --git a/OshimaModules/Effects/SkillEffects/造成气绝.cs b/OshimaModules/Effects/SkillEffects/造成气绝.cs index e0cce62..25c2224 100644 --- a/OshimaModules/Effects/SkillEffects/造成气绝.cs +++ b/OshimaModules/Effects/SkillEffects/造成气绝.cs @@ -39,15 +39,18 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects _durationDamagePercent = durationDamagePercent; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character enemy in targets) { - WriteLine($"[ {caster} ] 对 [ {enemy} ] 造成了气绝!持续时间:{气绝时间}!"); 气绝 e = new(Skill, enemy, caster, _durative, _duration + _levelGrowth * (Level - 1), Convert.ToInt32(_durationTurn + _levelGrowth * (Level - 1)), _isPercentage, _durationDamage, _durationDamagePercent); - enemy.Effects.Add(e); - e.OnEffectGained(enemy); - GamingQueue?.LastRound.AddApplyEffects(enemy, e.EffectType); + if (!CheckExemption(caster, enemy, e)) + { + WriteLine($"[ {caster} ] 对 [ {enemy} ] 造成了气绝!持续时间:{气绝时间}!"); + enemy.Effects.Add(e); + e.OnEffectGained(enemy); + GamingQueue?.LastRound.AddApplyEffects(enemy, e.EffectType); + } } } } diff --git a/OshimaModules/Effects/SkillEffects/造成眩晕.cs b/OshimaModules/Effects/SkillEffects/造成眩晕.cs index 1e61095..7c00548 100644 --- a/OshimaModules/Effects/SkillEffects/造成眩晕.cs +++ b/OshimaModules/Effects/SkillEffects/造成眩晕.cs @@ -31,16 +31,19 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects _levelGrowth = levelGrowth; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character enemy in targets) { if (enemy.HP <= 0) continue; - WriteLine($"[ {caster} ] 眩晕了 [ {enemy} ] !持续时间:{眩晕时间}!"); 眩晕 e = new(Skill, caster, _durative, _duration + _levelGrowth * (Level - 1), Convert.ToInt32(_durationTurn + _levelGrowth * (Level - 1))); - enemy.Effects.Add(e); - e.OnEffectGained(enemy); - GamingQueue?.LastRound.AddApplyEffects(enemy, e.EffectType); + if (!CheckExemption(caster, enemy, e)) + { + WriteLine($"[ {caster} ] 眩晕了 [ {enemy} ] !持续时间:{眩晕时间}!"); + enemy.Effects.Add(e); + e.OnEffectGained(enemy); + GamingQueue?.LastRound.AddApplyEffects(enemy, e.EffectType); + } } } } diff --git a/OshimaModules/Effects/SkillEffects/造成虚弱.cs b/OshimaModules/Effects/SkillEffects/造成虚弱.cs index 553bae1..e753fce 100644 --- a/OshimaModules/Effects/SkillEffects/造成虚弱.cs +++ b/OshimaModules/Effects/SkillEffects/造成虚弱.cs @@ -54,17 +54,20 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects _healingReductionPercentLevelGrowth = healingReductionPercentLevelGrowth; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character enemy in targets) { - WriteLine($"[ {caster} ] 对 [ {enemy} ] 造成了虚弱!伤害降低 {ActualDamageReductionPercent * 100:0.##}%," + - $"物理护甲降低 {ActualDEFReductionPercent * 100:0.##}%,魔法抗性降低 {ActualMDFReductionPercent * 100:0.##}%," + - $"治疗效果降低 {ActualHealingReductionPercent * 100:0.##}%!持续时间:{虚弱时间}!"); 虚弱 e = new(Skill, enemy, caster, _durative, _duration + _levelGrowth * (Level - 1), Convert.ToInt32(_durationTurn + _levelGrowth * (Level - 1)), ActualDamageReductionPercent, ActualDEFReductionPercent, ActualMDFReductionPercent, ActualHealingReductionPercent); - enemy.Effects.Add(e); - e.OnEffectGained(enemy); - GamingQueue?.LastRound.AddApplyEffects(enemy, e.EffectType); + if (!CheckExemption(caster, enemy, e)) + { + WriteLine($"[ {caster} ] 对 [ {enemy} ] 造成了虚弱!伤害降低 {ActualDamageReductionPercent * 100:0.##}%," + + $"物理护甲降低 {ActualDEFReductionPercent * 100:0.##}%,魔法抗性降低 {ActualMDFReductionPercent * 100:0.##}%," + + $"治疗效果降低 {ActualHealingReductionPercent * 100:0.##}%!持续时间:{虚弱时间}!"); + enemy.Effects.Add(e); + e.OnEffectGained(enemy); + GamingQueue?.LastRound.AddApplyEffects(enemy, e.EffectType); + } } } } diff --git a/OshimaModules/Effects/SkillEffects/降低敌方行动速度.cs b/OshimaModules/Effects/SkillEffects/降低敌方行动速度.cs index 0759548..d8c3dc6 100644 --- a/OshimaModules/Effects/SkillEffects/降低敌方行动速度.cs +++ b/OshimaModules/Effects/SkillEffects/降低敌方行动速度.cs @@ -32,11 +32,10 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects _durationTurn = durationTurn; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character target in targets) { - WriteLine($"[ {target} ] 的行动速度降低了 {-SPD:0.##} 点,行动等待时间(当前硬直时间)被延长了 30%!持续时间:{持续时间}!"); ExSPD e = new(Skill, new Dictionary() { { "exspd", SPD } @@ -46,12 +45,16 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects Duration = _duration, DurationTurn = _durationTurn }; - target.Effects.Add(e); - e.OnEffectGained(target); - e.EffectType = EffectType.Slow; - e.IsDebuff = true; - GamingQueue?.LastRound.AddApplyEffects(target, e.EffectType); - GamingQueue?.ChangeCharacterHardnessTime(target, 0.3, true, false); + if (!CheckExemption(caster, target, e)) + { + target.Effects.Add(e); + e.OnEffectGained(target); + e.EffectType = EffectType.Slow; + e.IsDebuff = true; + WriteLine($"[ {target} ] 的行动速度降低了 {-SPD:0.##} 点,行动等待时间(当前硬直时间)被延长了 30%!持续时间:{持续时间}!"); + GamingQueue?.LastRound.AddApplyEffects(target, e.EffectType); + GamingQueue?.ChangeCharacterHardnessTime(target, 0.3, true, false); + } } } } diff --git a/OshimaModules/OshimaModules.csproj b/OshimaModules/OshimaModules.csproj index 4c02d82..c113ba2 100644 --- a/OshimaModules/OshimaModules.csproj +++ b/OshimaModules/OshimaModules.csproj @@ -32,5 +32,12 @@ PreserveNewest + + + + + + + diff --git a/OshimaModules/Skills/ColdBlue/嗜血本能.cs b/OshimaModules/Skills/ColdBlue/嗜血本能.cs index 0dd45fe..b8ebdf1 100644 --- a/OshimaModules/Skills/ColdBlue/嗜血本能.cs +++ b/OshimaModules/Skills/ColdBlue/嗜血本能.cs @@ -52,7 +52,7 @@ namespace Oshima.FunGame.OshimaModules.Skills } } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { RemainDuration = Duration; if (!caster.Effects.Contains(this)) diff --git a/OshimaModules/Skills/MagicalGirl/绝对领域.cs b/OshimaModules/Skills/MagicalGirl/绝对领域.cs index ac2981f..6dda411 100644 --- a/OshimaModules/Skills/MagicalGirl/绝对领域.cs +++ b/OshimaModules/Skills/MagicalGirl/绝对领域.cs @@ -74,7 +74,7 @@ namespace Oshima.FunGame.OshimaModules.Skills 释放时的能量值 = caster.EP; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { RemainDuration = Duration; if (!caster.Effects.Contains(this)) diff --git a/OshimaModules/Skills/Mayor/精准打击.cs b/OshimaModules/Skills/Mayor/精准打击.cs index 6bf3381..1ac8b0d 100644 --- a/OshimaModules/Skills/Mayor/精准打击.cs +++ b/OshimaModules/Skills/Mayor/精准打击.cs @@ -56,7 +56,7 @@ namespace Oshima.FunGame.OshimaModules.Skills character.PhysicalPenetration -= 实际物理穿透提升; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { RemainDuration = Duration; if (!caster.Effects.Contains(this)) diff --git a/OshimaModules/Skills/NanGanyu/三重叠加.cs b/OshimaModules/Skills/NanGanyu/三重叠加.cs index c5730c1..d3f5850 100644 --- a/OshimaModules/Skills/NanGanyu/三重叠加.cs +++ b/OshimaModules/Skills/NanGanyu/三重叠加.cs @@ -68,7 +68,7 @@ namespace Oshima.FunGame.OshimaModules.Skills } } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { 剩余持续次数 = 技能持续次数; if (!caster.Effects.Contains(this)) diff --git a/OshimaModules/Skills/Neptune/深海之戟.cs b/OshimaModules/Skills/Neptune/深海之戟.cs new file mode 100644 index 0000000..bd594e0 --- /dev/null +++ b/OshimaModules/Skills/Neptune/深海之戟.cs @@ -0,0 +1,79 @@ +using System; +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Common.Addon; +using Milimoe.FunGame.Core.Library.Constant; + +namespace Oshima.FunGame.OshimaModules.Skills +{ + public class 深海之戟 : Skill + { + public override long Id => (long)PassiveID.深海之戟; + public override string Name => "深海之戟"; + public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; + public override string ExemptionDescription => Effects.Count > 0 ? Effects.First().ExemptionDescription : ""; + public override int CanSelectTargetRange => 3; + + public 深海之戟(Character? character = null) : base(SkillType.Passive, character) + { + Effects.Add(new 深海之戟特效(this)); + } + + public override IEnumerable AddPassiveEffectToCharacter() + { + return Effects; + } + } + + public class 深海之戟特效(Skill skill) : Effect(skill) + { + public override long Id => Skill.Id; + public override string Name => Skill.Name; + public override string Description + { + get + { + string str = $"分裂伤害:{分裂百分比 * 100:0.##}%。无视免疫。"; + if (GamingQueue?.Map != null) + { + return $"普通攻击暴击时会自动产生分裂伤害至其附近半径为 {Skill.CanSelectTargetRange} 格的菱形区域内的敌人,但最多只会对两个敌人造成分裂伤害。{str}"; + } + else + { + return $"普通攻击暴击时会自动产生分裂伤害至其他两个随机的敌人。{str}"; + } + } + } + public override ImmuneType IgnoreImmune => ImmuneType.All; + + public double 分裂百分比 => 0.3 + (Skill.Character?.Level ?? 0) / 100; + + public override void AfterDamageCalculation(Character character, Character enemy, double damage, double actualDamage, bool isNormalAttack, DamageType damageType, MagicType magicType, DamageResult damageResult) + { + if (character == Skill.Character && isNormalAttack && damageResult == DamageResult.Critical && GamingQueue != null) + { + List allEnemys = [.. GamingQueue.AllCharacters.Where(c => c != character && c != enemy && c.HP > 0 && !GamingQueue.IsTeammate(character, c))]; + List targets = []; + if (GamingQueue?.Map is GameMap map) + { + List grids = []; + Grid? enemyGrid = map.GetCharacterCurrentGrid(enemy); + if (enemyGrid != null) + { + grids.AddRange(map.GetGridsByRange(enemyGrid, Skill.CanSelectTargetRange, true)); + grids = [.. grids.Where(g => g.Characters.Count > 0).OrderBy(g => GameMap.CalculateManhattanDistance(enemyGrid, g)).Take(2)]; + } + targets = Skill.SelectTargetsByRange(character, allEnemys, [], [], grids, false); + } + else + { + targets.AddRange(allEnemys.OrderBy(o => Random.Shared.Next()).Take(2)); + } + double 分裂伤害 = actualDamage * 分裂百分比; + foreach (Character target in targets) + { + DamageToEnemy(character, target, damageType, magicType, 分裂伤害, false, true); + } + } + } + } +} diff --git a/OshimaModules/Skills/NiuNan/变幻之心.cs b/OshimaModules/Skills/NiuNan/变幻之心.cs index dbc747e..0dc9c35 100644 --- a/OshimaModules/Skills/NiuNan/变幻之心.cs +++ b/OshimaModules/Skills/NiuNan/变幻之心.cs @@ -143,7 +143,7 @@ namespace Oshima.FunGame.OshimaModules.Skills } } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { IEnumerable effects = caster.Effects.Where(e => e is 智慧与力量特效); if (effects.Any()) diff --git a/OshimaModules/Skills/NiuNan/智慧与力量.cs b/OshimaModules/Skills/NiuNan/智慧与力量.cs index c0be3ae..e307686 100644 --- a/OshimaModules/Skills/NiuNan/智慧与力量.cs +++ b/OshimaModules/Skills/NiuNan/智慧与力量.cs @@ -71,7 +71,7 @@ namespace Oshima.FunGame.OshimaModules.Skills { if (actor == Skill.Character) { - throwingBonus += 100; + throwingBonus += 200; } return true; } diff --git a/OshimaModules/Skills/Oshima/力量爆发.cs b/OshimaModules/Skills/Oshima/力量爆发.cs index c95323f..20ad03e 100644 --- a/OshimaModules/Skills/Oshima/力量爆发.cs +++ b/OshimaModules/Skills/Oshima/力量爆发.cs @@ -58,7 +58,7 @@ namespace Oshima.FunGame.OshimaModules.Skills } } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { RemainDuration = Duration; if (!caster.Effects.Contains(this)) diff --git a/OshimaModules/Skills/QWQAQW/迅捷之势.cs b/OshimaModules/Skills/QWQAQW/迅捷之势.cs index 019762f..1218944 100644 --- a/OshimaModules/Skills/QWQAQW/迅捷之势.cs +++ b/OshimaModules/Skills/QWQAQW/迅捷之势.cs @@ -72,7 +72,7 @@ namespace Oshima.FunGame.OshimaModules.Skills baseHardnessTime *= 0.3; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { RemainDuration = Duration; if (!caster.Effects.Contains(this)) diff --git a/OshimaModules/Skills/QingXiang/能量毁灭.cs b/OshimaModules/Skills/QingXiang/能量毁灭.cs index 23fd000..9f637e7 100644 --- a/OshimaModules/Skills/QingXiang/能量毁灭.cs +++ b/OshimaModules/Skills/QingXiang/能量毁灭.cs @@ -43,7 +43,7 @@ namespace Oshima.FunGame.OshimaModules.Skills private double 智力伤害 => 智力系数 * Skill.Character?.INT ?? 0; private double 能量系数 => 1 * Level; - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character c in targets) { diff --git a/OshimaModules/Skills/QuDuoduo/血之狂欢.cs b/OshimaModules/Skills/QuDuoduo/血之狂欢.cs index 0db8293..83e5929 100644 --- a/OshimaModules/Skills/QuDuoduo/血之狂欢.cs +++ b/OshimaModules/Skills/QuDuoduo/血之狂欢.cs @@ -42,7 +42,7 @@ namespace Oshima.FunGame.OshimaModules.Skills } } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { RemainDuration = Duration; if (!caster.Effects.Contains(this)) diff --git a/OshimaModules/Skills/SkillExtension.cs b/OshimaModules/Skills/SkillExtension.cs index 5af4ca5..959e034 100644 --- a/OshimaModules/Skills/SkillExtension.cs +++ b/OshimaModules/Skills/SkillExtension.cs @@ -62,22 +62,22 @@ namespace Oshima.FunGame.OshimaModules.Skills switch (skill.SkillRangeType) { case SkillRangeType.Diamond: - str = "目标菱形区域"; + str = $"目标半径为 {skill.CanSelectTargetRange} 格的菱形区域"; break; case SkillRangeType.Circle: - str = "目标圆形区域"; + str = $"目标半径为 {skill.CanSelectTargetRange} 格的圆形区域"; break; case SkillRangeType.Square: - str = "目标正方形区域"; + str = $"目标边长为 {skill.CanSelectTargetRange * 2 + 1} 格的正方形区域"; break; case SkillRangeType.Line: - str = "自身与目标地点之间的直线区域"; + str = $"自身与目标地点之间的、宽度为 {skill.CanSelectTargetRange} 格的直线区域"; break; case SkillRangeType.LinePass: - str = "自身与目标地点之间的直线区域以及贯穿该目标地点直至地图边缘的直线区域"; + str = $"自身与目标地点之间的、宽度为 {skill.CanSelectTargetRange} 格的直线区域以及贯穿该目标地点直至地图边缘的等宽直线区域"; break; case SkillRangeType.Sector: - str = "目标扇形区域"; + str = $"目标最大半径为 {skill.CanSelectTargetRange} 格的扇形区域"; break; default: break; diff --git a/OshimaModules/Skills/XReouni/八卦阵.cs b/OshimaModules/Skills/XReouni/八卦阵.cs new file mode 100644 index 0000000..d607812 --- /dev/null +++ b/OshimaModules/Skills/XReouni/八卦阵.cs @@ -0,0 +1,70 @@ +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Constant; + +namespace Oshima.FunGame.OshimaModules.Skills +{ + public class 八卦阵 : Skill + { + public override long Id => (long)PassiveID.八卦阵; + public override string Name => "八卦阵"; + public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; + + public 八卦阵(Character? character = null) : base(SkillType.Passive, character) + { + Effects.Add(new 八卦阵特效(this)); + } + + public override IEnumerable AddPassiveEffectToCharacter() + { + return Effects; + } + } + + public class 八卦阵特效(Skill skill) : Effect(skill) + { + public override long Id => Skill.Id; + public override string Name => Skill.Name; + public override string Description => $"每次造成伤害或受到伤害时,投掷 1d10,结果为偶数时,造成的伤害提升 {伤害提升 * 100:0.##}%,受到伤害减少 {伤害减少 * 100:0.##}%;反之不产生任何效果。"; + + public bool 归元 { get; set; } = false; + public double 伤害提升 { get; set; } = 1; + public double 伤害减少 { get; set; } = 0.5; + + public override double AlterActualDamageAfterCalculation(Character character, Character enemy, double damage, bool isNormalAttack, DamageType damageType, MagicType magicType, DamageResult damageResult, ref bool isEvaded, Dictionary totalDamageBonus) + { + double bouns = 0; + if (damage > 0 && (归元 || (!归元 && Random.Shared.Next(10) % 2 == 0))) + { + Character c = character; + if (character == Skill.Character) + { + bouns = damage * 伤害提升; + WriteLine($"[ {character} ] 发动了八卦阵!伤害提升了 {bouns:0.##} 点!"); + } + else if (enemy == Skill.Character) + { + c = enemy; + bouns = -(damage * 伤害减少); + WriteLine($"[ {character} ] 发动了八卦阵!伤害减少了 {bouns:0.##} 点!"); + } + if (归元) + { + WriteLine($"[ {character} ] 发动了归元环!冷却时间减少了 {归元环特效.冷却时间减少:0.##} {GameplayEquilibriumConstant.InGameTime}!"); + foreach (Skill s in c.Skills) + { + if (s.CurrentCD >= 归元环特效.冷却时间阈值) + { + s.CurrentCD -= 归元环特效.冷却时间减少; + if (s.CurrentCD < 0) + { + s.CurrentCD = 0; + s.Enable = true; + } + } + } + } + } + return bouns; + } + } +} diff --git a/OshimaModules/Skills/XReouni/归元环.cs b/OshimaModules/Skills/XReouni/归元环.cs new file mode 100644 index 0000000..652460c --- /dev/null +++ b/OshimaModules/Skills/XReouni/归元环.cs @@ -0,0 +1,74 @@ +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Common.Addon; +using Milimoe.FunGame.Core.Library.Constant; +using Milimoe.FunGame.Core.Model; + +namespace Oshima.FunGame.OshimaModules.Skills +{ + public class 归元环 : Skill + { + public override long Id => (long)SuperSkillID.归元环; + public override string Name => "归元环"; + public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; + public override string DispelDescription => Effects.Count > 0 ? Effects.First().DispelDescription : ""; + public override double EPCost => 100; + public override double CD => 60; + public override double HardnessTime { get; set; } = 10; + public override bool CanSelectSelf => true; + public override bool CanSelectEnemy => false; + + public 归元环(Character? character = null) : base(SkillType.SuperSkill, character) + { + Effects.Add(new 归元环特效(this)); + } + } + + public class 归元环特效(Skill skill) : Effect(skill) + { + public override long Id => Skill.Id; + public override string Name => Skill.Name; + public override string Description => $"{Duration:0.##} {GameplayEquilibriumConstant.InGameTime}内,造成伤害必定暴击;使 [ 八卦阵 ] 不需要检定,直接产生偶数效果;并减少所有当前冷却时间高于 {冷却时间阈值:0.##} {GameplayEquilibriumConstant.InGameTime}的主动技能 {冷却时间减少:0.##} {GameplayEquilibriumConstant.InGameTime}冷却时间。"; + public override bool Durative => true; + public override double Duration => 30; + public override DispelledType DispelledType => DispelledType.CannotBeDispelled; + + public const double 冷却时间阈值 = 6; + public const double 冷却时间减少 = 3; + + public override void OnEffectGained(Character character) + { + if (character.Effects.Where(e => e is 八卦阵特效).FirstOrDefault() is 八卦阵特效 e) + { + e.归元 = true; + } + } + + public override void OnEffectLost(Character character) + { + if (character.Effects.Where(e => e is 八卦阵特效).FirstOrDefault() is 八卦阵特效 e) + { + e.归元 = false; + } + } + + public override bool BeforeCriticalCheck(Character actor, Character enemy, ref double throwingBonus) + { + if (actor == Skill.Character) + { + throwingBonus += 200; + } + return true; + } + + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + { + RemainDuration = Duration; + if (!caster.Effects.Contains(this)) + { + caster.Effects.Add(this); + OnEffectGained(caster); + } + RecordCharacterApplyEffects(caster, EffectType.CritBoost, EffectType.DamageBoost, EffectType.DefenseBoost); + } + } +} diff --git a/OshimaModules/Skills/XinYin/天赐之力.cs b/OshimaModules/Skills/XinYin/天赐之力.cs index b3eabaa..6d1922a 100644 --- a/OshimaModules/Skills/XinYin/天赐之力.cs +++ b/OshimaModules/Skills/XinYin/天赐之力.cs @@ -84,7 +84,7 @@ namespace Oshima.FunGame.OshimaModules.Skills baseHardnessTime *= 0.8; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { RemainDuration = Duration; if (!caster.Effects.Contains(this)) diff --git a/OshimaModules/Skills/Yang/魔法涌流.cs b/OshimaModules/Skills/Yang/魔法涌流.cs index 57f8132..3c24a0c 100644 --- a/OshimaModules/Skills/Yang/魔法涌流.cs +++ b/OshimaModules/Skills/Yang/魔法涌流.cs @@ -66,7 +66,7 @@ namespace Oshima.FunGame.OshimaModules.Skills return 0; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { RemainDuration = Duration; if (!caster.Effects.Contains(this)) diff --git a/OshimaModules/Skills/dddovo/平衡强化.cs b/OshimaModules/Skills/dddovo/平衡强化.cs index 3d0b3a9..18e7261 100644 --- a/OshimaModules/Skills/dddovo/平衡强化.cs +++ b/OshimaModules/Skills/dddovo/平衡强化.cs @@ -66,7 +66,7 @@ namespace Oshima.FunGame.OshimaModules.Skills character.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP); } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { RemainDuration = Duration; if (!caster.Effects.Contains(this)) diff --git a/OshimaModules/Skills/战技/养命功.cs b/OshimaModules/Skills/战技/养命功.cs index 07b0bb9..d9fa637 100644 --- a/OshimaModules/Skills/战技/养命功.cs +++ b/OshimaModules/Skills/战技/养命功.cs @@ -10,8 +10,8 @@ namespace Oshima.FunGame.OshimaModules.Skills public override string Name => "养命功"; public override string Description => string.Join("", Effects.Select(e => e.Description)); public override string DispelDescription => Effects.Count > 0 ? Effects.First(e => e is 施加持续性弱驱散).DispelDescription : ""; - public override double EPCost => 55; - public override double CD => 45; + public override double EPCost => 40; + public override double CD => 35; public override double HardnessTime { get; set; } = 10; public override bool CanSelectSelf => true; public override bool CanSelectEnemy => false; diff --git a/OshimaModules/Skills/战技/助威.cs b/OshimaModules/Skills/战技/助威.cs index 8f7683b..ddcae08 100644 --- a/OshimaModules/Skills/战技/助威.cs +++ b/OshimaModules/Skills/战技/助威.cs @@ -11,7 +11,7 @@ namespace Oshima.FunGame.OshimaModules.Skills public override string Name => "助威"; public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; public override string DispelDescription => Effects.Count > 0 ? Effects.First().DispelDescription : ""; - public override double EPCost => 75; + public override double EPCost => 60; public override double CD => 35; public override double HardnessTime { get; set; } = 7; public override bool CanSelectSelf => true; @@ -49,7 +49,7 @@ namespace Oshima.FunGame.OshimaModules.Skills GamingQueue = skill.GamingQueue; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character target in targets) { diff --git a/OshimaModules/Skills/战技/双连击.cs b/OshimaModules/Skills/战技/双连击.cs index 7794bf7..8f2d4ae 100644 --- a/OshimaModules/Skills/战技/双连击.cs +++ b/OshimaModules/Skills/战技/双连击.cs @@ -36,7 +36,7 @@ namespace Oshima.FunGame.OshimaModules.Skills GamingQueue = skill.GamingQueue; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { if (GamingQueue != null) { diff --git a/OshimaModules/Skills/战技/挑拨.cs b/OshimaModules/Skills/战技/挑拨.cs index 933366c..7ac132e 100644 --- a/OshimaModules/Skills/战技/挑拨.cs +++ b/OshimaModules/Skills/战技/挑拨.cs @@ -12,7 +12,7 @@ namespace Oshima.FunGame.OshimaModules.Skills public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; public override string DispelDescription => Effects.Count > 0 ? Effects.First().DispelDescription : ""; public override double EPCost => 65; - public override double CD => 55; + public override double CD => 40; public override double HardnessTime { get; set; } = 10; public override bool CanSelectSelf => false; public override bool CanSelectTeammate => false; @@ -48,27 +48,30 @@ namespace Oshima.FunGame.OshimaModules.Skills GamingQueue = skill.GamingQueue; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character target in targets) { - WriteLine($"[ {caster} ] 嘲讽了 [ {target} ] ,[ {target} ] 愤怒了!!持续时间:{持续时间}!"); 愤怒 e = new(Skill, caster, caster); - if (_durative && _duration > 0) + if (!CheckExemption(caster, target, e)) { - e.Durative = true; - e.Duration = 实际持续时间; - e.RemainDuration = 实际持续时间; + WriteLine($"[ {caster} ] 嘲讽了 [ {target} ] ,[ {target} ] 愤怒了!!持续时间:{持续时间}!"); + if (_durative && _duration > 0) + { + e.Durative = true; + e.Duration = 实际持续时间; + e.RemainDuration = 实际持续时间; + } + else if (!_durative && _durationTurn > 0) + { + e.Durative = false; + e.DurationTurn = (int)实际持续时间; + e.RemainDurationTurn = (int)实际持续时间; + } + target.Effects.Add(e); + e.OnEffectGained(target); + GamingQueue?.LastRound.AddApplyEffects(target, e.EffectType); } - else if (!_durative && _durationTurn > 0) - { - e.Durative = false; - e.DurationTurn = (int)实际持续时间; - e.RemainDurationTurn = (int)实际持续时间; - } - target.Effects.Add(e); - e.OnEffectGained(target); - GamingQueue?.LastRound.AddApplyEffects(target, e.EffectType); } } } diff --git a/OshimaModules/Skills/战技/疾走.cs b/OshimaModules/Skills/战技/疾走.cs index f7b3977..23279cd 100644 --- a/OshimaModules/Skills/战技/疾走.cs +++ b/OshimaModules/Skills/战技/疾走.cs @@ -62,7 +62,7 @@ namespace Oshima.FunGame.OshimaModules.Skills character.ExMOV -= 本次提升; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { 本次提升 = 0; if (!caster.Effects.Contains(this)) diff --git a/OshimaModules/Skills/战技/疾风步.cs b/OshimaModules/Skills/战技/疾风步.cs index a37807f..945c90f 100644 --- a/OshimaModules/Skills/战技/疾风步.cs +++ b/OshimaModules/Skills/战技/疾风步.cs @@ -44,7 +44,7 @@ namespace Oshima.FunGame.OshimaModules.Skills AddEffectTypeToCharacter(character, [EffectType]); character.ExSPD += 100; character.ExCritRate += 0.08; - GamingQueue?.InterruptCastingAsync(character); + GamingQueue?.InterruptCasting(character); } public override void OnEffectLost(Character character) @@ -75,7 +75,7 @@ namespace Oshima.FunGame.OshimaModules.Skills return 0; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { if (!caster.Effects.Contains(this)) { diff --git a/OshimaModules/Skills/战技/绝影.cs b/OshimaModules/Skills/战技/绝影.cs index 25b85a0..0051f7b 100644 --- a/OshimaModules/Skills/战技/绝影.cs +++ b/OshimaModules/Skills/战技/绝影.cs @@ -14,7 +14,7 @@ namespace Oshima.FunGame.OshimaModules.Skills public override double EPCost => 60; public override double CD => 18; public override double HardnessTime { get; set; } = 7; - public override int CanSelectTargetRange => 4; + public override int CanSelectTargetRange => 1; public override bool IsNonDirectional => true; public override SkillRangeType SkillRangeType => SkillRangeType.LinePass; diff --git a/OshimaModules/Skills/战技/金刚击.cs b/OshimaModules/Skills/战技/金刚击.cs index 401d87f..9214ef2 100644 --- a/OshimaModules/Skills/战技/金刚击.cs +++ b/OshimaModules/Skills/战技/金刚击.cs @@ -10,6 +10,7 @@ namespace Oshima.FunGame.OshimaModules.Skills public override string Name => "金刚击"; public override string Description => string.Join("", Effects.Select(e => e.Description)); public override string DispelDescription => Effects.Count > 0 ? Effects.First().DispelDescription : ""; + public override string ExemptionDescription => Effects.Count > 0 ? Effects.First(e => e is 打断施法).ExemptionDescription : ""; public override double EPCost => 60; public override double CD => 20; public override double HardnessTime { get; set; } = 8; diff --git a/OshimaModules/Skills/战技/闪现.cs b/OshimaModules/Skills/战技/闪现.cs index 5b1becf..8cd0694 100644 --- a/OshimaModules/Skills/战技/闪现.cs +++ b/OshimaModules/Skills/战技/闪现.cs @@ -1,6 +1,8 @@ using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Interface.Entity; using Milimoe.FunGame.Core.Library.Common.Addon; using Milimoe.FunGame.Core.Library.Constant; +using Milimoe.FunGame.Core.Model; namespace Oshima.FunGame.OshimaModules.Skills { @@ -19,10 +21,11 @@ namespace Oshima.FunGame.OshimaModules.Skills public override bool CanSelectTeammate => false; public override int CanSelectTargetRange => 0; public override bool SelectIncludeCharacterGrid => false; + public override bool AllowSelectNoCharacterGrid => true; public 闪现(Character? character = null) : base(SkillType.Skill, character) { - CastRange = 7; + CastRange = 9; Effects.Add(new 闪现特效(this)); } } @@ -31,15 +34,19 @@ namespace Oshima.FunGame.OshimaModules.Skills { public override long Id => Skill.Id; public override string Name => Skill.Name; - public override string Description => $"立即将角色传送到范围内的任意一个没有被角色占据的指定地点。"; + public override string Description => $"立即将角色传送到范围内的任意一个没有被角色占据的指定地点,并附赠一次战技的决策点配额。"; public override string DispelDescription => ""; - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { if (GamingQueue?.Map is GameMap map && grids.Count > 0) { map.CharacterMove(caster, map.GetCharacterCurrentGrid(caster), grids[0]); } + if (GamingQueue != null && GamingQueue.CharacterDecisionPoints.TryGetValue(caster, out DecisionPoints? dp) && dp != null) + { + dp.AddTempActionQuota(CharacterActionType.CastSkill); + } } } } diff --git a/OshimaModules/Skills/战技/魔眼.cs b/OshimaModules/Skills/战技/魔眼.cs index 92e71ec..06f9952 100644 --- a/OshimaModules/Skills/战技/魔眼.cs +++ b/OshimaModules/Skills/战技/魔眼.cs @@ -17,7 +17,7 @@ namespace Oshima.FunGame.OshimaModules.Skills public 魔眼(Character? character = null) : base(SkillType.Skill, character) { ExemptionDescription = $"迟滞{SkillSet.GetExemptionDescription(EffectType.Delay)}\r\n混乱{SkillSet.GetExemptionDescription(EffectType.Confusion)}"; - CastRange = 2; + CastRange = 4; Effects.Add(new 施加概率负面(this, EffectType.Delay, false, 0, 3, 0, 1, 0, 0.5)); Effects.Add(new 施加概率负面(this, EffectType.Confusion, false, 0, 2, 0, 0.45, 0.05)); } diff --git a/OshimaModules/Skills/魔法/反魔法领域.cs b/OshimaModules/Skills/魔法/反魔法领域.cs index 8a7fa06..cd74994 100644 --- a/OshimaModules/Skills/魔法/反魔法领域.cs +++ b/OshimaModules/Skills/魔法/反魔法领域.cs @@ -48,6 +48,9 @@ namespace Oshima.FunGame.OshimaModules.Skills } private double 魔法消耗基础 { get; set; } = 85; private double 魔法消耗等级成长 { get; set; } = 80; + public override bool IsNonDirectional => true; + public override SkillRangeType SkillRangeType => SkillRangeType.Circle; + public override int CanSelectTargetRange => 3; public 反魔法领域(Character? character = null) : base(SkillType.Magic, character) { diff --git a/OshimaModules/Skills/魔法/圣灵术.cs b/OshimaModules/Skills/魔法/圣灵术.cs index c713ede..a455e3f 100644 --- a/OshimaModules/Skills/魔法/圣灵术.cs +++ b/OshimaModules/Skills/魔法/圣灵术.cs @@ -12,7 +12,7 @@ namespace Oshima.FunGame.OshimaModules.Skills public override string DispelDescription => Effects.FirstOrDefault(e => e is 弱驱散特效)?.DispelDescription ?? ""; public override double MPCost => Level > 0 ? 110 + (95 * (Level - 1)) : 110; public override double CD => Level > 0 ? 65 - (2 * (Level - 1)) : 65; - public override double CastTime => 5; + public override double CastTime => 3; public override double HardnessTime { get; set; } = 7; public override bool CanSelectSelf => true; public override bool CanSelectEnemy => false; diff --git a/OshimaModules/Skills/魔法/地狱之门.cs b/OshimaModules/Skills/魔法/地狱之门.cs index e5b1b57..23c3f62 100644 --- a/OshimaModules/Skills/魔法/地狱之门.cs +++ b/OshimaModules/Skills/魔法/地狱之门.cs @@ -30,6 +30,9 @@ namespace Oshima.FunGame.OshimaModules.Skills }; } } + public override bool IsNonDirectional => true; + public override SkillRangeType SkillRangeType => SkillRangeType.Sector; + public override int CanSelectTargetRange => 4; public 地狱之门(Character? character = null) : base(SkillType.Magic, character) { diff --git a/OshimaModules/Skills/魔法/大地之墙.cs b/OshimaModules/Skills/魔法/大地之墙.cs index 483ea4e..f7cd417 100644 --- a/OshimaModules/Skills/魔法/大地之墙.cs +++ b/OshimaModules/Skills/魔法/大地之墙.cs @@ -68,6 +68,9 @@ namespace Oshima.FunGame.OshimaModules.Skills }; } } + public override bool IsNonDirectional => true; + public override SkillRangeType SkillRangeType => SkillRangeType.Circle; + public override int CanSelectTargetRange => 3; public 大地之墙(Character? character = null) : base(SkillType.Magic, character) { @@ -112,7 +115,7 @@ namespace Oshima.FunGame.OshimaModules.Skills } } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { _targets = targets; foreach (Character target in targets) diff --git a/OshimaModules/Skills/魔法/岩石之息.cs b/OshimaModules/Skills/魔法/岩石之息.cs index 37bdcf7..1f702c0 100644 --- a/OshimaModules/Skills/魔法/岩石之息.cs +++ b/OshimaModules/Skills/魔法/岩石之息.cs @@ -14,6 +14,9 @@ namespace Oshima.FunGame.OshimaModules.Skills public override double CastTime => 9; public override double HardnessTime { get; set; } = 5; public override int CanSelectTargetCount => 3; + public override bool IsNonDirectional => true; + public override SkillRangeType SkillRangeType => SkillRangeType.LinePass; + public override int CanSelectTargetRange => 2; public 岩石之息(Character? character = null) : base(SkillType.Magic, character) { diff --git a/OshimaModules/Skills/魔法/弧光消耗.cs b/OshimaModules/Skills/魔法/弧光消耗.cs index 5601aec..b68f971 100644 --- a/OshimaModules/Skills/魔法/弧光消耗.cs +++ b/OshimaModules/Skills/魔法/弧光消耗.cs @@ -14,11 +14,14 @@ namespace Oshima.FunGame.OshimaModules.Skills public override double CastTime => 4; public override double HardnessTime { get; set; } = 5; public override int CanSelectTargetCount => 3; + public override bool IsNonDirectional => true; + public override SkillRangeType SkillRangeType => SkillRangeType.Circle; + public override int CanSelectTargetRange => 3; public 弧光消耗(Character? character = null) : base(SkillType.Magic, character) { - Effects.Add(new 吸取魔法值(this, 25, 20, false, 0.7)); - Effects.Add(new 吸取能量值(this, 4, 2, false, 0.3)); + Effects.Add(new 吸取魔法值(this, 35, 30, false, 0.7)); + Effects.Add(new 吸取能量值(this, 4, 3, false, 0.3)); } } } diff --git a/OshimaModules/Skills/魔法/强音之力.cs b/OshimaModules/Skills/魔法/强音之力.cs index 80a684b..434dea6 100644 --- a/OshimaModules/Skills/魔法/强音之力.cs +++ b/OshimaModules/Skills/魔法/强音之力.cs @@ -52,7 +52,7 @@ namespace Oshima.FunGame.OshimaModules.Skills _levelGrowth = levelGrowth; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character target in targets) { diff --git a/OshimaModules/Skills/魔法/强音之力复.cs b/OshimaModules/Skills/魔法/强音之力复.cs index b144921..4e904af 100644 --- a/OshimaModules/Skills/魔法/强音之力复.cs +++ b/OshimaModules/Skills/魔法/强音之力复.cs @@ -12,7 +12,7 @@ namespace Oshima.FunGame.OshimaModules.Skills public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; public override double MPCost => Level > 0 ? 85 + (85 * (Level - 1)) : 85; public override double CD => Level > 0 ? 45 - (0.5 * (Level - 1)) : 45; - public override double CastTime => Level > 0 ? 6 + (0.5 * (Level - 1)) : 6; + public override double CastTime => Level > 0 ? 3 + (0.5 * (Level - 1)) : 3; public override double HardnessTime { get; set; } = 6; public override bool CanSelectSelf => true; public override bool CanSelectEnemy => false; @@ -67,7 +67,7 @@ namespace Oshima.FunGame.OshimaModules.Skills _levelGrowth = levelGrowth; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character target in targets) { diff --git a/OshimaModules/Skills/魔法/时间减速.cs b/OshimaModules/Skills/魔法/时间减速.cs index 508713d..aa9fe22 100644 --- a/OshimaModules/Skills/魔法/时间减速.cs +++ b/OshimaModules/Skills/魔法/时间减速.cs @@ -12,12 +12,12 @@ namespace Oshima.FunGame.OshimaModules.Skills public override string ExemptionDescription => Effects.Count > 0 ? Effects.First().ExemptionDescription : ""; public override double MPCost => Level > 0 ? 65 + (75 * (Level - 1)) : 65; public override double CD => Level > 0 ? 28 - (1 * (Level - 1)) : 28; - public override double CastTime => Level > 0 ? 3 + (1.5 * (Level - 1)) : 3; + public override double CastTime => Level > 0 ? 2 + (2 * (Level - 1)) : 2; public override double HardnessTime { get; set; } = 5; public 时间减速(Character? character = null) : base(SkillType.Magic, character) { - Effects.Add(new 降低敌方行动速度(this, 60, 30)); + Effects.Add(new 降低敌方行动速度(this, 65, 35)); } } } diff --git a/OshimaModules/Skills/魔法/时间减速复.cs b/OshimaModules/Skills/魔法/时间减速复.cs index 0c86481..72e138e 100644 --- a/OshimaModules/Skills/魔法/时间减速复.cs +++ b/OshimaModules/Skills/魔法/时间减速复.cs @@ -13,7 +13,7 @@ namespace Oshima.FunGame.OshimaModules.Skills public override string ExemptionDescription => Effects.Count > 0 ? Effects.First().ExemptionDescription : ""; public override double MPCost => Level > 0 ? 85 + (95 * (Level - 1)) : 85; public override double CD => Level > 0 ? 32 - (1 * (Level - 1)) : 32; - public override double CastTime => Level > 0 ? 6 + (1.5 * (Level - 1)) : 6; + public override double CastTime => Level > 0 ? 4 + (1 * (Level - 1)) : 4; public override double HardnessTime { get; set; } = 6; public override int CanSelectTargetCount { @@ -34,7 +34,7 @@ namespace Oshima.FunGame.OshimaModules.Skills public 时间减速复(Character? character = null) : base(SkillType.Magic, character) { - Effects.Add(new 时间减速复特效(this, false, 0, 3, 0, 40, 20, 0.08, 0.01)); + Effects.Add(new 时间减速复特效(this, false, 0, 3, 0, 40, 30, 0.08, 0.01)); } } @@ -77,12 +77,10 @@ namespace Oshima.FunGame.OshimaModules.Skills _accLevelGrowth = accLevelGrowth; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character target in targets) { - WriteLine($"[ {target} ] 的行动速度降低了 {ExSPD:0.##} 点,行动等待时间(当前硬直时间)被延长了 30%!持续时间:{持续时间}!"); - WriteLine($"[ {target} ] 的加速系数降低了 {ExACC * 100:0.##}%!持续时间:{持续时间}!"); Effect e1 = new ExSPD(Skill, new Dictionary() { { "exspd", -ExSPD } @@ -92,10 +90,14 @@ namespace Oshima.FunGame.OshimaModules.Skills Duration = 实际持续时间, DurationTurn = (int)实际持续时间 }; - target.Effects.Add(e1); - e1.OnEffectGained(target); - e1.IsDebuff = true; - GamingQueue?.ChangeCharacterHardnessTime(target, 0.3, true, false); + if (!CheckExemption(caster, target, e1)) + { + WriteLine($"[ {target} ] 的行动速度降低了 {ExSPD:0.##} 点,行动等待时间(当前硬直时间)被延长了 30%!持续时间:{持续时间}!"); + target.Effects.Add(e1); + e1.OnEffectGained(target); + e1.IsDebuff = true; + GamingQueue?.ChangeCharacterHardnessTime(target, 0.3, true, false); + } Effect e2 = new AccelerationCoefficient(Skill, new() { { "exacc", -ExACC } @@ -105,10 +107,14 @@ namespace Oshima.FunGame.OshimaModules.Skills Duration = 实际持续时间, DurationTurn = (int)实际持续时间 }; - target.Effects.Add(e2); - e2.OnEffectGained(target); - e2.IsDebuff = true; - GamingQueue?.LastRound.AddApplyEffects(target, EffectType.Slow); + if (!CheckExemption(caster, target, e2)) + { + WriteLine($"[ {target} ] 的加速系数降低了 {ExACC * 100:0.##}%!持续时间:{持续时间}!"); + target.Effects.Add(e2); + e2.OnEffectGained(target); + e2.IsDebuff = true; + GamingQueue?.LastRound.AddApplyEffects(target, EffectType.Slow); + } } } } diff --git a/OshimaModules/Skills/魔法/时间减速改.cs b/OshimaModules/Skills/魔法/时间减速改.cs index 791e0a5..eb20021 100644 --- a/OshimaModules/Skills/魔法/时间减速改.cs +++ b/OshimaModules/Skills/魔法/时间减速改.cs @@ -13,12 +13,12 @@ namespace Oshima.FunGame.OshimaModules.Skills public override string ExemptionDescription => Effects.Count > 0 ? Effects.First().ExemptionDescription : ""; public override double MPCost => Level > 0 ? 75 + (85 * (Level - 1)) : 75; public override double CD => Level > 0 ? 38 - (1 * (Level - 1)) : 38; - public override double CastTime => Level > 0 ? 7 + (1 * (Level - 1)) : 7; + public override double CastTime => Level > 0 ? 4 + (0.5 * (Level - 1)) : 4; public override double HardnessTime { get; set; } = 4; public 时间减速改(Character? character = null) : base(SkillType.Magic, character) { - Effects.Add(new 时间减速改特效(this, false, 0, 4, 0, 40, 25, 0.1, 0.02)); + Effects.Add(new 时间减速改特效(this, false, 0, 4, 0, 50, 40, 0.1, 0.02)); } } @@ -61,12 +61,10 @@ namespace Oshima.FunGame.OshimaModules.Skills _accLevelGrowth = accLevelGrowth; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character target in targets) { - WriteLine($"[ {target} ] 的行动速度降低了 {ExSPD:0.##} 点,行动等待时间(当前硬直时间)被延长了 30%!持续时间:{持续时间}!"); - WriteLine($"[ {target} ] 的加速系数降低了 {ExACC * 100:0.##}%!持续时间:{持续时间}!"); Effect e1 = new ExSPD(Skill, new Dictionary() { { "exspd", -ExSPD } @@ -76,10 +74,14 @@ namespace Oshima.FunGame.OshimaModules.Skills Duration = 实际持续时间, DurationTurn = (int)实际持续时间 }; - target.Effects.Add(e1); - e1.OnEffectGained(target); - e1.IsDebuff = true; - GamingQueue?.ChangeCharacterHardnessTime(target, 0.3, true, false); + if (!CheckExemption(caster, target, e1)) + { + WriteLine($"[ {target} ] 的行动速度降低了 {ExSPD:0.##} 点,行动等待时间(当前硬直时间)被延长了 30%!持续时间:{持续时间}!"); + target.Effects.Add(e1); + e1.OnEffectGained(target); + e1.IsDebuff = true; + GamingQueue?.ChangeCharacterHardnessTime(target, 0.3, true, false); + } Effect e2 = new AccelerationCoefficient(Skill, new() { { "exacc", -ExACC } @@ -89,10 +91,14 @@ namespace Oshima.FunGame.OshimaModules.Skills Duration = 实际持续时间, DurationTurn = (int)实际持续时间 }; - target.Effects.Add(e2); - e2.OnEffectGained(target); - e2.IsDebuff = true; - GamingQueue?.LastRound.AddApplyEffects(target, EffectType.Slow); + if (!CheckExemption(caster, target, e2)) + { + WriteLine($"[ {target} ] 的加速系数降低了 {ExACC * 100:0.##}%!持续时间:{持续时间}!"); + target.Effects.Add(e2); + e2.OnEffectGained(target); + e2.IsDebuff = true; + GamingQueue?.LastRound.AddApplyEffects(target, EffectType.Slow); + } } } } diff --git a/OshimaModules/Skills/魔法/时间加速.cs b/OshimaModules/Skills/魔法/时间加速.cs index 55ed6d3..7c0e0c8 100644 --- a/OshimaModules/Skills/魔法/时间加速.cs +++ b/OshimaModules/Skills/魔法/时间加速.cs @@ -11,7 +11,7 @@ namespace Oshima.FunGame.OshimaModules.Skills public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; public override double MPCost => Level > 0 ? 70 + (80 * (Level - 1)) : 70; public override double CD => Level > 0 ? 25 - (1 * (Level - 1)) : 25; - public override double CastTime => Level > 0 ? 2 + (1.5 * (Level - 1)) : 2; + public override double CastTime => Level > 0 ? 2 + (1 * (Level - 1)) : 2; public override double HardnessTime { get; set; } = 4; public override bool CanSelectSelf => true; public override bool CanSelectEnemy => false; diff --git a/OshimaModules/Skills/魔法/时间加速复.cs b/OshimaModules/Skills/魔法/时间加速复.cs index 649ec61..3229f87 100644 --- a/OshimaModules/Skills/魔法/时间加速复.cs +++ b/OshimaModules/Skills/魔法/时间加速复.cs @@ -12,7 +12,7 @@ namespace Oshima.FunGame.OshimaModules.Skills public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; public override double MPCost => Level > 0 ? 90 + (95 * (Level - 1)) : 90; public override double CD => Level > 0 ? 55 - (0.8 * (Level - 1)) : 55; - public override double CastTime => Level > 0 ? 6 + (1.5 * (Level - 1)) : 6; + public override double CastTime => Level > 0 ? 4 + (1 * (Level - 1)) : 4; public override double HardnessTime { get; set; } = 7; public override bool CanSelectSelf => true; public override bool CanSelectTeammate => true; @@ -78,7 +78,7 @@ namespace Oshima.FunGame.OshimaModules.Skills _accLevelGrowth = accLevelGrowth; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character target in targets) { diff --git a/OshimaModules/Skills/魔法/时间加速改.cs b/OshimaModules/Skills/魔法/时间加速改.cs index 0eb600e..54c1537 100644 --- a/OshimaModules/Skills/魔法/时间加速改.cs +++ b/OshimaModules/Skills/魔法/时间加速改.cs @@ -62,7 +62,7 @@ namespace Oshima.FunGame.OshimaModules.Skills _accLevelGrowth = accLevelGrowth; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character target in targets) { diff --git a/OshimaModules/Skills/魔法/根源屏障.cs b/OshimaModules/Skills/魔法/根源屏障.cs index 318cbc0..6bf83df 100644 --- a/OshimaModules/Skills/魔法/根源屏障.cs +++ b/OshimaModules/Skills/魔法/根源屏障.cs @@ -53,14 +53,14 @@ namespace Oshima.FunGame.OshimaModules.Skills GamingQueue = skill.GamingQueue; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { Effect effect = new 施加免疫(Skill, ImmuneType.Magical, false, 0, 实际持续时间); - await effect.OnSkillCasted(caster, targets, grids, others); + effect.OnSkillCasted(caster, targets, grids, others); if (Level > 4) { effect = new 施加免疫(Skill, ImmuneType.Skilled, false, 0, 1); - await effect.OnSkillCasted(caster, targets, grids, others); + effect.OnSkillCasted(caster, targets, grids, others); } } } diff --git a/OshimaModules/Skills/魔法/水蓝轰炸.cs b/OshimaModules/Skills/魔法/水蓝轰炸.cs index 7d3cf5a..5344bae 100644 --- a/OshimaModules/Skills/魔法/水蓝轰炸.cs +++ b/OshimaModules/Skills/魔法/水蓝轰炸.cs @@ -14,6 +14,9 @@ namespace Oshima.FunGame.OshimaModules.Skills public override double CastTime => 8; public override double HardnessTime { get; set; } = 4; public override int CanSelectTargetCount => 3; + public override bool IsNonDirectional => true; + public override SkillRangeType SkillRangeType => SkillRangeType.Circle; + public override int CanSelectTargetRange => 3; public 水蓝轰炸(Character? character = null) : base(SkillType.Magic, character) { diff --git a/OshimaModules/Skills/魔法/治愈术复.cs b/OshimaModules/Skills/魔法/治愈术复.cs index 4cc15d4..814dbb6 100644 --- a/OshimaModules/Skills/魔法/治愈术复.cs +++ b/OshimaModules/Skills/魔法/治愈术复.cs @@ -32,6 +32,9 @@ namespace Oshima.FunGame.OshimaModules.Skills }; } } + public override bool IsNonDirectional => true; + public override SkillRangeType SkillRangeType => SkillRangeType.Circle; + public override int CanSelectTargetRange => 3; public 治愈术复(Character? character = null) : base(SkillType.Magic, character) { diff --git a/OshimaModules/Skills/魔法/火山咆哮.cs b/OshimaModules/Skills/魔法/火山咆哮.cs index 1f187ae..9dff5aa 100644 --- a/OshimaModules/Skills/魔法/火山咆哮.cs +++ b/OshimaModules/Skills/魔法/火山咆哮.cs @@ -14,6 +14,9 @@ namespace Oshima.FunGame.OshimaModules.Skills public override double CastTime => 8; public override double HardnessTime { get; set; } = 4; public override int CanSelectTargetCount => 3; + public override bool IsNonDirectional => true; + public override SkillRangeType SkillRangeType => SkillRangeType.Circle; + public override int CanSelectTargetRange => 3; public 火山咆哮(Character? character = null) : base(SkillType.Magic, character) { diff --git a/OshimaModules/Skills/魔法/灾难冲击波.cs b/OshimaModules/Skills/魔法/灾难冲击波.cs index 48b953e..a80fe1f 100644 --- a/OshimaModules/Skills/魔法/灾难冲击波.cs +++ b/OshimaModules/Skills/魔法/灾难冲击波.cs @@ -37,7 +37,7 @@ namespace Oshima.FunGame.OshimaModules.Skills public 灾难冲击波(Character? character = null) : base(SkillType.Magic, character) { Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 50, 15, 0.1, 0.04)); - Effects.Add(new 灾难冲击波特效(this, false, 0, 2, 0, 0.03, 0.02)); + Effects.Add(new 灾难冲击波特效(this, false, 0, 4, 0, 0.1, 0.025)); } } @@ -71,32 +71,35 @@ namespace Oshima.FunGame.OshimaModules.Skills _MDFReductionPercentLevelGrowth = MDFReductionPercentLevelGrowth; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character target in targets) { - WriteLine($"[ {target} ] 的魔法抗性降低了 {ActualMDFReductionPercent * 100:0.##}%!持续时间:{持续时间}!"); ExMDF e = new(Skill, new(){ { "mdftype", 0 }, { "mdfvalue", -ActualMDFReductionPercent } }, caster); - target.Effects.Add(e); - if (_durative && _duration > 0) + if (!CheckExemption(caster, target, e)) { - e.Durative = true; - e.Duration = 实际持续时间; - e.RemainDuration = 实际持续时间; + WriteLine($"[ {target} ] 的魔法抗性降低了 {ActualMDFReductionPercent * 100:0.##}%!持续时间:{持续时间}!"); + target.Effects.Add(e); + if (_durative && _duration > 0) + { + e.Durative = true; + e.Duration = 实际持续时间; + e.RemainDuration = 实际持续时间; + } + else if (!_durative && _durationTurn > 0) + { + e.Durative = false; + e.DurationTurn = (int)实际持续时间; + e.RemainDurationTurn = (int)实际持续时间; + } + e.EffectType = EffectType.MagicResistBreak; + e.Source = caster; + e.OnEffectGained(target); + GamingQueue?.LastRound.AddApplyEffects(target, e.EffectType); } - else if (!_durative && _durationTurn > 0) - { - e.Durative = false; - e.DurationTurn = (int)实际持续时间; - e.RemainDurationTurn = (int)实际持续时间; - } - e.EffectType = EffectType.MagicResistBreak; - e.Source = caster; - e.OnEffectGained(target); - GamingQueue?.LastRound.AddApplyEffects(target, e.EffectType); } } } diff --git a/OshimaModules/Skills/魔法/神圣祝福.cs b/OshimaModules/Skills/魔法/神圣祝福.cs index eb4fdd6..30ede90 100644 --- a/OshimaModules/Skills/魔法/神圣祝福.cs +++ b/OshimaModules/Skills/魔法/神圣祝福.cs @@ -54,7 +54,7 @@ namespace Oshima.FunGame.OshimaModules.Skills _levelGrowth = levelGrowth; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character target in targets) { diff --git a/OshimaModules/Skills/魔法/神圣祝福复.cs b/OshimaModules/Skills/魔法/神圣祝福复.cs index 336c49b..779c1fd 100644 --- a/OshimaModules/Skills/魔法/神圣祝福复.cs +++ b/OshimaModules/Skills/魔法/神圣祝福复.cs @@ -12,7 +12,7 @@ namespace Oshima.FunGame.OshimaModules.Skills public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; public override double MPCost => Level > 0 ? 110 + (110 * (Level - 1)) : 110; public override double CD => Level > 0 ? 50 - (1.5 * (Level - 1)) : 50; - public override double CastTime => Level > 0 ? 6 + (1 * (Level - 1)) : 5; + public override double CastTime => Level > 0 ? 3 + (1 * (Level - 1)) : 3; public override double HardnessTime { get; set; } = 7; public override bool CanSelectSelf => true; public override bool CanSelectEnemy => false; @@ -69,7 +69,7 @@ namespace Oshima.FunGame.OshimaModules.Skills _levelGrowth = levelGrowth; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character target in targets) { diff --git a/OshimaModules/Skills/魔法/结晶防护.cs b/OshimaModules/Skills/魔法/结晶防护.cs index 40b0a86..cde6701 100644 --- a/OshimaModules/Skills/魔法/结晶防护.cs +++ b/OshimaModules/Skills/魔法/结晶防护.cs @@ -53,7 +53,7 @@ namespace Oshima.FunGame.OshimaModules.Skills _levelGrowth = levelGrowth; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character target in targets) { diff --git a/OshimaModules/Skills/魔法/结晶防护复.cs b/OshimaModules/Skills/魔法/结晶防护复.cs index 51a4799..9e738ce 100644 --- a/OshimaModules/Skills/魔法/结晶防护复.cs +++ b/OshimaModules/Skills/魔法/结晶防护复.cs @@ -12,7 +12,7 @@ namespace Oshima.FunGame.OshimaModules.Skills public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; public override double MPCost => Level > 0 ? 90 + (95 * (Level - 1)) : 90; public override double CD => Level > 0 ? 35 - (0.5 * (Level - 1)) : 35; - public override double CastTime => Level > 0 ? 4 + (1.5 * (Level - 1)) : 4; + public override double CastTime => Level > 0 ? 4 + (1 * (Level - 1)) : 4; public override double HardnessTime { get; set; } = 5; public override bool CanSelectSelf => true; public override bool CanSelectEnemy => false; @@ -68,7 +68,7 @@ namespace Oshima.FunGame.OshimaModules.Skills _levelGrowth = levelGrowth; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character target in targets) { diff --git a/OshimaModules/Skills/魔法/虚弱领域.cs b/OshimaModules/Skills/魔法/虚弱领域.cs index e9482cc..e11ac26 100644 --- a/OshimaModules/Skills/魔法/虚弱领域.cs +++ b/OshimaModules/Skills/魔法/虚弱领域.cs @@ -19,7 +19,7 @@ namespace Oshima.FunGame.OshimaModules.Skills public 虚弱领域(Character? character = null) : base(SkillType.Magic, character) { - Effects.Add(new 造成虚弱(this, true, 7, 0, 2, 0.1, 1, 0.1, 0.25)); + Effects.Add(new 造成虚弱(this, true, 7, 0, 2, 0.1, 1, 0.1, 0.25, 0.001)); } } } diff --git a/OshimaModules/Skills/魔法/银色荆棘.cs b/OshimaModules/Skills/魔法/银色荆棘.cs index 8d9c940..f702165 100644 --- a/OshimaModules/Skills/魔法/银色荆棘.cs +++ b/OshimaModules/Skills/魔法/银色荆棘.cs @@ -72,30 +72,33 @@ namespace Oshima.FunGame.OshimaModules.Skills _confusionProbabilityLevelGrowth = confusionProbabilityLevelGrowth; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character target in targets) { DamageToEnemy(caster, target, DamageType.Magical, MagicType, Damage); if (target.HP > 0 && Random.Shared.NextDouble() < ActualConfusionProbability) { - WriteLine($"[ {target} ] 陷入了混乱!!持续时间:{持续时间}!"); 混乱 e = new(Skill, caster); - if (_durative && _duration > 0) + if (!CheckExemption(caster, target, e)) { - e.Durative = true; - e.Duration = 实际持续时间; - e.RemainDuration = 实际持续时间; + WriteLine($"[ {target} ] 陷入了混乱!!持续时间:{持续时间}!"); + if (_durative && _duration > 0) + { + e.Durative = true; + e.Duration = 实际持续时间; + e.RemainDuration = 实际持续时间; + } + else if (!_durative && _durationTurn > 0) + { + e.Durative = false; + e.DurationTurn = (int)实际持续时间; + e.RemainDurationTurn = (int)实际持续时间; + } + target.Effects.Add(e); + e.OnEffectGained(target); + GamingQueue?.LastRound.AddApplyEffects(target, e.EffectType); } - else if (!_durative && _durationTurn > 0) - { - e.Durative = false; - e.DurationTurn = (int)实际持续时间; - e.RemainDurationTurn = (int)实际持续时间; - } - target.Effects.Add(e); - e.OnEffectGained(target); - GamingQueue?.LastRound.AddApplyEffects(target, e.EffectType); } } } diff --git a/OshimaModules/Skills/魔法/风之守护.cs b/OshimaModules/Skills/魔法/风之守护.cs index 4bf1398..933af76 100644 --- a/OshimaModules/Skills/魔法/风之守护.cs +++ b/OshimaModules/Skills/魔法/风之守护.cs @@ -53,7 +53,7 @@ namespace Oshima.FunGame.OshimaModules.Skills _levelGrowth = levelGrowth; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character target in targets) { diff --git a/OshimaModules/Skills/魔法/风之守护复.cs b/OshimaModules/Skills/魔法/风之守护复.cs index e990ba4..3df0504 100644 --- a/OshimaModules/Skills/魔法/风之守护复.cs +++ b/OshimaModules/Skills/魔法/风之守护复.cs @@ -12,7 +12,7 @@ namespace Oshima.FunGame.OshimaModules.Skills public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; public override double MPCost => Level > 0 ? 85 + (90 * (Level - 1)) : 85; public override double CD => Level > 0 ? 35 - (0.5 * (Level - 1)) : 35; - public override double CastTime => Level > 0 ? 4 + (1.5 * (Level - 1)) : 4; + public override double CastTime => Level > 0 ? 4 + (0.5 * (Level - 1)) : 4; public override double HardnessTime { get; set; } = 6; public override bool CanSelectSelf => true; public override bool CanSelectEnemy => false; @@ -68,7 +68,7 @@ namespace Oshima.FunGame.OshimaModules.Skills _levelGrowth = levelGrowth; } - public override async Task OnSkillCasted(Character caster, List targets, List grids, Dictionary others) + public override void OnSkillCasted(Character caster, List targets, List grids, Dictionary others) { foreach (Character target in targets) { diff --git a/OshimaServers/FastAutoServer.cs b/OshimaServers/FastAutoServer.cs index d27f880..e16e776 100644 --- a/OshimaServers/FastAutoServer.cs +++ b/OshimaServers/FastAutoServer.cs @@ -200,14 +200,14 @@ namespace Oshima.FunGame.OshimaServers foreach (Character c in inGameCharacters.Where(c => c != winner && c.HP > 0)) { SendAllGamingMessage(obj, data, "[ " + winner + " ] 对 [ " + c + " ] 造成了 99999999999 点真实伤害。"); - await actionQueue.DeathCalculationAsync(winner, c); + actionQueue.DeathCalculation(winner, c); } - await actionQueue.EndGameInfo(winner); + actionQueue.EndGameInfo(winner); break; } // 检查是否有角色可以行动 - Character? characterToAct = await actionQueue.NextCharacterAsync(); + Character? characterToAct = actionQueue.NextCharacter(); // 处理回合 if (characterToAct != null) @@ -220,7 +220,7 @@ namespace Oshima.FunGame.OshimaServers break; } - bool isGameEnd = await actionQueue.ProcessTurnAsync(characterToAct); + bool isGameEnd = actionQueue.ProcessTurn(characterToAct); if (isGameEnd) { break; @@ -230,7 +230,7 @@ namespace Oshima.FunGame.OshimaServers } // 模拟时间流逝 - totalTime += await actionQueue.TimeLapse(); + totalTime += actionQueue.TimeLapse(); if (actionQueue.Eliminated.Count > deaths) { diff --git a/OshimaServers/Service/FunGameActionQueue.cs b/OshimaServers/Service/FunGameActionQueue.cs index f8ac47a..f288471 100644 --- a/OshimaServers/Service/FunGameActionQueue.cs +++ b/OshimaServers/Service/FunGameActionQueue.cs @@ -94,15 +94,15 @@ namespace Oshima.FunGame.OshimaServers.Service foreach (Character c in characters.Where(c => c != winner && c.HP > 0)) { WriteLine("[ " + winner + " ] 对 [ " + c + " ] 造成了 99999999999 点真实伤害。"); - await actionQueue.DeathCalculationAsync(winner, c); + actionQueue.DeathCalculation(winner, c); } - await actionQueue.EndGameInfo(winner); + actionQueue.EndGameInfo(winner); Result.Add(_msg); break; } // 检查是否有角色可以行动 - Character? characterToAct = await actionQueue.NextCharacterAsync(); + Character? characterToAct = actionQueue.NextCharacter(); // 处理回合 if (characterToAct != null) @@ -110,7 +110,7 @@ namespace Oshima.FunGame.OshimaServers.Service WriteLine($"=== Round {i++} ==="); WriteLine($"现在是 [ {characterToAct} ] 的回合!"); - bool isGameEnd = await actionQueue.ProcessTurnAsync(characterToAct); + bool isGameEnd = actionQueue.ProcessTurn(characterToAct); if (isGameEnd) { @@ -141,7 +141,7 @@ namespace Oshima.FunGame.OshimaServers.Service } // 模拟时间流逝 - double timeLapse = await actionQueue.TimeLapse(); + double timeLapse = actionQueue.TimeLapse(); totalTime += timeLapse; if (roundMsg != "") @@ -311,7 +311,7 @@ namespace Oshima.FunGame.OshimaServers.Service } // 检查是否有角色可以行动 - Character? characterToAct = await actionQueue.NextCharacterAsync(); + Character? characterToAct = actionQueue.NextCharacter(); // 处理回合 if (characterToAct != null) @@ -319,7 +319,7 @@ namespace Oshima.FunGame.OshimaServers.Service WriteLine($"=== Round {i++} ==="); WriteLine("现在是 [ " + characterToAct + "(" + (actionQueue.GetTeam(characterToAct)?.Name ?? "") + ")" + " ] 的回合!"); - bool isGameEnd = await actionQueue.ProcessTurnAsync(characterToAct); + bool isGameEnd = actionQueue.ProcessTurn(characterToAct); if (isGameEnd) { @@ -353,7 +353,7 @@ namespace Oshima.FunGame.OshimaServers.Service } // 模拟时间流逝 - double timeLapse = await actionQueue.TimeLapse(); + double timeLapse = actionQueue.TimeLapse(); totalTime += timeLapse; if (roundMsg != "") diff --git a/OshimaServers/Service/FunGameSimulation.cs b/OshimaServers/Service/FunGameSimulation.cs index 4933683..6ed37d9 100644 --- a/OshimaServers/Service/FunGameSimulation.cs +++ b/OshimaServers/Service/FunGameSimulation.cs @@ -273,7 +273,7 @@ namespace Oshima.FunGame.OshimaServers.Service actionQueue.DisplayQueue(); if (PrintOut) Console.WriteLine(); - actionQueue.CharacterDeath += ActionQueue_CharacterDeath; + actionQueue.CharacterDeathEvent += ActionQueue_CharacterDeath; // 地图放置角色 if (actionQueue.Map != null) @@ -365,7 +365,7 @@ namespace Oshima.FunGame.OshimaServers.Service foreach (Character c in characters.Where(c => c != winner && c.HP > 0)) { WriteLine("[ " + winner + " ] 对 [ " + c + " ] 造成了 99999999999 点真实伤害。"); - await actionQueue.DeathCalculationAsync(winner, c); + actionQueue.DeathCalculation(winner, c); } result.Add(Msg); mgq?.EndGameInfo(winner); @@ -374,7 +374,7 @@ namespace Oshima.FunGame.OshimaServers.Service } // 检查是否有角色可以行动 - Character? characterToAct = await actionQueue.NextCharacterAsync(); + Character? characterToAct = actionQueue.NextCharacter(); // 处理回合 if (characterToAct != null) @@ -382,7 +382,7 @@ namespace Oshima.FunGame.OshimaServers.Service WriteLine($"=== Round {i++} [ Time: {totalTime} ] ==="); WriteLine("现在是 [ " + characterToAct + (tgq != null ? "(" + (tgq.GetTeam(characterToAct)?.Name ?? "") + ")" : "") + " ] 的回合!"); - bool isGameEnd = await actionQueue.ProcessTurnAsync(characterToAct); + bool isGameEnd = actionQueue.ProcessTurn(characterToAct); if (isGameEnd) { @@ -407,9 +407,10 @@ namespace Oshima.FunGame.OshimaServers.Service } // 模拟时间流逝 - double timeLapse = await actionQueue.TimeLapse(); + double timeLapse = actionQueue.TimeLapse(); totalTime = actionQueue.TotalTime; nextDropTime -= timeLapse; + Thread.Sleep(1); if (roundMsg != "") { @@ -703,30 +704,10 @@ namespace Oshima.FunGame.OshimaServers.Service } } - private static async Task TeamQueue_GameEndTeam(TeamGamingQueue queue, Team winner) - { - foreach (Character character in winner.Members) - { - Item? i1 = character.UnEquip(EquipSlotType.MagicCardPack); - Item? i2 = character.UnEquip(EquipSlotType.Weapon); - Item? i3 = character.UnEquip(EquipSlotType.Armor); - Item? i4 = character.UnEquip(EquipSlotType.Shoes); - Item? i5 = character.UnEquip(EquipSlotType.Accessory1); - Item? i6 = character.UnEquip(EquipSlotType.Accessory2); - queue.WriteLine(character.GetInfo()); - } - return await Task.FromResult(true); - } - - private static async Task ActionQueue_GameEnd(GamingQueue queue, Character winner) - { - return await Task.FromResult(true); - } - - private static async Task ActionQueue_CharacterDeath(GamingQueue queue, Character current, Character death) + private static bool ActionQueue_CharacterDeath(GamingQueue queue, Character current, Character death) { death.Items.Clear(); - return await Task.FromResult(true); + return true; } ///