From cb45a816bfab24efea7e7fb39ced446c6015b26b Mon Sep 17 00:00:00 2001 From: asvitkine Date: Fri, 5 Jul 2024 12:20:18 -0400 Subject: [PATCH] Small cleanup. --- .../delegate/battle/casualty/CasualtySelector.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/game-app/game-core/src/main/java/games/strategy/triplea/delegate/battle/casualty/CasualtySelector.java b/game-app/game-core/src/main/java/games/strategy/triplea/delegate/battle/casualty/CasualtySelector.java index 883a253e32..307686e509 100644 --- a/game-app/game-core/src/main/java/games/strategy/triplea/delegate/battle/casualty/CasualtySelector.java +++ b/game-app/game-core/src/main/java/games/strategy/triplea/delegate/battle/casualty/CasualtySelector.java @@ -6,6 +6,7 @@ import games.strategy.engine.data.Territory; import games.strategy.engine.data.Unit; import games.strategy.engine.data.UnitType; +import games.strategy.engine.data.properties.GameProperties; import games.strategy.engine.delegate.IDelegateBridge; import games.strategy.engine.player.Player; import games.strategy.triplea.Properties; @@ -128,9 +129,7 @@ public static CasualtyDetails selectCasualties( hitsRemaining >= totalHitpoints || sortedTargetsToPickFrom.size() == 1 || allTargetsOneTypeOneHitPoint( - sortedTargetsToPickFrom, - dependents, - Properties.getPartialAmphibiousRetreat(data.getProperties())); + sortedTargetsToPickFrom, dependents, data.getProperties()); final CasualtyDetails casualtyDetails; if (autoChooseCasualties) { casualtyDetails = new CasualtyDetails(defaultCasualties, true); @@ -316,11 +315,13 @@ public static List getCasualtyOrderOfLoss( * * @param targets a collection of target units * @param dependents map of dependent units for target units + * @param properties game properties */ private static boolean allTargetsOneTypeOneHitPoint( final Collection targets, final Map> dependents, - final boolean separateByRetreatPossibility) { + final GameProperties properties) { + final boolean separateByRetreatPossibility = Properties.getPartialAmphibiousRetreat(properties); final Set categorized = UnitSeparator.categorize( targets,