mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
[SNC] Implemented Buy Your Silence
This commit is contained in:
parent
be13f22435
commit
2415a1665b
2 changed files with 66 additions and 0 deletions
65
Mage.Sets/src/mage/cards/b/BuyYourSilence.java
Normal file
65
Mage.Sets/src/mage/cards/b/BuyYourSilence.java
Normal file
|
@ -0,0 +1,65 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.ExileTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.TreasureToken;
|
||||
import mage.target.common.TargetNonlandPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class BuyYourSilence extends CardImpl {
|
||||
|
||||
public BuyYourSilence(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{W}");
|
||||
|
||||
// Exile target nonland permanent. Its controller creates a Treasure token.
|
||||
this.getSpellAbility().addEffect(new ExileTargetEffect());
|
||||
this.getSpellAbility().addEffect(new BuyYourSilenceEffect());
|
||||
this.getSpellAbility().addTarget(new TargetNonlandPermanent());
|
||||
}
|
||||
|
||||
private BuyYourSilence(final BuyYourSilence card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BuyYourSilence copy() {
|
||||
return new BuyYourSilence(this);
|
||||
}
|
||||
}
|
||||
|
||||
class BuyYourSilenceEffect extends OneShotEffect {
|
||||
|
||||
BuyYourSilenceEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "Its controller creates a Treasure token";
|
||||
}
|
||||
|
||||
private BuyYourSilenceEffect(final BuyYourSilenceEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BuyYourSilenceEffect copy() {
|
||||
return new BuyYourSilenceEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = getTargetPointer().getFirstTargetPermanentOrLKI(game, source);
|
||||
if (permanent == null) {
|
||||
return false;
|
||||
}
|
||||
return new TreasureToken().putOntoBattlefield(1, game, source, permanent.getControllerId());
|
||||
}
|
||||
}
|
|
@ -36,6 +36,7 @@ public final class StreetsOfNewCapenna extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Brazen Upstart", 169, Rarity.UNCOMMON, mage.cards.b.BrazenUpstart.class));
|
||||
cards.add(new SetCardInfo("Brokers Ascendancy", 170, Rarity.RARE, mage.cards.b.BrokersAscendancy.class));
|
||||
cards.add(new SetCardInfo("Brokers Charm", 171, Rarity.UNCOMMON, mage.cards.b.BrokersCharm.class));
|
||||
cards.add(new SetCardInfo("Buy Your Silence", 6, Rarity.COMMON, mage.cards.b.BuyYourSilence.class));
|
||||
cards.add(new SetCardInfo("Cabaretti Charm", 173, Rarity.UNCOMMON, mage.cards.c.CabarettiCharm.class));
|
||||
cards.add(new SetCardInfo("Ceremonial Groundbreaker", 175, Rarity.UNCOMMON, mage.cards.c.CeremonialGroundbreaker.class));
|
||||
cards.add(new SetCardInfo("Chrome Cat", 236, Rarity.COMMON, mage.cards.c.ChromeCat.class));
|
||||
|
|
Loading…
Reference in a new issue