- [NEO] added Eater of Virtue

This commit is contained in:
Jeff Wadsworth 2022-02-08 09:08:50 -06:00
parent 9f68d950b9
commit b83d76bb08
3 changed files with 207 additions and 0 deletions

View file

@ -110,6 +110,19 @@ public class DiesAttachedTriggeredAbility extends TriggeredAbilityImpl {
}
}
}
// set targetpointer to the creature that died
if (setTargetPointer == SetTargetPointer.CARD
|| setTargetPointer == SetTargetPointer.PERMANENT) {
Permanent attachment = game.getPermanentOrLKIBattlefield(getSourceId());
if (attachment != null
&& attachment.getAttachedTo() != null) {
Permanent attachedTo = (Permanent) game.getLastKnownInformation(attachment.getAttachedTo(),
Zone.BATTLEFIELD, attachment.getAttachedToZoneChangeCounter());
if (attachedTo != null) {
getEffects().setTargetPointer(new FixedTarget(attachedTo.getId()));
}
}
}
return true;
}