diff --git a/Library/Effects/冰霜攻击特效.cs b/Library/Effects/冰霜攻击特效.cs index 0fdeb53..5ae01ca 100644 --- a/Library/Effects/冰霜攻击特效.cs +++ b/Library/Effects/冰霜攻击特效.cs @@ -6,12 +6,11 @@ namespace Milimoe.FunGame.Testing.Effects { public class 冰霜攻击特效(Skill skill) : Effect(skill) { - public override long Id => 1; + public override long Id => Skill.Id; public override string Name => "冰霜攻击"; - public override string Description => $"对目标敌人造成 {Calculation.Round4Digits(1.2 * (1 + 1.8 * (Skill.Level - 1))) * 100}%智力 [ {Damage} ] 点{CharacterSet.GetMagicName(MagicType)}。"; + public override string Description => $"对目标敌人造成 {Calculation.Round2Digits(90 + 60 * (Skill.Level - 1))} + {Calculation.Round2Digits((1.2 + 1.8 * (Skill.Level - 1)) * 100)}%智力 [ {Damage} ] 点{CharacterSet.GetMagicName(MagicType)}。"; public override bool TargetSelf => false; public override int TargetCount => 1; - public override MagicType MagicType => MagicType.None; private double Damage { @@ -20,7 +19,7 @@ namespace Milimoe.FunGame.Testing.Effects double d = 0; if (Skill.Character != null) { - d = Calculation.Round2Digits(1.2 * (1 + 1.8 * (Skill.Level - 1)) * Skill.Character.INT); + d = Calculation.Round2Digits(90 + 60 * (Skill.Level - 1) + (1.2 + 1.8 * (Skill.Level - 1)) * Skill.Character.INT); } return d; } diff --git a/Library/Effects/天赐之力特效.cs b/Library/Effects/天赐之力特效.cs index 2f3c800..2e46a73 100644 --- a/Library/Effects/天赐之力特效.cs +++ b/Library/Effects/天赐之力特效.cs @@ -6,14 +6,13 @@ namespace Milimoe.FunGame.Testing.Effects { public class 天赐之力特效(Skill skill) : Effect(skill) { - public override long Id => 1; + public override long Id => Skill.Id; public override string Name => "天赐之力"; - public override string Description => $"{Duration} 时间内,获得 25% 闪避率(不可叠加),普通攻击硬直时间额外减少 20%,基于 {Calculation.Round4Digits((1.2 + (1 + 0.6 * (Skill.Level - 1))) * 100)}% 核心属性 [ {伤害加成} ] 强化普通攻击的伤害。"; + public override string Description => $"{Duration} 时间内,获得 25% 闪避率(不可叠加),普通攻击硬直时间额外减少 20%,基于 {Calculation.Round2Digits((1.2 + (1 + 0.6 * (Skill.Level - 1))) * 100)}% 核心属性 [ {伤害加成} ] 强化普通攻击的伤害。"; public override bool TargetSelf => false; public override int TargetCount => 1; public override bool Durative => true; public override double Duration => 40; - public override MagicType MagicType => MagicType.Element; private double 伤害加成 { diff --git a/Library/Effects/疾风步特效.cs b/Library/Effects/疾风步特效.cs new file mode 100644 index 0000000..a312856 --- /dev/null +++ b/Library/Effects/疾风步特效.cs @@ -0,0 +1,85 @@ +using Milimoe.FunGame.Core.Api.Utility; +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Library.Constant; + +namespace Milimoe.FunGame.Testing.Effects +{ + public class 疾风步特效(Skill skill) : Effect(skill) + { + public override long Id => Skill.Id; + public override string Name => "疾风步"; + public override string Description => $"进入不可选中状态,获得 100 行动速度,持续 {Duration} 时间。在持续时间内,首次造成伤害会附加 {Calculation.Round2Digits((1.5 + 1.5 * (Skill.Level - 1)) * 100)}% 敏捷 [ {伤害加成} ] 的强化伤害,并解除不可选中状态。剩余的持续时间内,提高 15% 闪避率和暴击率。"; + public override bool TargetSelf => true; + public override bool Durative => true; + public override double Duration => 15 + (2 * (Level - 1)); + + private double 伤害加成 + { + get + { + double d = 0; + if (Skill.Character != null) + { + d = Calculation.Round2Digits((1.5 + 1.5 * (Skill.Level - 1)) * Skill.Character.AGI); + } + return d; + } + } + private bool 首次伤害 { get; set; } = true; + private bool 破隐一击 { get; set; } = false; + + public override void OnEffectGained(Character character) + { + character.IsUnselectable = true; + Skill.IsInEffect = true; + character.ExSPD += 100; + } + + public override void OnEffectLost(Character character) + { + Skill.IsInEffect = false; + if (破隐一击) + { + character.ExEvadeRate -= 0.15; + character.ExCritRate -= 0.15; + } + else + { + character.IsUnselectable = false; + } + character.ExSPD -= 100; + } + + public override bool AlterActualDamageAfterCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, bool isCritical, out double newDamage) + { + if (首次伤害) + { + 首次伤害 = false; + newDamage = Calculation.Round2Digits(damage + 伤害加成); + Console.WriteLine($"[ {character} ] 发动了 [ 疾风步 ] 的特效,获得了 [ {伤害加成} ] 点伤害加成!"); + 破隐一击 = true; + character.ExEvadeRate += 0.15; + character.ExCritRate += 0.15; + character.IsUnselectable = false; + return true; + } + else + { + newDamage = damage; + return true; + } + } + + public override void OnSkillCasted(ActionQueue queue, Character actor, List enemys, List teammates, Dictionary others) + { + if (!actor.Effects.Contains(this)) + { + 首次伤害 = true; + 破隐一击 = false; + RemainDuration = Duration; + actor.Effects.Add(this); + OnEffectGained(actor); + } + } + } +} diff --git a/Library/Main.cs b/Library/Main.cs index 29c8faa..534667c 100644 --- a/Library/Main.cs +++ b/Library/Main.cs @@ -57,6 +57,15 @@ foreach (string moduledll in moduledllsha512.Keys) } } +// M = 0, W = 7, P1 = 1, P3 = 1 +// M = 1, W = 6, P1 = 2, P3 = 0 +// M = 2, W = 4, P1 = 0, P3 = 2 +// M = 2, W = 5, P1 = 0, P3 = 0 +// M = 3, W = 3, P1 = 1, P3 = 1 +// M = 4, W = 2, P1 = 2, P3 = 0 +// M = 5, W = 0, P1 = 0, P3 = 2 +// M = 5, W = 1, P1 = 0, P3 = 0 + if (list.Count > 3) { Console.WriteLine(); @@ -100,6 +109,13 @@ if (list.Count > 3) c.Skills.Add(大岛特性); } + if (c.ToString() == character9.ToString()) + { + Skill 疾风步 = new 疾风步(c); + 疾风步.Level += 6; + c.Skills.Add(疾风步); + } + Skill 天赐之力 = new 天赐之力(c); 天赐之力.Level += 6; c.Skills.Add(天赐之力); diff --git a/Library/Skills/冰霜攻击.cs b/Library/Skills/冰霜攻击.cs index 6c8ed4f..a684833 100644 --- a/Library/Skills/冰霜攻击.cs +++ b/Library/Skills/冰霜攻击.cs @@ -5,7 +5,7 @@ namespace Milimoe.FunGame.Testing.Skills { public class 冰霜攻击 : Skill { - public override long Id => 1; + public override long Id => 2001; public override string Name => "冰霜攻击"; public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; public override double MPCost => BaseMPCost + (50 * (Level - 1)); diff --git a/Library/Skills/大岛特性.cs b/Library/Skills/大岛特性.cs index 22d435e..b482d82 100644 --- a/Library/Skills/大岛特性.cs +++ b/Library/Skills/大岛特性.cs @@ -5,7 +5,7 @@ namespace Milimoe.FunGame.Testing.Skills { public class 大岛特性 : Skill { - public override long Id => 1; + public override long Id => 5001; public override string Name => "大岛特性"; public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; diff --git a/Library/Skills/天赐之力.cs b/Library/Skills/天赐之力.cs index 9c41499..41e2fcd 100644 --- a/Library/Skills/天赐之力.cs +++ b/Library/Skills/天赐之力.cs @@ -5,7 +5,7 @@ namespace Milimoe.FunGame.Testing.Skills { public class 天赐之力 : Skill { - public override long Id => 1; + public override long Id => 3001; public override string Name => "天赐之力"; public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; public override double EPCost => 100; diff --git a/Library/Skills/疾风步.cs b/Library/Skills/疾风步.cs new file mode 100644 index 0000000..5fbd902 --- /dev/null +++ b/Library/Skills/疾风步.cs @@ -0,0 +1,20 @@ +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Testing.Effects; + +namespace Milimoe.FunGame.Testing.Skills +{ + public class 疾风步 : Skill + { + public override long Id => 4001; + public override string Name => "疾风步"; + public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; + public override double EPCost => 35; + public override double CD => 35; + public override double HardnessTime => 5; + + public 疾风步(Character character) : base(true, false, character) + { + Effects.Add(new 疾风步特效(this)); + } + } +}