mirror of
https://github.com/correl/mage.git
synced 2025-03-13 01:09:53 -09:00
Began implementing Cephalid Snitch methods
This commit is contained in:
parent
24f6dc6031
commit
e2a5561a87
2 changed files with 5 additions and 15 deletions
Mage.Sets/src/mage/cards/c
Mage/src/main/java/mage/abilities/keyword
|
@ -36,26 +36,16 @@ import mage.ObjectColor;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.LoseAbilityTargetEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.FilterObject;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
|
|
@ -55,7 +55,7 @@ public class ProtectionAbility extends StaticAbility {
|
|||
|
||||
protected Filter filter;
|
||||
protected boolean removeAuras;
|
||||
protected static List<ObjectColor> objectColors = new ArrayList<>();
|
||||
protected static List<ObjectColor> colors = new ArrayList<>();
|
||||
protected UUID auraIdNotToBeRemoved; // defines an Aura objectId that will not be removed from this protection ability
|
||||
|
||||
public ProtectionAbility(Filter filter) {
|
||||
|
@ -75,15 +75,15 @@ public class ProtectionAbility extends StaticAbility {
|
|||
public static ProtectionAbility from(ObjectColor color) {
|
||||
FilterObject filter = new FilterObject(color.getDescription());
|
||||
filter.add(new ColorPredicate(color));
|
||||
objectColors.add(color);
|
||||
colors.add(color);
|
||||
return new ProtectionAbility(filter);
|
||||
}
|
||||
|
||||
public static ProtectionAbility from(ObjectColor color1, ObjectColor color2) {
|
||||
FilterObject filter = new FilterObject(color1.getDescription() + " and from " + color2.getDescription());
|
||||
filter.add(Predicates.or(new ColorPredicate(color1), new ColorPredicate(color2)));
|
||||
objectColors.add(color1);
|
||||
objectColors.add(color2);
|
||||
colors.add(color1);
|
||||
colors.add(color2);
|
||||
return new ProtectionAbility(filter);
|
||||
}
|
||||
|
||||
|
@ -146,7 +146,7 @@ public class ProtectionAbility extends StaticAbility {
|
|||
return removeAuras;
|
||||
}
|
||||
|
||||
public List<ObjectColor> getColors() { return objectColors; }
|
||||
public List<ObjectColor> getColors() { return colors; }
|
||||
|
||||
public UUID getAuraIdNotToBeRemoved() {
|
||||
return auraIdNotToBeRemoved;
|
||||
|
|
Loading…
Add table
Reference in a new issue