mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
* Fixed some exile zone names not showing the ID of the owning object.
This commit is contained in:
parent
a7f893ca25
commit
8f68f2b7d5
10 changed files with 84 additions and 78 deletions
|
@ -27,7 +27,7 @@
|
||||||
*/
|
*/
|
||||||
package mage.sets.avacynrestored;
|
package mage.sets.avacynrestored;
|
||||||
|
|
||||||
import mage.constants.*;
|
import java.util.UUID;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.ActivatedAbility;
|
import mage.abilities.ActivatedAbility;
|
||||||
|
@ -40,17 +40,22 @@ import mage.abilities.effects.common.ImprintTargetEffect;
|
||||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Layer;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.Rarity;
|
||||||
|
import mage.constants.SubLayer;
|
||||||
|
import mage.constants.Zone;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author noxx
|
* @author noxx
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
public class DarkImpostor extends CardImpl {
|
public class DarkImpostor extends CardImpl {
|
||||||
|
|
||||||
|
@ -65,7 +70,7 @@ public class DarkImpostor extends CardImpl {
|
||||||
|
|
||||||
// {4}{B}{B}: Exile target creature and put a +1/+1 counter on Dark Impostor.\
|
// {4}{B}{B}: Exile target creature and put a +1/+1 counter on Dark Impostor.\
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ImprintTargetEffect(), new ManaCostsImpl("{4}{B}{B}"));
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ImprintTargetEffect(), new ManaCostsImpl("{4}{B}{B}"));
|
||||||
ability.addEffect(new ExileTargetEffect(null, "Dark Impostor"));
|
ability.addEffect(new ExileTargetEffect(null, this.getIdName()));
|
||||||
ability.addEffect(new AddCountersSourceEffect(CounterType.P1P1.createInstance()));
|
ability.addEffect(new AddCountersSourceEffect(CounterType.P1P1.createInstance()));
|
||||||
ability.addTarget(new TargetCreaturePermanent());
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
|
@ -103,7 +103,7 @@ class SilkwrapEffect extends OneShotEffect {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||||
if (permanent != null) {
|
if (permanent != null) {
|
||||||
return new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), permanent.getName()).apply(game, source);
|
return new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), permanent.getIdName()).apply(game, source);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,6 @@ public class BanishingLight extends CardImpl {
|
||||||
super(ownerId, 5, "Banishing Light", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}");
|
super(ownerId, 5, "Banishing Light", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}");
|
||||||
this.expansionSetCode = "JOU";
|
this.expansionSetCode = "JOU";
|
||||||
|
|
||||||
|
|
||||||
// When Banishing Light enters the battlefield, exile target nonland permanent an opponent controls until Banishing Light leaves the battlefield.
|
// When Banishing Light enters the battlefield, exile target nonland permanent an opponent controls until Banishing Light leaves the battlefield.
|
||||||
Ability ability = new EntersBattlefieldTriggeredAbility(new BanishingLightExileEffect());
|
Ability ability = new EntersBattlefieldTriggeredAbility(new BanishingLightExileEffect());
|
||||||
ability.addTarget(new TargetPermanent(filter));
|
ability.addTarget(new TargetPermanent(filter));
|
||||||
|
@ -102,7 +101,7 @@ class BanishingLightExileEffect extends OneShotEffect {
|
||||||
// If Banishing Light leaves the battlefield before its triggered ability resolves,
|
// If Banishing Light leaves the battlefield before its triggered ability resolves,
|
||||||
// the target won't be exiled.
|
// the target won't be exiled.
|
||||||
if (permanent != null) {
|
if (permanent != null) {
|
||||||
return new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), permanent.getName()).apply(game, source);
|
return new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), permanent.getIdName()).apply(game, source);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,6 +53,7 @@ import mage.util.CardUtil;
|
||||||
public class SuspensionField extends CardImpl {
|
public class SuspensionField extends CardImpl {
|
||||||
|
|
||||||
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with toughness 3 or greater");
|
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with toughness 3 or greater");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new ToughnessPredicate(ComparisonType.GreaterThan, 2));
|
filter.add(new ToughnessPredicate(ComparisonType.GreaterThan, 2));
|
||||||
}
|
}
|
||||||
|
@ -61,7 +62,6 @@ public class SuspensionField extends CardImpl {
|
||||||
super(ownerId, 25, "Suspension Field", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}");
|
super(ownerId, 25, "Suspension Field", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}");
|
||||||
this.expansionSetCode = "KTK";
|
this.expansionSetCode = "KTK";
|
||||||
|
|
||||||
|
|
||||||
// When Suspension Field enters the battlefield, you may exile target creature with toughness 3 or greater until Suspension Field leaves the battlefield.
|
// When Suspension Field enters the battlefield, you may exile target creature with toughness 3 or greater until Suspension Field leaves the battlefield.
|
||||||
Ability ability = new EntersBattlefieldTriggeredAbility(new SuspensionFieldExileEffect(), true);
|
Ability ability = new EntersBattlefieldTriggeredAbility(new SuspensionFieldExileEffect(), true);
|
||||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||||
|
@ -101,7 +101,7 @@ class SuspensionFieldExileEffect extends OneShotEffect {
|
||||||
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
||||||
// If Suspension Field leaves the battlefield before its triggered ability resolves, the target won't be exiled.
|
// If Suspension Field leaves the battlefield before its triggered ability resolves, the target won't be exiled.
|
||||||
if (sourcePermanent != null) {
|
if (sourcePermanent != null) {
|
||||||
return new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), sourcePermanent.getName()).apply(game, source);
|
return new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), sourcePermanent.getIdName()).apply(game, source);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,6 +54,7 @@ import mage.util.CardUtil;
|
||||||
public class BanisherPriest extends CardImpl {
|
public class BanisherPriest extends CardImpl {
|
||||||
|
|
||||||
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new ControllerPredicate(TargetController.OPPONENT));
|
filter.add(new ControllerPredicate(TargetController.OPPONENT));
|
||||||
}
|
}
|
||||||
|
@ -106,7 +107,7 @@ class BanisherPriestExileEffect extends OneShotEffect {
|
||||||
// If Banisher Priest leaves the battlefield before its triggered ability resolves,
|
// If Banisher Priest leaves the battlefield before its triggered ability resolves,
|
||||||
// the target creature won't be exiled.
|
// the target creature won't be exiled.
|
||||||
if (permanent != null) {
|
if (permanent != null) {
|
||||||
return new ExileTargetEffect(CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()), permanent.getName()).apply(game, source);
|
return new ExileTargetEffect(CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()), permanent.getIdName()).apply(game, source);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -146,7 +146,7 @@ class ColossalWhaleExileEffect extends OneShotEffect {
|
||||||
// If Whale leaves the battlefield before its triggered ability resolves,
|
// If Whale leaves the battlefield before its triggered ability resolves,
|
||||||
// the target creature won't be exiled.
|
// the target creature won't be exiled.
|
||||||
if (permanent != null) {
|
if (permanent != null) {
|
||||||
return new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), permanent.getName()).apply(game, source);
|
return new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), permanent.getIdName()).apply(game, source);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,6 @@ public class ConstrictingSliver extends CardImpl {
|
||||||
filterTarget.add(new ControllerPredicate(TargetController.OPPONENT));
|
filterTarget.add(new ControllerPredicate(TargetController.OPPONENT));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public ConstrictingSliver(UUID ownerId) {
|
public ConstrictingSliver(UUID ownerId) {
|
||||||
super(ownerId, 7, "Constricting Sliver", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{5}{W}");
|
super(ownerId, 7, "Constricting Sliver", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{5}{W}");
|
||||||
this.expansionSetCode = "M15";
|
this.expansionSetCode = "M15";
|
||||||
|
@ -117,7 +116,7 @@ class ConstrictingSliverExileEffect extends OneShotEffect {
|
||||||
// If the creature leaves the battlefield before its triggered ability resolves,
|
// If the creature leaves the battlefield before its triggered ability resolves,
|
||||||
// the target creature won't be exiled.
|
// the target creature won't be exiled.
|
||||||
if (permanent != null) {
|
if (permanent != null) {
|
||||||
return new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), permanent.getName()).apply(game, source);
|
return new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), permanent.getIdName()).apply(game, source);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,12 +75,12 @@ public class KarnLiberated extends CardImpl {
|
||||||
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(6)), false));
|
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(6)), false));
|
||||||
|
|
||||||
// +4: Target player exiles a card from his or her hand.
|
// +4: Target player exiles a card from his or her hand.
|
||||||
LoyaltyAbility ability1 = new LoyaltyAbility(new ExileFromZoneTargetEffect(Zone.HAND, exileId, "Karn Liberated", new FilterCard()), 4);
|
LoyaltyAbility ability1 = new LoyaltyAbility(new ExileFromZoneTargetEffect(Zone.HAND, exileId, this.getIdName(), new FilterCard()), 4);
|
||||||
ability1.addTarget(new TargetPlayer());
|
ability1.addTarget(new TargetPlayer());
|
||||||
this.addAbility(ability1);
|
this.addAbility(ability1);
|
||||||
|
|
||||||
// -3: Exile target permanent.
|
// -3: Exile target permanent.
|
||||||
LoyaltyAbility ability2 = new LoyaltyAbility(new ExileTargetEffect(exileId, "Karn Liberated"), -3);
|
LoyaltyAbility ability2 = new LoyaltyAbility(new ExileTargetEffect(exileId, this.getIdName()), -3);
|
||||||
ability2.addTarget(new TargetPermanent());
|
ability2.addTarget(new TargetPermanent());
|
||||||
this.addAbility(ability2);
|
this.addAbility(ability2);
|
||||||
|
|
||||||
|
|
|
@ -68,8 +68,6 @@ public class SistersOfStoneDeath extends CardImpl {
|
||||||
this.supertype.add("Legendary");
|
this.supertype.add("Legendary");
|
||||||
this.subtype.add("Gorgon");
|
this.subtype.add("Gorgon");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.power = new MageInt(7);
|
this.power = new MageInt(7);
|
||||||
this.toughness = new MageInt(5);
|
this.toughness = new MageInt(5);
|
||||||
|
|
||||||
|
@ -79,7 +77,7 @@ public class SistersOfStoneDeath extends CardImpl {
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
// {B}{G}: Exile target creature blocking or blocked by Sisters of Stone Death.
|
// {B}{G}: Exile target creature blocking or blocked by Sisters of Stone Death.
|
||||||
Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect(exileId, "Sisters Of Stone Death"), new ManaCostsImpl("{B}{G}"));
|
Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect(exileId, this.getIdName()), new ManaCostsImpl("{B}{G}"));
|
||||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("creature blocking or blocked by Sisters of Stone Death");
|
FilterCreaturePermanent filter = new FilterCreaturePermanent("creature blocking or blocked by Sisters of Stone Death");
|
||||||
filter.add(Predicates.or(new BlockedByIdPredicate(this.getId()),
|
filter.add(Predicates.or(new BlockedByIdPredicate(this.getId()),
|
||||||
new BlockingAttackerIdPredicate(this.getId())));
|
new BlockingAttackerIdPredicate(this.getId())));
|
||||||
|
|
|
@ -52,33 +52,37 @@ import mage.target.common.TargetCreaturePermanent;
|
||||||
import mage.util.CardUtil;
|
import mage.util.CardUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If the land Chained to the Rocks is enchanting stops being a Mountain or another player
|
* If the land Chained to the Rocks is enchanting stops being a Mountain or
|
||||||
* gains control of it, Chained to the Rocks will be put into its owner's graveyard when
|
* another player gains control of it, Chained to the Rocks will be put into its
|
||||||
* state-based actions are performed.
|
* owner's graveyard when state-based actions are performed.
|
||||||
*
|
*
|
||||||
* Chained to the Rocks's ability causes a zone change with a duration, a style of ability
|
* Chained to the Rocks's ability causes a zone change with a duration, a style
|
||||||
* introduced in Magic 2014 that's somewhat reminiscent of older cards like Oblivion Ring.
|
* of ability introduced in Magic 2014 that's somewhat reminiscent of older
|
||||||
* However, unlike Oblivion Ring, cards like Chained to the Rocks have a single ability
|
* cards like Oblivion Ring. However, unlike Oblivion Ring, cards like Chained
|
||||||
* that creates two one-shot effects: one that exiles the creature when the ability resolves,
|
* to the Rocks have a single ability that creates two one-shot effects: one
|
||||||
* and another that returns the exiled card to the battlefield immediately after Chained to
|
* that exiles the creature when the ability resolves, and another that returns
|
||||||
* the Rocks leaves the battlefield.
|
* the exiled card to the battlefield immediately after Chained to the Rocks
|
||||||
|
* leaves the battlefield.
|
||||||
*
|
*
|
||||||
* If Chained to the Rocks leaves the battlefield before its triggered ability resolves,
|
* If Chained to the Rocks leaves the battlefield before its triggered ability
|
||||||
* the target creature won't be exiled.
|
* resolves, the target creature won't be exiled.
|
||||||
*
|
*
|
||||||
* Auras attached to the exiled creature will be put into their owners' graveyards (unless
|
* Auras attached to the exiled creature will be put into their owners'
|
||||||
* they have bestow). Equipment attached to the exiled creature will become unattached and
|
* graveyards (unless they have bestow). Equipment attached to the exiled
|
||||||
* remain on the battlefield. Any counters on the exiled creature will cease to exist.
|
* creature will become unattached and remain on the battlefield. Any counters
|
||||||
|
* on the exiled creature will cease to exist.
|
||||||
*
|
*
|
||||||
* If a creature token is exiled, it ceases to exist. It won't be returned to the battlefield.
|
* If a creature token is exiled, it ceases to exist. It won't be returned to
|
||||||
|
* the battlefield.
|
||||||
*
|
*
|
||||||
* The exiled card returns to the battlefield immediately after Chained to the Rocks leaves
|
* The exiled card returns to the battlefield immediately after Chained to the
|
||||||
* the battlefield. Nothing happens between the two events, including state-based actions.
|
* Rocks leaves the battlefield. Nothing happens between the two events,
|
||||||
|
* including state-based actions.
|
||||||
*
|
*
|
||||||
* In a multiplayer game, if Chained to the Rocks's owner leaves the game, the exiled card
|
* In a multiplayer game, if Chained to the Rocks's owner leaves the game, the
|
||||||
* will return to the battlefield. Because the one-shot effect that returns the card isn't
|
* exiled card will return to the battlefield. Because the one-shot effect that
|
||||||
* an ability that goes on the stack, it won't cease to exist along with the leaving player's
|
* returns the card isn't an ability that goes on the stack, it won't cease to
|
||||||
* spells and abilities on the stack.
|
* exist along with the leaving player's spells and abilities on the stack.
|
||||||
*
|
*
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
|
@ -86,6 +90,7 @@ public class ChainedToTheRocks extends CardImpl {
|
||||||
|
|
||||||
private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("Mountain you control");
|
private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("Mountain you control");
|
||||||
private static final FilterCreaturePermanent filterTarget = new FilterCreaturePermanent("creature an opponent controls");
|
private static final FilterCreaturePermanent filterTarget = new FilterCreaturePermanent("creature an opponent controls");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new SubtypePredicate("Mountain"));
|
filter.add(new SubtypePredicate("Mountain"));
|
||||||
filterTarget.add(new ControllerPredicate(TargetController.OPPONENT));
|
filterTarget.add(new ControllerPredicate(TargetController.OPPONENT));
|
||||||
|
@ -96,7 +101,6 @@ public class ChainedToTheRocks extends CardImpl {
|
||||||
this.expansionSetCode = "THS";
|
this.expansionSetCode = "THS";
|
||||||
this.subtype.add("Aura");
|
this.subtype.add("Aura");
|
||||||
|
|
||||||
|
|
||||||
// Enchant Mountain you control
|
// Enchant Mountain you control
|
||||||
TargetPermanent auraTarget = new TargetPermanent(filter);
|
TargetPermanent auraTarget = new TargetPermanent(filter);
|
||||||
this.getSpellAbility().addTarget(auraTarget);
|
this.getSpellAbility().addTarget(auraTarget);
|
||||||
|
@ -144,7 +148,7 @@ class ChainedToTheRocksEffect extends OneShotEffect {
|
||||||
// If Chained to the Rocks leaves the battlefield before its triggered ability resolves,
|
// If Chained to the Rocks leaves the battlefield before its triggered ability resolves,
|
||||||
// the target creature won't be exiled.
|
// the target creature won't be exiled.
|
||||||
if (permanent != null) {
|
if (permanent != null) {
|
||||||
return new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), permanent.getName()).apply(game, source);
|
return new ExileTargetEffect(CardUtil.getCardExileZoneId(game, source), permanent.getIdName()).apply(game, source);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue