mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 12:02:01 -08:00
Implemented Scent of Nightshade
This commit is contained in:
parent
40836645e3
commit
a069f7a64f
2 changed files with 79 additions and 0 deletions
78
Mage.Sets/src/mage/cards/s/ScentOfNightshade.java
Normal file
78
Mage.Sets/src/mage/cards/s/ScentOfNightshade.java
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.common.RevealTargetFromHandCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ScentOfNightshade extends CardImpl {
|
||||
|
||||
public ScentOfNightshade(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}");
|
||||
|
||||
// Reveal any number of black cards in your hand. Target creature gets -X/-X until end of turn, where X is the number of cards revealed this way.
|
||||
this.getSpellAbility().addEffect(new ScentOfNightshadeEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
}
|
||||
|
||||
public ScentOfNightshade(final ScentOfNightshade card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ScentOfNightshade copy() {
|
||||
return new ScentOfNightshade(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ScentOfNightshadeEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("any number of black cards in your hand");
|
||||
|
||||
static {
|
||||
filter.add(new ColorPredicate(ObjectColor.BLACK));
|
||||
}
|
||||
|
||||
public ScentOfNightshadeEffect() {
|
||||
super(Outcome.Detriment);
|
||||
this.staticText = "reveal any number of black cards in your hand. "
|
||||
+ "Target creature gets -X/-X until end of turn, "
|
||||
+ "where X is the number of cards revealed this way";
|
||||
}
|
||||
|
||||
public ScentOfNightshadeEffect(final ScentOfNightshadeEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ScentOfNightshadeEffect copy() {
|
||||
return new ScentOfNightshadeEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
RevealTargetFromHandCost cost = new RevealTargetFromHandCost(new TargetCardInHand(0, Integer.MAX_VALUE, filter));
|
||||
if (!cost.pay(source, game, source.getSourceId(), source.getControllerId(), true)) {
|
||||
return false;
|
||||
}
|
||||
int xValue = -1 * cost.getNumberRevealedCards();
|
||||
game.addEffect(new BoostTargetEffect(xValue, xValue, Duration.EndOfTurn), source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -121,6 +121,7 @@ public final class UrzasDestiny extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Scent of Cinder", 96, Rarity.COMMON, mage.cards.s.ScentOfCinder.class));
|
||||
cards.add(new SetCardInfo("Scent of Ivy", 120, Rarity.COMMON, mage.cards.s.ScentOfIvy.class));
|
||||
cards.add(new SetCardInfo("Scent of Jasmine", 17, Rarity.COMMON, mage.cards.s.ScentOfJasmine.class));
|
||||
cards.add(new SetCardInfo("Scent of Nightshade", 69, Rarity.COMMON, mage.cards.s.ScentOfNightshade.class));
|
||||
cards.add(new SetCardInfo("Scour", 18, Rarity.UNCOMMON, mage.cards.s.Scour.class));
|
||||
cards.add(new SetCardInfo("Serra Advocate", 19, Rarity.UNCOMMON, mage.cards.s.SerraAdvocate.class));
|
||||
cards.add(new SetCardInfo("Sigil of Sleep", 46, Rarity.COMMON, mage.cards.s.SigilOfSleep.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue