上一次选中的招按 EnemyStatsSO.attackAntiRepeatFactor 折扣权重(默认 0.3)。 折扣把唯一候选压到 0 时退化为 Priority 路径,不会出现敌人永不出手。 阶段切换清空防重复记忆。取代 BossBase.UseBossSkillWeighted 里的同名逻辑。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
11 lines
430 B
C#
11 lines
430 B
C#
namespace BaseGames.Enemies.Abilities
|
|
{
|
|
/// <summary>多攻击选招策略。</summary>
|
|
public enum AttackSelectionMode
|
|
{
|
|
WeightedRandom, // 合格集内按 weight 加权随机
|
|
Priority, // 合格集内取 priority 最高(并列取首个)
|
|
WeightedRandomAntiRepeat, // 同 WeightedRandom,但对上一次选中的招施加权重折扣,压低连续重复
|
|
}
|
|
}
|