Add script for Phyrexian Ingester

master
Jericho Pumpkin 2013-10-23 10:35:30 +00:00
parent 522acc6aa3
commit 356f096eb6
2 changed files with 63 additions and 0 deletions

View File

@ -0,0 +1,52 @@
def NONTOKEN_CREATURE = new MagicPermanentFilterImpl() {
public boolean accept(final MagicGame game,final MagicPlayer player,final MagicPermanent target) {
return target.isCreature() && !target.isToken();
}
};
[
new MagicWhenComesIntoPlayTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPayedCost payedCost) {
final MagicTargetChoice targetChoice = new MagicTargetChoice(
new MagicOtherPermanentTargetFilter(
NONTOKEN_CREATURE,
permanent
),
MagicTargetHint.None,
"another target nontoken creature to exile"
);
return new MagicEvent(
permanent,
new MagicMayChoice(targetChoice),
MagicExileTargetPicker.create(),
this,
"PN may\$ exile another target nontoken creature\$."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicPermanent source = event.getPermanent();
final MagicCardList exiled = source.getExiledCards();
if (event.isYes()) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent target) {
game.doAction(new MagicRemoveFromPlayAction(target, MagicLocationType.Exile));
exiled.addToTop(target.getCard());
}
});
}else{
exiled.addToTop(MagicCard.NONE);
}
}
},
new MagicStatic(MagicLayer.ModPT) {
@Override
public void modPowerToughness(final MagicPermanent source,final MagicPermanent permanent,final MagicPowerToughness pt) {
final MagicCardList exiled = permanent.getExiledCards();
final MagicCard card = exiled.getCardAtTop();
if (card != MagicCard.NONE) {
pt.add(card.getPower(),card.getToughness());
}
}
}
]

View File

@ -0,0 +1,11 @@
name=Phyrexian Ingester
url=http://magiccards.info/nph/en/41.html
image=http://magiccards.info/scans/en/nph/41.jpg
value=3.698
rarity=R
type=Creature
subtype=Beast
cost={6}{U}
pt=3/3
timing=main
requires_groovy_code