added Condemn and Counsel of the Soratami

master
beholder 2011-09-21 07:52:44 +02:00
parent a1486f6d92
commit 1cbb0d6d5f
3 changed files with 103 additions and 0 deletions

View File

@ -3696,6 +3696,17 @@ converted=1
cost={W}
timing=removal
>Condemn
image=http://magiccards.info/scans/en/m11/11.jpg
value=2
removal=3
rarity=U
type=Instant
color=w
converted=1
cost={W}
timing=removal
>Cancel
image=http://magiccards.info/scans/en/m12/47.jpg
value=3
@ -4320,6 +4331,16 @@ converted=2
cost={X}{R}{G}
timing=removal
>Counsel of the Soratami
image=http://magiccards.info/scans/en/10e/76.jpg
value=2
rarity=C
type=Sorcery
color=u
converted=3
cost={2}{U}
timing=draw
>Divination
image=http://magiccards.info/scans/en/m10/49.jpg
value=2

View File

@ -0,0 +1,48 @@
package magic.card;
import magic.model.MagicGame;
import magic.model.MagicLocationType;
import magic.model.MagicPayedCost;
import magic.model.MagicPermanent;
import magic.model.action.MagicChangeLifeAction;
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.MagicExileTargetPicker;
public class Condemn {
public static final MagicSpellCardEvent S = new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack.getCard(),
cardOnStack.getController(),
MagicTargetChoice.NEG_TARGET_ATTACKING_CREATURE,
MagicExileTargetPicker.getInstance(), // could use a better TargetPicker
new Object[]{cardOnStack},
this,
"Put target creature$ on the bottom of its owner's library. " +
"Its controller gains life equal to its toughness.");
}
@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 MagicChangeLifeAction(
creature.getController(),
creature.getToughness(game)));
game.doAction(new MagicRemoveFromPlayAction(creature,MagicLocationType.BottomOfOwnersLibrary));
}
});
}
};
}

View File

@ -0,0 +1,34 @@
package magic.card;
import magic.model.MagicGame;
import magic.model.MagicPayedCost;
import magic.model.MagicPlayer;
import magic.model.action.MagicDrawAction;
import magic.model.action.MagicMoveCardAction;
import magic.model.event.MagicEvent;
import magic.model.event.MagicSpellCardEvent;
import magic.model.stack.MagicCardOnStack;
public class Counsel_of_the_Soratami {
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,
new Object[]{cardOnStack,player},
this,
"Draw two cards.");
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object[] data,
final Object[] choiceResults) {
game.doAction(new MagicMoveCardAction((MagicCardOnStack)data[0]));
game.doAction(new MagicDrawAction((MagicPlayer)data[1],2));
}
};
}