Skip to content

Fix aegis and Wraith King reincarnation deaths counting as deaths - #89

Open
geracosta wants to merge 1 commit into
odota:masterfrom
geracosta:aegis-reincarnation
Open

Fix aegis and Wraith King reincarnation deaths counting as deaths#89
geracosta wants to merge 1 commit into
odota:masterfrom
geracosta:aegis-reincarnation

Conversation

@geracosta

Copy link
Copy Markdown
Contributor

Fixes odota/core#726.

While checking parsed data against the Steam API scoreboard over 100 recent parsed pro matches, I found 24/1000 players whose combat-log death counts (killed_by sums) disagree with the scoreboard. The breakdown:

  • Every aegis death in the sample leaked into kills_log/killed/killed_by (14 players, all +1, all aegis carriers — verified case by case against the CHAT_MESSAGE_AEGIS pickups). The existing filter doesn't catch them on modern replays: it clears the holder on modifier_aegis_regen, which the combat log no longer emits (I dumped every event around a verified aegis death — the revival leaves no combat log trace at all), and it shares a single aegisDeathTime across holders.
  • Wraith King reincarnations count as deaths (found a WK pro match with scoreboard 5 vs parsed 7). The scepter variant of Reincarnation doesn't log the base modifier_skeleton_king_reincarnation either.
  • The remaining mismatches are suicides, which the scoreboard counts but the combat-log path has always excluded — out of scope here (Add deaths_log with gold lost and time dead per death #88's deaths_log records those).

The fix resolves reincarnations in a pre-scan keyed by event time, the same pattern as #87/#88, since the chat, modifier, interval and death entries around a reincarnation are not strictly ordered in the stream:

  • Aegis: the first death of a holder within the 5-minute expiry window of a CHAT_MESSAGE_AEGIS/AEGIS_STOLEN pickup is the aegis reincarnation, and consumes that pickup — so a later real death counts, and an expired aegis can't swallow anything.
  • WK: a death of the Wraith King where the life_state intervals show him back on his feet within 4 seconds and with no buyback event in between is a reincarnation (his revive takes 3s; the shortest real respawn is far longer). The base reincarnation modifier is kept as a fast path for replays that do log it.

Validation on 9 matches (8 with aegis activity + the WK match), all against Steam API scoreboards:

  • All 6 leaked aegis deaths fixed, exact scoreboard match, with every other player's counts untouched (77/80 exact — the other 3 are the suicides above, unchanged).
  • WK match: parsed deaths 7 → 5, matching the scoreboard, keeping his 5 real deaths (including a pre-horn one) and dropping exactly the two reincarnations.

This also fixes the same inflation inside teamfight deaths, since those are derived from the killed entries.

The stateful aegis filter no longer works on modern replays (it relies
on modifier_aegis_regen, which is not logged anymore, and shares one
death timestamp across holders), so reincarnation deaths inflate
kills_log, killed and killed_by relative to the scoreboard.

Reincarnations are now resolved in a pre-scan keyed by event time: the
first death of an aegis holder within the 5 minute expiry window is
the aegis reincarnation, consuming that pickup, and a Wraith King back
on his feet within seconds without a buyback reincarnated (the scepter
variant leaves no modifier entry, so this comes from the life_state
intervals, keeping the base reincarnation modifier as a fast path).

Fixes odota/core#726.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Aegis/WK ult counting as death

1 participant