[LCC] Implement From the Rubble (#11592)

This commit is contained in:
jimga150 2023-12-31 14:25:10 -05:00 committed by GitHub
parent 53d62c7f44
commit 8459babbcd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 64 additions and 0 deletions

View file

@ -0,0 +1,63 @@
package mage.cards.f;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.common.AsEntersBattlefieldAbility;
import mage.abilities.common.BeginningOfYourEndStepTriggeredAbility;
import mage.abilities.effects.common.ChooseCreatureTypeEffect;
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldWithCounterTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.Outcome;
import mage.counters.CounterType;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.mageobject.ChosenSubtypePredicate;
import mage.filter.predicate.mageobject.ManaValuePredicate;
import mage.target.common.TargetCardInYourGraveyard;
/**
*
* @author jimga150
*/
public final class FromTheRubble extends CardImpl {
private static final FilterCreatureCard filter = new FilterCreatureCard(
"a creature card of the chosen type from your graveyard"
);
static {
filter.add(ChosenSubtypePredicate.TRUE);
}
public FromTheRubble(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{W}{W}");
// As From the Rubble enters the battlefield, choose a creature type.
this.addAbility(new AsEntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.PutCreatureInPlay)));
// At the beginning of your end step, return target creature card of the chosen type from your graveyard to
// the battlefield with a finality counter on it.
Ability ability = new BeginningOfYourEndStepTriggeredAbility(
new ReturnFromGraveyardToBattlefieldWithCounterTargetEffect(CounterType.FINALITY.createInstance()),
false
);
ability.addTarget(new TargetCardInYourGraveyard(filter));
this.addAbility(ability);
}
private FromTheRubble(final FromTheRubble card) {
super(card);
}
@Override
public FromTheRubble copy() {
return new FromTheRubble(this);
}
}

View file

@ -123,6 +123,7 @@ public final class LostCavernsOfIxalanCommander extends ExpansionSet {
cards.add(new SetCardInfo("Foreboding Ruins", 330, Rarity.RARE, mage.cards.f.ForebodingRuins.class));
cards.add(new SetCardInfo("Fortified Village", 331, Rarity.RARE, mage.cards.f.FortifiedVillage.class));
cards.add(new SetCardInfo("Francisco, Fowl Marauder", 49, Rarity.RARE, mage.cards.f.FranciscoFowlMarauder.class));
cards.add(new SetCardInfo("From the Rubble", 72, Rarity.RARE, mage.cards.f.FromTheRubble.class));
cards.add(new SetCardInfo("Frostboil Snarl", 332, Rarity.RARE, mage.cards.f.FrostboilSnarl.class));
cards.add(new SetCardInfo("Furycalm Snarl", 333, Rarity.RARE, mage.cards.f.FurycalmSnarl.class));
cards.add(new SetCardInfo("Game Trail", 334, Rarity.RARE, mage.cards.g.GameTrail.class));