mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
Fixed a problem with filetring of CantBeTargetedAllEffect.
This commit is contained in:
parent
24fc597fe5
commit
1a8f38759b
2 changed files with 7 additions and 0 deletions
|
|
@ -34,6 +34,7 @@ import mage.constants.Duration;
|
|||
import mage.constants.Outcome;
|
||||
import mage.filter.FilterObject;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
|
|
@ -93,6 +94,10 @@ public class CantBeTargetedAllEffect extends ContinuousRuleModifyingEffectImpl {
|
|||
StackObject stackObject = game.getStack().getStackObject(event.getSourceId());
|
||||
MageObject sourceObject;
|
||||
if (stackObject instanceof StackAbility) {
|
||||
if (filterSource instanceof FilterSpell) {
|
||||
// only spells have to be selected
|
||||
return false;
|
||||
}
|
||||
sourceObject = ((StackAbility) stackObject).getSourceObject(game);
|
||||
} else {
|
||||
sourceObject = stackObject;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue