27 lines
929 B
C#
27 lines
929 B
C#
using Cielonos.MainGame.Buffs.Character;
|
|
using Cielonos.MainGame.Characters;
|
|
|
|
namespace Cielonos.MainGame
|
|
{
|
|
public partial class CombatManager
|
|
{
|
|
public partial class EnemySubmodule
|
|
{
|
|
/// <summary>
|
|
/// 判断敌人当前是否可被指定 Breakthrough 类型打断。
|
|
/// 目前用于 Query().PreferDisruptable() 给可打断目标提高索敌优先级。
|
|
/// </summary>
|
|
public bool IsDisruptable(Enemy enemy, Breakthrough.Type breakthroughType = Breakthrough.Type.Disruption)
|
|
{
|
|
if (enemy == null || enemy.statusSm.isDead)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
bool hasBuff = enemy.buffSm.HasBuff<BreakthroughResistanceModification>();
|
|
return hasBuff && !enemy.reactionSc.breakthroughResistances[breakthroughType].Value;
|
|
}
|
|
}
|
|
}
|
|
}
|