Changed UrzaTerrainValue to check Subtype instead of Name

This commit is contained in:
fireshoes 2015-01-15 17:06:04 -06:00
parent 0745fbb153
commit 85b46b7474

View file

@ -4,7 +4,7 @@ import mage.abilities.Ability;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.effects.Effect;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.NamePredicate;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game;
public class UrzaTerrainValue implements DynamicValue {
@ -17,7 +17,7 @@ public class UrzaTerrainValue implements DynamicValue {
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
FilterControlledPermanent pp = new FilterControlledPermanent("Urza's Power Plant");
pp.add(new NamePredicate("Urza's Power Plant"));
pp.add(new SubtypePredicate("Urza's Power Plant"));
PermanentsOnBattlefieldCount ppP = new PermanentsOnBattlefieldCount(pp);
if (ppP.calculate(game, sourceAbility, effect) < 1)
{
@ -25,7 +25,7 @@ public class UrzaTerrainValue implements DynamicValue {
}
FilterControlledPermanent to = new FilterControlledPermanent("Urza's Tower");
to.add(new NamePredicate("Urza's Tower"));
to.add(new SubtypePredicate("Urza's Tower"));
PermanentsOnBattlefieldCount toP = new PermanentsOnBattlefieldCount(to);
if (toP.calculate(game, sourceAbility, effect) < 1)
{
@ -33,7 +33,7 @@ public class UrzaTerrainValue implements DynamicValue {
}
FilterControlledPermanent mi = new FilterControlledPermanent("Urza's Mine");
mi.add(new NamePredicate("Urza's Mine"));
mi.add(new SubtypePredicate("Urza's Mine"));
PermanentsOnBattlefieldCount miP = new PermanentsOnBattlefieldCount(mi);
if (miP.calculate(game, sourceAbility, effect) < 1)
{