forked from External/mage
use static filters in Orzhov Pontiff and Kros Defense Contractor
This commit is contained in:
parent
c5aa76b46a
commit
bd6f78bd61
2 changed files with 5 additions and 22 deletions
|
|
@ -13,8 +13,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetOpponentsCreaturePermanent;
|
||||
|
|
@ -27,13 +26,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class KrosDefenseContractor extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter
|
||||
= new FilterCreaturePermanent("creature you don't control");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.NOT_YOU.getControllerPredicate());
|
||||
}
|
||||
|
||||
public KrosDefenseContractor(UUID ownerID, CardSetInfo setInfo) {
|
||||
super(ownerID, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{W}{U}");
|
||||
|
||||
|
|
@ -50,7 +42,7 @@ public final class KrosDefenseContractor extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// Whenever you put one or more counters on a creature you don't control, tap that creature and goad it. It gains trample until your next turn.
|
||||
this.addAbility(new PutCounterOnCreatureTriggeredAbility(new KrosDefenseContractorEffect(), null, filter, true));
|
||||
this.addAbility(new PutCounterOnCreatureTriggeredAbility(new KrosDefenseContractorEffect(), null, StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL, true));
|
||||
}
|
||||
|
||||
private KrosDefenseContractor(final KrosDefenseContractor card) {
|
||||
|
|
|
|||
|
|
@ -12,22 +12,13 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class OrzhovPontiff extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filterControlled = new FilterCreaturePermanent("Creatures you control");
|
||||
private static final FilterCreaturePermanent filterNotControlled = new FilterCreaturePermanent("creatures you don't control");
|
||||
static {
|
||||
filterControlled.add(TargetController.YOU.getControllerPredicate());
|
||||
filterNotControlled.add((TargetController.NOT_YOU.getControllerPredicate()));
|
||||
}
|
||||
|
||||
public OrzhovPontiff(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{B}");
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
|
|
@ -38,8 +29,8 @@ public final class OrzhovPontiff extends CardImpl {
|
|||
|
||||
// Haunt
|
||||
// When Orzhov Pontiff enters the battlefield or the creature it haunts dies, choose one - Creatures you control get +1/+1 until end of turn; or creatures you don't control get -1/-1 until end of turn.
|
||||
Ability ability = new HauntAbility(this, new BoostAllEffect(1,1, Duration.EndOfTurn, filterControlled, false));
|
||||
Mode mode = new Mode(new BoostAllEffect(-1,-1, Duration.EndOfTurn, filterNotControlled, false));
|
||||
Ability ability = new HauntAbility(this, new BoostAllEffect(1,1, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES_CONTROLLED, false));
|
||||
Mode mode = new Mode(new BoostAllEffect(-1,-1, Duration.EndOfTurn, StaticFilters.FILTER_CREATURES_YOU_DONT_CONTROL, false));
|
||||
ability.addMode(mode);
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue