derive threat cost dynamically
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include <algorithm>
|
||||
|
||||
#include "ShipSystem.h"
|
||||
#include "ThreatCostCalculator.h"
|
||||
#include "tracing.h"
|
||||
|
||||
WaveSystem::WaveSystem(const GameConfig& config, std::mt19937& rng)
|
||||
@@ -177,7 +178,8 @@ std::vector<WaveSystem::SpawnEntry> WaveSystem::selectWaveShips(double& budget,
|
||||
std::vector<EligibleShip> eligible;
|
||||
for (const ShipDef& def : m_config.ships.ships)
|
||||
{
|
||||
const double cost = def.threat.costFormula.evaluate(static_cast<double>(shipLevel));
|
||||
const double cost = calculateShipThreatCost(m_config.threatCosts, m_config,
|
||||
def.id, def.defaultModules);
|
||||
if (cost > 0.0)
|
||||
{
|
||||
EligibleShip es;
|
||||
|
||||
Reference in New Issue
Block a user