Files
Cielonos/Assets/Scripts/MainGame/Managers/CombatManager/EnemySubmodule/SearchingFunctions.cs

27 lines
929 B
C#
Raw Normal View History

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