fix issue where ships cancel their attacks and advance if on low health in balancing target

This commit is contained in:
2026-06-16 22:17:09 +02:00
parent 5219b227c5
commit 1324a320e2
2 changed files with 10 additions and 11 deletions

View File

@@ -16,7 +16,7 @@ namespace BehaviorScores
constexpr float kAttack = 0.60f; // healthy and target in sensor range
constexpr float kRetreat = 0.90f;
// Health fraction at/below which a ship is considered "low HP" — used by the
// Attack evaluator (do not attack when low) and the Retreat evaluator.
// Health fraction below which a ship is considered "low HP" — used by the
// Retreat evaluator to trigger retreat (which outscores attack).
constexpr float kLowHpFraction = 0.3f;
}