1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-02 03:18:09 -09:00

[ANA] - implemented Tactical Advantage

This commit is contained in:
Oleg Agafonov 2018-10-09 18:57:58 +04:00
parent 9207275936
commit 56d8887cf8

View file

@ -0,0 +1,51 @@
package mage.cards.t;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.TargetController;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.permanent.BlockedPredicate;
import mage.filter.predicate.permanent.BlockingPredicate;
import mage.filter.predicate.permanent.ControllerPredicate;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author JayDi85
*/
public final class TacticalAdvantage extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("blocking or blocked creature you control");
static {
filter.add(
Predicates.or(
new BlockingPredicate(),
new BlockedPredicate()
));
filter.add(new ControllerPredicate(TargetController.YOU));
}
public TacticalAdvantage(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}");
// Target blocking or blocked creature you control gets +2/+2 until end of turn.
this.getSpellAbility().addEffect(new BoostTargetEffect(2, 2, Duration.EndOfTurn));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
}
public TacticalAdvantage(final TacticalAdvantage card) {
super(card);
}
@Override
public TacticalAdvantage copy() {
return new TacticalAdvantage(this);
}
}