75 lines
3.0 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Milimoe.FunGame.Core.Api.Utility;
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.Skills
{
public class : Skill
{
public override long Id => 3007;
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 + (1 * (Level - 1));
public override double HardnessTime { get; set; } = 12;
public (Character character) : base(SkillType.SuperSkill, character)
{
Effects.Add(new (this));
}
}
public class (Skill skill) : Effect(skill)
{
public override long Id => Skill.Id;
public override string Name => Skill.Name;
public override string Description => $"{Duration} 时间内无法受到任何伤害,且敏捷提升 {系数 * 100:0.##}% [ {敏捷提升} ]。此技能会消耗至少 100 点能量。";
public override bool TargetSelf => true;
public override bool Durative => true;
public override double Duration => Calculation.Round2Digits(16 + * 0.03);
private double => Calculation.Round4Digits(0.3 + 0.03 * (Level - 1));
private double => Calculation.Round2Digits( * Skill.Character?.BaseAGI ?? 0);
private double = 0;
private double = 0;
public override void OnEffectGained(Character character)
{
= ;
character.ExAGI += ;
WriteLine($"[ {character} ] 的敏捷提升了 {系数 * 100:0.##}% [ {实际敏捷提升} ] ");
}
public override void OnEffectLost(Character character)
{
character.ExAGI -= ;
}
public override bool AlterActualDamageAfterCalculation(Character character, Character enemy, ref double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult)
{
if (enemy == Skill.Character && damageResult != DamageResult.Evaded)
{
WriteLine($"[ {enemy} ] 发动了绝对领域,巧妙的化解了此伤害!");
return true;
}
return false;
}
public override void OnSkillCasting(Character caster)
{
= caster.EP;
}
public override void OnSkillCasted(Character caster, List<Character> enemys, List<Character> teammates, Dictionary<string, object> others)
{
RemainDuration = Duration;
if (!caster.Effects.Contains(this))
{
= 0;
caster.Effects.Add(this);
OnEffectGained(caster);
}
}
}
}