Skip to content

Commit

Permalink
[DSK] Implement Living Phone
Browse files Browse the repository at this point in the history
  • Loading branch information
theelk801 committed Sep 12, 2024
1 parent 10ad118 commit 9736a49
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
50 changes: 50 additions & 0 deletions Mage.Sets/src/mage/cards/l/LivingPhone.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package mage.cards.l;

import mage.MageInt;
import mage.abilities.common.DiesSourceTriggeredAbility;
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.PutCards;
import mage.constants.SubType;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.mageobject.PowerPredicate;

import java.util.UUID;

/**
* @author TheElk801
*/
public final class LivingPhone extends CardImpl {

private static final FilterCard filter = new FilterCreatureCard("a creature card with power 2 or less");

static {
filter.add(new PowerPredicate(ComparisonType.FEWER_THAN, 3));
}

public LivingPhone(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}{W}");

this.subtype.add(SubType.TOY);
this.power = new MageInt(2);
this.toughness = new MageInt(1);

// When Living Phone dies, look at the top five cards of your library. You may reveal a creature card with power 2 or less from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
this.addAbility(new DiesSourceTriggeredAbility(new LookLibraryAndPickControllerEffect(
4, 1, filter, PutCards.HAND, PutCards.BOTTOM_RANDOM
)));
}

private LivingPhone(final LivingPhone card) {
super(card);
}

@Override
public LivingPhone copy() {
return new LivingPhone(this);
}
}
1 change: 1 addition & 0 deletions Mage.Sets/src/mage/sets/DuskmournHouseOfHorror.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ private DuskmournHouseOfHorror() {
cards.add(new SetCardInfo("Leyline of the Void", 106, Rarity.RARE, mage.cards.l.LeylineOfTheVoid.class));
cards.add(new SetCardInfo("Lionheart Glimmer", 19, Rarity.UNCOMMON, mage.cards.l.LionheartGlimmer.class));
cards.add(new SetCardInfo("Live or Die", 107, Rarity.UNCOMMON, mage.cards.l.LiveOrDie.class));
cards.add(new SetCardInfo("Living Phone", 20, Rarity.COMMON, mage.cards.l.LivingPhone.class));
cards.add(new SetCardInfo("Malevolent Chandelier", 252, Rarity.COMMON, mage.cards.m.MalevolentChandelier.class));
cards.add(new SetCardInfo("Manifest Dread", 189, Rarity.COMMON, mage.cards.m.ManifestDread.class));
cards.add(new SetCardInfo("Marina Vendrell's Grimoire", 64, Rarity.RARE, mage.cards.m.MarinaVendrellsGrimoire.class));
Expand Down

0 comments on commit 9736a49

Please sign in to comment.