45 lines
2.3 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 Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.PassiveEffects;
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} " : "")}友方角色提供 {护盾值:0.##} 点物理护盾 {持续时间}。";
private double => Level > 0 ? Math.Abs( + * (Level - 1)) : Math.Abs();
private double { get; set; } = 200;
private double { get; set; } = 100;
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} ] 获得了 {护盾值:0.##} 点物理护盾!持续时间:{持续时间}");
e = new(Skill, caster, , _durative, _duration, _durationTurn);
target.Effects.Add(e);
e.OnEffectGained(target);
e.DispelledType = DispelledType;
GamingQueue?.LastRound.ApplyEffects.TryAdd(target, [EffectType.Shield]);
}
}
}
}