Card: add dealtCombatDamageThisCombat

This commit is contained in:
Hanmac
2016-08-11 07:40:41 +00:00
parent e3d1a2a580
commit c89505a372

View File

@@ -4718,7 +4718,7 @@ public class Card extends GameEntity implements Comparable<Card> {
return false;
}
} else if (property.startsWith("dealtCombatDamageThisTurn ") || property.startsWith("notDealtCombatDamageThisTurn ")) {
final String v = property.split(" ")[1];
final String v = property.split(" ")[1];
final List<GameEntity> list = getDamageHistory().getThisTurnCombatDamaged();
boolean found = false;
for (final GameEntity e : list) {
@@ -4730,6 +4730,19 @@ public class Card extends GameEntity implements Comparable<Card> {
if (found == property.startsWith("not")) {
return false;
}
} else if (property.startsWith("dealtCombatDamageThisCombat ") || property.startsWith("notDealtCombatDamageThisCombat ")) {
final String v = property.split(" ")[1];
final List<GameEntity> list = getDamageHistory().getThisCombatDamaged();
boolean found = false;
for (final GameEntity e : list) {
if (e.isValid(v, sourceController, source, spellAbility)) {
found = true;
break;
}
}
if (found == property.startsWith("not")) {
return false;
}
} else if (property.startsWith("controllerWasDealtCombatDamageByThisTurn")) {
if (!source.getDamageHistory().getThisTurnCombatDamaged().contains(controller)) {
return false;