move constants to the right == expression
parent
ca4ae7af9b
commit
79b3661202
|
@ -326,7 +326,7 @@ public strictfp class MersenneTwisterFast implements Serializable, Cloneable
|
|||
int i, j, k;
|
||||
setSeed(19650218);
|
||||
i=1; j=0;
|
||||
k = (N>array.length ? N : array.length);
|
||||
k = (array.length < N ? N : array.length);
|
||||
for (; k!=0; k--)
|
||||
{
|
||||
mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >>> 30)) * 1664525)) + array[j] + j; /* non linear */
|
||||
|
|
|
@ -18,7 +18,7 @@ public class Archon_of_Justice {
|
|||
final MagicGame game,
|
||||
final MagicPermanent permanent,
|
||||
final MagicGraveyardTriggerData triggerData) {
|
||||
return (MagicLocationType.Play==triggerData.fromLocation) ?
|
||||
return (triggerData.fromLocation == MagicLocationType.Play) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
MagicTargetChoice.TARGET_PERMANENT,
|
||||
|
|
|
@ -14,7 +14,7 @@ public class Blistergrub {
|
|||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicGraveyardTriggerData triggerData) {
|
||||
final MagicPlayer player = permanent.getController();
|
||||
return (MagicLocationType.Play == triggerData.fromLocation) ?
|
||||
return (triggerData.fromLocation == MagicLocationType.Play) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
player,
|
||||
|
|
|
@ -16,7 +16,7 @@ public class Bogardan_Firefiend {
|
|||
public static final MagicWhenPutIntoGraveyardTrigger T = new MagicWhenPutIntoGraveyardTrigger() {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicGraveyardTriggerData triggerData) {
|
||||
return (MagicLocationType.Play == triggerData.fromLocation) ?
|
||||
return (triggerData.fromLocation == MagicLocationType.Play) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
MagicTargetChoice.TARGET_CREATURE,
|
||||
|
|
|
@ -18,7 +18,7 @@ public class Butcher_of_Malakir {
|
|||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicGraveyardTriggerData triggerData) {
|
||||
final MagicPlayer controller = permanent.getController();
|
||||
return (MagicLocationType.Play==triggerData.fromLocation) ?
|
||||
return (triggerData.fromLocation == MagicLocationType.Play) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
controller,
|
||||
|
|
|
@ -14,7 +14,7 @@ public class Chronozoa {
|
|||
public static final MagicWhenPutIntoGraveyardTrigger T3 = new MagicWhenPutIntoGraveyardTrigger() {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicGraveyardTriggerData triggerData) {
|
||||
return (MagicLocationType.Play == triggerData.fromLocation &&
|
||||
return (triggerData.fromLocation == MagicLocationType.Play &&
|
||||
permanent.getCounters(MagicCounterType.Charge) == 0) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
|
|
|
@ -17,7 +17,7 @@ public class Deadly_Grub {
|
|||
final MagicGame game,
|
||||
final MagicPermanent permanent,
|
||||
final MagicGraveyardTriggerData triggerData) {
|
||||
return (MagicLocationType.Play == triggerData.fromLocation &&
|
||||
return (triggerData.fromLocation == MagicLocationType.Play &&
|
||||
permanent.getCounters(MagicCounterType.Charge) == 0) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
|
|
|
@ -13,7 +13,7 @@ public class Doomed_Traveler {
|
|||
public static final MagicWhenPutIntoGraveyardTrigger T = new MagicWhenPutIntoGraveyardTrigger() {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicGraveyardTriggerData triggerData) {
|
||||
return (MagicLocationType.Play == triggerData.fromLocation) ?
|
||||
return (triggerData.fromLocation == MagicLocationType.Play) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
this,
|
||||
|
|
|
@ -32,7 +32,7 @@ public class Driver_of_the_Dead {
|
|||
final MagicGame game,
|
||||
final MagicPermanent permanent,
|
||||
final MagicGraveyardTriggerData triggerData) {
|
||||
return (MagicLocationType.Play == triggerData.fromLocation) ?
|
||||
return (triggerData.fromLocation == MagicLocationType.Play) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
new MagicMayChoice(targetChoice),
|
||||
|
|
|
@ -17,7 +17,7 @@ public class Elder_Cathar {
|
|||
public static final MagicWhenPutIntoGraveyardTrigger T = new MagicWhenPutIntoGraveyardTrigger() {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicGraveyardTriggerData triggerData) {
|
||||
return (MagicLocationType.Play == triggerData.fromLocation) ?
|
||||
return (triggerData.fromLocation == MagicLocationType.Play) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
MagicTargetChoice.TARGET_CREATURE_YOU_CONTROL,
|
||||
|
|
|
@ -15,7 +15,7 @@ public class Festering_Goblin {
|
|||
public static final MagicWhenPutIntoGraveyardTrigger T = new MagicWhenPutIntoGraveyardTrigger() {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicGraveyardTriggerData triggerData) {
|
||||
return (MagicLocationType.Play == triggerData.fromLocation) ?
|
||||
return (triggerData.fromLocation == MagicLocationType.Play) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
MagicTargetChoice.TARGET_CREATURE,
|
||||
|
|
|
@ -18,7 +18,7 @@ public class Goblin_Arsonist {
|
|||
public static final MagicWhenPutIntoGraveyardTrigger T = new MagicWhenPutIntoGraveyardTrigger() {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicGraveyardTriggerData triggerData) {
|
||||
return (MagicLocationType.Play == triggerData.fromLocation) ?
|
||||
return (triggerData.fromLocation == MagicLocationType.Play) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
new MagicMayChoice(
|
||||
|
|
|
@ -39,7 +39,7 @@ public class Goblin_Marshal {
|
|||
public static final MagicWhenPutIntoGraveyardTrigger T3 = new MagicWhenPutIntoGraveyardTrigger() {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicGraveyardTriggerData triggerData) {
|
||||
return (MagicLocationType.Play == triggerData.fromLocation) ?
|
||||
return (triggerData.fromLocation == MagicLocationType.Play) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
this,
|
||||
|
|
|
@ -13,7 +13,7 @@ public class Gods__Eye__Gate_to_the_Reikai {
|
|||
public static final MagicWhenPutIntoGraveyardTrigger T = new MagicWhenPutIntoGraveyardTrigger() {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicGraveyardTriggerData triggerData) {
|
||||
return (MagicLocationType.Play == triggerData.fromLocation) ?
|
||||
return (triggerData.fromLocation == MagicLocationType.Play) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
this,
|
||||
|
|
|
@ -15,7 +15,7 @@ public class Keiga__the_Tide_Star {
|
|||
public static final MagicWhenPutIntoGraveyardTrigger T = new MagicWhenPutIntoGraveyardTrigger() {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicGraveyardTriggerData triggerData) {
|
||||
return (MagicLocationType.Play==triggerData.fromLocation) ?
|
||||
return (triggerData.fromLocation == MagicLocationType.Play) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
MagicTargetChoice.TARGET_CREATURE,
|
||||
|
|
|
@ -34,7 +34,7 @@ public class Kodama_of_the_Center_Tree {
|
|||
final MagicGame game,
|
||||
final MagicPermanent permanent,
|
||||
final MagicGraveyardTriggerData triggerData) {
|
||||
if (MagicLocationType.Play == triggerData.fromLocation) {
|
||||
if (triggerData.fromLocation == MagicLocationType.Play) {
|
||||
final MagicPlayer player = permanent.getController();
|
||||
final int cmc = game.filterTargets(player,
|
||||
MagicTargetFilter.TARGET_SPIRIT_YOU_CONTROL).size()+1;
|
||||
|
|
|
@ -17,7 +17,7 @@ public class Maalfeld_Twins {
|
|||
final MagicGame game,
|
||||
final MagicPermanent permanent,
|
||||
final MagicGraveyardTriggerData triggerData) {
|
||||
return (MagicLocationType.Play == triggerData.fromLocation) ?
|
||||
return (triggerData.fromLocation == MagicLocationType.Play) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
this,
|
||||
|
|
|
@ -13,7 +13,7 @@ public class Mausoleum_Guard {
|
|||
public static final MagicWhenPutIntoGraveyardTrigger T = new MagicWhenPutIntoGraveyardTrigger() {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicGraveyardTriggerData triggerData) {
|
||||
return (MagicLocationType.Play == triggerData.fromLocation) ?
|
||||
return (triggerData.fromLocation == MagicLocationType.Play) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
this,
|
||||
|
|
|
@ -36,7 +36,7 @@ public class Mogg_War_Marshal {
|
|||
public static final MagicWhenPutIntoGraveyardTrigger T3 = new MagicWhenPutIntoGraveyardTrigger() {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicGraveyardTriggerData triggerData) {
|
||||
return (MagicLocationType.Play == triggerData.fromLocation) ?
|
||||
return (triggerData.fromLocation == MagicLocationType.Play) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
this,
|
||||
|
|
|
@ -21,7 +21,7 @@ public class Moldgraf_Monstrosity {
|
|||
public static final MagicWhenPutIntoGraveyardTrigger T = new MagicWhenPutIntoGraveyardTrigger() {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicGraveyardTriggerData triggerData) {
|
||||
return (MagicLocationType.Play == triggerData.fromLocation) ?
|
||||
return (triggerData.fromLocation == MagicLocationType.Play) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
this,
|
||||
|
|
|
@ -15,7 +15,7 @@ public class Mycoid_Shepherd {
|
|||
public static final MagicWhenPutIntoGraveyardTrigger T1 = new MagicWhenPutIntoGraveyardTrigger() {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicGraveyardTriggerData triggerData) {
|
||||
return (MagicLocationType.Play == triggerData.fromLocation) ?
|
||||
return (triggerData.fromLocation == MagicLocationType.Play) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
new MagicSimpleMayChoice(
|
||||
|
|
|
@ -17,7 +17,7 @@ public class Necropede {
|
|||
public static final MagicWhenPutIntoGraveyardTrigger T = new MagicWhenPutIntoGraveyardTrigger() {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicGraveyardTriggerData triggerData) {
|
||||
return (MagicLocationType.Play == triggerData.fromLocation) ?
|
||||
return (triggerData.fromLocation == MagicLocationType.Play) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
new MagicMayChoice(
|
||||
|
|
|
@ -17,7 +17,7 @@ public class Pitchburn_Devils {
|
|||
public static final MagicWhenPutIntoGraveyardTrigger T = new MagicWhenPutIntoGraveyardTrigger() {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicGraveyardTriggerData triggerData) {
|
||||
return (MagicLocationType.Play == triggerData.fromLocation) ?
|
||||
return (triggerData.fromLocation == MagicLocationType.Play) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
MagicTargetChoice.NEG_TARGET_CREATURE_OR_PLAYER,
|
||||
|
|
|
@ -18,7 +18,7 @@ public class Polluted_Dead {
|
|||
final MagicGame game,
|
||||
final MagicPermanent permanent,
|
||||
final MagicGraveyardTriggerData triggerData) {
|
||||
return (MagicLocationType.Play == triggerData.fromLocation) ?
|
||||
return (triggerData.fromLocation == MagicLocationType.Play) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
MagicTargetChoice.TARGET_LAND,
|
||||
|
|
|
@ -13,7 +13,7 @@ public class Roc_Egg {
|
|||
public static final MagicWhenPutIntoGraveyardTrigger T = new MagicWhenPutIntoGraveyardTrigger() {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicGraveyardTriggerData triggerData) {
|
||||
return (MagicLocationType.Play == triggerData.fromLocation) ?
|
||||
return (triggerData.fromLocation == MagicLocationType.Play) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
this,
|
||||
|
|
|
@ -18,7 +18,7 @@ public class Rotcrown_Ghoul {
|
|||
final MagicGame game,
|
||||
final MagicPermanent permanent,
|
||||
final MagicGraveyardTriggerData triggerData) {
|
||||
return (MagicLocationType.Play == triggerData.fromLocation) ?
|
||||
return (triggerData.fromLocation == MagicLocationType.Play) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
permanent.getController(),
|
||||
|
|
|
@ -16,7 +16,7 @@ public class Soulcage_Fiend {
|
|||
final MagicGame game,
|
||||
final MagicPermanent permanent,
|
||||
final MagicGraveyardTriggerData triggerData) {
|
||||
return (MagicLocationType.Play == triggerData.fromLocation) ?
|
||||
return (triggerData.fromLocation == MagicLocationType.Play) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
permanent.getController(),
|
||||
|
|
|
@ -14,7 +14,7 @@ public class Sprouting_Thrinax {
|
|||
public static final MagicWhenPutIntoGraveyardTrigger T = new MagicWhenPutIntoGraveyardTrigger() {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicGraveyardTriggerData triggerData) {
|
||||
return (MagicLocationType.Play==triggerData.fromLocation) ?
|
||||
return (triggerData.fromLocation == MagicLocationType.Play) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
this,
|
||||
|
|
|
@ -13,7 +13,7 @@ public class Tuktuk_the_Explorer {
|
|||
public static final MagicWhenPutIntoGraveyardTrigger T = new MagicWhenPutIntoGraveyardTrigger() {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicGraveyardTriggerData triggerData) {
|
||||
return (MagicLocationType.Play==triggerData.fromLocation) ?
|
||||
return (triggerData.fromLocation == MagicLocationType.Play) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
this,
|
||||
|
|
|
@ -19,7 +19,7 @@ public class Undead_Executioner {
|
|||
final MagicGame game,
|
||||
final MagicPermanent permanent,
|
||||
final MagicGraveyardTriggerData triggerData) {
|
||||
return (MagicLocationType.Play == triggerData.fromLocation) ?
|
||||
return (triggerData.fromLocation == MagicLocationType.Play) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
new MagicMayChoice(
|
||||
|
|
|
@ -17,7 +17,7 @@ public class Weatherseed_Treefolk {
|
|||
final MagicGame game,
|
||||
final MagicPermanent permanent,
|
||||
final MagicGraveyardTriggerData triggerData) {
|
||||
return (MagicLocationType.Play == triggerData.fromLocation) ?
|
||||
return (triggerData.fromLocation == MagicLocationType.Play) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
this,
|
||||
|
|
|
@ -14,7 +14,7 @@ public class Wurmcoil_Engine {
|
|||
public static final MagicWhenPutIntoGraveyardTrigger T = new MagicWhenPutIntoGraveyardTrigger() {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicGraveyardTriggerData triggerData) {
|
||||
return (MagicLocationType.Play==triggerData.fromLocation) ?
|
||||
return (triggerData.fromLocation == MagicLocationType.Play) ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
this,
|
||||
|
|
|
@ -172,15 +172,15 @@ public class CardDefinitions {
|
|||
}
|
||||
|
||||
public static MagicCardDefinition getBasicLand(final MagicColor color) {
|
||||
if (MagicColor.Black == color) {
|
||||
if (color == MagicColor.Black) {
|
||||
return getCard("Swamp");
|
||||
} else if (MagicColor.Blue == color) {
|
||||
} else if (color == MagicColor.Blue) {
|
||||
return getCard("Island");
|
||||
} else if (MagicColor.Green == color) {
|
||||
} else if (color == MagicColor.Green) {
|
||||
return getCard("Forest");
|
||||
} else if (MagicColor.Red == color) {
|
||||
} else if (color == MagicColor.Red) {
|
||||
return getCard("Mountain");
|
||||
} else if (MagicColor.White == color) {
|
||||
} else if (color == MagicColor.White) {
|
||||
return getCard("Plains");
|
||||
}
|
||||
throw new RuntimeException("No matching basic land for MagicColor " + color);
|
||||
|
|
|
@ -117,10 +117,10 @@ public abstract class MagicChoice {
|
|||
final MagicSource source);
|
||||
|
||||
public static boolean isYesChoice(final Object choiceResult) {
|
||||
return YES_CHOICE==choiceResult;
|
||||
return choiceResult == YES_CHOICE;
|
||||
}
|
||||
|
||||
public static boolean isNoChoice(final Object choiceResult) {
|
||||
return NO_CHOICE==choiceResult;
|
||||
return choiceResult == NO_CHOICE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ public class MagicDieDrawCardTrigger extends MagicWhenPutIntoGraveyardTrigger {
|
|||
final MagicGame game,
|
||||
final MagicPermanent permanent,
|
||||
final MagicGraveyardTriggerData triggerData) {
|
||||
if (MagicLocationType.Play == triggerData.fromLocation) {
|
||||
if (triggerData.fromLocation == MagicLocationType.Play) {
|
||||
return mustDraw ?
|
||||
new MagicEvent(
|
||||
permanent,
|
||||
|
|
|
@ -24,7 +24,7 @@ public class MagicModularTrigger extends MagicWhenPutIntoGraveyardTrigger {
|
|||
|
||||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicGraveyardTriggerData triggerData) {
|
||||
if (MagicLocationType.Play == triggerData.fromLocation) {
|
||||
if (triggerData.fromLocation == MagicLocationType.Play) {
|
||||
final int amount = permanent.getCounters(MagicCounterType.PlusOne);
|
||||
return new MagicEvent(
|
||||
permanent,
|
||||
|
|
|
@ -29,7 +29,7 @@ public class MagicSoulshiftTrigger extends MagicWhenPutIntoGraveyardTrigger {
|
|||
final MagicGame game,
|
||||
final MagicPermanent permanent,
|
||||
final MagicGraveyardTriggerData triggerData) {
|
||||
if (MagicLocationType.Play == triggerData.fromLocation) {
|
||||
if (triggerData.fromLocation == MagicLocationType.Play) {
|
||||
final MagicPlayer player = permanent.getController();
|
||||
final MagicTargetFilter targetFilter =
|
||||
new MagicTargetFilter.MagicCMCTargetFilter(
|
||||
|
|
Loading…
Reference in New Issue