mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
Card: add dealtCombatDamageThisCombat
This commit is contained in:
@@ -4730,6 +4730,19 @@ public class Card extends GameEntity implements Comparable<Card> {
|
|||||||
if (found == property.startsWith("not")) {
|
if (found == property.startsWith("not")) {
|
||||||
return false;
|
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")) {
|
} else if (property.startsWith("controllerWasDealtCombatDamageByThisTurn")) {
|
||||||
if (!source.getDamageHistory().getThisTurnCombatDamaged().contains(controller)) {
|
if (!source.getDamageHistory().getThisTurnCombatDamaged().contains(controller)) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user