diff --git a/apps/discord-bot/src/commands/duels/duels.profile.tsx b/apps/discord-bot/src/commands/duels/duels.profile.tsx index d45cfdd5a..5fd44b4f2 100644 --- a/apps/discord-bot/src/commands/duels/duels.profile.tsx +++ b/apps/discord-bot/src/commands/duels/duels.profile.tsx @@ -53,6 +53,12 @@ export const DuelsProfile = ({ 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"]); diff --git a/locales/en-US/default.json b/locales/en-US/default.json index b66f3e884..ebb1b3d33 100644 --- a/locales/en-US/default.json +++ b/locales/en-US/default.json @@ -748,6 +748,7 @@ "seekerWins": "Seeker Wins", "shotAccuracy": "Shot Accuracy", "shotsFired": "Shots Fired", + "shotsHit": "Shots Hit", "silver": "Silver", "silverTrophies": "Silver Trophies", "slumberTickets": "Slumber Tickets", diff --git a/packages/schemas/src/player/gamemodes/duels/mode.ts b/packages/schemas/src/player/gamemodes/duels/mode.ts index 57cd014a0..82030b160 100644 --- a/packages/schemas/src/player/gamemodes/duels/mode.ts +++ b/packages/schemas/src/player/gamemodes/duels/mode.ts @@ -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}`]; } } @@ -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}`]; } } @@ -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; } }