forked from External/mage
* Tawnos's Coffin - Fixed that it did not work correctly if abilities were copied by Mairsil, The Pretenderand and general rework.
This commit is contained in:
parent
34e9fb7296
commit
77f6f7b2b6
4 changed files with 232 additions and 102 deletions
|
|
@ -69,22 +69,22 @@ public final class StaticFilters {
|
|||
|
||||
public static final FilterPermanent FILTER_ATTACKING_CREATURES = new FilterCreaturePermanent("attacking creatures");
|
||||
|
||||
public static final FilterPermanent FILTER_AURA = new FilterPermanent();
|
||||
public static final FilterPermanent FILTER_EQUIPMENT = new FilterPermanent();
|
||||
public static final FilterPermanent FILTER_FORTIFICATION = new FilterPermanent();
|
||||
public static final FilterPermanent FILTER_LEGENDARY = new FilterPermanent();
|
||||
public static final FilterPermanent FILTER_PERMANENT_AURA = new FilterPermanent();
|
||||
public static final FilterPermanent FILTER_PERMANENT_EQUIPMENT = new FilterPermanent();
|
||||
public static final FilterPermanent FILTER_PERMANENT_FORTIFICATION = new FilterPermanent();
|
||||
public static final FilterPermanent FILTER_PERMANENT_LEGENDARY = new FilterPermanent();
|
||||
|
||||
static {
|
||||
FILTER_AURA.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
FILTER_AURA.add(new SubtypePredicate(SubType.AURA));
|
||||
FILTER_PERMANENT_AURA.add(new CardTypePredicate(CardType.ENCHANTMENT));
|
||||
FILTER_PERMANENT_AURA.add(new SubtypePredicate(SubType.AURA));
|
||||
|
||||
FILTER_EQUIPMENT.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||
FILTER_EQUIPMENT.add(new SubtypePredicate(SubType.EQUIPMENT));
|
||||
FILTER_PERMANENT_EQUIPMENT.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||
FILTER_PERMANENT_EQUIPMENT.add(new SubtypePredicate(SubType.EQUIPMENT));
|
||||
|
||||
FILTER_FORTIFICATION.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||
FILTER_FORTIFICATION.add(new SubtypePredicate(SubType.FORTIFICATION));
|
||||
FILTER_PERMANENT_FORTIFICATION.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||
FILTER_PERMANENT_FORTIFICATION.add(new SubtypePredicate(SubType.FORTIFICATION));
|
||||
|
||||
FILTER_LEGENDARY.add(new SupertypePredicate(SuperType.LEGENDARY));
|
||||
FILTER_PERMANENT_LEGENDARY.add(new SupertypePredicate(SuperType.LEGENDARY));
|
||||
}
|
||||
|
||||
static {
|
||||
|
|
|
|||
|
|
@ -1774,7 +1774,7 @@ public abstract class GameImpl implements Game, Serializable {
|
|||
if (perm.isWorld()) {
|
||||
worldEnchantment.add(perm);
|
||||
}
|
||||
if (StaticFilters.FILTER_AURA.match(perm, this)) {
|
||||
if (StaticFilters.FILTER_PERMANENT_AURA.match(perm, this)) {
|
||||
//20091005 - 704.5n, 702.14c
|
||||
if (perm.getAttachedTo() == null) {
|
||||
Card card = this.getCard(perm.getId());
|
||||
|
|
@ -1852,10 +1852,10 @@ public abstract class GameImpl implements Game, Serializable {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (this.getState().isLegendaryRuleActive() && StaticFilters.FILTER_LEGENDARY.match(perm, this)) {
|
||||
if (this.getState().isLegendaryRuleActive() && StaticFilters.FILTER_PERMANENT_LEGENDARY.match(perm, this)) {
|
||||
legendary.add(perm);
|
||||
}
|
||||
if (StaticFilters.FILTER_EQUIPMENT.match(perm, this)) {
|
||||
if (StaticFilters.FILTER_PERMANENT_EQUIPMENT.match(perm, this)) {
|
||||
//20091005 - 704.5p, 702.14d
|
||||
if (perm.getAttachedTo() != null) {
|
||||
Permanent attachedTo = getPermanent(perm.getAttachedTo());
|
||||
|
|
@ -1880,7 +1880,7 @@ public abstract class GameImpl implements Game, Serializable {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (StaticFilters.FILTER_FORTIFICATION.match(perm, this)) {
|
||||
if (StaticFilters.FILTER_PERMANENT_FORTIFICATION.match(perm, this)) {
|
||||
if (perm.getAttachedTo() != null) {
|
||||
Permanent land = getPermanent(perm.getAttachedTo());
|
||||
if (land == null || !land.getAttachments().contains(perm.getId())) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue