mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Implemented Piper of the Swarm
This commit is contained in:
parent
10aac8ee38
commit
9c948582d9
2 changed files with 73 additions and 0 deletions
72
Mage.Sets/src/mage/cards/p/PiperOfTheSwarm.java
Normal file
72
Mage.Sets/src/mage/cards/p/PiperOfTheSwarm.java
Normal file
|
@ -0,0 +1,72 @@
|
|||
package mage.cards.p;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.abilities.effects.common.continuous.GainControlTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.permanent.token.RatToken;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class PiperOfTheSwarm extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(SubType.RAT, "Rats");
|
||||
private static final FilterControlledPermanent filter2 = new FilterControlledPermanent(SubType.RAT, "Rats");
|
||||
|
||||
public PiperOfTheSwarm(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");
|
||||
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.WARLOCK);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Rats you control have menace.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter)
|
||||
));
|
||||
|
||||
// {1}{B}, {T}: Create a 1/1 black Rat creature token.
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
new CreateTokenEffect(new RatToken()), new ManaCostsImpl("{1}{B}")
|
||||
);
|
||||
ability.addCost(new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
|
||||
// {2}{B}{B}, {T}, Sacrifice three Rats: Gain control of target creature.
|
||||
ability = new SimpleActivatedAbility(
|
||||
new GainControlTargetEffect(Duration.Custom), new ManaCostsImpl("{2}{B}{B}")
|
||||
);
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(3, filter2)));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private PiperOfTheSwarm(final PiperOfTheSwarm card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PiperOfTheSwarm copy() {
|
||||
return new PiperOfTheSwarm(this);
|
||||
}
|
||||
}
|
|
@ -64,6 +64,7 @@ public final class ThroneOfEldraine extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Maraleaf Pixie", 196, Rarity.UNCOMMON, mage.cards.m.MaraleafPixie.class));
|
||||
cards.add(new SetCardInfo("Oko, Thief of Crowns", 197, Rarity.MYTHIC, mage.cards.o.OkoThiefOfCrowns.class));
|
||||
cards.add(new SetCardInfo("Order of Midnight", 99, Rarity.UNCOMMON, mage.cards.o.OrderOfMidnight.class));
|
||||
cards.add(new SetCardInfo("Piper of the Swarm", 100, Rarity.RARE, mage.cards.p.PiperOfTheSwarm.class));
|
||||
cards.add(new SetCardInfo("Rankle, Master of Pranks", 101, Rarity.MYTHIC, mage.cards.r.RankleMasterOfPranks.class));
|
||||
cards.add(new SetCardInfo("Rosethorn Acolyte", 174, Rarity.COMMON, mage.cards.r.RosethornAcolyte.class));
|
||||
cards.add(new SetCardInfo("Run Away Together", 62, Rarity.COMMON, mage.cards.r.RunAwayTogether.class));
|
||||
|
|
Loading…
Reference in a new issue