mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
[ODY] Fixed 29 Odyssey cards.
This commit is contained in:
parent
d4f8e6bc1e
commit
b4d43649b4
29 changed files with 210 additions and 213 deletions
|
@ -110,8 +110,6 @@ class BridgeFromBelowAbility extends TriggeredAbilityImpl<BridgeFromBelowAbility
|
|||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.ZONE_CHANGE) {
|
||||
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
||||
|
||||
|
||||
if (zEvent.getFromZone() == Zone.BATTLEFIELD && zEvent.getToZone() == Zone.GRAVEYARD) {
|
||||
Permanent permanent = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD);
|
||||
if (permanent != null && filter.match(permanent, sourceId, controllerId, game)) {
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
package mage.sets.magic2010;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
|
@ -49,8 +50,13 @@ public class Overrun extends CardImpl<Overrun> {
|
|||
this.expansionSetCode = "M10";
|
||||
this.color.setGreen(true);
|
||||
|
||||
this.getSpellAbility().addEffect(new BoostControlledEffect(3, 3, Duration.EndOfTurn));
|
||||
this.getSpellAbility().addEffect(new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent()));
|
||||
// Creatures you control get +3/+3 and gain trample until end of turn.
|
||||
Effect effect = new BoostControlledEffect(3, 3, Duration.EndOfTurn);
|
||||
effect.setText("Creatures you control get +3/+3");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
effect = new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent());
|
||||
effect.setText("and gain trample until end of turn");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
}
|
||||
|
||||
public Overrun(final Overrun card) {
|
||||
|
|
|
@ -42,7 +42,7 @@ import mage.filter.predicate.mageobject.CardTypePredicate;
|
|||
*/
|
||||
public class BelovedChaplain extends CardImpl<BelovedChaplain> {
|
||||
|
||||
public static final FilterCard filter = new FilterCard("Creature");
|
||||
public static final FilterCard filter = new FilterCard("creature");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||
|
|
|
@ -70,7 +70,7 @@ class BlazingSalvoEffect extends OneShotEffect<BlazingSalvoEffect> {
|
|||
|
||||
public BlazingSalvoEffect() {
|
||||
super(Outcome.Damage);
|
||||
this.staticText = "Blazing Salvo deals 3 damage to target creature unless that creature's controller has Blazing Salvo deal 5 damage to him or her.";
|
||||
this.staticText = "Blazing Salvo deals 3 damage to target creature unless that creature's controller has Blazing Salvo deal 5 damage to him or her";
|
||||
}
|
||||
|
||||
public BlazingSalvoEffect(final BlazingSalvoEffect effect){
|
||||
|
|
|
@ -90,7 +90,7 @@ public class CabalInquisitor extends CardImpl<CabalInquisitor> {
|
|||
class ActivateAsSorceryConditionalActivatedAbility extends ActivatedAbilityImpl<ActivateAsSorceryConditionalActivatedAbility> {
|
||||
|
||||
private Condition condition;
|
||||
private String ruleText = "Threshold - {1}{B}, {tap}, Exile two cards from your graveyard: Target player discards a card. Activate this ability only any time you could cast a sorcery, and only if seven or more cards are in your graveyard.";
|
||||
private String ruleText = "<i>Threshold<i/> - {1}{B}, {t}, Exile two cards from your graveyard: Target player discards a card. Activate this ability only any time you could cast a sorcery, and only if seven or more cards are in your graveyard.";
|
||||
|
||||
private static final Effects emptyEffects = new Effects();
|
||||
|
||||
|
@ -131,6 +131,6 @@ class ActivateAsSorceryConditionalActivatedAbility extends ActivatedAbilityImpl<
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return super.getRule() + " Activate this ability only any time you could cast a sorcery.";
|
||||
return ruleText;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ public class CabalPatriarch extends CardImpl<CabalPatriarch> {
|
|||
|
||||
// {2}{B}, Sacrifice a creature: Target creature gets -2/-2 until end of turn.
|
||||
Ability ability1 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(-2, -2, Duration.EndOfTurn), new ManaCostsImpl("{2}{B}"));
|
||||
TargetControlledPermanent target = new TargetControlledPermanent(new FilterControlledCreaturePermanent(""));
|
||||
TargetControlledPermanent target = new TargetControlledPermanent(new FilterControlledCreaturePermanent("a creature"));
|
||||
target.setRequired(true);
|
||||
ability1.addCost(new SacrificeTargetCost(target));
|
||||
ability1.addTarget(new TargetCreaturePermanent(true));
|
||||
|
|
|
@ -70,7 +70,8 @@ public class CausticTar extends CardImpl<CausticTar> {
|
|||
// Enchanted land has "{tap}: Target player loses 3 life."
|
||||
Ability tarAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseLifeTargetEffect(3), new TapSourceCost());
|
||||
tarAbility.addTarget(new TargetPlayer(true));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(tarAbility, AttachmentType.AURA, Duration.WhileOnBattlefield)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(tarAbility, AttachmentType.AURA,
|
||||
Duration.WhileOnBattlefield,"Enchanted land has \"{t}: Target player loses 3 life.\"")));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ class CeaseFireEffect extends ReplacementEffectImpl<CeaseFireEffect> {
|
|||
|
||||
public CeaseFireEffect() {
|
||||
super(Duration.EndOfTurn, Outcome.Detriment);
|
||||
staticText = "Target player can't cast creature spells.";
|
||||
staticText = "Target player can't cast creature spells";
|
||||
}
|
||||
|
||||
public CeaseFireEffect(final CeaseFireEffect effect) {
|
||||
|
|
|
@ -54,7 +54,8 @@ public class Confessor extends CardImpl<Confessor> {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// Whenever a player discards a card, you may gain 1 life.
|
||||
this.addAbility(new SimpleTriggeredAbility(Zone.BATTLEFIELD, EventType.DISCARDED_CARD, new GainLifeEffect(1), "Whenever a player discards a card, ", true, true));
|
||||
this.addAbility(new SimpleTriggeredAbility(
|
||||
Zone.BATTLEFIELD, EventType.DISCARDED_CARD, new GainLifeEffect(1), "Whenever a player discards a card, you may", false, true));
|
||||
}
|
||||
|
||||
public Confessor(final Confessor card) {
|
||||
|
|
|
@ -36,6 +36,7 @@ import mage.abilities.condition.common.CardsInControllerGraveCondition;
|
|||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.ExileTargetEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
|
@ -46,11 +47,14 @@ import mage.constants.Outcome;
|
|||
import mage.constants.Rarity;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.other.OwnerPredicate;
|
||||
import mage.filter.predicate.permanent.TokenPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.ZoneChangeEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.PermanentToken;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
@ -61,6 +65,12 @@ import mage.target.targetpointer.FixedTarget;
|
|||
*/
|
||||
public class DecayingSoil extends CardImpl<DecayingSoil> {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nontoken creature");
|
||||
static{
|
||||
filter.add(new OwnerPredicate(TargetController.YOU));
|
||||
filter.add(Predicates.not(new TokenPredicate()));
|
||||
}
|
||||
|
||||
public DecayingSoil(UUID ownerId) {
|
||||
super(ownerId, 127, "Decaying Soil", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}{B}");
|
||||
this.expansionSetCode = "ODY";
|
||||
|
@ -76,9 +86,9 @@ public class DecayingSoil extends CardImpl<DecayingSoil> {
|
|||
|
||||
// Threshold - As long as seven or more cards are in your graveyard, Decaying Soil has "Whenever a nontoken creature is put into your graveyard from the battlefield, you may pay {1}. If you do, return that card to your hand."
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new ConditionalContinousEffect(new GainAbilitySourceEffect(new DecayingSoilTriggeredAbility()),
|
||||
new ConditionalContinousEffect(new GainAbilitySourceEffect(new DecayingSoilTriggeredAbility(new DecayingSoilEffect(), filter)),
|
||||
new CardsInControllerGraveCondition(7),
|
||||
"<br/><br/><i>Threshold</i> - As long as seven or more cards are in your graveyard, {this} has \"Whenever a nontoken creature is put into your graveyard from the battlefield, you may pay {1}. If you do, return that card to your hand.")));
|
||||
"<i>Threshold</i> - As long as seven or more cards are in your graveyard, {this} has \"Whenever a nontoken creature is put into your graveyard from the battlefield, you may pay {1}. If you do, return that card to your hand")));
|
||||
}
|
||||
|
||||
public DecayingSoil(final DecayingSoil card) {
|
||||
|
@ -93,13 +103,16 @@ public class DecayingSoil extends CardImpl<DecayingSoil> {
|
|||
|
||||
class DecayingSoilTriggeredAbility extends TriggeredAbilityImpl<DecayingSoilTriggeredAbility> {
|
||||
|
||||
DecayingSoilTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new DecayingSoilEffect(), true);
|
||||
protected FilterCreaturePermanent filter;
|
||||
|
||||
public DecayingSoilTriggeredAbility(Effect effect, FilterCreaturePermanent filter) {
|
||||
super(Zone.BATTLEFIELD, effect, false);
|
||||
this.filter = filter;
|
||||
}
|
||||
|
||||
DecayingSoilTriggeredAbility(DecayingSoilTriggeredAbility ability) {
|
||||
public DecayingSoilTriggeredAbility(DecayingSoilTriggeredAbility ability) {
|
||||
super(ability);
|
||||
this.filter = ability.filter;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -107,58 +120,50 @@ class DecayingSoilTriggeredAbility extends TriggeredAbilityImpl<DecayingSoilTrig
|
|||
return new DecayingSoilTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkInterveningIfClause(Game game) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.ZONE_CHANGE) {
|
||||
|
||||
// make sure card is on battlefield
|
||||
UUID sourceId = getSourceId();
|
||||
if (game.getPermanent(sourceId) == null) {
|
||||
// or it is being removed
|
||||
if (game.getLastKnownInformation(sourceId, Zone.BATTLEFIELD) == null) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
||||
Permanent permanent = zEvent.getTarget();
|
||||
|
||||
if (permanent != null &&
|
||||
permanent.getControllerId().equals(this.controllerId) &&
|
||||
zEvent.getToZone() == Zone.GRAVEYARD &&
|
||||
zEvent.getFromZone() == Zone.BATTLEFIELD &&
|
||||
!(permanent instanceof PermanentToken) &&
|
||||
permanent.getCardType().contains(CardType.CREATURE)) {
|
||||
|
||||
getEffects().get(0).setTargetPointer(new FixedTarget(permanent.getId()));
|
||||
return true;
|
||||
if (zEvent.getFromZone() == Zone.BATTLEFIELD && zEvent.getToZone() == Zone.GRAVEYARD) {
|
||||
Permanent permanent = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD);
|
||||
if (permanent != null && filter.match(permanent, this.getSourceId(), this.getControllerId(), game)) {
|
||||
getEffects().get(0).setTargetPointer(new FixedTarget(permanent.getId()));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkInterveningIfClause(Game game) {
|
||||
Player controller = game.getPlayer(this.getControllerId());
|
||||
if(controller != null && controller.getGraveyard().contains(this.getSourceId())) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "<br/><br/><i>Threshold</i> - As long as seven or more cards are in your graveyard, {this} has \"Whenever a nontoken creature is put into your graveyard from the battlefield, you may pay {1}. If you do, return that card to your hand.";
|
||||
return new StringBuilder("Whenever a ").append(filter.getMessage()).append(" is put into your graveyard from the battlefield, ").append(super.getRule()).toString();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class DecayingSoilEffect extends OneShotEffect<DecayingSoilEffect> {
|
||||
|
||||
private final Cost cost = new GenericManaCost(2);
|
||||
private final Cost cost = new GenericManaCost(1);
|
||||
|
||||
public DecayingSoilEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "you may pay {1}. If you do, return that card to your hand";
|
||||
|
||||
}
|
||||
|
||||
public DecayingSoilEffect(DecayingSoilEffect effect) {
|
||||
public DecayingSoilEffect(final DecayingSoilEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
|
@ -169,7 +174,7 @@ class DecayingSoilEffect extends OneShotEffect<DecayingSoilEffect> {
|
|||
if (player.chooseUse(Outcome.Benefit, " - Pay " + cost.getText() + "?", game)) {
|
||||
cost.clearPaid();
|
||||
if (cost.pay(source, game, source.getId(), source.getControllerId(), false)) {
|
||||
UUID target = targetPointer.getFirst(game, source);
|
||||
UUID target = this.getTargetPointer().getFirst(game, source);
|
||||
if (target != null) {
|
||||
Card card = game.getCard(target);
|
||||
// check if it's still in graveyard
|
||||
|
@ -181,7 +186,6 @@ class DecayingSoilEffect extends OneShotEffect<DecayingSoilEffect> {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,8 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.CardsInControllerGraveCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.common.continious.BoostControlledEffect;
|
||||
import mage.abilities.effects.common.AddContinuousEffectToGame;
|
||||
import mage.abilities.effects.common.continious.BoostAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
|
@ -41,7 +42,6 @@ import mage.constants.Rarity;
|
|||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.abilities.effects.common.AddContinuousEffectToGame;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -49,8 +49,7 @@ import mage.abilities.effects.common.AddContinuousEffectToGame;
|
|||
*/
|
||||
public class DivineSacrament extends CardImpl<DivineSacrament> {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("White creatures");
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("White creatures");
|
||||
static {
|
||||
filter.add(new ColorPredicate(ObjectColor.WHITE));
|
||||
}
|
||||
|
@ -62,13 +61,13 @@ public class DivineSacrament extends CardImpl<DivineSacrament> {
|
|||
this.color.setWhite(true);
|
||||
|
||||
// White creatures get +1/+1.
|
||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter, false));
|
||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Duration.WhileOnBattlefield, filter, false));
|
||||
this.addAbility(ability);
|
||||
// Threshold - White creatures get an additional +1/+1 as long as seven or more cards are in your graveyard.
|
||||
ability.addEffect(
|
||||
new ConditionalOneShotEffect(
|
||||
new AddContinuousEffectToGame(new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter, false)),
|
||||
ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalOneShotEffect(
|
||||
new AddContinuousEffectToGame(new BoostAllEffect(1, 1, Duration.WhileOnBattlefield, filter, false)),
|
||||
new CardsInControllerGraveCondition(7),
|
||||
"<br/><br/><i>Threshold</i> - If seven or more cards are in your graveyard, white creatures get an additional +1/+1."
|
||||
"<i>Threshold</i> - If seven or more cards are in your graveyard, white creatures get an additional +1/+1."
|
||||
));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -59,8 +59,10 @@ public class DwarvenStrikeForce extends CardImpl<DwarvenStrikeForce> {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// Discard a card at random: Dwarven Strike Force gains first strike and haste until end of turn.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.EndOfTurn), new DiscardCardCost(true));
|
||||
Effect effect = new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(),Duration.EndOfTurn);
|
||||
Effect effect = new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn);
|
||||
effect.setText("{this} gains first strike");
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new DiscardCardCost(true));
|
||||
effect = new GainAbilitySourceEffect(HasteAbility.getInstance(),Duration.EndOfTurn);
|
||||
effect.setText("and haste until end of turn");
|
||||
ability.addEffect(effect);
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -80,7 +80,7 @@ class EngulfingFlamesEffect extends ReplacementEffectImpl<EngulfingFlamesEffect>
|
|||
|
||||
public EngulfingFlamesEffect() {
|
||||
super(Duration.EndOfTurn, Outcome.Detriment);
|
||||
staticText = "A creature dealt damage this way can't be regenerated this turn";
|
||||
staticText = "It can't be regenerated this turn";
|
||||
}
|
||||
|
||||
public EngulfingFlamesEffect(final EngulfingFlamesEffect effect) {
|
||||
|
|
|
@ -72,8 +72,7 @@ public class FilthyCur extends CardImpl<FilthyCur> {
|
|||
|
||||
class DealtDamageLoseLifeTriggeredAbility extends TriggeredAbilityImpl<DealtDamageLoseLifeTriggeredAbility> {
|
||||
|
||||
|
||||
public DealtDamageLoseLifeTriggeredAbility(Zone zone, Effect effect, boolean optional) {
|
||||
public DealtDamageLoseLifeTriggeredAbility(Zone zone, Effect effect, boolean optional) {
|
||||
super(zone, effect, optional);
|
||||
}
|
||||
|
||||
|
@ -92,7 +91,6 @@ class DealtDamageLoseLifeTriggeredAbility extends TriggeredAbilityImpl<DealtDama
|
|||
if (event.getTargetId().equals(this.sourceId)) {
|
||||
this.getEffects().clear();
|
||||
this.addEffect(new LoseLifeControllerEffect(event.getAmount()));
|
||||
this.getControllerId();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -101,6 +99,6 @@ class DealtDamageLoseLifeTriggeredAbility extends TriggeredAbilityImpl<DealtDama
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever {this} is dealt damage, you lose that much life";
|
||||
return "Whenever {this} is dealt damage, you lose that much life.";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,13 +30,11 @@ package mage.sets.odyssey;
|
|||
import java.util.UUID;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
@ -52,12 +50,10 @@ import mage.target.targetpointer.FirstTargetPointer;
|
|||
*/
|
||||
public class GhastlyDemise extends CardImpl<GhastlyDemise> {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature if its tougness is less than the number of cards in your graveyard");
|
||||
|
||||
|
||||
static{
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature if its tougness is less than the number of cards in your graveyard");
|
||||
static {
|
||||
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
|
||||
}
|
||||
}
|
||||
|
||||
public GhastlyDemise(UUID ownerId) {
|
||||
super(ownerId, 139, "Ghastly Demise", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{B}");
|
||||
|
@ -65,6 +61,7 @@ public class GhastlyDemise extends CardImpl<GhastlyDemise> {
|
|||
|
||||
this.color.setBlack(true);
|
||||
|
||||
// Destroy target nonblack creature if its toughness is less than or equal to the number of cards in your graveyard.
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
|
||||
this.getSpellAbility().addEffect(new GhastlyDemiseEffect(false));
|
||||
}
|
||||
|
@ -81,16 +78,11 @@ public class GhastlyDemise extends CardImpl<GhastlyDemise> {
|
|||
|
||||
class GhastlyDemiseEffect extends OneShotEffect<GhastlyDemiseEffect> {
|
||||
|
||||
protected boolean noRegen;
|
||||
|
||||
public GhastlyDemiseEffect(String ruleText) {
|
||||
this(false);
|
||||
ruleText = "Destroy target nonblack creature if its toughness is less than or equal to the number of cards in your graveyard.";
|
||||
staticText = ruleText;
|
||||
}
|
||||
protected boolean noRegen;
|
||||
|
||||
public GhastlyDemiseEffect(boolean noRegen) {
|
||||
super(Outcome.DestroyPermanent);
|
||||
staticText = "Destroy target nonblack creature if its toughness is less than or equal to the number of cards in your graveyard";
|
||||
this.noRegen = noRegen;
|
||||
}
|
||||
|
||||
|
@ -111,30 +103,21 @@ protected boolean noRegen;
|
|||
for (Target target : source.getTargets()) {
|
||||
for (UUID permanentId : target.getTargets()) {
|
||||
Permanent permanent = game.getPermanent(permanentId);
|
||||
if (permanent != null && permanent.getToughness().getValue() <= game.getPlayer(source.getControllerId()).getGraveyard().count(new FilterCard(), game)) {
|
||||
permanent.destroy(source.getId(), game, noRegen);
|
||||
if (permanent != null && permanent.getToughness().getValue() <= game.getPlayer(source.getControllerId()).getGraveyard().size()) {
|
||||
permanent.destroy(source.getSourceId(), game, noRegen);
|
||||
affectedTargets++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (targetPointer.getTargets(game, source).size() > 0) {
|
||||
} else if (targetPointer.getTargets(game, source).size() > 0) {
|
||||
for (UUID permanentId : targetPointer.getTargets(game, source)) {
|
||||
Permanent permanent = game.getPermanent(permanentId);
|
||||
if (permanent != null && permanent.getToughness().getValue() <= game.getPlayer(source.getControllerId()).getGraveyard().count(new FilterCard(), game)) {
|
||||
permanent.destroy(source.getId(), game, noRegen);
|
||||
if (permanent != null && permanent.getToughness().getValue() <= game.getPlayer(source.getControllerId()).getGraveyard().size()) {
|
||||
permanent.destroy(source.getSourceId(), game, noRegen);
|
||||
affectedTargets++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return affectedTargets > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return staticText;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ public class InfectedVermin extends CardImpl<InfectedVermin> {
|
|||
new DamageEverythingEffect(3),
|
||||
new ManaCostsImpl("{3}{B}"),
|
||||
new CardsInControllerGraveCondition(7),
|
||||
"<br/><br/><i>Threshold</i> - {3}{B}: Infected Vermin deals 3 damage to each creature and each player. Activate this ability only if seven or more cards are in your graveyard."));
|
||||
"<i>Threshold</i> - {3}{B}: Infected Vermin deals 3 damage to each creature and each player. Activate this ability only if seven or more cards are in your graveyard."));
|
||||
}
|
||||
|
||||
public InfectedVermin(final InfectedVermin card) {
|
||||
|
|
|
@ -72,7 +72,7 @@ public class KamahlsDesire extends CardImpl<KamahlsDesire> {
|
|||
// Threshold - Enchanted creature gets +3/+0 as long as seven or more cards are in your graveyard.
|
||||
ability.addEffect(new ConditionalContinousEffect(new BoostEnchantedEffect(3, 0, Duration.WhileOnBattlefield),
|
||||
new CardsInControllerGraveCondition(7),
|
||||
"<br/><br/><i>Threshold</i> - Enchanted creature gets +3/+0 as long as seven or more cards are in your graveyard."));
|
||||
"<i>Threshold</i> - Enchanted creature gets +3/+0 as long as seven or more cards are in your graveyard"));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -38,8 +38,8 @@ import mage.cards.CardImpl;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
|
@ -51,8 +51,8 @@ import mage.target.common.TargetControlledPermanent;
|
|||
*/
|
||||
public class MagmaVein extends CardImpl<MagmaVein> {
|
||||
|
||||
private static final FilterPermanent filter1 = new FilterPermanent("creature without flying");
|
||||
private static final FilterControlledPermanent filter2 = new FilterControlledPermanent("land");
|
||||
private static final FilterCreaturePermanent filter1 = new FilterCreaturePermanent("creature without flying");
|
||||
private static final FilterControlledPermanent filter2 = new FilterControlledPermanent("a land");
|
||||
|
||||
static {
|
||||
filter1.add(Predicates.not(new AbilityPredicate(FlyingAbility.class)));
|
||||
|
|
|
@ -48,15 +48,13 @@ import mage.target.TargetSpell;
|
|||
*/
|
||||
public class MoltenInfluence extends CardImpl<MoltenInfluence> {
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell("instant or sorcery spell");
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell("instant or sorcery spell");
|
||||
static {
|
||||
Predicates.or(
|
||||
new CardTypePredicate(CardType.INSTANT),
|
||||
new CardTypePredicate(CardType.SORCERY));
|
||||
}
|
||||
|
||||
|
||||
public MoltenInfluence(UUID ownerId) {
|
||||
super(ownerId, 207, "Molten Influence", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{1}{R}");
|
||||
this.expansionSetCode = "ODY";
|
||||
|
@ -79,15 +77,14 @@ public class MoltenInfluence extends CardImpl<MoltenInfluence> {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
class MoltenInfluenceEffect extends OneShotEffect<MoltenInfluenceEffect> {
|
||||
|
||||
public MoltenInfluenceEffect() {
|
||||
super(Outcome.Detriment);
|
||||
this.staticText = "Counter target instant or sorcery spell unless its controller has Molten Influence deal 4 damage to him or her.";
|
||||
this.staticText = "Counter target instant or sorcery spell unless its controller has Molten Influence deal 4 damage to him or her";
|
||||
}
|
||||
|
||||
public MoltenInfluenceEffect(final MoltenInfluenceEffect effect){
|
||||
public MoltenInfluenceEffect(final MoltenInfluenceEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
|
@ -96,19 +93,18 @@ class MoltenInfluenceEffect extends OneShotEffect<MoltenInfluenceEffect> {
|
|||
return new MoltenInfluenceEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Spell spell = game.getStack().getSpell(source.getFirstTarget());
|
||||
if (spell!=null) {
|
||||
Player player = game.getPlayer(spell.getOwnerId());
|
||||
String message = "Have Molten Influence do 4 damage to you?";
|
||||
if (player.chooseUse(Outcome.Damage, message, game)){
|
||||
player.damage(4, source.getSourceId(), game, false, true);
|
||||
} else {
|
||||
spell.counter(source.getId(), game);
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Spell spell = game.getStack().getSpell(source.getFirstTarget());
|
||||
if (spell != null) {
|
||||
Player player = game.getPlayer(spell.getControllerId());
|
||||
String message = "Have Molten Influence do 4 damage to you?";
|
||||
if (player.chooseUse(Outcome.Damage, message, game)) {
|
||||
player.damage(4, source.getSourceId(), game, false, true);
|
||||
} else {
|
||||
spell.counter(source.getSourceId(), game);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -70,11 +70,11 @@ public class Mudhole extends CardImpl<Mudhole> {
|
|||
|
||||
class MudholeEffect extends OneShotEffect<MudholeEffect> {
|
||||
|
||||
private static final FilterCard filter = new FilterLandCard();
|
||||
private static final FilterCard filter = new FilterLandCard();
|
||||
|
||||
public MudholeEffect() {
|
||||
public MudholeEffect() {
|
||||
super(Outcome.Exile);
|
||||
staticText = "Target player exiles all land cards from his or her graveyard.";
|
||||
staticText = "Target player exiles all land cards from his or her graveyard";
|
||||
}
|
||||
|
||||
public MudholeEffect(final MudholeEffect effect) {
|
||||
|
@ -83,9 +83,9 @@ class MudholeEffect extends OneShotEffect<MudholeEffect> {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player targetPlayer = game.getPlayer(targetPointer.getFirst(game, source));
|
||||
Player targetPlayer = game.getPlayer(this.getTargetPointer().getFirst(game, source));
|
||||
if (targetPlayer != null) {
|
||||
for (Card card: targetPlayer.getGraveyard().getCards(filter, game)) {
|
||||
for (Card card : targetPlayer.getGraveyard().getCards(filter, game)) {
|
||||
card.moveToExile(null, "", source.getSourceId(), game);
|
||||
}
|
||||
return true;
|
||||
|
@ -97,5 +97,4 @@ class MudholeEffect extends OneShotEffect<MudholeEffect> {
|
|||
public MudholeEffect copy() {
|
||||
return new MudholeEffect(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -32,11 +32,14 @@ import mage.MageInt;
|
|||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DiesAndDealtDamageThisTurnTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.CardsInControllerGraveCondition;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.decorator.ConditionalActivatedAbility;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.effects.common.continious.SetCardColorSourceEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
|
@ -57,10 +60,9 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
public class RepentantVampire extends CardImpl<RepentantVampire> {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("black creature");
|
||||
|
||||
static {
|
||||
filter.add(new ColorPredicate(ObjectColor.BLACK));
|
||||
}
|
||||
static {
|
||||
filter.add(new ColorPredicate(ObjectColor.BLACK));
|
||||
}
|
||||
|
||||
public RepentantVampire(UUID ownerId) {
|
||||
super(ownerId, 157, "Repentant Vampire", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{B}{B}");
|
||||
|
@ -74,16 +76,21 @@ public class RepentantVampire extends CardImpl<RepentantVampire> {
|
|||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
// Whenever a creature dealt damage by Repentant Vampire this turn dies, put a +1/+1 counter on Repentant Vampire.
|
||||
this.addAbility(new DiesAndDealtDamageThisTurnTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false));
|
||||
this.addAbility(new DiesAndDealtDamageThisTurnTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false));
|
||||
// Threshold - As long as seven or more cards are in your graveyard, Repentant Vampire is white and has "{tap}: Destroy target black creature."
|
||||
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
|
||||
new DestroyTargetEffect(),
|
||||
new TapSourceCost(),
|
||||
new CardsInControllerGraveCondition(7),
|
||||
"<br/><br/><i>Threshold</i> - As long as seven or more cards are in your graveyard, Repentant Vampire is white and has \"{t}: Destroy target black creature.");
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
ability.addEffect(new ConditionalContinousEffect(new SetCardColorSourceEffect(ObjectColor.WHITE, Duration.EndOfGame), new CardsInControllerGraveCondition(7), ""));
|
||||
this.addAbility(ability);
|
||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(
|
||||
new SetCardColorSourceEffect(ObjectColor.WHITE, Duration.WhileOnBattlefield),
|
||||
new CardsInControllerGraveCondition(7),
|
||||
"<i>Threshold</i> - As long as seven or more cards are in your graveyard, {this} is white",
|
||||
false));
|
||||
Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new TapSourceCost());
|
||||
gainedAbility.addTarget(new TargetCreaturePermanent(filter));
|
||||
ability.addEffect(new ConditionalContinousEffect(
|
||||
new GainAbilitySourceEffect(gainedAbility, Duration.WhileOnBattlefield),
|
||||
new CardsInControllerGraveCondition(7),
|
||||
"and has \"{t}: Destroy target black creature.\"",
|
||||
false));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public RepentantVampire(final RepentantVampire card) {
|
||||
|
|
|
@ -37,8 +37,10 @@ import mage.cards.CardImpl;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -57,7 +59,9 @@ public class SadisticHypnotist extends CardImpl<SadisticHypnotist> {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// Sacrifice a creature: Target player discards two cards. Activate this ability only any time you could cast a sorcery.
|
||||
Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new DiscardTargetEffect(2), new SacrificeTargetCost(new TargetControlledCreaturePermanent(true)));
|
||||
TargetControlledPermanent target = new TargetControlledCreaturePermanent(1,1, new FilterControlledCreaturePermanent("a creature"), true);
|
||||
target.setRequired(true);
|
||||
Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new DiscardTargetEffect(2), new SacrificeTargetCost(target));
|
||||
ability.addTarget(new TargetPlayer(true));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -28,14 +28,13 @@
|
|||
package mage.sets.odyssey;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
@ -69,10 +68,8 @@ public class Standstill extends CardImpl<Standstill> {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
class SpellCastTriggeredAbility extends TriggeredAbilityImpl<SpellCastTriggeredAbility> {
|
||||
|
||||
|
||||
public SpellCastTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new StandstillEffect(), false);
|
||||
}
|
||||
|
@ -92,7 +89,7 @@ class SpellCastTriggeredAbility extends TriggeredAbilityImpl<SpellCastTriggeredA
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "When a player casts a spell, sacrifice Standstill. If you do, each of that player's opponents draws three cards";
|
||||
return "When a player casts a spell, sacrifice Standstill. If you do, each of that player's opponents draws three cards.";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -101,12 +98,11 @@ class SpellCastTriggeredAbility extends TriggeredAbilityImpl<SpellCastTriggeredA
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
class StandstillEffect extends OneShotEffect<StandstillEffect> {
|
||||
|
||||
public StandstillEffect() {
|
||||
super(Outcome.Sacrifice);
|
||||
staticText = "sacrifice {this}";
|
||||
staticText = "sacrifice {this}. If you do, each of that player's opponents draws three cards";
|
||||
}
|
||||
|
||||
public StandstillEffect(final StandstillEffect effect) {
|
||||
|
@ -122,18 +118,16 @@ class StandstillEffect extends OneShotEffect<StandstillEffect> {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (permanent != null) {
|
||||
if(permanent.sacrifice(source.getSourceId(), game)){
|
||||
for(UUID uuid : game.getOpponents(this.getTargetPointer().getFirst(game, source))){
|
||||
if (permanent.sacrifice(source.getSourceId(), game)) {
|
||||
for (UUID uuid : game.getOpponents(this.getTargetPointer().getFirst(game, source))) {
|
||||
Player player = game.getPlayer(uuid);
|
||||
if(player != null){
|
||||
if (player != null) {
|
||||
player.drawCards(3, game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ class TaintedPactEffect extends OneShotEffect<TaintedPactEffect>{
|
|||
|
||||
public TaintedPactEffect() {
|
||||
super(Outcome.DrawCard);
|
||||
this.staticText = "Exile the top card of your library. You may put that card into your hand unless it has the same name as another card exiled this way. Repeat this process until you put a card into your hand or you exile two cards with the same name, whichever comes first.";
|
||||
this.staticText = "Exile the top card of your library. You may put that card into your hand unless it has the same name as another card exiled this way. Repeat this process until you put a card into your hand or you exile two cards with the same name, whichever comes first";
|
||||
}
|
||||
|
||||
public TaintedPactEffect(final TaintedPactEffect effect) {
|
||||
|
|
|
@ -72,15 +72,15 @@ public class Tombfire extends CardImpl<Tombfire> {
|
|||
|
||||
class TombfireEffect extends OneShotEffect<TombfireEffect> {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("flashback");
|
||||
private static final FilterCard filter = new FilterCard("cards with flashback");
|
||||
|
||||
static{
|
||||
static {
|
||||
filter.add(new AbilityPredicate(FlashbackAbility.class));
|
||||
}
|
||||
|
||||
public TombfireEffect() {
|
||||
super(Outcome.Exile);
|
||||
staticText = "Target player exiles all cards with flashback from his or her graveyard.";
|
||||
staticText = "Target player exiles all cards with flashback from his or her graveyard";
|
||||
}
|
||||
|
||||
public TombfireEffect(final TombfireEffect effect) {
|
||||
|
@ -91,19 +91,17 @@ private static final FilterCard filter = new FilterCard("flashback");
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Player targetPlayer = game.getPlayer(targetPointer.getFirst(game, source));
|
||||
if (targetPlayer != null) {
|
||||
for (Card card: targetPlayer.getGraveyard().getCards(filter, game)) {
|
||||
card.moveToExile(null, "", source.getSourceId(), game);
|
||||
for (Card card : targetPlayer.getGraveyard().getCards(filter, game)) {
|
||||
card.moveToExile(null, "", source.getSourceId(), game);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public TombfireEffect copy() {
|
||||
return new TombfireEffect(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -27,25 +27,29 @@
|
|||
*/
|
||||
package mage.sets.odyssey;
|
||||
|
||||
import mage.constants.*;
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.DiscardTargetCost;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continious.SetCardColorTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.choices.ChoiceColor;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author magenoxx_at_gmail.com
|
||||
*/
|
||||
|
@ -61,7 +65,9 @@ public class WildMongrel extends CardImpl<WildMongrel> {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// Discard a card: Wild Mongrel gets +1/+1 and becomes the color of your choice until end of turn.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.EndOfTurn), new DiscardTargetCost(new TargetCardInHand()));
|
||||
Effect effect = new BoostSourceEffect(1, 1, Duration.EndOfTurn);
|
||||
effect.setText("{this} gets +1/+1");
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new DiscardTargetCost(new TargetCardInHand()));
|
||||
ability.addEffect(new ChangeColorEffect());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
@ -80,7 +86,7 @@ class ChangeColorEffect extends OneShotEffect<ChangeColorEffect> {
|
|||
|
||||
public ChangeColorEffect() {
|
||||
super(Outcome.Neutral);
|
||||
staticText = "becomes the color of your choice until end of turn";
|
||||
staticText = "and becomes the color of your choice until end of turn";
|
||||
}
|
||||
|
||||
public ChangeColorEffect(final ChangeColorEffect effect) {
|
||||
|
|
|
@ -55,7 +55,6 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
public class ZombieAssassin extends CardImpl<ZombieAssassin> {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
|
||||
}
|
||||
|
@ -76,7 +75,8 @@ public class ZombieAssassin extends CardImpl<ZombieAssassin> {
|
|||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(true), new TapSourceCost());
|
||||
Target target = new TargetCreaturePermanent(filter);
|
||||
target.setRequired(true);
|
||||
ability.addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(2,2,new FilterCard("two cards from your graveyard"))));
|
||||
ability.addTarget(target);
|
||||
ability.addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(2,2,new FilterCard("cards from your graveyard"))));
|
||||
ability.addCost(new ExileSourceCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -38,6 +38,7 @@ import mage.constants.Rarity;
|
|||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
|
@ -72,7 +73,7 @@ public class EssenceSliver extends CardImpl<EssenceSliver> {
|
|||
|
||||
class DealsDamageTriggeredAbility extends TriggeredAbilityImpl<DealsDamageTriggeredAbility> {
|
||||
|
||||
private boolean setTargetPointer;
|
||||
private boolean setTargetPointer;
|
||||
|
||||
public DealsDamageTriggeredAbility(Effect effect, boolean optional, boolean setTargetPointer) {
|
||||
super(Zone.BATTLEFIELD, effect, optional);
|
||||
|
@ -80,37 +81,37 @@ class DealsDamageTriggeredAbility extends TriggeredAbilityImpl<DealsDamageTrigge
|
|||
}
|
||||
|
||||
public DealsDamageTriggeredAbility(final DealsDamageTriggeredAbility ability) {
|
||||
super(ability);
|
||||
this.setTargetPointer = ability.setTargetPointer;
|
||||
super(ability);
|
||||
this.setTargetPointer = ability.setTargetPointer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DealsDamageTriggeredAbility copy() {
|
||||
return new DealsDamageTriggeredAbility(this);
|
||||
return new DealsDamageTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.DAMAGED_CREATURE ||
|
||||
event.getType() == GameEvent.EventType.DAMAGED_PLAYER ||
|
||||
event.getType() == GameEvent.EventType.DAMAGED_PLANESWALKER) {
|
||||
if (game.getPermanent(event.getSourceId()).hasSubtype("Sliver")) {
|
||||
if (setTargetPointer) {
|
||||
for (Effect effect : this.getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(game.getControllerId(event.getSourceId())));
|
||||
effect.setValue("damage", event.getAmount());
|
||||
}
|
||||
}
|
||||
return true;
|
||||
if (event.getType() == GameEvent.EventType.DAMAGED_CREATURE
|
||||
|| event.getType() == GameEvent.EventType.DAMAGED_PLAYER
|
||||
|| event.getType() == GameEvent.EventType.DAMAGED_PLANESWALKER) {
|
||||
Permanent creature = game.getPermanent(event.getSourceId());
|
||||
if (creature != null && creature.hasSubtype("Sliver")) {
|
||||
if (setTargetPointer) {
|
||||
for (Effect effect : this.getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(game.getControllerId(event.getSourceId())));
|
||||
effect.setValue("damage", event.getAmount());
|
||||
}
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever a Sliver deals damage, its controller" + super.getRule();
|
||||
return "Whenever a Sliver deals damage, its controller" + super.getRule();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ public class FilterCreatureOrPlayer extends FilterImpl<Object> implements Filter
|
|||
protected FilterPlayer playerFilter;
|
||||
|
||||
public FilterCreatureOrPlayer() {
|
||||
this("player or creature");
|
||||
this("creature or player");
|
||||
}
|
||||
|
||||
public FilterCreatureOrPlayer(String name) {
|
||||
|
|
Loading…
Reference in a new issue