* Jhoira of the Ghitu and Epochrasite - Fixed the not working suspend handling.

This commit is contained in:
LevelX2 2015-03-08 01:40:16 +01:00
parent e4d0c1045e
commit 43b0694ee3
8 changed files with 215 additions and 66 deletions

View file

@ -846,9 +846,15 @@ public abstract class AbilityImpl implements Ability {
if (object != null && !object.getAbilities().contains(this)) {
boolean found = false;
// unfortunately we need to handle double faced cards separately and only this way
if (object instanceof PermanentCard && ((PermanentCard)object).canTransform()) {
PermanentCard permanent = (PermanentCard)object;
found = permanent.getSecondCardFace().getAbilities().contains(this) || permanent.getCard().getAbilities().contains(this);
if (object instanceof PermanentCard) {
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());
found = otherAbilities != null && otherAbilities.contains(this);
}
if (!found) {
return false;