mirror of
https://github.com/correl/mage.git
synced 2024-11-16 03:00:12 +00:00
[AFR] Implemented Portable Hole
This commit is contained in:
parent
f8863c989e
commit
90a0d3e1f3
2 changed files with 56 additions and 0 deletions
55
Mage.Sets/src/mage/cards/p/PortableHole.java
Normal file
55
Mage.Sets/src/mage/cards/p/PortableHole.java
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
package mage.cards.p;
|
||||||
|
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.common.delayed.OnLeaveReturnExiledToBattlefieldAbility;
|
||||||
|
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
|
||||||
|
import mage.abilities.effects.common.ExileUntilSourceLeavesEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.ComparisonType;
|
||||||
|
import mage.constants.TargetController;
|
||||||
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.common.FilterNonlandPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class PortableHole extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterPermanent filter
|
||||||
|
= new FilterNonlandPermanent("nonland permanent an opponent controls with mana value 2 or less");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 3));
|
||||||
|
filter.add(TargetController.OPPONENT.getOwnerPredicate());
|
||||||
|
}
|
||||||
|
|
||||||
|
public PortableHole(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{W}");
|
||||||
|
|
||||||
|
// When Portable Hole enters the battlefield, exile target nonland permanent an opponent controls with mana value 2 or less until Portable Hole leaves the battlefield.
|
||||||
|
Ability ability = new EntersBattlefieldTriggeredAbility(
|
||||||
|
new ExileUntilSourceLeavesEffect("")
|
||||||
|
.setText("exile target nonland permanent an opponent controls with mana value 2 " +
|
||||||
|
"or less until {this} leaves the battlefield")
|
||||||
|
);
|
||||||
|
ability.addTarget(new TargetPermanent(filter));
|
||||||
|
ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new OnLeaveReturnExiledToBattlefieldAbility()));
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
private PortableHole(final PortableHole card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PortableHole copy() {
|
||||||
|
return new PortableHole(this);
|
||||||
|
}
|
||||||
|
}
|
|
@ -29,6 +29,7 @@ public final class AdventuresInTheForgottenRealms extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Island", 269, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS));
|
cards.add(new SetCardInfo("Island", 269, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS));
|
||||||
cards.add(new SetCardInfo("Mountain", 277, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
|
cards.add(new SetCardInfo("Mountain", 277, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
|
||||||
cards.add(new SetCardInfo("Plains", 265, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS));
|
cards.add(new SetCardInfo("Plains", 265, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS));
|
||||||
|
cards.add(new SetCardInfo("Portable Hole", 33, Rarity.COMMON, mage.cards.p.PortableHole.class));
|
||||||
cards.add(new SetCardInfo("Swamp", 273, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
|
cards.add(new SetCardInfo("Swamp", 273, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue