Added missing implementation of Take Possession.

This commit is contained in:
LevelX2 2013-06-17 07:44:44 +02:00
parent 58bf7cff3f
commit 57b517282d

View file

@ -28,9 +28,19 @@
package mage.sets.modernmasters; package mage.sets.modernmasters;
import java.util.UUID; import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.continious.ControlEnchantedEffect;
import mage.abilities.keyword.EnchantAbility;
import mage.abilities.keyword.SplitSecondAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity; import mage.constants.Rarity;
import mage.constants.Zone;
import mage.target.TargetPermanent;
/** /**
* *
@ -46,8 +56,18 @@ public class TakePossession extends CardImpl<TakePossession> {
this.color.setBlue(true); this.color.setBlue(true);
// Split second // Split second
this.addAbility(SplitSecondAbility.getInstance());
// Enchant permanent // Enchant permanent
TargetPermanent auraTarget = new TargetPermanent();
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.GainControl));
Ability ability = new EnchantAbility(auraTarget.getTargetName());
this.addAbility(ability);
// You control enchanted permanent. // You control enchanted permanent.
Effect effect = new ControlEnchantedEffect();
effect.setText("You control enchanted permanent");
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
} }
public TakePossession(final TakePossession card) { public TakePossession(final TakePossession card) {