forked from External/mage
65 lines
2.3 KiB
Java
65 lines
2.3 KiB
Java
|
|
|
|
package mage.cards.s;
|
|
|
|
import java.util.UUID;
|
|
import mage.MageInt;
|
|
import mage.abilities.Ability;
|
|
import mage.abilities.common.SimpleActivatedAbility;
|
|
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
|
|
import mage.abilities.costs.mana.GenericManaCost;
|
|
import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect;
|
|
import mage.abilities.keyword.FlyingAbility;
|
|
import mage.cards.CardImpl;
|
|
import mage.cards.CardSetInfo;
|
|
import mage.constants.CardType;
|
|
import mage.constants.SubType;
|
|
import mage.constants.ComparisonType;
|
|
import mage.constants.Zone;
|
|
import mage.filter.common.FilterControlledLandPermanent;
|
|
import mage.filter.common.FilterControlledPermanent;
|
|
import mage.filter.common.FilterCreaturePermanent;
|
|
import mage.filter.predicate.mageobject.PowerPredicate;
|
|
import mage.target.common.TargetControlledPermanent;
|
|
import mage.target.common.TargetCreaturePermanent;
|
|
|
|
/**
|
|
* @author Loki
|
|
*/
|
|
public final class SoratamiMirrorGuard extends CardImpl {
|
|
|
|
private static final FilterControlledPermanent filter = new FilterControlledLandPermanent("a land");
|
|
private static final FilterCreaturePermanent filterCreature = new FilterCreaturePermanent("creature with power 2 or less");
|
|
|
|
static {
|
|
filterCreature.add(new PowerPredicate(ComparisonType.FEWER_THAN, 3));
|
|
}
|
|
|
|
public SoratamiMirrorGuard(UUID ownerId, CardSetInfo setInfo) {
|
|
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}");
|
|
this.subtype.add(SubType.MOONFOLK);
|
|
this.subtype.add(SubType.WIZARD);
|
|
|
|
this.power = new MageInt(3);
|
|
this.toughness = new MageInt(1);
|
|
|
|
// Flying
|
|
this.addAbility(FlyingAbility.getInstance());
|
|
|
|
// {2}, Return a land you control to its owner's hand: Target creature with power 2 or less can't be blocked this turn.
|
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantBeBlockedTargetEffect(), new GenericManaCost(2));
|
|
ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)));
|
|
ability.addTarget(new TargetCreaturePermanent(filterCreature));
|
|
this.addAbility(ability);
|
|
}
|
|
|
|
public SoratamiMirrorGuard(final SoratamiMirrorGuard card) {
|
|
super(card);
|
|
}
|
|
|
|
@Override
|
|
public SoratamiMirrorGuard copy() {
|
|
return new SoratamiMirrorGuard(this);
|
|
}
|
|
|
|
}
|