Sonar fixes 19022019

This commit is contained in:
Ingmar Goudt 2019-02-19 21:51:45 +01:00
parent 872eea7326
commit 056226d83c
385 changed files with 472 additions and 475 deletions

View file

@ -1260,7 +1260,7 @@ public class DragCardGrid extends JPanel implements DragCardSource, DragCardTarg
for (List<List<CardView>> gridRow : cardGrid) {
for (List<CardView> stack : gridRow) {
for (CardView card : stack) {
boolean s = card.isSelected() | card.getCardTypes().contains(cardType);
boolean s = card.isSelected() || card.getCardTypes().contains(cardType);
card.setSelected(s);
cardViews.get(card.getId()).update(card);
}

View file

@ -36,7 +36,7 @@ public class MageRoundPane extends JPanel {
IMAGE_CACHE = ImageCaches.register(new MapMaker().softValues().makeComputingMap((Function<Key, BufferedImage>) key -> createImage(key)));
}
private final static class ShadowKey {
private static final class ShadowKey {
final int width;
final int height;
@ -76,7 +76,7 @@ public class MageRoundPane extends JPanel {
}
}
private final static class Key {
private static final class Key {
final int width;
final int height;

View file

@ -20,7 +20,7 @@ import java.util.UUID;
public class DialogManager extends JComponent implements MouseListener,
MouseMotionListener {
private final static Map<UUID, DialogManager> dialogManagers = new HashMap<>();
private static final Map<UUID, DialogManager> dialogManagers = new HashMap<>();
public static DialogManager getManager(UUID gameId) {
if (!dialogManagers.containsKey(gameId)) {

View file

@ -8,6 +8,7 @@ import mage.view.CardsView;
import java.awt.*;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
/**
@ -26,9 +27,9 @@ public class DlgParams {
private int playerID;
private CardsView cards;
private ArrayList<String> stringList;
private java.util.List<String> stringList;
//private ArrayList<DeckInfo> deckList;
private ArrayList<Object> objectList;
private java.util.List<Object> objectList;
private String title;
private int opponentID;
@ -38,7 +39,7 @@ public class DlgParams {
boolean isAI = false;
public HashSet<String> manaChoices = new HashSet<>();
public Set<String> manaChoices = new HashSet<>();
public int getPlayerID() {
return playerID;
@ -74,11 +75,11 @@ public class DlgParams {
this.message = message;
}
public HashSet<String> getManaChoices() {
public Set<String> getManaChoices() {
return manaChoices;
}
public void setManaChoices(HashSet<String> manaChoices) {
public void setManaChoices(Set<String> manaChoices) {
this.manaChoices = manaChoices;
}
@ -98,7 +99,7 @@ public class DlgParams {
this.isChooseAbility = isChooseAbility;
}
public ArrayList<String> getStringList() {
public java.util.List<String> getStringList() {
return stringList;
}
@ -114,7 +115,7 @@ public class DlgParams {
this.deckList = deckList;
}*/
public ArrayList<Object> getObjectList() {
public java.util.List<Object> getObjectList() {
return objectList;
}

View file

@ -10,7 +10,7 @@ import java.awt.*;
/**
* @author mw, noxx
*/
abstract public class IDialogPanel extends JXPanel {
public abstract class IDialogPanel extends JXPanel {
private DlgParams params;
private Dimension cardDimension;

View file

@ -50,11 +50,12 @@ public class ChoiceDialog extends IDialogPanel {
private boolean isCancelStopsPlaying = true;
private final DlgParams params;
private final String title;
/**
* This is the default constructor
*
* @param params
* @param title
*/
@ -130,18 +131,18 @@ public class ChoiceDialog extends IDialogPanel {
return;
}
ArrayList<Component> toRemove = new ArrayList<>();
java.util.List<Component> toRemove = new ArrayList<>();
for (int i = getComponentCount() - 1; i > 0; i--) {
Component o = getComponent(i);
if (o instanceof MageCard) {
toRemove.add(o);
}
}
for (int i = 0; i < toRemove.size(); i++) {
remove(toRemove.get(i));
for (Component aToRemove : toRemove) {
remove(aToRemove);
}
ArrayList<CardView> cardList = new ArrayList<>(cards.values());
java.util.List<CardView> cardList = new ArrayList<>(cards.values());
int width = SettingsManager.instance.getCardSize().width;
int height = SettingsManager.instance.getCardSize().height;
@ -163,7 +164,7 @@ public class ChoiceDialog extends IDialogPanel {
CardView card = cardList.get(i);
MageCard cardImg = Plugins.instance.getMageCard(card, bigCard, getCardDimension(), gameId, true, true);
cardImg.setLocation(dx, dy + j*(height + 30));
cardImg.setLocation(dx, dy + j * (height + 30));
add(cardImg);
dx += (width + 20);
@ -237,11 +238,8 @@ public class ChoiceDialog extends IDialogPanel {
int h = getDlgParams().rect.height - 90;
jButtonNextPage.setBounds(new Rectangle(w / 2 + 45, h - 50, 60, 60));
if (maxPages > 1) {
jButtonNextPage.setVisible(true);
} else {
jButtonNextPage.setVisible(false);
}
jButtonNextPage.setVisible(maxPages > 1);
jButtonNextPage.setObserver(new Command() {
private static final long serialVersionUID = -3174360416099554104L;

View file

@ -78,7 +78,6 @@ public enum MageTray {
tray.add(trayIcon);
} catch (AWTException e) {
log.error("TrayIcon could not be added: ", e);
return;
}
} catch (Exception e) {

View file

@ -2,6 +2,7 @@
package mage.client.deck.generator;
import java.util.ArrayList;
import java.util.List;
public enum DeckGeneratorCMC {
@ -51,11 +52,11 @@ public enum DeckGeneratorCMC {
this.poolCMCs40 = CMCs40;
}
public ArrayList<CMC> get40CardPoolCMC() {
public List<CMC> get40CardPoolCMC() {
return this.poolCMCs40;
}
public ArrayList<CMC> get60CardPoolCMC() {
public List<CMC> get60CardPoolCMC() {
return this.poolCMCs60;
}

View file

@ -143,7 +143,7 @@ public class RatioAdjustingSliderPanel extends JPanel {
private static JLabel createChangingPercentageLabel(final JSlider slider) {
final JLabel label = new JLabel(" " + String.valueOf(slider.getValue()) + '%');
final JLabel label = new JLabel(" " + slider.getValue() + '%');
slider.addChangeListener(e -> {
String value = String.valueOf(slider.getValue());

View file

@ -357,9 +357,7 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
for (int itemIndex : choiseValue) {
java.util.List<String> listReceived = ConstructedFormats.getSetsByFormat(x.getElementAt(itemIndex).toString());
listReceived.stream().filter((item) -> (setCodes.contains(item) == false)).forEachOrdered((item) -> {
setCodes.add(item);
});
listReceived.stream().filter(item -> !setCodes.contains(item)).forEachOrdered(setCodes::add);
}
criteria.setCodes(setCodes.toArray(new String[0]));
}

View file

@ -55,7 +55,7 @@ public class DeckArea extends javax.swing.JPanel {
public int dividerLocationLimited;
public int dividerLocationNormal;
private final static Pattern parser = Pattern.compile("([^|]*)\\|([^|]*)\\|([^|]*)\\|([^|]*)");
private static final Pattern parser = Pattern.compile("([^|]*)\\|([^|]*)\\|([^|]*)\\|([^|]*)");
public static Settings parse(String s) {
Matcher m = parser.matcher(s);

View file

@ -1119,12 +1119,12 @@ class ImportFilter extends FileFilter {
ext = s.substring(i + 1).toLowerCase(Locale.ENGLISH);
}
if (ext != null) {
if (ext.toLowerCase(Locale.ENGLISH).equals("dec")
|| ext.toLowerCase(Locale.ENGLISH).equals("mwdeck")
|| ext.toLowerCase(Locale.ENGLISH).equals("txt")
|| ext.toLowerCase(Locale.ENGLISH).equals("dek")
|| ext.toLowerCase(Locale.ENGLISH).equals("cod")
|| ext.toLowerCase(Locale.ENGLISH).equals("o8d")) {
if (ext.equalsIgnoreCase("dec")
|| ext.equalsIgnoreCase("mwdeck")
|| ext.equalsIgnoreCase("txt")
|| ext.equalsIgnoreCase("dek")
|| ext.equalsIgnoreCase("cod")
|| ext.equalsIgnoreCase("o8d")) {
return true;
}
}

View file

@ -10,7 +10,7 @@ import mage.client.dialog.PreferencesDialog;
public class SortSettingBase extends SortSetting {
private final static SortSettingBase instance = new SortSettingBase();
private static final SortSettingBase instance = new SortSettingBase();
public static SortSettingBase getInstance() {
return instance;

View file

@ -10,7 +10,7 @@ import mage.client.dialog.PreferencesDialog;
public class SortSettingDeck extends SortSetting {
private final static SortSettingDeck instance = new SortSettingDeck();
private static final SortSettingDeck instance = new SortSettingDeck();
public static SortSettingDeck getInstance() {
return instance;

View file

@ -10,7 +10,7 @@ import mage.client.dialog.PreferencesDialog;
*/
public class SortSettingDraft extends SortSetting {
private final static SortSettingDraft instance = new SortSettingDraft();
private static final SortSettingDraft instance = new SortSettingDraft();
public static SortSettingDraft getInstance() {
return instance;

View file

@ -265,7 +265,7 @@ public class MageBook extends JComponent {
public int showTokens() {
jLayeredPane.removeAll();
List<Token> tokens = getTokens(currentPage, currentSet);
if (tokens != null && tokens.size() > 0) {
if (tokens != null && !tokens.isEmpty()) {
int size = tokens.size();
Rectangle rectangle = new Rectangle();
rectangle.translate(OFFSET_X, OFFSET_Y);
@ -295,7 +295,7 @@ public class MageBook extends JComponent {
public int showEmblems(int numTokens) {
List<Emblem> emblems = getEmblems(currentPage, currentSet, numTokens);
int numEmblems = 0;
if (emblems != null && emblems.size() > 0) {
if (emblems != null && !emblems.isEmpty()) {
int size = emblems.size();
numEmblems = size;
Rectangle rectangle = new Rectangle();

View file

@ -25,7 +25,7 @@ public class RandomPacksSelectorDialog extends javax.swing.JDialog {
private boolean isRandomDraft;
private boolean isRichManDraft;
private String title = "";
public final static String randomDraftDescription = ("The selected packs will be randomly distributed to players. Each player may open different packs. Duplicates will be avoided.");
public static final String randomDraftDescription = ("The selected packs will be randomly distributed to players. Each player may open different packs. Duplicates will be avoided.");
public RandomPacksSelectorDialog(boolean isRandomDraft, boolean isRichManDraft) {
initComponents();

View file

@ -23,9 +23,9 @@ import org.mage.card.arcane.CardRenderer;
public final class GUISizeHelper {
// relate the native image card size to a value of the size scale
final static int CARD_IMAGE_WIDTH = 312;
final static int CARD_IMAGE_HEIGHT = 445;
final static int CARD_IMAG_VALUE = 42;
static final int CARD_IMAGE_WIDTH = 312;
static final int CARD_IMAGE_HEIGHT = 445;
static final int CARD_IMAG_VALUE = 42;
public static String basicSymbolSize = "small";

View file

@ -10,7 +10,7 @@ import java.util.Map;
*/
public final class ImageCaches {
private final static ArrayList<Map> IMAGE_CACHES;
private static final ArrayList<Map> IMAGE_CACHES;
static {
IMAGE_CACHES = new ArrayList<>();

View file

@ -22,7 +22,7 @@ import java.util.Map;
*/
public final class TransformedImageCache {
private final static class Key {
private static final class Key {
final int width;
final int height;

View file

@ -78,7 +78,7 @@ public class CardPanelComponentImpl extends CardPanel {
private boolean displayTitleAnyway;
private boolean displayFullImagePath;
private final static Map<Key, BufferedImage> IMAGE_CACHE;
private static final Map<Key, BufferedImage> IMAGE_CACHE;
static class Key {

View file

@ -215,7 +215,7 @@ public class CardPanelRenderImpl extends CardPanel {
}
// Map of generated images
private final static Map<ImageKey, BufferedImage> IMAGE_CACHE = new MapMaker().softValues().makeMap();
private static final Map<ImageKey, BufferedImage> IMAGE_CACHE = new MapMaker().softValues().makeMap();
// The art image for the card, loaded in from the disk
private BufferedImage artImage;

View file

@ -28,9 +28,9 @@ public class GlowText extends JLabel {
private Color glowColor;
private boolean wrap;
private int lineCount = 0;
private final static Map<Key, BufferedImage> IMAGE_CACHE;
private static final Map<Key, BufferedImage> IMAGE_CACHE;
private final static class Key {
private static final class Key {
final int width;
final int height;

View file

@ -63,7 +63,7 @@ import static org.mage.card.arcane.ManaSymbols.getSizedManaSymbol;
*/
public class ModernCardRenderer extends CardRenderer {
private final static Logger LOGGER = Logger.getLogger(ModernCardRenderer.class);
private static final Logger LOGGER = Logger.getLogger(ModernCardRenderer.class);
///////////////////////////////////////////////////////////////////////////
// Textures for modern frame cards

View file

@ -54,7 +54,7 @@ public class SessionImpl implements Session {
private ServerState serverState;
private SessionState sessionState = SessionState.DISCONNECTED;
private Connection connection;
private final static int PING_CYCLES = 10;
private static final int PING_CYCLES = 10;
private final LinkedList<Long> pingTime = new LinkedList<>();
private String pingInfo = "";
private static boolean debugMode = false;

View file

@ -12,13 +12,13 @@ public class MageVersion implements Serializable, Comparable<MageVersion> {
/**
*
*/
public final static int MAGE_VERSION_MAJOR = 1;
public final static int MAGE_VERSION_MINOR = 4;
public final static int MAGE_VERSION_PATCH = 33;
public final static String MAGE_EDITION_INFO = ""; // set "-beta" for 1.4.32-betaV0
public final static String MAGE_VERSION_MINOR_PATCH = "V3"; // default
public static final int MAGE_VERSION_MAJOR = 1;
public static final int MAGE_VERSION_MINOR = 4;
public static final int MAGE_VERSION_PATCH = 33;
public static final String MAGE_EDITION_INFO = ""; // set "-beta" for 1.4.32-betaV0
public static final String MAGE_VERSION_MINOR_PATCH = "V3"; // default
// strict mode
private final static boolean MAGE_VERSION_MINOR_PATCH_MUST_BE_SAME = true; // set true on uncompatible github changes, set false after new major release (after MAGE_VERSION_PATCH changes)
private static final boolean MAGE_VERSION_MINOR_PATCH_MUST_BE_SAME = true; // set true on uncompatible github changes, set false after new major release (after MAGE_VERSION_PATCH changes)
private final int major;
private final int minor;

View file

@ -30,8 +30,8 @@ import org.jboss.remoting.callback.InvokerCallbackHandler;
public class Session {
private static final Logger logger = Logger.getLogger(Session.class);
private final static Pattern alphabetsPattern = Pattern.compile("[a-zA-Z]");
private final static Pattern digitsPattern = Pattern.compile("[0-9]");
private static final Pattern alphabetsPattern = Pattern.compile("[a-zA-Z]");
private static final Pattern digitsPattern = Pattern.compile("[0-9]");
private final String sessionId;
private UUID userId;

View file

@ -24,7 +24,7 @@ import org.apache.log4j.Logger;
*/
public class DraftSession {
protected final static Logger logger = Logger.getLogger(DraftSession.class);
protected static final Logger logger = Logger.getLogger(DraftSession.class);
protected final UUID userId;
protected final UUID playerId;

View file

@ -25,7 +25,7 @@ import java.util.UUID;
*/
public class GameSessionWatcher {
protected final static Logger logger = Logger.getLogger(GameSessionWatcher.class);
protected static final Logger logger = Logger.getLogger(GameSessionWatcher.class);
protected final UUID userId;
protected final Game game;

View file

@ -21,7 +21,7 @@ import org.apache.log4j.Logger;
*/
public class TournamentSession {
protected final static Logger logger = Logger.getLogger(TournamentSession.class);
protected static final Logger logger = Logger.getLogger(TournamentSession.class);
protected final UUID userId;
protected final UUID playerId;

View file

@ -20,7 +20,7 @@ import mage.filter.predicate.permanent.ControllerPredicate;
*/
public final class AdaptiveAutomaton extends CardImpl {
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures you control of the chosen type");
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures you control of the chosen type");
static {
filter.add(new ControllerPredicate(TargetController.YOU));

View file

@ -25,7 +25,7 @@ import mage.target.common.TargetCreaturePermanent;
*/
public final class AgentOfShauku extends CardImpl {
final static FilterControlledPermanent filter = new FilterControlledLandPermanent("a land");
static final FilterControlledPermanent filter = new FilterControlledLandPermanent("a land");
public AgentOfShauku(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}");

View file

@ -25,7 +25,7 @@ import mage.filter.predicate.permanent.ControllerPredicate;
*/
public final class AltacBloodseeker extends CardImpl {
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
static {
filter.add(new ControllerPredicate(TargetController.OPPONENT));

View file

@ -22,7 +22,7 @@ import mage.filter.predicate.mageobject.ColorPredicate;
*/
public final class AmrouSeekers extends CardImpl {
private final static FilterCreaturePermanent notArtificatOrWhite = new FilterCreaturePermanent("except by artifact creatures and/or white creatures");
private static final FilterCreaturePermanent notArtificatOrWhite = new FilterCreaturePermanent("except by artifact creatures and/or white creatures");
static {
notArtificatOrWhite.add(Predicates.not(

View file

@ -26,7 +26,7 @@ import mage.target.TargetPermanent;
*/
public final class AngelOfSanctions extends CardImpl {
private final static FilterNonlandPermanent filter = new FilterNonlandPermanent();
private static final FilterNonlandPermanent filter = new FilterNonlandPermanent();
static {
filter.add(new ControllerPredicate(TargetController.OPPONENT));

View file

@ -17,7 +17,7 @@ import mage.filter.predicate.mageobject.ColorPredicate;
*/
public final class AngelsFeather extends CardImpl {
private final static FilterSpell filter = new FilterSpell("a white spell");
private static final FilterSpell filter = new FilterSpell("a white spell");
static {
filter.add(new ColorPredicate(ObjectColor.WHITE));

View file

@ -20,7 +20,7 @@ import mage.target.targetpointer.SecondTargetPointer;
*/
public final class AngrathsFury extends CardImpl {
private final static FilterCard filter = new FilterCard("Angrath, Minotaur Pirate");
private static final FilterCard filter = new FilterCard("Angrath, Minotaur Pirate");
static {
filter.add(new NamePredicate(filter.getMessage()));

View file

@ -189,7 +189,7 @@ class AnimateDeadAttachEffect extends OneShotEffect {
class AnimateDeadChangeAbilityEffect extends ContinuousEffectImpl implements SourceEffect {
private final static Ability newAbility = new EnchantAbility("creature put onto the battlefield with Animate Dead");
private static final Ability newAbility = new EnchantAbility("creature put onto the battlefield with Animate Dead");
static {
newAbility.setRuleAtTheTop(true);

View file

@ -25,7 +25,7 @@ import java.util.UUID;
*/
public final class AquitectsWill extends CardImpl {
private final static FilterControlledPermanent filter = new FilterControlledPermanent("Merfolk");
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Merfolk");
static {
filter.add(new SubtypePredicate(SubType.MERFOLK));

View file

@ -23,7 +23,7 @@ import mage.filter.predicate.mageobject.SupertypePredicate;
*/
public final class ArenaOfTheAncients extends CardImpl {
private final static FilterCreaturePermanent legendaryFilter = new FilterCreaturePermanent("legendary creatures");
private static final FilterCreaturePermanent legendaryFilter = new FilterCreaturePermanent("legendary creatures");
static {
legendaryFilter.add(new SupertypePredicate(SuperType.LEGENDARY));
}

View file

@ -22,7 +22,7 @@ import java.util.UUID;
*/
public final class AvoidFate extends CardImpl {
private final static FilterSpell filter = new FilterSpell("instant or Aura spell that targets a permanent you control");
private static final FilterSpell filter = new FilterSpell("instant or Aura spell that targets a permanent you control");
static {
filter.add(Predicates.or(new CardTypePredicate(CardType.INSTANT), new SubtypePredicate(SubType.AURA)));

View file

@ -26,7 +26,7 @@ import mage.target.common.TargetActivatedAbility;
*/
public final class AyeshaTanaka extends CardImpl {
private final static FilterStackObject filter = new FilterStackObject("activated ability from an artifact source");
private static final FilterStackObject filter = new FilterStackObject("activated ability from an artifact source");
static {
filter.add(new ArtifactSourcePredicate());

View file

@ -28,7 +28,7 @@ import mage.util.CardUtil;
*/
public final class BanisherPriest extends CardImpl {
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
static {
filter.add(new ControllerPredicate(TargetController.OPPONENT));

View file

@ -21,7 +21,7 @@ import mage.target.TargetPermanent;
*/
public final class BanishingLight extends CardImpl {
private final static FilterNonlandPermanent filter = new FilterNonlandPermanent();
private static final FilterNonlandPermanent filter = new FilterNonlandPermanent();
static {
filter.add(new ControllerPredicate(TargetController.OPPONENT));

View file

@ -70,7 +70,7 @@ public final class BaruFistOfKrosa extends CardImpl {
class BaruFistOfKrosaEffect extends OneShotEffect {
final static FilterControlledPermanent filter = new FilterControlledLandPermanent("lands you control");
static final FilterControlledPermanent filter = new FilterControlledLandPermanent("lands you control");
BaruFistOfKrosaEffect() {
super(Outcome.PutCreatureInPlay);

View file

@ -24,7 +24,7 @@ import mage.filter.predicate.permanent.CommanderPredicate;
*/
public final class BastionProtector extends CardImpl {
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("Commander creatures");
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Commander creatures");
static {
filter.add(CommanderPredicate.instance);

View file

@ -35,7 +35,7 @@ import mage.util.CardUtil;
*/
public final class BishopOfBinding extends CardImpl {
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
static {
filter.add(new ControllerPredicate(TargetController.OPPONENT));

View file

@ -25,7 +25,7 @@ import mage.filter.common.FilterCreaturePermanent;
*/
public final class BladewingsThrall extends CardImpl {
final static private String RULE = "{this} has flying as long as you control a Dragon";
static final private String RULE = "{this} has flying as long as you control a Dragon";
public BladewingsThrall(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}");

View file

@ -48,7 +48,7 @@ public final class BlightHerder extends CardImpl {
class BlightHerderEffect extends OneShotEffect {
private final static FilterCard filter = new FilterCard("cards your opponents own from exile");
private static final FilterCard filter = new FilterCard("cards your opponents own from exile");
static {
filter.add(new OwnerPredicate(TargetController.OPPONENT));

View file

@ -24,8 +24,8 @@ import mage.filter.common.FilterControlledEnchantmentPermanent;
*/
public final class BloodCursedKnight extends CardImpl {
final static private String rule1 = "As long as you control an enchantment, {this} gets +1/+1";
final static private String rule2 = "and has lifelink";
static final private String rule1 = "As long as you control an enchantment, {this} gets +1/+1";
static final private String rule2 = "and has lifelink";
public BloodCursedKnight(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{B}");

View file

@ -21,7 +21,7 @@ import mage.filter.predicate.permanent.ControllerPredicate;
*/
public final class Bloodbriar extends CardImpl {
private final static FilterPermanent filter = new FilterPermanent("another permanent");
private static final FilterPermanent filter = new FilterPermanent("another permanent");
static {
filter.add(new ControllerPredicate(TargetController.YOU));

View file

@ -25,7 +25,7 @@ import mage.filter.predicate.permanent.CommanderPredicate;
*/
public final class BloodswornSteward extends CardImpl {
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("Commander creatures");
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Commander creatures");
static {
filter.add(CommanderPredicate.instance);
}

View file

@ -29,7 +29,7 @@ import mage.target.common.TargetControlledPermanent;
*/
public final class BogGlider extends CardImpl {
final static FilterControlledPermanent landFilter = new FilterControlledLandPermanent("a land");
static final FilterControlledPermanent landFilter = new FilterControlledLandPermanent("a land");
private static final FilterPermanentCard filter = new FilterPermanentCard("Mercenary permanent card with converted mana cost 2 or less");
static {

View file

@ -17,7 +17,7 @@ import mage.filter.predicate.permanent.ControllerPredicate;
*/
public final class BoilingEarth extends CardImpl {
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("creature your opponents control");
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature your opponents control");
static {
filter.add(new ControllerPredicate(TargetController.OPPONENT));

View file

@ -26,7 +26,7 @@ import java.util.UUID;
*/
public final class BoundByMoonsilver extends CardImpl {
private final static FilterControlledPermanent filter = new FilterControlledPermanent("another permanent");
private static final FilterControlledPermanent filter = new FilterControlledPermanent("another permanent");
static {
filter.add(AnotherPredicate.instance);

View file

@ -31,7 +31,7 @@ public final class BrandedBrawlers extends CardImpl {
filter.add(Predicates.not(TappedPredicate.instance));
}
final static private String rule = "{this} can't block if you control an untapped land";
static final private String rule = "{this} can't block if you control an untapped land";
public BrandedBrawlers(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}");

View file

@ -24,7 +24,7 @@ import mage.target.common.TargetActivatedAbility;
*/
public final class BrownOuphe extends CardImpl {
private final static FilterStackObject filter = new FilterStackObject("activated ability from an artifact source");
private static final FilterStackObject filter = new FilterStackObject("activated ability from an artifact source");
static {
filter.add(new ArtifactSourcePredicate());

View file

@ -56,7 +56,7 @@ public final class BudokaGardener extends CardImpl {
class BudokaGardenerEffect extends OneShotEffect {
final static FilterControlledPermanent filterLands = new FilterControlledLandPermanent("lands you control");
static final FilterControlledPermanent filterLands = new FilterControlledLandPermanent("lands you control");
BudokaGardenerEffect() {
super(Outcome.PutLandInPlay);

View file

@ -19,7 +19,7 @@ import mage.filter.predicate.mageobject.SupertypePredicate;
*/
public final class BurningEarth extends CardImpl {
private final static FilterLandPermanent filter = new FilterLandPermanent("a player taps a nonbasic land");
private static final FilterLandPermanent filter = new FilterLandPermanent("a player taps a nonbasic land");
static {
filter.add(Predicates.not(new SupertypePredicate(SuperType.BASIC)));

View file

@ -33,7 +33,7 @@ import mage.target.targetpointer.FixedTarget;
*/
public final class CapturedByTheConsulate extends CardImpl {
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent();
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
static {
filter.add(new ControllerPredicate(TargetController.NOT_YOU));

View file

@ -24,7 +24,7 @@ import mage.target.TargetPermanent;
*/
public final class CastOut extends CardImpl {
private final static FilterNonlandPermanent filter = new FilterNonlandPermanent();
private static final FilterNonlandPermanent filter = new FilterNonlandPermanent();
static {
filter.add(new ControllerPredicate(TargetController.OPPONENT));

View file

@ -24,7 +24,7 @@ import mage.game.permanent.token.EldraziScionToken;
*/
public final class CatacombSifter extends CardImpl {
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature you control");
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature you control");
static {
filter.add(AnotherPredicate.instance);
filter.add(new ControllerPredicate(TargetController.YOU));

View file

@ -23,7 +23,7 @@ import java.util.UUID;
*/
public final class ChampionOfDusk extends CardImpl {
private final static FilterControlledPermanent filter = new FilterControlledPermanent("Vampires you control");
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Vampires you control");
static {
filter.add(new SubtypePredicate(SubType.VAMPIRE));

View file

@ -23,7 +23,7 @@ import java.util.UUID;
*/
public final class ChampionOfLambholt extends CardImpl {
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature");
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature");
static {
filter.add(AnotherPredicate.instance);

View file

@ -26,7 +26,7 @@ import mage.target.TargetPermanent;
*/
public final class ChandrasDefeat extends CardImpl {
private final static FilterPermanent filter = new FilterPermanent("creature or planeswalker");
private static final FilterPermanent filter = new FilterPermanent("creature or planeswalker");
static {
filter.add(new ColorPredicate(ObjectColor.RED));

View file

@ -17,7 +17,7 @@ import mage.target.common.TargetPlayerOrPlaneswalker;
*/
public final class ChandrasOutburst extends CardImpl {
private final static FilterCard filter = new FilterCard("Chandra, Bold Pyromancer");
private static final FilterCard filter = new FilterCard("Chandra, Bold Pyromancer");
static {
filter.add(new NamePredicate("Chandra, Bold Pyromancer"));

View file

@ -31,7 +31,7 @@ import mage.game.permanent.token.custom.CreatureToken;
*/
public final class ChimericEgg extends CardImpl {
private final static FilterSpell nonArtifactFilter = new FilterSpell("a nonartifact spell");
private static final FilterSpell nonArtifactFilter = new FilterSpell("a nonartifact spell");
static {
nonArtifactFilter.add(Predicates.not(new CardTypePredicate(CardType.ARTIFACT)));

View file

@ -28,9 +28,9 @@ import java.util.UUID;
*/
public final class CitadelSiege extends CardImpl {
private final static String ruleTrigger1 = "&bull Khans &mdash; At the beginning of combat on your turn, put two +1/+1 counters on target creature you control.";
private final static String ruleTrigger2 = "&bull Dragons &mdash; At the beginning of combat on each opponent's turn, tap target creature that player controls.";
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("creature controlled by the active player");
private static final String ruleTrigger1 = "&bull Khans &mdash; At the beginning of combat on your turn, put two +1/+1 counters on target creature you control.";
private static final String ruleTrigger2 = "&bull Dragons &mdash; At the beginning of combat on each opponent's turn, tap target creature that player controls.";
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature controlled by the active player");
static {
filter.add(CitadelSiegePredicate.instance);

View file

@ -19,7 +19,7 @@ import mage.target.common.TargetAnyTarget;
*/
public final class CloseQuarters extends CardImpl {
final static private FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature you control");
static final private FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature you control");
static {
filter.add(new ControllerPredicate(TargetController.YOU));

View file

@ -21,7 +21,7 @@ import mage.target.TargetPermanent;
*/
public final class ConclaveTribunal extends CardImpl {
private final static FilterNonlandPermanent filter = new FilterNonlandPermanent();
private static final FilterNonlandPermanent filter = new FilterNonlandPermanent();
static {
filter.add(new ControllerPredicate(TargetController.OPPONENT));

View file

@ -29,7 +29,7 @@ import mage.target.targetpointer.FixedTarget;
*/
public final class ConfiscationCoup extends CardImpl {
private final static FilterPermanent filter = new FilterPermanent("creature or artifact");
private static final FilterPermanent filter = new FilterPermanent("creature or artifact");
static {
filter.add(Predicates.or(new CardTypePredicate(CardType.CREATURE), new CardTypePredicate(CardType.ARTIFACT)));

View file

@ -18,7 +18,7 @@ import mage.target.TargetSpell;
*/
public final class Confound extends CardImpl {
private final static FilterSpell filter = new FilterSpell("spell that targets a creature");
private static final FilterSpell filter = new FilterSpell("spell that targets a creature");
static {
filter.add(new TargetsPermanentPredicate(new FilterCreaturePermanent()));

View file

@ -26,7 +26,7 @@ import mage.target.common.TargetCreaturePermanent;
*/
public final class ConsulsShieldguard extends CardImpl {
private final static FilterAttackingCreature filter = new FilterAttackingCreature();
private static final FilterAttackingCreature filter = new FilterAttackingCreature();
static {
filter.add(AnotherPredicate.instance);

View file

@ -53,7 +53,7 @@ public final class CrimsonHonorGuard extends CardImpl {
class CrimsonHonorGuardEffect extends OneShotEffect {
private final static FilterPermanent filter = new FilterPermanent("Commander");
private static final FilterPermanent filter = new FilterPermanent("Commander");
static {
filter.add(CommanderPredicate.instance);

View file

@ -24,7 +24,7 @@ import mage.target.common.TargetAttackingCreature;
*/
public final class CrossroadsConsecrator extends CardImpl {
private final static FilterAttackingCreature filter = new FilterAttackingCreature("attacking Human");
private static final FilterAttackingCreature filter = new FilterAttackingCreature("attacking Human");
static {
filter.add(new SubtypePredicate(SubType.HUMAN));

View file

@ -26,8 +26,8 @@ import java.util.UUID;
*/
public final class CruelRevival extends CardImpl {
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Zombie creature");
private final static FilterCard filter2 = new FilterCard("Zombie card from your graveyard");
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Zombie creature");
private static final FilterCard filter2 = new FilterCard("Zombie card from your graveyard");
static {
filter.add(new CardTypePredicate(CardType.CREATURE));

View file

@ -25,7 +25,7 @@ import mage.util.functions.ApplyToPermanent;
*/
public final class Cryptoplasm extends CardImpl {
final static FilterCreaturePermanent filter = new FilterCreaturePermanent();
static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
static {
filter.add(AnotherPredicate.instance);

View file

@ -47,7 +47,7 @@ public final class CultOfTheWaxingMoon extends CardImpl {
class CultOfTheWaxingMoonAbility extends TriggeredAbilityImpl {
private final static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
static {
filter.add(Predicates.not(new SubtypePredicate(SubType.HUMAN)));

View file

@ -19,7 +19,7 @@ import mage.filter.predicate.permanent.ControllerPredicate;
*/
public final class DampeningPulse extends CardImpl {
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures your opponents control");
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures your opponents control");
static {
filter.add(new ControllerPredicate(TargetController.OPPONENT));

View file

@ -204,7 +204,7 @@ class DanceOfTheDeadAttachEffect extends OneShotEffect {
class DanceOfTheDeadChangeAbilityEffect extends ContinuousEffectImpl implements SourceEffect {
private final static Ability newAbility = new EnchantAbility("creature put onto the battlefield with Dance of the Dead");
private static final Ability newAbility = new EnchantAbility("creature put onto the battlefield with Dance of the Dead");
static {
newAbility.setRuleAtTheTop(true);

View file

@ -19,7 +19,7 @@ import mage.target.TargetPermanent;
*/
public final class DaringDemolition extends CardImpl {
private final static FilterPermanent filter = new FilterPermanent("creature or Vehicle");
private static final FilterPermanent filter = new FilterPermanent("creature or Vehicle");
static {
filter.add(Predicates.or(new CardTypePredicate(CardType.CREATURE), new SubtypePredicate(SubType.VEHICLE)));

View file

@ -58,7 +58,7 @@ public final class DarkSalvation extends CardImpl {
class ZombiesControlledByTargetPlayerCount implements DynamicValue {
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("Zombies");
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Zombies");
static {
filter.add(new SubtypePredicate(SubType.ZOMBIE));

View file

@ -23,7 +23,7 @@ import mage.filter.predicate.permanent.AnotherPredicate;
*/
public final class DarkslickShores extends CardImpl {
private final static FilterLandPermanent filter = new FilterLandPermanent();
private static final FilterLandPermanent filter = new FilterLandPermanent();
static {
filter.add(AnotherPredicate.instance);

View file

@ -29,8 +29,8 @@ import mage.filter.predicate.permanent.AnotherPredicate;
*/
public final class DauntlessDourbark extends CardImpl {
final static private FilterControlledPermanent filter = new FilterControlledPermanent("Forests you control plus the number of Treefolk you control");
final static private FilterControlledPermanent filter2 = new FilterControlledPermanent();
static final private FilterControlledPermanent filter = new FilterControlledPermanent("Forests you control plus the number of Treefolk you control");
static final private FilterControlledPermanent filter2 = new FilterControlledPermanent();
static {
filter.add(Predicates.or(new SubtypePredicate(SubType.FOREST),
@ -39,7 +39,7 @@ public final class DauntlessDourbark extends CardImpl {
filter2.add(AnotherPredicate.instance);
}
final static private String rule = "{this} has trample as long as you control another Treefolk";
static final private String rule = "{this} has trample as long as you control another Treefolk";
public DauntlessDourbark(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}");

View file

@ -24,7 +24,7 @@ import mage.watchers.common.RevoltWatcher;
*/
public final class DeadeyeHarpooner extends CardImpl {
private final static FilterOpponentsCreaturePermanent filter = new FilterOpponentsCreaturePermanent("tapped creature an opponent controls");
private static final FilterOpponentsCreaturePermanent filter = new FilterOpponentsCreaturePermanent("tapped creature an opponent controls");
static {
filter.add(TappedPredicate.instance);

View file

@ -23,7 +23,7 @@ import mage.target.common.TargetControlledPermanent;
*/
public final class DeathlessBehemoth extends CardImpl {
private final static FilterControlledPermanent filter = new FilterControlledPermanent("two Eldrazi Scions");
private static final FilterControlledPermanent filter = new FilterControlledPermanent("two Eldrazi Scions");
static {
filter.add(Predicates.and(

View file

@ -24,7 +24,7 @@ import mage.target.common.TargetControlledPermanent;
*/
public final class DefiantSalvager extends CardImpl {
private final static FilterControlledPermanent filter = new FilterControlledPermanent("an artifact or creature");
private static final FilterControlledPermanent filter = new FilterControlledPermanent("an artifact or creature");
static {
filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT), new CardTypePredicate(CardType.CREATURE)));

View file

@ -19,7 +19,7 @@ import mage.filter.predicate.mageobject.ColorPredicate;
*/
public final class DemonsHorn extends CardImpl {
private final static FilterSpell filter = new FilterSpell("a black spell");
private static final FilterSpell filter = new FilterSpell("a black spell");
static {
filter.add(new ColorPredicate(ObjectColor.BLACK));

View file

@ -21,7 +21,7 @@ import mage.target.TargetPermanent;
*/
public final class DespoticScepter extends CardImpl {
private final static FilterPermanent FILTER = new FilterPermanent("permanent you own");
private static final FilterPermanent FILTER = new FilterPermanent("permanent you own");
static {
FILTER.add(new OwnerPredicate(TargetController.YOU));

View file

@ -48,8 +48,8 @@ public final class DinOfTheFireherd extends CardImpl {
class DinOfTheFireherdEffect extends OneShotEffect {
private final static FilterControlledCreaturePermanent blackCreatureFilter = new FilterControlledCreaturePermanent("black creatures you control");
private final static FilterControlledCreaturePermanent redCreatureFilter = new FilterControlledCreaturePermanent("red creatures you control");
private static final FilterControlledCreaturePermanent blackCreatureFilter = new FilterControlledCreaturePermanent("black creatures you control");
private static final FilterControlledCreaturePermanent redCreatureFilter = new FilterControlledCreaturePermanent("red creatures you control");
static {
blackCreatureFilter.add(new ColorPredicate(ObjectColor.BLACK));

View file

@ -25,7 +25,7 @@ import mage.target.TargetStackObject;
*/
public final class DiplomaticEscort extends CardImpl {
private final static FilterStackObject filter = new FilterStackObject("spell or ability that targets a creature");
private static final FilterStackObject filter = new FilterStackObject("spell or ability that targets a creature");
static {
filter.add(new TargetsPermanentPredicate(new FilterCreaturePermanent()));

View file

@ -22,11 +22,11 @@ import mage.target.TargetPlayer;
*/
public final class DireUndercurrents extends CardImpl {
private final static String rule1 = "Whenever a blue creature enters the battlefield under your control, you may have target player draw a card.";
private final static String rule2 = "Whenever a black creature enters the battlefield under your control, you may have target player discard a card.";
private static final String rule1 = "Whenever a blue creature enters the battlefield under your control, you may have target player draw a card.";
private static final String rule2 = "Whenever a black creature enters the battlefield under your control, you may have target player discard a card.";
private final static FilterControlledPermanent filterBlue = new FilterControlledCreaturePermanent();
private final static FilterControlledPermanent filterBlack = new FilterControlledCreaturePermanent();
private static final FilterControlledPermanent filterBlue = new FilterControlledCreaturePermanent();
private static final FilterControlledPermanent filterBlack = new FilterControlledCreaturePermanent();
static {
filterBlue.add(new ColorPredicate(ObjectColor.BLUE));

View file

@ -17,7 +17,7 @@ import mage.target.common.TargetCreaturePermanent;
*/
public final class DissensionInTheRanks extends CardImpl {
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("blocking creature");
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("blocking creature");
static {
filter.add(BlockingPredicate.instance);

View file

@ -52,7 +52,7 @@ public final class DjinnIlluminatus extends CardImpl {
class DjinnIlluminatusGainReplicateEffect extends ContinuousEffectImpl {
private final static FilterInstantOrSorcerySpell filter = new FilterInstantOrSorcerySpell();
private static final FilterInstantOrSorcerySpell filter = new FilterInstantOrSorcerySpell();
private final Map<UUID, ReplicateAbility> replicateAbilities = new HashMap<>();
public DjinnIlluminatusGainReplicateEffect() {

View file

@ -24,7 +24,7 @@ import mage.target.common.TargetCreaturePermanent;
*/
public final class Domineer extends CardImpl {
final static FilterCreaturePermanent filter = new FilterCreaturePermanent("artifact creature");
static final FilterCreaturePermanent filter = new FilterCreaturePermanent("artifact creature");
static {
filter.add(new CardTypePredicate(CardType.ARTIFACT));

View file

@ -22,7 +22,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate;
*/
public final class DoubtlessOne extends CardImpl {
final static FilterPermanent filter = new FilterPermanent("Clerics on the battlefield");
static final FilterPermanent filter = new FilterPermanent("Clerics on the battlefield");
static {
filter.add(new SubtypePredicate(SubType.CLERIC));

View file

@ -83,7 +83,7 @@ enum DragonlordsPrerogativeAdjuster implements CostAdjuster {
class DragonlordsPrerogativeCondition implements Condition {
private final static FilterControlledPermanent filter = new FilterControlledPermanent("Dragon");
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Dragon");
static {
filter.add(new SubtypePredicate(SubType.DRAGON));

View file

@ -17,7 +17,7 @@ import mage.filter.predicate.mageobject.ColorPredicate;
*/
public final class DragonsClaw extends CardImpl {
private final static FilterSpell filter = new FilterSpell("a red spell");
private static final FilterSpell filter = new FilterSpell("a red spell");
static {
filter.add(new ColorPredicate(ObjectColor.RED));

View file

@ -25,7 +25,7 @@ import mage.target.common.TargetOpponent;
*/
public final class DragonsEyeSavants extends CardImpl {
private final static FilterCard filter = new FilterCard("a blue card in your hand");
private static final FilterCard filter = new FilterCard("a blue card in your hand");
static {
filter.add(new ColorPredicate(ObjectColor.BLUE));
}

View file

@ -16,7 +16,7 @@ import mage.filter.predicate.permanent.ControllerPredicate;
*/
public final class DramaticReversal extends CardImpl {
private final static FilterNonlandPermanent filter = new FilterNonlandPermanent("nonland permanents");
private static final FilterNonlandPermanent filter = new FilterNonlandPermanent("nonland permanents");
static {
filter.add(new ControllerPredicate(TargetController.YOU));

Some files were not shown because too many files have changed in this diff Show more