Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check-css.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ "20.x" ]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ "20.x" ]
Expand Down
2 changes: 2 additions & 0 deletions api/src/lib/abr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ export enum ABRTournamentTypeFilter {
CircuitBreaker = 13,
IntercontinentalChampionship = 14,
PlayersCircuit = 15,
DistrictChampionship = 16,
MegaCityChampionship = 17,
}

export const ABRTournament = z.object({
Expand Down
22 changes: 19 additions & 3 deletions api/src/lib/ranking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ import type { TournamentType } from "../schema.js";
export enum Tournament {
Worlds = "worlds championship",
Continental = "continental championship",
National = "national championship",
Intercontinental = "intercontinental championship",
DistrictChampionship = "district championship",
MegaCityChampionship = "megacity championship",
CircuitOpener = "circuit opener",
CircuitBreaker = "circuit breaker",
CasualTournamentKit = "casual tournament kit",
National = "national championship",
CircuitBreakerInvitational = "circuit breaker invitational",
PlayersCircuit = "players circuit",
CasualTournamentKit = "casual tournament kit",
Intercontinental = "intercontinental championship",
}

// Default configuration (Season 0)
Expand All @@ -28,6 +30,8 @@ export const DEFAULT_CONFIG: Record<string, Record<Tournament, number>> = {
[Tournament.CircuitBreakerInvitational]: 2,
[Tournament.PlayersCircuit]: 2,
[Tournament.CasualTournamentKit]: 1,
[Tournament.DistrictChampionship]: 1.2,
[Tournament.MegaCityChampionship]: 1.5,
},
// Flat points added to the total point pool that gets awarded to 1st place
// Each tournament gets a different point total to reflect the tournament prestige
Expand All @@ -41,6 +45,8 @@ export const DEFAULT_CONFIG: Record<string, Record<Tournament, number>> = {
[Tournament.CircuitBreakerInvitational]: 200,
[Tournament.PlayersCircuit]: 25,
[Tournament.CasualTournamentKit]: 15,
[Tournament.DistrictChampionship]: 0,
[Tournament.MegaCityChampionship]: 0,
},
// Sets a baseline number of players a tournament must have in order to distribute any points at all
// This means that small tournaments are not eligible for payouts
Expand All @@ -54,6 +60,8 @@ export const DEFAULT_CONFIG: Record<string, Record<Tournament, number>> = {
[Tournament.CircuitBreakerInvitational]: 8,
[Tournament.PlayersCircuit]: 8,
[Tournament.CasualTournamentKit]: 8,
[Tournament.DistrictChampionship]: 8,
[Tournament.MegaCityChampionship]: 8,
},
// Defines the max number of tournaments a person can get points for
// We take the top values if a person attends more than the defined max
Expand All @@ -67,6 +75,8 @@ export const DEFAULT_CONFIG: Record<string, Record<Tournament, number>> = {
[Tournament.CircuitBreakerInvitational]: 1,
[Tournament.PlayersCircuit]: 1,
[Tournament.CasualTournamentKit]: 5,
[Tournament.DistrictChampionship]: 3,
[Tournament.MegaCityChampionship]: 2,
},
// Defines the bottom anchor point which means the last place player will receive less than the value provided
// This is used to help set the rate of decay and the payout slope. A higher number indicates a more gradual slope
Expand All @@ -80,6 +90,8 @@ export const DEFAULT_CONFIG: Record<string, Record<Tournament, number>> = {
[Tournament.CircuitBreakerInvitational]: 1,
[Tournament.PlayersCircuit]: 1,
[Tournament.CasualTournamentKit]: 1,
[Tournament.DistrictChampionship]: 1,
[Tournament.MegaCityChampionship]: 1,
},
};

Expand All @@ -97,6 +109,8 @@ export const SEASON_3_CONFIG = {
[Tournament.CircuitBreakerInvitational]: 0,
[Tournament.PlayersCircuit]: 0,
[Tournament.CasualTournamentKit]: 0,
[Tournament.DistrictChampionship]: 0,
[Tournament.MegaCityChampionship]: 0,
},
POINTS_PER_PLAYER: {
...DEFAULT_CONFIG.POINTS_PER_PLAYER,
Expand All @@ -110,6 +124,8 @@ export const SEASON_3_CONFIG = {
[Tournament.CircuitBreakerInvitational]: 1,
[Tournament.PlayersCircuit]: 1,
[Tournament.CasualTournamentKit]: 1,
[Tournament.DistrictChampionship]: 1.1,
[Tournament.MegaCityChampionship]: 1.25,
},
};

Expand Down
2 changes: 2 additions & 0 deletions api/src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ export enum TournamentType {
REGIONAL_CHAMPIONSHIP = "regional championship",
PLAYERS_CIRCUIT = "players circuit",
CASUAL_TOURNAMENT_KIT = "casual tournament kit",
DISTRICT_CHAMPIONSHIP = "district championship",
MEGA_CITY_CHAMPIONSHIP = "megacity championship",
}

export type Format = "standard" | "startup" | "eternal" | "other";
Expand Down
2 changes: 2 additions & 0 deletions app/src/client/models/RankingConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ export type RankingConfig = {
'regional championship'?: TournamentConfig;
'players circuit'?: TournamentConfig;
'casual tournament kit'?: TournamentConfig;
'district championship'?: TournamentConfig;
'megacity championship'?: TournamentConfig;
};
};

2 changes: 2 additions & 0 deletions app/src/client/models/TournamentType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ export enum TournamentType {
REGIONAL_CHAMPIONSHIP = 'regional championship',
PLAYERS_CIRCUIT = 'players circuit',
CASUAL_TOURNAMENT_KIT = 'casual tournament kit',
DISTRICT_CHAMPIONSHIP = 'district championship',
MEGACITY_CHAMPIONSHIP = 'megacity championship',
}
2 changes: 1 addition & 1 deletion app/src/client/services/AdminService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class AdminService {
public static postIngestTournament(
requestBody?: {
userId?: number;
tournamentType?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
tournamentType?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17;
},
): CancelablePromise<any> {
return __request(OpenAPI, {
Expand Down
2 changes: 1 addition & 1 deletion spec.json

Large diffs are not rendered by default.