Stop counting phased out cards

This commit is contained in:
tool4EvEr
2021-06-03 06:22:15 +02:00
parent 83dc9b688b
commit c648a8ccbc
3 changed files with 9 additions and 0 deletions

View File

@@ -4662,6 +4662,8 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
getGame().getTriggerHandler().runTrigger(TriggerType.PhaseIn, runParams, false);
}
game.updateLastStateForCard(this);
return true;
}

View File

@@ -47,6 +47,11 @@ public class CardProperty {
final Card lki = game.getChangeZoneLKIInfo(card);
final Player controller = lki.getController();
// CR 702.25b if card is phased out it will not count unless specifically asked for
if (card.isPhasedOut() && !property.contains("phasedOut")) {
return false;
}
// by name can also have color names, so needs to happen before colors.
if (property.startsWith("named")) {
String name = TextUtil.fastReplace(property.substring(5), ";", ","); // for some legendary cards

View File

@@ -253,6 +253,8 @@ public final class CardUtil {
newCopy.setCounters(Maps.newHashMap(in.getCounters()));
newCopy.setColor(in.determineColor().getColor());
newCopy.setPhasedOut(in.isPhasedOut());
newCopy.setReceivedDamageFromThisTurn(in.getReceivedDamageFromThisTurn());
newCopy.setDamageHistory(in.getDamageHistory());
for (Card c : in.getBlockedThisTurn()) {