mirror of
https://github.com/correl/mage.git
synced 2024-12-30 19:10:36 +00:00
Implemented Agonizing Remorse
This commit is contained in:
parent
49d7dfa411
commit
efc6ea155d
2 changed files with 93 additions and 0 deletions
92
Mage.Sets/src/mage/cards/a/AgonizingRemorse.java
Normal file
92
Mage.Sets/src/mage/cards/a/AgonizingRemorse.java
Normal file
|
@ -0,0 +1,92 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.Cards;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterNonlandCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
import mage.target.common.TargetCardInGraveyard;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class AgonizingRemorse extends CardImpl {
|
||||
|
||||
public AgonizingRemorse(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}");
|
||||
|
||||
// Target opponent reveals their hand. You choose a nonland card from it or a card from their graveyard. Exile that card. You lose 1 life.
|
||||
this.getSpellAbility().addEffect(new AgonizingRemorseEffect());
|
||||
this.getSpellAbility().addTarget(new TargetOpponent());
|
||||
}
|
||||
|
||||
private AgonizingRemorse(final AgonizingRemorse card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AgonizingRemorse copy() {
|
||||
return new AgonizingRemorse(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AgonizingRemorseEffect extends OneShotEffect {
|
||||
|
||||
AgonizingRemorseEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "Target opponent reveals their hand. You choose a nonland card from it " +
|
||||
"or a card from their graveyard. Exile that card. You lose 1 life.";
|
||||
}
|
||||
|
||||
private AgonizingRemorseEffect(final AgonizingRemorseEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AgonizingRemorseEffect copy() {
|
||||
return new AgonizingRemorseEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
Player opponent = game.getPlayer(source.getFirstTarget());
|
||||
if (controller == null || opponent == null) {
|
||||
return false;
|
||||
}
|
||||
opponent.revealCards(source, opponent.getHand(), game);
|
||||
TargetCard target;
|
||||
Cards cards;
|
||||
if (controller.chooseUse(outcome, "Exile a card from hand or graveyard?", null, "Hand", "Graveyard", source, game)) {
|
||||
target = new TargetCardInHand(new FilterNonlandCard("nonland card in " + opponent.getName() + "'s hand"));
|
||||
target.setNotTarget(true);
|
||||
cards = opponent.getHand();
|
||||
} else {
|
||||
target = new TargetCardInGraveyard(new FilterCard("card in " + opponent.getName() + "'s graveyard"));
|
||||
target.setNotTarget(true);
|
||||
cards = opponent.getGraveyard();
|
||||
}
|
||||
if (!controller.choose(outcome, cards, target, game)) {
|
||||
return true;
|
||||
}
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
if (card == null) {
|
||||
return true;
|
||||
}
|
||||
controller.moveCards(card, Zone.EXILED, source, game);
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -27,6 +27,7 @@ public final class TherosBeyondDeath extends ExpansionSet {
|
|||
this.maxCardNumberInBooster = 254;
|
||||
|
||||
cards.add(new SetCardInfo("Acolyte of Affliction", 206, Rarity.UNCOMMON, mage.cards.a.AcolyteOfAffliction.class));
|
||||
cards.add(new SetCardInfo("Agonizing Remorse", 83, Rarity.UNCOMMON, mage.cards.a.AgonizingRemorse.class));
|
||||
cards.add(new SetCardInfo("Alirios, Enraptured", 42, Rarity.UNCOMMON, mage.cards.a.AliriosEnraptured.class));
|
||||
cards.add(new SetCardInfo("Allure of the Unknown", 207, Rarity.RARE, mage.cards.a.AllureOfTheUnknown.class));
|
||||
cards.add(new SetCardInfo("Alseid of Life's Bounty", 1, Rarity.UNCOMMON, mage.cards.a.AlseidOfLifesBounty.class));
|
||||
|
|
Loading…
Reference in a new issue