added Guardians' Pledge
parent
e18bb443c5
commit
9c40d01e2b
|
@ -2112,6 +2112,16 @@ converted=1
|
||||||
cost={G}
|
cost={G}
|
||||||
timing=pump
|
timing=pump
|
||||||
|
|
||||||
|
>Guardians' Pledge
|
||||||
|
image=http://magiccards.info/scans/en/m12/22.jpg
|
||||||
|
value=3
|
||||||
|
rarity=C
|
||||||
|
type=Instant
|
||||||
|
color=w
|
||||||
|
converted=3
|
||||||
|
cost={1}{W}{W}
|
||||||
|
timing=pump
|
||||||
|
|
||||||
>Puncture Blast
|
>Puncture Blast
|
||||||
image=http://magiccards.info/scans/en/eve/60.jpg
|
image=http://magiccards.info/scans/en/eve/60.jpg
|
||||||
value=3
|
value=3
|
||||||
|
|
|
@ -0,0 +1,43 @@
|
||||||
|
package magic.card;
|
||||||
|
|
||||||
|
import magic.model.MagicGame;
|
||||||
|
import magic.model.MagicPayedCost;
|
||||||
|
import magic.model.MagicPermanent;
|
||||||
|
import magic.model.MagicPlayer;
|
||||||
|
import magic.model.action.MagicChangeTurnPTAction;
|
||||||
|
import magic.model.action.MagicMoveCardAction;
|
||||||
|
import magic.model.event.MagicEvent;
|
||||||
|
import magic.model.event.MagicSpellCardEvent;
|
||||||
|
import magic.model.stack.MagicCardOnStack;
|
||||||
|
import magic.model.target.MagicTarget;
|
||||||
|
import magic.model.target.MagicTargetFilter;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
public class Guardians__Pledge {
|
||||||
|
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,
|
||||||
|
"White creatures you control get +2/+2 until end of turn.");
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void executeEvent(
|
||||||
|
final MagicGame game,
|
||||||
|
final MagicEvent event,
|
||||||
|
final Object[] data,
|
||||||
|
final Object[] choiceResults) {
|
||||||
|
game.doAction(new MagicMoveCardAction((MagicCardOnStack)data[0]));
|
||||||
|
final Collection<MagicTarget> targets =
|
||||||
|
game.filterTargets((MagicPlayer)data[1],MagicTargetFilter.TARGET_WHITE_CREATURE_YOU_CONTROL);
|
||||||
|
for (final MagicTarget target : targets) {
|
||||||
|
game.doAction(new MagicChangeTurnPTAction((MagicPermanent)target,2,2));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
|
@ -430,6 +430,20 @@ public interface MagicTargetFilter {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
public static final MagicTargetFilter TARGET_WHITE_CREATURE_YOU_CONTROL = new MagicTargetFilter() {
|
||||||
|
public boolean accept(final MagicGame game,final MagicPlayer player,final MagicTarget target) {
|
||||||
|
if (target.getController() == player) {
|
||||||
|
final MagicPermanent permanent = (MagicPermanent)target;
|
||||||
|
return permanent.isCreature() && MagicColor.White.hasColor(permanent.getColorFlags());
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean acceptType(final MagicTargetType targetType) {
|
||||||
|
return targetType == MagicTargetType.Permanent;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
public static final MagicTargetFilter TARGET_BAT_YOU_CONTROL=new MagicTargetFilter() {
|
public static final MagicTargetFilter TARGET_BAT_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) {
|
||||||
|
|
Loading…
Reference in New Issue