2026-02-13 09:22:11 -05:00
|
|
|
|
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>
|
2026-03-20 12:07:44 -04:00
|
|
|
|
public List<CharacterBase> GetDisruptableEnemies(List<CharacterBase> enemies,
|
|
|
|
|
|
BreakthroughType breakthroughType = BreakthroughType.Disruption)
|
2026-02-13 09:22:11 -05:00
|
|
|
|
{
|
|
|
|
|
|
List<CharacterBase> disruptableEnemies = new List<CharacterBase>();
|
|
|
|
|
|
|
|
|
|
|
|
foreach (CharacterBase enemy in enemies)
|
|
|
|
|
|
{
|
2026-03-20 12:07:44 -04:00
|
|
|
|
if (!enemy.reactionSc.breakthroughResistances[breakthroughType].Value &&
|
|
|
|
|
|
enemy.reactionSc.originalBreakthroughResistances[breakthroughType])
|
2026-02-13 09:22:11 -05:00
|
|
|
|
{
|
|
|
|
|
|
disruptableEnemies.Add(enemy);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return disruptableEnemies;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|