Skip to content

Teamfights Extractor

Teamfight window detection and per-participant statistics.


Generated API

Module gem.extractors.teamfights

Teamfight detection from combat log entries.

Source: src/gem/extractors/teamfights.py

Top-level functions

detect_teamfights

python
def detect_teamfights(combat_log: list[CombatLogEntry], hero_to_slot: dict[str, int] | None = None, player_snapshots: dict[int, list[PlayerStateSnapshot]] | None = None, slot_to_team: dict[int, int] | None = None) -> list[Teamfight]

Detect teamfights from a match combat log.

Source: src/gem/extractors/teamfights.py:167

detect_opendota_teamfights

python
def detect_opendota_teamfights(combat_log: list[CombatLogEntry], hero_to_slot: dict[str, int] | None = None, player_snapshots: dict[int, list[PlayerStateSnapshot]] | None = None, *, game_start_tick: int | None = None, duration_s: int | None = None) -> list[OpenDotaTeamfight]

Project combat log entries into OpenDota-compatible teamfight output.

Source: src/gem/extractors/teamfights.py:425

Top-level classes

TeamfightPlayer

python
class TeamfightPlayer

Per-player stats accumulated within one teamfight window.

Source: src/gem/extractors/teamfights.py:51

Dataclass fields

NameTypeDefault
player_idint-
deathsint0
buybacksint0
damage_dealtint0
damage_takenint0
healingint0
gold_deltaint0
xp_deltaint0
ability_usesdict[str, int]field(...)
item_usesdict[str, int]field(...)

Teamfight

python
class Teamfight

A detected teamfight window with per-player breakdowns.

Source: src/gem/extractors/teamfights.py:80

Dataclass fields

NameTypeDefault
start_tickint-
end_tickint-
last_death_tickint-
deathsint-
first_death_tickint0
radiant_killsint0
dire_killsint0
winnerstr'unknown'
centroid_xfloat | NoneNone
centroid_yfloat | NoneNone
centroid_nint0
playerslist[TeamfightPlayer]field(...)

OpenDotaTeamfightPlayer

python
class OpenDotaTeamfightPlayer

OpenDota-compatible per-player teamfight row.

Source: src/gem/extractors/teamfights.py:120

Dataclass fields

NameTypeDefault
deaths_posdict[str, dict[str, int]]field(...)
ability_usesdict[str, int]field(...)
ability_targetsdict[str, int]field(...)
item_usesdict[str, int]field(...)
killeddict[str, int]field(...)
deathsint0
buybacksint0
damageint0
healingint0
gold_deltaint0
xp_deltaint0
xp_startint | NoneNone
xp_endint | NoneNone

OpenDotaTeamfight

python
class OpenDotaTeamfight

OpenDota-compatible temporal teamfight window.

Source: src/gem/extractors/teamfights.py:150

Dataclass fields

NameTypeDefault
startint-
endint-
last_deathint-
deathsint-
playerslist[OpenDotaTeamfightPlayer]field(...)