test(enemy): 补测 Attack 单出边的自愈路径,写明边序依赖的射程前提

Approach 边序注释:attackInRange 先于 leftAllZones 的前提是攻击射程恒小于
感知区(EnemyAttackSelector.Eligible 的 InAttackRange 门),故两条件不会相争;
若未来出现射程更大的招式,应由 AI 配方校验器报错,而非靠调边序绕开。

FakeCombat 新增 BestAttackFails 开关(与 Eligible 解耦),补测 Attack 唯一出边
attackDone 的自愈不变量:UseBestAttack 触发失败时不留下运行中能力,下一帧即可
自愈回 Approach,不会永久卡死。
This commit is contained in:
2026-07-29 13:08:46 +08:00
parent 9d632cd103
commit 3d00c66677
3 changed files with 24 additions and 1 deletions
@@ -26,10 +26,11 @@ namespace BaseGames.Tests.EditMode.AI
public bool CanUseAbility(string id) => CanUse;
public void InterruptAbilities() => Running = null;
public bool Eligible; // 测试控制:是否有合格攻击
public bool BestAttackFails; // 模拟:选招器认为够得着,但实际没触发成功
public bool HasEligibleAttack() => Eligible;
public bool UseBestAttack()
{
if (!Eligible) return false;
if (!Eligible || BestAttackFails) return false;
Used.Add("best"); Running = "best"; return true;
}
}