mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
Changed UrzaTerrainValue to check Subtype instead of Name
This commit is contained in:
parent
0745fbb153
commit
85b46b7474
1 changed files with 4 additions and 4 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue