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 apps/discord-bot/src/commands/quake/quake.profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const QuakeProfile = ({
<Table.table>
<Table.tr>
<Table.td title={t("stats.wins")} value={t(stats.wins)} color="§a" />
<Table.td title={t("stats.winRate")} value={`${stats.winRate}%`} color="§c" />
<Table.td title={t("stats.kwr")} value={t(stats.kwr)} color="§c" />
<Table.td
title={t("stats.killstreaks")}
value={t(stats.killstreaks)}
Expand Down
4 changes: 2 additions & 2 deletions apps/discord-bot/src/commands/status/status.profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const OnlineTable = ({ status, t }: StatusTableProps) => (
<Table.td
title={t("stats.game")}
value={FormattedGame[status.game.id]}
color="§f"
color="§e"
t:ignore
/>
<If condition={status.mode}>
Expand Down Expand Up @@ -68,7 +68,7 @@ const OfflineTable = ({ status, t }: StatusTableProps) => (
<Table.td
title={t("stats.lastGame")}
value={FormattedGame[status.actions.lastGame.id]}
color="§f"
color="§a"
t:ignore
/>
</Table.tr>
Expand Down
2 changes: 1 addition & 1 deletion locales/en-US/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,7 @@
"killsAsSurvivor": "Kills as Survivor",
"killstreaks": "Killstreaks",
"kit": "Current Kit",
"kwr": "KWR",
"lapsCompleted": "Laps",
"lastAction": "Last Action",
"lastActionTime": "Last Action Time",
Expand Down Expand Up @@ -664,7 +665,6 @@
"version": "Version",
"votes": "Votes",
"wallsFaced": "Walls Faced",
"winRate": "Win Rate",
"wins": "Wins",
"winstreak": "Winstreak",
"witherDamage": "Wither Damage",
Expand Down
1 change: 1 addition & 0 deletions packages/schemas/src/player/gamemodes/arcade/mode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ export class EnderSpleef {
@Field({ leaderboard: { enabled: false } })
public powerupActivations: number;

@Field()
public blocksBroken: number;

public constructor(data: APIData) {
Expand Down
2 changes: 1 addition & 1 deletion packages/schemas/src/player/gamemodes/general/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class General {
@Field()
public ranksGifted: number;

@Field({ leaderboard: { fieldName: "Total Tokens" } })
@Field({ leaderboard: { fieldName: "Tokens", name: "Classic Tokens" } })
public classicTokens: number;

public constructor(legacy: APIData, data: APIData = {}) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export class AssassinsMurderMysteryMode extends BaseMurderMysteryMode {
public constructor(data: APIData, mode: string) {
super(data, mode);

this.kills = data.trap_kills_MURDER_ASSASSINS;
this.kills = data.kills_MURDER_ASSASSINS;
this.deaths = data.deaths_MURDER_ASSASSINS;
this.kdr = ratio(this.kills, this.deaths);

Expand Down
12 changes: 6 additions & 6 deletions packages/schemas/src/player/gamemodes/quake/mode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@ export class QuakeMode {
@Field()
public kdr: number;

@Field({ leaderboard: { enabled: false } })
@Field()
public headshots: number;

@Field()
public killstreaks: number;

@Field({ leaderboard: { enabled: false } })
@Field()
public shotsFired: number;

@Field({ leaderboard: { enabled: false } })
@Field({ leaderboard: { fieldName: "2017+ Kills", name: "2017+ Kills" } })
public postUpdateKills: number;

@Field({ leaderboard: { enabled: false }, store: { default: 100 } })
public winRate: number;
@Field({ leaderboard: { enabled: false } })
public kwr: number;

@Field({ leaderboard: { enabled: false } })
public quakeShotAccuracy: number;
Expand All @@ -56,7 +56,7 @@ export class QuakeMode {

public static applyRatios(data: QuakeMode) {
data.kdr = ratio(data.kills, data.deaths);
data.winRate = Math.min(ratio(25, ratio(data.kills, data.wins), 100), 100);
data.kwr = ratio(data.kills, data.wins);
data.quakeShotAccuracy = ratio(data.postUpdateKills, data.shotsFired, 100);
}
}
2 changes: 1 addition & 1 deletion packages/schemas/src/ratios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export type Ratio = [

export const LEADERBOARD_RATIOS: Ratio[] = [
["wins", "losses", "wlr", "WLR"],
["kills", "wins", "kwr", "KWR"],
["kills", "deaths", "kdr", "KDR"],
["finalKills", "finalDeaths", "fkdr", "FKDR"],
["bedsBroken", "bedsLost", "bblr", "BBLR"],
Expand All @@ -28,7 +29,6 @@ export const LEADERBOARD_RATIO_KEYS = LEADERBOARD_RATIOS.map(
const EXTRA_RATIOS: Ratio[] = [
["kills", "shotsFired", "shotAccuracy", "Shot Accuracy", 100],
["postUpdateKills", "shotsFired", "quakeShotAccuracy", "Shot Accuracy", 100],
["wins", "gamesPlayed", "winRate", "Win Rate", 100],
["gold", "gamesPlayed", "goldRate", "Gold Rate", 100],
["total", "gamesPlayed", "trophyRate", "Trophy Rate", 100],
];
Expand Down