mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 05:22:02 -08:00
* Haktos the Unscarred - Fixed some problems with the protection ability not working correctly.
This commit is contained in:
parent
cf072f0b1a
commit
42265d78d8
3 changed files with 16 additions and 15 deletions
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.abilities.keyword;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -81,8 +80,10 @@ public class ProtectionAbility extends StaticAbility {
|
|||
}
|
||||
|
||||
if (filter instanceof FilterCard) {
|
||||
if (source instanceof Card) {
|
||||
return !filter.match(source, game);
|
||||
if (source instanceof Permanent) {
|
||||
return !((FilterCard) filter).match((Card) source, getSourceId(), ((Permanent) source).getControllerId(), game);
|
||||
} else if (source instanceof Card) {
|
||||
return !((FilterCard) filter).match((Card) source, getSourceId(), ((Card) source).getOwnerId(), game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
@ -120,7 +121,9 @@ public class ProtectionAbility extends StaticAbility {
|
|||
return removeAuras;
|
||||
}
|
||||
|
||||
public List<ObjectColor> getColors() { return colors; }
|
||||
public List<ObjectColor> getColors() {
|
||||
return colors;
|
||||
}
|
||||
|
||||
public UUID getAuraIdNotToBeRemoved() {
|
||||
return auraIdNotToBeRemoved;
|
||||
|
|
|
|||
|
|
@ -1,15 +1,14 @@
|
|||
package mage.filter;
|
||||
|
||||
import mage.cards.Card;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.predicate.*;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
import mage.cards.Card;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.predicate.*;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue