more seeds
This commit is contained in:
@@ -256,6 +256,177 @@ export const leagueScoringPresets: LeagueScoringPreset[] = [
|
||||
});
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'sprint-main-team',
|
||||
name: 'Sprint + Main (Teams)',
|
||||
description: 'Teams championship using the Sprint + Main weekend format.',
|
||||
primaryChampionshipType: 'team',
|
||||
dropPolicySummary: 'Best 6 results of 8 count towards the championship.',
|
||||
sessionSummary: 'Sprint + Main',
|
||||
bonusSummary: 'Fastest lap +1 point in main race if finishing P10 or better.',
|
||||
defaultTimings: {
|
||||
practiceMinutes: 20,
|
||||
qualifyingMinutes: 30,
|
||||
sprintRaceMinutes: 20,
|
||||
mainRaceMinutes: 40,
|
||||
sessionCount: 2,
|
||||
},
|
||||
createConfig: ({ seasonId }) => {
|
||||
const fastestLapBonus: BonusRule = {
|
||||
id: 'fastest-lap-main-team',
|
||||
type: 'fastestLap',
|
||||
points: 1,
|
||||
requiresFinishInTopN: 10,
|
||||
};
|
||||
|
||||
const sessionTypes: SessionType[] = ['sprint', 'main'];
|
||||
|
||||
const pointsTableBySessionType: Record<SessionType, PointsTable> = {
|
||||
sprint: sprintPointsSprintMain,
|
||||
main: mainPointsSprintMain,
|
||||
practice: new PointsTable({}),
|
||||
qualifying: new PointsTable({}),
|
||||
q1: new PointsTable({}),
|
||||
q2: new PointsTable({}),
|
||||
q3: new PointsTable({}),
|
||||
timeTrial: new PointsTable({}),
|
||||
};
|
||||
|
||||
const bonusRulesBySessionType: Record<SessionType, BonusRule[]> = {
|
||||
sprint: [],
|
||||
main: [fastestLapBonus],
|
||||
practice: [],
|
||||
qualifying: [],
|
||||
q1: [],
|
||||
q2: [],
|
||||
q3: [],
|
||||
timeTrial: [],
|
||||
};
|
||||
|
||||
const dropScorePolicy: DropScorePolicy = {
|
||||
strategy: 'bestNResults',
|
||||
count: 6,
|
||||
};
|
||||
|
||||
const championship: ChampionshipConfig = {
|
||||
id: 'team-champ-sprint-main',
|
||||
name: 'Team Championship',
|
||||
type: 'team' as ChampionshipType,
|
||||
sessionTypes,
|
||||
pointsTableBySessionType,
|
||||
bonusRulesBySessionType,
|
||||
dropScorePolicy,
|
||||
};
|
||||
|
||||
return LeagueScoringConfig.create({
|
||||
id: `lsc-${seasonId}-sprint-main-team`,
|
||||
seasonId,
|
||||
scoringPresetId: 'sprint-main-team',
|
||||
championships: [championship],
|
||||
});
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'club-default-nations',
|
||||
name: 'Club ladder (Nations)',
|
||||
description: 'Nation vs nation ladder with a single main race and no bonuses.',
|
||||
primaryChampionshipType: 'nations',
|
||||
dropPolicySummary: 'All race results count, no drop scores.',
|
||||
sessionSummary: 'Main race only',
|
||||
bonusSummary: 'No bonus points.',
|
||||
defaultTimings: {
|
||||
practiceMinutes: 20,
|
||||
qualifyingMinutes: 20,
|
||||
sprintRaceMinutes: 0,
|
||||
mainRaceMinutes: 40,
|
||||
sessionCount: 1,
|
||||
},
|
||||
createConfig: ({ seasonId }) => {
|
||||
const sessionTypes: SessionType[] = ['main'];
|
||||
|
||||
const pointsTableBySessionType: Record<SessionType, PointsTable> = {
|
||||
sprint: new PointsTable({}),
|
||||
main: clubMainPoints,
|
||||
practice: new PointsTable({}),
|
||||
qualifying: new PointsTable({}),
|
||||
q1: new PointsTable({}),
|
||||
q2: new PointsTable({}),
|
||||
q3: new PointsTable({}),
|
||||
timeTrial: new PointsTable({}),
|
||||
};
|
||||
|
||||
const dropScorePolicy: DropScorePolicy = {
|
||||
strategy: 'none',
|
||||
};
|
||||
|
||||
const championship: ChampionshipConfig = {
|
||||
id: 'nations-champ-club-default',
|
||||
name: 'Nations Championship',
|
||||
type: 'nations' as ChampionshipType,
|
||||
sessionTypes,
|
||||
pointsTableBySessionType,
|
||||
dropScorePolicy,
|
||||
};
|
||||
|
||||
return LeagueScoringConfig.create({
|
||||
id: `lsc-${seasonId}-club-default-nations`,
|
||||
seasonId,
|
||||
scoringPresetId: 'club-default-nations',
|
||||
championships: [championship],
|
||||
});
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'endurance-main-trophy',
|
||||
name: 'Endurance Trophy Event',
|
||||
description: 'Trophy-style endurance event with a single long main race.',
|
||||
primaryChampionshipType: 'trophy',
|
||||
dropPolicySummary: 'Best 4 results of 6 count towards the championship.',
|
||||
sessionSummary: 'Main race only',
|
||||
bonusSummary: 'No bonus points.',
|
||||
defaultTimings: {
|
||||
practiceMinutes: 30,
|
||||
qualifyingMinutes: 20,
|
||||
sprintRaceMinutes: 0,
|
||||
mainRaceMinutes: 120,
|
||||
sessionCount: 1,
|
||||
},
|
||||
createConfig: ({ seasonId }) => {
|
||||
const sessionTypes: SessionType[] = ['main'];
|
||||
|
||||
const pointsTableBySessionType: Record<SessionType, PointsTable> = {
|
||||
sprint: new PointsTable({}),
|
||||
main: enduranceMainPoints,
|
||||
practice: new PointsTable({}),
|
||||
qualifying: new PointsTable({}),
|
||||
q1: new PointsTable({}),
|
||||
q2: new PointsTable({}),
|
||||
q3: new PointsTable({}),
|
||||
timeTrial: new PointsTable({}),
|
||||
};
|
||||
|
||||
const dropScorePolicy: DropScorePolicy = {
|
||||
strategy: 'bestNResults',
|
||||
count: 4,
|
||||
};
|
||||
|
||||
const championship: ChampionshipConfig = {
|
||||
id: 'trophy-champ-endurance-main',
|
||||
name: 'Trophy Championship',
|
||||
type: 'trophy' as ChampionshipType,
|
||||
sessionTypes,
|
||||
pointsTableBySessionType,
|
||||
dropScorePolicy,
|
||||
};
|
||||
|
||||
return LeagueScoringConfig.create({
|
||||
id: `lsc-${seasonId}-endurance-main-trophy`,
|
||||
seasonId,
|
||||
scoringPresetId: 'endurance-main-trophy',
|
||||
championships: [championship],
|
||||
});
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
export function listLeagueScoringPresets(): LeagueScoringPreset[] {
|
||||
|
||||
Reference in New Issue
Block a user