* Some Aftermath rule text fixes.

This commit is contained in:
LevelX2 2017-07-29 11:40:51 +02:00
parent a7f2f0bd1c
commit 1ddd063928
16 changed files with 73 additions and 158 deletions

View file

@ -72,7 +72,7 @@ public class CommitMemory extends SplitCard {
// Memory
// Aftermath
// Each player shuffles his or her hand and graveyard into his or her library, then draws seven cards.
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility());
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility().setRuleAtTheTop(true));
getRightHalfCard().getSpellAbility().addEffect(new MemoryEffect());
Effect effect = new DrawCardAllEffect(7);
effect.setText(", then draws seven cards");

View file

@ -23,12 +23,12 @@ public class CutRibbons extends SplitCard {
// Cut
// Cut deals 4 damage to target creature.
getLeftHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent());
getLeftHalfCard().getSpellAbility().addEffect(new DamageTargetEffect(4));
getLeftHalfCard().getSpellAbility().addEffect(new DamageTargetEffect(4).setText("Cut deals 4 damage to target creature"));
// to
// Ribbons
// Each opponent loses X life.
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility());
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility().setRuleAtTheTop(true));
getRightHalfCard().getSpellAbility().addEffect(new LoseLifeOpponentsEffect(new ManacostVariableValue()));
}

View file

@ -61,7 +61,7 @@ public class DestinedLead extends SplitCard {
// to
// Lead
// All creatures able to block target creature this turn must do so.
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility());
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility().setRuleAtTheTop(true));
getRightHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent());
getRightHalfCard().getSpellAbility().addEffect(new MustBeBlockedByAllTargetEffect(Duration.EndOfTurn));
}

View file

@ -69,7 +69,7 @@ public class DuskDawn extends SplitCard {
// Dawn
// Return all creature cards with power less than or equal to 2 from your graveyard to your hand.
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility());
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility().setRuleAtTheTop(true));
getRightHalfCard().getSpellAbility().addEffect(new DawnEffect());
}

View file

@ -63,7 +63,7 @@ public class FailureComply extends SplitCard {
// to
// Comply
// Choose a card name. Until your next turn, your opponents can't cast spells with the chosen name
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility());
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility().setRuleAtTheTop(true));
Effect effect = new NameACardEffect(NameACardEffect.TypeOfName.ALL);
effect.setText("Choose a card name");
getRightHalfCard().getSpellAbility().addEffect(effect);

View file

@ -1,53 +1,53 @@
package mage.cards.h;
import java.util.UUID;
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
import mage.abilities.effects.common.DamageAllEffect;
import mage.abilities.keyword.AftermathAbility;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
import mage.constants.SpellAbilityType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.AbilityPredicate;
/**
*
* @author Styxo
*/
public class HeavenEarth extends SplitCard {
private static final FilterCreaturePermanent filterFlying = new FilterCreaturePermanent("creature with flying");
private static final FilterCreaturePermanent filterWithouFlying = new FilterCreaturePermanent("creature without flying");
static {
filterFlying.add(new AbilityPredicate(FlyingAbility.class));
filterWithouFlying.add(Predicates.not(new AbilityPredicate(FlyingAbility.class)));
}
public HeavenEarth(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, new CardType[]{CardType.SORCERY}, "{X}{G}", "{X}{R}{R}", SpellAbilityType.SPLIT_AFTERMATH);
// Falling
// Falling deals X damage to each creature with flying.
getLeftHalfCard().getSpellAbility().addEffect(new DamageAllEffect(new ManacostVariableValue(), filterFlying));
// to
// Earth
// Earth deals X damage to each creature without flying.
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility());
getRightHalfCard().getSpellAbility().addEffect(new DamageAllEffect(new ManacostVariableValue(), filterWithouFlying));
}
public HeavenEarth(final HeavenEarth card) {
super(card);
}
@Override
public HeavenEarth copy() {
return new HeavenEarth(this);
}
}
package mage.cards.h;
import java.util.UUID;
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
import mage.abilities.effects.common.DamageAllEffect;
import mage.abilities.keyword.AftermathAbility;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
import mage.constants.SpellAbilityType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.AbilityPredicate;
/**
*
* @author Styxo
*/
public class HeavenEarth extends SplitCard {
private static final FilterCreaturePermanent filterFlying = new FilterCreaturePermanent("creature with flying");
private static final FilterCreaturePermanent filterWithouFlying = new FilterCreaturePermanent("creature without flying");
static {
filterFlying.add(new AbilityPredicate(FlyingAbility.class));
filterWithouFlying.add(Predicates.not(new AbilityPredicate(FlyingAbility.class)));
}
public HeavenEarth(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, new CardType[]{CardType.SORCERY}, "{X}{G}", "{X}{R}{R}", SpellAbilityType.SPLIT_AFTERMATH);
// Falling
// Falling deals X damage to each creature with flying.
getLeftHalfCard().getSpellAbility().addEffect(new DamageAllEffect(new ManacostVariableValue(), filterFlying));
// to
// Earth
// Earth deals X damage to each creature without flying.
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility().setRuleAtTheTop(true));
getRightHalfCard().getSpellAbility().addEffect(new DamageAllEffect(new ManacostVariableValue(), filterWithouFlying));
}
public HeavenEarth(final HeavenEarth card) {
super(card);
}
@Override
public HeavenEarth copy() {
return new HeavenEarth(this);
}
}

View file

@ -37,7 +37,7 @@ public class InsultInjury extends SplitCard {
// to
// Injury
// Injury deals 2 damage to target creature and 2 damage to target player.
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility());
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility().setRuleAtTheTop(true));
getRightHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent());
getRightHalfCard().getSpellAbility().addTarget(new TargetPlayer());
getRightHalfCard().getSpellAbility().addEffect(new InjuryEffect());

View file

@ -38,7 +38,7 @@ public class MouthFeed extends SplitCard {
// to
// Feed
// Draw a card for each creature you control with power 3 or greater
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility());
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility().setRuleAtTheTop(true));
Effect draw = new DrawCardSourceControllerEffect(new PermanentsOnBattlefieldCount(filterCreaturesYouControlPower3orGreater));
getRightHalfCard().getSpellAbility().addEffect(draw);

View file

@ -57,7 +57,7 @@ public class NeverReturn extends SplitCard {
// Return
// Exile target card from a graveyard. Create a 2/2 black Zombie creature token.
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility());
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility().setRuleAtTheTop(true));
getRightHalfCard().getSpellAbility().addEffect(new ExileTargetEffect());
getRightHalfCard().getSpellAbility().addTarget(new TargetCardInGraveyard());
getRightHalfCard().getSpellAbility().addEffect(new CreateTokenEffect(new ZombieToken()));

View file

@ -56,7 +56,7 @@ public class OnwardVictory extends SplitCard {
// to
// Victory
// Target creature gains double strike until end of turn.
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility());
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility().setRuleAtTheTop(true));
Effect effect = new GainAbilityTargetEffect(DoubleStrikeAbility.getInstance(), Duration.EndOfTurn);
getRightHalfCard().getSpellAbility().addEffect(effect);
getRightHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent());

View file

@ -75,7 +75,7 @@ public class PrepareFight extends SplitCard {
// to
// Fight
// Target creature you control fights target creature you don't control.
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility());
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility().setRuleAtTheTop(true));
getRightHalfCard().getSpellAbility().addEffect(new FightTargetsEffect());
getRightHalfCard().getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
Target target = new TargetCreaturePermanent(filter);

View file

@ -32,7 +32,7 @@ public class RagsRiches extends SplitCard {
// to
// Riches
// Each opponent chooses a creature he or she controls. You gain control of each of those creatures.
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility());
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility().setRuleAtTheTop(true));
getRightHalfCard().getSpellAbility().addEffect(new RichesEffect());
}

View file

@ -58,7 +58,7 @@ public class ReduceRubble extends SplitCard {
// Rubble
// Up to three target lands don't untap during their controller's next untap step.
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility());
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility().setRuleAtTheTop(true));
Effect effect = new DontUntapInControllersNextUntapStepTargetEffect();
effect.setText("Up to three target lands don't untap during their controller's next untap step");
getRightHalfCard().getSpellAbility().addEffect(effect);

View file

