mirror of
https://github.com/magefree/mage.git
synced 2026-01-25 12:49:39 -08:00
Add triggered ability test for sacred test. Fix sacred ground to work with triggered abilities
This commit is contained in:
parent
dce2b027ee
commit
8c292e4e9f
2 changed files with 73 additions and 2 deletions
|
|
@ -42,6 +42,8 @@ import mage.game.events.GameEvent;
|
|||
import mage.game.events.ZoneChangeEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.game.stack.StackAbility;
|
||||
import mage.game.stack.StackObject;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
|
|
@ -94,7 +96,7 @@ class SacredGroundTriggeredAbility extends TriggeredAbilityImpl {
|
|||
Permanent targetPermanent = zce.getTarget();
|
||||
if (targetPermanent.getCardType().contains(CardType.LAND) && targetPermanent.getControllerId().equals(getControllerId())) {
|
||||
MageObject mageObject = game.getShortLivingLKI(event.getSourceId(), Zone.STACK);
|
||||
if ((mageObject instanceof Spell) || (mageObject instanceof ActivatedAbility)) {
|
||||
if (mageObject instanceof StackObject) {
|
||||
getEffects().get(0).setTargetPointer(new FixedTarget(targetPermanent.getId()));
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue