From 4ed2c0127adfa4f263136921fb337ad035bc63be Mon Sep 17 00:00:00 2001 From: milimoe Date: Mon, 9 Sep 2024 01:42:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=96=B0=E7=9A=84=E6=8A=80?= =?UTF-8?q?=E8=83=BD=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Library/Effects/冰霜攻击特效.cs | 6 +++--- Library/Effects/大岛特性特效.cs | 30 ++++++++++++++++++++++++++++++ Library/Effects/天赐之力特效.cs | 8 ++++---- Library/Main.cs | 23 ++++++++++++++++++----- Library/Skills/冰霜攻击.cs | 4 ++-- Library/Skills/大岛特性.cs | 22 ++++++++++++++++++++++ Library/Skills/天赐之力.cs | 4 ++-- 7 files changed, 81 insertions(+), 16 deletions(-) create mode 100644 Library/Effects/大岛特性特效.cs create mode 100644 Library/Skills/大岛特性.cs diff --git a/Library/Effects/冰霜攻击特效.cs b/Library/Effects/冰霜攻击特效.cs index f968ed1..0fdeb53 100644 --- a/Library/Effects/冰霜攻击特效.cs +++ b/Library/Effects/冰霜攻击特效.cs @@ -8,10 +8,10 @@ namespace Milimoe.FunGame.Testing.Effects { public override long Id => 1; public override string Name => "冰霜攻击"; - public override string Description => $"对目标敌人造成 120%(+180%/Lv) + 250%智力 [ {Damage} ] 点元素魔法伤害。"; + public override string Description => $"对目标敌人造成 {Calculation.Round4Digits(1.2 * (1 + 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.Element; + public override MagicType MagicType => MagicType.None; private double Damage { @@ -20,7 +20,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.ATK + (Skill.Character.INT * 2.5)); + d = Calculation.Round2Digits(1.2 * (1 + 1.8 * (Skill.Level - 1)) * Skill.Character.INT); } return d; } diff --git a/Library/Effects/大岛特性特效.cs b/Library/Effects/大岛特性特效.cs new file mode 100644 index 0000000..1385815 --- /dev/null +++ b/Library/Effects/大岛特性特效.cs @@ -0,0 +1,30 @@ +using Milimoe.FunGame.Core.Api.Utility; +using Milimoe.FunGame.Core.Entity; + +namespace Milimoe.FunGame.Testing.Effects +{ + public class 大岛特性特效(Skill skill) : Effect(skill) + { + public override long Id => 1; + public override string Name => "大岛特性"; + public override string Description => $"META马专属被动:力量+5,力量成长+0.5;在受到伤害时,获得的能量提升50%,每回合开始还能获得额外的 [ {EP} ] 能量值。"; + public override bool TargetSelf => true; + public static double EP => 10; + + public override bool AlterEPAfterGetDamage(Character character, double baseEP, out double newEP) + { + newEP = Calculation.Round2Digits(baseEP * 1.5); + if (Skill.Character != null) Console.WriteLine("[ " + Skill.Character + " ] 发动了META马专属被动!本次获得了 " + newEP + " 能量!"); + return true; + } + + public override void OnTurnStart(Character character) + { + if (character.EP < 200) + { + character.EP += EP; + Console.WriteLine("[ " + character + " ] 发动了META马专属被动!本次获得了 " + EP + " 能量!"); + } + } + } +} diff --git a/Library/Effects/天赐之力特效.cs b/Library/Effects/天赐之力特效.cs index fcd05f8..2f3c800 100644 --- a/Library/Effects/天赐之力特效.cs +++ b/Library/Effects/天赐之力特效.cs @@ -8,7 +8,7 @@ namespace Milimoe.FunGame.Testing.Effects { public override long Id => 1; public override string Name => "天赐之力"; - public override string Description => $"{Duration} 时间内,获得 25% 闪避率,普通攻击硬直时间额外减少 20%,基于 120%(+60%/Lv)核心属性 [ {伤害加成} ] 强化普通攻击的伤害。"; + public override string Description => $"{Duration} 时间内,获得 25% 闪避率(不可叠加),普通攻击硬直时间额外减少 20%,基于 {Calculation.Round4Digits((1.2 + (1 + 0.6 * (Skill.Level - 1))) * 100)}% 核心属性 [ {伤害加成} ] 强化普通攻击的伤害。"; public override bool TargetSelf => false; public override int TargetCount => 1; public override bool Durative => true; @@ -56,10 +56,10 @@ namespace Milimoe.FunGame.Testing.Effects public override void OnSkillCasted(ActionQueue queue, Character actor, List enemys, List teammates, Dictionary others) { - if (!actor.Effects.ContainsKey(Name)) + RemainDuration = Duration; + if (!actor.Effects.Contains(this)) { - actor.Effects.Add(Name, this); - RemainDuration = Duration; + actor.Effects.Add(this); OnEffectGained(actor); } } diff --git a/Library/Main.cs b/Library/Main.cs index cbf2d15..29c8faa 100644 --- a/Library/Main.cs +++ b/Library/Main.cs @@ -85,11 +85,24 @@ if (list.Count > 3) // 升级和赋能 for (int index = 0; index < characters.Count; index++) { - characters[index].Level = 60; - characters[index].Skills.Add("冰霜攻击", new 冰霜攻击(characters[index])); - characters[index].Skills["冰霜攻击"].Level += 8; - characters[index].Skills.Add("天赐之力", new 天赐之力(characters[index])); - characters[index].Skills["天赐之力"].Level += 6; + Character c = characters[index]; + c.Level = 60; + c.NormalAttack.Level += 7; + + Skill 冰霜攻击 = new 冰霜攻击(c); + 冰霜攻击.Level += 8; + c.Skills.Add(冰霜攻击); + + if (c.ToString() == character1.ToString()) + { + Skill 大岛特性 = new 大岛特性(c); + 大岛特性.Level++; + c.Skills.Add(大岛特性); + } + + Skill 天赐之力 = new 天赐之力(c); + 天赐之力.Level += 6; + c.Skills.Add(天赐之力); } // 显示角色信息 diff --git a/Library/Skills/冰霜攻击.cs b/Library/Skills/冰霜攻击.cs index 2966b25..6c8ed4f 100644 --- a/Library/Skills/冰霜攻击.cs +++ b/Library/Skills/冰霜攻击.cs @@ -7,7 +7,7 @@ namespace Milimoe.FunGame.Testing.Skills { public override long Id => 1; public override string Name => "冰霜攻击"; - public override string Description => Effects.Count > 0 ? Effects.Values.First().Description : ""; + public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; public override double MPCost => BaseMPCost + (50 * (Level - 1)); public override double CD => 20; public override double CastTime => 6; @@ -16,7 +16,7 @@ namespace Milimoe.FunGame.Testing.Skills public 冰霜攻击(Character character) : base(true, true, character) { - Effects.Add("e1", new 冰霜攻击特效(this)); + Effects.Add(new 冰霜攻击特效(this)); } } } diff --git a/Library/Skills/大岛特性.cs b/Library/Skills/大岛特性.cs new file mode 100644 index 0000000..22d435e --- /dev/null +++ b/Library/Skills/大岛特性.cs @@ -0,0 +1,22 @@ +using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Testing.Effects; + +namespace Milimoe.FunGame.Testing.Skills +{ + public class 大岛特性 : Skill + { + public override long Id => 1; + public override string Name => "大岛特性"; + public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; + + public 大岛特性(Character character) : base(false, false, character) + { + Effects.Add(new 大岛特性特效(this)); + } + + public override IEnumerable AddInactiveEffectToCharacter() + { + return Effects; + } + } +} diff --git a/Library/Skills/天赐之力.cs b/Library/Skills/天赐之力.cs index 7b8702b..9c41499 100644 --- a/Library/Skills/天赐之力.cs +++ b/Library/Skills/天赐之力.cs @@ -7,14 +7,14 @@ namespace Milimoe.FunGame.Testing.Skills { public override long Id => 1; public override string Name => "天赐之力"; - public override string Description => Effects.Count > 0 ? Effects.Values.First().Description : ""; + public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; public override double EPCost => 100; public override double CD => 60; public override double HardnessTime => 15; public 天赐之力(Character character) : base(true, character) { - Effects.Add("e1", new 天赐之力特效(this)); + Effects.Add(new 天赐之力特效(this)); } } }