mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 05:09:16 -08:00
Changed type of CounterPredicate to Permanent
This commit is contained in:
parent
a5e6fd6322
commit
dd0df32e4b
2 changed files with 7 additions and 12 deletions
|
|
@ -34,12 +34,12 @@ import mage.Constants.Duration;
|
||||||
import mage.Constants.Rarity;
|
import mage.Constants.Rarity;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.effects.ContinuousEffect;
|
import mage.abilities.effects.ContinuousEffect;
|
||||||
|
import mage.abilities.effects.common.continious.BoostAllEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.abilities.effects.common.continious.BoostAllEffect;
|
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.filter.predicate.mageobject.CounterPredicate;
|
|
||||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||||
|
import mage.filter.predicate.permanent.CounterPredicate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -25,9 +25,8 @@
|
||||||
* authors and should not be interpreted as representing official policies, either expressed
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
* or implied, of BetaSteward_at_googlemail.com.
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
*/
|
*/
|
||||||
package mage.filter.predicate.mageobject;
|
package mage.filter.predicate.permanent;
|
||||||
|
|
||||||
import mage.MageObject;
|
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.predicate.Predicate;
|
import mage.filter.predicate.Predicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
|
|
@ -37,7 +36,7 @@ import mage.game.permanent.Permanent;
|
||||||
*
|
*
|
||||||
* @author jeff
|
* @author jeff
|
||||||
*/
|
*/
|
||||||
public class CounterPredicate implements Predicate<MageObject> {
|
public class CounterPredicate implements Predicate<Permanent> {
|
||||||
|
|
||||||
private final CounterType counter;
|
private final CounterType counter;
|
||||||
|
|
||||||
|
|
@ -46,12 +45,8 @@ public class CounterPredicate implements Predicate<MageObject> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(MageObject input, Game game) {
|
public boolean apply(Permanent input, Game game) {
|
||||||
Permanent permanent = game.getPermanent(input.getId());
|
return input.getCounters().containsKey(counter);
|
||||||
if (permanent != null) {
|
|
||||||
return permanent.getCounters().containsKey(counter);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
Loading…
Add table
Add a link
Reference in a new issue