diff --git a/OshimaModules/Effects/SkillEffects/吸取生命值.cs b/OshimaModules/Effects/SkillEffects/吸取生命值.cs new file mode 100644 index 0000000..1e8ba94 --- /dev/null +++ b/OshimaModules/Effects/SkillEffects/吸取生命值.cs @@ -0,0 +1,55 @@ +using Milimoe.FunGame.Core.Api.Utility; +using Milimoe.FunGame.Core.Entity; +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 => $"吸取{Skill.TargetDescription()}的{(是否是百分比 ? $" {Calculation.PercentageCheck(Earned) * 100:0.##}% 当前" : $"至多 {Earned:0.##} 点")}生命值(每个角色)," + + $"并将吸取总量的 {转化百分比 * 100:0.##}% 转化为自身生命值。"; + + private double Earned => Skill.Level > 0 ? 基础数值 + 等级成长 * (Skill.Level - 1) : 基础数值; + private double 基础数值 { get; set; } = 200; + private double 等级成长 { get; set; } = 100; + private bool 是否是百分比 { get; set; } = false; + private double 转化百分比 { get; set; } = 1; + + public 吸取生命值(Skill skill, double 基础数值, double 等级成长, bool 是否是百分比 = false, double 转化百分比 = 1) : base(skill) + { + GamingQueue = skill.GamingQueue; + this.基础数值 = 基础数值; + this.等级成长 = 等级成长; + this.是否是百分比 = 是否是百分比; + this.转化百分比 = Calculation.PercentageCheck(转化百分比); + } + + public override void OnSkillCasted(Character caster, List targets, Dictionary others) + { + double total = 0; + foreach (Character target in targets) + { + double earned = Earned; + if (是否是百分比) + { + earned = target.HP * earned; + } + else if (earned > target.HP) + { + earned = target.HP; + } + if (earned > 0) + { + target.HP -= earned; + total += earned; + GamingQueue?.CalculateCharacterDamageStatistics(caster, target, earned, Milimoe.FunGame.Core.Library.Constant.DamageType.True); + } + } + total *= 转化百分比; + caster.HP += total; + WriteLine($"[ {caster} ] 吸取了 [ {string.Join(" ] / [ ", targets)} ] 的 {total:0.##} 点生命值!"); + } + } +} diff --git a/OshimaModules/Effects/SkillEffects/吸取能量值.cs b/OshimaModules/Effects/SkillEffects/吸取能量值.cs new file mode 100644 index 0000000..b8b9d24 --- /dev/null +++ b/OshimaModules/Effects/SkillEffects/吸取能量值.cs @@ -0,0 +1,54 @@ +using Milimoe.FunGame.Core.Api.Utility; +using Milimoe.FunGame.Core.Entity; +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 => $"吸取{Skill.TargetDescription()}的{(是否是百分比 ? $" {Calculation.PercentageCheck(Earned) * 100:0.##}% 当前" : $"至多 {Earned:0.##} 点")}能量值(每个角色)," + + $"并将吸取总量的 {转化百分比 * 100:0.##}% 转化为自身能量值。"; + + private double Earned => Skill.Level > 0 ? 基础数值 + 等级成长 * (Skill.Level - 1) : 基础数值; + private double 基础数值 { get; set; } = 5; + private double 等级成长 { get; set; } = 1; + private bool 是否是百分比 { get; set; } = false; + private double 转化百分比 { get; set; } = 1; + + public 吸取能量值(Skill skill, double 基础数值, double 等级成长, bool 是否是百分比 = false, double 转化百分比 = 1) : base(skill) + { + GamingQueue = skill.GamingQueue; + this.基础数值 = 基础数值; + this.等级成长 = 等级成长; + this.是否是百分比 = 是否是百分比; + this.转化百分比 = Calculation.PercentageCheck(转化百分比); + } + + public override void OnSkillCasted(Character caster, List targets, Dictionary others) + { + double total = 0; + foreach (Character target in targets) + { + double earned = Earned; + if (是否是百分比) + { + earned = target.EP * earned; + } + else if (earned > target.EP) + { + earned = target.EP; + } + if (earned > 0) + { + target.EP -= earned; + total += earned; + } + } + total *= 转化百分比; + caster.EP += total; + WriteLine($"[ {caster} ] 吸取了 [ {string.Join(" ] / [ ", targets)} ] 的 {total:0.##} 点能量值!"); + } + } +} diff --git a/OshimaModules/Effects/SkillEffects/吸取魔法值.cs b/OshimaModules/Effects/SkillEffects/吸取魔法值.cs new file mode 100644 index 0000000..783680a --- /dev/null +++ b/OshimaModules/Effects/SkillEffects/吸取魔法值.cs @@ -0,0 +1,54 @@ +using Milimoe.FunGame.Core.Api.Utility; +using Milimoe.FunGame.Core.Entity; +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 => $"吸取{Skill.TargetDescription()}的{(是否是百分比 ? $" {Calculation.PercentageCheck(Earned) * 100:0.##}% 当前" : $"至多 {Earned:0.##} 点")}魔法值(每个角色)," + + $"并将吸取总量的 {转化百分比 * 100:0.##}% 转化为自身魔法值。"; + + private double Earned => Skill.Level > 0 ? 基础数值 + 等级成长 * (Skill.Level - 1) : 基础数值; + private double 基础数值 { get; set; } = 150; + private double 等级成长 { get; set; } = 75; + private bool 是否是百分比 { get; set; } = false; + private double 转化百分比 { get; set; } = 1; + + public 吸取魔法值(Skill skill, double 基础数值, double 等级成长, bool 是否是百分比 = false, double 转化百分比 = 1) : base(skill) + { + GamingQueue = skill.GamingQueue; + this.基础数值 = 基础数值; + this.等级成长 = 等级成长; + this.是否是百分比 = 是否是百分比; + this.转化百分比 = Calculation.PercentageCheck(转化百分比); + } + + public override void OnSkillCasted(Character caster, List targets, Dictionary others) + { + double total = 0; + foreach (Character target in targets) + { + double earned = Earned; + if (是否是百分比) + { + earned = target.MP * earned; + } + else if (earned > target.MP) + { + earned = target.MP; + } + if (earned > 0) + { + target.MP -= earned; + total += earned; + } + } + total *= 转化百分比; + caster.MP += total; + WriteLine($"[ {caster} ] 吸取了 [ {string.Join(" ] / [ ", targets)} ] 的 {total:0.##} 点魔法值!"); + } + } +} diff --git a/OshimaModules/Effects/SkillEffects/提升友方行动速度.cs b/OshimaModules/Effects/SkillEffects/提升友方行动速度.cs index 8cf9fe2..de04764 100644 --- a/OshimaModules/Effects/SkillEffects/提升友方行动速度.cs +++ b/OshimaModules/Effects/SkillEffects/提升友方行动速度.cs @@ -33,7 +33,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects { foreach (Character target in targets) { - WriteLine($"[ {target} ] 的行动速度提升了 {SPD:0.##} !持续时间:{持续时间}!"); + WriteLine($"[ {target} ] 的行动速度提升了 {SPD:0.##} 点,行动等待时间(当前硬直时间)被缩短了 30%!持续时间:{持续时间}!"); ExSPD e = new(Skill, new Dictionary() { { "exspd", SPD } diff --git a/OshimaModules/Effects/SkillEffects/降低敌方行动速度.cs b/OshimaModules/Effects/SkillEffects/降低敌方行动速度.cs index 29801bf..b17eda0 100644 --- a/OshimaModules/Effects/SkillEffects/降低敌方行动速度.cs +++ b/OshimaModules/Effects/SkillEffects/降低敌方行动速度.cs @@ -33,7 +33,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects { foreach (Character target in targets) { - WriteLine($"[ {target} ] 的行动速度降低了 {-SPD:0.##} !持续时间:{持续时间}!"); + WriteLine($"[ {target} ] 的行动速度降低了 {-SPD:0.##} 点,行动等待时间(当前硬直时间)被延长了 30%!持续时间:{持续时间}!"); ExSPD e = new(Skill, new Dictionary() { { "exspd", SPD } diff --git a/OshimaModules/Modules/SkillModule.cs b/OshimaModules/Modules/SkillModule.cs index 616be7b..725764b 100644 --- a/OshimaModules/Modules/SkillModule.cs +++ b/OshimaModules/Modules/SkillModule.cs @@ -86,7 +86,18 @@ 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)SkillID.疾风步 => new 疾风步(), (long)SuperSkillID.力量爆发 => new 力量爆发(), (long)SuperSkillID.天赐之力 => new 天赐之力(), diff --git a/OshimaModules/Skills/Oshima/力量爆发.cs b/OshimaModules/Skills/Oshima/力量爆发.cs index f2a5559..a724994 100644 --- a/OshimaModules/Skills/Oshima/力量爆发.cs +++ b/OshimaModules/Skills/Oshima/力量爆发.cs @@ -25,7 +25,7 @@ namespace Oshima.FunGame.OshimaModules.Skills { public override long Id => Skill.Id; public override string Name => "力量爆发"; - public override string Description => $"获得 135% 力量 [ {攻击力加成:0.##} ] 的攻击力加成,但每次攻击都会损失 9% 当前生命值 [ {当前生命值:0.##} ],持续 {Duration:0.##} {GameplayEquilibriumConstant.InGameTime}。"; + public override string Description => $"获得 135% 力量 [ {攻击力加成:0.##} ] 的攻击力加成,但每次普通攻击命中时都会损失自身 9% 当前生命值 [ {当前生命值:0.##} ],持续 {Duration:0.##} {GameplayEquilibriumConstant.InGameTime}。"; public override bool Durative => true; public override double Duration => 10 + 1 * (Level - 1); public override DispelledType DispelledType => DispelledType.CannotBeDispelled; @@ -49,7 +49,7 @@ namespace Oshima.FunGame.OshimaModules.Skills 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) + if (character == Skill.Character && isNormalAttack && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical)) { double 生命值减少 = 当前生命值; character.HP -= 生命值减少; diff --git a/OshimaModules/Skills/魔法/反魔法领域.cs b/OshimaModules/Skills/魔法/反魔法领域.cs index 32e3c69..c2a4af1 100644 --- a/OshimaModules/Skills/魔法/反魔法领域.cs +++ b/OshimaModules/Skills/魔法/反魔法领域.cs @@ -27,24 +27,8 @@ namespace Oshima.FunGame.OshimaModules.Skills } } public override double CD => Level > 0 ? 90 - (2 * (Level - 1)) : 75; - public override double CastTime - { - get - { - return Level switch - { - 8 => 20, - 7 => 18, - 6 => 14, - 5 => 16, - 4 => 14, - 3 => 12, - 2 => 8, - _ => 10 - }; - } - } - public override double HardnessTime { get; set; } = 10; + public override double CastTime => Level > 0 ? 5 + (0.5 * (Level - 1)) : 5; + public override double HardnessTime { get; set; } = 5; public override int CanSelectTargetCount { get diff --git a/OshimaModules/Skills/魔法/回复术复.cs b/OshimaModules/Skills/魔法/回复术复.cs new file mode 100644 index 0000000..663a6db --- /dev/null +++ b/OshimaModules/Skills/魔法/回复术复.cs @@ -0,0 +1,42 @@ +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 ? 95 + (105 * (Level - 1)) : 95; + public override double CD => 100; + public override double CastTime => 6; + public override double HardnessTime { get; set; } = 7; + public override bool CanSelectSelf => true; + public override bool CanSelectEnemy => false; + public override bool CanSelectTeammate => true; + public override int CanSelectTargetCount + { + get + { + return Level switch + { + 3 => 3, + 4 => 3, + 5 => 4, + 6 => 4, + 7 => 5, + 8 => 5, + _ => 2 + }; + } + } + + public 回复术复(Character? character = null) : base(SkillType.Magic, character) + { + SelectTargetPredicates.Add(c => c.HP > 0 && c.HP < c.MaxHP); + Effects.Add(new 百分比回复生命值(this, 0.24, 0.03)); + } + } +} diff --git a/OshimaModules/Skills/魔法/复苏术.cs b/OshimaModules/Skills/魔法/复苏术.cs index bc2e476..5ecaa51 100644 --- a/OshimaModules/Skills/魔法/复苏术.cs +++ b/OshimaModules/Skills/魔法/复苏术.cs @@ -23,7 +23,7 @@ namespace Oshima.FunGame.OshimaModules.Skills { SelectTargetPredicates.Add(c => c.HP >= 0 && c.HP < c.MaxHP); Effects.Add(new 强驱散特效(this)); - Effects.Add(new 百分比回复生命值(this, 0.24, 0.02, true)); + Effects.Add(new 百分比回复生命值(this, 0.21, 0.02, true)); } public override List GetSelectableTargets(Character caster, List enemys, List teammates) diff --git a/OshimaModules/Skills/魔法/弧光消耗.cs b/OshimaModules/Skills/魔法/弧光消耗.cs new file mode 100644 index 0000000..5601aec --- /dev/null +++ b/OshimaModules/Skills/魔法/弧光消耗.cs @@ -0,0 +1,24 @@ +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 double MPCost => Level > 0 ? 35 + (30 * (Level - 1)) : 35; + public override double CD => 35; + public override double CastTime => 4; + public override double HardnessTime { get; set; } = 5; + public override int CanSelectTargetCount => 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)); + } + } +} diff --git a/OshimaModules/Skills/魔法/强音之力.cs b/OshimaModules/Skills/魔法/强音之力.cs index a2d5e4c..c0c2c58 100644 --- a/OshimaModules/Skills/魔法/强音之力.cs +++ b/OshimaModules/Skills/魔法/强音之力.cs @@ -9,7 +9,7 @@ namespace Oshima.FunGame.OshimaModules.Skills 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 ? 70 + (80 * (Level - 1)) : 70; + public override double MPCost => Level > 0 ? 65 + (70 * (Level - 1)) : 65; public override double CD => Level > 0 ? 65 - (1 * (Level - 1)) : 65; public override double CastTime => Level > 0 ? 6 + (0.5 * (Level - 1)) : 6; public override double HardnessTime { get; set; } = 3; diff --git a/OshimaModules/Skills/魔法/强音之力复.cs b/OshimaModules/Skills/魔法/强音之力复.cs new file mode 100644 index 0000000..4644791 --- /dev/null +++ b/OshimaModules/Skills/魔法/强音之力复.cs @@ -0,0 +1,98 @@ +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Constant; +using Oshima.FunGame.OshimaModules.Effects.OpenEffects; + +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 ? 85 + (85 * (Level - 1)) : 85; + public override double CD => Level > 0 ? 65 - (0.5 * (Level - 1)) : 65; + public override double CastTime => Level > 0 ? 6 + (0.5 * (Level - 1)) : 6; + public override double HardnessTime { get; set; } = 6; + public override bool CanSelectSelf => true; + public override bool CanSelectEnemy => false; + public override bool CanSelectTeammate => true; + public override int CanSelectTargetCount + { + get + { + return Level switch + { + 3 => 3, + 4 => 3, + 5 => 3, + 6 => 4, + 7 => 4, + 8 => 4, + _ => 2 + }; + } + } + + public 强音之力复(Character? character = null) : base(SkillType.Magic, character) + { + Effects.Add(new 强音之力复特效(this, false, 0, 3)); + } + } + + public class 强音之力复特效 : Effect + { + public override long Id => Skill.Id; + public override string Name => Skill.Name; + public override string Description => $"提升目标{(Skill.CanSelectTargetCount > 1 ? $"至多 {Skill.CanSelectTargetCount} 个" : "")}友方角色 {ExATK * 100:0.##}% 攻击力,持续 {持续时间}。"; + public override EffectType EffectType => EffectType.DamageBoost; + public override DispelledType DispelledType => DispelledType.Weak; + + 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 bool _durative; + private readonly double _duration; + private readonly int _durationTurn; + private readonly double _levelGrowth; + + private double ExATK => Level > 0 ? 0.045 + 0.045 * (Level - 1) : 0.045; + + public 强音之力复特效(Skill skill, bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0) : base(skill) + { + GamingQueue = skill.GamingQueue; + _durative = durative; + _duration = duration; + _durationTurn = durationTurn; + _levelGrowth = levelGrowth; + } + + public override void OnSkillCasted(Character caster, List targets, Dictionary others) + { + foreach (Character target in targets) + { + WriteLine($"[ {target} ] 的攻击力提升了 {ExATK * 100:0.##}%!持续时间:{持续时间}!"); + ExATK2 e = new(Skill, new() + { + { "exatk", ExATK } + }, caster); + 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.DamageBoost; + e.Source = caster; + e.OnEffectGained(target); + GamingQueue?.LastRound.ApplyEffects.TryAdd(target, [EffectType.DamageBoost]); + } + } + } +} diff --git a/OshimaModules/Skills/魔法/时间减速.cs b/OshimaModules/Skills/魔法/时间减速.cs index 82d89b5..8d0f3b7 100644 --- a/OshimaModules/Skills/魔法/时间减速.cs +++ b/OshimaModules/Skills/魔法/时间减速.cs @@ -9,10 +9,10 @@ namespace Oshima.FunGame.OshimaModules.Skills 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 ? 75 + (85 * (Level - 1)) : 75; + public override double MPCost => Level > 0 ? 65 + (75 * (Level - 1)) : 65; public override double CD => Level > 0 ? 60 - (1 * (Level - 1)) : 60; - public override double CastTime => Level > 0 ? 7 + (1.5 * (Level - 1)) : 7; - public override double HardnessTime { get; set; } = 8; + public override double CastTime => Level > 0 ? 3 + (1.5 * (Level - 1)) : 3; + public override double HardnessTime { get; set; } = 5; public 时间减速(Character? character = null) : base(SkillType.Magic, character) { diff --git a/OshimaModules/Skills/魔法/时间减速复.cs b/OshimaModules/Skills/魔法/时间减速复.cs new file mode 100644 index 0000000..677c639 --- /dev/null +++ b/OshimaModules/Skills/魔法/时间减速复.cs @@ -0,0 +1,113 @@ +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Constant; +using Oshima.FunGame.OshimaModules.Effects.OpenEffects; +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 ? 85 + (95 * (Level - 1)) : 85; + public override double CD => Level > 0 ? 80 - (1 * (Level - 1)) : 80; + public override double CastTime => Level > 0 ? 6 + (1.5 * (Level - 1)) : 6; + public override double HardnessTime { get; set; } = 6; + public override int CanSelectTargetCount + { + get + { + return Level switch + { + 3 => 3, + 4 => 3, + 5 => 3, + 6 => 4, + 7 => 4, + 8 => 4, + _ => 2 + }; + } + } + + public 时间减速复(Character? character = null) : base(SkillType.Magic, character) + { + Effects.Add(new 时间减速复特效(this, false, 0, 3, 0, 40, 20, 0.08, 0.01)); + } + } + + public class 时间减速复特效 : Effect + { + public override long Id => Skill.Id; + public override string Name => Skill.Name; + public override string Description => $"{(!IsDebuff ? "增加" : "减少")}{Skill.TargetDescription()} {Math.Abs(ExSPD):0.##} 点行动速度,并{(!IsDebuff ? "缩短" : "延长")}目标 30% 的行动等待时间(当前硬直时间);" + + $"{(!IsDebuff ? "增加" : "减少")}{Skill.TargetDescription()} {Math.Abs(ExACC) * 100:0.##}% 加速系数。持续 {持续时间}。"; + public override EffectType EffectType => EffectType.Slow; + public override DispelledType DispelledType => DispelledType.Weak; + public override bool IsDebuff => true; + + 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 bool _durative; + private readonly double _duration; + private readonly int _durationTurn; + private readonly double _levelGrowth; + private readonly double _baseSpd; + private readonly double _baseAcc; + private readonly double _spdLevelGrowth; + private readonly double _accLevelGrowth; + + private double ExSPD => Level > 0 ? _baseSpd + _spdLevelGrowth * (Level - 1) : _baseSpd; + private double ExACC => Level > 0 ? _baseAcc + _accLevelGrowth * (Level - 1) : _baseAcc; + + public 时间减速复特效(Skill skill, bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0, double baseSpd = 0, double spdLevelGrowth = 0, double baseAcc = 0, double accLevelGrowth = 0) : base(skill) + { + GamingQueue = skill.GamingQueue; + _durative = durative; + _duration = duration; + _durationTurn = durationTurn; + _levelGrowth = levelGrowth; + _baseSpd = baseSpd; + _spdLevelGrowth = spdLevelGrowth; + _baseAcc = baseAcc; + _accLevelGrowth = accLevelGrowth; + } + + public override void OnSkillCasted(Character caster, List targets, 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 } + }, caster) + { + Durative = _durative, + Duration = 实际持续时间, + DurationTurn = (int)实际持续时间 + }; + 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 } + }, caster) + { + Durative = _durative, + Duration = 实际持续时间, + DurationTurn = (int)实际持续时间 + }; + target.Effects.Add(e2); + e2.OnEffectGained(target); + e2.IsDebuff = true; + GamingQueue?.LastRound.ApplyEffects.TryAdd(target, [EffectType.Slow]); + } + } + } +} diff --git a/OshimaModules/Skills/魔法/时间减速改.cs b/OshimaModules/Skills/魔法/时间减速改.cs new file mode 100644 index 0000000..820337f --- /dev/null +++ b/OshimaModules/Skills/魔法/时间减速改.cs @@ -0,0 +1,97 @@ +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Constant; +using Oshima.FunGame.OshimaModules.Effects.OpenEffects; +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 ? 75 + (85 * (Level - 1)) : 75; + public override double CD => Level > 0 ? 68 - (1 * (Level - 1)) : 60; + public override double CastTime => Level > 0 ? 7 + (1 * (Level - 1)) : 7; + 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)); + } + } + + public class 时间减速改特效 : Effect + { + public override long Id => Skill.Id; + public override string Name => Skill.Name; + public override string Description => $"{(!IsDebuff ? "增加" : "减少")}{Skill.TargetDescription()} {Math.Abs(ExSPD):0.##} 点行动速度,并{(!IsDebuff ? "缩短" : "延长")}目标 30% 的行动等待时间(当前硬直时间);" + + $"{(!IsDebuff ? "增加" : "减少")}{Skill.TargetDescription()} {Math.Abs(ExACC) * 100:0.##}% 加速系数。持续 {持续时间}。"; + public override EffectType EffectType => EffectType.Slow; + public override DispelledType DispelledType => DispelledType.Weak; + public override bool IsDebuff => true; + + 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 bool _durative; + private readonly double _duration; + private readonly int _durationTurn; + private readonly double _levelGrowth; + private readonly double _baseSpd; + private readonly double _baseAcc; + private readonly double _spdLevelGrowth; + private readonly double _accLevelGrowth; + + private double ExSPD => Level > 0 ? _baseSpd + _spdLevelGrowth * (Level - 1) : _baseSpd; + private double ExACC => Level > 0 ? _baseAcc + _accLevelGrowth * (Level - 1) : _baseAcc; + + public 时间减速改特效(Skill skill, bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0, double baseSpd = 0, double spdLevelGrowth = 0, double baseAcc = 0, double accLevelGrowth = 0) : base(skill) + { + GamingQueue = skill.GamingQueue; + _durative = durative; + _duration = duration; + _durationTurn = durationTurn; + _levelGrowth = levelGrowth; + _baseSpd = baseSpd; + _spdLevelGrowth = spdLevelGrowth; + _baseAcc = baseAcc; + _accLevelGrowth = accLevelGrowth; + } + + public override void OnSkillCasted(Character caster, List targets, 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 } + }, caster) + { + Durative = _durative, + Duration = 实际持续时间, + DurationTurn = (int)实际持续时间 + }; + 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 } + }, caster) + { + Durative = _durative, + Duration = 实际持续时间, + DurationTurn = (int)实际持续时间 + }; + target.Effects.Add(e2); + e2.OnEffectGained(target); + e2.IsDebuff = true; + GamingQueue?.LastRound.ApplyEffects.TryAdd(target, [EffectType.Slow]); + } + } + } +} diff --git a/OshimaModules/Skills/魔法/时间加速.cs b/OshimaModules/Skills/魔法/时间加速.cs index 764fa75..466a4f2 100644 --- a/OshimaModules/Skills/魔法/时间加速.cs +++ b/OshimaModules/Skills/魔法/时间加速.cs @@ -9,10 +9,10 @@ namespace Oshima.FunGame.OshimaModules.Skills 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 ? 95 + (105 * (Level - 1)) : 95; + public override double MPCost => Level > 0 ? 70 + (80 * (Level - 1)) : 70; public override double CD => Level > 0 ? 65 - (1 * (Level - 1)) : 65; public override double CastTime => Level > 0 ? 2 + (1.5 * (Level - 1)) : 2; - public override double HardnessTime { get; set; } = 6; + public override double HardnessTime { get; set; } = 4; public override bool CanSelectSelf => true; public override bool CanSelectEnemy => false; public override bool CanSelectTeammate => true; diff --git a/OshimaModules/Skills/魔法/时间加速复.cs b/OshimaModules/Skills/魔法/时间加速复.cs new file mode 100644 index 0000000..598cafd --- /dev/null +++ b/OshimaModules/Skills/魔法/时间加速复.cs @@ -0,0 +1,116 @@ +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Constant; +using Oshima.FunGame.OshimaModules.Effects.OpenEffects; +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 ? 90 + (95 * (Level - 1)) : 90; + public override double CD => Level > 0 ? 75 - (0.8 * (Level - 1)) : 75; + public override double CastTime => Level > 0 ? 6 + (1.5 * (Level - 1)) : 6; + public override double HardnessTime { get; set; } = 7; + public override bool CanSelectSelf => true; + public override bool CanSelectTeammate => true; + public override bool CanSelectEnemy => false; + public override int CanSelectTargetCount + { + get + { + return Level switch + { + 3 => 3, + 4 => 3, + 5 => 3, + 6 => 4, + 7 => 4, + 8 => 4, + _ => 2 + }; + } + } + + public 时间加速复(Character? character = null) : base(SkillType.Magic, character) + { + Effects.Add(new 时间加速复特效(this, false, 0, 3, 0, 40, 20, 0.08, 0.01)); + } + } + + public class 时间加速复特效 : Effect + { + public override long Id => Skill.Id; + public override string Name => Skill.Name; + public override string Description => $"{(!IsDebuff ? "增加" : "减少")}{Skill.TargetDescription()} {Math.Abs(ExSPD):0.##} 点行动速度,并{(!IsDebuff ? "缩短" : "延长")}目标 30% 的行动等待时间(当前硬直时间);" + + $"{(!IsDebuff ? "增加" : "减少")}{Skill.TargetDescription()} {Math.Abs(ExACC) * 100:0.##}% 加速系数。持续 {持续时间}。"; + public override EffectType EffectType => EffectType.Haste; + public override DispelledType DispelledType => DispelledType.Weak; + public override bool IsDebuff => false; + + 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 bool _durative; + private readonly double _duration; + private readonly int _durationTurn; + private readonly double _levelGrowth; + private readonly double _baseSpd; + private readonly double _baseAcc; + private readonly double _spdLevelGrowth; + private readonly double _accLevelGrowth; + + private double ExSPD => Level > 0 ? _baseSpd + _spdLevelGrowth * (Level - 1) : _baseSpd; + private double ExACC => Level > 0 ? _baseAcc + _accLevelGrowth * (Level - 1) : _baseAcc; + + public 时间加速复特效(Skill skill, bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0, double baseSpd = 0, double spdLevelGrowth = 0, double baseAcc = 0, double accLevelGrowth = 0) : base(skill) + { + GamingQueue = skill.GamingQueue; + _durative = durative; + _duration = duration; + _durationTurn = durationTurn; + _levelGrowth = levelGrowth; + _baseSpd = baseSpd; + _spdLevelGrowth = spdLevelGrowth; + _baseAcc = baseAcc; + _accLevelGrowth = accLevelGrowth; + } + + public override void OnSkillCasted(Character caster, List targets, 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 } + }, caster) + { + Durative = _durative, + Duration = 实际持续时间, + DurationTurn = (int)实际持续时间 + }; + target.Effects.Add(e1); + e1.OnEffectGained(target); + e1.IsDebuff = false; + GamingQueue?.ChangeCharacterHardnessTime(target, -0.3, true, false); + Effect e2 = new AccelerationCoefficient(Skill, new() + { + { "exacc", ExACC } + }, caster) + { + Durative = _durative, + Duration = 实际持续时间, + DurationTurn = (int)实际持续时间 + }; + target.Effects.Add(e2); + e2.OnEffectGained(target); + e2.IsDebuff = false; + GamingQueue?.LastRound.ApplyEffects.TryAdd(target, [EffectType.Haste]); + } + } + } +} diff --git a/OshimaModules/Skills/魔法/时间加速改.cs b/OshimaModules/Skills/魔法/时间加速改.cs new file mode 100644 index 0000000..3bd45b2 --- /dev/null +++ b/OshimaModules/Skills/魔法/时间加速改.cs @@ -0,0 +1,100 @@ +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Constant; +using Oshima.FunGame.OshimaModules.Effects.OpenEffects; +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 + (85 * (Level - 1)) : 80; + public override double CD => Level > 0 ? 65 - (0.5 * (Level - 1)) : 65; + public override double CastTime => Level > 0 ? 6 + (1 * (Level - 1)) : 6; + public override double HardnessTime { get; set; } = 7; + public override bool CanSelectSelf => true; + public override bool CanSelectTeammate => true; + public override bool CanSelectEnemy => false; + + public 时间加速改(Character? character = null) : base(SkillType.Magic, character) + { + Effects.Add(new 时间加速改特效(this, false, 0, 4, 0, 45, 25, 0.1, 0.02)); + } + } + + public class 时间加速改特效 : Effect + { + public override long Id => Skill.Id; + public override string Name => Skill.Name; + public override string Description => $"{(!IsDebuff ? "增加" : "减少")}{Skill.TargetDescription()} {Math.Abs(ExSPD):0.##} 点行动速度,并{(!IsDebuff ? "缩短" : "延长")}目标 30% 的行动等待时间(当前硬直时间);" + + $"{(!IsDebuff ? "增加" : "减少")}{Skill.TargetDescription()} {Math.Abs(ExACC) * 100:0.##}% 加速系数。持续 {持续时间}。"; + public override EffectType EffectType => EffectType.Haste; + public override DispelledType DispelledType => DispelledType.Weak; + public override bool IsDebuff => false; + + 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 bool _durative; + private readonly double _duration; + private readonly int _durationTurn; + private readonly double _levelGrowth; + private readonly double _baseSpd; + private readonly double _baseAcc; + private readonly double _spdLevelGrowth; + private readonly double _accLevelGrowth; + + private double ExSPD => Level > 0 ? _baseSpd + _spdLevelGrowth * (Level - 1) : _baseSpd; + private double ExACC => Level > 0 ? _baseAcc + _accLevelGrowth * (Level - 1) : _baseAcc; + + public 时间加速改特效(Skill skill, bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0, double baseSpd = 0, double spdLevelGrowth = 0, double baseAcc = 0, double accLevelGrowth = 0) : base(skill) + { + GamingQueue = skill.GamingQueue; + _durative = durative; + _duration = duration; + _durationTurn = durationTurn; + _levelGrowth = levelGrowth; + _baseSpd = baseSpd; + _spdLevelGrowth = spdLevelGrowth; + _baseAcc = baseAcc; + _accLevelGrowth = accLevelGrowth; + } + + public override void OnSkillCasted(Character caster, List targets, 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 } + }, caster) + { + Durative = _durative, + Duration = 实际持续时间, + DurationTurn = (int)实际持续时间 + }; + target.Effects.Add(e1); + e1.OnEffectGained(target); + e1.IsDebuff = false; + GamingQueue?.ChangeCharacterHardnessTime(target, -0.3, true, false); + Effect e2 = new AccelerationCoefficient(Skill, new() + { + { "exacc", ExACC } + }, caster) + { + Durative = _durative, + Duration = 实际持续时间, + DurationTurn = (int)实际持续时间 + }; + target.Effects.Add(e2); + e2.OnEffectGained(target); + e2.IsDebuff = false; + GamingQueue?.LastRound.ApplyEffects.TryAdd(target, [EffectType.Haste]); + } + } + } +} diff --git a/OshimaModules/Skills/魔法/沉默十字.cs b/OshimaModules/Skills/魔法/沉默十字.cs index 9372297..f39c847 100644 --- a/OshimaModules/Skills/魔法/沉默十字.cs +++ b/OshimaModules/Skills/魔法/沉默十字.cs @@ -27,24 +27,8 @@ namespace Oshima.FunGame.OshimaModules.Skills } } public override double CD => Level > 0 ? 85 - (3 * (Level - 1)) : 85; - public override double CastTime - { - get - { - return Level switch - { - 8 => 8, - 7 => 8, - 6 => 9, - 5 => 10, - 4 => 11, - 3 => 12, - 2 => 13, - _ => 14 - }; - } - } - public override double HardnessTime { get; set; } = 10; + public override double CastTime => Level > 0 ? 10 - (0.5 * (Level - 1)) : 10; + public override double HardnessTime { get; set; } = 6; public override int CanSelectTargetCount { get diff --git a/OshimaModules/Skills/魔法/治愈术复.cs b/OshimaModules/Skills/魔法/治愈术复.cs new file mode 100644 index 0000000..d66ebb7 --- /dev/null +++ b/OshimaModules/Skills/魔法/治愈术复.cs @@ -0,0 +1,43 @@ +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 double MPCost => Level > 0 ? 85 + (90 * (Level - 1)) : 85; + public override double CD => Level > 0 ? 92 - (1 * (Level - 1)) : 92; + public override double CastTime => Level > 0 ? 6 + (0.25 * (Level - 1)) : 6; + public override double HardnessTime { get; set; } = 7; + public override bool CanSelectSelf => true; + public override bool CanSelectEnemy => false; + public override bool CanSelectTeammate => true; + public override int CanSelectTargetCount + { + get + { + return Level switch + { + 3 => 3, + 4 => 3, + 5 => 3, + 6 => 4, + 7 => 4, + 8 => 4, + _ => 2 + }; + } + } + + public 治愈术复(Character? character = null) : base(SkillType.Magic, character) + { + SelectTargetPredicates.Add(c => c.HP > 0 && c.HP < c.MaxHP); + Effects.Add(new 弱驱散特效(this)); + Effects.Add(new 纯数值回复生命(this, 420, 340)); + } + } +} diff --git a/OshimaModules/Skills/魔法/神圣祝福.cs b/OshimaModules/Skills/魔法/神圣祝福.cs index 54a3e64..9a742d6 100644 --- a/OshimaModules/Skills/魔法/神圣祝福.cs +++ b/OshimaModules/Skills/魔法/神圣祝福.cs @@ -9,10 +9,10 @@ namespace Oshima.FunGame.OshimaModules.Skills 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 ? 105 + (105 * (Level - 1)) : 105; - public override double CD => Level > 0 ? 95 - (1.5 * (Level - 1)) : 95; + public override double MPCost => Level > 0 ? 95 + (100 * (Level - 1)) : 95; + public override double CD => Level > 0 ? 90 - (1.5 * (Level - 1)) : 90; public override double CastTime => Level > 0 ? 5 + (1 * (Level - 1)) : 5; - public override double HardnessTime { get; set; } = 6; + public override double HardnessTime { get; set; } = 3; public override bool CanSelectSelf => true; public override bool CanSelectEnemy => false; public override bool CanSelectTeammate => true; diff --git a/OshimaModules/Skills/魔法/神圣祝福复.cs b/OshimaModules/Skills/魔法/神圣祝福复.cs new file mode 100644 index 0000000..bde0c02 --- /dev/null +++ b/OshimaModules/Skills/魔法/神圣祝福复.cs @@ -0,0 +1,141 @@ +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Constant; +using Oshima.FunGame.OshimaModules.Effects.OpenEffects; + +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 ? 110 + (110 * (Level - 1)) : 110; + public override double CD => Level > 0 ? 100 - (1.5 * (Level - 1)) : 100; + public override double CastTime => Level > 0 ? 6 + (1 * (Level - 1)) : 5; + public override double HardnessTime { get; set; } = 7; + public override bool CanSelectSelf => true; + public override bool CanSelectEnemy => false; + public override bool CanSelectTeammate => true; + public override int CanSelectTargetCount + { + get + { + return Level switch + { + 3 => 3, + 4 => 3, + 5 => 3, + 6 => 4, + 7 => 4, + 8 => 4, + _ => 2 + }; + } + } + + public 神圣祝福复(Character? character = null) : base(SkillType.Magic, character) + { + Effects.Add(new 神圣祝福复特效(this, false, 0, 3)); + } + } + + public class 神圣祝福复特效 : Effect + { + public override long Id => Skill.Id; + public override string Name => Skill.Name; + public override string Description => $"提升目标{(Skill.CanSelectTargetCount > 1 ? $"至多 {Skill.CanSelectTargetCount} 个" : "")}友方角色 {ExATK * 100:0.##}% 攻击力、{ExDEF * 100:0.##}% 物理护甲和 {ExMDF * 100:0.##}% 魔法抗性,持续 {持续时间}。"; + public override EffectType EffectType => EffectType.DefenseBoost; + public override DispelledType DispelledType => DispelledType.Weak; + + 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 bool _durative; + private readonly double _duration; + private readonly int _durationTurn; + private readonly double _levelGrowth; + + private double ExATK => Level > 0 ? 0.04 + 0.035 * (Level - 1) : 0.04; + private double ExDEF => Level > 0 ? 0.12 + 0.15 * (Level - 1) : 0.12; + private double ExMDF => Level > 0 ? 0.008 + 0.012 * (Level - 1) : 0.008; + + public 神圣祝福复特效(Skill skill, bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0) : base(skill) + { + GamingQueue = skill.GamingQueue; + _durative = durative; + _duration = duration; + _durationTurn = durationTurn; + _levelGrowth = levelGrowth; + } + + public override void OnSkillCasted(Character caster, List targets, Dictionary others) + { + foreach (Character target in targets) + { + WriteLine($"[ {target} ] 的攻击力提升了 {ExATK * 100:0.##}%,物理护甲提升了 {ExDEF * 100:0.##}%,魔法抗性提升了 {ExMDF * 100:0.##}%!持续时间:{持续时间}!"); + ExATK2 e = new(Skill, new() + { + { "exatk", ExATK } + }, caster); + 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.DamageBoost; + e.Source = caster; + e.OnEffectGained(target); + ExDEF2 e2 = new(Skill, new() + { + { "exdef", ExDEF } + }, caster); + target.Effects.Add(e2); + if (_durative && _duration > 0) + { + e2.Durative = true; + e2.Duration = 实际持续时间; + e2.RemainDuration = 实际持续时间; + } + else if (!_durative && _durationTurn > 0) + { + e2.Durative = false; + e2.DurationTurn = (int)实际持续时间; + e2.RemainDurationTurn = (int)实际持续时间; + } + e2.EffectType = EffectType.DefenseBoost; + e2.Source = caster; + e2.OnEffectGained(target); + ExMDF e3 = new(Skill, new() + { + { "mdftype", 0 }, + { "mdfvalue", ExMDF } + }, caster); + target.Effects.Add(e3); + if (_durative && _duration > 0) + { + e3.Durative = true; + e3.Duration = 实际持续时间; + e3.RemainDuration = 实际持续时间; + } + else if (!_durative && _durationTurn > 0) + { + e3.Durative = false; + e3.DurationTurn = (int)实际持续时间; + e3.RemainDurationTurn = (int)实际持续时间; + } + e3.EffectType = EffectType.DefenseBoost; + e3.Source = caster; + e3.OnEffectGained(target); + GamingQueue?.LastRound.ApplyEffects.TryAdd(target, [EffectType.DamageBoost, EffectType.DefenseBoost]); + } + } + } +} diff --git a/OshimaModules/Skills/魔法/结晶防护.cs b/OshimaModules/Skills/魔法/结晶防护.cs index e6e2f8c..64e8ff7 100644 --- a/OshimaModules/Skills/魔法/结晶防护.cs +++ b/OshimaModules/Skills/魔法/结晶防护.cs @@ -9,10 +9,10 @@ namespace Oshima.FunGame.OshimaModules.Skills 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 => Level > 0 ? 75 - (1 * (Level - 1)) : 75; + public override double MPCost => Level > 0 ? 75 + (80 * (Level - 1)) : 75; + public override double CD => Level > 0 ? 70 - (1 * (Level - 1)) : 70; public override double CastTime => Level > 0 ? 3 + (1.5 * (Level - 1)) : 3; - public override double HardnessTime { get; set; } = 4; + public override double HardnessTime { get; set; } = 3; public override bool CanSelectSelf => true; public override bool CanSelectEnemy => false; public override bool CanSelectTeammate => true; diff --git a/OshimaModules/Skills/魔法/结晶防护复.cs b/OshimaModules/Skills/魔法/结晶防护复.cs new file mode 100644 index 0000000..215b135 --- /dev/null +++ b/OshimaModules/Skills/魔法/结晶防护复.cs @@ -0,0 +1,120 @@ +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Constant; +using Oshima.FunGame.OshimaModules.Effects.OpenEffects; + +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 ? 90 + (95 * (Level - 1)) : 90; + public override double CD => Level > 0 ? 80 - (0.5 * (Level - 1)) : 75; + public override double CastTime => Level > 0 ? 4 + (1.5 * (Level - 1)) : 4; + public override double HardnessTime { get; set; } = 5; + public override bool CanSelectSelf => true; + public override bool CanSelectEnemy => false; + public override bool CanSelectTeammate => true; + public override int CanSelectTargetCount + { + get + { + return Level switch + { + 3 => 3, + 4 => 3, + 5 => 3, + 6 => 4, + 7 => 4, + 8 => 4, + _ => 2 + }; + } + } + + public 结晶防护复(Character? character = null) : base(SkillType.Magic, character) + { + Effects.Add(new 结晶防护复特效(this, false, 0, 3)); + } + } + + public class 结晶防护复特效 : Effect + { + public override long Id => Skill.Id; + public override string Name => Skill.Name; + public override string Description => $"提升目标{(Skill.CanSelectTargetCount > 1 ? $"至多 {Skill.CanSelectTargetCount} 个" : "")}友方角色 {ExDEF * 100:0.##}% 物理护甲和 {ExMDF * 100:0.##}% 魔法抗性,持续 {持续时间}。"; + public override EffectType EffectType => EffectType.DefenseBoost; + public override DispelledType DispelledType => DispelledType.Weak; + + 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 bool _durative; + private readonly double _duration; + private readonly int _durationTurn; + private readonly double _levelGrowth; + + private double ExDEF => Level > 0 ? 0.15 + 0.15 * (Level - 1) : 0.15; + private double ExMDF => Level > 0 ? 0.02 + 0.02 * (Level - 1) : 0.02; + + public 结晶防护复特效(Skill skill, bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0) : base(skill) + { + GamingQueue = skill.GamingQueue; + _durative = durative; + _duration = duration; + _durationTurn = durationTurn; + _levelGrowth = levelGrowth; + } + + public override void OnSkillCasted(Character caster, List targets, Dictionary others) + { + foreach (Character target in targets) + { + WriteLine($"[ {target} ] 的物理护甲提升了 {ExDEF * 100:0.##}%,魔法抗性提升了 {ExMDF * 100:0.##}%!持续时间:{持续时间}!"); + ExDEF2 e = new(Skill, new() + { + { "exdef", ExDEF } + }, caster); + 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.DefenseBoost; + e.Source = caster; + e.OnEffectGained(target); + ExMDF e2 = new(Skill, new() + { + { "mdftype", 0 }, + { "mdfvalue", ExMDF } + }, caster); + target.Effects.Add(e2); + if (_durative && _duration > 0) + { + e2.Durative = true; + e2.Duration = 实际持续时间; + e2.RemainDuration = 实际持续时间; + } + else if (!_durative && _durationTurn > 0) + { + e2.Durative = false; + e2.DurationTurn = (int)实际持续时间; + e2.RemainDurationTurn = (int)实际持续时间; + } + e2.EffectType = EffectType.DefenseBoost; + e2.Source = caster; + e2.OnEffectGained(target); + GamingQueue?.LastRound.ApplyEffects.TryAdd(target, [EffectType.DefenseBoost]); + } + } + } +} diff --git a/OshimaModules/Skills/魔法/风之守护.cs b/OshimaModules/Skills/魔法/风之守护.cs index 2583522..829490b 100644 --- a/OshimaModules/Skills/魔法/风之守护.cs +++ b/OshimaModules/Skills/魔法/风之守护.cs @@ -9,10 +9,10 @@ namespace Oshima.FunGame.OshimaModules.Skills 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 ? 100 + (100 * (Level - 1)) : 100; - public override double CD => Level > 0 ? 75 - (1 * (Level - 1)) : 75; + public override double MPCost => Level > 0 ? 75 + (80 * (Level - 1)) : 75; + public override double CD => Level > 0 ? 60 - (0.5 * (Level - 1)) : 60; public override double CastTime => Level > 0 ? 4 + (1 * (Level - 1)) : 4; - public override double HardnessTime { get; set; } = 6; + public override double HardnessTime { get; set; } = 3; public override bool CanSelectSelf => true; public override bool CanSelectEnemy => false; public override bool CanSelectTeammate => true; diff --git a/OshimaModules/Skills/魔法/风之守护复.cs b/OshimaModules/Skills/魔法/风之守护复.cs new file mode 100644 index 0000000..48d1d01 --- /dev/null +++ b/OshimaModules/Skills/魔法/风之守护复.cs @@ -0,0 +1,119 @@ +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Constant; +using Oshima.FunGame.OshimaModules.Effects.OpenEffects; + +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 ? 85 + (90 * (Level - 1)) : 85; + public override double CD => Level > 0 ? 75 - (0.5 * (Level - 1)) : 75; + public override double CastTime => Level > 0 ? 4 + (1.5 * (Level - 1)) : 4; + public override double HardnessTime { get; set; } = 6; + public override bool CanSelectSelf => true; + public override bool CanSelectEnemy => false; + public override bool CanSelectTeammate => true; + public override int CanSelectTargetCount + { + get + { + return Level switch + { + 3 => 3, + 4 => 3, + 5 => 3, + 6 => 4, + 7 => 4, + 8 => 4, + _ => 2 + }; + } + } + + public 风之守护复(Character? character = null) : base(SkillType.Magic, character) + { + Effects.Add(new 风之守护复特效(this, false, 0, 3)); + } + } + + public class 风之守护复特效 : Effect + { + public override long Id => Skill.Id; + public override string Name => Skill.Name; + public override string Description => $"提升目标{(Skill.CanSelectTargetCount > 1 ? $"至多 {Skill.CanSelectTargetCount} 个" : "")}友方角色 {CritRate * 100:0.##}% 暴击率和 {EvadeRate * 100:0.##}% 闪避率,持续 {持续时间}。"; + public override EffectType EffectType => EffectType.CritBoost; + public override DispelledType DispelledType => DispelledType.Weak; + + 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 bool _durative; + private readonly double _duration; + private readonly int _durationTurn; + private readonly double _levelGrowth; + + private double CritRate => Level > 0 ? 0.02 + 0.02 * (Level - 1) : 0.02; + private double EvadeRate => Level > 0 ? 0.015 + 0.012 * (Level - 1) : 0.015; + + public 风之守护复特效(Skill skill, bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0) : base(skill) + { + GamingQueue = skill.GamingQueue; + _durative = durative; + _duration = duration; + _durationTurn = durationTurn; + _levelGrowth = levelGrowth; + } + + public override void OnSkillCasted(Character caster, List targets, Dictionary others) + { + foreach (Character target in targets) + { + WriteLine($"[ {target} ] 的暴击率提升了 {CritRate * 100:0.##}%,闪避率提升了 {EvadeRate * 100:0.##}%!持续时间:{持续时间}!"); + ExCritRate e = new(Skill, new() + { + { "excr", CritRate } + }, caster); + 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.CritBoost; + e.Source = caster; + e.OnEffectGained(target); + ExEvadeRate e2 = new(Skill, new() + { + { "exer", EvadeRate } + }, caster); + target.Effects.Add(e2); + if (_durative && _duration > 0) + { + e2.Durative = true; + e2.Duration = 实际持续时间; + e2.RemainDuration = 实际持续时间; + } + else if (!_durative && _durationTurn > 0) + { + e2.Durative = false; + e2.DurationTurn = (int)实际持续时间; + e2.RemainDurationTurn = (int)实际持续时间; + } + e2.EffectType = EffectType.EvadeBoost; + e2.Source = caster; + e2.OnEffectGained(target); + GamingQueue?.LastRound.ApplyEffects.TryAdd(target, [EffectType.CritBoost, EffectType.EvadeBoost]); + } + } + } +} diff --git a/OshimaServers/Service/FunGameService.cs b/OshimaServers/Service/FunGameService.cs index bc6acf5..03b1734 100644 --- a/OshimaServers/Service/FunGameService.cs +++ b/OshimaServers/Service/FunGameService.cs @@ -54,7 +54,7 @@ namespace Oshima.FunGame.OshimaServers.Service 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));