Class CombatLedger
- Namespace
- SurvivorsMaker.Presentation
- Assembly
- SurvivorsMaker.Presentation.dll
Everything the run summary and the DPS meter show, collected while a run plays. Fed by CombatTap (exact weapon attribution) and by the tick's events (Observe(in SimEvent, IReadOnlyList<string>, Func<int, string>)). Without a tap, damage comes from events alone: weapon hits by slot, everything else unsourced.
public sealed class CombatLedger
- Inheritance
-
CombatLedger
- Inherited Members
Constructors
CombatLedger(float)
public CombatLedger(float dpsWindowSeconds = 5)
Parameters
dpsWindowSecondsfloat
Fields
UnsourcedSlot
Slot used for damage no weapon caused (triggers, unattributed effects).
public const int UnsourcedSlot = -1
Field Value
Properties
Attributed
True while a CombatTap reports damage; damage events are then not counted twice.
public bool Attributed { get; set; }
Property Value
Gains
public IReadOnlyList<GainMark> Gains { get; }
Property Value
Levels
public IReadOnlyList<LevelMark> Levels { get; }
Property Value
Meter
Damage per second over the last few seconds of the current wave.
public DpsMeterModel Meter { get; }
Property Value
Seconds
public float Seconds { get; }
Property Value
Taken
public IReadOnlyList<DamageTakenTotals> Taken { get; }
Property Value
TickSeconds
public float TickSeconds { get; }
Property Value
Ticks
Ticks played in waves over the run.
public int Ticks { get; }
Property Value
TotalDealt
public long TotalDealt { get; }
Property Value
TotalTaken
public long TotalTaken { get; }
Property Value
UnsourcedDamage
public long UnsourcedDamage { get; }
Property Value
UnsourcedKills
public int UnsourcedKills { get; }
Property Value
Wave
1-based wave being played (or last played).
public int Wave { get; }
Property Value
Weapons
public IReadOnlyList<WeaponDamageTotals> Weapons { get; }
Property Value
Methods
BeginWave(int, float, int)
public void BeginWave(int wave, float tickSeconds, int startTick)
Parameters
Clear()
public void Clear()
Dealt(int, int, string, DamageChannel, long, bool, bool, bool)
Damage dealt to an enemy. Empty weaponId = unsourced.
public void Dealt(int tick, int slot, string weaponId, DamageChannel channel, long amount, bool crit = false, bool killed = false, bool hit = true)
Parameters
Equipped(string)
One played tick with this weapon equipped (call once per equipped copy).
public void Equipped(string weaponId)
Parameters
weaponIdstring
Gained(int, string, bool, GainSource)
public void Gained(int wave, string id, bool weapon, GainSource source)
Parameters
waveintidstringweaponboolsourceGainSource
LevelReached(int, int, int)
public void LevelReached(int wave, int level, int tick)
Parameters
Observe(in SimEvent, IReadOnlyList<string>, Func<int, string>)
One event of the tick. Level-ups always; damage only when no tap reports it (Attributed false).
slotWeaponIds: item id per weapon slot (optional); enemyIdOf: entity id → enemy id.
public void Observe(in SimEvent e, IReadOnlyList<string> slotWeaponIds, Func<int, string> enemyIdOf)
Parameters
RecordTaken(string, TakenChannel, long)
public void RecordTaken(string sourceId, TakenChannel channel, long amount)
Parameters
sourceIdstringchannelTakenChannelamountlong
TickPlayed(int)
public void TickPlayed(int tick)
Parameters
tickint