move zoneChangeCounter to GameState - Card is now immutable

This commit is contained in:
betasteward 2015-03-29 08:30:31 -04:00
parent 45aa5f675c
commit 6405c8d2f0
101 changed files with 899 additions and 257 deletions

View file

@ -879,10 +879,10 @@ public abstract class AbilityImpl implements Ability {
boolean found = false;
// unfortunately we need to handle double faced cards separately and only this way
if (object instanceof PermanentCard) {
// if (((PermanentCard)object).canTransform()) {
// PermanentCard permanent = (PermanentCard)object;
// found = permanent.getSecondCardFace().getAbilities().contains(this) || permanent.getCard().getAbilities().contains(this);
// }
if (((PermanentCard)object).canTransform()) {
PermanentCard permanent = (PermanentCard)object;
found = permanent.getSecondCardFace().getAbilities().contains(this) || permanent.getCard().getAbilities().contains(this);
}
} else {
// check if it's an ability that is temporary gained to a card
Abilities<Ability> otherAbilities = game.getState().getAllOtherAbilities(this.getSourceId());