From d1cb0b3aa1da40206550cdffb9e83d3acf3e6e5b Mon Sep 17 00:00:00 2001 From: swordshine Date: Mon, 1 Apr 2013 00:27:38 +0000 Subject: [PATCH] - Currently no card has keyword "CARDNAME can't have -1/-1 counters placed on it.", replaced with canHaveCountersPlacedOnIt --- src/main/java/forge/card/ability/ai/CountersPutAi.java | 3 +-- src/main/java/forge/card/cost/CostPutCounter.java | 6 +----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/java/forge/card/ability/ai/CountersPutAi.java b/src/main/java/forge/card/ability/ai/CountersPutAi.java index 18c0e4c67c3..0fcc4087c96 100644 --- a/src/main/java/forge/card/ability/ai/CountersPutAi.java +++ b/src/main/java/forge/card/ability/ai/CountersPutAi.java @@ -49,8 +49,7 @@ public class CountersPutAi extends SpellAbilityAi { list = CardLists.filter(player.getCardsIn(ZoneType.Battlefield), new Predicate() { @Override public boolean apply(final Card c) { - return c.canBeTargetedBy(sa) && !c.hasKeyword("CARDNAME can't have counters placed on it.") - && !(c.hasKeyword("CARDNAME can't have -1/-1 counters placed on it.") && type.equals("M1M1")); + return c.canBeTargetedBy(sa) && c.canHaveCountersPlacedOnIt(CounterType.valueOf(type)); } }); diff --git a/src/main/java/forge/card/cost/CostPutCounter.java b/src/main/java/forge/card/cost/CostPutCounter.java index 3432222a25f..252fdfa87a5 100644 --- a/src/main/java/forge/card/cost/CostPutCounter.java +++ b/src/main/java/forge/card/cost/CostPutCounter.java @@ -193,11 +193,7 @@ public class CostPutCounter extends CostPartWithList { final Player activator = ability.getActivatingPlayer(); final Card source = ability.getSourceCard(); if (this.payCostFromSource()) { - if (source.hasKeyword("CARDNAME can't have counters placed on it.")) { - return false; - } - if (source.hasKeyword("CARDNAME can't have -1/-1 counters placed on it.") - && this.counter.equals(CounterType.M1M1)) { + if (!source.canHaveCountersPlacedOnIt(this.counter)) { return false; } } else {