refactor: power-up statistics come from the power-up's pickup skill

TrackLOTCollection hardcoded the 15 life/armor/imagination power-up LOTs. A power-up
(Objects.type "Powerup") now counts towards the statistic of what its pickup skill
restores: a Heal, RepairArmor or Imagination behavior in the skill's behavior tree.
Gives the same result for the 15 LOTs; "HoT Powerup" (8208, heal over time) now also
counts as a life power-up.

Refs #691

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-09-27 04:23:07 -05:00
parent e44eaf1862
commit d4a1a993ba
4 changed files with 163 additions and 27 deletions

View File

@@ -13,6 +13,7 @@
#include <set>
#include "Loot.h"
#include "StatisticID.h"
#include <optional>
enum class eGameActivity : uint32_t;
@@ -190,6 +191,13 @@ public:
*/
void TrackLOTCollection(LOT lot);
/**
* The statistic a power-up counts towards, from what its pickup skill restores (life, armor or imagination)
* @param lot the LOT that was picked up
* @return the statistic, or nothing when the LOT is not such a power-up
*/
static std::optional<StatisticID> GetPowerUpStatistic(LOT lot);
/**
* Handles a change in health and updates the statistics
* @param health the health delta