feat: season framework with 2-week auto-rotation
Create seasons engine with getCurrentSeason(), getSeasonLeaderboard(), and resetSeasonElo(). 20 Bitcoin-themed season names. Add currentSeason column to fights table, set on fight creation. Elo soft-reset formula: finalElo * 0.6 + 1200 * 0.4. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
d22d739666
commit
ecac2bf246
@@ -12,6 +12,7 @@ import { isHumanPlayer, waitForHumanResponse } from './human-responses.js'
|
||||
import { payWinner, refundEntry, ENTRY_FEE_SATS } from './payments.js'
|
||||
import { settleBets, lockBets } from './betting.js'
|
||||
import { publishFightResult } from './nostr-publish.js'
|
||||
import { getCurrentSeason } from './seasons.js'
|
||||
|
||||
interface BotRecord {
|
||||
id: string
|
||||
@@ -294,6 +295,7 @@ async function createFightRecord(botA: BotRecord, botB: BotRecord, arena: Arena,
|
||||
mode,
|
||||
potSats: mode === 'ranked' ? 42 : 0,
|
||||
payoutStatus: mode === 'ranked' ? 'pending' : undefined,
|
||||
currentSeason: getCurrentSeason().id,
|
||||
startedAt: now,
|
||||
createdAt: now,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user