[MID] Implemented Tainted Adversary

This commit is contained in:
Evan Kranzler 2021-09-06 20:23:48 -04:00
parent 693d40fabf
commit 65af9459a3
3 changed files with 105 additions and 0 deletions

View file

@ -0,0 +1,103 @@
package mage.cards.t;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.delayed.ReflexiveTriggeredAbility;
import mage.abilities.costs.Cost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.keyword.DeathtouchAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.counters.CounterType;
import mage.game.Game;
import mage.game.permanent.token.ZombieDecayedToken;
import mage.players.Player;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class TaintedAdversary extends CardImpl {
public TaintedAdversary(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");
this.subtype.add(SubType.ZOMBIE);
this.power = new MageInt(2);
this.toughness = new MageInt(3);
// Deathtouch
this.addAbility(DeathtouchAbility.getInstance());
// When Tainted Adversary enters the battlefield, you may pay {2}{B} any number of times. When you pay this cost one or more times, put that many +1/+1 counters on Tainted Adversary, then create twice that many black 2/2 Zombie creature tokens with decayed.
this.addAbility(new EntersBattlefieldTriggeredAbility(new TaintedAdversaryEffect()));
}
private TaintedAdversary(final TaintedAdversary card) {
super(card);
}
@Override
public TaintedAdversary copy() {
return new TaintedAdversary(this);
}
}
class TaintedAdversaryEffect extends OneShotEffect {
TaintedAdversaryEffect() {
super(Outcome.Benefit);
staticText = "you may pay {2}{B} any number of times. When you pay this cost " +
"one or more times, put that many +1/+1 counters on {this}, " +
"then create twice that many black 2/2 Zombie creature tokens with decayed";
}
private TaintedAdversaryEffect(final TaintedAdversaryEffect effect) {
super(effect);
}
@Override
public TaintedAdversaryEffect copy() {
return new TaintedAdversaryEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
Cost cost = new ManaCostsImpl<>("{2}{B}");
int amount = 0;
while (player.canRespond()) {
cost.clearPaid();
if (cost.canPay(source, source, source.getControllerId(), game)
&& player.chooseUse(
outcome, "Pay {2}{B}? You have paid this cost " +
amount + " time" + (amount != 1 ? "s" : ""), source, game
) && cost.pay(source, game, source, source.getControllerId(), false)) {
amount++;
}
break;
}
if (amount == 0) {
return false;
}
ReflexiveTriggeredAbility ability = new ReflexiveTriggeredAbility(
new AddCountersSourceEffect(CounterType.P1P1.createInstance(amount)),
false, "put that many +1/+1 counters on {this}, then create " +
"twice that many black 2/2 Zombie creature tokens with decayed"
);
ability.addEffect(new CreateTokenEffect(new ZombieDecayedToken(), 2 * amount));
game.fireReflexiveTriggeredAbility(ability, source);
return true;
}
}

View file