@ -27,6 +27,7 @@
*/
package mage.cards.s;
import java.util.UUID;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
import mage.abilities.keyword.AftermathAbility;
@ -38,8 +39,6 @@ import mage.constants.SpellAbilityType;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInLibrary;
import java.util.UUID;
/**
*
* @author fireshoes
@ -56,7 +55,7 @@ public class SpringMind extends SplitCard {
// Mind
// Aftermath
// Draw two cards.
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility());
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility().setRuleAtTheTop(true));
getRightHalfCard().getSpellAbility().addEffect(new DrawCardSourceControllerEffect(2));
}

View file

@ -62,7 +62,7 @@ public class StartFinish extends SplitCard {
// Finish
// Aftermath
// As an additional cost to cast Finish, sacrifice a creature. Destroy target creature.
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility());
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility().setRuleAtTheTop(true));
getRightHalfCard().getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(new FilterControlledCreaturePermanent("a creature"))));
getRightHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature (to destoy)")));
getRightHalfCard().getSpellAbility().addEffect(new DestroyTargetEffect("Destroy target creature"));

View file

@ -31,14 +31,11 @@ import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.*;
import mage.abilities.effects.common.ExileSpellEffect;
import mage.cards.Card;
import mage.cards.SplitCardHalf;
import mage.constants.*;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.ZoneChangeEvent;
import mage.game.stack.Spell;
import mage.players.Player;
/**
* Aftermath
@ -55,7 +52,7 @@ public class AftermathAbility extends SimpleStaticAbility {
public AftermathAbility() {
super(Zone.ALL, new AftermathCastFromGraveyard());
addEffect(new AftermathCantCastFromHand());
addEffect(new AftermathExileAsResolvesFromGraveyard());
addEffect(ExileSpellEffect.getInstance());
}
public AftermathAbility(final AftermathAbility ability) {
@ -68,12 +65,8 @@ public class AftermathAbility extends SimpleStaticAbility {
}
@Override
public String getRule(boolean all) {
if (all) {
return "Aftermath <i>(Cast this card only from your graveyard. Exile it afterwards.)</i>";
} else {
return "Aftermath";
}
public String getRule() {
return "Aftermath <i>(Cast this spell only from your graveyard. Then exile it.)</i>";
}
}
@ -81,7 +74,6 @@ class AftermathCastFromGraveyard extends AsThoughEffectImpl {
public AftermathCastFromGraveyard() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit);
staticText = "Cast {this} from your graveyard";
}
public AftermathCastFromGraveyard(final AftermathCastFromGraveyard effect) {
@ -98,10 +90,6 @@ class AftermathCastFromGraveyard extends AsThoughEffectImpl {
return new AftermathCastFromGraveyard(this);
}
private static String msb(UUID id) {
return Integer.toUnsignedString((int) id.getMostSignificantBits(), 16);
}
@Override
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
if (objectId.equals(source.getSourceId())
@ -153,75 +141,3 @@ class AftermathCantCastFromHand extends ContinuousRuleModifyingEffectImpl {
return false;
}
}
class AftermathExileAsResolvesFromGraveyard extends ReplacementEffectImpl {
AftermathExileAsResolvesFromGraveyard() {
super(Duration.WhileOnStack, Outcome.Detriment);
this.staticText = "Exile it afterwards.";
}
AftermathExileAsResolvesFromGraveyard(AftermathExileAsResolvesFromGraveyard effect) {
super(effect);
}
@Override
public boolean checksEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.ZONE_CHANGE;
}
@Override
public boolean applies(GameEvent evt, Ability source, Game game) {
ZoneChangeEvent event = (ZoneChangeEvent) evt;
if (event.getFromZone() == Zone.STACK && event.getToZone() != Zone.EXILED) {
// Moving something from stack to somewhere else
// Get the source id, getting the whole split card's ID, because
// that's the card that is changing zones in the event, but
// source.getSourceId is only the split card half.
// If branch so that we also support putting Aftermath on
// non-split cards for... whatever reason, in case somebody
// wants to do that in the future.
UUID sourceId = source.getSourceId();
Card sourceCard = game.getCard(source.getSourceId());
if (sourceCard != null && sourceCard instanceof SplitCardHalf) {
sourceCard = ((SplitCardHalf) sourceCard).getParentCard();
sourceId = sourceCard.getId();
}
if (event.getTargetId() == sourceId) {
// Moving this spell from stack to yard
Spell spell = game.getStack().getSpell(source.getSourceId());
if (spell != null && spell.getFromZone() == Zone.GRAVEYARD) {
// And this spell was cast from the graveyard, so we need to exile it
return true;
}
}
}
return false;
}
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
UUID sourceId = source.getSourceId();
Card sourceCard = game.getCard(source.getSourceId());
if (sourceCard != null && sourceCard instanceof SplitCardHalf) {
sourceCard = ((SplitCardHalf) sourceCard).getParentCard();
sourceId = sourceCard.getId();
}
if (sourceCard != null) {
Player player = game.getPlayer(sourceCard.getOwnerId());
if (player != null) {
return player.moveCardToExileWithInfo(sourceCard, null, "", sourceId, game, ((ZoneChangeEvent) event).getFromZone(), true);
}
}
return false;
}
@Override
public AftermathExileAsResolvesFromGraveyard copy() {
return new AftermathExileAsResolvesFromGraveyard(this);
}
}