add CREATURE_TOKEN_YOU_CONTROL to MagicTargetChoice, rename MagicTargetFilter.TARGET_TOKEN_YOU_CONTROL to TARGET_CREATURE_TOKEN_YOU_CONTROL

master
melvin 2013-02-18 21:32:06 +08:00
parent a01227ac31
commit 8c3ab0bb7f
3 changed files with 30 additions and 12 deletions

View File

@ -13,7 +13,7 @@ import java.util.Set;
public class Intangible_Virtue {
public static final MagicStatic S1 = new MagicStatic(
MagicLayer.ModPT,
MagicTargetFilter.TARGET_TOKEN_YOU_CONTROL) {
MagicTargetFilter.TARGET_CREATURE_TOKEN_YOU_CONTROL) {
@Override
public void modPowerToughness(final MagicPermanent source,final MagicPermanent permanent,final MagicPowerToughness pt) {
pt.add(1,1);
@ -22,7 +22,7 @@ public class Intangible_Virtue {
public static final MagicStatic S2 = new MagicStatic(
MagicLayer.Ability,
MagicTargetFilter.TARGET_TOKEN_YOU_CONTROL) {
MagicTargetFilter.TARGET_CREATURE_TOKEN_YOU_CONTROL) {
@Override
public void modAbilityFlags(final MagicPermanent source,final MagicPermanent permanent,final Set<MagicAbility> flags) {
flags.add(MagicAbility.Vigilance);

View File

@ -384,16 +384,34 @@ public class MagicTargetChoice extends MagicChoice {
public static final MagicTargetChoice TARGET_BASIC_LAND_CARD_FROM_HAND =
new MagicTargetChoice(MagicTargetFilter.TARGET_BASIC_LAND_CARD_FROM_HAND,false,MagicTargetHint.None,
"a basic land card from your hand");
public static final MagicTargetChoice TARGET_LAND_CARD_FROM_HAND =
new MagicTargetChoice(MagicTargetFilter.TARGET_LAND_CARD_FROM_HAND,false,MagicTargetHint.None,
"a land card from your hand");
public static final MagicTargetChoice TARGET_GOBLIN_CARD_FROM_HAND =
new MagicTargetChoice(MagicTargetFilter.TARGET_GOBLIN_CARD_FROM_HAND,false,MagicTargetHint.None,
"a Goblin permanent card from your hand");
public static final MagicTargetChoice TARGET_LAND_CARD_FROM_HAND = new MagicTargetChoice(
MagicTargetFilter.TARGET_LAND_CARD_FROM_HAND,
false,
MagicTargetHint.None,
"a land card from your hand"
);
public static final MagicTargetChoice TARGET_UNPAIRED_SOULBOND_CREATURE =
new MagicTargetChoice(MagicTargetFilter.TARGET_UNPAIRED_SOULBOND_CREATURE,false,MagicTargetHint.None,
"an unpaired Soulbond creature");
public static final MagicTargetChoice TARGET_GOBLIN_CARD_FROM_HAND = new MagicTargetChoice(
MagicTargetFilter.TARGET_GOBLIN_CARD_FROM_HAND,
false,
MagicTargetHint.None,
"a Goblin permanent card from your hand"
);
public static final MagicTargetChoice TARGET_UNPAIRED_SOULBOND_CREATURE = new MagicTargetChoice(
MagicTargetFilter.TARGET_UNPAIRED_SOULBOND_CREATURE,
false,
MagicTargetHint.None,
"an unpaired Soulbond creature"
);
public static final MagicTargetChoice CREATURE_TOKEN_YOU_CONTROL = new MagicTargetChoice(
MagicTargetFilter.TARGET_CREATURE_TOKEN_YOU_CONTROL,
false,
MagicTargetHint.None,
"a creature token you control"
);
private final String targetDescription;
private final MagicTargetFilter<? extends MagicTarget> targetFilter;

View File

@ -533,7 +533,7 @@ public interface MagicTargetFilter<T extends MagicTarget> {
MagicPermanentFilterImpl TARGET_SWAMP_YOU_CONTROL = Factory.permanent(MagicSubType.Swamp, Control.You);
MagicPermanentFilterImpl TARGET_TOKEN_YOU_CONTROL = new MagicPermanentFilterImpl() {
MagicPermanentFilterImpl TARGET_CREATURE_TOKEN_YOU_CONTROL = new MagicPermanentFilterImpl() {
public boolean accept(final MagicGame game,final MagicPlayer player,final MagicPermanent target) {
return target.isController(player) &&
target.isCreature() &&