@ -88,6 +88,7 @@ public final class InnistradMidnightHunt extends ExpansionSet {
cards.add(new SetCardInfo("Stormrider Spirit", 79, Rarity.COMMON, mage.cards.s.StormriderSpirit.class)); cards.add(new SetCardInfo("Stormrider Spirit", 79, Rarity.COMMON, mage.cards.s.StormriderSpirit.class));
cards.add(new SetCardInfo("Sungold Barrage", 36, Rarity.COMMON, mage.cards.s.SungoldBarrage.class)); cards.add(new SetCardInfo("Sungold Barrage", 36, Rarity.COMMON, mage.cards.s.SungoldBarrage.class));
cards.add(new SetCardInfo("Swamp", 272, Rarity.LAND, mage.cards.basiclands.Swamp.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Swamp", 272, Rarity.LAND, mage.cards.basiclands.Swamp.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Tainted Adversary", 124, Rarity.MYTHIC, mage.cards.t.TaintedAdversary.class));
cards.add(new SetCardInfo("Tavern Ruffian", 163, Rarity.COMMON, mage.cards.t.TavernRuffian.class)); cards.add(new SetCardInfo("Tavern Ruffian", 163, Rarity.COMMON, mage.cards.t.TavernRuffian.class));
cards.add(new SetCardInfo("Tavern Smasher", 163, Rarity.COMMON, mage.cards.t.TavernSmasher.class)); cards.add(new SetCardInfo("Tavern Smasher", 163, Rarity.COMMON, mage.cards.t.TavernSmasher.class));
cards.add(new SetCardInfo("Thermo-Alchemist", 164, Rarity.UNCOMMON, mage.cards.t.ThermoAlchemist.class)); cards.add(new SetCardInfo("Thermo-Alchemist", 164, Rarity.UNCOMMON, mage.cards.t.ThermoAlchemist.class));

View file

@ -42208,6 +42208,7 @@ Graveyard Glutton|Innistrad: Midnight Hunt|104|R||Creature - Werewolf|4|4|Ward
Hobbling Zombie|Innistrad: Midnight Hunt|106|C|{2}{B}|Creature - Zombie|2|2|Deathtouch$When Hobbling Zombie dies, create a 2/2 black Zombie creature with decayed.| Hobbling Zombie|Innistrad: Midnight Hunt|106|C|{2}{B}|Creature - Zombie|2|2|Deathtouch$When Hobbling Zombie dies, create a 2/2 black Zombie creature with decayed.|
Infernal Grasp|Innistrad: Midnight Hunt|107|U|{1}{B}|Instant|||Destroy target creature. You lose 2 life.| Infernal Grasp|Innistrad: Midnight Hunt|107|U|{1}{B}|Instant|||Destroy target creature. You lose 2 life.|
Jadar, Ghoulcaller of Nephalia|Innistrad: Midnight Hunt|108|R|{1}{B}|Legendary Creature - Human Wizard|1|1|At the beginning of your end step, if you control no creatures with decayed, create a 2/2 black Zombie creature token with decayed.| Jadar, Ghoulcaller of Nephalia|Innistrad: Midnight Hunt|108|R|{1}{B}|Legendary Creature - Human Wizard|1|1|At the beginning of your end step, if you control no creatures with decayed, create a 2/2 black Zombie creature token with decayed.|
Tainted Adversary|Innistrad: Midnight Hunt|124|M|{1}{B}|Creature - Zombie|2|3|Deathtouch$When Tainted Adversary enters the battlefield, you may pay {2}{B} any number of times. When you pay this cost one or more times, put that many +1/+1 counters on Tainted Adversary, then create twice that many black 2/2 Zombie creature tokens with decayed.|
Brimstone Vandal|Innistrad: Midnight Hunt|130|C|{2}{R}|Creature - Devil|2|3|Menace$If it's neither day nor night, it becomes day as Brimstone Vandal enters the battlefield.$Whenever day becomes night or night becomes day, Brimstone Vandal deals 1 damage to each opponent.| Brimstone Vandal|Innistrad: Midnight Hunt|130|C|{2}{R}|Creature - Devil|2|3|Menace$If it's neither day nor night, it becomes day as Brimstone Vandal enters the battlefield.$Whenever day becomes night or night becomes day, Brimstone Vandal deals 1 damage to each opponent.|
Curse of Shaken Faith|Innistrad: Midnight Hunt|134|R|{1}{R}|Enchantment - Aura Curse|||Enchant player$Whenever enchanted player casts a spell other than the first spell they cast each turn or copies a spell, Curse of Shaken Faith deals 2 damage to them.| Curse of Shaken Faith|Innistrad: Midnight Hunt|134|R|{1}{R}|Enchantment - Aura Curse|||Enchant player$Whenever enchanted player casts a spell other than the first spell they cast each turn or copies a spell, Curse of Shaken Faith deals 2 damage to them.|
Famished Foragers|Innistrad: Midnight Hunt|138|C|{3}{R}|Creature - Vampire|4|3|When Famished Foragers enters the battlefield, if an opponent lost life this turn, add {R}{R}{R}.${2}{R}, Discard a card: Draw a card.| Famished Foragers|Innistrad: Midnight Hunt|138|C|{3}{R}|Creature - Vampire|4|3|When Famished Foragers enters the battlefield, if an opponent lost life this turn, add {R}{R}{R}.${2}{R}, Discard a card: Draw a card.|