From 6ce313e7c08c79f4f5162cb7e082553313c8b24a Mon Sep 17 00:00:00 2001 From: milimoe Date: Fri, 13 Sep 2024 00:01:08 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=9B=E5=BA=A6=2012/12?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Library/Characters/Characters.cs | 2 +- Library/Main.cs | 35 +++++-- .../ColdBlue/{嗜血标记.cs => 嗜血本能.cs} | 12 +-- Library/Skills/ColdBlue/累积之压.cs | 4 +- Library/Skills/NanGanyu/三重叠加.cs | 4 +- Library/Skills/NanGanyu/灵能反射.cs | 25 ++++- Library/Skills/QWQAQW/玻璃大炮.cs | 9 +- Library/Skills/QingXiang/枯竭打击.cs | 2 +- Library/Skills/QuDuoduo/弱者猎手.cs | 26 ++++- Library/Skills/QuDuoduo/血之狂欢.cs | 78 ++++----------- Library/Skills/战技/疾风步.cs | 2 +- Library/Skills/绿拱门/平衡强化.cs | 96 ++++++++----------- Library/Skills/绿拱门/敏捷之刃.cs | 24 ++++- Library/Skills/马猴烧酒/绝对领域.cs | 6 +- 14 files changed, 175 insertions(+), 150 deletions(-) rename Library/Skills/ColdBlue/{嗜血标记.cs => 嗜血本能.cs} (88%) diff --git a/Library/Characters/Characters.cs b/Library/Characters/Characters.cs index f0eafe2..2fb6982 100644 --- a/Library/Characters/Characters.cs +++ b/Library/Characters/Characters.cs @@ -16,7 +16,7 @@ namespace FunGame.Testing.Characters c.NickName = "大島シヤ"; c.PrimaryAttribute = PrimaryAttribute.STR; c.InitialATK = 25; - c.InitialHP = 160; + c.InitialHP = 145; c.InitialMP = 10; c.InitialSTR = 35; c.STRGrowth = 3.5; diff --git a/Library/Main.cs b/Library/Main.cs index 2feafc3..9184608 100644 --- a/Library/Main.cs +++ b/Library/Main.cs @@ -257,22 +257,41 @@ if (list.Count > 3) }; c.Skills.Add(累积之压); - Skill 嗜血标记 = new 嗜血标记(c) + Skill 嗜血本能 = new 嗜血本能(c) { Level = slevel }; - c.Skills.Add(嗜血标记); + c.Skills.Add(嗜血本能); } - - if (c != character1 && c != character2 && c != character3 && c != character4 && - c != character5 && c != character6 && c != character7 && c != character8 && - c != character9 && c != character10) //&& c != character11 && c != character12) + + if (c == character11) { - Skill 天赐之力 = new 天赐之力(c) + Skill 敏捷之刃 = new 敏捷之刃(c) + { + Level = 1 + }; + c.Skills.Add(敏捷之刃); + + Skill 平衡强化 = new 平衡强化(c) { Level = slevel }; - c.Skills.Add(天赐之力); + c.Skills.Add(平衡强化); + } + + if (c == character12) + { + Skill 弱者猎手 = new 弱者猎手(c) + { + Level = 1 + }; + c.Skills.Add(弱者猎手); + + Skill 血之狂欢 = new 血之狂欢(c) + { + Level = slevel + }; + c.Skills.Add(血之狂欢); } } diff --git a/Library/Skills/ColdBlue/嗜血标记.cs b/Library/Skills/ColdBlue/嗜血本能.cs similarity index 88% rename from Library/Skills/ColdBlue/嗜血标记.cs rename to Library/Skills/ColdBlue/嗜血本能.cs index 59c7f60..cb7f246 100644 --- a/Library/Skills/ColdBlue/嗜血标记.cs +++ b/Library/Skills/ColdBlue/嗜血本能.cs @@ -5,22 +5,22 @@ using Milimoe.FunGame.Testing.Effects; namespace Milimoe.FunGame.Testing.Skills { - public class 嗜血标记 : Skill + public class 嗜血本能 : Skill { public override long Id => 3010; - public override string Name => "嗜血标记"; + public override string Name => "嗜血本能"; public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; public override double EPCost => 100; public override double CD => 42 - 1 * (Level - 1); public override double HardnessTime => 12; - public 嗜血标记(Character character) : base(SkillType.SuperSkill, character) + public 嗜血本能(Character character) : base(SkillType.SuperSkill, character) { - Effects.Add(new 嗜血标记特效(this)); + Effects.Add(new 嗜血本能特效(this)); } } - public class 嗜血标记特效(Skill skill) : Effect(skill) + public class 嗜血本能特效(Skill skill) : Effect(skill) { public override long Id => Skill.Id; public override string Name => Skill.Name; @@ -45,7 +45,7 @@ namespace Milimoe.FunGame.Testing.Skills { 层数 = 4; } - double 实际吸血 = Calculation.Round2Digits(吸血 * damage); + double 实际吸血 = Calculation.Round2Digits(吸血 * 层数 * damage); character.HP += 实际吸血; WriteLine($"[ {character} ] 回复了 {实际吸血} 点生命值!"); } diff --git a/Library/Skills/ColdBlue/累积之压.cs b/Library/Skills/ColdBlue/累积之压.cs index c5e1e30..72b9b9c 100644 --- a/Library/Skills/ColdBlue/累积之压.cs +++ b/Library/Skills/ColdBlue/累积之压.cs @@ -41,8 +41,8 @@ namespace Milimoe.FunGame.Testing.Skills if (effects.Any() && effects.First() is 累积之压标记 e) { e.MarkLevel++; - IEnumerable effects2 = character.Effects.Where(e => e is 嗜血标记特效); - if (effects2.Any() && effects2.First() is 嗜血标记特效 e2) + IEnumerable effects2 = character.Effects.Where(e => e is 嗜血本能特效); + if (effects2.Any() && effects2.First() is 嗜血本能特效 e2) { if (e.MarkLevel >= 4) { diff --git a/Library/Skills/NanGanyu/三重叠加.cs b/Library/Skills/NanGanyu/三重叠加.cs index a3b910f..9fd2114 100644 --- a/Library/Skills/NanGanyu/三重叠加.cs +++ b/Library/Skills/NanGanyu/三重叠加.cs @@ -22,7 +22,7 @@ namespace Milimoe.FunGame.Testing.Skills { public override long Id => Skill.Id; public override string Name => "三重叠加"; - public override string Description => $"使 [ 灵能反射 ] 的当前释放魔法次数归零,并且最大消除次数提高到 {灵能反射次数},并且在魔法命中时能够回复所回复能量值的 10 倍魔法值,持续 {技能持续次数} 次(灵能反射每消除次数达到最大时算一次)。" + + public override string Description => $"使 [ 灵能反射 ] 支持普通攻击,且当前释放魔法次数归零,最大硬直消除次数提高到 {灵能反射次数} 次;在魔法命中和普通攻击命中时能够回复所回复能量值的 10 倍魔法值,持续 {技能持续次数} 次(灵能反射每消除次数达到最大时算一次)。" + $"(剩余:{剩余持续次数} 次)"; public override bool TargetSelf => true; @@ -35,6 +35,7 @@ namespace Milimoe.FunGame.Testing.Skills IEnumerable effects = character.Effects.Where(e => e is 灵能反射特效); if (effects.Any() && effects.First() is 灵能反射特效 e) { + e.是否支持普攻 = true; e.触发硬直次数 = 3; e.释放次数 = 0; } @@ -45,6 +46,7 @@ namespace Milimoe.FunGame.Testing.Skills IEnumerable effects = character.Effects.Where(e => e is 灵能反射特效); if (effects.Any() && effects.First() is 灵能反射特效 e) { + e.是否支持普攻 = false; e.触发硬直次数 = 2; } } diff --git a/Library/Skills/NanGanyu/灵能反射.cs b/Library/Skills/NanGanyu/灵能反射.cs index de83737..79a9582 100644 --- a/Library/Skills/NanGanyu/灵能反射.cs +++ b/Library/Skills/NanGanyu/灵能反射.cs @@ -25,9 +25,10 @@ namespace Milimoe.FunGame.Testing.Skills { public override long Id => Skill.Id; public override string Name => Skill.Name; - public override string Description => $"每释放 {触发硬直次数} 次魔法才会触发硬直时间,且魔法命中时基于 25% 智力 [{获得额外能量值}] 获得额外能量值。"; + public override string Description => $"每释放 {触发硬直次数} 次魔法才会触发硬直时间,且魔法命中时基于 25% 智力 [ {获得额外能量值} ] 获得额外能量值。"; public override bool TargetSelf => true; + public bool 是否支持普攻 { get; set; } = false; public int 触发硬直次数 { get; set; } = 2; public int 释放次数 { get; set; } = 0; public double 获得额外能量值 @@ -40,7 +41,7 @@ namespace Milimoe.FunGame.Testing.Skills public override void AfterDamageCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult) { - if (character == Skill.Character && isMagicDamage && damageResult != DamageResult.Evaded && character.EP < 200) + if (character == Skill.Character && (是否支持普攻 && isNormalAttack || isMagicDamage) && damageResult != DamageResult.Evaded && character.EP < 200) { double 实际获得能量值 = 获得额外能量值; character.EP += 实际获得能量值; @@ -55,12 +56,29 @@ namespace Milimoe.FunGame.Testing.Skills } } - public override void AlterHardnessTimeAfterCastSkill(Character character, ref double baseHardnessTime, ref bool isCheckProtected) + public override void AlterHardnessTimeAfterNormalAttack(Character character, ref double baseHardnessTime, ref bool isCheckProtected) + { + if (是否支持普攻) + { + AlterHardnessTime(character, ref baseHardnessTime, ref isCheckProtected); + } + } + + public override void AlterHardnessTimeAfterCastSkill(Character character, Skill skill, ref double baseHardnessTime, ref bool isCheckProtected) + { + if (skill.SkillType == SkillType.Magic) + { + AlterHardnessTime(character, ref baseHardnessTime, ref isCheckProtected); + } + } + + public void AlterHardnessTime(Character character, ref double baseHardnessTime, ref bool isCheckProtected) { 释放次数++; if (释放次数 < 触发硬直次数) { baseHardnessTime = 0; + isCheckProtected = false; WriteLine($"[ {character} ] 发动了灵能反射,消除了硬直时间!!"); } else @@ -70,6 +88,7 @@ namespace Milimoe.FunGame.Testing.Skills if (effects.Any() && effects.First() is 三重叠加特效 e) { baseHardnessTime = 0; + isCheckProtected = false; WriteLine($"[ {character} ] 发动了灵能反射,消除了硬直时间!!"); e.剩余持续次数--; if (e.剩余持续次数 == 0) diff --git a/Library/Skills/QWQAQW/玻璃大炮.cs b/Library/Skills/QWQAQW/玻璃大炮.cs index 2863dbb..50a83a7 100644 --- a/Library/Skills/QWQAQW/玻璃大炮.cs +++ b/Library/Skills/QWQAQW/玻璃大炮.cs @@ -25,7 +25,7 @@ namespace Milimoe.FunGame.Testing.Skills { public override long Id => Skill.Id; public override string Name => Skill.Name; - public override string Description => $"生命值高于30%时,受到额外的 [ 20~40% ] 伤害,但是获得 [ 上次所受伤害的 80% ] 伤害加成;生命值低于等于30%时,不会受到额外的伤害,但是仅能获得 [ 上次所受伤害的 30% ] 伤害加成。" + + public override string Description => $"生命值高于30%时,受到额外的 [ 20~40% ] 伤害,但是获得 [ 上次所受伤害的 110~140% ] 伤害加成;生命值低于等于30%时,不会受到额外的伤害,仅能获得 [ 上次所受伤害的 35% ] 伤害加成。" + $"在没有受到任何伤害的时候,将获得 {常规伤害加成 * 100:f2}% 伤害加成。(当前伤害加成:{伤害加成 * 100:f2}%)"; public override bool TargetSelf => true; @@ -33,8 +33,9 @@ namespace Milimoe.FunGame.Testing.Skills private double 这次的伤害加成 = 0; private double 这次受到的额外伤害 = 0; private readonly double 常规伤害加成 = 0.2; - private readonly double 高于30的加成 = 0.8; - private readonly double 低于30的加成 = 0.3; + private readonly int 高于30的加成上限 = 40; + private readonly int 高于30的加成下限 = 10; + private readonly double 低于30的加成 = 0.35; private double 伤害加成 { @@ -47,7 +48,7 @@ namespace Milimoe.FunGame.Testing.Skills { if (character.HP > character.MaxHP * 0.3) { - 系数 = 高于30的加成; + 系数 = Calculation.Round2Digits(1.0 + ((new Random().Next(高于30的加成下限, 高于30的加成上限) + 0.0) / 100)); } else { diff --git a/Library/Skills/QingXiang/枯竭打击.cs b/Library/Skills/QingXiang/枯竭打击.cs index b603f2e..28b414b 100644 --- a/Library/Skills/QingXiang/枯竭打击.cs +++ b/Library/Skills/QingXiang/枯竭打击.cs @@ -38,7 +38,7 @@ namespace Milimoe.FunGame.Testing.Skills double EP = new Random().Next(10, 25); enemy.EP -= EP; WriteLine($"[ {character} ] 发动了枯竭打击![ {enemy} ] 的能量值被减少了 {EP} 点!现有能量:{enemy.EP}。"); - // 伤害提升 + // 额外伤害 if (enemy.EP >= 0 && enemy.EP < 50 || enemy.EP >= 100 && enemy.EP < 150) { double 额外伤害 = Calculation.Round2Digits(damage * 0.3); diff --git a/Library/Skills/QuDuoduo/弱者猎手.cs b/Library/Skills/QuDuoduo/弱者猎手.cs index 7cb13a8..7c30379 100644 --- a/Library/Skills/QuDuoduo/弱者猎手.cs +++ b/Library/Skills/QuDuoduo/弱者猎手.cs @@ -1,4 +1,5 @@ -using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Api.Utility; +using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Library.Constant; namespace Milimoe.FunGame.Testing.Skills @@ -24,7 +25,28 @@ namespace Milimoe.FunGame.Testing.Skills { public override long Id => Skill.Id; public override string Name => Skill.Name; - public override string Description => $"优先攻击血量更低的角色,对生命值低于自己的角色造成150%伤害。"; + public override string Description => $"优先攻击血量更低的角色,对生命值百分比低于自己的角色造成 150% 伤害。"; public override bool TargetSelf => true; + + public override void AlterExpectedDamageBeforeCalculation(Character character, Character enemy, ref double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType) + { + if (character == Skill.Character && (enemy.HP / enemy.MaxHP) <= (character.HP / character.MaxHP)) + { + double 额外伤害 = Calculation.Round2Digits(damage * 1.5); + damage = Calculation.Round2Digits(damage + 额外伤害); + } + } + + public override bool AlterEnemyListBeforeAction(Character character, List enemys, List teammates, List skills, Dictionary continuousKilling, Dictionary earnedMoney) + { + IEnumerable list = [.. enemys.OrderBy(e => Calculation.Round4Digits(e.HP / e.MaxHP))]; + if (list.Any()) + { + enemys.Clear(); + enemys.Add(list.First()); + WriteLine($"[ {character} ] 发动了弱者猎手![ {list.First()} ] 被盯上了!"); + } + return true; + } } } diff --git a/Library/Skills/QuDuoduo/血之狂欢.cs b/Library/Skills/QuDuoduo/血之狂欢.cs index 55b2fa3..991a178 100644 --- a/Library/Skills/QuDuoduo/血之狂欢.cs +++ b/Library/Skills/QuDuoduo/血之狂欢.cs @@ -1,5 +1,7 @@ -using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Api.Utility; +using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Library.Constant; +using Milimoe.FunGame.Testing.Effects; namespace Milimoe.FunGame.Testing.Skills { @@ -8,82 +10,42 @@ namespace Milimoe.FunGame.Testing.Skills public override long Id => 4012; public override string Name => "血之狂欢"; public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; + public override double EPCost => 100; + public override double CD => 45; + public override double HardnessTime => 7; - public 血之狂欢(Character character) : base(SkillType.Passive, character) + public 血之狂欢(Character character) : base(SkillType.SuperSkill, character) { Effects.Add(new 血之狂欢特效(this)); } - - public override IEnumerable AddInactiveEffectToCharacter() - { - return Effects; - } } public class 血之狂欢特效(Skill skill) : Effect(skill) { public override long Id => Skill.Id; public override string Name => Skill.Name; - public override string Description => $"30秒内,获得50%吸血。"; + public override string Description => $"获得 40% 吸血,持续 {Duration} 时间。"; public override bool TargetSelf => true; + public override bool Durative => true; + public override double Duration => 30; - private double 交换前的额外智力 = 0; - private double 交换前的额外力量 = 0; - - public override void OnAttributeChanged(Character character) + public override void AfterDamageCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult) { - if (Skill.Character != null) + if (character == Skill.Character && damageResult != DamageResult.Evaded && character.HP < character.MaxHP) { - if (Skill.Character.PrimaryAttribute == PrimaryAttribute.INT) - { - double diff = character.ExSTR - 交换前的额外力量; - character.ExINT = 交换前的额外力量 + character.BaseSTR + diff; - } - else if (Skill.Character.PrimaryAttribute == PrimaryAttribute.STR) - { - double diff = character.ExINT - 交换前的额外智力; - character.ExSTR = 交换前的额外智力 + character.BaseINT + diff; - } + double 实际吸血 = Calculation.Round2Digits(0.4 * damage); + character.HP += 实际吸血; + WriteLine($"[ {character} ] 回复了 {实际吸血} 点生命值!"); } } - public override void OnTimeElapsed(Character character, double elapsed) + public override void OnSkillCasted(Character caster, List enemys, List teammates, Dictionary others) { - if (Skill.Character != null) + RemainDuration = Duration; + if (!caster.Effects.Contains(this)) { - Character c = Skill.Character; - if (c.HP < c.MaxHP * 0.3) - { - if (c.PrimaryAttribute == PrimaryAttribute.INT) - { - double pastHP = c.HP; - double pastMaxHP = c.MaxHP; - double pastMP = c.MP; - double pastMaxMP = c.MaxMP; - c.PrimaryAttribute = PrimaryAttribute.STR; - 交换前的额外智力 = c.ExINT; - 交换前的额外力量 = c.ExSTR; - c.ExINT = -c.BaseINT; - c.ExSTR = 交换前的额外智力 + c.BaseINT + 交换前的额外力量; - c.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP); - } - } - else - { - if (c.PrimaryAttribute == PrimaryAttribute.STR) - { - double pastHP = c.HP; - double pastMaxHP = c.MaxHP; - double pastMP = c.MP; - double pastMaxMP = c.MaxMP; - c.PrimaryAttribute = PrimaryAttribute.INT; - 交换前的额外智力 = c.ExINT; - 交换前的额外力量 = c.ExSTR; - c.ExINT = 交换前的额外力量 + c.BaseSTR + 交换前的额外智力; - c.ExSTR = -c.BaseSTR; - c.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP); - } - } + caster.Effects.Add(this); + OnEffectGained(caster); } } } diff --git a/Library/Skills/战技/疾风步.cs b/Library/Skills/战技/疾风步.cs index 017c46c..9627bae 100644 --- a/Library/Skills/战技/疾风步.cs +++ b/Library/Skills/战技/疾风步.cs @@ -26,7 +26,7 @@ namespace Milimoe.FunGame.Testing.Skills public override string Description => $"进入不可选中状态,获得 100 行动速度,提高 8% 暴击率,持续 {Duration} 时间。破隐一击:在持续时间内,首次造成伤害会附加 {Calculation.Round2Digits((1.5 + 1.5 * (Skill.Level - 1)) * 100)}% 敏捷 [ {伤害加成} ] 的强化伤害,并解除不可选中状态。"; public override bool TargetSelf => true; public override bool Durative => true; - public override double Duration => 15 + (2 * (Level - 1)); + public override double Duration => 12 + (1 * (Level - 1)); private double 伤害加成 { diff --git a/Library/Skills/绿拱门/平衡强化.cs b/Library/Skills/绿拱门/平衡强化.cs index 9415e2e..cb0941b 100644 --- a/Library/Skills/绿拱门/平衡强化.cs +++ b/Library/Skills/绿拱门/平衡强化.cs @@ -8,82 +8,62 @@ namespace Milimoe.FunGame.Testing.Skills public override long Id => 4011; public override string Name => "平衡强化"; public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; + public override double EPCost => 100; + public override double CD => 55 - (1 * (Level - 1)); + public override double HardnessTime => 12; - public 平衡强化(Character character) : base(SkillType.Passive, character) + public 平衡强化(Character character) : base(SkillType.SuperSkill, character) { Effects.Add(new 平衡强化特效(this)); } - - public override IEnumerable AddInactiveEffectToCharacter() - { - return Effects; - } } public class 平衡强化特效(Skill skill) : Effect(skill) { public override long Id => Skill.Id; public override string Name => Skill.Name; - public override string Description => $"敏捷提高20%,然后将目前的力量补充到与敏捷持平,持续30秒。"; + public override string Description => $"敏捷提高 20%,然后将目前的力量补充到与敏捷持平,持续 {Duration} 时间。"; public override bool TargetSelf => true; + public override bool Durative => true; + public override double Duration => 30; - private double 交换前的额外智力 = 0; - private double 交换前的额外力量 = 0; + private double 本次提升的敏捷 = 0; + private double 本次提升的力量 = 0; - public override void OnAttributeChanged(Character character) + public override void OnEffectGained(Character character) { - if (Skill.Character != null) - { - if (Skill.Character.PrimaryAttribute == PrimaryAttribute.INT) - { - double diff = character.ExSTR - 交换前的额外力量; - character.ExINT = 交换前的额外力量 + character.BaseSTR + diff; - } - else if (Skill.Character.PrimaryAttribute == PrimaryAttribute.STR) - { - double diff = character.ExINT - 交换前的额外智力; - character.ExSTR = 交换前的额外智力 + character.BaseINT + diff; - } - } + double pastHP = character.HP; + double pastMaxHP = character.MaxHP; + double pastMP = character.MP; + double pastMaxMP = character.MaxMP; + 本次提升的敏捷 = character.BaseAGI * 0.2; + character.ExAGI += 本次提升的敏捷; + 本次提升的力量 = character.AGI - character.STR; + character.ExSTR += 本次提升的力量; + character.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP); + WriteLine($"[ {character} ] 敏捷提升了 {本次提升的敏捷:f2},力量提升了 {本次提升的力量:f2}!"); } - public override void OnTimeElapsed(Character character, double elapsed) + public override void OnEffectLost(Character character) { - if (Skill.Character != null) + double pastHP = character.HP; + double pastMaxHP = character.MaxHP; + double pastMP = character.MP; + double pastMaxMP = character.MaxMP; + character.ExAGI -= character.BaseAGI * 0.2; + character.ExSTR -= 本次提升的力量; + character.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP); + } + + public override void OnSkillCasted(Character caster, List enemys, List teammates, Dictionary others) + { + RemainDuration = Duration; + if (!caster.Effects.Contains(this)) { - Character c = Skill.Character; - if (c.HP < c.MaxHP * 0.3) - { - if (c.PrimaryAttribute == PrimaryAttribute.INT) - { - double pastHP = c.HP; - double pastMaxHP = c.MaxHP; - double pastMP = c.MP; - double pastMaxMP = c.MaxMP; - c.PrimaryAttribute = PrimaryAttribute.STR; - 交换前的额外智力 = c.ExINT; - 交换前的额外力量 = c.ExSTR; - c.ExINT = -c.BaseINT; - c.ExSTR = 交换前的额外智力 + c.BaseINT + 交换前的额外力量; - c.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP); - } - } - else - { - if (c.PrimaryAttribute == PrimaryAttribute.STR) - { - double pastHP = c.HP; - double pastMaxHP = c.MaxHP; - double pastMP = c.MP; - double pastMaxMP = c.MaxMP; - c.PrimaryAttribute = PrimaryAttribute.INT; - 交换前的额外智力 = c.ExINT; - 交换前的额外力量 = c.ExSTR; - c.ExINT = 交换前的额外力量 + c.BaseSTR + 交换前的额外智力; - c.ExSTR = -c.BaseSTR; - c.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP); - } - } + 本次提升的敏捷 = 0; + 本次提升的力量 = 0; + caster.Effects.Add(this); + OnEffectGained(caster); } } } diff --git a/Library/Skills/绿拱门/敏捷之刃.cs b/Library/Skills/绿拱门/敏捷之刃.cs index 802e8a0..2e7fba6 100644 --- a/Library/Skills/绿拱门/敏捷之刃.cs +++ b/Library/Skills/绿拱门/敏捷之刃.cs @@ -1,4 +1,5 @@ -using Milimoe.FunGame.Core.Entity; +using Milimoe.FunGame.Core.Api.Utility; +using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Library.Constant; namespace Milimoe.FunGame.Testing.Skills @@ -24,7 +25,26 @@ namespace Milimoe.FunGame.Testing.Skills { public override long Id => Skill.Id; public override string Name => Skill.Name; - public override string Description => $"每次普通攻击都将附带基于敏捷的魔法伤害。"; + public override string Description => $"每次普通攻击都将附带基于 {敏捷系数 * 100:f2}% 敏捷 [ {敏捷伤害} ] 的魔法伤害。"; public override bool TargetSelf => true; + + private double 敏捷伤害 => Calculation.Round2Digits(敏捷系数 * Skill.Character?.AGI ?? 0); + private readonly double 敏捷系数 = 2.5; + private bool 是否是嵌套伤害 = false; + + public override void AfterDamageCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult) + { + if (character == Skill.Character && isNormalAttack && damageResult != DamageResult.Evaded && !是否是嵌套伤害) + { + WriteLine($"[ {character} ] 发动了敏捷之刃!将造成额外伤害!"); + 是否是嵌套伤害 = true; + DamageToEnemy(character, enemy, true, magicType, 敏捷伤害); + } + + if (character == Skill.Character && 是否是嵌套伤害) + { + 是否是嵌套伤害 = false; + } + } } } diff --git a/Library/Skills/马猴烧酒/绝对领域.cs b/Library/Skills/马猴烧酒/绝对领域.cs index c2bf02a..577735f 100644 --- a/Library/Skills/马猴烧酒/绝对领域.cs +++ b/Library/Skills/马猴烧酒/绝对领域.cs @@ -10,7 +10,7 @@ namespace Milimoe.FunGame.Testing.Skills public override string Name => "绝对领域"; public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; public override double EPCost => Math.Max(100, Character?.EP ?? 100); - public override double CD => 32; + public override double CD => 32 + (1 * (Level - 1)); public override double HardnessTime => 12; public 绝对领域(Character character) : base(SkillType.SuperSkill, character) @@ -26,9 +26,9 @@ namespace Milimoe.FunGame.Testing.Skills public override string Description => $"{Duration} 时间内无法受到任何伤害,且敏捷提升 {系数 * 100:f2}% [ {敏捷提升} ]。此技能会消耗至少 100 点能量。"; public override bool TargetSelf => true; public override bool Durative => true; - public override double Duration => Calculation.Round2Digits(20 + 释放时的能量值 * 0.03); + public override double Duration => Calculation.Round2Digits(16 + 释放时的能量值 * 0.03); - private double 系数 => Calculation.Round4Digits(0.3 + 0.04 * (Level - 1)); + private double 系数 => Calculation.Round4Digits(0.3 + 0.03 * (Level - 1)); private double 敏捷提升 => Calculation.Round2Digits(系数 * Skill.Character?.BaseAGI ?? 0); private double 实际敏捷提升 = 0; private double 释放时的能量值 = 0;