forked from External/mage
- Fixed #6861
This commit is contained in:
parent
6a65e5bb23
commit
79592d2b0a
21 changed files with 158 additions and 50 deletions
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
package mage.abilities.effects.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
|
|
@ -29,10 +29,15 @@ public class PhaseOutAttachedEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent enchantment = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||
if(enchantment != null) {
|
||||
// In the case that the enchantment is blinked
|
||||
Permanent enchantment = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD);
|
||||
if (enchantment == null) {
|
||||
// It was not blinked, use the standard method
|
||||
enchantment = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||
}
|
||||
if (enchantment != null) {
|
||||
Permanent enchanted = game.getPermanent(enchantment.getAttachedTo());
|
||||
if(enchanted != null) {
|
||||
if (enchanted != null) {
|
||||
return enchanted.phaseOut(game);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue