Skip to content

Commit

Permalink
Issue 6303: Rearranged BasicPathRanker::calcHazardousLiquidHazard
Browse files Browse the repository at this point in the history
  • Loading branch information
psikomonkie committed Feb 5, 2025
1 parent 92f3b6f commit d7141c8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions megamek/src/megamek/client/bot/princess/BasicPathRanker.java
Original file line number Diff line number Diff line change
Expand Up @@ -1316,9 +1316,6 @@ private double calcHazardousLiquidHazard(Hex hex, boolean endHex, Entity movingU
}
}

double hazardValue = 0;


dmg = (HazardousLiquidPoolUtil.AVERAGE_DAMAGE_HAZARDOUS_LIQUID_POOL * HazardousLiquidPoolUtil.getHazardousLiquidPoolDamageMultiplierForUnsealed(movingUnit))
/ (HazardousLiquidPoolUtil.getHazardousLiquidPoolDamageDivisorForInfantry(movingUnit));

Expand All @@ -1330,7 +1327,7 @@ private double calcHazardousLiquidHazard(Hex hex, boolean endHex, Entity movingU
// Dependent on expected average damage / exposed remaining armor *
// UNIT_DESTRUCTION_FACTOR
int exposedArmor;

double hazardValue = 0;
if (step.isProne() || (hex.containsTerrain(Terrains.WATER) && hex.terrainLevel(Terrains.WATER) > 1)) {
exposedArmor = movingUnit.getTotalArmor();
logger.trace("Fully Submerged damage = {}, exposed armor = {}", dmg, exposedArmor);
Expand Down

0 comments on commit d7141c8

Please sign in to comment.