Merge pull request #5032 from NoahGleason/saproling-infestation

Implement Saproling Infestation (INV)
This commit is contained in:
theelk801 2018-06-18 23:09:53 -04:00 committed by GitHub
commit cdf8f615e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 72 additions and 0 deletions

View file

@ -0,0 +1,68 @@
package mage.cards.s;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.permanent.token.SaprolingToken;
import java.util.UUID;
/**
*
* @author noahg
*/
public final class SaprolingInfestation extends CardImpl {
public SaprolingInfestation(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}");
// Whenever a player kicks a spell, you put a 1/1 green Saproling creature token onto the battlefield.
this.addAbility(new SaprolingInfestationTriggeredAbility());
}
public SaprolingInfestation(final SaprolingInfestation card) {
super(card);
}
@Override
public SaprolingInfestation copy() {
return new SaprolingInfestation(this);
}
class SaprolingInfestationTriggeredAbility extends TriggeredAbilityImpl {
SaprolingInfestationTriggeredAbility() {
super(Zone.BATTLEFIELD, new CreateTokenEffect(new SaprolingToken("INV")), false);
}
SaprolingInfestationTriggeredAbility(final SaprolingInfestationTriggeredAbility ability) {
super(ability);
}
@Override
public SaprolingInfestationTriggeredAbility copy() {
return new SaprolingInfestationTriggeredAbility(this);
}
@Override
public boolean checkEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.KICKED;
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
return true;
}
@Override
public String getRule() {
return "Whenever a player kicks a spell, you put a 1/1 green Saproling creature token onto the battlefield.";
}
}
}

View file

@ -248,6 +248,7 @@ public final class Invasion extends ExpansionSet {
cards.add(new SetCardInfo("Salt Marsh", 326, Rarity.UNCOMMON, mage.cards.s.SaltMarsh.class));
cards.add(new SetCardInfo("Samite Archer", 269, Rarity.UNCOMMON, mage.cards.s.SamiteArcher.class));
cards.add(new SetCardInfo("Sapphire Leech", 71, Rarity.RARE, mage.cards.s.SapphireLeech.class));
cards.add(new SetCardInfo("Saproling Infestation", 208, Rarity.RARE, mage.cards.s.SaprolingInfestation.class));
cards.add(new SetCardInfo("Saproling Symbiosis", 209, Rarity.RARE, mage.cards.s.SaprolingSymbiosis.class));
cards.add(new SetCardInfo("Savage Offensive", 162, Rarity.COMMON, mage.cards.s.SavageOffensive.class));
cards.add(new SetCardInfo("Scarred Puma", 163, Rarity.COMMON, mage.cards.s.ScarredPuma.class));