2026-01-13 01:31:06 +08:00

73 lines
3.1 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;
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 (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 => $"每次造成伤害或受到伤害时,进行投掷检定,结果为偶数时,造成的伤害提升 {伤害提升 * 100:0.##}%,受到伤害减少 {伤害减少 * 100:0.##}%;反之不产生任何效果。";
public bool { get; set; } = false;
public double { get; set; } = 1;
public double { get; set; } = 0.5;
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)
{
double bouns = 0;
if (character == Skill.Character)
{
bool result = || (! && Random.Shared.Next(10) % 2 == 0);
WriteLine($"[ {character} ] 的八卦阵投掷结果为:{(result ? "" : "")}。");
if (damage > 0 && result)
{
Character c = character;
if (character == Skill.Character)
{
bouns = damage * ;
WriteLine($"[ {character} ] 发动了八卦阵!伤害提升了 {Math.Abs(bouns):0.##} 点!");
}
else if (enemy == Skill.Character)
{
c = enemy;
bouns = -(damage * );
WriteLine($"[ {character} ] 发动了八卦阵!伤害减少了 {Math.Abs(bouns):0.##} 点!");
}
if ()
{
WriteLine($"[ {character} ] 发动了归元环!冷却时间减少了 20%");
foreach (Skill s in c.Skills)
{
s.CurrentCD -= s.CD * .;
if (s.CurrentCD < 0)
{
s.CurrentCD = 0;
s.Enable = true;
}
}
}
}
}
return bouns;
}
}
}