2024-09-11 00:54:38 +08:00

78 lines
3.3 KiB
C#

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 => 3005;
public override string Name => "变幻之心";
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
public override double EPCost => 100;
public override double CD => 30;
public override double HardnessTime => 10;
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 => "变幻之心";
public override string Description => $"检查 [ 智慧与力量 ] 的模式。在力量模式下,立即回复 {生命值回复 * 100}% 生命值;智力模式下,下一次魔法伤害提升 {伤害提升 * 100}%。";
public override bool TargetSelf => true;
private double => Calculation.Round4Digits(0.25 + 0.03 * (Level - 1));
private double => Calculation.Round4Digits(0.55 + 0.25 * (Level - 1));
public override void OnEffectGained(Character character)
{
Skill.IsInEffect = true;
}
public override void OnEffectLost(Character character)
{
Skill.IsInEffect = false;
}
public override void AlterExpectedDamageBeforeCalculation(Character character, Character enemy, ref double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType)
{
if (character == Skill.Character && isMagicDamage)
{
double = ;
double = Calculation.Round2Digits(damage * );
damage = Calculation.Round2Digits(damage + );
WriteLine("[ " + character + " ] 发动了变幻之心!伤害提升了 " + + " 点!");
character.Effects.Remove(this);
OnEffectLost(character);
}
}
public override void OnSkillCasted(Character actor, List<Character> enemys, List<Character> teammates, Dictionary<string, object> others)
{
IEnumerable<Effect> effects = actor.Effects.Where(e => e is );
if (effects.Any())
{
if (actor.PrimaryAttribute == PrimaryAttribute.STR)
{
double = Calculation.Round2Digits( * actor.MaxHP);
actor.HP += ;
WriteLine("[ " + actor + " ] 发动了变幻之心!回复了 " + + " 点生命值!");
}
else if (actor.PrimaryAttribute == PrimaryAttribute.INT)
{
if (!actor.Effects.Contains(this))
{
actor.Effects.Add(this);
OnEffectGained(actor);
}
}
}
}
}
}