Removed unnecessary custom text from some cards (opponent loses life and you gain life)

This commit is contained in:
Oleg Agafonov 2020-06-20 03:04:33 +04:00
parent 05950dcc2f
commit ff91ffe1a7
27 changed files with 122 additions and 264 deletions

View file

@ -1,7 +1,5 @@
package mage.cards.a; package mage.cards.a;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
@ -15,14 +13,15 @@ import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.target.common.TargetOpponent; import mage.target.common.TargetOpponent;
import java.util.UUID;
/** /**
*
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com) * @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
*/ */
public final class AbundantMaw extends CardImpl { public final class AbundantMaw extends CardImpl {
public AbundantMaw(UUID ownerId, CardSetInfo setInfo) { public AbundantMaw(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{8}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{8}");
this.subtype.add(SubType.ELDRAZI); this.subtype.add(SubType.ELDRAZI);
this.subtype.add(SubType.LEECH); this.subtype.add(SubType.LEECH);
this.power = new MageInt(6); this.power = new MageInt(6);
@ -30,11 +29,11 @@ public final class AbundantMaw extends CardImpl {
// Emerge {6}{B} // Emerge {6}{B}
this.addAbility(new EmergeAbility(this, new ManaCostsImpl<>("{6}{B}"))); this.addAbility(new EmergeAbility(this, new ManaCostsImpl<>("{6}{B}")));
// When you cast Abundant Maw, target opponent loses 3 life and you gain 3 life. // When you cast Abundant Maw, target opponent loses 3 life and you gain 3 life.
Ability ability = new CastSourceTriggeredAbility(new GainLifeEffect(3)); Ability ability = new CastSourceTriggeredAbility(new GainLifeEffect(3));
ability.addEffect(new LoseLifeTargetEffect(3).concatBy("and"));
ability.addTarget(new TargetOpponent()); ability.addTarget(new TargetOpponent());
ability.addEffect(new LoseLifeTargetEffect(3));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -1,9 +1,6 @@
package mage.cards.a; package mage.cards.a;
import java.util.UUID;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.abilities.effects.common.LoseLifeTargetEffect;
import mage.abilities.keyword.MadnessAbility; import mage.abilities.keyword.MadnessAbility;
@ -12,23 +9,20 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.target.common.TargetOpponent; import mage.target.common.TargetOpponent;
import java.util.UUID;
/** /**
*
* @author fireshoes * @author fireshoes
*/ */
public final class AlmsOfTheVein extends CardImpl { public final class AlmsOfTheVein extends CardImpl {
public AlmsOfTheVein(UUID ownerId, CardSetInfo setInfo) { public AlmsOfTheVein(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{B}"); super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}");
// Target opponent loses 3 life and you gain 3 life. // Target opponent loses 3 life and you gain 3 life.
Effect effect = new LoseLifeTargetEffect(3); this.getSpellAbility().addEffect(new LoseLifeTargetEffect(3));
effect.setText("Target opponent loses 3 life"); this.getSpellAbility().addEffect(new GainLifeEffect(3).concatBy("and"));
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetOpponent()); this.getSpellAbility().addTarget(new TargetOpponent());
effect = new GainLifeEffect(3);
effect.setText("and you gain 3 life");
this.getSpellAbility().addEffect(effect);
// Madness {B} // Madness {B}
this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{B}"))); this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{B}")));

View file

@ -1,7 +1,5 @@
package mage.cards.b; package mage.cards.b;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -15,8 +13,9 @@ import mage.constants.TargetController;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.target.common.TargetOpponent; import mage.target.common.TargetOpponent;
import java.util.UUID;
/** /**
*
* @author TheElk801 * @author TheElk801
*/ */
public final class BishopOfTheBloodstained extends CardImpl { public final class BishopOfTheBloodstained extends CardImpl {
@ -36,7 +35,7 @@ public final class BishopOfTheBloodstained extends CardImpl {
this.power = new MageInt(3); this.power = new MageInt(3);
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
// When Bishop of the Bloodstained enters the battlefield, target opponent loses 1 life for each vampire you control. // When Bishop of the Bloodstained enters the battlefield, target opponent loses 1 life for each Vampire you control.
Ability ability = new EntersBattlefieldTriggeredAbility(new LoseLifeTargetEffect(new PermanentsOnBattlefieldCount(filter))); Ability ability = new EntersBattlefieldTriggeredAbility(new LoseLifeTargetEffect(new PermanentsOnBattlefieldCount(filter)));
ability.addTarget(new TargetOpponent()); ability.addTarget(new TargetOpponent());
this.addAbility(ability); this.addAbility(ability);

View file

@ -1,7 +1,5 @@
package mage.cards.b; package mage.cards.b;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
@ -18,8 +16,9 @@ import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.target.common.TargetOpponent; import mage.target.common.TargetOpponent;
import java.util.UUID;
/** /**
*
* @author TheElk801 * @author TheElk801
*/ */
public final class BlightKeeper extends CardImpl { public final class BlightKeeper extends CardImpl {
@ -37,7 +36,7 @@ public final class BlightKeeper extends CardImpl {
// {7}{B}, {T}, Sacrifice Blight Keeper: Target opponent loses 4 life and you gain 4 life. // {7}{B}, {T}, Sacrifice Blight Keeper: Target opponent loses 4 life and you gain 4 life.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseLifeTargetEffect(4), new ManaCostsImpl("{7}{B}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseLifeTargetEffect(4), new ManaCostsImpl("{7}{B}"));
ability.addEffect(new GainLifeEffect(4).setText("and you gain 4 life")); ability.addEffect(new GainLifeEffect(4).concatBy("and"));
ability.addTarget(new TargetOpponent()); ability.addTarget(new TargetOpponent());
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeSourceCost()); ability.addCost(new SacrificeSourceCost());

View file

@ -1,7 +1,5 @@
package mage.cards.b; package mage.cards.b;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.condition.common.KickedCondition; import mage.abilities.condition.common.KickedCondition;
import mage.abilities.costs.common.TapTargetCost; import mage.abilities.costs.common.TapTargetCost;
@ -24,8 +22,9 @@ import mage.players.Player;
import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetOpponent; import mage.target.common.TargetOpponent;
import java.util.UUID;
/** /**
*
* @author North * @author North
*/ */
public final class BloodTribute extends CardImpl { public final class BloodTribute extends CardImpl {
@ -41,8 +40,8 @@ public final class BloodTribute extends CardImpl {
this.addAbility(new KickerAbility(new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, true)))); this.addAbility(new KickerAbility(new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, true))));
// Target opponent loses half their life, rounded up. // Target opponent loses half their life, rounded up.
this.getSpellAbility().addTarget(new TargetOpponent());
this.getSpellAbility().addEffect(new BloodTributeLoseLifeEffect()); this.getSpellAbility().addEffect(new BloodTributeLoseLifeEffect());
this.getSpellAbility().addTarget(new TargetOpponent());
// If Blood Tribute was kicked, you gain life equal to the life lost this way. // If Blood Tribute was kicked, you gain life equal to the life lost this way.
Effect effect = new ConditionalOneShotEffect( Effect effect = new ConditionalOneShotEffect(

View file

@ -1,21 +1,20 @@
package mage.cards.b; package mage.cards.b;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.abilities.effects.common.LoseLifeTargetEffect;
import mage.constants.SubType;
import mage.abilities.keyword.AssistAbility; import mage.abilities.keyword.AssistAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.target.common.TargetOpponent; import mage.target.common.TargetOpponent;
import java.util.UUID;
/** /**
*
* @author TheElk801 * @author TheElk801
*/ */
public final class BloodbornScoundrels extends CardImpl { public final class BloodbornScoundrels extends CardImpl {
@ -33,7 +32,7 @@ public final class BloodbornScoundrels extends CardImpl {
// When Bloodborn Scoundrels enters the battlefield, target opponent loses 2 life and you gain 2 life. // When Bloodborn Scoundrels enters the battlefield, target opponent loses 2 life and you gain 2 life.
Ability ability = new EntersBattlefieldTriggeredAbility(new LoseLifeTargetEffect(2)); Ability ability = new EntersBattlefieldTriggeredAbility(new LoseLifeTargetEffect(2));
ability.addEffect(new GainLifeEffect(2).setText("and you gain 2 life")); ability.addEffect(new GainLifeEffect(2).concatBy("and"));
ability.addTarget(new TargetOpponent()); ability.addTarget(new TargetOpponent());
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -1,7 +1,5 @@
package mage.cards.b; package mage.cards.b;
import java.util.UUID;
import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.abilities.effects.common.LoseLifeTargetEffect;
import mage.abilities.keyword.BuybackAbility; import mage.abilities.keyword.BuybackAbility;
@ -10,17 +8,19 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.target.common.TargetOpponent; import mage.target.common.TargetOpponent;
import java.util.UUID;
/** /**
*
* @author LoneFox * @author LoneFox
*/ */
public final class BrushWithDeath extends CardImpl { public final class BrushWithDeath extends CardImpl {
public BrushWithDeath(UUID ownerId, CardSetInfo setInfo) { public BrushWithDeath(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{B}"); super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}");
// Buyback {2}{B}{B} // Buyback {2}{B}{B}
this.addAbility(new BuybackAbility("{2}{B}{B}")); this.addAbility(new BuybackAbility("{2}{B}{B}"));
// Target opponent loses 2 life. You gain 2 life. // Target opponent loses 2 life. You gain 2 life.
this.getSpellAbility().addEffect(new LoseLifeTargetEffect(2)); this.getSpellAbility().addEffect(new LoseLifeTargetEffect(2));
this.getSpellAbility().addEffect(new GainLifeEffect(2)); this.getSpellAbility().addEffect(new GainLifeEffect(2));

View file

@ -1,7 +1,5 @@
package mage.cards.b; package mage.cards.b;
import java.util.UUID;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.abilities.effects.common.LoseLifeTargetEffect;
import mage.abilities.keyword.FlashbackAbility; import mage.abilities.keyword.FlashbackAbility;
@ -11,14 +9,15 @@ import mage.constants.CardType;
import mage.constants.TimingRule; import mage.constants.TimingRule;
import mage.target.common.TargetOpponent; import mage.target.common.TargetOpponent;
import java.util.UUID;
/** /**
* @author nantuko * @author nantuko
*/ */
public final class BumpInTheNight extends CardImpl { public final class BumpInTheNight extends CardImpl {
public BumpInTheNight(UUID ownerId, CardSetInfo setInfo) { public BumpInTheNight(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{B}"); super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{B}");
// Target opponent loses 3 life. // Target opponent loses 3 life.
this.getSpellAbility().addEffect(new LoseLifeTargetEffect(3)); this.getSpellAbility().addEffect(new LoseLifeTargetEffect(3));

View file

@ -3,7 +3,6 @@ package mage.cards.c;
import mage.abilities.Mode; import mage.abilities.Mode;
import mage.abilities.costs.Cost; import mage.abilities.costs.Cost;
import mage.abilities.costs.common.DiscardCardCost; import mage.abilities.costs.common.DiscardCardCost;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.abilities.effects.common.LoseLifeTargetEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.effects.common.continuous.BoostTargetEffect;
@ -15,11 +14,9 @@ import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.FilterPlayer;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.target.TargetPlayer;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import mage.target.common.TargetOpponent;
import java.util.UUID; import java.util.UUID;
@ -28,16 +25,11 @@ import java.util.UUID;
*/ */
public final class CollectiveBrutality extends CardImpl { public final class CollectiveBrutality extends CardImpl {
private static final FilterCard filter = new FilterCard("instant or sorcery card"); private static final FilterCard filter = new FilterCard("an instant or sorcery card");
private static final FilterPlayer filterDiscard = new FilterPlayer("opponent to discard");
private static final FilterCreaturePermanent filterCreatureMinus = new FilterCreaturePermanent("creature to get -2/-2");
private static final FilterPlayer filterLoseLife = new FilterPlayer("opponent to lose life");
static { static {
filter.add(Predicates.or(CardType.INSTANT.getPredicate(), filter.add(Predicates.or(CardType.INSTANT.getPredicate(),
CardType.SORCERY.getPredicate())); CardType.SORCERY.getPredicate()));
filterDiscard.add(TargetController.OPPONENT.getPlayerPredicate());
filterLoseLife.add(TargetController.OPPONENT.getPlayerPredicate());
} }
public CollectiveBrutality(UUID ownerId, CardSetInfo setInfo) { public CollectiveBrutality(UUID ownerId, CardSetInfo setInfo) {
@ -52,28 +44,21 @@ public final class CollectiveBrutality extends CardImpl {
this.getSpellAbility().getModes().setMinModes(1); this.getSpellAbility().getModes().setMinModes(1);
this.getSpellAbility().getModes().setMaxModes(3); this.getSpellAbility().getModes().setMaxModes(3);
// Target opponent reveals their hand. You choose an instant or sorcery card from it. That player discards that card.; // Target opponent reveals their hand. You choose an instant or sorcery card from it. That player discards that card.
Effect effect = new DiscardCardYouChooseTargetEffect(filter, TargetController.ANY); this.getSpellAbility().addEffect(new DiscardCardYouChooseTargetEffect(filter, TargetController.OPPONENT));
effect.setText("Target opponent reveals their hand. You choose an instant or sorcery card from it. That player discards that card"); this.getSpellAbility().addTarget(new TargetOpponent().withChooseHint("reveals hand, you choose to discard"));
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetPlayer(1, 1, false, filterDiscard).withChooseHint("reveals hand, you choose to discard"));
// Target creature gets -2/-2 until end of turn.; // Target creature gets -2/-2 until end of turn.
Mode mode = new Mode(); Mode mode = new Mode();
effect = new BoostTargetEffect(-2, -2, Duration.EndOfTurn); mode.addEffect(new BoostTargetEffect(-2, -2, Duration.EndOfTurn));
effect.setText("Target creature gets -2/-2 until end of turn"); mode.addTarget(new TargetCreaturePermanent().withChooseHint("gets -2/-2 until end of turn"));
mode.addEffect(effect);
mode.addTarget(new TargetCreaturePermanent(filterCreatureMinus).withChooseHint("gets -2/-2 until end of turn"));
this.getSpellAbility().addMode(mode); this.getSpellAbility().addMode(mode);
// Target opponent loses 2 life and you gain 2 life. // Target opponent loses 2 life and you gain 2 life.
mode = new Mode(); mode = new Mode();
effect = new LoseLifeTargetEffect(2); mode.addEffect(new LoseLifeTargetEffect(2));
effect.setText("Target opponent loses 2 life"); mode.addEffect(new GainLifeEffect(2).concatBy("and"));
mode.addEffect(effect); mode.addTarget(new TargetOpponent().withChooseHint("loses 2 life"));
mode.addTarget(new TargetPlayer(1, 1, false, filterLoseLife).withChooseHint("loses 2 life"));
effect = new GainLifeEffect(2);
mode.addEffect(effect.concatBy("and"));
this.getSpellAbility().addMode(mode); this.getSpellAbility().addMode(mode);
} }

View file

@ -1,11 +1,8 @@
package mage.cards.d; package mage.cards.d;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.abilities.effects.common.LoseLifeTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -14,24 +11,23 @@ import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.target.common.TargetOpponent; import mage.target.common.TargetOpponent;
import java.util.UUID;
/** /**
*
* @author fireshoes * @author fireshoes
*/ */
public final class DakmorGhoul extends CardImpl { public final class DakmorGhoul extends CardImpl {
public DakmorGhoul(UUID ownerId, CardSetInfo setInfo) { public DakmorGhoul(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}");
this.subtype.add(SubType.ZOMBIE); this.subtype.add(SubType.ZOMBIE);
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
// When Dakmor Ghoul enters the battlefield, target opponent loses 2 life and you gain 2 life. // When Dakmor Ghoul enters the battlefield, target opponent loses 2 life and you gain 2 life.
Effect effect = new GainLifeEffect(2);
effect.setText("and you gain 2 life");
Ability ability = new EntersBattlefieldTriggeredAbility(new LoseLifeTargetEffect(2), false); Ability ability = new EntersBattlefieldTriggeredAbility(new LoseLifeTargetEffect(2), false);
ability.addEffect(new GainLifeEffect(2).concatBy("and"));
ability.addTarget(new TargetOpponent()); ability.addTarget(new TargetOpponent());
ability.addEffect(effect);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -1,4 +1,3 @@
package mage.cards.d; package mage.cards.d;
import mage.MageInt; import mage.MageInt;
@ -6,7 +5,6 @@ import mage.abilities.Ability;
import mage.abilities.common.ActivateIfConditionActivatedAbility; import mage.abilities.common.ActivateIfConditionActivatedAbility;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.abilities.effects.common.LoseLifeTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -20,7 +18,6 @@ import mage.target.common.TargetOpponent;
import java.util.UUID; import java.util.UUID;
/** /**
*
* @author fireshoes * @author fireshoes
*/ */
public final class DesiccatedNaga extends CardImpl { public final class DesiccatedNaga extends CardImpl {
@ -44,10 +41,8 @@ public final class DesiccatedNaga extends CardImpl {
new LoseLifeTargetEffect(2), new LoseLifeTargetEffect(2),
new ManaCostsImpl("{3}{B}"), new ManaCostsImpl("{3}{B}"),
new PermanentsOnTheBattlefieldCondition(filter)); new PermanentsOnTheBattlefieldCondition(filter));
ability.addEffect(new GainLifeEffect(2).concatBy("and"));
ability.addTarget(new TargetOpponent()); ability.addTarget(new TargetOpponent());
Effect effect = new GainLifeEffect(2);
effect.setText("and you gain 2 life");
ability.addEffect(effect);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -1,7 +1,5 @@
package mage.cards.d; package mage.cards.d;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.TriggeredAbilityImpl; import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
@ -22,8 +20,9 @@ import mage.game.events.ZoneChangeEvent;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.target.common.TargetOpponent; import mage.target.common.TargetOpponent;
import java.util.UUID;
/** /**
*
* @author Loki * @author Loki
*/ */
public final class DiregrafCaptain extends CardImpl { public final class DiregrafCaptain extends CardImpl {
@ -35,16 +34,18 @@ public final class DiregrafCaptain extends CardImpl {
} }
public DiregrafCaptain(UUID ownerId, CardSetInfo setInfo) { public DiregrafCaptain(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{B}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{B}");
this.subtype.add(SubType.ZOMBIE); this.subtype.add(SubType.ZOMBIE);
this.subtype.add(SubType.SOLDIER); this.subtype.add(SubType.SOLDIER);
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
// Deathtouch
this.addAbility(DeathtouchAbility.getInstance()); this.addAbility(DeathtouchAbility.getInstance());
// Other Zombie creatures you control get +1/+1. // Other Zombie creatures you control get +1/+1.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter, true))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter, true)));
// Whenever another Zombie you control dies, target opponent loses 1 life. // Whenever another Zombie you control dies, target opponent loses 1 life.
this.addAbility(new DiregrafCaptainTriggeredAbility()); this.addAbility(new DiregrafCaptainTriggeredAbility());
} }
@ -84,12 +85,10 @@ class DiregrafCaptainTriggeredAbility extends TriggeredAbilityImpl {
@Override @Override
public boolean checkTrigger(GameEvent event, Game game) { public boolean checkTrigger(GameEvent event, Game game) {
if (!event.getTargetId().equals(this.getSourceId())) { if (!event.getTargetId().equals(this.getSourceId())) {
ZoneChangeEvent zEvent = (ZoneChangeEvent)event; ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
if (zEvent.isDiesEvent()) { if (zEvent.isDiesEvent()) {
Permanent p = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD); Permanent p = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD);
if (p != null && p.isControlledBy(this.controllerId) && filter.match(p, game)) { return p != null && p.isControlledBy(this.controllerId) && filter.match(p, game);
return true;
}
} }
} }
return false; return false;

View file

@ -1,26 +1,23 @@
package mage.cards.e; package mage.cards.e;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.Mode; import mage.abilities.Mode;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.ExileTargetEffect;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.LoseLifeTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.keyword.FearAbility; import mage.abilities.keyword.FearAbility;
import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.Outcome; import mage.filter.StaticFilters;
import mage.filter.FilterCard;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetCardInASingleGraveyard; import mage.target.common.TargetCardInASingleGraveyard;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import mage.target.common.TargetOpponent; import mage.target.common.TargetOpponent;
import java.util.UUID;
/** /**
*
* @author fireshoes * @author fireshoes
*/ */
public final class EbonyCharm extends CardImpl { public final class EbonyCharm extends CardImpl {
@ -29,13 +26,14 @@ public final class EbonyCharm extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}"); super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}");
// Choose one - Target opponent loses 1 life and you gain 1 life; // Choose one - Target opponent loses 1 life and you gain 1 life;
this.getSpellAbility().addEffect(new EbonyCharmDrainEffect()); this.getSpellAbility().addEffect(new LoseLifeTargetEffect(1));
this.getSpellAbility().addEffect(new GainLifeEffect(1).concatBy("and"));
this.getSpellAbility().addTarget(new TargetOpponent()); this.getSpellAbility().addTarget(new TargetOpponent());
// or exile up to three target cards from a single graveyard; // or exile up to three target cards from a single graveyard;
Mode mode = new Mode(); Mode mode = new Mode();
mode.addEffect(new EbonyCharmExileEffect()); mode.addEffect(new ExileTargetEffect());
mode.addTarget((new TargetCardInASingleGraveyard(0, 3, new FilterCard("up to three target cards from a single graveyard")))); mode.addTarget((new TargetCardInASingleGraveyard(0, 3, StaticFilters.FILTER_CARD_CARDS)));
this.getSpellAbility().addMode(mode); this.getSpellAbility().addMode(mode);
// or target creature gains fear until end of turn. // or target creature gains fear until end of turn.
@ -54,62 +52,3 @@ public final class EbonyCharm extends CardImpl {
return new EbonyCharm(this); return new EbonyCharm(this);
} }
} }
class EbonyCharmDrainEffect extends OneShotEffect {
EbonyCharmDrainEffect() {
super(Outcome.Damage);
staticText = "target opponent loses 1 life and you gain 1 life";
}
EbonyCharmDrainEffect(final EbonyCharmDrainEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
Player targetOpponent = game.getPlayer(source.getFirstTarget());
Player controller = game.getPlayer(source.getControllerId());
if (targetOpponent != null
&& controller != null) {
targetOpponent.loseLife(1, game, false);
controller.gainLife(1, game, source);
return true;
}
return false;
}
@Override
public EbonyCharmDrainEffect copy() {
return new EbonyCharmDrainEffect(this);
}
}
class EbonyCharmExileEffect extends OneShotEffect {
public EbonyCharmExileEffect() {
super(Outcome.Exile);
this.staticText = "Exile up to three target cards from a single graveyard";
}
public EbonyCharmExileEffect(final EbonyCharmExileEffect effect) {
super(effect);
}
@Override
public EbonyCharmExileEffect copy() {
return new EbonyCharmExileEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
for (UUID targetID : source.getTargets().get(0).getTargets()) {
Card card = game.getCard(targetID);
if (card != null) {
card.moveToExile(null, "", source.getSourceId(), game);
}
}
return true;
}
}

View file

@ -1,12 +1,9 @@
package mage.cards.e; package mage.cards.e;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
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.Effect;
import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.abilities.effects.common.LoseLifeTargetEffect;
import mage.abilities.keyword.DevoidAbility; import mage.abilities.keyword.DevoidAbility;
@ -17,14 +14,15 @@ import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.target.common.TargetOpponent; import mage.target.common.TargetOpponent;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class EssenceDepleter extends CardImpl { public final class EssenceDepleter extends CardImpl {
public EssenceDepleter(UUID ownerId, CardSetInfo setInfo) { public EssenceDepleter(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
this.subtype.add(SubType.ELDRAZI); this.subtype.add(SubType.ELDRAZI);
this.subtype.add(SubType.DRONE); this.subtype.add(SubType.DRONE);
this.power = new MageInt(2); this.power = new MageInt(2);
@ -35,9 +33,7 @@ public final class EssenceDepleter extends CardImpl {
// {1}{C}: Target opponent loses 1 life and you gain 1 life. // {1}{C}: Target opponent loses 1 life and you gain 1 life.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseLifeTargetEffect(1), new ManaCostsImpl("{1}{C}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseLifeTargetEffect(1), new ManaCostsImpl("{1}{C}"));
Effect effect = new GainLifeEffect(1); ability.addEffect(new GainLifeEffect(1).concatBy("and"));
effect.setText("and you gain 1 life");
ability.addEffect(effect);
ability.addTarget(new TargetOpponent()); ability.addTarget(new TargetOpponent());
this.addAbility(ability); this.addAbility(ability);

View file

@ -1,7 +1,5 @@
package mage.cards.g; package mage.cards.g;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.common.EntersBattlefieldTappedAbility;
@ -14,14 +12,15 @@ import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.target.common.TargetOpponent; import mage.target.common.TargetOpponent;
import java.util.UUID;
/** /**
*
* @author Loki * @author Loki
*/ */
public final class GeralfsMessenger extends CardImpl { public final class GeralfsMessenger extends CardImpl {
public GeralfsMessenger(UUID ownerId, CardSetInfo setInfo) { public GeralfsMessenger(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{B}{B}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{B}{B}");
this.subtype.add(SubType.ZOMBIE); this.subtype.add(SubType.ZOMBIE);
this.power = new MageInt(3); this.power = new MageInt(3);
@ -29,10 +28,12 @@ public final class GeralfsMessenger extends CardImpl {
// Geralf's Messenger enters the battlefield tapped. // Geralf's Messenger enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility()); this.addAbility(new EntersBattlefieldTappedAbility());
// When Geralf's Messenger enters the battlefield, target opponent loses 2 life. // When Geralf's Messenger enters the battlefield, target opponent loses 2 life.
Ability ability = new EntersBattlefieldTriggeredAbility(new LoseLifeTargetEffect(2)); Ability ability = new EntersBattlefieldTriggeredAbility(new LoseLifeTargetEffect(2));
ability.addTarget(new TargetOpponent()); ability.addTarget(new TargetOpponent());
this.addAbility(ability); this.addAbility(ability);
// Undying // Undying
this.addAbility(new UndyingAbility()); this.addAbility(new UndyingAbility());
} }

View file

@ -1,29 +1,28 @@
package mage.cards.g; package mage.cards.g;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.ExileReturnBattlefieldOwnerNextEndStepSourceEffect; import mage.abilities.effects.common.ExileReturnBattlefieldOwnerNextEndStepSourceEffect;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.LoseLifeTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.SuperType; import mage.constants.SuperType;
import mage.constants.Zone; import mage.constants.Zone;
import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetOpponent; import mage.target.common.TargetOpponent;
import java.util.UUID;
import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT;
/** /**
*
* @author Loki * @author Loki
*/ */
public final class GhostCouncilOfOrzhova extends CardImpl { public final class GhostCouncilOfOrzhova extends CardImpl {
@ -37,7 +36,8 @@ public final class GhostCouncilOfOrzhova extends CardImpl {
this.toughness = new MageInt(4); this.toughness = new MageInt(4);
// When Ghost Council of Orzhova enters the battlefield, target opponent loses 1 life and you gain 1 life. // When Ghost Council of Orzhova enters the battlefield, target opponent loses 1 life and you gain 1 life.
Ability ability = new EntersBattlefieldTriggeredAbility(new GhostCouncilOfOrzhovaEffect()); Ability ability = new EntersBattlefieldTriggeredAbility(new LoseLifeTargetEffect(1));
ability.addEffect(new GainLifeEffect(1).concatBy("and"));
ability.addTarget(new TargetOpponent()); ability.addTarget(new TargetOpponent());
this.addAbility(ability); this.addAbility(ability);
@ -62,34 +62,3 @@ public final class GhostCouncilOfOrzhova extends CardImpl {
} }
} }
class GhostCouncilOfOrzhovaEffect extends OneShotEffect {
GhostCouncilOfOrzhovaEffect() {
super(Outcome.GainLife);
staticText = "target opponent loses 1 life and you gain 1 life";
}
GhostCouncilOfOrzhovaEffect(final GhostCouncilOfOrzhovaEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
Player targetPlayer = game.getPlayer(source.getFirstTarget());
Player controller = game.getPlayer(source.getControllerId());
if (targetPlayer != null
&& controller != null) {
targetPlayer.loseLife(1, game, false);
controller.gainLife(1, game, source);
return true;
}
return false;
}
@Override
public GhostCouncilOfOrzhovaEffect copy() {
return new GhostCouncilOfOrzhovaEffect(this);
}
}

View file

@ -1,7 +1,5 @@
package mage.cards.h; package mage.cards.h;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.GainLifeEffect;
@ -13,8 +11,9 @@ import mage.constants.CardType;
import mage.target.Target; import mage.target.Target;
import mage.target.common.TargetOpponent; import mage.target.common.TargetOpponent;
import java.util.UUID;
/** /**
*
* @author TheElk801 * @author TheElk801
*/ */
public final class HierophantsChalice extends CardImpl { public final class HierophantsChalice extends CardImpl {
@ -24,7 +23,7 @@ public final class HierophantsChalice extends CardImpl {
// When Hierophant's Chalice enters the battlefield, target opponent loses 1 life and you gain 1 life. // When Hierophant's Chalice enters the battlefield, target opponent loses 1 life and you gain 1 life.
Ability ability = new EntersBattlefieldTriggeredAbility(new LoseLifeTargetEffect(1), false); Ability ability = new EntersBattlefieldTriggeredAbility(new LoseLifeTargetEffect(1), false);
ability.addEffect(new GainLifeEffect(1).setText("and you gain one life.")); ability.addEffect(new GainLifeEffect(1).concatBy("and"));
Target target = new TargetOpponent(); Target target = new TargetOpponent();
ability.addTarget(target); ability.addTarget(target);
this.addAbility(ability); this.addAbility(ability);

View file

@ -1,7 +1,5 @@
package mage.cards.n; package mage.cards.n;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.condition.common.HellbentCondition; import mage.abilities.condition.common.HellbentCondition;
@ -20,8 +18,9 @@ import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.target.common.TargetOpponent; import mage.target.common.TargetOpponent;
import java.util.UUID;
/** /**
*
* @author TheElk801 * @author TheElk801
*/ */
public final class NihilisticGlee extends CardImpl { public final class NihilisticGlee extends CardImpl {
@ -34,7 +33,7 @@ public final class NihilisticGlee extends CardImpl {
new LoseLifeTargetEffect(1), new LoseLifeTargetEffect(1),
new ManaCostsImpl("{2}{B}") new ManaCostsImpl("{2}{B}")
); );
ability.addEffect(new GainLifeEffect(1).setText("and you gain 1 life")); ability.addEffect(new GainLifeEffect(1).concatBy("and"));
ability.addCost(new DiscardCardCost()); ability.addCost(new DiscardCardCost());
ability.addTarget(new TargetOpponent()); ability.addTarget(new TargetOpponent());
this.addAbility(ability); this.addAbility(ability);

View file

@ -42,6 +42,7 @@ public final class ObzedatGhostCouncil extends CardImpl {
ability.addEffect(new GainLifeEffect(2).concatBy("and")); ability.addEffect(new GainLifeEffect(2).concatBy("and"));
ability.addTarget(new TargetOpponent()); ability.addTarget(new TargetOpponent());
this.addAbility(ability); this.addAbility(ability);
//At the beginning of your end step you may exile Obzedat. If you do, return it to the battlefield under its owner's //At the beginning of your end step you may exile Obzedat. If you do, return it to the battlefield under its owner's
//control at the beginning of your next upkeep. It gains haste. //control at the beginning of your next upkeep. It gains haste.
Ability ability2 = new BeginningOfYourEndStepTriggeredAbility(new ObzedatGhostCouncilExileSourceEffect(), true); Ability ability2 = new BeginningOfYourEndStepTriggeredAbility(new ObzedatGhostCouncilExileSourceEffect(), true);

View file

@ -1,7 +1,5 @@
package mage.cards.p; package mage.cards.p;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.abilities.effects.common.LoseLifeTargetEffect;
@ -16,20 +14,20 @@ import mage.players.Player;
import mage.target.common.TargetCardInHand; import mage.target.common.TargetCardInHand;
import mage.target.common.TargetOpponent; import mage.target.common.TargetOpponent;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class PryingQuestions extends CardImpl { public final class PryingQuestions extends CardImpl {
public PryingQuestions(UUID ownerId, CardSetInfo setInfo) { public PryingQuestions(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{B}"); super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}");
// Target opponent loses 3 life and puts a card from their hand on top of their library. // Target opponent loses 3 life and puts a card from their hand on top of their library.
this.getSpellAbility().addTarget(new TargetOpponent());
this.getSpellAbility().addEffect(new LoseLifeTargetEffect(3)); this.getSpellAbility().addEffect(new LoseLifeTargetEffect(3));
this.getSpellAbility().addEffect(new PryingQuestionsEffect()); this.getSpellAbility().addEffect(new PryingQuestionsEffect().concatBy("and"));
this.getSpellAbility().addTarget(new TargetOpponent());
} }
public PryingQuestions(final PryingQuestions card) { public PryingQuestions(final PryingQuestions card) {
@ -46,7 +44,7 @@ class PryingQuestionsEffect extends OneShotEffect {
public PryingQuestionsEffect() { public PryingQuestionsEffect() {
super(Outcome.Detriment); super(Outcome.Detriment);
this.staticText = "and puts a card from their hand on top of their library"; this.staticText = "puts a card from their hand on top of their library";
} }
public PryingQuestionsEffect(final PryingQuestionsEffect effect) { public PryingQuestionsEffect(final PryingQuestionsEffect effect) {

View file

@ -1,11 +1,8 @@
package mage.cards.q; package mage.cards.q;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.ExploitCreatureTriggeredAbility; import mage.abilities.common.ExploitCreatureTriggeredAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.abilities.effects.common.LoseLifeTargetEffect;
import mage.abilities.keyword.ExploitAbility; import mage.abilities.keyword.ExploitAbility;
@ -15,14 +12,15 @@ import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.target.common.TargetOpponent; import mage.target.common.TargetOpponent;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class QarsiSadist extends CardImpl { public final class QarsiSadist extends CardImpl {
public QarsiSadist(UUID ownerId, CardSetInfo setInfo) { public QarsiSadist(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");
this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.CLERIC); this.subtype.add(SubType.CLERIC);
this.power = new MageInt(1); this.power = new MageInt(1);
@ -30,12 +28,11 @@ public final class QarsiSadist extends CardImpl {
// Exploit // Exploit
this.addAbility(new ExploitAbility()); this.addAbility(new ExploitAbility());
// When Qarsi Sadist exploits a creature, target opponent loses 2 life and you gain 2 life. // When Qarsi Sadist exploits a creature, target opponent loses 2 life and you gain 2 life.
Ability ability = new ExploitCreatureTriggeredAbility(new LoseLifeTargetEffect(2), false); Ability ability = new ExploitCreatureTriggeredAbility(new LoseLifeTargetEffect(2), false);
ability.addEffect(new GainLifeEffect(2).concatBy("and"));
ability.addTarget(new TargetOpponent()); ability.addTarget(new TargetOpponent());
Effect effect = new GainLifeEffect(2);
effect.setText("and you gain 2 life");
ability.addEffect(effect);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -1,7 +1,5 @@
package mage.cards.s; package mage.cards.s;
import java.util.UUID;
import mage.abilities.TriggeredAbilityImpl; import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.abilities.effects.common.LoseLifeTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -13,15 +11,15 @@ import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType; import mage.game.events.GameEvent.EventType;
import mage.target.common.TargetOpponent; import mage.target.common.TargetOpponent;
import java.util.UUID;
/** /**
*
* @author North * @author North
*/ */
public final class SanguineBond extends CardImpl { public final class SanguineBond extends CardImpl {
public SanguineBond(UUID ownerId, CardSetInfo setInfo) { public SanguineBond(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{B}{B}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}{B}");
// Whenever you gain life, target opponent loses that much life. // Whenever you gain life, target opponent loses that much life.
SanguineBondTriggeredAbility ability = new SanguineBondTriggeredAbility(); SanguineBondTriggeredAbility ability = new SanguineBondTriggeredAbility();

View file

@ -1,7 +1,5 @@
package mage.cards.s; package mage.cards.s;
import java.util.UUID;
import mage.abilities.effects.common.CipherEffect; import mage.abilities.effects.common.CipherEffect;
import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.abilities.effects.common.LoseLifeTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -9,15 +7,15 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.target.common.TargetOpponent; import mage.target.common.TargetOpponent;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class ShadowSlice extends CardImpl { public final class ShadowSlice extends CardImpl {
public ShadowSlice (UUID ownerId, CardSetInfo setInfo) { public ShadowSlice(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{B}"); super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{B}");
// Target Opponent loses 3 life. // Target Opponent loses 3 life.
this.getSpellAbility().addEffect(new LoseLifeTargetEffect(3)); this.getSpellAbility().addEffect(new LoseLifeTargetEffect(3));
@ -33,7 +31,7 @@ public final class ShadowSlice extends CardImpl {
} }
@Override @Override
public ShadowSlice copy() { public ShadowSlice copy() {
return new ShadowSlice(this); return new ShadowSlice(this);
} }
} }

View file

@ -1,7 +1,5 @@
package mage.cards.s; package mage.cards.s;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -15,8 +13,9 @@ import mage.constants.SubType;
import mage.target.Target; import mage.target.Target;
import mage.target.common.TargetOpponent; import mage.target.common.TargetOpponent;
import java.util.UUID;
/** /**
*
* @author TheElk801 * @author TheElk801
*/ */
public final class SkymarchBloodletter extends CardImpl { public final class SkymarchBloodletter extends CardImpl {
@ -34,7 +33,7 @@ public final class SkymarchBloodletter extends CardImpl {
// When Skymarch Bloodletters enters the battlefield, target opponent loses 1 life and you gain 1 life. // When Skymarch Bloodletters enters the battlefield, target opponent loses 1 life and you gain 1 life.
Ability ability = new EntersBattlefieldTriggeredAbility(new LoseLifeTargetEffect(1), false); Ability ability = new EntersBattlefieldTriggeredAbility(new LoseLifeTargetEffect(1), false);
ability.addEffect(new GainLifeEffect(1).setText("and you gain 1 life")); ability.addEffect(new GainLifeEffect(1).concatBy("and"));
Target target = new TargetOpponent(); Target target = new TargetOpponent();
ability.addTarget(target); ability.addTarget(target);
this.addAbility(ability); this.addAbility(ability);

View file

@ -31,7 +31,7 @@ public final class VampireSovereign extends CardImpl {
// When Vampire Sovereign enters the battlefield, target opponent loses 3 life and you gain 3 life. // When Vampire Sovereign enters the battlefield, target opponent loses 3 life and you gain 3 life.
Ability ability = new EntersBattlefieldTriggeredAbility(new LoseLifeTargetEffect(3)); Ability ability = new EntersBattlefieldTriggeredAbility(new LoseLifeTargetEffect(3));
ability.addEffect(new GainLifeEffect(3).setText("and you gain 3 life")); ability.addEffect(new GainLifeEffect(3).concatBy("and"));
ability.addTarget(new TargetOpponent()); ability.addTarget(new TargetOpponent());
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -1,11 +1,8 @@
package mage.cards.w; package mage.cards.w;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.DiesThisOrAnotherCreatureTriggeredAbility; import mage.abilities.common.DiesThisOrAnotherCreatureTriggeredAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.abilities.effects.common.LoseLifeTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -16,8 +13,9 @@ import mage.constants.TargetController;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.target.common.TargetOpponent; import mage.target.common.TargetOpponent;
import java.util.UUID;
/** /**
*
* @author fireshoes * @author fireshoes
*/ */
public final class WaywardDisciple extends CardImpl { public final class WaywardDisciple extends CardImpl {
@ -29,7 +27,7 @@ public final class WaywardDisciple extends CardImpl {
} }
public WaywardDisciple(UUID ownerId, CardSetInfo setInfo) { public WaywardDisciple(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},""); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.CLERIC); this.subtype.add(SubType.CLERIC);
this.power = new MageInt(2); this.power = new MageInt(2);
@ -41,10 +39,8 @@ public final class WaywardDisciple extends CardImpl {
// Whenever Wayward Disciple or another creature you control dies, target opponent loses 1 life and you gain 1 life. // Whenever Wayward Disciple or another creature you control dies, target opponent loses 1 life and you gain 1 life.
Ability ability = new DiesThisOrAnotherCreatureTriggeredAbility(new LoseLifeTargetEffect(1), false, filter); Ability ability = new DiesThisOrAnotherCreatureTriggeredAbility(new LoseLifeTargetEffect(1), false, filter);
ability.addEffect(new GainLifeEffect(1).concatBy("and"));
ability.addTarget(new TargetOpponent()); ability.addTarget(new TargetOpponent());
Effect effect = new GainLifeEffect(1);
effect.setText("and you gain 1 life");
ability.addEffect(effect);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -985,13 +985,18 @@ public class VerifyCardDataTest {
System.out.println(); System.out.println();
System.out.println(card.getName() + " " + card.getManaCost().getText()); System.out.println(card.getName() + " " + card.getManaCost().getText());
if (card instanceof SplitCard) { if (card instanceof SplitCard) {
card.getAbilities().getRules(card.getName()).forEach(System.out::println); card.getAbilities().getRules(card.getName()).forEach(this::printAbilityText);
} else { } else {
card.getRules().forEach(System.out::println); card.getRules().forEach(this::printAbilityText);
} }
}); });
} }
private void printAbilityText(String text) {
text = text.replace("<br>", "\n");
System.out.println(text);
}
private void checkWrongAbilitiesText(Card card, JsonCard ref, int cardIndex) { private void checkWrongAbilitiesText(Card card, JsonCard ref, int cardIndex) {
// checks missing or wrong text // checks missing or wrong text
if (!card.getExpansionSetCode().equals(FULL_ABILITIES_CHECK_SET_CODE)) { if (!card.getExpansionSetCode().equals(FULL_ABILITIES_CHECK_SET_CODE)) {