Skip to content

Duels computed

Derived Duels statistics, attached as .computed on the raw DuelsStats parser block. It is always present (always-on), computed from the parsed stats alone.

All ratios use the shared ratio(a, b) helper: the result is rounded to 2 decimals, and a zero denominator yields the numerator (K/D convention). neededForNextWholeRatio(n, d) is the extra numerator needed, with the denominator unchanged, to reach the next whole ratio floor(n / d) + 1 (it is 0 when the denominator is 0).

Titles

Duels titles are computed in two ways:

  • title is read from the parsed titlePrestige record: the highest division with a value greater than 0 wins, formatted as the division name plus the level as a Roman numeral (e.g. "Diamond III"). If no division has a value, the title is "".
  • winsForNextTitle is computed from wins against the title threshold table. Each division has 5 levels; the threshold for a level is (division.wins + division.winsPerLevel * level), with level from 0 to 4. The result is the first threshold above the current wins, minus the current wins, or 0 past all thresholds. For the overall block only, every threshold is doubled (DUELS_OVERALL_WINS_MULTIPLIER = 2).
DivisionBase winsWins per level
Rookie5010
Iron10030
Gold25050
Diamond500100
Master1,000200
Legend2,000600
Grandmaster5,0001,000
Godlike10,0003,000
Celestial25,0005,000
Divine50,00010,000
Ascended100,00010,000

The last division is keyed worldElite in DuelsTitlePrestige but is named Ascended.

DuelsCombatRatios

The base ratio set shared by every computed Duels block. Also used on its own as the type of DuelsComputed.arena.

ts
export interface DuelsCombatRatios {
  readonly KDR: number;
  readonly WLR: number;
  readonly killsForNextKdr: number;
  readonly winsForNextWlr: number;
  readonly meleeAccuracy: number;
  readonly bowAccuracy: number;
}
FieldFormula / meaning
KDRratio(kills, deaths).
WLRratio(wins, losses).
killsForNextKdrKills needed, with zero further deaths, to reach the next whole KDR.
winsForNextWlrWins needed, with zero further losses, to reach the next whole WLR.
meleeAccuracyratio(meleeHits, meleeSwings): fraction of melee swings that hit.
bowAccuracyratio(bowHits, bowShots): fraction of bow shots that hit.

DuelsModeComputed

Computed for each standalone single mode (blitz, bow, noDebuff, combo, bowSpleef, sumo, boxing, parkour).

ts
export interface DuelsModeComputed extends DuelsCombatRatios {
  readonly title: string;
  readonly winsForNextTitle: number;
}
FieldFormula / meaning
titleDivision title from the mode's titlePrestige (see Titles above).
winsForNextTitleWins needed to reach the next title threshold, from the mode's wins (multiplier 1).
(inherited)All DuelsCombatRatios fields, computed from the mode's own counters.

DuelsGroupTotals

Counters summed across every submode of a mode group.

ts
export interface DuelsGroupTotals {
  readonly kills: number;
  readonly deaths: number;
  readonly wins: number;
  readonly losses: number;
  readonly playedGames: number;
  readonly swings: number;
  readonly hits: number;
  readonly bowShots: number;
  readonly bowHits: number;
  readonly blocksPlaced: number;
  readonly healthRegenerated: number;
  readonly goldenApplesEaten: number;
}
FieldFormula / meaning
killsSum of kills across the group's submodes.
deathsSum of deaths.
winsSum of wins.
lossesSum of losses.
playedGamesSum of roundsPlayed.
swingsSum of meleeSwings.
hitsSum of meleeHits.
bowShotsSum of bowShots.
bowHitsSum of bowHits.
blocksPlacedSum of blocksPlaced.
healthRegeneratedSum of healthRegenerated.
goldenApplesEatenSum of goldenApplesEaten.

DuelsGroupComputed

Computed for each mode group. The group submodes summed are: uhc (solo, doubles, fours, deathmatch), skywars (solo, doubles), megaWalls (solo, doubles, fours), overPowered (solo, doubles), classic (solo, doubles).

ts
export interface DuelsGroupComputed
  extends DuelsGroupTotals, DuelsCombatRatios {
  readonly title: string;
  readonly winsForNextTitle: number;
  readonly submodes: Readonly<Record<string, DuelsCombatRatios>>;
}
FieldFormula / meaning
titleDivision title from the group's titlePrestige (see Titles above).
winsForNextTitleWins needed to reach the next title threshold, from the group's summed wins (multiplier 1).
submodesDuelsCombatRatios for each individual submode, keyed by submode name (e.g. solo, doubles).
(inherited totals)All DuelsGroupTotals fields, summed across the group's submodes.
(inherited ratios)All DuelsCombatRatios fields, computed from the group totals (hits / swings feed melee accuracy, bowHits / bowShots feed bow accuracy).

