mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 21:12:04 -08:00
finish rewriting subtypepredicate
This commit is contained in:
parent
8ab4f5b454
commit
6d83a4a65f
342 changed files with 736 additions and 634 deletions
|
|
@ -249,6 +249,7 @@ public enum SubType {
|
|||
SHAPESHIFTER("Shapeshifter", SubTypeSet.CreatureType, false),
|
||||
SHEEP("Sheep", SubTypeSet.CreatureType, false),
|
||||
SIREN("Siren", SubTypeSet.CreatureType, false),
|
||||
SITH("Sith", SubTypeSet.CreatureType, false),
|
||||
SKELETON("Skeleton", SubTypeSet.CreatureType, false),
|
||||
SLITH("Slith", SubTypeSet.CreatureType, false),
|
||||
SLIVER("Sliver", SubTypeSet.CreatureType, false),
|
||||
|
|
@ -307,6 +308,7 @@ public enum SubType {
|
|||
ZUBERA("Zubera", SubTypeSet.CreatureType, false),
|
||||
|
||||
AJANI("Ajani", SubTypeSet.PlaneswalkerType, false),
|
||||
BOLAS("Bolas", SubTypeSet.PlaneswalkerType, false),
|
||||
CHANDRA("Chandra", SubTypeSet.PlaneswalkerType, false),
|
||||
GIDEON("Gideon", SubTypeSet.PlaneswalkerType, false),
|
||||
JACE("Jace", SubTypeSet.PlaneswalkerType, false),
|
||||
|
|
|
|||
|
|
@ -44,9 +44,6 @@ public class SubtypePredicate implements Predicate<MageObject> {
|
|||
this.subtype = subtype;
|
||||
}
|
||||
|
||||
public SubtypePredicate(String subtype){
|
||||
this.subtype = SubType.byDescription(subtype);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(MageObject input, Game game) {
|
||||
|
|
|
|||
|
|
@ -33,13 +33,10 @@ import mage.abilities.common.SimpleStaticAbility;
|
|||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Layer;
|
||||
import mage.constants.*;
|
||||
|
||||
import static mage.constants.Layer.AbilityAddingRemovingEffects_6;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
|
|
@ -66,7 +63,7 @@ class KothOfTheHammerThirdEffect extends ContinuousEffectImpl {
|
|||
static final FilterLandPermanent mountains = new FilterLandPermanent("Mountain you control");
|
||||
|
||||
static {
|
||||
mountains.add(new SubtypePredicate("Mountain"));
|
||||
mountains.add(new SubtypePredicate(SubType.MOUNTAIN));
|
||||
mountains.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
|||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
|
|
@ -59,7 +60,7 @@ class LilianaZombiesCount implements DynamicValue {
|
|||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Zombie"));
|
||||
filter.add(new SubtypePredicate(SubType.ZOMBIE));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue