2025-09-26 23:32:53 +08:00

63 lines
2.8 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.Skills
{
public class : Skill
{
public override long Id => (long)PassiveID.;
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 (Character? character = null) : base(SkillType.Passive, character)
{
Effects.Add(new (this));
}
public override IEnumerable<Effect> AddPassiveEffectToCharacter()
{
return Effects;
}
}
public class (Skill skill) : Effect(skill)
{
public override long Id => Skill.Id;
public override string Name => Skill.Name;
public override string Description => $"造成伤害时,标记目标 25 {GameplayEquilibriumConstant.InGameTime}并叠加 1 层数,当目标身上的电刑标记达到 3 层时,此次伤害提升 {伤害百分比 * 100:0.##}%。";
private double => Skill.Character != null ? 0.4 + Skill.Character.Level * 0.01 : 0;
public override double AlterActualDamageAfterCalculation(Character character, Character enemy, double damage, bool isNormalAttack, DamageType damageType, MagicType magicType, DamageResult damageResult, ref bool isEvaded, Dictionary<Effect, double> totalDamageBonus)
{
if (Skill.Character != null && Skill.Character == character && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical))
{
if (enemy.Effects.Where(e => e is && e.Source == character).FirstOrDefault() is e)
{
e.++;
if (e. >= 3)
{
double = damage * ;
WriteLine($"[ {character} ] 发动了电刑的 3 层效果,伤害提升了 {伤害百分比 * 100:0.##}%!额外造成 {额外伤害:0.##} 点{CharacterSet.GetDamageTypeName(damageType)}");
e.RemainDuration = 0;
enemy.Effects.Remove(e);
return ;
}
}
else
{
e = new (Skill, character)
{
Durative = true,
Duration = 25,
RemainDuration = 25
};
enemy.Effects.Add(e);
}
}
return 0;
}
}
}