added Mistbind Clique and Unstoppable Ash

master
beholder 2011-10-13 10:23:33 +02:00
parent c350ab36c9
commit d3acc18bf7
4 changed files with 269 additions and 0 deletions

View File

@ -15180,3 +15180,33 @@ converted=4
cost={3}{R} cost={3}{R}
pt=3/3 pt=3/3
timing=main timing=main
>Mistbind Clique
url=http://magiccards.info/lw/en/75.html
image=http://magiccards.info/scans/en/lw/75.jpg
value=5
removal=2
rarity=R
type=Creature
subtype=Faerie,Wizard
color=u
converted=4
cost={3}{U}
pt=4/4
ability=flash,flying
timing=main
>Unstoppable Ash
url=http://magiccards.info/mt/en/137.html
image=http://magiccards.info/scans/en/mt/137.jpg
value=5
removal=2
rarity=R
type=Creature
subtype=Treefolk,Warrior
color=g
converted=4
cost={3}{G}
pt=5/5
ability=trample
timing=main

View File

@ -0,0 +1,104 @@
package magic.card;
import java.util.Collection;
import magic.model.MagicCard;
import magic.model.MagicGame;
import magic.model.MagicPlayer;
import magic.model.MagicLocationType;
import magic.model.MagicPermanent;
import magic.model.action.MagicExileUntilThisLeavesPlayAction;
import magic.model.action.MagicPermanentAction;
import magic.model.action.MagicPlayCardAction;
import magic.model.action.MagicRemoveCardAction;
import magic.model.action.MagicSacrificeAction;
import magic.model.action.MagicTapAction;
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.MagicTarget;
import magic.model.target.MagicTargetFilter;
import magic.model.target.MagicTargetHint;
import magic.model.trigger.MagicWhenComesIntoPlayTrigger;
import magic.model.trigger.MagicWhenLeavesPlayTrigger;
public class Mistbind_Clique {
public static final MagicWhenComesIntoPlayTrigger T1 = new MagicWhenComesIntoPlayTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPlayer player) {
final MagicTargetFilter targetFilter =
new MagicTargetFilter.MagicOtherPermanentTargetFilter(
MagicTargetFilter.TARGET_FAERIE_YOU_CONTROL,permanent);
final MagicTargetChoice targetChoice =
new MagicTargetChoice(
targetFilter,false,MagicTargetHint.None,"another Faerie to exile");
final MagicChoice championChoice =
new MagicMayChoice(
"You may exile another Faerie you control. " +
"If you don't, sacrifice " + permanent + ".",
targetChoice);
return new MagicEvent(
permanent,
player,
championChoice,
MagicExileTargetPicker.getInstance(),
new Object[]{permanent,game.getOpponent(player)},
this,
"You may$ exile another Faerie you control$. " +
"If you don't, sacrifice " + permanent + ".");
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object data[],
final Object[] choiceResults) {
final MagicPermanent permanent = (MagicPermanent)data[0];
if (MagicMayChoice.isYesChoice(choiceResults[0])) {
event.processTargetPermanent(game,choiceResults,1,new MagicPermanentAction() {
public void doAction(final MagicPermanent creature) {
game.doAction(new MagicExileUntilThisLeavesPlayAction(permanent,creature));
}
});
final Collection<MagicTarget> targets =
game.filterTargets((MagicPlayer)data[1],
MagicTargetFilter.TARGET_LAND_YOU_CONTROL);
for (final MagicTarget target : targets) {
final MagicPermanent land = (MagicPermanent)target;
game.doAction(new MagicTapAction(land,true));
}
} else {
game.doAction(new MagicSacrificeAction(permanent));
}
}
};
public static final MagicWhenLeavesPlayTrigger T2 = new MagicWhenLeavesPlayTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPermanent data) {
if (permanent == data &&
permanent.getExiledCard() != MagicCard.NONE) {
final MagicCard exiledCard = permanent.getExiledCard();
return new MagicEvent(
permanent,
permanent.getController(),
new Object[]{exiledCard,permanent.getController()},
this,
"Return " + exiledCard + " to the battlefield");
}
return MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object data[],
final Object[] choiceResults) {
final MagicCard exiledCard = (MagicCard)data[0];
game.doAction(new MagicRemoveCardAction(exiledCard,MagicLocationType.Exile));
game.doAction(new MagicPlayCardAction(exiledCard,exiledCard.getOwner(),MagicPlayCardAction.NONE));
}
};
}

View File

