Implemented Blood Curdle

This commit is contained in:
Evan Kranzler 2020-04-05 09:07:38 -04:00
parent 02f0a7ac14
commit 10814e4b4c
2 changed files with 78 additions and 0 deletions

View file

@ -0,0 +1,77 @@
package mage.cards.b;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.counters.CounterType;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.Target;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class BloodCurdle extends CardImpl {
public BloodCurdle(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{B}");
// Destroy target creature. Put a menace counter on a creature you control.
this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addEffect(new BloodCurdleEffect());
}
private BloodCurdle(final BloodCurdle card) {
super(card);
}
@Override
public BloodCurdle copy() {
return new BloodCurdle(this);
}
}
class BloodCurdleEffect extends OneShotEffect {
BloodCurdleEffect() {
super(Outcome.Benefit);
staticText = "Put a menace counter on a creature you control";
}
private BloodCurdleEffect(final BloodCurdleEffect effect) {
super(effect);
}
@Override
public BloodCurdleEffect copy() {
return new BloodCurdleEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
Target target = new TargetControlledCreaturePermanent();
target.setNotTarget(true);
if (!player.choose(outcome, target, source.getSourceId(), game)) {
return false;
}
Permanent permanent = game.getPermanent(target.getFirstTarget());
if (permanent == null) {
return false;
}
return permanent.addCounters(CounterType.MENACE.createInstance(), source, game);
}
}

View file

@ -28,6 +28,7 @@ public final class IkoriaLairOfBehemoths extends ExpansionSet {
this.hasBasicLands = false; // remove when basics are available
cards.add(new SetCardInfo("Bastion of Remembrance", 73, Rarity.UNCOMMON, mage.cards.b.BastionOfRemembrance.class));
cards.add(new SetCardInfo("Blood Curdle", 75, Rarity.COMMON, mage.cards.b.BloodCurdle.class));
cards.add(new SetCardInfo("Boon of the Wish-Giver", 43, Rarity.UNCOMMON, mage.cards.b.BoonOfTheWishGiver.class));
cards.add(new SetCardInfo("Bristling Boar", 146, Rarity.COMMON, mage.cards.b.BristlingBoar.class));
cards.add(new SetCardInfo("Cavern Whisperer", 79, Rarity.COMMON, mage.cards.c.CavernWhisperer.class));