82 lines
3.7 KiB
C#

using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
namespace Oshima.FunGame.OshimaModules.Skills
{
public class : Skill
{
public override long Id => (long)SuperSkillID.;
public override string Name => "平衡强化";
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
public override string DispelDescription => Effects.Count > 0 ? Effects.First().DispelDescription : "";
public override double EPCost => 100;
public override double CD => 55 - (1 * (Level - 1));
public override double HardnessTime { get; set; } = 9;
public override bool CanSelectSelf => true;
public override bool CanSelectEnemy => false;
public (Character? character = null) : 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 => $"敏捷提高 20% [ {敏捷提升:0.##} ] 点,然后将当前力量补充到敏捷的 {平衡系数 * 100:0.##}%{(Skill.Character != null ? $" [ {Skill.Character.AGI * :0.##} ]" : "")},持续 {Duration:0.##} {GameplayEquilibriumConstant.InGameTime}。";
public override bool Durative => true;
public override double Duration => 30;
public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
private double => (0.2 * Skill.Character?.BaseAGI) ?? 0.2;
private double => 0.5 + 0.1 * (Skill.Level - 1);
private double = 0;
private double = 0;
public override void OnEffectGained(Character character)
{
double pastHP = character.HP;
double pastMaxHP = character.MaxHP;
double pastMP = character.MP;
double pastMaxMP = character.MaxMP;
= character.BaseAGI * 0.2;
character.ExAGI += ;
= 0;
double = character.AGI * ;
if (character.STR < )
{
= - character.STR;
character.ExSTR += ;
}
character.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP);
WriteLine($"[ {character} ] 敏捷提升了 {本次提升的敏捷:0.##} 点,力量提升了 {本次提升的力量:0.##} 点!");
}
public override void OnEffectLost(Character character)
{
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<Character> targets, Dictionary<string, object> others)
{
RemainDuration = Duration;
if (!caster.Effects.Contains(this))
{
= 0;
= 0;
caster.Effects.Add(this);
OnEffectGained(caster);
}
GamingQueue?.LastRound.ApplyEffects.TryAdd(caster, [EffectType.DamageBoost, EffectType.Lifesteal]);
}
}
}