mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
[Minor] Some rework of DrawDiscard effects.
This commit is contained in:
parent
03b5aea229
commit
e20b85b059
7 changed files with 16 additions and 55 deletions
|
@ -32,8 +32,7 @@ import java.util.UUID;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.DiscardControllerEffect;
|
||||
import mage.abilities.effects.common.DrawCardControllerEffect;
|
||||
import mage.abilities.effects.common.DrawDiscardControllerEffect;
|
||||
import mage.abilities.keyword.FlashbackAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.TimingRule;
|
||||
|
@ -51,8 +50,7 @@ public class FaithlessLooting extends CardImpl<FaithlessLooting> {
|
|||
this.color.setRed(true);
|
||||
|
||||
// Draw two cards, then discard two cards.
|
||||
this.getSpellAbility().addEffect(new DrawCardControllerEffect(2));
|
||||
this.getSpellAbility().addEffect(new DiscardControllerEffect(2));
|
||||
this.getSpellAbility().addEffect(new DrawDiscardControllerEffect(2,2));
|
||||
// Flashback {2}{R}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{2}{R}"), TimingRule.SORCERY));
|
||||
}
|
||||
|
|
|
@ -27,13 +27,11 @@
|
|||
*/
|
||||
package mage.sets.odyssey;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.common.DrawDiscardControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.abilities.effects.common.DiscardControllerEffect;
|
||||
import mage.abilities.effects.common.DrawCardControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author magenoxx_at_gmail.com
|
||||
|
@ -47,8 +45,7 @@ public class CarefulStudy extends CardImpl<CarefulStudy> {
|
|||
this.color.setBlue(true);
|
||||
|
||||
// Draw two cards, then discard two cards.
|
||||
this.getSpellAbility().addEffect(new DrawCardControllerEffect(2));
|
||||
this.getSpellAbility().addEffect(new DiscardControllerEffect(2));
|
||||
this.getSpellAbility().addEffect(new DrawDiscardControllerEffect(2,2));
|
||||
}
|
||||
|
||||
public CarefulStudy(final CarefulStudy card) {
|
||||
|
|
|
@ -34,8 +34,7 @@ import mage.abilities.Mode;
|
|||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.CounterUnlessPaysEffect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.DiscardControllerEffect;
|
||||
import mage.abilities.effects.common.DrawCardControllerEffect;
|
||||
import mage.abilities.effects.common.DrawDiscardControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.Predicates;
|
||||
|
@ -73,8 +72,7 @@ public class IzzetCharm extends CardImpl<IzzetCharm> {
|
|||
|
||||
// or draw two cards, then discard two cards.
|
||||
mode = new Mode();
|
||||
mode.getEffects().add(new DrawCardControllerEffect(2));
|
||||
mode.getEffects().add(new DiscardControllerEffect(2));
|
||||
mode.getEffects().add(new DrawDiscardControllerEffect(2, 2));
|
||||
this.getSpellAbility().addMode(mode);
|
||||
}
|
||||
|
||||
|
|
|
@ -28,10 +28,9 @@
|
|||
package mage.sets.returntoravnica;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.common.DrawDiscardControllerEffect;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.abilities.effects.common.DiscardControllerEffect;
|
||||
import mage.abilities.effects.common.DrawCardControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
||||
/**
|
||||
|
@ -47,8 +46,7 @@ public class Thoughtflare extends CardImpl<Thoughtflare> {
|
|||
this.color.setRed(true);
|
||||
|
||||
// Draw four cards, then discard two cards.
|
||||
this.getSpellAbility().addEffect(new DrawCardControllerEffect(4));
|
||||
this.getSpellAbility().addEffect(new DiscardControllerEffect(2));
|
||||
this.getSpellAbility().addEffect(new DrawDiscardControllerEffect(4, 2));
|
||||
}
|
||||
|
||||
public Thoughtflare(final Thoughtflare card) {
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.util.UUID;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.abilities.effects.common.DiscardControllerEffect;
|
||||
import mage.abilities.effects.common.DrawCardControllerEffect;
|
||||
import mage.abilities.effects.common.DrawDiscardControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
||||
/**
|
||||
|
@ -47,8 +47,7 @@ public class Sift extends CardImpl<Sift> {
|
|||
this.color.setBlue(true);
|
||||
|
||||
// Draw three cards, then discard a card.
|
||||
this.getSpellAbility().addEffect(new DrawCardControllerEffect(3));
|
||||
this.getSpellAbility().addEffect(new DiscardControllerEffect(1));
|
||||
this.getSpellAbility().addEffect(new DrawDiscardControllerEffect(3,1));
|
||||
}
|
||||
|
||||
public Sift(final Sift card) {
|
||||
|
|
|
@ -28,10 +28,9 @@
|
|||
package mage.sets.urzaslegacy;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.common.DrawDiscardControllerEffect;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.abilities.effects.common.DiscardControllerEffect;
|
||||
import mage.abilities.effects.common.DrawCardControllerEffect;
|
||||
import mage.abilities.effects.common.UntapLandsEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
||||
|
@ -48,8 +47,7 @@ public class FranticSearch extends CardImpl<FranticSearch> {
|
|||
this.color.setBlue(true);
|
||||
|
||||
// Draw two cards, then discard two cards. Untap up to three lands.
|
||||
this.getSpellAbility().addEffect(new DrawCardControllerEffect(2));
|
||||
this.getSpellAbility().addEffect(new DiscardControllerEffect(2));
|
||||
this.getSpellAbility().addEffect(new DrawDiscardControllerEffect(2, 2));
|
||||
this.getSpellAbility().addEffect(new UntapLandsEffect(3));
|
||||
}
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ import mage.constants.Outcome;
|
|||
import mage.constants.Rarity;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DrawDiscardControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
@ -49,7 +50,7 @@ public class Catalog extends CardImpl<Catalog> {
|
|||
this.color.setBlue(true);
|
||||
|
||||
// Draw two cards, then discard a card.
|
||||
this.getSpellAbility().addEffect(new CatalogEffect());
|
||||
this.getSpellAbility().addEffect(new DrawDiscardControllerEffect(2,1));
|
||||
}
|
||||
|
||||
public Catalog(final Catalog card) {
|
||||
|
@ -61,31 +62,3 @@ public class Catalog extends CardImpl<Catalog> {
|
|||
return new Catalog(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CatalogEffect extends OneShotEffect<CatalogEffect> {
|
||||
|
||||
public CatalogEffect() {
|
||||
super(Outcome.DrawCard);
|
||||
this.staticText = "Draw two cards, then discard a card";
|
||||
}
|
||||
|
||||
public CatalogEffect(final CatalogEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CatalogEffect copy() {
|
||||
return new CatalogEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
player.drawCards(2, game);
|
||||
player.discard(1, source, game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue