mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 03:51:58 -08:00
Implemented Consign to the Pit
This commit is contained in:
parent
79722f7224
commit
29f38c752c
2 changed files with 70 additions and 0 deletions
69
Mage.Sets/src/mage/cards/c/ConsignToThePit.java
Normal file
69
Mage.Sets/src/mage/cards/c/ConsignToThePit.java
Normal file
|
|
@ -0,0 +1,69 @@
|
||||||
|
package mage.cards.c;
|
||||||
|
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
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.players.Player;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class ConsignToThePit extends CardImpl {
|
||||||
|
|
||||||
|
public ConsignToThePit(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{5}{B}");
|
||||||
|
|
||||||
|
// Destroy target creature. Consign to the Pit deals 2 damage to that creature's controller.
|
||||||
|
this.getSpellAbility().addEffect(new ConsignToThePitEffect());
|
||||||
|
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||||
|
}
|
||||||
|
|
||||||
|
private ConsignToThePit(final ConsignToThePit card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ConsignToThePit copy() {
|
||||||
|
return new ConsignToThePit(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ConsignToThePitEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
ConsignToThePitEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = "Destroy target creature. {this} deals 2 damage to that creature's controller.";
|
||||||
|
}
|
||||||
|
|
||||||
|
private ConsignToThePitEffect(final ConsignToThePitEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ConsignToThePitEffect copy() {
|
||||||
|
return new ConsignToThePitEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||||
|
if (permanent == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Player player = game.getPlayer(permanent.getControllerId());
|
||||||
|
if (player == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
permanent.destroy(source.getSourceId(), game, false);
|
||||||
|
player.damage(2, source.getSourceId(), game);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -76,6 +76,7 @@ public final class RavnicaAllegiance extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Combine Guildmage", 163, Rarity.UNCOMMON, mage.cards.c.CombineGuildmage.class));
|
cards.add(new SetCardInfo("Combine Guildmage", 163, Rarity.UNCOMMON, mage.cards.c.CombineGuildmage.class));
|
||||||
cards.add(new SetCardInfo("Consecrate // Consume", 224, Rarity.UNCOMMON, mage.cards.c.ConsecrateConsume.class));
|
cards.add(new SetCardInfo("Consecrate // Consume", 224, Rarity.UNCOMMON, mage.cards.c.ConsecrateConsume.class));
|
||||||
cards.add(new SetCardInfo("Concordia Pegasus", 7, Rarity.COMMON, mage.cards.c.ConcordiaPegasus.class));
|
cards.add(new SetCardInfo("Concordia Pegasus", 7, Rarity.COMMON, mage.cards.c.ConcordiaPegasus.class));
|
||||||
|
cards.add(new SetCardInfo("Consign to the Pit", 69, Rarity.COMMON, mage.cards.c.ConsignToThePit.class));
|
||||||
cards.add(new SetCardInfo("Coral Commando", 36, Rarity.COMMON, mage.cards.c.CoralCommando.class));
|
cards.add(new SetCardInfo("Coral Commando", 36, Rarity.COMMON, mage.cards.c.CoralCommando.class));
|
||||||
cards.add(new SetCardInfo("Cry of the Carnarium", 70, Rarity.UNCOMMON, mage.cards.c.CryOfTheCarnarium.class));
|
cards.add(new SetCardInfo("Cry of the Carnarium", 70, Rarity.UNCOMMON, mage.cards.c.CryOfTheCarnarium.class));
|
||||||
cards.add(new SetCardInfo("Cult Guildmage", 164, Rarity.UNCOMMON, mage.cards.c.CultGuildmage.class));
|
cards.add(new SetCardInfo("Cult Guildmage", 164, Rarity.UNCOMMON, mage.cards.c.CultGuildmage.class));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue