mirror of
https://github.com/correl/mage.git
synced 2024-12-29 03:00:15 +00:00
[MOM] Implement Corruption of Towashi
This commit is contained in:
parent
8d7b73151c
commit
319d040bc7
2 changed files with 80 additions and 0 deletions
79
Mage.Sets/src/mage/cards/c/CorruptionOfTowashi.java
Normal file
79
Mage.Sets/src/mage/cards/c/CorruptionOfTowashi.java
Normal file
|
@ -0,0 +1,79 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.keyword.IncubateEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.EntersTheBattlefieldEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class CorruptionOfTowashi extends CardImpl {
|
||||
|
||||
public CorruptionOfTowashi(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{U}");
|
||||
|
||||
// When Corruption of Towashi enters the battlefield, incubate 4.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new IncubateEffect(4)));
|
||||
|
||||
// Whenever a permanent you control transforms or a permanent enters the battlefield under your control transformed, you may draw a card. Do this only once each turn.
|
||||
this.addAbility(new CorruptionOfTowashiTriggeredAbility());
|
||||
}
|
||||
|
||||
private CorruptionOfTowashi(final CorruptionOfTowashi card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CorruptionOfTowashi copy() {
|
||||
return new CorruptionOfTowashi(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CorruptionOfTowashiTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
CorruptionOfTowashiTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), true);
|
||||
this.setTriggerPhrase("Whenever a permanent you control transforms " +
|
||||
"or a permanent enters the battlefield under your control transformed, ");
|
||||
this.setDoOnlyOnce(true);
|
||||
}
|
||||
|
||||
private CorruptionOfTowashiTriggeredAbility(final CorruptionOfTowashiTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CorruptionOfTowashiTriggeredAbility copy() {
|
||||
return new CorruptionOfTowashiTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD
|
||||
|| event.getType() == GameEvent.EventType.TRANSFORMED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (!isControlledBy(game.getControllerId(event.getTargetId()))) {
|
||||
return false;
|
||||
}
|
||||
switch (event.getType()) {
|
||||
case ENTERS_THE_BATTLEFIELD:
|
||||
return ((EntersTheBattlefieldEvent) event).getTarget().isTransformed();
|
||||
case TRANSFORMED:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -75,6 +75,7 @@ public final class MarchOfTheMachine extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Converter Beast", 180, Rarity.COMMON, mage.cards.c.ConverterBeast.class));
|
||||
cards.add(new SetCardInfo("Copper Host Crusher", 181, Rarity.UNCOMMON, mage.cards.c.CopperHostCrusher.class));
|
||||
cards.add(new SetCardInfo("Corrupted Conviction", 98, Rarity.COMMON, mage.cards.c.CorruptedConviction.class));
|
||||
cards.add(new SetCardInfo("Corruption of Towashi", 53, Rarity.UNCOMMON, mage.cards.c.CorruptionOfTowashi.class));
|
||||
cards.add(new SetCardInfo("Cosmic Hunger", 182, Rarity.COMMON, mage.cards.c.CosmicHunger.class));
|
||||
cards.add(new SetCardInfo("Cragsmasher Yeti", 333, Rarity.COMMON, mage.cards.c.CragsmasherYeti.class));
|
||||
cards.add(new SetCardInfo("Crystal Carapace", 183, Rarity.COMMON, mage.cards.c.CrystalCarapace.class));
|
||||
|
|
Loading…
Reference in a new issue