mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 21:02:08 -08:00
* Jhoira of the Ghitu and Epochrasite - Fixed the not working suspend handling.
This commit is contained in:
parent
e4d0c1045e
commit
43b0694ee3
8 changed files with 215 additions and 66 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue