Skip to content

Commit

Permalink
Resolve styling, comment mispellings, and tapped logic
Browse files Browse the repository at this point in the history
  • Loading branch information
BenGiese22 committed Feb 23, 2024
1 parent 2b1c19f commit f88df3f
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions Mage.Sets/src/mage/cards/t/TribuneOfRot.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.token.Token;
import mage.game.permanent.token.SaprolingToken;
Expand All @@ -25,22 +25,26 @@
public final class TribuneOfRot extends CardImpl {

public TribuneOfRot(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B/G}{B/G}");
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, createa 1/1 green Saproling craeture token.
// 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); }
private TribuneOfRot(final TribuneOfRot card) {
super(card);
}

@Override
public TribuneOfRot copy() { return new TribuneOfRot(this); }
public TribuneOfRot copy() {
return new TribuneOfRot(this);
}
}

class TribuneOfRotEffect extends OneShotEffect {
Expand All @@ -52,27 +56,26 @@ class TribuneOfRotEffect extends OneShotEffect {
this.staticText = "For each creature card milled this way, create a 1/1 green Saproling creature token.";
}

private TribuneOfRotEffect(final TribuneOfRotEffect effect) { super(effect); }
private TribuneOfRotEffect(final TribuneOfRotEffect effect) {
super(effect);
}

@Override
public TribuneOfRotEffect copy() { return new TribuneOfRotEffect(this); }
public TribuneOfRotEffect copy() {
return new TribuneOfRotEffect(this);
}


@Override
public boolean apply(Game game, Ability source) {
int numOfCreatureCardsMilled = 0;
Player player = game.getPlayer(source.getControllerId());
if (player != null) {
numOfCreatureCardsMilled += player
int numOfCreatureCardsMilled = player
.millCards(2, source, game)
.getCards(game)
.stream()
.filter(Objects::nonNull)
.filter(card -> game.getState().getZone(card.getId()) == Zone.GRAVEYARD)
.filter(card1 -> card1.isCreature(game))
.count();
.count(StaticFilters.FILTER_CARD_CREATURE, game);
if (numOfCreatureCardsMilled > 0) {
game.getState().processAction(game);
token.putOntoBattlefield(numOfCreatureCardsMilled, game, source, source.getControllerId(), true, false);
token.putOntoBattlefield(numOfCreatureCardsMilled, game, source, source.getControllerId(), false, false);
}
return true;
}
Expand Down

0 comments on commit f88df3f

Please sign in to comment.