OshimaGameModule/OshimaModules/Effects/SkillEffects/提升友方行动速度.cs
2025-04-16 01:24:48 +08:00

51 lines
2.5 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.Entity;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{
public class : Effect
{
public override long Id => Skill.Id;
public override string Name => Skill.Name;
public override string Description => $"提升目标{(Skill.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}友方角色 {SPD:0.##} 点行动速度 {持续时间}。";
private double SPD => Level > 0 ? Math.Abs( + * (Level - 1)) : Math.Abs();
private double { get; set; } = 65;
private double { get; set; } = 25;
private string => _durative && _duration > 0 ? _duration + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? _durationTurn + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}");
private readonly bool _durative;
private readonly double _duration;
private readonly int _durationTurn;
public (Skill skill, double , double , bool durative = true, double duration = 40, int durationTurn = 0) : base(skill)
{
GamingQueue = skill.GamingQueue;
this. = ;
this. = ;
_durative = durative;
_duration = duration;
_durationTurn = durationTurn;
}
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)
{
foreach (Character target in targets)
{
WriteLine($"[ {target} ] 的行动速度提升了 {SPD:0.##} !持续时间:{持续时间} {GameplayEquilibriumConstant.InGameTime}");
ExSPD e = new(Skill, new Dictionary<string, object>()
{
{ "exspd", SPD }
}, caster)
{
Durative = _durative,
Duration = _duration,
DurationTurn = _durationTurn
};
target.Effects.Add(e);
e.OnEffectGained(target);
GamingQueue?.LastRound.Effects.TryAdd(target, e.EffectType);
}
}
}
}