mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 03:22:00 -08:00
code style: private static final
This commit is contained in:
parent
ef3be3987b
commit
45b54e8cc4
13 changed files with 20 additions and 22 deletions
|
|
@ -11,7 +11,7 @@ import com.google.common.cache.Cache;
|
|||
*/
|
||||
public final class ImageCaches {
|
||||
|
||||
private final static ArrayList<Cache<?, ?>> IMAGE_CACHES;
|
||||
private static final ArrayList<Cache<?, ?>> IMAGE_CACHES;
|
||||
|
||||
static {
|
||||
IMAGE_CACHES = new ArrayList<>();
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ public class CardPanelRenderModeImage extends CardPanel {
|
|||
|
||||
private static final long serialVersionUID = -3272134219262184411L;
|
||||
|
||||
private final static SoftValuesLoadingCache<Key, BufferedImage> IMAGE_CACHE = ImageCaches.register(SoftValuesLoadingCache.from(CardPanelRenderModeImage::createImage));
|
||||
private static final SoftValuesLoadingCache<Key, BufferedImage> IMAGE_CACHE = ImageCaches.register(SoftValuesLoadingCache.from(CardPanelRenderModeImage::createImage));
|
||||
|
||||
private static final int WIDTH_LIMIT = 90; // card width limit to create smaller counter
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public class CardPanelRenderModeMTGO extends CardPanel {
|
|||
// https://www.mtg.onl/evolution-of-magic-token-card-frame-design/
|
||||
|
||||
// Map of generated images
|
||||
private final static Cache<ImageKey, BufferedImage> IMAGE_CACHE = CacheBuilder
|
||||
private static final Cache<ImageKey, BufferedImage> IMAGE_CACHE = CacheBuilder
|
||||
.newBuilder()
|
||||
.maximumSize(3000)
|
||||
.expireAfterAccess(60, TimeUnit.MINUTES)
|
||||
|
|
|
|||
|
|
@ -154,12 +154,12 @@ class ChainerNightmareAdeptWatcher extends Watcher {
|
|||
|
||||
class ChainerNightmareAdeptTriggeredAbility extends EntersBattlefieldAllTriggeredAbility {
|
||||
|
||||
private final static String abilityText = "Whenever a nontoken creature "
|
||||
private static final String abilityText = "Whenever a nontoken creature "
|
||||
+ "enters the battlefield under your control, "
|
||||
+ "if you didn't cast it from your hand, it gains haste until your next turn.";
|
||||
private final static ContinuousEffect gainHasteUntilNextTurnEffect
|
||||
private static final ContinuousEffect gainHasteUntilNextTurnEffect
|
||||
= new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.UntilYourNextTurn);
|
||||
private final static FilterControlledCreaturePermanent filter
|
||||
private static final FilterControlledCreaturePermanent filter
|
||||
= new FilterControlledCreaturePermanent("nontoken creature");
|
||||
|
||||
static {
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ import mage.game.Game;
|
|||
*/
|
||||
public final class LiesaForgottenArchangel extends CardImpl {
|
||||
|
||||
private final static FilterControlledCreaturePermanent filter
|
||||
private static final FilterControlledCreaturePermanent filter
|
||||
= new FilterControlledCreaturePermanent("another nontoken creature you control");
|
||||
|
||||
static {
|
||||
|
|
|
|||
|
|
@ -39,9 +39,9 @@ public class SquadTest extends CardTestPlayerBase {
|
|||
* Arco-Flagellant can’t block.
|
||||
* Endurant — Pay 3 life: Arco-Flagellant gains indestructible until end of turn.
|
||||
*/
|
||||
private final static String flagellant = "Arco-Flagellant";
|
||||
private static final String flagellant = "Arco-Flagellant";
|
||||
|
||||
private final static String swamp = "Swamp";
|
||||
private static final String swamp = "Swamp";
|
||||
|
||||
@Test
|
||||
public void test_Squad_NotUsed_Manual() {
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ import org.mage.test.serverside.base.CardTestPlayerBase;
|
|||
|
||||
public class ValkiGodOfLiesTest extends CardTestPlayerBase {
|
||||
|
||||
private final static String valki = "Valki, God of Lies";
|
||||
private final static String kraken = "Kraken Hatchling";
|
||||
private static final String valki = "Valki, God of Lies";
|
||||
private static final String kraken = "Kraken Hatchling";
|
||||
|
||||
@Test
|
||||
public void testBecomeCopyOfExiledCreatureCard() {
|
||||
|
|
|
|||
|
|
@ -1390,7 +1390,7 @@ public abstract class AbilityImpl implements Ability {
|
|||
}
|
||||
|
||||
@Override
|
||||
final public List<CardIcon> getIcons() {
|
||||
public final List<CardIcon> getIcons() {
|
||||
return getIcons(null);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,11 +19,11 @@ public final class PlayableCountIcon extends CardIconImpl {
|
|||
super(CardIconType.PLAYABLE_COUNT, getHint(objectStats), getAmount(objectStats));
|
||||
}
|
||||
|
||||
static private String getAmount(PlayableObjectStats objectStats) {
|
||||
private static String getAmount(PlayableObjectStats objectStats) {
|
||||
return String.valueOf(objectStats.getPlayableAmount());
|
||||
}
|
||||
|
||||
static private String getHint(PlayableObjectStats objectStats) {
|
||||
private static String getHint(PlayableObjectStats objectStats) {
|
||||
String res = "Playable abilities: " + objectStats.getPlayableAmount();
|
||||
// abilities list already sorted
|
||||
List<String> list = objectStats.getPlayableAbilities();
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public class AwakenAbility extends SpellAbility {
|
|||
|
||||
private static final Logger logger = Logger.getLogger(AwakenAbility.class);
|
||||
|
||||
static private String filterMessage = "a land you control to awake";
|
||||
private static String filterMessage = "a land you control to awake";
|
||||
|
||||
private String rule;
|
||||
private int awakenValue;
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ public class BestowAbility extends SpellAbility {
|
|||
return "Bestow " + getManaCostsToPay().getText() + " <i>(If you cast this card for its bestow cost, it's an Aura spell with enchant creature. It becomes a creature again if it's not attached to a creature.)</i>";
|
||||
}
|
||||
|
||||
static public void becomeCreature(Permanent permanent, Game game) {
|
||||
public static void becomeCreature(Permanent permanent, Game game) {
|
||||
// permanently changes to the object
|
||||
if (permanent != null) {
|
||||
MageObject basicObject = permanent.getBasicMageObject(game);
|
||||
|
|
@ -126,7 +126,7 @@ public class BestowAbility extends SpellAbility {
|
|||
}
|
||||
}
|
||||
|
||||
static public void becomeAura(Card card) {
|
||||
public static void becomeAura(Card card) {
|
||||
// permanently changes to the object
|
||||
if (card != null) {
|
||||
card.addSubType(SubType.AURA);
|
||||
|
|
|
|||
|
|
@ -41,12 +41,11 @@ public class CompanionAbility extends SpecialAction {
|
|||
return "Companion — " + companionCondition.getRule();
|
||||
}
|
||||
|
||||
final public boolean isLegal(Set<Card> cards, int startingHandSize) {
|
||||
public final boolean isLegal(Set<Card> cards, int startingHandSize) {
|
||||
return companionCondition.isLegal(cards, startingHandSize);
|
||||
}
|
||||
|
||||
final public String getLegalRule() {
|
||||
public final String getLegalRule() {
|
||||
return companionCondition.getRule();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ import mage.constants.WatcherScope;
|
|||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
|
@ -74,7 +73,7 @@ public class ExertAbility extends SimpleStaticAbility {
|
|||
|
||||
class ExertReplacementEffect extends ReplacementEffectImpl {
|
||||
|
||||
final private boolean exertOnlyOncePerTurn;
|
||||
private final boolean exertOnlyOncePerTurn;
|
||||
|
||||
public ExertReplacementEffect(boolean exertOnlyOncePerTurn) {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Detriment);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue