feat(enemy): 选招器支持防重复折扣——WeightedRandomAntiRepeat
上一次选中的招按 EnemyStatsSO.attackAntiRepeatFactor 折扣权重(默认 0.3)。 折扣把唯一候选压到 0 时退化为 Priority 路径,不会出现敌人永不出手。 阶段切换清空防重复记忆。取代 BossBase.UseBossSkillWeighted 里的同名逻辑。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -601,7 +601,10 @@ namespace BaseGames.Enemies
|
||||
candidates.Add(ab);
|
||||
}
|
||||
}
|
||||
_attackSelector = new Abilities.EnemyAttackSelector(candidates);
|
||||
// 折扣系数是策划配置项,未配 StatsSO 的敌人用 0.3 这个合法业务缺省(非掩盖漏配:
|
||||
// 该模式本身是可选的,没配就等于用默认折扣)。
|
||||
float antiRepeat = _statsSO != null ? _statsSO.attackAntiRepeatFactor : 0.3f;
|
||||
_attackSelector = new Abilities.EnemyAttackSelector(candidates, antiRepeat);
|
||||
}
|
||||
|
||||
protected virtual void Update()
|
||||
|
||||
Reference in New Issue
Block a user