mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
* Some minor changes.
This commit is contained in:
parent
ea8446d097
commit
8a6a615250
5 changed files with 58 additions and 47 deletions
|
@ -81,7 +81,7 @@ class SeanceEffect extends OneShotEffect {
|
||||||
|
|
||||||
public SeanceEffect() {
|
public SeanceEffect() {
|
||||||
super(Outcome.PutCreatureInPlay);
|
super(Outcome.PutCreatureInPlay);
|
||||||
this.staticText = "put a token onto the battlefield that's a copy of that card except it's a Spirit in addition to its other types. Exile it at the beginning of the next end step";
|
this.staticText = "you may exile target creature card from your graveyard. If you do, put a token onto the battlefield that's a copy of that card except it's a Spirit in addition to its other types. Exile it at the beginning of the next end step";
|
||||||
}
|
}
|
||||||
|
|
||||||
public SeanceEffect(final SeanceEffect effect) {
|
public SeanceEffect(final SeanceEffect effect) {
|
||||||
|
|
|
@ -49,6 +49,7 @@ public class MapTheWastes extends CardImpl {
|
||||||
// Search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library.
|
// Search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library.
|
||||||
TargetCardInLibrary target = new TargetCardInLibrary(new FilterBasicLandCard());
|
TargetCardInLibrary target = new TargetCardInLibrary(new FilterBasicLandCard());
|
||||||
this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(target, true));
|
this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(target, true));
|
||||||
|
|
||||||
// Bolster 1.
|
// Bolster 1.
|
||||||
this.getSpellAbility().addEffect(new BolsterEffect(1));
|
this.getSpellAbility().addEffect(new BolsterEffect(1));
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,6 +49,7 @@ public class DevouringLight extends CardImpl {
|
||||||
|
|
||||||
// Convoke
|
// Convoke
|
||||||
this.addAbility(new ConvokeAbility());
|
this.addAbility(new ConvokeAbility());
|
||||||
|
|
||||||
// Exile target attacking or blocking creature.
|
// Exile target attacking or blocking creature.
|
||||||
this.getSpellAbility().addEffect(new ExileTargetEffect());
|
this.getSpellAbility().addEffect(new ExileTargetEffect());
|
||||||
this.getSpellAbility().addTarget(new TargetAttackingOrBlockingCreature());
|
this.getSpellAbility().addTarget(new TargetAttackingOrBlockingCreature());
|
||||||
|
|
|
@ -28,18 +28,16 @@
|
||||||
package mage.sets.tenth;
|
package mage.sets.tenth;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.constants.Duration;
|
|
||||||
import mage.constants.Rarity;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.ObjectColor;
|
|
||||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect;
|
import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect;
|
||||||
import mage.abilities.mana.WhiteManaAbility;
|
import mage.abilities.mana.WhiteManaAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Rarity;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.game.permanent.token.Token;
|
import mage.game.permanent.token.Token;
|
||||||
|
|
||||||
|
@ -52,8 +50,14 @@ public class ForbiddingWatchtower extends CardImpl {
|
||||||
public ForbiddingWatchtower(UUID ownerId) {
|
public ForbiddingWatchtower(UUID ownerId) {
|
||||||
super(ownerId, 352, "Forbidding Watchtower", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, "");
|
super(ownerId, 352, "Forbidding Watchtower", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, "");
|
||||||
this.expansionSetCode = "10E";
|
this.expansionSetCode = "10E";
|
||||||
|
|
||||||
|
// Forbidding Watchtower enters the battlefield tapped.
|
||||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||||
|
|
||||||
|
// {T}: Add {W} to your mana pool.
|
||||||
this.addAbility(new WhiteManaAbility());
|
this.addAbility(new WhiteManaAbility());
|
||||||
|
|
||||||
|
// {1}{W}: Forbidding Watchtower becomes a 1/5 white Soldier creature until end of turn. It's still a land.
|
||||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new ForbiddingWatchtowerToken(), "land", Duration.EndOfTurn), new ManaCostsImpl("{1}{W}")));
|
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new ForbiddingWatchtowerToken(), "land", Duration.EndOfTurn), new ManaCostsImpl("{1}{W}")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1518,62 +1518,67 @@ public abstract class GameImpl implements Game, Serializable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Target target = perm.getSpellAbility().getTargets().get(0);
|
if (perm.getSpellAbility().getTargets().isEmpty()) {
|
||||||
if (target instanceof TargetPermanent) {
|
Permanent enchanted = this.getPermanent(perm.getAttachedTo());
|
||||||
Permanent attachedTo = getPermanent(perm.getAttachedTo());
|
logger.error("Aura without target: " + perm.getName() + " attached to " + enchanted == null ? " null" : enchanted.getName());
|
||||||
if (attachedTo == null || !attachedTo.getAttachments().contains(perm.getId())) {
|
} else {
|
||||||
// handle bestow unattachment
|
Target target = perm.getSpellAbility().getTargets().get(0);
|
||||||
Card card = this.getCard(perm.getId());
|
if (target instanceof TargetPermanent) {
|
||||||
if (card != null && card.getCardType().contains(CardType.CREATURE)) {
|
Permanent attachedTo = getPermanent(perm.getAttachedTo());
|
||||||
UUID wasAttachedTo = perm.getAttachedTo();
|
if (attachedTo == null || !attachedTo.getAttachments().contains(perm.getId())) {
|
||||||
perm.attachTo(null, this);
|
// handle bestow unattachment
|
||||||
fireEvent(new GameEvent(GameEvent.EventType.UNATTACHED, wasAttachedTo, perm.getId(), perm.getControllerId()));
|
Card card = this.getCard(perm.getId());
|
||||||
} else {
|
if (card != null && card.getCardType().contains(CardType.CREATURE)) {
|
||||||
if (movePermanentToGraveyardWithInfo(perm)) {
|
UUID wasAttachedTo = perm.getAttachedTo();
|
||||||
somethingHappened = true;
|
perm.attachTo(null, this);
|
||||||
}
|
fireEvent(new GameEvent(GameEvent.EventType.UNATTACHED, wasAttachedTo, perm.getId(), perm.getControllerId()));
|
||||||
}
|
} else {
|
||||||
}
|
|
||||||
else {
|
|
||||||
Filter auraFilter = perm.getSpellAbility().getTargets().get(0).getFilter();
|
|
||||||
if (auraFilter instanceof FilterControlledCreaturePermanent) {
|
|
||||||
if (!((FilterControlledCreaturePermanent)auraFilter).match(attachedTo, perm.getId(), perm.getControllerId(), this)
|
|
||||||
|| attachedTo.cantBeEnchantedBy(perm, this)) {
|
|
||||||
if (movePermanentToGraveyardWithInfo(perm)) {
|
if (movePermanentToGraveyardWithInfo(perm)) {
|
||||||
somethingHappened = true;
|
somethingHappened = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
if (!auraFilter.match(attachedTo, this) || attachedTo.cantBeEnchantedBy(perm, this)) {
|
else {
|
||||||
// handle bestow unattachment
|
Filter auraFilter = perm.getSpellAbility().getTargets().get(0).getFilter();
|
||||||
Card card = this.getCard(perm.getId());
|
if (auraFilter instanceof FilterControlledCreaturePermanent) {
|
||||||
if (card != null && card.getCardType().contains(CardType.CREATURE)) {
|
if (!((FilterControlledCreaturePermanent)auraFilter).match(attachedTo, perm.getId(), perm.getControllerId(), this)
|
||||||
UUID wasAttachedTo = perm.getAttachedTo();
|
|| attachedTo.cantBeEnchantedBy(perm, this)) {
|
||||||
perm.attachTo(null, this);
|
|
||||||
fireEvent(new GameEvent(GameEvent.EventType.UNATTACHED, wasAttachedTo, perm.getId(), perm.getControllerId()));
|
|
||||||
} else {
|
|
||||||
if (movePermanentToGraveyardWithInfo(perm)) {
|
if (movePermanentToGraveyardWithInfo(perm)) {
|
||||||
somethingHappened = true;
|
somethingHappened = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (!auraFilter.match(attachedTo, this) || attachedTo.cantBeEnchantedBy(perm, this)) {
|
||||||
|
// handle bestow unattachment
|
||||||
|
Card card = this.getCard(perm.getId());
|
||||||
|
if (card != null && card.getCardType().contains(CardType.CREATURE)) {
|
||||||
|
UUID wasAttachedTo = perm.getAttachedTo();
|
||||||
|
perm.attachTo(null, this);
|
||||||
|
fireEvent(new GameEvent(GameEvent.EventType.UNATTACHED, wasAttachedTo, perm.getId(), perm.getControllerId()));
|
||||||
|
} else {
|
||||||
|
if (movePermanentToGraveyardWithInfo(perm)) {
|
||||||
|
somethingHappened = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
else if (target instanceof TargetPlayer) {
|
||||||
else if (target instanceof TargetPlayer) {
|
Player attachedToPlayer = getPlayer(perm.getAttachedTo());
|
||||||
Player attachedToPlayer = getPlayer(perm.getAttachedTo());
|
if (attachedToPlayer == null) {
|
||||||
if (attachedToPlayer == null) {
|
|
||||||
if (movePermanentToGraveyardWithInfo(perm)) {
|
|
||||||
somethingHappened = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Filter auraFilter = perm.getSpellAbility().getTargets().get(0).getFilter();
|
|
||||||
if (!auraFilter.match(attachedToPlayer, this) || attachedToPlayer.hasProtectionFrom(perm, this)) {
|
|
||||||
if (movePermanentToGraveyardWithInfo(perm)) {
|
if (movePermanentToGraveyardWithInfo(perm)) {
|
||||||
somethingHappened = true;
|
somethingHappened = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
Filter auraFilter = perm.getSpellAbility().getTargets().get(0).getFilter();
|
||||||
|
if (!auraFilter.match(attachedToPlayer, this) || attachedToPlayer.hasProtectionFrom(perm, this)) {
|
||||||
|
if (movePermanentToGraveyardWithInfo(perm)) {
|
||||||
|
somethingHappened = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue