mirror of
https://github.com/correl/mage.git
synced 2024-12-27 03:00:13 +00:00
fixed Estrid's Invocation being able to copy opposing enchantments
This commit is contained in:
parent
c2717cb4fb
commit
89510e0d6d
1 changed files with 10 additions and 8 deletions
|
@ -1,6 +1,5 @@
|
||||||
package mage.cards.e;
|
package mage.cards.e;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageObject;
|
import mage.MageObject;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||||
|
@ -14,24 +13,27 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.common.FilterControlledEnchantmentPermanent;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.util.functions.ApplyToPermanent;
|
import mage.util.functions.ApplyToPermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class EstridsInvocation extends CardImpl {
|
public final class EstridsInvocation extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterPermanent filter = new FilterControlledEnchantmentPermanent();
|
||||||
|
|
||||||
public EstridsInvocation(UUID ownerId, CardSetInfo setInfo) {
|
public EstridsInvocation(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}");
|
||||||
|
|
||||||
// You may have Estrid's Invocation enter the battlefield as a copy of any enchantment you control, except it gains "At the beginning of your upkeep, you may exile this enchantment. If you do, return it to the battlefield under its owner's control."
|
// You may have Estrid's Invocation enter the battlefield as a copy of any enchantment you control, except it gains "At the beginning of your upkeep, you may exile this enchantment. If you do, return it to the battlefield under its owner's control."
|
||||||
this.addAbility(new EntersBattlefieldAbility(new CopyPermanentEffect(
|
this.addAbility(new EntersBattlefieldAbility(new CopyPermanentEffect(
|
||||||
StaticFilters.FILTER_ENCHANTMENT_PERMANENT,
|
filter, new EstridsInvocationApplier()
|
||||||
new EstridsInvocationApplier()
|
|
||||||
).setText("as a copy of any enchantment you control, except it gains "
|
).setText("as a copy of any enchantment you control, except it gains "
|
||||||
+ "\"At the beginning of your upkeep, "
|
+ "\"At the beginning of your upkeep, "
|
||||||
+ "you may exile this enchantment. "
|
+ "you may exile this enchantment. "
|
||||||
|
@ -40,7 +42,7 @@ public final class EstridsInvocation extends CardImpl {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public EstridsInvocation(final EstridsInvocation card) {
|
private EstridsInvocation(final EstridsInvocation card) {
|
||||||
super(card);
|
super(card);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,13 +76,13 @@ class EstridsInvocationApplier extends ApplyToPermanent {
|
||||||
|
|
||||||
class EstridsInvocationEffect extends OneShotEffect {
|
class EstridsInvocationEffect extends OneShotEffect {
|
||||||
|
|
||||||
public EstridsInvocationEffect() {
|
EstridsInvocationEffect() {
|
||||||
super(Outcome.Neutral);
|
super(Outcome.Neutral);
|
||||||
this.staticText = "you may exile this enchantment. "
|
this.staticText = "you may exile this enchantment. "
|
||||||
+ "If you do, return it to the battlefield under its owner's control";
|
+ "If you do, return it to the battlefield under its owner's control";
|
||||||
}
|
}
|
||||||
|
|
||||||
public EstridsInvocationEffect(final EstridsInvocationEffect effect) {
|
private EstridsInvocationEffect(final EstridsInvocationEffect effect) {
|
||||||
super(effect);
|
super(effect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue