forked from External/mage
Merge pull request #5032 from NoahGleason/saproling-infestation
Implement Saproling Infestation (INV)
This commit is contained in:
commit
cdf8f615e3
4 changed files with 72 additions and 0 deletions
68
Mage.Sets/src/mage/cards/s/SaprolingInfestation.java
Normal file
68
Mage.Sets/src/mage/cards/s/SaprolingInfestation.java
Normal 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.";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import mage.constants.AbilityType;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
|
|
@ -152,6 +153,7 @@ public class KickerAbility extends StaticAbility implements OptionalAdditionalSo
|
|||
amount += activations.get(key);
|
||||
}
|
||||
activations.put(key, amount);
|
||||
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.KICKED, source.getSourceId(), source.getSourceId(), source.getControllerId()));
|
||||
}
|
||||
|
||||
private String getActivationKey(Ability source, String costText, Game game) {
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ public class GameEvent implements Serializable {
|
|||
MIRACLE_CARD_REVEALED,
|
||||
MADNESS_CARD_EXILED,
|
||||
INVESTIGATED,
|
||||
KICKED,
|
||||
DISCARD_CARD,
|
||||
DISCARDED_CARD,
|
||||
CYCLE_CARD, CYCLED_CARD,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue