[BRO] Implement Platoon Dispenser

This commit is contained in:
Evan Kranzler 2022-11-02 21:30:11 -04:00
parent d31e3b2448
commit 69e4023fa6
2 changed files with 72 additions and 0 deletions

View file

@ -0,0 +1,71 @@
package mage.cards.p;
import mage.MageInt;
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.keyword.UnearthAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.SubType;
import mage.constants.TargetController;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.AnotherPredicate;
import mage.game.permanent.token.SoldierArtifactToken;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class PlatoonDispenser extends CardImpl {
private static final FilterPermanent filter
= new FilterControlledCreaturePermanent("you control two or more other creatures");
static {
filter.add(AnotherPredicate.instance);
}
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(
filter, ComparisonType.MORE_THAN, 1, true
);
public PlatoonDispenser(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{5}");
this.subtype.add(SubType.CONSTRUCT);
this.power = new MageInt(4);
this.toughness = new MageInt(6);
// At the beginning of your end step, if you control two or more other creatures, draw a card.
this.addAbility(new BeginningOfEndStepTriggeredAbility(
new DrawCardSourceControllerEffect(1),
TargetController.YOU, condition, false
));
// {3}{W}: Create a 1/1 colorless Soldier Artifact creature token.
this.addAbility(new SimpleActivatedAbility(
new CreateTokenEffect(new SoldierArtifactToken()), new ManaCostsImpl<>("{3}{W}")
));
// Unearth {2}{W}{W}
this.addAbility(new UnearthAbility(new ManaCostsImpl<>("{2}{W}{W}")));
}
private PlatoonDispenser(final PlatoonDispenser card) {
super(card);
}
@Override
public PlatoonDispenser copy() {
return new PlatoonDispenser(this);
}
}

View file

@ -102,6 +102,7 @@ public final class TheBrothersWar extends ExpansionSet {
cards.add(new SetCardInfo("Phyrexian Dragon Engine", "163a", Rarity.RARE, mage.cards.p.PhyrexianDragonEngine.class));
cards.add(new SetCardInfo("Phyrexian Fleshgorger", 121, Rarity.MYTHIC, mage.cards.p.PhyrexianFleshgorger.class));
cards.add(new SetCardInfo("Plains", 268, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Platoon Dispenser", 36, Rarity.MYTHIC, mage.cards.p.PlatoonDispenser.class));
cards.add(new SetCardInfo("Powerstone Fracture", 112, Rarity.COMMON, mage.cards.p.PowerstoneFracture.class));
cards.add(new SetCardInfo("Queen Kayla bin-Kroog", 218, Rarity.RARE, mage.cards.q.QueenKaylaBinKroog.class));
cards.add(new SetCardInfo("Reconstructed Thopter", 242, Rarity.UNCOMMON, mage.cards.r.ReconstructedThopter.class));