added Admonition Angel. corrected Cosi's Ravager

master
beholder 2011-10-19 15:46:22 +02:00
parent bc60adeb1e
commit f8ad4cfccf
3 changed files with 107 additions and 1 deletions

View File

@ -15661,3 +15661,17 @@ converted=4
cost={3}{B}
pt=7/6
timing=main
>Admonition Angel
url=http://magiccards.info/wwk/en/1.html
image=http://magiccards.info/scans/en/wwk/1.jpg
value=5
rarity=M
type=Creature
subtype=Angel
color=w
converted=6
cost={3}{W}{W}{W}
pt=6/6
ability=flying
timing=main

View File

@ -0,0 +1,92 @@
package magic.card;
import magic.model.MagicCardList;
import magic.model.MagicGame;
import magic.model.MagicLocationType;
import magic.model.MagicPermanent;
import magic.model.MagicPlayer;
import magic.model.action.MagicExileUntilThisLeavesPlayAction;
import magic.model.action.MagicPermanentAction;
import magic.model.action.MagicReturnExiledUntilThisLeavesPlayAction;
import magic.model.choice.MagicChoice;
import magic.model.choice.MagicMayChoice;
import magic.model.choice.MagicTargetChoice;
import magic.model.event.MagicEvent;
import magic.model.target.MagicExileTargetPicker;
import magic.model.target.MagicTargetFilter;
import magic.model.target.MagicTargetHint;
import magic.model.trigger.MagicWhenLeavesPlayTrigger;
import magic.model.trigger.MagicWhenOtherComesIntoPlayTrigger;
public class Admonition_Angel {
public static final MagicWhenOtherComesIntoPlayTrigger T1 = new MagicWhenOtherComesIntoPlayTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent played) {
final MagicPlayer player = permanent.getController();
if (player == played.getController() && played.isLand()) {
final MagicTargetFilter targetFilter =
new MagicTargetFilter.MagicOtherPermanentTargetFilter(
MagicTargetFilter.TARGET_NONLAND_PERMANENT,permanent);
final MagicTargetChoice targetChoice =
new MagicTargetChoice(
targetFilter,true,MagicTargetHint.None,"another target nonland permanent");
final MagicChoice mayChoice =
new MagicMayChoice(
player + " may exile another target nonland permanent.",
targetChoice);
return new MagicEvent(
permanent,
player,
mayChoice,
MagicExileTargetPicker.getInstance(),
new Object[]{permanent},
this,
player + " may$ exile another target nonland permanent$.");
}
return MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object data[],
final Object[] choiceResults) {
if (MagicMayChoice.isYesChoice(choiceResults[0])) {
event.processTargetPermanent(game,choiceResults,1,new MagicPermanentAction() {
public void doAction(final MagicPermanent target) {
game.doAction(new MagicExileUntilThisLeavesPlayAction((MagicPermanent)data[0],target));
}
});
}
}
};
public static final MagicWhenLeavesPlayTrigger T2 = new MagicWhenLeavesPlayTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPermanent data) {
if (permanent == data &&
!permanent.getExiledCards().isEmpty()) {
final MagicCardList clist = new MagicCardList(permanent.getExiledCards());
return new MagicEvent(
permanent,
permanent.getController(),
new Object[]{permanent},
this,
clist.size() > 1 ?
"Return exiled cards to the battlefield." :
"Return " + clist.get(0) + " to the battlefield.");
}
return MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object data[],
final Object[] choiceResults) {
final MagicPermanent permanent = (MagicPermanent)data[0];
game.doAction(new MagicReturnExiledUntilThisLeavesPlayAction(permanent,MagicLocationType.Play));
}
};
}

View File

@ -28,7 +28,7 @@ public class Cosi_s_Ravager {
new MagicDamageTargetPicker(1),
new Object[]{permanent},
this,
player + " may have " + permanent + " deal 1 damage to target player"):
player + " may$ have " + permanent + " deal 1 damage to target player$"):
MagicEvent.NONE;
}