forked from External/mage
move findTargetingStackObject from CardUtil to Game, so saved data can be cleared with short living lki add test cases
This commit is contained in:
parent
030e8ae5d3
commit
24f030fa71
13 changed files with 181 additions and 73 deletions
|
|
@ -8,10 +8,9 @@ import mage.filter.FilterStackObject;
|
|||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.stack.StackObject;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.stack.StackObject;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
* @author LoneFox
|
||||
|
|
@ -54,7 +53,7 @@ public class BecomesTargetAttachedTriggeredAbility extends TriggeredAbilityImpl
|
|||
if (enchantment == null || enchantment.getAttachedTo() == null || !event.getTargetId().equals(enchantment.getAttachedTo())) {
|
||||
return false;
|
||||
}
|
||||
StackObject targetingObject = CardUtil.findTargetingStackObject(this.getId().toString(), event, game);
|
||||
StackObject targetingObject = game.findTargetingStackObject(this.getId().toString(), event);
|
||||
if (targetingObject == null || !filter.match(targetingObject, getControllerId(), this, game)) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue