added Uncontrolled Infestation

master
beholder 2011-09-09 18:29:13 +02:00
parent ff8be6a619
commit 6274b28e41
2 changed files with 53 additions and 0 deletions

View File

@ -6021,6 +6021,18 @@ converted=4
cost={2}{B}{B}
timing=removal
>Uncontrolled Infestation
image=http://magiccards.info/scans/en/sc/108.jpg
value=2
removal=2
rarity=C
type=Enchantment
subtype=Aura
color=r
converted=2
cost={1}{R}
timing=removal
>Elephant Guide
image=http://magiccards.info/scans/en/gvl/18.jpg
value=4

View File

@ -0,0 +1,41 @@
package magic.card;
import magic.model.MagicGame;
import magic.model.MagicPermanent;
import magic.model.action.MagicDestroyAction;
import magic.model.choice.MagicTargetChoice;
import magic.model.event.MagicEvent;
import magic.model.event.MagicPlayAuraEvent;
import magic.model.event.MagicSpellCardEvent;
import magic.model.target.MagicDestroyTargetPicker;
import magic.model.trigger.MagicWhenBecomesTappedTrigger;
public class Uncontrolled_Infestation {
public static final MagicSpellCardEvent S = new MagicPlayAuraEvent(
MagicTargetChoice.NEG_TARGET_NONBASIC_LAND,
new MagicDestroyTargetPicker(false));
public static final MagicWhenBecomesTappedTrigger T = new MagicWhenBecomesTappedTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent data) {
final MagicPermanent enchantedPermanent = permanent.getEnchantedCreature();
return (enchantedPermanent == data) ?
new MagicEvent(
permanent,
permanent.getController(),
new Object[]{enchantedPermanent},
this,
"Destroy " + enchantedPermanent + ".") :
MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object data[],
final Object[] choiceResults) {
game.doAction(new MagicDestroyAction((MagicPermanent)data[0]));
}
};
}