Skip to content

Smash Heroes computed stats

Computed Smash Heroes statistics, derived from the parsed SmashHeroesStats block. They are always present on an enriched player as player.stats.smashHeroes.computed (when the raw smashHeroes block exists), produced by computeSmashHeroes(raw).

All ratios are rounded to 2 decimals. A ratio with a zero denominator yields the numerator (K/D convention). *Share fields are percentages from 0 to 100 (0 when the whole is 0). *ForNext* fields are the additional amount needed to reach the next whole-number value of the corresponding ratio (0 when the denominator is 0).

SmashHeroesComputed

ts
export interface SmashHeroesComputed {
  readonly kdr: number;
  readonly wlr: number;
  readonly winRate: number;
  readonly killsForNextKdr: number;
  readonly winsForNextWlr: number;
  readonly killsPerGame: number;
  readonly smashRatio: number;
  readonly damagePerGame: number;
  readonly damagePerKill: number;
  readonly quitRate: number;
  readonly assistsPerGame: number;
  readonly averageHeroLevel: number;
  readonly totalPrestige: number;
  readonly favoriteHero: string;
  readonly modes: SmashHeroesModesComputed;
  readonly heroes: Readonly<Record<string, SmashHeroesHeroComputed>>;
}
FieldFormulaMeaning
kdrkills / deathsKill/death ratio (bare ratio)
wlrwins / lossesWin/loss ratio (bare ratio)
winRatewins / gamesFraction of games won (bare ratio, not a percent)
killsForNextKdrneededForNextWholeRatio(kills, deaths)Kills needed to reach the next whole KDR
winsForNextWlrneededForNextWholeRatio(wins, losses)Wins needed to reach the next whole WLR
killsPerGamekills / gamesAverage kills per game
smashRatiosmashed / smasherTimes the player smashed others per time they were smashed (bare ratio)
damagePerGamedamageDealt / gamesAverage damage dealt per game
damagePerKilldamageDealt / killsAverage damage dealt per kill (bare ratio)
quitRatequits / gamesQuits per game played (bare ratio, not a percent)
assistsPerGameassists / gamesAverage assists per game
averageHeroLevelmean of lastLevel across all heroes in raw.heroes, rounded to 2 decimals; 0 when there are no heroesAverage current level across all heroes
totalPrestigesum of prestige across all heroes in raw.heroesCombined prestige across all heroes
favoriteHerohero with the highest overall.games, only counting heroes with more than 0 gamesMost-played hero; "" when no hero has games
modessee SmashHeroesModesComputedPer-mode computed stats (normal, twoVsTwo, teams)
heroesSmashHeroesHeroComputed per heroPer-hero ratios for every hero in raw.heroes, keyed by hero name

SmashHeroesModesComputed

ts
export interface SmashHeroesModesComputed {
  readonly normal: SmashHeroesModeComputed;
  readonly twoVsTwo: SmashHeroesModeComputed;
  readonly teams: SmashHeroesModeComputed;
}
FieldFormulaMeaning
normalcomputed from raw.normal against total raw.gamesStats for the 1v1v1v1 normal mode
twoVsTwocomputed from raw.twoVsTwo against total raw.gamesStats for the 2v2 mode
teamscomputed from raw.teams against total raw.gamesStats for the teams mode

SmashHeroesModeComputed

Per-mode stats. Each formula uses that mode's own kills, deaths, wins, losses, and games; totalGames is the overall raw.games.

ts
export interface SmashHeroesModeComputed {
  readonly kdr: number;
  readonly wlr: number;
  readonly killsForNextKdr: number;
  readonly winsForNextWlr: number;
  readonly gameShare: number;
}
FieldFormulaMeaning
kdrmode.kills / mode.deathsMode kill/death ratio (bare ratio)
wlrmode.wins / mode.lossesMode win/loss ratio (bare ratio)
killsForNextKdrneededForNextWholeRatio(mode.kills, mode.deaths)Kills needed to reach the mode's next whole KDR
winsForNextWlrneededForNextWholeRatio(mode.wins, mode.losses)Wins needed to reach the mode's next whole WLR
gameShare100 * mode.games / totalGamesPercent (0-100) of all games played in this mode

SmashHeroesHeroComputed

Per-hero ratios. One entry per hero in raw.heroes; each formula uses that hero's overall stats.

ts
export interface SmashHeroesHeroComputed {
  readonly kdr: number;
  readonly wlr: number;
  readonly killsForNextKdr: number;
  readonly winsForNextWlr: number;
}
FieldFormulaMeaning
kdroverall.kills / overall.deathsHero kill/death ratio (bare ratio)
wlroverall.wins / overall.lossesHero win/loss ratio (bare ratio)
killsForNextKdrneededForNextWholeRatio(overall.kills, overall.deaths)Kills needed to reach the hero's next whole KDR
winsForNextWlrneededForNextWholeRatio(overall.wins, overall.losses)Wins needed to reach the hero's next whole WLR

Released under the MIT License.