118 lines
4.2 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;
using Oshima.FunGame.OshimaModules.Effects.SkillEffects;
namespace Oshima.FunGame.OshimaModules.Skills
{
public class : Skill
{
public override long Id => (long)MagicID.;
public override string Name => "大地之墙";
public override string Description => string.Join("", Effects.Select(e => e.Description));
public override string DispelDescription => "驱散性:持续性弱驱散\r\n被驱散性护盾不可驱散持续性弱驱散在护盾值用尽前需强驱散否则可弱驱散";
public override double MPCost
{
get
{
return Level switch
{
8 => + 6 * ,
7 => + 4 * ,
6 => + 4 * ,
5 => + 3 * ,
4 => + 3 * ,
3 => + 2.5 * ,
_ =>
};
}
}
public override double CD => Level > 0 ? 100 - (2 * (Level - 1)) : 100;
public override double CastTime
{
get
{
return Level switch
{
8 => 7,
7 => 7,
6 => 8,
5 => 8,
4 => 9,
3 => 10,
2 => 11,
_ => 12
};
}
}
public override double HardnessTime { get; set; } = 8;
private double { get; set; } = 90;
private double { get; set; } = 90;
public override bool CanSelectSelf => true;
public override bool CanSelectEnemy => false;
public override bool CanSelectTeammate => true;
public override int CanSelectTargetCount
{
get
{
return Level switch
{
8 => 4,
7 => 3,
6 => 3,
5 => 2,
4 => 2,
3 => 2,
_ => 1
};
}
}
public (Character? character = null) : base(SkillType.Magic, character)
{
Effect shield = new (this, 120, 160)
{
DispelledType = DispelledType.CannotBeDispelled
};
Effects.Add(shield);
Effect dispel = new (this, durative: true, duration: 12)
{
DispelledType = DispelledType.Strong
};
Effects.Add(dispel);
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 => $"";
public override bool ForceHideInStatusBar => true;
public override void OnTimeElapsed(Character character, double elapsed)
{
if (!character.Effects.Any(e => e is ) && character.Effects.FirstOrDefault(e => e is ) is e)
{
e.DispelledType = DispelledType.Weak;
}
else
{
character.Effects.Remove(this);
}
}
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)
{
foreach (Character target in targets)
{
if (!target.Effects.Any(e => e is ))
{
target.Effects.Add(new (Skill));
}
}
}
}
}