DuelsBridgeGroupComputed

The Bridge group, with two extra objective fields. Its submodes are solo, doubles, threes, fours, teamsOfTwo, teamsOfThree, captureSolo, captureThrees, tournament.

ts
export interface DuelsBridgeGroupComputed extends DuelsGroupComputed {
  readonly goalsPerGame: number;
  readonly capturesPerGame: number;
}
FieldFormula / meaning
goalsPerGamebridge.goals / playedGames (goals is a single top-level Bridge counter; games is the summed roundsPlayed across all Bridge submodes).
capturesPerGameSum of captures across all Bridge submodes, divided by playedGames.
(inherited)All DuelsGroupComputed fields, built over the nine Bridge submodes.

DuelsOverallComputed

Computed from the top-level (all Duels combined) counters.

ts
export interface DuelsOverallComputed extends DuelsCombatRatios {
  readonly title: string;
  readonly winsForNextTitle: number;
  readonly winRate: number;
  readonly killsPerGame: number;
  readonly damageDealtPerGame: number;
  readonly blocksPlacedPerGame: number;
  readonly goldenApplesPerGame: number;
  readonly legendaryChestRate: number;
  readonly healPotsPerGame: number;
  readonly goldenHeadToAppleRatio: number;
  readonly favoriteKit: string;
}
FieldFormula / meaning
titleDivision title from the overall titlePrestige (see Titles above).
winsForNextTitleWins needed to reach the next overall title threshold. Overall thresholds are doubled (multiplier 2).
winRateratio(wins, wins + losses): fraction of decided games won (0 to 1 scale).
killsPerGamekills / gamesPlayed.
damageDealtPerGamedamageDealt / gamesPlayed.
blocksPlacedPerGameblocksPlaced / gamesPlayed.
goldenApplesPerGamegoldenApplesEaten / gamesPlayed.
legendaryChestRateratio(openedLegendaries, openedChests): fraction of opened chests that were legendary.
healPotsPerGamehealPotsUsed / gamesPlayed.
goldenHeadToAppleRatioratio(goldenHeadsEaten, goldenApplesEaten).
favoriteKitThe kit with the most wins in kitWins (the total key is excluded). "" if no kit has more than 0 wins.
(inherited)All DuelsCombatRatios fields, computed from the top-level counters.

DuelsComputed

The root object returned by computeDuels(raw: DuelsStats).

ts
export interface DuelsComputed {
  readonly overall: DuelsOverallComputed;
  readonly blitz: DuelsModeComputed;
  readonly bow: DuelsModeComputed;
  readonly noDebuff: DuelsModeComputed;
  readonly combo: DuelsModeComputed;
  readonly bowSpleef: DuelsModeComputed;
  readonly sumo: DuelsModeComputed;
  readonly boxing: DuelsModeComputed;
  readonly parkour: DuelsModeComputed;
  readonly arena: DuelsCombatRatios;
  readonly uhc: DuelsGroupComputed;
  readonly skywars: DuelsGroupComputed;
  readonly megaWalls: DuelsGroupComputed;
  readonly overPowered: DuelsGroupComputed;
  readonly classic: DuelsGroupComputed;
  readonly bridge: DuelsBridgeGroupComputed;
}
FieldFormula / meaning
overallOverall computed stats (title thresholds doubled).
blitz, bow, noDebuff, combo, bowSpleef, sumo, boxing, parkourPer single mode computed stats (DuelsModeComputed).
arenaArena duel combat ratios only (Arena has no title prestige, so no title / winsForNextTitle).
uhcUHC Duels group over solo, doubles, fours, deathmatch.
skywarsSkyWars Duels group over solo, doubles.
megaWallsMega Walls Duels group over solo, doubles, fours.
overPoweredOP Duels group over solo, doubles.
classicClassic Duels group over solo, doubles.
bridgeBridge group over all nine Bridge submodes, plus goalsPerGame and capturesPerGame.

computeDuels

ts
export function computeDuels(raw: DuelsStats): DuelsComputed;

Builds the whole computed block from the parsed DuelsStats.

Released under the MIT License.