added Regrowth and Blinking Spirit
parent
f3521a1ba1
commit
a454a0fc71
|
@ -11768,3 +11768,25 @@ color=b
|
|||
converted=3
|
||||
cost={2}{B}
|
||||
timing=enchantment
|
||||
|
||||
>Regrowth
|
||||
image=http://magiccards.info/scans/en/me4/163.jpg
|
||||
value=4
|
||||
rarity=R
|
||||
type=Sorcery
|
||||
color=g
|
||||
converted=2
|
||||
cost={1}{G}
|
||||
timing=draw
|
||||
|
||||
>Blinking Spirit
|
||||
image=http://magiccards.info/scans/en/9e/8.jpg
|
||||
value=3
|
||||
rarity=R
|
||||
type=Creature
|
||||
subtype=Spirit
|
||||
color=w
|
||||
converted=4
|
||||
cost={3}{W}
|
||||
pt=2/2
|
||||
timing=main
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
package magic.card;
|
||||
|
||||
import magic.model.MagicGame;
|
||||
import magic.model.MagicLocationType;
|
||||
import magic.model.MagicManaCost;
|
||||
import magic.model.MagicPayedCost;
|
||||
import magic.model.MagicPermanent;
|
||||
import magic.model.MagicSource;
|
||||
import magic.model.action.MagicRemoveFromPlayAction;
|
||||
import magic.model.condition.MagicCondition;
|
||||
import magic.model.event.MagicActivationHints;
|
||||
import magic.model.event.MagicEvent;
|
||||
import magic.model.event.MagicPayManaCostEvent;
|
||||
import magic.model.event.MagicPermanentActivation;
|
||||
import magic.model.event.MagicTiming;
|
||||
|
||||
public class Blinking_Spirit {
|
||||
public static final MagicPermanentActivation A = new MagicPermanentActivation(
|
||||
new MagicCondition[]{MagicManaCost.ZERO.getCondition()},
|
||||
new MagicActivationHints(MagicTiming.Removal),
|
||||
"Return") {
|
||||
@Override
|
||||
public MagicEvent[] getCostEvent(final MagicSource source) {
|
||||
return new MagicEvent[]{new MagicPayManaCostEvent(source,source.getController(),MagicManaCost.ZERO)};
|
||||
}
|
||||
@Override
|
||||
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
|
||||
return new MagicEvent(
|
||||
source,
|
||||
source.getController(),
|
||||
new Object[]{source},
|
||||
this,
|
||||
"Return " + source + " to its owner's hand.");
|
||||
}
|
||||
@Override
|
||||
public void executeEvent(
|
||||
final MagicGame game,
|
||||
final MagicEvent event,
|
||||
final Object[] data,
|
||||
final Object[] choiceResults) {
|
||||
game.doAction(new MagicRemoveFromPlayAction((MagicPermanent)data[0],MagicLocationType.OwnersHand));
|
||||
}
|
||||
};
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
package magic.card;
|
||||
|
||||
import magic.model.MagicCard;
|
||||
import magic.model.MagicGame;
|
||||
import magic.model.MagicLocationType;
|
||||
import magic.model.MagicPayedCost;
|
||||
import magic.model.MagicPlayer;
|
||||
import magic.model.action.MagicCardAction;
|
||||
import magic.model.action.MagicMoveCardAction;
|
||||
import magic.model.action.MagicRemoveCardAction;
|
||||
import magic.model.choice.MagicTargetChoice;
|
||||
import magic.model.event.MagicEvent;
|
||||
import magic.model.event.MagicSpellCardEvent;
|
||||
import magic.model.stack.MagicCardOnStack;
|
||||
import magic.model.target.MagicGraveyardTargetPicker;
|
||||
|
||||
public class Regrowth {
|
||||
public static final MagicSpellCardEvent S = new MagicSpellCardEvent() {
|
||||
@Override
|
||||
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
|
||||
final MagicPlayer player = cardOnStack.getController();
|
||||
return new MagicEvent(
|
||||
cardOnStack.getCard(),
|
||||
player,
|
||||
MagicTargetChoice.TARGET_CARD_FROM_GRAVEYARD,
|
||||
new MagicGraveyardTargetPicker(false),
|
||||
new Object[]{cardOnStack,player},
|
||||
this,
|
||||
"Return target card$ from your graveyard to your hand.");
|
||||
}
|
||||
@Override
|
||||
public void executeEvent(
|
||||
final MagicGame game,
|
||||
final MagicEvent event,
|
||||
final Object[] data,
|
||||
final Object[] choiceResults) {
|
||||
game.doAction(new MagicMoveCardAction((MagicCardOnStack)data[0]));
|
||||
event.processTargetCard(game,choiceResults,0,new MagicCardAction() {
|
||||
public void doAction(final MagicCard targetCard) {
|
||||
game.doAction(new MagicRemoveCardAction(targetCard,MagicLocationType.Graveyard));
|
||||
game.doAction(new MagicMoveCardAction(targetCard,MagicLocationType.Graveyard,MagicLocationType.OwnersHand));
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue