mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
Implemented Mystic Sanctuary
This commit is contained in:
parent
dd93f29e46
commit
faa51b56e0
2 changed files with 76 additions and 0 deletions
75
Mage.Sets/src/mage/cards/m/MysticSanctuary.java
Normal file
75
Mage.Sets/src/mage/cards/m/MysticSanctuary.java
Normal file
|
@ -0,0 +1,75 @@
|
|||
package mage.cards.m;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.EntersBattlefieldUntappedTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.common.PutOnLibraryTargetEffect;
|
||||
import mage.abilities.effects.common.TapSourceEffect;
|
||||
import mage.abilities.mana.BlueManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.common.FilterInstantOrSorceryCard;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class MysticSanctuary extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter
|
||||
= new FilterControlledPermanent(SubType.ISLAND);
|
||||
private static final FilterCard filter2
|
||||
= new FilterInstantOrSorceryCard("instant or sorcery card from your graveyard");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
private static final Condition condition
|
||||
= new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.FEWER_THAN, 3);
|
||||
|
||||
public MysticSanctuary(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
|
||||
|
||||
this.subtype.add(SubType.ISLAND);
|
||||
|
||||
// ({T}: Add {U}.)
|
||||
this.addAbility(new BlueManaAbility());
|
||||
|
||||
// Mystic Sanctuary enters the battlefield tapped unless you control three or more other Islands.
|
||||
this.addAbility(new EntersBattlefieldAbility(
|
||||
new ConditionalOneShotEffect(new TapSourceEffect(), condition),
|
||||
"tapped unless you control three or more other Islands"
|
||||
));
|
||||
|
||||
// When Mystic Sanctuary enters the battlefield untapped, you may put target instant or sorcery card from your graveyard on top of your library.
|
||||
Ability ability = new EntersBattlefieldUntappedTriggeredAbility(
|
||||
new PutOnLibraryTargetEffect(true)
|
||||
.setText("put target instant or sorcery card from your graveyard on top of your library"),
|
||||
true
|
||||
);
|
||||
ability.addTarget(new TargetCardInYourGraveyard(filter2));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private MysticSanctuary(final MysticSanctuary card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MysticSanctuary copy() {
|
||||
return new MysticSanctuary(this);
|
||||
}
|
||||
}
|
|
@ -155,6 +155,7 @@ public final class ThroneOfEldraine extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Mirrormade", 55, Rarity.RARE, mage.cards.m.Mirrormade.class));
|
||||
cards.add(new SetCardInfo("Mistford River Turtle", 56, Rarity.COMMON, mage.cards.m.MistfordRiverTurtle.class));
|
||||
cards.add(new SetCardInfo("Murderous Rider", 97, Rarity.RARE, mage.cards.m.MurderousRider.class));
|
||||
cards.add(new SetCardInfo("Mystic Sanctuary", 247, Rarity.COMMON, mage.cards.m.MysticSanctuary.class));
|
||||
cards.add(new SetCardInfo("Mystical Dispute", 58, Rarity.UNCOMMON, mage.cards.m.MysticalDispute.class));
|
||||
cards.add(new SetCardInfo("Oakhame Adversary", 167, Rarity.UNCOMMON, mage.cards.o.OakhameAdversary.class));
|
||||
cards.add(new SetCardInfo("Oakhame Ranger", 212, Rarity.UNCOMMON, mage.cards.o.OakhameRanger.class));
|
||||
|
|
Loading…
Reference in a new issue