Add script for Pendrell Mists

master
Jericho Pumpkin 2013-10-03 18:53:52 +00:00
parent 00d0d42e50
commit fb4728dd31
2 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,34 @@
def MistsUpkeep = new MagicAtUpkeepTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer upkeepPlayer) {
return permanent.isController(upkeepPlayer) ?
new MagicEvent(
permanent,
new MagicMayChoice(
new MagicPayManaCostChoice(MagicManaCost.create("{1}"))
),
this,
"You may\$ pay {1}\$. If you don't, destroy SN."
) :
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isNo()) {
game.doAction(new MagicSacrificeAction(event.getPermanent()));
}
}
};
[
new MagicStatic(
MagicLayer.Ability,
MagicTargetFilter.TARGET_CREATURE
) {
@Override
public void modAbilityFlags(final MagicPermanent source,final MagicPermanent permanent,final Set<MagicAbility> flags) {
permanent.addAbility(MistsUpkeep);
}
}
]

View File

@ -0,0 +1,9 @@
name=Pendrell Mists
url=http://magiccards.info/wl/en/47.html
image=http://magiccards.info/scans/en/wl/47.jpg
value=4.172
rarity=R
type=Enchantment
cost={3}{U}
timing=enchantment
requires_groovy_code