Add Isareth the Awakener

master
Ada Joule 2018-11-09 04:41:47 +07:00 committed by Melvin Zhang
parent 8ccca8aa3d
commit 78f64e09d4
2 changed files with 48 additions and 2 deletions

View File

@ -0,0 +1,46 @@
def action = {
final MagicGame game, final MagicEvent event ->
final MagicCard card = event.getRefCard();
final int cost = card.getConvertedCost();
if (event.isYes()) {
final MagicEvent manaCost = new MagicPayManaCostEvent(event.getSource(), "{${cost}}");
if (manaCost.isSatisfied()) {
game.addEvent(manaCost);
game.doAction(new ReturnCardAction(
MagicLocationType.Graveyard,
card,
event.getPlayer(),
MagicPlayMod.CORPSE_COUNTER,
MagicPlayMod.EXILE_WHEN_LEAVES
));
}
}
}
[
new ThisAttacksTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPermanent attacker) {
return new MagicEvent(
permanent,
TARGET_CREATURE_CARD_FROM_GRAVEYARD,
this,
"Choose target creature card from your graveyard.\$"
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetCard(game, {
final int cost = it.getConvertedCost();
game.addEvent(new MagicEvent(
event.getSource(),
new MagicMayChoice("Pay {${cost}}?"),
it,
action,
"PN may\$ pay {${cost}}. When PN does, PN returns target creature card with converted mana cost X from PN's graveyard to the battlefield with a corpse counter on it. If that creature would leave the battlefield, exile it instead of putting it anywhere else."
));
});
}
}
]

View File

@ -6,7 +6,7 @@ type=Legendary,Creature
subtype=Human,Wizard
cost={1}{B}{B}
pt=3/3
ability=Deathtouch;\
Whenever SN attacks, you may pay {X}. When you do, return target creature card with converted mana cost X from your graveyard to the battlefield with a corpse counter on it. If that creature would leave the battlefield, exile it instead of putting it anywhere else.
ability=Deathtouch
timing=main
requires_groovy_code
oracle=Deathtouch\nWhenever Isareth the Awakener attacks, you may pay {X}. When you do, return target creature card with converted mana cost X from your graveyard to the battlefield with a corpse counter on it. If that creature would leave the battlefield, exile it instead of putting it anywhere else.