added Hysterical Blindness and Intangible Virtue
parent
97d59c21c9
commit
429de6e784
|
@ -4441,6 +4441,26 @@ cost={3}{G}{G}
|
|||
pt=4/5
|
||||
timing=main
|
||||
|
||||
>Hysterical Blindness
|
||||
image=http://magiccards.info/scans/en/isd/59.jpg
|
||||
value=3
|
||||
rarity=C
|
||||
type=Instant
|
||||
color=u
|
||||
converted=3
|
||||
cost={2}{U}
|
||||
timing=removal
|
||||
|
||||
>Intangible Virtue
|
||||
image=http://magiccards.info/scans/en/isd/19.jpg
|
||||
value=3
|
||||
rarity=U
|
||||
type=Enchantment
|
||||
color=w
|
||||
converted=2
|
||||
cost={1}{W}
|
||||
timing=enchantment
|
||||
|
||||
>Morkrut Banshee
|
||||
image=http://magiccards.info/scans/en/isd/110.jpg
|
||||
value=4
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
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 Hysterical_Blindness {
|
||||
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,
|
||||
"Creatures your opponent controls get -4/-0 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 MagicPlayer opponent = game.getOpponent((MagicPlayer)data[1]);
|
||||
final Collection<MagicTarget> targets =
|
||||
game.filterTargets(opponent,MagicTargetFilter.TARGET_CREATURE_YOU_CONTROL);
|
||||
for (final MagicTarget target : targets) {
|
||||
game.doAction(new MagicChangeTurnPTAction((MagicPermanent)target,-4,0));
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
|
||||
package magic.card;
|
||||
|
||||
import magic.model.MagicAbility;
|
||||
import magic.model.MagicGame;
|
||||
import magic.model.MagicPermanent;
|
||||
import magic.model.MagicPowerToughness;
|
||||
import magic.model.mstatic.MagicLayer;
|
||||
import magic.model.mstatic.MagicStatic;
|
||||
import magic.model.target.MagicTargetFilter;
|
||||
|
||||
public class Intangible_Virtue {
|
||||
public static final MagicStatic S1 = new MagicStatic(
|
||||
MagicLayer.ModPT,
|
||||
MagicTargetFilter.TARGET_TOKEN_YOU_CONTROL) {
|
||||
@Override
|
||||
public void getPowerToughness(final MagicGame game,final MagicPermanent permanent,final MagicPowerToughness pt) {
|
||||
pt.add(1,1);
|
||||
}
|
||||
};
|
||||
|
||||
public static final MagicStatic S2 = new MagicStatic(
|
||||
MagicLayer.Ability,
|
||||
MagicTargetFilter.TARGET_TOKEN_YOU_CONTROL) {
|
||||
@Override
|
||||
public long getAbilityFlags(final MagicGame game,final MagicPermanent permanent,final long flags) {
|
||||
return flags | MagicAbility.Vigilance.getMask();
|
||||
}
|
||||
};
|
||||
}
|
|
@ -466,6 +466,18 @@ public interface MagicTargetFilter {
|
|||
return targetType==MagicTargetType.Permanent;
|
||||
}
|
||||
};
|
||||
|
||||
MagicTargetFilter TARGET_TOKEN_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.getCardDefinition().isToken();
|
||||
}
|
||||
public boolean acceptType(final MagicTargetType targetType) {
|
||||
return targetType == MagicTargetType.Permanent;
|
||||
}
|
||||
};
|
||||
|
||||
MagicTargetFilter TARGET_NON_LEGENDARY_CREATURE_YOU_CONTROL=new MagicTargetFilter() {
|
||||
|
||||
|
|
Loading…
Reference in New Issue