- Fixed "You may have CARDNAME assign its combat damage as though it weren't blocked." messing around when the AI is blocking.

This commit is contained in:
Sloth
2013-03-02 14:05:28 +00:00
parent 74cc5de83f
commit 7b54bc2718

View File

@@ -1648,14 +1648,14 @@ public class ComputerUtilCombat {
public static Map<Card, Integer> distributeAIDamage(final Card attacker, final List<Card> block, int dmgCanDeal, GameEntity defender) { public static Map<Card, Integer> distributeAIDamage(final Card attacker, final List<Card> block, int dmgCanDeal, GameEntity defender) {
Map<Card, Integer> damageMap = new HashMap<Card, Integer>(); Map<Card, Integer> damageMap = new HashMap<Card, Integer>();
if (attacker.hasKeyword("You may have CARDNAME assign its combat damage as though it weren't blocked.") boolean isAttacking = defender != null;
|| attacker.hasKeyword("CARDNAME assigns its combat damage as though it weren't blocked.")) {
if (isAttacking && (attacker.hasKeyword("You may have CARDNAME assign its combat damage as though it weren't blocked.")
|| attacker.hasKeyword("CARDNAME assigns its combat damage as though it weren't blocked."))) {
damageMap.put(null, dmgCanDeal); damageMap.put(null, dmgCanDeal);
return damageMap; return damageMap;
} }
boolean isAttacking = defender != null;
final boolean hasTrample = attacker.hasKeyword("Trample"); final boolean hasTrample = attacker.hasKeyword("Trample");
if (block.size() == 1) { if (block.size() == 1) {