2025-09-07 22:43:11 +08:00

119 lines
5.6 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 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 => $"每次普通攻击和技能造成伤害时,叠加 1 层征服者层数,每层提供 {真实伤害:0.##} 点真实伤害和 {额外核心属性:0.##} 点额外核心属性。" +
$"限制:每个回合只能触发一次征服者叠加层数和一次真实伤害的效果。当叠满 4 层时,为下一次造成伤害提供额外的 {满层伤害:0.##} 点真实伤害,随后重置已叠层数。" +
$"{(层数 > 0 ? $" {} { * :0.##} {:0.##} " : "")}";
public int { get; set; } = 0;
private double => Skill.Character != null ? 35 + Skill.Character.Level * 1.35 : 0;
private double => Skill.Character != null ? 2 + Skill.Character.Level * 0.1 : 0;
private double => Skill.Character != null ? 140 + Skill.Character.Level * 5.8 : 0;
private bool = false;
private bool = false;
private bool = true;
private PrimaryAttribute = PrimaryAttribute.None;
private double = 0;
public override void AfterDamageCalculation(Character character, Character enemy, double damage, double actualDamage, bool isNormalAttack, DamageType damageType, MagicType magicType, DamageResult damageResult)
{
if (Skill.Character != null && Skill.Character == character && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical))
{
if (! && == 4 && enemy.HP > 0)
{
= true;
= true;
WriteLine($"[ {character} ] 发动了征服者!");
DamageToEnemy(character, enemy, DamageType.True, magicType, * );
WriteLine($"[ {character} ] 发动了征服者的满层效果!");
DamageToEnemy(character, enemy, DamageType.True, magicType, );
ClearExPrimaryAttribute(character);
= 0;
}
if (! && ! && < 4)
{
if ( > 0 && enemy.HP > 0)
{
= true;
WriteLine($"[ {character} ] 发动了征服者!");
DamageToEnemy(character, enemy, DamageType.True, magicType, * );
}
if ()
{
= false;
ClearExPrimaryAttribute(character);
++;
= character.PrimaryAttribute;
= * ;
switch ()
{
case PrimaryAttribute.AGI:
character.ExAGI += ;
break;
case PrimaryAttribute.INT:
character.ExINT += ;
break;
default:
character.ExSTR += ;
break;
}
WriteLine($"[ {character} ] 的征服者层数:{层数},获得了 {累计增加:0.##} 点核心属性({CharacterSet.GetPrimaryAttributeName(核心属性)})加成。");
}
}
}
}
public override void OnTurnEnd(Character character)
{
= false;
= false;
= true;
}
private void ClearExPrimaryAttribute(Character character)
{
if ( != PrimaryAttribute.None)
{
switch ()
{
case PrimaryAttribute.AGI:
character.ExAGI -= ;
break;
case PrimaryAttribute.INT:
character.ExINT -= ;
break;
default:
character.ExSTR -= ;
break;
}
= PrimaryAttribute.None;
= 0;
}
}
}
}