@ -0,0 +1,122 @@
package magic.card;
import magic.model.MagicCard;
import magic.model.MagicGame;
import magic.model.MagicPlayer;
import magic.model.MagicLocationType;
import magic.model.MagicPermanent;
import magic.model.action.MagicChangeTurnPTAction;
import magic.model.action.MagicExileUntilThisLeavesPlayAction;
import magic.model.action.MagicPermanentAction;
import magic.model.action.MagicPlayCardAction;
import magic.model.action.MagicRemoveCardAction;
import magic.model.action.MagicSacrificeAction;
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.MagicWhenBecomesBlockedTrigger;
import magic.model.trigger.MagicWhenComesIntoPlayTrigger;
import magic.model.trigger.MagicWhenLeavesPlayTrigger;
public class Unstoppable_Ash {
public static final MagicWhenComesIntoPlayTrigger T1 = new MagicWhenComesIntoPlayTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPlayer player) {
final MagicTargetFilter targetFilter =
new MagicTargetFilter.MagicOtherPermanentTargetFilter(
MagicTargetFilter.TARGET_TREEFOLK_OR_WARRIOR_YOU_CONTROL,permanent);
final MagicTargetChoice targetChoice =
new MagicTargetChoice(
targetFilter,false,MagicTargetHint.None,"another Treefolk or Warrior to exile");
final MagicChoice championChoice =
new MagicMayChoice(
"You may exile another Treefolk or Warrior you control. " +
"If you don't, sacrifice " + permanent + ".",
targetChoice);
return new MagicEvent(
permanent,
player,
championChoice,
MagicExileTargetPicker.getInstance(),
new Object[]{permanent},
this,
"You may$ exile another Treefolk or Warrior you control$. " +
"If you don't, sacrifice " + permanent + ".");
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object data[],
final Object[] choiceResults) {
final MagicPermanent permanent = (MagicPermanent)data[0];
if (MagicMayChoice.isYesChoice(choiceResults[0])) {
event.processTargetPermanent(game,choiceResults,1,new MagicPermanentAction() {
public void doAction(final MagicPermanent creature) {
game.doAction(new MagicExileUntilThisLeavesPlayAction(permanent,creature));
}
});
} else {
game.doAction(new MagicSacrificeAction(permanent));
}
}
};
public static final MagicWhenLeavesPlayTrigger T2 = new MagicWhenLeavesPlayTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPermanent data) {
if (permanent == data &&
permanent.getExiledCard() != MagicCard.NONE) {
final MagicCard exiledCard = permanent.getExiledCard();
return new MagicEvent(
permanent,
permanent.getController(),
new Object[]{exiledCard,permanent.getController()},
this,
"Return " + exiledCard + " to the battlefield");
}
return MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object data[],
final Object[] choiceResults) {
final MagicCard exiledCard = (MagicCard)data[0];
game.doAction(new MagicRemoveCardAction(exiledCard,MagicLocationType.Exile));
game.doAction(new MagicPlayCardAction(exiledCard,exiledCard.getOwner(),MagicPlayCardAction.NONE));
}
};
public static final MagicWhenBecomesBlockedTrigger T3 = new MagicWhenBecomesBlockedTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent data) {
final MagicPlayer player = permanent.getController();
return (player == data.getController() ) ?
new MagicEvent(
permanent,
player,
new Object[]{data},
this,
data + " gets +0/+5 until end of turn."):
MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object data[],
final Object[] choiceResults) {
game.doAction(new MagicChangeTurnPTAction(
(MagicPermanent)data[0],
0,
5));
}
};
}

View File

@ -820,6 +820,19 @@ public interface MagicTargetFilter {
} }
}; };
MagicTargetFilter TARGET_TREEFOLK_OR_WARRIOR_YOU_CONTROL = new MagicTargetFilter() {
public boolean accept(final MagicGame game,final MagicPlayer player,final MagicTarget target) {
final MagicPermanent permanent = (MagicPermanent)target;
return target.getController() == player &&
permanent.isCreature(game) &&
(permanent.hasSubType(MagicSubType.Treefolk,game) ||
permanent.hasSubType(MagicSubType.Warrior,game));
}
public boolean acceptType(final MagicTargetType targetType) {
return targetType == MagicTargetType.Permanent;
}
};
MagicTargetFilter TARGET_LEGENDARY_SAMURAI_YOU_CONTROL = new MagicTargetFilter() { MagicTargetFilter TARGET_LEGENDARY_SAMURAI_YOU_CONTROL = new MagicTargetFilter() {
public boolean accept(final MagicGame game,final MagicPlayer player,final MagicTarget target) { public boolean accept(final MagicGame game,final MagicPlayer player,final MagicTarget target) {
return target.getController() == player && return target.getController() == player &&