added Unhallowed Pact and Vanishment
parent
fe854b2582
commit
a7532d9690
|
@ -0,0 +1,13 @@
|
||||||
|
name=Unhallowed Pact
|
||||||
|
url=http://magiccards.info/avr/en/124.html
|
||||||
|
image=http://magiccards.info/scans/en/avr/124.jpg
|
||||||
|
value=2
|
||||||
|
rarity=C
|
||||||
|
type=Enchantment
|
||||||
|
subtype=Aura
|
||||||
|
color=b
|
||||||
|
converted=3
|
||||||
|
cost={2}{B}
|
||||||
|
timing=aura
|
||||||
|
enchant=gain control,neg creature
|
||||||
|
requires_card_code
|
|
@ -0,0 +1,13 @@
|
||||||
|
name=Vanishment
|
||||||
|
url=http://magiccards.info/avr/en/82.html
|
||||||
|
image=http://magiccards.info/scans/en/avr/82.jpg
|
||||||
|
value=3
|
||||||
|
removal=3
|
||||||
|
rarity=U
|
||||||
|
type=Instant
|
||||||
|
color=u
|
||||||
|
converted=5
|
||||||
|
cost={4}{U}
|
||||||
|
ability=miracle {U}
|
||||||
|
timing=removal
|
||||||
|
requires_card_code
|
|
@ -0,0 +1,43 @@
|
||||||
|
package magic.card;
|
||||||
|
|
||||||
|
import magic.model.MagicCard;
|
||||||
|
import magic.model.MagicGame;
|
||||||
|
import magic.model.MagicPermanent;
|
||||||
|
import magic.model.action.MagicPlayCardAction;
|
||||||
|
import magic.model.action.MagicReanimateAction;
|
||||||
|
import magic.model.event.MagicEvent;
|
||||||
|
import magic.model.trigger.MagicWhenOtherPutIntoGraveyardFromPlayTrigger;
|
||||||
|
|
||||||
|
public class Unhallowed_Pact {
|
||||||
|
public static final MagicWhenOtherPutIntoGraveyardFromPlayTrigger T = new MagicWhenOtherPutIntoGraveyardFromPlayTrigger() {
|
||||||
|
@Override
|
||||||
|
public MagicEvent executeTrigger(
|
||||||
|
final MagicGame game,
|
||||||
|
final MagicPermanent permanent,
|
||||||
|
final MagicPermanent data) {
|
||||||
|
final MagicPermanent enchanted = permanent.getEnchantedCreature();
|
||||||
|
return (enchanted == data) ?
|
||||||
|
new MagicEvent(
|
||||||
|
permanent,
|
||||||
|
permanent.getController(),
|
||||||
|
new Object[]{enchanted.getCard()},
|
||||||
|
this,
|
||||||
|
"Return " + enchanted + " to the battlefield under your control."):
|
||||||
|
MagicEvent.NONE;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void executeEvent(
|
||||||
|
final MagicGame game,
|
||||||
|
final MagicEvent event,
|
||||||
|
final Object data[],
|
||||||
|
final Object[] choiceResults) {
|
||||||
|
final MagicCard card = (MagicCard)data[0];
|
||||||
|
if (card.getOwner().getGraveyard().contains(card)) {
|
||||||
|
game.doAction(new MagicReanimateAction(
|
||||||
|
event.getPlayer(),
|
||||||
|
card,
|
||||||
|
MagicPlayCardAction.NONE));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,47 @@
|
||||||
|
package magic.card;
|
||||||
|
|
||||||
|
import magic.model.MagicGame;
|
||||||
|
import magic.model.MagicLocationType;
|
||||||
|
import magic.model.MagicPayedCost;
|
||||||
|
import magic.model.MagicPermanent;
|
||||||
|
import magic.model.action.MagicMoveCardAction;
|
||||||
|
import magic.model.action.MagicPermanentAction;
|
||||||
|
import magic.model.action.MagicRemoveFromPlayAction;
|
||||||
|
import magic.model.choice.MagicTargetChoice;
|
||||||
|
import magic.model.event.MagicEvent;
|
||||||
|
import magic.model.event.MagicSpellCardEvent;
|
||||||
|
import magic.model.stack.MagicCardOnStack;
|
||||||
|
import magic.model.target.MagicBounceTargetPicker;
|
||||||
|
|
||||||
|
public class Vanishment {
|
||||||
|
public static final MagicSpellCardEvent E = new MagicSpellCardEvent() {
|
||||||
|
@Override
|
||||||
|
public MagicEvent getEvent(
|
||||||
|
final MagicCardOnStack cardOnStack,
|
||||||
|
final MagicPayedCost payedCost) {
|
||||||
|
return new MagicEvent(
|
||||||
|
cardOnStack.getCard(),
|
||||||
|
cardOnStack.getController(),
|
||||||
|
MagicTargetChoice.NEG_TARGET_NONLAND_PERMANENT,
|
||||||
|
MagicBounceTargetPicker.getInstance(),
|
||||||
|
new Object[]{cardOnStack},
|
||||||
|
this,
|
||||||
|
"Put target nonland permanent$ on top of its owner's library.");
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void executeEvent(
|
||||||
|
final MagicGame game,
|
||||||
|
final MagicEvent event,
|
||||||
|
final Object[] data,
|
||||||
|
final Object[] choiceResults) {
|
||||||
|
game.doAction(new MagicMoveCardAction((MagicCardOnStack)data[0]));
|
||||||
|
event.processTargetPermanent(game,choiceResults,0,new MagicPermanentAction() {
|
||||||
|
public void doAction(final MagicPermanent creature) {
|
||||||
|
game.doAction(new MagicRemoveFromPlayAction(
|
||||||
|
creature,
|
||||||
|
MagicLocationType.TopOfOwnersLibrary));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue