combined two statics into one

master
beholder 2012-05-09 07:27:40 +02:00
parent 4ff2a8375b
commit 73afa95580
1 changed files with 3 additions and 15 deletions

View File

@ -8,7 +8,7 @@ import magic.model.mstatic.MagicStatic;
import magic.model.target.MagicTargetFilter;
public class Wingcrafter {
public static final MagicStatic S1 = new MagicStatic(
public static final MagicStatic S = new MagicStatic(
MagicLayer.Ability,
MagicTargetFilter.TARGET_CREATURE_YOU_CONTROL) {
@Override
@ -23,20 +23,8 @@ public class Wingcrafter {
final MagicGame game,
final MagicPermanent source,
final MagicPermanent target) {
return source.getPairedCreature() == target;
return source.getPairedCreature() == target ||
(source == target && source.isPaired());
}
};
public static final MagicStatic S2 = new MagicStatic(MagicLayer.Ability) {
@Override
public long getAbilityFlags(
final MagicGame game,
final MagicPermanent permanent,
final long flags) {
if (permanent.isPaired()) {
return flags | MagicAbility.Flying.getMask();
}
return flags;
}
};
}