From 45cae64205d9ad458b2e4f2e8ae71bc881198b4c Mon Sep 17 00:00:00 2001 From: milimoe Date: Fri, 4 Jul 2025 01:40:49 +0800 Subject: [PATCH] =?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 --- .../Effects/PassiveEffects/战斗不能.cs | 53 ++++ .../Effects/PassiveEffects/技能免疫.cs | 2 +- .../Effects/SkillEffects/施加免疫.cs | 13 +- .../Effects/SkillEffects/施加概率负面.cs | 226 ++++++++++++++++++ OshimaModules/Modules/SkillModule.cs | 13 + OshimaModules/Skills/魔法/冰狱冥嚎.cs | 23 ++ OshimaModules/Skills/魔法/地狱之门.cs | 39 +++ OshimaModules/Skills/魔法/导力停止.cs | 25 ++ OshimaModules/Skills/魔法/岩石之息.cs | 23 ++ OshimaModules/Skills/魔法/弧形日珥.cs | 23 ++ OshimaModules/Skills/魔法/死亡咆哮.cs | 39 +++ OshimaModules/Skills/魔法/水蓝轰炸.cs | 23 ++ OshimaModules/Skills/魔法/火山咆哮.cs | 23 ++ OshimaModules/Skills/魔法/破碎虚空.cs | 23 ++ OshimaModules/Skills/魔法/等离子之波.cs | 39 +++ OshimaModules/Skills/魔法/苍白地狱.cs | 23 ++ OshimaModules/Skills/魔法/钻石星尘.cs | 40 ++++ OshimaModules/Skills/魔法/银色荆棘.cs | 4 +- OshimaModules/Skills/魔法/鬼魅之痛.cs | 39 +++ OshimaServers/Service/FunGameService.cs | 4 +- 20 files changed, 692 insertions(+), 5 deletions(-) create mode 100644 OshimaModules/Effects/PassiveEffects/战斗不能.cs create mode 100644 OshimaModules/Effects/SkillEffects/施加概率负面.cs create mode 100644 OshimaModules/Skills/魔法/冰狱冥嚎.cs create mode 100644 OshimaModules/Skills/魔法/地狱之门.cs create mode 100644 OshimaModules/Skills/魔法/导力停止.cs create mode 100644 OshimaModules/Skills/魔法/岩石之息.cs create mode 100644 OshimaModules/Skills/魔法/弧形日珥.cs create mode 100644 OshimaModules/Skills/魔法/死亡咆哮.cs create mode 100644 OshimaModules/Skills/魔法/水蓝轰炸.cs create mode 100644 OshimaModules/Skills/魔法/火山咆哮.cs create mode 100644 OshimaModules/Skills/魔法/破碎虚空.cs create mode 100644 OshimaModules/Skills/魔法/等离子之波.cs create mode 100644 OshimaModules/Skills/魔法/苍白地狱.cs create mode 100644 OshimaModules/Skills/魔法/钻石星尘.cs create mode 100644 OshimaModules/Skills/魔法/鬼魅之痛.cs diff --git a/OshimaModules/Effects/PassiveEffects/战斗不能.cs b/OshimaModules/Effects/PassiveEffects/战斗不能.cs new file mode 100644 index 0000000..06fea43 --- /dev/null +++ b/OshimaModules/Effects/PassiveEffects/战斗不能.cs @@ -0,0 +1,53 @@ +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Constant; +using Oshima.FunGame.OshimaModules.Effects.OpenEffects; + +namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects +{ + public class 战斗不能 : Effect + { + public override long Id => (long)PassiveEffectID.战斗不能; + public override string Name => "战斗不能"; + public override string Description => $"此角色处于战斗不能状态,无法普通攻击和使用技能(魔法、战技和爆发技)。来自:[ {Source} ] 的 [ {Skill.Name} ]"; + public override EffectType EffectType => EffectType.Cripple; + public override DispelledType DispelledType => DispelledType.Strong; + public override bool IsDebuff => true; + public override Character Source => _sourceCharacter; + public override bool Durative => _durative; + public override double Duration => _duration; + public override int DurationTurn => _durationTurn; + + private readonly Character _sourceCharacter; + private readonly bool _durative; + private readonly double _duration; + private readonly int _durationTurn; + + public 战斗不能(Skill skill, Character sourceCharacter, bool durative = false, double duration = 0, int durationTurn = 1) : base(skill) + { + GamingQueue = skill.GamingQueue; + _sourceCharacter = sourceCharacter; + _durative = durative; + _duration = duration; + _durationTurn = durationTurn; + } + + public override void OnEffectGained(Character character) + { + if (_durative && RemainDuration == 0) + { + RemainDuration = Duration; + } + else if (RemainDurationTurn == 0) + { + RemainDurationTurn = DurationTurn; + } + AddEffectStatesToCharacter(character, [CharacterState.BattleRestricted]); + InterruptCasting(character, Source); + } + + public override void OnEffectLost(Character character) + { + RemoveEffectStatesFromCharacter(character); + } + } +} diff --git a/OshimaModules/Effects/PassiveEffects/技能免疫.cs b/OshimaModules/Effects/PassiveEffects/技能免疫.cs index 9b66af4..1fee7ae 100644 --- a/OshimaModules/Effects/PassiveEffects/技能免疫.cs +++ b/OshimaModules/Effects/PassiveEffects/技能免疫.cs @@ -11,7 +11,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects public override string Name => "技能免疫"; public override string Description => $"此角色处于技能免疫状态,无法选中其作为技能目标(自释放技能除外),并免疫来自技能的伤害。来自:[ {Source} ] 的 [ {Skill.Name} ]"; public override EffectType EffectType => EffectType.SkilledImmune; - public override DispelledType DispelledType => DispelledType.Strong; + public override DispelledType DispelledType => DispelledType.Weak; public override bool IsDebuff => false; public override Character Source => _sourceCharacter; public override bool Durative => _durative; diff --git a/OshimaModules/Effects/SkillEffects/施加免疫.cs b/OshimaModules/Effects/SkillEffects/施加免疫.cs index 8bd1d08..95a33fd 100644 --- a/OshimaModules/Effects/SkillEffects/施加免疫.cs +++ b/OshimaModules/Effects/SkillEffects/施加免疫.cs @@ -10,11 +10,12 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects public override long Id => Skill.Id; public override string Name => Skill.Name; public override string Description => $"对{Skill.TargetDescription()}施加{CharacterSet.GetImmuneTypeName(ImmuneType)},持续 {持续时间}。"; - public override DispelledType DispelledType => DispelledType.Strong; + public override DispelledType DispelledType => _dispelledType; private ImmuneType ImmuneType { get; set; } = ImmuneType.None; private string 持续时间 => _durative && _duration > 0 ? 实际持续时间 + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? 实际持续时间 + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}"); private double 实际持续时间 => _durative && _duration > 0 ? _duration + _levelGrowth * (Level - 1) : (!_durative && _durationTurn > 0 ? _durationTurn + _levelGrowth * (Level - 1) : 0); + private DispelledType _dispelledType = DispelledType.Weak; private readonly bool _durative; private readonly double _duration; private readonly int _durationTurn; @@ -28,6 +29,12 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects _duration = duration; _durationTurn = durationTurn; _levelGrowth = levelGrowth; + _dispelledType = type switch + { + ImmuneType.All => DispelledType.Strong, + ImmuneType.Special => DispelledType.Special, + _ => DispelledType.Weak + }; } public override void OnSkillCasted(Character caster, List targets, Dictionary others) @@ -42,6 +49,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects { EffectType = EffectType.PhysicalImmune; 物理免疫 e = new(Skill, caster, _durative, _duration + _levelGrowth * (Level - 1), Convert.ToInt32(_durationTurn + _levelGrowth * (Level - 1))); + _dispelledType = DispelledType.Weak; target.Effects.Add(e); e.OnEffectGained(target); break; @@ -50,6 +58,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects { EffectType = EffectType.MagicalImmune; 魔法免疫 e = new(Skill, caster, _durative, _duration + _levelGrowth * (Level - 1), Convert.ToInt32(_durationTurn + _levelGrowth * (Level - 1))); + _dispelledType = DispelledType.Weak; target.Effects.Add(e); e.OnEffectGained(target); break; @@ -58,6 +67,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects { EffectType = EffectType.SkilledImmune; 技能免疫 e = new(Skill, caster, _durative, _duration + _levelGrowth * (Level - 1), Convert.ToInt32(_durationTurn + _levelGrowth * (Level - 1))); + _dispelledType = DispelledType.Weak; target.Effects.Add(e); e.OnEffectGained(target); break; @@ -66,6 +76,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects { EffectType = EffectType.AllImmune; 完全免疫 e = new(Skill, caster, _durative, _duration + _levelGrowth * (Level - 1), Convert.ToInt32(_durationTurn + _levelGrowth * (Level - 1))); + _dispelledType = DispelledType.Strong; target.Effects.Add(e); e.OnEffectGained(target); break; diff --git a/OshimaModules/Effects/SkillEffects/施加概率负面.cs b/OshimaModules/Effects/SkillEffects/施加概率负面.cs new file mode 100644 index 0000000..0b81dd5 --- /dev/null +++ b/OshimaModules/Effects/SkillEffects/施加概率负面.cs @@ -0,0 +1,226 @@ +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Constant; +using Oshima.FunGame.OshimaModules.Effects.PassiveEffects; +using Oshima.FunGame.OshimaModules.Skills; + +namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects +{ + public class 施加概率负面 : Effect + { + public override long Id => Skill.Id; + public override string Name => Skill.Name; + public override string Description => $"{ActualProbability * 100:0.##}% 概率对{Skill.TargetDescription()}造成{GetEffectTypeName(_effectType)} {持续时间}。{(_description != "" ? _description : "")}"; + public override EffectType EffectType => _effectType; + public override DispelledType DispelledType => _dispelledType; + + private double ActualProbability => Level > 0 ? _probability + _probabilityLevelGrowth * (Level - 1) : _probability; + private string 持续时间 => _durative && _duration > 0 ? 实际持续时间 + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? 实际持续时间 + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}"); + private double 实际持续时间 => _durative && _duration > 0 ? _duration + _levelGrowth * (Level - 1) : (!_durative && _durationTurn > 0 ? _durationTurn + _levelGrowth * (Level - 1) : 0); + private readonly EffectType _effectType; + private readonly DispelledType _dispelledType = DispelledType.Weak; + private readonly bool _durative; + private readonly double _duration; + private readonly int _durationTurn; + private readonly double _levelGrowth; + private readonly double _probability; + private readonly double _probabilityLevelGrowth; + private readonly object[] _args; + private readonly string _description = ""; + + public 施加概率负面(Skill skill, EffectType effectType, bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0, double probability = 0, double probabilityLevelGrowth = 0, params object[] args) : base(skill) + { + GamingQueue = skill.GamingQueue; + _effectType = effectType; + _durative = durative; + _duration = duration; + _durationTurn = durationTurn; + _levelGrowth = levelGrowth; + _probability = probability; + _probabilityLevelGrowth = probabilityLevelGrowth; + _args = args; + switch (_effectType) + { + case EffectType.Silence: + _dispelledType = DispelledType.Weak; + _description = "封技:不能使用技能(魔法、战技和爆发技),并解除当前施法。"; + break; + case EffectType.Confusion: + _dispelledType = DispelledType.Strong; + _description = "混乱:进入行动受限状态,失控并随机行动,且在进行攻击指令时,可能会选取友方角色为目标。"; + break; + case EffectType.Taunt: + _dispelledType = DispelledType.Strong; + _description = "愤怒:进入行动受限状态,失控并随机行动,行动回合内仅能对嘲讽者发起普通攻击。"; + break; + case EffectType.Delay: + _dispelledType = DispelledType.Weak; + _description = "迟滞:延长普通攻击和技能的硬直时间、当前行动等待时间。"; + break; + case EffectType.Stun: + _dispelledType = DispelledType.Strong; + _description = "眩晕:进入完全行动不能状态。"; + break; + case EffectType.Freeze: + _dispelledType = DispelledType.Strong; + _description = "冻结:进入完全行动不能状态。"; + break; + case EffectType.Petrify: + _dispelledType = DispelledType.Strong; + _description = "石化:进入完全行动不能状态。"; + break; + case EffectType.Vulnerable: + DamageType damageType = DamageType.Magical; + if (_args.Length > 0 && _args[0] is DamageType dt) + { + damageType = dt; + } + double exDamagePercent = 0; + if (_args.Length > 1 && _args[1] is double percent) + { + exDamagePercent = percent; + } + if (exDamagePercent > 0) + { + _dispelledType = DispelledType.Weak; + _description = $"易伤:额外受到 {exDamagePercent * 100:0.##}% {CharacterSet.GetDamageTypeName(damageType)}。"; + } + break; + case EffectType.Bleed: + _dispelledType = DispelledType.Strong; + bool isPercentage = false; + double durationDamage = 0; + double durationDamagePercent = 0; + if (_args.Length > 0 && _args[0] is bool isPerc) + { + isPercentage = isPerc; + } + if (_args.Length > 1 && _args[1] is double durDamage) + { + durationDamage = durDamage; + } + if (_args.Length > 2 && _args[2] is double durDamagePercent) + { + durationDamagePercent = durDamagePercent; + } + if (isPercentage && durationDamagePercent > 0 || !isPercentage && durationDamage > 0) + { + string damageString = isPercentage ? $"流失 {durationDamagePercent * 100:0.##}% 当前生命值" : $"流失 {durationDamage:0.##} 点生命值"; + _description = $"气绝:进入行动受限状态并每{GameplayEquilibriumConstant.InGameTime}{damageString},此效果不会导致角色死亡。"; + } + break; + case EffectType.Cripple: + _dispelledType = DispelledType.Strong; + _description = "战斗不能:无法普通攻击和使用技能(魔法、战技和爆发技)。"; + break; + default: + break; + } + } + + public override void OnSkillCasted(Character caster, List targets, Dictionary others) + { + foreach (Character target in targets) + { + if (target.HP <= 0 || Random.Shared.NextDouble() > ActualProbability) continue; + Effect? e = null; + double duration = _duration + _levelGrowth * (Level - 1); + int durationTurn = Convert.ToInt32(_durationTurn + _levelGrowth * (Level - 1)); + switch (_effectType) + { + case EffectType.Silence: + WriteLine($"[ {caster} ] 对 [ {target} ] 造成了封技和施法解除!持续时间:{持续时间}!"); + e = new 封技(Skill, caster, _durative, duration, durationTurn); + break; + case EffectType.Confusion: + WriteLine($"[ {target} ] 陷入了混乱!!持续时间:{持续时间}!"); + e = new 混乱(Skill, caster, _durative, duration, durationTurn); + break; + case EffectType.Taunt: + WriteLine($"[ {target} ] 被 [ {caster} ] 嘲讽了!持续时间:{持续时间}!"); + e = new 愤怒(Skill, caster, target, _durative, duration, durationTurn); + break; + case EffectType.Delay: + WriteLine($"[ {caster} ] 对 [ {target} ] 造成了迟滞!持续时间:{持续时间}!"); + e = new 迟滞(Skill, caster, _durative, duration, durationTurn); + break; + case EffectType.Stun: + WriteLine($"[ {caster} ] 对 [ {target} ] 造成了眩晕!持续时间:{持续时间}!"); + e = new 眩晕(Skill, caster, _durative, duration, durationTurn); + break; + case EffectType.Freeze: + WriteLine($"[ {caster} ] 对 [ {target} ] 造成了冻结!持续时间:{持续时间}!"); + e = new 冻结(Skill, caster, _durative, duration, durationTurn); + break; + case EffectType.Petrify: + WriteLine($"[ {caster} ] 对 [ {target} ] 造成了石化!持续时间:{持续时间}!"); + e = new 石化(Skill, caster, _durative, duration, durationTurn); + break; + case EffectType.Vulnerable: + DamageType damageType = DamageType.Magical; + if (_args.Length > 0 && _args[0] is DamageType dt) + { + damageType = dt; + } + double exDamagePercent = 0; + if (_args.Length > 1 && _args[1] is double percent) + { + exDamagePercent = percent; + } + if (exDamagePercent > 0) + { + WriteLine($"[ {caster} ] 对 [ {target} ] 造成了易伤,额外受到 {exDamagePercent * 100:0.##}% {CharacterSet.GetDamageTypeName(damageType)}!持续时间:{持续时间}!"); + e = new 易伤(Skill, target, caster, _durative, duration, durationTurn, damageType, exDamagePercent); + } + break; + case EffectType.Bleed: + bool isPercentage = false; + double durationDamage = 0; + double durationDamagePercent = 0; + if (_args.Length > 0 && _args[0] is bool isPerc) + { + isPercentage = isPerc; + } + if (_args.Length > 1 && _args[1] is double durDamage) + { + durationDamage = durDamage; + } + if (_args.Length > 2 && _args[2] is double durDamagePercent) + { + durationDamagePercent = durDamagePercent; + } + if (isPercentage && durationDamagePercent > 0 || !isPercentage && durationDamage > 0) + { + string damageString = isPercentage ? $"流失 {durationDamagePercent * 100:0.##}% 当前生命值" : $"流失 {durationDamage:0.##} 点生命值"; + WriteLine($"[ {caster} ] 对 [ {target} ] 造成了气绝! [ {target} ] 进入行动受限状态且每{GameplayEquilibriumConstant.InGameTime}{damageString}!持续时间:{持续时间}!"); + e = new 气绝(Skill, target, caster, _durative, duration, durationTurn, isPercentage, durationDamage, durationDamagePercent); + } + break; + case EffectType.Cripple: + WriteLine($"[ {caster} ] 对 [ {target} ] 造成了战斗不能,禁止普通攻击和使用技能(魔法、战技和爆发技)!持续时间:{持续时间}!"); + e = new 战斗不能(Skill, caster, _durative, duration, durationTurn); + break; + default: + break; + } + if (e != null) + { + target.Effects.Add(e); + e.OnEffectGained(target); + GamingQueue?.LastRound.ApplyEffects.TryAdd(target, [e.EffectType]); + } + } + } + + private static string GetEffectTypeName(EffectType type) + { + return type switch + { + EffectType.Taunt => "愤怒", + EffectType.Silence => "封技", + EffectType.Bleed => "气绝", + EffectType.Cripple => "战斗不能", + _ => SkillSet.GetEffectTypeName(type) + }; + } + } +} diff --git a/OshimaModules/Modules/SkillModule.cs b/OshimaModules/Modules/SkillModule.cs index 769146f..616be7b 100644 --- a/OshimaModules/Modules/SkillModule.cs +++ b/OshimaModules/Modules/SkillModule.cs @@ -73,6 +73,19 @@ namespace Oshima.FunGame.OshimaModules (long)MagicID.根源屏障 => new 根源屏障(), (long)MagicID.灾难冲击波 => new 灾难冲击波(), (long)MagicID.银色荆棘 => new 银色荆棘(), + (long)MagicID.等离子之波 => new 等离子之波(), + (long)MagicID.地狱之门 => new 地狱之门(), + (long)MagicID.钻石星尘 => new 钻石星尘(), + (long)MagicID.死亡咆哮 => new 死亡咆哮(), + (long)MagicID.鬼魅之痛 => new 鬼魅之痛(), + (long)MagicID.导力停止 => new 导力停止(), + (long)MagicID.冰狱冥嚎 => new 冰狱冥嚎(), + (long)MagicID.火山咆哮 => new 火山咆哮(), + (long)MagicID.水蓝轰炸 => new 水蓝轰炸(), + (long)MagicID.岩石之息 => new 岩石之息(), + (long)MagicID.弧形日珥 => new 弧形日珥(), + (long)MagicID.苍白地狱 => new 苍白地狱(), + (long)MagicID.破碎虚空 => new 破碎虚空(), (long)MagicID.回复术改 => new 回复术改(), (long)SkillID.疾风步 => new 疾风步(), (long)SuperSkillID.力量爆发 => new 力量爆发(), diff --git a/OshimaModules/Skills/魔法/冰狱冥嚎.cs b/OshimaModules/Skills/魔法/冰狱冥嚎.cs new file mode 100644 index 0000000..b8e8bb9 --- /dev/null +++ b/OshimaModules/Skills/魔法/冰狱冥嚎.cs @@ -0,0 +1,23 @@ +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Constant; +using Oshima.FunGame.OshimaModules.Effects.SkillEffects; + +namespace Oshima.FunGame.OshimaModules.Skills +{ + public class 冰狱冥嚎 : Skill + { + public override long Id => (long)MagicID.冰狱冥嚎; + public override string Name => "冰狱冥嚎"; + public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; + public override double MPCost => Level > 0 ? 55 + (55 * (Level - 1)) : 55; + public override double CD => 35; + public override double CastTime => 10; + public override double HardnessTime { get; set; } = 5; + public override int CanSelectTargetCount => 3; + + public 冰狱冥嚎(Character? character = null) : base(SkillType.Magic, character) + { + Effects.Add(new 基于属性的伤害(this, PrimaryAttribute.INT, 40, 45, 0.2, 0.2)); + } + } +} diff --git a/OshimaModules/Skills/魔法/地狱之门.cs b/OshimaModules/Skills/魔法/地狱之门.cs new file mode 100644 index 0000000..cd8c242 --- /dev/null +++ b/OshimaModules/Skills/魔法/地狱之门.cs @@ -0,0 +1,39 @@ +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Constant; +using Oshima.FunGame.OshimaModules.Effects.SkillEffects; + +namespace Oshima.FunGame.OshimaModules.Skills +{ + public class 地狱之门 : Skill + { + public override long Id => (long)MagicID.地狱之门; + 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 MPCost => Level > 0 ? 75 + (60 * (Level - 1)) : 75; + public override double CD => Level > 0 ? 65 + (0.8 * (Level - 1)) : 65; + public override double CastTime => 3; + public override double HardnessTime { get; set; } = 8; + public override int CanSelectTargetCount + { + get + { + return Level switch + { + 4 => 2, + 5 => 2, + 6 => 3, + 7 => 3, + 8 => 4, + _ => 1 + }; + } + } + + public 地狱之门(Character? character = null) : base(SkillType.Magic, character) + { + Effects.Add(new 纯数值伤害(this, 75, 60, DamageType.Magical)); + Effects.Add(new 施加概率负面(this, EffectType.Bleed, true, 3, 0, 0.5, 0.24, 0.08, false, 85)); + } + } +} diff --git a/OshimaModules/Skills/魔法/导力停止.cs b/OshimaModules/Skills/魔法/导力停止.cs new file mode 100644 index 0000000..a34e0e2 --- /dev/null +++ b/OshimaModules/Skills/魔法/导力停止.cs @@ -0,0 +1,25 @@ +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Constant; +using Oshima.FunGame.OshimaModules.Effects.SkillEffects; + +namespace Oshima.FunGame.OshimaModules.Skills +{ + public class 导力停止 : Skill + { + public override long Id => (long)MagicID.导力停止; + 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 MPCost => Level > 0 ? 120 + (80 * (Level - 1)) : 120; + public override double CD => Level > 0 ? 100 - (1.5 * (Level - 1)) : 100; + public override double CastTime => Level > 0 ? 3 + (0.5 * (Level - 1)) : 3; + public override double HardnessTime { get; set; } = 8; + public override bool SelectAllEnemies => true; + + public 导力停止(Character? character = null) : base(SkillType.Magic, character) + { + Effects.Add(new 纯数值伤害(this, 35, 50, DamageType.Magical)); + Effects.Add(new 施加概率负面(this, EffectType.Silence, true, 8, 0, 1.2, 0.24, 0.08)); + } + } +} diff --git a/OshimaModules/Skills/魔法/岩石之息.cs b/OshimaModules/Skills/魔法/岩石之息.cs new file mode 100644 index 0000000..3409a6b --- /dev/null +++ b/OshimaModules/Skills/魔法/岩石之息.cs @@ -0,0 +1,23 @@ +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Constant; +using Oshima.FunGame.OshimaModules.Effects.SkillEffects; + +namespace Oshima.FunGame.OshimaModules.Skills +{ + public class 岩石之息 : Skill + { + public override long Id => (long)MagicID.岩石之息; + public override string Name => "岩石之息"; + public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; + public override double MPCost => Level > 0 ? 40 + (35 * (Level - 1)) : 40; + public override double CD => 32; + public override double CastTime => 9; + public override double HardnessTime { get; set; } = 5; + public override int CanSelectTargetCount => 3; + + public 岩石之息(Character? character = null) : base(SkillType.Magic, character) + { + Effects.Add(new 基于属性的伤害(this, PrimaryAttribute.STR, 40, 20, 0.35, 0.2)); + } + } +} diff --git a/OshimaModules/Skills/魔法/弧形日珥.cs b/OshimaModules/Skills/魔法/弧形日珥.cs new file mode 100644 index 0000000..f9fca0b --- /dev/null +++ b/OshimaModules/Skills/魔法/弧形日珥.cs @@ -0,0 +1,23 @@ +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Constant; +using Oshima.FunGame.OshimaModules.Effects.SkillEffects; + +namespace Oshima.FunGame.OshimaModules.Skills +{ + public class 弧形日珥 : Skill + { + public override long Id => (long)MagicID.弧形日珥; + public override string Name => "弧形日珥"; + public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; + public override double MPCost => Level > 0 ? 55 + (55 * (Level - 1)) : 55; + public override double CD => 35; + public override double CastTime => 8; + public override double HardnessTime { get; set; } = 6; + public override int CanSelectTargetCount => 3; + + public 弧形日珥(Character? character = null) : base(SkillType.Magic, character) + { + Effects.Add(new 基于属性的伤害(this, PrimaryAttribute.AGI, 55, 35, 0.2, 0.15)); + } + } +} diff --git a/OshimaModules/Skills/魔法/死亡咆哮.cs b/OshimaModules/Skills/魔法/死亡咆哮.cs new file mode 100644 index 0000000..21a5c4c --- /dev/null +++ b/OshimaModules/Skills/魔法/死亡咆哮.cs @@ -0,0 +1,39 @@ +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Constant; +using Oshima.FunGame.OshimaModules.Effects.SkillEffects; + +namespace Oshima.FunGame.OshimaModules.Skills +{ + public class 死亡咆哮 : Skill + { + public override long Id => (long)MagicID.死亡咆哮; + 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 MPCost => Level > 0 ? 70 + (75 * (Level - 1)) : 70; + public override double CD => Level > 0 ? 55 + (1 * (Level - 1)) : 55; + public override double CastTime => 3; + public override double HardnessTime { get; set; } = 8; + public override int CanSelectTargetCount + { + get + { + return Level switch + { + 4 => 2, + 5 => 2, + 6 => 3, + 7 => 3, + 8 => 4, + _ => 1 + }; + } + } + + public 死亡咆哮(Character? character = null) : base(SkillType.Magic, character) + { + Effects.Add(new 纯数值伤害(this, 65, 75, DamageType.Magical)); + Effects.Add(new 施加概率负面(this, EffectType.Cripple, true, 3, 0, 1, 0.24, 0.08)); + } + } +} diff --git a/OshimaModules/Skills/魔法/水蓝轰炸.cs b/OshimaModules/Skills/魔法/水蓝轰炸.cs new file mode 100644 index 0000000..66095c4 --- /dev/null +++ b/OshimaModules/Skills/魔法/水蓝轰炸.cs @@ -0,0 +1,23 @@ +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Constant; +using Oshima.FunGame.OshimaModules.Effects.SkillEffects; + +namespace Oshima.FunGame.OshimaModules.Skills +{ + public class 水蓝轰炸 : Skill + { + public override long Id => (long)MagicID.水蓝轰炸; + public override string Name => "水蓝轰炸"; + public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; + public override double MPCost => Level > 0 ? 45 + (50 * (Level - 1)) : 45; + public override double CD => 30; + public override double CastTime => 8; + public override double HardnessTime { get; set; } = 4; + public override int CanSelectTargetCount => 3; + + public 水蓝轰炸(Character? character = null) : base(SkillType.Magic, character) + { + Effects.Add(new 基于核心属性的伤害(this, 30, 25, 0.15, 0.2)); + } + } +} diff --git a/OshimaModules/Skills/魔法/火山咆哮.cs b/OshimaModules/Skills/魔法/火山咆哮.cs new file mode 100644 index 0000000..f440ec7 --- /dev/null +++ b/OshimaModules/Skills/魔法/火山咆哮.cs @@ -0,0 +1,23 @@ +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Constant; +using Oshima.FunGame.OshimaModules.Effects.SkillEffects; + +namespace Oshima.FunGame.OshimaModules.Skills +{ + public class 火山咆哮 : Skill + { + public override long Id => (long)MagicID.火山咆哮; + public override string Name => "火山咆哮"; + public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; + public override double MPCost => Level > 0 ? 45 + (50 * (Level - 1)) : 45; + public override double CD => 30; + public override double CastTime => 8; + public override double HardnessTime { get; set; } = 4; + public override int CanSelectTargetCount => 3; + + public 火山咆哮(Character? character = null) : base(SkillType.Magic, character) + { + Effects.Add(new 基于核心属性的伤害(this, 25, 30, 0.2, 0.15)); + } + } +} diff --git a/OshimaModules/Skills/魔法/破碎虚空.cs b/OshimaModules/Skills/魔法/破碎虚空.cs new file mode 100644 index 0000000..044cebb --- /dev/null +++ b/OshimaModules/Skills/魔法/破碎虚空.cs @@ -0,0 +1,23 @@ +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Constant; +using Oshima.FunGame.OshimaModules.Effects.SkillEffects; + +namespace Oshima.FunGame.OshimaModules.Skills +{ + public class 破碎虚空 : Skill + { + public override long Id => (long)MagicID.破碎虚空; + public override string Name => "破碎虚空"; + public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; + public override double MPCost => Level > 0 ? 80 + (80 * (Level - 1)) : 80; + public override double CD => 60; + public override double CastTime => 10; + public override double HardnessTime { get; set; } = 6; + public override int CanSelectTargetCount => 3; + + public 破碎虚空(Character? character = null) : base(SkillType.Magic, character) + { + Effects.Add(new 基于攻击力的伤害_无基础伤害(this, 0.65, 0.12)); + } + } +} diff --git a/OshimaModules/Skills/魔法/等离子之波.cs b/OshimaModules/Skills/魔法/等离子之波.cs new file mode 100644 index 0000000..cb1ea5a --- /dev/null +++ b/OshimaModules/Skills/魔法/等离子之波.cs @@ -0,0 +1,39 @@ +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Constant; +using Oshima.FunGame.OshimaModules.Effects.SkillEffects; + +namespace Oshima.FunGame.OshimaModules.Skills +{ + public class 等离子之波 : Skill + { + public override long Id => (long)MagicID.等离子之波; + 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 MPCost => Level > 0 ? 70 + (75 * (Level - 1)) : 70; + public override double CD => Level > 0 ? 60 + (1.5 * (Level - 1)) : 60; + public override double CastTime => 6; + public override double HardnessTime { get; set; } = 6; + public override int CanSelectTargetCount + { + get + { + return Level switch + { + 4 => 2, + 5 => 2, + 6 => 3, + 7 => 3, + 8 => 4, + _ => 1 + }; + } + } + + public 等离子之波(Character? character = null) : base(SkillType.Magic, character) + { + Effects.Add(new 纯数值伤害(this, 65, 55, DamageType.Magical)); + Effects.Add(new 施加概率负面(this, EffectType.Silence, false, 0, 2, 0, 0.24, 0.08)); + } + } +} diff --git a/OshimaModules/Skills/魔法/苍白地狱.cs b/OshimaModules/Skills/魔法/苍白地狱.cs new file mode 100644 index 0000000..d8e254f --- /dev/null +++ b/OshimaModules/Skills/魔法/苍白地狱.cs @@ -0,0 +1,23 @@ +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Constant; +using Oshima.FunGame.OshimaModules.Effects.SkillEffects; + +namespace Oshima.FunGame.OshimaModules.Skills +{ + public class 苍白地狱 : Skill + { + public override long Id => (long)MagicID.苍白地狱; + public override string Name => "苍白地狱"; + public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; + public override double MPCost => Level > 0 ? 45 + (55 * (Level - 1)) : 45; + public override double CD => 40; + public override double CastTime => 9; + public override double HardnessTime { get; set; } = 3; + public override int CanSelectTargetCount => 3; + + public 苍白地狱(Character? character = null) : base(SkillType.Magic, character) + { + Effects.Add(new 基于属性的伤害(this, PrimaryAttribute.INT, 40, 25, 0.25, 0.25)); + } + } +} diff --git a/OshimaModules/Skills/魔法/钻石星尘.cs b/OshimaModules/Skills/魔法/钻石星尘.cs new file mode 100644 index 0000000..a4bca87 --- /dev/null +++ b/OshimaModules/Skills/魔法/钻石星尘.cs @@ -0,0 +1,40 @@ +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Constant; +using Oshima.FunGame.OshimaModules.Effects.SkillEffects; + +namespace Oshima.FunGame.OshimaModules.Skills +{ + public class 钻石星尘 : Skill + { + public override long Id => (long)MagicID.钻石星尘; + public override string Name => "钻石星尘"; + public override string Description => string.Join("", Effects.Select(e => e.Description)); + public override string DispelDescription => "被驱散性:冻结需强驱散,易伤可弱驱散"; + public override double MPCost => Level > 0 ? 80 + (75 * (Level - 1)) : 80; + public override double CD => Level > 0 ? 70 + (2 * (Level - 1)) : 70; + public override double CastTime => 9; + public override double HardnessTime { get; set; } = 6; + public override int CanSelectTargetCount + { + get + { + return Level switch + { + 4 => 2, + 5 => 2, + 6 => 3, + 7 => 3, + 8 => 4, + _ => 1 + }; + } + } + + public 钻石星尘(Character? character = null) : base(SkillType.Magic, character) + { + Effects.Add(new 纯数值伤害(this, 45, 55, DamageType.Magical)); + Effects.Add(new 施加概率负面(this, EffectType.Freeze, false, 0, 2, 0, 0.24, 0.08)); + Effects.Add(new 施加概率负面(this, EffectType.Vulnerable, false, 0, 3, 0, 0.24, 0.08, DamageType.Magical, 0.3)); + } + } +} diff --git a/OshimaModules/Skills/魔法/银色荆棘.cs b/OshimaModules/Skills/魔法/银色荆棘.cs index 88d3efa..7d7d896 100644 --- a/OshimaModules/Skills/魔法/银色荆棘.cs +++ b/OshimaModules/Skills/魔法/银色荆棘.cs @@ -32,7 +32,7 @@ namespace Oshima.FunGame.OshimaModules.Skills public 银色荆棘(Character? character = null) : base(SkillType.Magic, character) { - Effects.Add(new 银色荆棘特效(this, false, 0, 2, 0, 0.6, 0.04)); + Effects.Add(new 银色荆棘特效(this, false, 0, 2, 0, 0.24, 0.08)); } } @@ -41,7 +41,7 @@ namespace Oshima.FunGame.OshimaModules.Skills public override long Id => Skill.Id; public override string Name => Skill.Name; public override string Description => $"对{Skill.TargetDescription()}造成 {Damage:0.##} 点{CharacterSet.GetDamageTypeName(DamageType.Magical, MagicType)}。" + - $"随后 {ActualConfusionProbability * 100:0.##}% 概率使目标进入混乱状态,持续 {持续时间}。混乱:进入行动受限状态,失控并随机行动,且在进行攻击指令时,可能会选取友方角色为目标。"; + $"随后 {ActualConfusionProbability * 100:0.##}% 概率对目标施加混乱状态,持续 {持续时间}。混乱:进入行动受限状态,失控并随机行动,且在进行攻击指令时,可能会选取友方角色为目标。"; public override DispelledType DispelledType => DispelledType.Strong; public override EffectType EffectType => EffectType.Confusion; diff --git a/OshimaModules/Skills/魔法/鬼魅之痛.cs b/OshimaModules/Skills/魔法/鬼魅之痛.cs new file mode 100644 index 0000000..68b8d39 --- /dev/null +++ b/OshimaModules/Skills/魔法/鬼魅之痛.cs @@ -0,0 +1,39 @@ +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Constant; +using Oshima.FunGame.OshimaModules.Effects.SkillEffects; + +namespace Oshima.FunGame.OshimaModules.Skills +{ + public class 鬼魅之痛 : Skill + { + public override long Id => (long)MagicID.鬼魅之痛; + 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 MPCost => Level > 0 ? 70 + (75 * (Level - 1)) : 70; + public override double CD => Level > 0 ? 55 + (1 * (Level - 1)) : 55; + public override double CastTime => 9; + public override double HardnessTime { get; set; } = 7; + public override int CanSelectTargetCount + { + get + { + return Level switch + { + 4 => 2, + 5 => 2, + 6 => 3, + 7 => 3, + 8 => 4, + _ => 1 + }; + } + } + + public 鬼魅之痛(Character? character = null) : base(SkillType.Magic, character) + { + Effects.Add(new 纯数值伤害(this, 55, 70, DamageType.Magical)); + Effects.Add(new 施加概率负面(this, EffectType.Stun, true, 6, 0, 0.7, 0.24, 0.08)); + } + } +} diff --git a/OshimaServers/Service/FunGameService.cs b/OshimaServers/Service/FunGameService.cs index 6b41784..3199024 100644 --- a/OshimaServers/Service/FunGameService.cs +++ b/OshimaServers/Service/FunGameService.cs @@ -51,7 +51,9 @@ namespace Oshima.FunGame.OshimaServers.Service FunGameConstant.Magics.AddRange([new 冰霜攻击(), new 火之矢(), new 水之矢(), new 风之轮(), new 石之锤(), new 心灵之霞(), new 次元上升(), new 暗物质(), new 回复术(), new 治愈术(), new 复苏术(), new 圣灵术(), new 时间加速(), new 时间减速(), new 反魔法领域(), new 沉默十字(), new 虚弱领域(), new 混沌烙印(), new 凝胶稠絮(), - new 大地之墙(), new 盖亚之盾(), new 风之守护(), new 结晶防护(), new 强音之力(), new 神圣祝福(), new 根源屏障(), new 灾难冲击波(), new 银色荆棘(), new 回复术改()]); + new 大地之墙(), new 盖亚之盾(), new 风之守护(), new 结晶防护(), new 强音之力(), new 神圣祝福(), new 根源屏障(), new 灾难冲击波(), new 银色荆棘(), new 等离子之波(), + new 地狱之门(), new 钻石星尘(), new 死亡咆哮(), new 鬼魅之痛(), new 导力停止(), new 冰狱冥嚎(), new 火山咆哮(), new 水蓝轰炸(), new 岩石之息(), new 弧形日珥(), new 苍白地狱(), new 破碎虚空(), + new 回复术改()]); Dictionary exItems = Factory.GetGameModuleInstances(OshimaGameModuleConstant.General, OshimaGameModuleConstant.Item); FunGameConstant.Equipment.AddRange(exItems.Values.Where(i => (int)i.ItemType >= 0 && (int)i.ItemType < 5));