- Fix DamageDealAi setting damage to 0 if adjustment to minimum required damage fails.

This commit is contained in:
Agetian
2019-05-29 18:53:32 +03:00
parent b9a848f7eb
commit 2dcf1c088a

View File

@@ -272,7 +272,7 @@ public class DamageDealAi extends DamageAiBase {
sourceName.equals("Crater's Claws")){ sourceName.equals("Crater's Claws")){
// If I can kill my target by paying less mana, do it // If I can kill my target by paying less mana, do it
if (sa.usesTargeting() && !sa.getTargets().isTargetingAnyPlayer() && !sa.hasParam("DividedAsYouChoose")) { if (sa.usesTargeting() && !sa.getTargets().isTargetingAnyPlayer() && !sa.hasParam("DividedAsYouChoose")) {
int actualPay = 0; int actualPay = dmg;
final boolean noPrevention = sa.hasParam("NoPrevention"); final boolean noPrevention = sa.hasParam("NoPrevention");
for (final Card c : sa.getTargets().getTargetCards()) { for (final Card c : sa.getTargets().getTargetCards()) {
final int adjDamage = ComputerUtilCombat.getEnoughDamageToKill(c, dmg, source, false, noPrevention); final int adjDamage = ComputerUtilCombat.getEnoughDamageToKill(c, dmg, source, false, noPrevention);