forked from External/mage
Implement [CLU] Tribune Of Rot (#11839)
This commit is contained in:
parent
011ccec246
commit
5ae2244e2c
2 changed files with 83 additions and 0 deletions
82
Mage.Sets/src/mage/cards/t/TribuneOfRot.java
Normal file
82
Mage.Sets/src/mage/cards/t/TribuneOfRot.java
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
|
||||
package mage.cards.t;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.SaprolingToken;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author BenGiese22
|
||||
*/
|
||||
public final class TribuneOfRot extends CardImpl {
|
||||
|
||||
public TribuneOfRot(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B/G}{B/G}");
|
||||
|
||||
this.subtype.add(SubType.ELF);
|
||||
this.subtype.add(SubType.SHAMAN);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Whenever Tribune of Rot attacks, mill two cards. For each creature card milled this way, create a 1/1 green Saproling creature token.
|
||||
this.addAbility(new AttacksTriggeredAbility(new TribuneOfRotEffect()));
|
||||
}
|
||||
|
||||
private TribuneOfRot(final TribuneOfRot card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TribuneOfRot copy() {
|
||||
return new TribuneOfRot(this);
|
||||
}
|
||||
}
|
||||
|
||||
class TribuneOfRotEffect extends OneShotEffect {
|
||||
|
||||
private static final Token token = new SaprolingToken();
|
||||
|
||||
TribuneOfRotEffect() {
|
||||
super(Outcome.PutCreatureInPlay);
|
||||
this.staticText = "For each creature card milled this way, create a 1/1 green Saproling creature token.";
|
||||
}
|
||||
|
||||
private TribuneOfRotEffect(final TribuneOfRotEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TribuneOfRotEffect copy() {
|
||||
return new TribuneOfRotEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
int numOfCreatureCardsMilled = player
|
||||
.millCards(2, source, game)
|
||||
.count(StaticFilters.FILTER_CARD_CREATURE, game);
|
||||
if (numOfCreatureCardsMilled > 0) {
|
||||
game.getState().processAction(game);
|
||||
token.putOntoBattlefield(numOfCreatureCardsMilled, game, source, source.getControllerId(), false, false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -244,6 +244,7 @@ public final class RavnicaClueEdition extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Tithebearer Giant", 124, Rarity.COMMON, mage.cards.t.TithebearerGiant.class));
|
||||
cards.add(new SetCardInfo("Towering Thunderfist", 151, Rarity.COMMON, mage.cards.t.ToweringThunderfist.class));
|
||||
cards.add(new SetCardInfo("Transluminant", 177, Rarity.COMMON, mage.cards.t.Transluminant.class));
|
||||
cards.add(new SetCardInfo("Tribune of Rot", 48, Rarity.UNCOMMON, mage.cards.t.TribuneOfRot.class));
|
||||
cards.add(new SetCardInfo("Trostani Discordant", 213, Rarity.MYTHIC, mage.cards.t.TrostaniDiscordant.class));
|
||||
cards.add(new SetCardInfo("Trusted Pegasus", 77, Rarity.COMMON, mage.cards.t.TrustedPegasus.class));
|
||||
cards.add(new SetCardInfo("Turn to Frog", 103, Rarity.UNCOMMON, mage.cards.t.TurnToFrog.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue