[PIP] Implement Break Down

This commit is contained in:
theelk801 2024-02-23 09:55:25 -05:00
parent 8d2571d2fd
commit 7a27c01a41
4 changed files with 74 additions and 0 deletions

View file

@ -0,0 +1,36 @@
package mage.cards.b;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.StaticFilters;
import mage.game.permanent.token.JunkToken;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class BreakDown extends CardImpl {
public BreakDown(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}");
// Destroy target artifact or enchantment. Create a Junk token.
this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT));
this.getSpellAbility().addEffect(new CreateTokenEffect(new JunkToken()));
}
private BreakDown(final BreakDown card) {
super(card);
}
@Override
public BreakDown copy() {
return new BreakDown(this);
}
}

View file

@ -38,6 +38,7 @@ public final class Fallout extends ExpansionSet {
cards.add(new SetCardInfo("Blasphemous Act", 188, Rarity.RARE, mage.cards.b.BlasphemousAct.class));
cards.add(new SetCardInfo("Bloodforged Battle-Axe", 226, Rarity.RARE, mage.cards.b.BloodforgedBattleAxe.class));
cards.add(new SetCardInfo("Brass Knuckles", 227, Rarity.UNCOMMON, mage.cards.b.BrassKnuckles.class));
cards.add(new SetCardInfo("Break Down", 74, Rarity.UNCOMMON, mage.cards.b.BreakDown.class));
cards.add(new SetCardInfo("Buried Ruin", 254, Rarity.UNCOMMON, mage.cards.b.BuriedRuin.class));
cards.add(new SetCardInfo("Canopy Vista", 255, Rarity.RARE, mage.cards.c.CanopyVista.class));
cards.add(new SetCardInfo("Canyon Slough", 256, Rarity.RARE, mage.cards.c.CanyonSlough.class));

View file

@ -57,6 +57,7 @@ public enum SubType {
FORTIFICATION("Fortification", SubTypeSet.ArtifactType),
GOLD("Gold", SubTypeSet.ArtifactType),
INCUBATOR("Incubator", SubTypeSet.ArtifactType),
JUNK("Junk", SubTypeSet.ArtifactType),
MAP("Map", SubTypeSet.ArtifactType),
POWERSTONE("Powerstone", SubTypeSet.ArtifactType),
TREASURE("Treasure", SubTypeSet.ArtifactType),

View file

@ -0,0 +1,36 @@
package mage.game.permanent.token;
import mage.abilities.Ability;
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.ExileTopXMayPlayUntilEffect;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
/**
* @author TheElk801
*/
public final class JunkToken extends TokenImpl {
public JunkToken() {
super("Junk Token", "Junk token");
cardType.add(CardType.ARTIFACT);
subtype.add(SubType.JUNK);
Ability ability = new ActivateAsSorceryActivatedAbility(
new ExileTopXMayPlayUntilEffect(1, Duration.EndOfTurn), new TapSourceCost()
);
ability.addCost(new SacrificeSourceCost().setText("sacrifice this artifact"));
this.addAbility(ability);
}
private JunkToken(final JunkToken token) {
super(token);
}
public JunkToken copy() {
return new JunkToken(this);
}
}