mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
[STX] Implemented Tend the Pests
This commit is contained in:
parent
faa58b613c
commit
4a184a94b3
3 changed files with 43 additions and 1 deletions
40
Mage.Sets/src/mage/cards/t/TendThePests.java
Normal file
40
Mage.Sets/src/mage/cards/t/TendThePests.java
Normal file
|
@ -0,0 +1,40 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.dynamicvalue.common.SacrificeCostCreaturesPower;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.permanent.token.WitherbloomToken;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class TendThePests extends CardImpl {
|
||||
|
||||
public TendThePests(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}{G}");
|
||||
|
||||
// As an additional cost to cast this spell, sacrifice a creature.
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(
|
||||
new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT)
|
||||
));
|
||||
|
||||
// Create X 1/1 black and green Pest creature tokens with "When this creature dies, you gain 1 life," where X is the sacrificed creature's power.
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new WitherbloomToken(), SacrificeCostCreaturesPower.instance));
|
||||
}
|
||||
|
||||
private TendThePests(final TendThePests card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TendThePests copy() {
|
||||
return new TendThePests(this);
|
||||
}
|
||||
}
|
|
@ -217,6 +217,7 @@ public final class StrixhavenSchoolOfMages extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Teachings of the Archaics", 57, Rarity.RARE, mage.cards.t.TeachingsOfTheArchaics.class));
|
||||
cards.add(new SetCardInfo("Team Pennant", 260, Rarity.UNCOMMON, mage.cards.t.TeamPennant.class));
|
||||
cards.add(new SetCardInfo("Tempted by the Oriq", 58, Rarity.RARE, mage.cards.t.TemptedByTheOriq.class));
|
||||
cards.add(new SetCardInfo("Tend the Pests", 242, Rarity.UNCOMMON, mage.cards.t.TendThePests.class));
|
||||
cards.add(new SetCardInfo("Tenured Inkcaster", 88, Rarity.UNCOMMON, mage.cards.t.TenuredInkcaster.class));
|
||||
cards.add(new SetCardInfo("Thrilling Discovery", 243, Rarity.COMMON, mage.cards.t.ThrillingDiscovery.class));
|
||||
cards.add(new SetCardInfo("Thunderous Orator", 35, Rarity.UNCOMMON, mage.cards.t.ThunderousOrator.class));
|
||||
|
|
|
@ -11,7 +11,8 @@ import mage.game.Game;
|
|||
* @author LevelX2
|
||||
*/
|
||||
public enum SacrificeCostCreaturesPower implements DynamicValue {
|
||||
instance;
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
for (Cost cost : sourceAbility.getCosts()) {
|
||||
|
|
Loading…
Reference in a new issue