Skip to content
Open
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
6 changes: 6 additions & 0 deletions apps/discord-bot/src/commands/duels/duels.profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ export const DuelsProfile = <T extends ProfileTime>({
sidebar.push([t("stats.shotsFired"), t(stats.overall.shotsFired), "§6"]);
}

if ("shotsHit" in stats) {
sidebar.push([t("stats.shotsHit"), t(stats.shotsHit), "§c"]);
} else if ("overall" in stats && "shotsHit" in stats.overall) {
sidebar.push([t("stats.shotsHit"), t(stats.overall.shotsHit), "§c"]);
}

if ("headshots" in stats)
sidebar.push([t("stats.headshots"), t(stats.headshots), "§3"]);

Expand Down
1 change: 1 addition & 0 deletions locales/en-US/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,7 @@
"seekerWins": "Seeker Wins",
"shotAccuracy": "Shot Accuracy",
"shotsFired": "Shots Fired",
"shotsHit": "Shots Hit",
"silver": "Silver",
"silverTrophies": "Silver Trophies",
"slumberTickets": "Slumber Tickets",
Expand Down
14 changes: 14 additions & 0 deletions packages/schemas/src/player/gamemodes/duels/mode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,26 @@ export class BowPVPBaseDuelsGameMode extends PVPBaseDuelsGameMode {
@Field()
public shotsFired: number;

@Field()
public shotsHit: number;

public constructor(data: APIData, mode: string) {
super(data, mode);
this.shotsFired = data[`${mode}_bow_shots`];
this.shotsHit = data[`${mode}_bow_hits}`];
}
}

export class BowBaseDuelsGameMode extends PVPBaseDuelsGameMode {
@Field()
public shotsFired: number;
@Field()
public shotsHit: number;

public constructor(data: APIData, mode: string) {
super(data, mode);
this.shotsFired = data[`${mode}_bow_shots`];
this.shotsHit = data[`${mode}_bow_hits}`];
}
}

Expand Down Expand Up @@ -257,11 +264,14 @@ export class SinglePVPDuelsGameMode extends PVPBaseDuelsGameMode {
export class SingleBowPVPDuelsGameMode extends SinglePVPDuelsGameMode {
@Field()
public shotsFired: number;
@Field()
public shotsHit: number;

public constructor(data: APIData, title: string, mode: string, titleRequirement: TitleRequirement) {
super(data, title, mode, titleRequirement);
mode = mode ? `${mode}_` : mode;
this.shotsFired = data[`${mode}bow_shots`];
this.shotsHit = data[`${mode}bow_hits}`];
}
}

Expand Down Expand Up @@ -397,10 +407,14 @@ export class QuakeDuels extends SinglePVPDuelsGameMode {
@Field()
public shotsFired: number;

@Field()
public shotsHit: number;

public constructor(data: APIData) {
super(data, "Quakecraft", "quake_duel", "default");
this.headshots = data.quake_duel_quake_headshots;
this.shotsFired = data.quake_duel_quake_shots_taken;
this.shotsHit = data.quake_duel_quake_shots_hit;
}
}

Expand Down