fix: pass forHuman flag to pickChallenge in fight orchestrator
Only generate multiple choice options when a human player is in the fight. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
98e6baccc1
commit
2f313813ee
@@ -353,6 +353,7 @@ async function executeFightRounds(fightId: string, botA: BotRecord, botB: BotRec
|
||||
let winnerId: string | null = null
|
||||
let lastRound = 0
|
||||
const usedTypes = new Set<string>()
|
||||
const hasHuman = isHumanPlayer(botA.webhookUrl) || isHumanPlayer(botB.webhookUrl)
|
||||
|
||||
// Pick a random round for retro mode (rounds 3-8, ensuring it's not too early or late)
|
||||
const retroRound = 3 + Math.floor(Math.random() * Math.min(6, MAX_ROUNDS - 4))
|
||||
@@ -361,7 +362,7 @@ async function executeFightRounds(fightId: string, botA: BotRecord, botB: BotRec
|
||||
lastRound = round
|
||||
const challenge = round === retroRound
|
||||
? generateRetroChallenge()
|
||||
: pickChallenge(usedTypes, arena.modifier, undefined, round)
|
||||
: pickChallenge(usedTypes, arena.modifier, undefined, round, hasHuman)
|
||||
usedTypes.add(challenge.type)
|
||||
|
||||
emit(fightId, 'round_start', {
|
||||
|
||||
Reference in New Issue
Block a user