mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
Implemented Ral's Dispersal
This commit is contained in:
parent
fffb299581
commit
84cff64b70
3 changed files with 50 additions and 2 deletions
44
Mage.Sets/src/mage/cards/r/RalsDispersal.java
Normal file
44
Mage.Sets/src/mage/cards/r/RalsDispersal.java
Normal file
|
@ -0,0 +1,44 @@
|
|||
package mage.cards.r;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.abilities.effects.common.search.SearchLibraryGraveyardPutInHandEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.NamePredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class RalsDispersal extends CardImpl {
|
||||
|
||||
private final static FilterCard filter = new FilterCard("Ral, Caller of Storms");
|
||||
|
||||
static {
|
||||
filter.add(new NamePredicate("Ral, Caller of Stormss"));
|
||||
}
|
||||
|
||||
public RalsDispersal(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{U}{U}");
|
||||
|
||||
// Return target creature to its owner's hand. You may search you library and/or graveyard for a card named Ral, Caller of Storms, reveal it, and put it in to your hand. If you search your library this way, shuffle it.
|
||||
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
|
||||
this.getSpellAbility().addEffect(
|
||||
new SearchLibraryGraveyardPutInHandEffect(filter, false, false)
|
||||
);
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
}
|
||||
|
||||
public RalsDispersal(final RalsDispersal card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RalsDispersal copy() {
|
||||
return new RalsDispersal(this);
|
||||
}
|
||||
}
|
|
@ -47,6 +47,7 @@ public final class GuildsOfRavnica extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Plains", 260, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Quasiduplicate", 51, Rarity.RARE, mage.cards.q.Quasiduplicate.class));
|
||||
cards.add(new SetCardInfo("Radical Idea", 52, Rarity.COMMON, mage.cards.r.RadicalIdea.class));
|
||||
cards.add(new SetCardInfo("Ral's Dispersal", 266, Rarity.RARE, mage.cards.r.RalsDispersal.class));
|
||||
cards.add(new SetCardInfo("Ral, Caller of Storms", 265, Rarity.MYTHIC, mage.cards.r.RalCallerOfStorms.class));
|
||||
cards.add(new SetCardInfo("Ral, Izzet Viceroy", 195, Rarity.MYTHIC, mage.cards.r.RalIzzetViceroy.class));
|
||||
cards.add(new SetCardInfo("Rosemane Centaur", 197, Rarity.COMMON, mage.cards.r.RosemaneCentaur.class));
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.abilities.effects.common.search;
|
||||
|
||||
import mage.MageObject;
|
||||
|
@ -28,10 +27,14 @@ public class SearchLibraryGraveyardPutInHandEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
public SearchLibraryGraveyardPutInHandEffect(FilterCard filter, boolean forceToSearchBoth) {
|
||||
this(filter, forceToSearchBoth, false);
|
||||
}
|
||||
|
||||
public SearchLibraryGraveyardPutInHandEffect(FilterCard filter, boolean forceToSearchBoth, boolean youMay) {
|
||||
super(Outcome.Benefit);
|
||||
this.filter = filter;
|
||||
this.forceToSearchBoth = forceToSearchBoth;
|
||||
staticText = "search your library and" + (forceToSearchBoth ? "" : "/or") + " graveyard for a card named " + filter.getMessage()
|
||||
staticText = (youMay ? "You may" : "") + "search your library and" + (forceToSearchBoth ? "" : "/or") + " graveyard for a card named " + filter.getMessage()
|
||||
+ ", reveal it, and put it into your hand. " + (forceToSearchBoth ? "Then shuffle your library" : "If you search your library this way, shuffle it");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue