forked from External/mage
55 lines
1.8 KiB
Java
55 lines
1.8 KiB
Java
|
|
package mage.cards.f;
|
|
|
|
import java.util.UUID;
|
|
import mage.MageInt;
|
|
import mage.abilities.Ability;
|
|
import mage.abilities.common.SimpleActivatedAbility;
|
|
import mage.abilities.costs.common.TapTargetCost;
|
|
import mage.abilities.effects.common.PreventDamageToTargetEffect;
|
|
import mage.cards.CardImpl;
|
|
import mage.cards.CardSetInfo;
|
|
import mage.constants.CardType;
|
|
import mage.constants.SubType;
|
|
import mage.constants.Duration;
|
|
import mage.constants.Zone;
|
|
import mage.filter.common.FilterControlledCreaturePermanent;
|
|
import mage.filter.predicate.permanent.TappedPredicate;
|
|
import mage.target.common.TargetControlledCreaturePermanent;
|
|
import mage.target.common.TargetCreaturePermanent;
|
|
|
|
/**
|
|
*
|
|
* @author LoneFox
|
|
*/
|
|
public final class FieldSurgeon extends CardImpl {
|
|
|
|
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("an untapped creature you control");
|
|
|
|
static {
|
|
filter.add(TappedPredicate.UNTAPPED);
|
|
}
|
|
|
|
public FieldSurgeon(UUID ownerId, CardSetInfo setInfo) {
|
|
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}");
|
|
this.subtype.add(SubType.HUMAN);
|
|
this.subtype.add(SubType.CLERIC);
|
|
this.power = new MageInt(1);
|
|
this.toughness = new MageInt(1);
|
|
|
|
// Tap an untapped creature you control: Prevent the next 1 damage that would be dealt to target creature this turn.
|
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1),
|
|
new TapTargetCost(new TapTargetCost(new TargetControlledCreaturePermanent(filter))));
|
|
ability.addTarget(new TargetCreaturePermanent());
|
|
this.addAbility(ability);
|
|
}
|
|
|
|
private FieldSurgeon(final FieldSurgeon card) {
|
|
super(card);
|
|
}
|
|
|
|
@Override
|
|
public FieldSurgeon copy() {
|
|
return new FieldSurgeon(this);
|
|
}
|
|
}
|