forked from External/mage
subtypes #1
This commit is contained in:
parent
24ff9f7c5e
commit
c44c301f5b
293 changed files with 2291 additions and 550 deletions
|
|
@ -3,6 +3,7 @@ package mage.abilities.dynamicvalue.common;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
|
|
@ -18,24 +19,24 @@ 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 SubtypePredicate("Urza's"));
|
||||
pp.add(new SubtypePredicate("Power-Plant"));
|
||||
pp.add(new SubtypePredicate(SubType.URZAS));
|
||||
pp.add(new SubtypePredicate(SubType.POWER_PLANT));
|
||||
PermanentsOnBattlefieldCount ppP = new PermanentsOnBattlefieldCount(pp);
|
||||
if (ppP.calculate(game, sourceAbility, effect) < 1) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
FilterControlledPermanent to = new FilterControlledPermanent("Urza's Tower");
|
||||
to.add(new SubtypePredicate("Urza's"));
|
||||
to.add(new SubtypePredicate("Tower"));
|
||||
to.add(new SubtypePredicate(SubType.URZAS));
|
||||
to.add(new SubtypePredicate(SubType.TOWER));
|
||||
PermanentsOnBattlefieldCount toP = new PermanentsOnBattlefieldCount(to);
|
||||
if (toP.calculate(game, sourceAbility, effect) < 1) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
FilterControlledPermanent mi = new FilterControlledPermanent("Urza's Mine");
|
||||
mi.add(new SubtypePredicate("Urza's"));
|
||||
mi.add(new SubtypePredicate("Mine"));
|
||||
mi.add(new SubtypePredicate(SubType.URZAS));
|
||||
mi.add(new SubtypePredicate(SubType.MINE));
|
||||
PermanentsOnBattlefieldCount miP = new PermanentsOnBattlefieldCount(mi);
|
||||
if (miP.calculate(game, sourceAbility, effect) < 1) {
|
||||
return 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue