mirror of
https://github.com/correl/mage.git
synced 2025-01-13 11:01:58 +00:00
- Prophecy Set 100%. Added Search for Survivors and Sheltering Prayers.
This commit is contained in:
parent
d6569b88a6
commit
83ca46610a
3 changed files with 362 additions and 173 deletions
89
Mage.Sets/src/mage/cards/s/SearchForSurvivors.java
Normal file
89
Mage.Sets/src/mage/cards/s/SearchForSurvivors.java
Normal file
|
@ -0,0 +1,89 @@
|
||||||
|
package mage.cards.s;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.cards.Card;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.Cards;
|
||||||
|
import mage.cards.CardsImpl;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.FilterCard;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.players.Player;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jeffwadsworth
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
The card is chosen at random, so the computer just picks a card at random from
|
||||||
|
the controller's graveyard. Devs, feel free to set up something else...
|
||||||
|
*/
|
||||||
|
public final class SearchForSurvivors extends CardImpl {
|
||||||
|
|
||||||
|
public SearchForSurvivors(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{R}");
|
||||||
|
|
||||||
|
// Reorder your graveyard at random. An opponent chooses a card at random in your graveyard. If it's a creature card, put it onto the battlefield. Otherwise, exile it.
|
||||||
|
this.getSpellAbility().addEffect(new SearchForSurvivorsEffect());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public SearchForSurvivors(final SearchForSurvivors card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SearchForSurvivors copy() {
|
||||||
|
return new SearchForSurvivors(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class SearchForSurvivorsEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
public SearchForSurvivorsEffect() {
|
||||||
|
super(Outcome.PutCardInPlay);
|
||||||
|
this.staticText = "Reorder your graveyard at random."
|
||||||
|
+ "An opponent chooses a card at random in your graveyard."
|
||||||
|
+ "If it's a creature card, put it onto the battlefield."
|
||||||
|
+ "Otherwise, exile it";
|
||||||
|
}
|
||||||
|
|
||||||
|
public SearchForSurvivorsEffect(final SearchForSurvivorsEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SearchForSurvivorsEffect copy() {
|
||||||
|
return new SearchForSurvivorsEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
if (controller != null) {
|
||||||
|
game.informPlayers("A card will be chosen at random from the controller's graveyard. "
|
||||||
|
+ "The result is essentially the same as the card rule");
|
||||||
|
Cards cards = new CardsImpl();
|
||||||
|
for (Card card : controller.getGraveyard().getCards(new FilterCard(), game)) {
|
||||||
|
cards.add(card);
|
||||||
|
}
|
||||||
|
if (!cards.isEmpty()) {
|
||||||
|
Card card = cards.getRandom(game);
|
||||||
|
controller.revealCards(source, cards, game);
|
||||||
|
if (card.isCreature()) {
|
||||||
|
controller.moveCards(card, Zone.BATTLEFIELD, source, game);
|
||||||
|
} else {
|
||||||
|
controller.moveCards(card, Zone.EXILED, source, game);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
98
Mage.Sets/src/mage/cards/s/ShelteringPrayers.java
Normal file
98
Mage.Sets/src/mage/cards/s/ShelteringPrayers.java
Normal file
|
@ -0,0 +1,98 @@
|
||||||
|
package mage.cards.s;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.effects.ContinuousEffectImpl;
|
||||||
|
import mage.abilities.keyword.ShroudAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.DependencyType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Layer;
|
||||||
|
import static mage.constants.Layer.AbilityAddingRemovingEffects_6;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.SubLayer;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.common.FilterLandPermanent;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.players.Player;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jeffwadsworth
|
||||||
|
*/
|
||||||
|
public final class ShelteringPrayers extends CardImpl {
|
||||||
|
|
||||||
|
public ShelteringPrayers(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{W}");
|
||||||
|
|
||||||
|
// Basic lands each player controls have shroud as long as that player controls three or fewer lands.
|
||||||
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ShelteringPrayersEffect()));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public ShelteringPrayers(final ShelteringPrayers card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ShelteringPrayers copy() {
|
||||||
|
return new ShelteringPrayers(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ShelteringPrayersEffect extends ContinuousEffectImpl {
|
||||||
|
|
||||||
|
public ShelteringPrayersEffect() {
|
||||||
|
super(Duration.WhileOnBattlefield, Outcome.AddAbility);
|
||||||
|
staticText = "Basic lands each player controls have shroud as long as that player controls three or fewer lands.";
|
||||||
|
dependencyTypes.add(DependencyType.AddingAbility);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public ShelteringPrayersEffect(final ShelteringPrayersEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ShelteringPrayersEffect copy() {
|
||||||
|
return new ShelteringPrayersEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
|
||||||
|
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
|
||||||
|
Player player = game.getPlayer(playerId);
|
||||||
|
if (player != null
|
||||||
|
&& game.getBattlefield().getAllActivePermanents(new FilterLandPermanent(), playerId, game).size() < 4) {
|
||||||
|
for (Permanent land : game.getBattlefield().getAllActivePermanents(new FilterLandPermanent(), playerId, game)) {
|
||||||
|
if (land != null
|
||||||
|
&& land.isBasic()) {
|
||||||
|
switch (layer) {
|
||||||
|
case AbilityAddingRemovingEffects_6:
|
||||||
|
if (sublayer == SubLayer.NA) {
|
||||||
|
land.getAbilities().add(ShroudAbility.getInstance());
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasLayer(Layer layer) {
|
||||||
|
return Layer.AbilityAddingRemovingEffects_6 == layer;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -130,7 +130,9 @@ public final class Prophecy extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Root Cage", 122, Rarity.UNCOMMON, mage.cards.r.RootCage.class));
|
cards.add(new SetCardInfo("Root Cage", 122, Rarity.UNCOMMON, mage.cards.r.RootCage.class));
|
||||||
cards.add(new SetCardInfo("Samite Sanctuary", 21, Rarity.RARE, mage.cards.s.SamiteSanctuary.class));
|
cards.add(new SetCardInfo("Samite Sanctuary", 21, Rarity.RARE, mage.cards.s.SamiteSanctuary.class));
|
||||||
cards.add(new SetCardInfo("Scoria Cat", 101, Rarity.UNCOMMON, mage.cards.s.ScoriaCat.class));
|
cards.add(new SetCardInfo("Scoria Cat", 101, Rarity.UNCOMMON, mage.cards.s.ScoriaCat.class));
|
||||||
|
cards.add(new SetCardInfo("Search for Survivors", 102, Rarity.RARE, mage.cards.s.SearchForSurvivors.class));
|
||||||
cards.add(new SetCardInfo("Searing Wind", 103, Rarity.RARE, mage.cards.s.SearingWind.class));
|
cards.add(new SetCardInfo("Searing Wind", 103, Rarity.RARE, mage.cards.s.SearingWind.class));
|
||||||
|
cards.add(new SetCardInfo("Sheltering Prayers", 22, Rarity.RARE, mage.cards.s.ShelteringPrayers.class));
|
||||||
cards.add(new SetCardInfo("Shield Dancer", 23, Rarity.UNCOMMON, mage.cards.s.ShieldDancer.class));
|
cards.add(new SetCardInfo("Shield Dancer", 23, Rarity.UNCOMMON, mage.cards.s.ShieldDancer.class));
|
||||||
cards.add(new SetCardInfo("Shrouded Serpent", 47, Rarity.RARE, mage.cards.s.ShroudedSerpent.class));
|
cards.add(new SetCardInfo("Shrouded Serpent", 47, Rarity.RARE, mage.cards.s.ShroudedSerpent.class));
|
||||||
cards.add(new SetCardInfo("Silt Crawler", 123, Rarity.COMMON, mage.cards.s.SiltCrawler.class));
|
cards.add(new SetCardInfo("Silt Crawler", 123, Rarity.COMMON, mage.cards.s.SiltCrawler.class));
|
||||||
|
|
Loading…
Reference in a new issue