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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user