2024-11-28 00:57:28 +08:00

41 lines
1.9 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.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} " : "")}敌人造成眩晕 {眩晕时间}。";
private string => _durative && _duration > 0 ? + " 时间" : (!_durative && _durationTurn > 0 ? + " 回合" : "0 时间");
private double => _durative && _duration > 0 ? _duration + _levelGrowth * (Level - 1) : (!_durative && _durationTurn > 0 ? _durationTurn + _levelGrowth * (Level - 1) : 0);
private readonly bool _durative;
private readonly double _duration;
private readonly int _durationTurn;
private readonly double _levelGrowth;
public (Skill skill, bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0) : base(skill)
{
GamingQueue = skill.GamingQueue;
_durative = durative;
_duration = duration;
_durationTurn = durationTurn;
_levelGrowth = levelGrowth;
}
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)
{
foreach (Character enemy in targets)
{
WriteLine($"[ {caster} ] 眩晕了 [ {enemy} ] !持续时间:{眩晕时间}");
e = new(Skill, caster, false, 0, 1);
enemy.Effects.Add(e);
e.OnEffectGained(enemy);
GamingQueue?.LastRound.Effects.TryAdd(enemy, e.EffectType);
}
}
}
}