Files
Cielonos/Assets/Scripts/MainGame/Managers/BattleManager/EnemySubmodule/SearchingFunctions.cs
SoulliesOfficial f26f9fd374 爆更
2026-03-20 12:07:44 -04:00

39 lines
1.4 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 System.Collections.Generic;
using Cielonos.MainGame.Characters;
using UnityEngine;
namespace Cielonos.MainGame
{
public partial class BattleManager
{
public partial class EnemySubmodule
{
public CharacterBase GetNearestEnemy(List<CharacterBase> enemies)
{
CharacterBase nearestEnemy = enemies.Count > 0 ? enemies[0] : null;
return nearestEnemy;
}
/// <summary>
/// 获取可被扰乱的敌人列表:
/// <para>目前获取的是本来不受到Disruption打断但当前可以受到Disruption打断的敌人</para>
/// </summary>
public List<CharacterBase> GetDisruptableEnemies(List<CharacterBase> enemies,
BreakthroughType breakthroughType = BreakthroughType.Disruption)
{
List<CharacterBase> disruptableEnemies = new List<CharacterBase>();
foreach (CharacterBase enemy in enemies)
{
if (!enemy.reactionSc.breakthroughResistances[breakthroughType].Value &&
enemy.reactionSc.originalBreakthroughResistances[breakthroughType])
{
disruptableEnemies.Add(enemy);
}
}
return disruptableEnemies;
}
}
}
}