Fix getLethalDamage

This commit is contained in:
tool4EvEr
2022-01-06 15:43:44 +01:00
parent 76232624bc
commit c09301bcea
3 changed files with 11 additions and 7 deletions

View File

@@ -1056,7 +1056,6 @@ public final class CMatchUI
return result.get();
}
@Override
public void openView(final TrackableCollection<PlayerView> myPlayers) {
final GameView gameView = getGameView();

View File

@@ -283,7 +283,7 @@ public class VAssignCombatDamage {
* @param isLMB
*/
private void assignDamageTo(CardView source, final boolean meta, final boolean isAdding) {
if ( !damage.containsKey(source) )
if (!damage.containsKey(source))
source = null;
// If trying to assign to the defender, follow the normal assignment rules
@@ -391,7 +391,6 @@ public class VAssignCombatDamage {
dt.damage = Math.max(0, addedDamage + dt.damage);
}
/**
* TODO: Write javadoc for this method.
* @return
@@ -410,8 +409,7 @@ public class VAssignCombatDamage {
int damageLeft = totalDamageToAssign;
boolean allHaveLethal = true;
for (DamageTarget dt : defenders)
{
for (DamageTarget dt : defenders) {
int dmg = dt.damage;
damageLeft -= dmg;
int lethal = getDamageToKill(dt.card);