mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
[OTC] Implement Back in Town
This commit is contained in:
parent
ba853ba51a
commit
662c8cd0fa
2 changed files with 54 additions and 0 deletions
53
Mage.Sets/src/mage/cards/b/BackInTown.java
Normal file
53
Mage.Sets/src/mage/cards/b/BackInTown.java
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.OutlawPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
import mage.target.targetadjustment.TargetAdjuster;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class BackInTown extends CardImpl {
|
||||
|
||||
public BackInTown(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{2}{B}");
|
||||
|
||||
// Return X target outlaw creature cards from your graveyard to the battlefield.
|
||||
this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect()
|
||||
.setText("return X target outlaw creature cards from your graveyard to the battlefield"));
|
||||
this.getSpellAbility().setTargetAdjuster(BackInTownAdjuster.instance);
|
||||
}
|
||||
|
||||
private BackInTown(final BackInTown card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BackInTown copy() {
|
||||
return new BackInTown(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum BackInTownAdjuster implements TargetAdjuster {
|
||||
instance;
|
||||
private static final FilterCard filter = new FilterCard("outlaw cards");
|
||||
|
||||
static {
|
||||
filter.add(OutlawPredicate.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void adjustTargets(Ability ability, Game game) {
|
||||
ability.getTargets().clear();
|
||||
ability.addTarget(new TargetCardInYourGraveyard(ability.getManaCostsToPay().getX(), filter));
|
||||
}
|
||||
}
|
||||
|
|
@ -21,6 +21,7 @@ public final class OutlawsOfThunderJunctionCommander extends ExpansionSet {
|
|||
|
||||
cards.add(new SetCardInfo("Angel of Indemnity", 45, Rarity.RARE, mage.cards.a.AngelOfIndemnity.class));
|
||||
cards.add(new SetCardInfo("Angelic Sell-Sword", 10, Rarity.RARE, mage.cards.a.AngelicSellSword.class));
|
||||
cards.add(new SetCardInfo("Back in Town", 18, Rarity.RARE, mage.cards.b.BackInTown.class));
|
||||
cards.add(new SetCardInfo("Charred Graverobber", 19, Rarity.RARE, mage.cards.c.CharredGraverobber.class));
|
||||
cards.add(new SetCardInfo("Elemental Eruption", 27, Rarity.RARE, mage.cards.e.ElementalEruption.class));
|
||||
cards.add(new SetCardInfo("Leyline Dowser", 39, Rarity.RARE, mage.cards.l.LeylineDowser.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue