mirror of
https://github.com/correl/mage.git
synced 2024-12-30 19:10:36 +00:00
[VOW] Implemented Crawling Infestation
This commit is contained in:
parent
d620c94f44
commit
ca5318e814
2 changed files with 82 additions and 0 deletions
81
Mage.Sets/src/mage/cards/c/CrawlingInfestation.java
Normal file
81
Mage.Sets/src/mage/cards/c/CrawlingInfestation.java
Normal file
|
@ -0,0 +1,81 @@
|
||||||
|
package mage.cards.c;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
|
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||||
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
|
import mage.abilities.effects.common.MillCardsControllerEffect;
|
||||||
|
import mage.cards.Card;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.TargetController;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.events.GameEvent;
|
||||||
|
import mage.game.events.ZoneChangeEvent;
|
||||||
|
import mage.game.permanent.token.InsectToken;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author weirddan455
|
||||||
|
*/
|
||||||
|
public final class CrawlingInfestation extends CardImpl {
|
||||||
|
|
||||||
|
public CrawlingInfestation(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}");
|
||||||
|
|
||||||
|
// At the beginning of your upkeep, you may mill two cards.
|
||||||
|
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new MillCardsControllerEffect(2), TargetController.YOU, true));
|
||||||
|
|
||||||
|
// Whenever one or more creature cards are put into your graveyard from anywhere during your turn, create a 1/1 green Insect creature token. This ability triggers only once each turn.
|
||||||
|
this.addAbility(new CrawlingInfestationTriggeredAbility());
|
||||||
|
}
|
||||||
|
|
||||||
|
private CrawlingInfestation(final CrawlingInfestation card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CrawlingInfestation copy() {
|
||||||
|
return new CrawlingInfestation(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class CrawlingInfestationTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
|
public CrawlingInfestationTriggeredAbility() {
|
||||||
|
super(Zone.BATTLEFIELD, new CreateTokenEffect(new InsectToken()));
|
||||||
|
this.setTriggersOnce(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
private CrawlingInfestationTriggeredAbility(final CrawlingInfestationTriggeredAbility ability) {
|
||||||
|
super(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CrawlingInfestationTriggeredAbility copy() {
|
||||||
|
return new CrawlingInfestationTriggeredAbility(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkEventType(GameEvent event, Game game) {
|
||||||
|
return event.getType() == GameEvent.EventType.ZONE_CHANGE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
|
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
||||||
|
if (zEvent.getToZone() == Zone.GRAVEYARD && game.isActivePlayer(controllerId)) {
|
||||||
|
Card card = game.getCard(zEvent.getTargetId());
|
||||||
|
return card != null && !card.isCopy() && card.isCreature(game) && card.isOwnedBy(controllerId);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTriggerPhrase() {
|
||||||
|
return "Whenever one or more creature cards are put into your graveyard from anywhere during your turn, ";
|
||||||
|
}
|
||||||
|
}
|
|
@ -58,6 +58,7 @@ public final class InnistradCrimsonVow extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Cobbled Lancer", 52, Rarity.UNCOMMON, mage.cards.c.CobbledLancer.class));
|
cards.add(new SetCardInfo("Cobbled Lancer", 52, Rarity.UNCOMMON, mage.cards.c.CobbledLancer.class));
|
||||||
cards.add(new SetCardInfo("Consuming Tide", 53, Rarity.RARE, mage.cards.c.ConsumingTide.class));
|
cards.add(new SetCardInfo("Consuming Tide", 53, Rarity.RARE, mage.cards.c.ConsumingTide.class));
|
||||||
cards.add(new SetCardInfo("Courier Bat", 102, Rarity.COMMON, mage.cards.c.CourierBat.class));
|
cards.add(new SetCardInfo("Courier Bat", 102, Rarity.COMMON, mage.cards.c.CourierBat.class));
|
||||||
|
cards.add(new SetCardInfo("Crawling Infestation", 193, Rarity.UNCOMMON, mage.cards.c.CrawlingInfestation.class));
|
||||||
cards.add(new SetCardInfo("Dawnhart Disciple", 196, Rarity.COMMON, mage.cards.d.DawnhartDisciple.class));
|
cards.add(new SetCardInfo("Dawnhart Disciple", 196, Rarity.COMMON, mage.cards.d.DawnhartDisciple.class));
|
||||||
cards.add(new SetCardInfo("Dawnhart Geist", 8, Rarity.UNCOMMON, mage.cards.d.DawnhartGeist.class));
|
cards.add(new SetCardInfo("Dawnhart Geist", 8, Rarity.UNCOMMON, mage.cards.d.DawnhartGeist.class));
|
||||||
cards.add(new SetCardInfo("Daybreak Combatants", 153, Rarity.COMMON, mage.cards.d.DaybreakCombatants.class));
|
cards.add(new SetCardInfo("Daybreak Combatants", 153, Rarity.COMMON, mage.cards.d.DaybreakCombatants.class));
|
||||||
|
|
Loading…
Reference in a new issue