convert tab to four spaces
parent
5c198179dc
commit
a90fe035e3
|
@ -13,7 +13,7 @@ import magic.model.mstatic.MagicStatic;
|
|||
import magic.model.trigger.MagicWhenBlocksTrigger;
|
||||
|
||||
public class Ageless_Sentinels {
|
||||
private static final MagicStatic ST = new MagicStatic(MagicLayer.Type) {
|
||||
private static final MagicStatic ST = new MagicStatic(MagicLayer.Type) {
|
||||
@Override
|
||||
public void modSubTypeFlags(
|
||||
final MagicPermanent permanent,
|
||||
|
@ -25,39 +25,39 @@ public class Ageless_Sentinels {
|
|||
};
|
||||
|
||||
private static final MagicStatic AB = new MagicStatic(MagicLayer.Ability) {
|
||||
@Override
|
||||
public long getAbilityFlags(
|
||||
final MagicPermanent source,
|
||||
final MagicPermanent permanent,
|
||||
final long flags) {
|
||||
return flags & ~MagicAbility.Defender.getMask();
|
||||
}
|
||||
@Override
|
||||
public long getAbilityFlags(
|
||||
final MagicPermanent source,
|
||||
final MagicPermanent permanent,
|
||||
final long flags) {
|
||||
return flags & ~MagicAbility.Defender.getMask();
|
||||
}
|
||||
};
|
||||
|
||||
public static final MagicWhenBlocksTrigger T = new MagicWhenBlocksTrigger() {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(
|
||||
final MagicGame game,
|
||||
final MagicPermanent permanent,
|
||||
final MagicPermanent data) {
|
||||
return (permanent == data) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
permanent.getController(),
|
||||
new Object[]{permanent},
|
||||
this,
|
||||
permanent + " becomes a Bird Giant and loses defender."):
|
||||
MagicEvent.NONE;
|
||||
}
|
||||
@Override
|
||||
public void executeEvent(
|
||||
final MagicGame game,
|
||||
final MagicEvent event,
|
||||
final Object data[],
|
||||
final Object[] choiceResults) {
|
||||
final MagicPermanent permanent = (MagicPermanent)data[0];
|
||||
game.doAction(new MagicAddStaticAction(permanent, ST));
|
||||
game.doAction(new MagicAddStaticAction(permanent, AB));
|
||||
}
|
||||
@Override
|
||||
public MagicEvent executeTrigger(
|
||||
final MagicGame game,
|
||||
final MagicPermanent permanent,
|
||||
final MagicPermanent data) {
|
||||
return (permanent == data) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
permanent.getController(),
|
||||
new Object[]{permanent},
|
||||
this,
|
||||
permanent + " becomes a Bird Giant and loses defender."):
|
||||
MagicEvent.NONE;
|
||||
}
|
||||
@Override
|
||||
public void executeEvent(
|
||||
final MagicGame game,
|
||||
final MagicEvent event,
|
||||
final Object data[],
|
||||
final Object[] choiceResults) {
|
||||
final MagicPermanent permanent = (MagicPermanent)data[0];
|
||||
game.doAction(new MagicAddStaticAction(permanent, ST));
|
||||
game.doAction(new MagicAddStaticAction(permanent, AB));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -20,29 +20,29 @@ import magic.model.target.MagicTargetFilter;
|
|||
import magic.model.target.MagicTargetHint;
|
||||
|
||||
public class Beguiler_of_Wills {
|
||||
public static final MagicPermanentActivation A = new MagicPermanentActivation(
|
||||
public static final MagicPermanentActivation A = new MagicPermanentActivation(
|
||||
new MagicCondition[]{MagicCondition.CAN_TAP_CONDITION},
|
||||
new MagicActivationHints(MagicTiming.Removal),
|
||||
"Control") {
|
||||
|
||||
@Override
|
||||
public MagicEvent[] getCostEvent(final MagicSource source) {
|
||||
return new MagicEvent[]{new MagicTapEvent((MagicPermanent)source)};
|
||||
}
|
||||
@Override
|
||||
public MagicEvent[] getCostEvent(final MagicSource source) {
|
||||
return new MagicEvent[]{new MagicTapEvent((MagicPermanent)source)};
|
||||
}
|
||||
|
||||
@Override
|
||||
public MagicEvent getPermanentEvent(
|
||||
final MagicPermanent source,
|
||||
final MagicPayedCost payedCost) {
|
||||
final MagicPlayer player = source.getController();
|
||||
final MagicTargetFilter targetFilter =
|
||||
@Override
|
||||
public MagicEvent getPermanentEvent(
|
||||
final MagicPermanent source,
|
||||
final MagicPayedCost payedCost) {
|
||||
final MagicPlayer player = source.getController();
|
||||
final MagicTargetFilter targetFilter =
|
||||
new MagicTargetFilter.MagicPowerTargetFilter(
|
||||
MagicTargetFilter.TARGET_CREATURE,
|
||||
player.getNrOfPermanentsWithType(MagicType.Creature));
|
||||
final MagicTargetChoice targetChoice =
|
||||
new MagicTargetChoice(
|
||||
targetFilter,true,MagicTargetHint.Negative,"target creature to gain control of");
|
||||
return new MagicEvent(
|
||||
return new MagicEvent(
|
||||
source,
|
||||
player,
|
||||
targetChoice,
|
||||
|
@ -51,21 +51,21 @@ public class Beguiler_of_Wills {
|
|||
this,
|
||||
"Gain control of target creature$ with power less " +
|
||||
"than or equal to the number of creatures you control.");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void executeEvent(
|
||||
final MagicGame game,
|
||||
final MagicEvent event,
|
||||
final Object[] data,
|
||||
final Object[] choiceResults) {
|
||||
event.processTargetPermanent(game,choiceResults,0,new MagicPermanentAction() {
|
||||
@Override
|
||||
public void executeEvent(
|
||||
final MagicGame game,
|
||||
final MagicEvent event,
|
||||
final Object[] data,
|
||||
final Object[] choiceResults) {
|
||||
event.processTargetPermanent(game,choiceResults,0,new MagicPermanentAction() {
|
||||
public void doAction(final MagicPermanent creature) {
|
||||
if (creature.getPower() <= event.getPlayer().getNrOfPermanentsWithType(MagicType.Creature)) {
|
||||
game.doAction(new MagicGainControlAction(event.getPlayer(),creature));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -17,12 +17,12 @@ import magic.model.trigger.MagicWhenComesIntoPlayTrigger;
|
|||
|
||||
public class Master_Thief {
|
||||
public static final MagicWhenComesIntoPlayTrigger T = new MagicWhenComesIntoPlayTrigger() {
|
||||
@Override
|
||||
@Override
|
||||
public MagicEvent executeTrigger(
|
||||
final MagicGame game,
|
||||
final MagicPermanent permanent,
|
||||
final MagicPlayer player) {
|
||||
return new MagicEvent(
|
||||
final MagicPlayer player) {
|
||||
return new MagicEvent(
|
||||
permanent,
|
||||
player,
|
||||
MagicTargetChoice.TARGET_ARTIFACT,
|
||||
|
@ -31,44 +31,44 @@ public class Master_Thief {
|
|||
this,
|
||||
"Gain control of target artifact$ " +
|
||||
"for as long as you control " + permanent + ".");
|
||||
}
|
||||
|
||||
@Override
|
||||
}
|
||||
|
||||
@Override
|
||||
public void executeEvent(
|
||||
final MagicGame game,
|
||||
final MagicEvent event,
|
||||
final Object data[],
|
||||
final Object[] choiceResults) {
|
||||
event.processTargetPermanent(game,choiceResults,0,new MagicPermanentAction() {
|
||||
public void doAction(final MagicPermanent perm) {
|
||||
final MagicPermanent source = (MagicPermanent)event.getSource();
|
||||
final MagicTargetFilter filter = new MagicTargetFilter.MagicPermanentTargetFilter(perm);
|
||||
final MagicStatic S = new MagicStatic(MagicLayer.Control,filter) {
|
||||
final int you = source.getController().getIndex();
|
||||
@Override
|
||||
public MagicPlayer getController(
|
||||
final MagicPermanent source,
|
||||
final MagicPermanent permanent,
|
||||
final MagicPlayer player) {
|
||||
return source.getController();
|
||||
}
|
||||
@Override
|
||||
public boolean condition(
|
||||
final MagicGame game,
|
||||
final MagicPermanent source,
|
||||
final MagicPermanent target) {
|
||||
if (you != source.getController().getIndex()) {
|
||||
//remove this static after the update
|
||||
game.addDelayedAction(new MagicRemoveStaticAction(source, this));
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
};
|
||||
game.doAction(new MagicAddStaticAction(source, S));
|
||||
};
|
||||
});
|
||||
event.processTargetPermanent(game,choiceResults,0,new MagicPermanentAction() {
|
||||
public void doAction(final MagicPermanent perm) {
|
||||
final MagicPermanent source = (MagicPermanent)event.getSource();
|
||||
final MagicTargetFilter filter = new MagicTargetFilter.MagicPermanentTargetFilter(perm);
|
||||
final MagicStatic S = new MagicStatic(MagicLayer.Control,filter) {
|
||||
final int you = source.getController().getIndex();
|
||||
@Override
|
||||
public MagicPlayer getController(
|
||||
final MagicPermanent source,
|
||||
final MagicPermanent permanent,
|
||||
final MagicPlayer player) {
|
||||
return source.getController();
|
||||
}
|
||||
@Override
|
||||
public boolean condition(
|
||||
final MagicGame game,
|
||||
final MagicPermanent source,
|
||||
final MagicPermanent target) {
|
||||
if (you != source.getController().getIndex()) {
|
||||
//remove this static after the update
|
||||
game.addDelayedAction(new MagicRemoveStaticAction(source, this));
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
};
|
||||
game.doAction(new MagicAddStaticAction(source, S));
|
||||
};
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue