2013-05-26 22:11:05 -07:00
|
|
|
[
|
2013-07-09 05:41:40 -07:00
|
|
|
new MagicWhenOtherDiesTrigger() {
|
2013-05-26 22:11:05 -07:00
|
|
|
@Override
|
|
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent otherPermanent) {
|
|
|
|
return (otherPermanent.isEnemy(permanent) &&
|
|
|
|
otherPermanent.isCreature()) ?
|
|
|
|
new MagicEvent(
|
|
|
|
permanent,
|
|
|
|
new MagicMayChoice(
|
|
|
|
MagicTargetChoice.TARGET_ARTIFACT_CARD_FROM_GRAVEYARD
|
|
|
|
),
|
2013-09-06 06:22:54 -07:00
|
|
|
MagicGraveyardTargetPicker.ReturnToHand,
|
2013-05-26 22:11:05 -07:00
|
|
|
this,
|
|
|
|
"PN may\$ return target artifact card\$ " +
|
|
|
|
"from his or her graveyard to his or her hand."
|
|
|
|
) :
|
|
|
|
MagicEvent.NONE;
|
|
|
|
}
|
|
|
|
@Override
|
|
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
|
|
if (event.isYes()) {
|
|
|
|
event.processTargetCard(game,new MagicCardAction() {
|
|
|
|
public void doAction(final MagicCard card) {
|
|
|
|
game.doAction(new MagicRemoveCardAction(card,MagicLocationType.Graveyard));
|
|
|
|
game.doAction(new MagicMoveCardAction(card,MagicLocationType.Graveyard,MagicLocationType.OwnersHand));
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|