[STX] Implemented Pest Summoning

This commit is contained in:
Evan Kranzler 2021-03-25 20:12:43 -04:00
parent c4f65177e3
commit 69e38a84ce
3 changed files with 68 additions and 0 deletions

View file

@ -0,0 +1,34 @@
package mage.cards.p;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.game.permanent.token.PestToken;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class PestSummoning extends CardImpl {
public PestSummoning(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B/G}{B/G}");
this.subtype.add(SubType.LESSON);
// Create two 1/1 black and green Pest creature tokens with "When this creature dies, you gain 1 life."
this.getSpellAbility().addEffect(new CreateTokenEffect(new PestToken(), 2));
}
private PestSummoning(final PestSummoning card) {
super(card);
}
@Override
public PestSummoning copy() {
return new PestSummoning(this);
}
}

View file

@ -31,6 +31,7 @@ public final class StrixhavenSchoolOfMages extends ExpansionSet {
cards.add(new SetCardInfo("Eager First-Year", 16, Rarity.COMMON, mage.cards.e.EagerFirstYear.class)); cards.add(new SetCardInfo("Eager First-Year", 16, Rarity.COMMON, mage.cards.e.EagerFirstYear.class));
cards.add(new SetCardInfo("Kasmina, Enigma Sage", 196, Rarity.MYTHIC, mage.cards.k.KasminaEnigmaSage.class)); cards.add(new SetCardInfo("Kasmina, Enigma Sage", 196, Rarity.MYTHIC, mage.cards.k.KasminaEnigmaSage.class));
cards.add(new SetCardInfo("Lorehold Command", 199, Rarity.RARE, mage.cards.l.LoreholdCommand.class)); cards.add(new SetCardInfo("Lorehold Command", 199, Rarity.RARE, mage.cards.l.LoreholdCommand.class));
cards.add(new SetCardInfo("Pest Summoning", 211, Rarity.COMMON, mage.cards.p.PestSummoning.class));
cards.add(new SetCardInfo("Pop Quiz", 49, Rarity.COMMON, mage.cards.p.PopQuiz.class)); cards.add(new SetCardInfo("Pop Quiz", 49, Rarity.COMMON, mage.cards.p.PopQuiz.class));
cards.add(new SetCardInfo("Prismari Command", 214, Rarity.RARE, mage.cards.p.PrismariCommand.class)); cards.add(new SetCardInfo("Prismari Command", 214, Rarity.RARE, mage.cards.p.PrismariCommand.class));
cards.add(new SetCardInfo("Professor Onyx", 83, Rarity.MYTHIC, mage.cards.p.ProfessorOnyx.class)); cards.add(new SetCardInfo("Professor Onyx", 83, Rarity.MYTHIC, mage.cards.p.ProfessorOnyx.class));

View file

@ -0,0 +1,33 @@
package mage.game.permanent.token;
import mage.MageInt;
import mage.abilities.common.DiesSourceTriggeredAbility;
import mage.abilities.effects.common.GainLifeEffect;
import mage.constants.CardType;
import mage.constants.SubType;
/**
* @author TheElk801
*/
public final class PestToken2 extends TokenImpl {
public PestToken2() {
super("Pest", "1/1 black and green Pest creature token with \"When this creature dies, you gain 1 life.\"");
cardType.add(CardType.CREATURE);
color.setBlack(true);
color.setGreen(true);
subtype.add(SubType.PEST);
power = new MageInt(1);
toughness = new MageInt(1);
this.addAbility(new DiesSourceTriggeredAbility(new GainLifeEffect(1)));
}
private PestToken2(final PestToken2 token) {
super(token);
}
public PestToken2 copy() {
return new PestToken2(this);
}
}