This commit is contained in:
tehdiplomat
2019-02-17 22:43:39 -05:00
86 changed files with 672 additions and 339 deletions

View File

@@ -6,7 +6,7 @@
<parent>
<artifactId>forge</artifactId>
<groupId>forge</groupId>
<version>1.6.21-SNAPSHOT</version>
<version>1.6.22-SNAPSHOT</version>
</parent>
<artifactId>forge-ai</artifactId>

View File

@@ -73,6 +73,7 @@ public class ComputerUtil {
public static boolean handlePlayingSpellAbility(final Player ai, SpellAbility sa, final Game game, Runnable chooseTargets) {
game.getStack().freezeStack();
final Card source = sa.getHostCard();
source.setSplitStateToPlayAbility(sa);
if (sa.isSpell() && !source.isCopiedSpell()) {
if (source.getType().hasStringType("Arcane")) {

View File

@@ -311,13 +311,20 @@ public class CountersPutAi extends SpellAbilityAi {
return false;
}
if (sa.hasParam("Adapt") && source.getCounters(CounterType.P1P1) > 0) {
return false;
}
// TODO handle proper calculation of X values based on Cost
int amount = AbilityUtils.calculateAmount(source, amountStr, sa);
if (sa.hasParam("Adapt")) {
Game game = ai.getGame();
Combat combat = game.getCombat();
if (!source.canReceiveCounters(CounterType.P1P1) || source.getCounters(CounterType.P1P1) > 0) {
return false;
} else if (combat != null && ph.is(PhaseType.COMBAT_DECLARE_BLOCKERS)) {
return doCombatAdaptLogic(source, amount, combat);
}
}
if ("Fight".equals(logic)) {
int nPump = 0;
if (type.equals("P1P1")) {
@@ -1049,4 +1056,39 @@ public class CountersPutAi extends SpellAbilityAi {
return false;
}
private boolean doCombatAdaptLogic(Card source, int amount, Combat combat) {
if (combat.isAttacking(source)) {
if (!combat.isBlocked(source)) {
return true;
} else {
for (Card blockedBy : combat.getBlockers(source)) {
if (blockedBy.getNetToughness() > source.getNetPower()
&& blockedBy.getNetToughness() <= source.getNetPower() + amount) {
return true;
}
}
int totBlkPower = Aggregates.sum(combat.getBlockers(source), CardPredicates.Accessors.fnGetNetPower);
if (source.getNetToughness() <= totBlkPower
&& source.getNetToughness() + amount > totBlkPower) {
return true;
}
}
} else if (combat.isBlocking(source)) {
for (Card blocked : combat.getAttackersBlockedBy(source)) {
if (blocked.getNetToughness() > source.getNetPower()
&& blocked.getNetToughness() <= source.getNetPower() + amount) {
return true;
}
}
int totAtkPower = Aggregates.sum(combat.getAttackersBlockedBy(source), CardPredicates.Accessors.fnGetNetPower);
if (source.getNetToughness() <= totAtkPower
&& source.getNetToughness() + amount > totAtkPower) {
return true;
}
}
return false;
}
}

View File

@@ -6,7 +6,7 @@
<parent>
<artifactId>forge</artifactId>
<groupId>forge</groupId>
<version>1.6.21-SNAPSHOT</version>
<version>1.6.22-SNAPSHOT</version>
</parent>
<artifactId>forge-core</artifactId>

View File

@@ -103,19 +103,17 @@ public class PaperToken implements InventoryItemFromSet, IPaperCard {
return StringUtils.join(build, "_").replace('*', 'x').toLowerCase();
}
public PaperToken(final CardRules c) { this(c, null, null); }
public PaperToken(final CardRules c, final String fileName) { this(c, null, fileName); }
public PaperToken(final CardRules c, CardEdition edition) { this(c, edition, null); }
public PaperToken(final CardRules c, CardEdition edition0, String imageFileName) {
this.card = c;
this.name = c.getName();
this.edition = edition0;
if (imageFileName == null) {
// This shouldn't really happen. We can just use the normalized name again for the base image name
this.imageFileName = makeTokenFileName(c, edition0);
} else {
String formatEdition = null == edition || CardEdition.UNKNOWN == edition ? "" : edition.getCode();
this.imageFileName = String.format("%s%s", formatEdition, imageFileName);
String formatEdition = null == edition || CardEdition.UNKNOWN == edition ? "" : "_" + edition.getCode().toLowerCase();
this.imageFileName = String.format("%s%s", imageFileName, formatEdition);
}
}

View File

@@ -2,7 +2,9 @@ package forge.token;
import com.google.common.base.Predicate;
import com.google.common.collect.Maps;
import forge.card.*;
import forge.card.CardDb;
import forge.card.CardEdition;
import forge.card.CardRules;
import forge.item.PaperToken;
import java.util.*;
@@ -43,7 +45,7 @@ public class TokenDb implements ITokenDatabase {
if (!tokensByName.containsKey(fullName)) {
try {
PaperToken pt = new PaperToken(rulesByName.get(tokenName), editions.get(edition));
PaperToken pt = new PaperToken(rulesByName.get(tokenName), editions.get(edition), tokenName);
tokensByName.put(fullName, pt);
return pt;
} catch(Exception e) {

View File

@@ -37,7 +37,8 @@ public class Localizer {
MessageFormat formatter = null;
try {
formatter = new MessageFormat(resourceBundle.getString(key.toLowerCase()), locale);
//formatter = new MessageFormat(resourceBundle.getString(key.toLowerCase()), locale);
formatter = new MessageFormat(resourceBundle.getString(key.toString()), locale);
} catch (final IllegalArgumentException | MissingResourceException e) {
e.printStackTrace();
}

View File

@@ -6,7 +6,7 @@
<parent>
<artifactId>forge</artifactId>
<groupId>forge</groupId>
<version>1.6.21-SNAPSHOT</version>
<version>1.6.22-SNAPSHOT</version>
</parent>
<artifactId>forge-game</artifactId>

View File

@@ -10,9 +10,11 @@ import forge.game.trigger.TriggerType;
import org.apache.commons.lang3.StringUtils;
import java.util.ArrayList;
import java.util.HashMap;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import java.util.List;
import java.util.Map;
public class BecomesBlockedEffect extends SpellAbilityEffect {
@@ -38,10 +40,11 @@ public class BecomesBlockedEffect extends SpellAbilityEffect {
game.getCombat().setBlocked(c, true);
if (!c.getDamageHistory().getCreatureGotBlockedThisCombat()) {
isCombatChanged = true;
final HashMap<String, Object> runParams = new HashMap<String, Object>();
final Map<String, Object> runParams = Maps.newHashMap();
runParams.put("Attacker", c);
runParams.put("Blockers", new ArrayList<Card>());
runParams.put("Blockers", Lists.<Card>newArrayList());
runParams.put("NumBlockers", 0);
runParams.put("Defender", game.getCombat().getDefenderByAttacker(c));
runParams.put("DefendingPlayer", game.getCombat().getDefenderPlayerByAttacker(c));
game.getTriggerHandler().runTrigger(TriggerType.AttackerBlocked, runParams, false);
}

View File

@@ -241,38 +241,40 @@ public class DigEffect extends SpellAbilityEffect {
} else {
String prompt;
if (sa.hasParam("PrimaryPrompt")) {
prompt = sa.getParam("PrimaryPrompt");
} else {
prompt = "Choose card(s) to put into " + destZone1.name();
if (destZone1.equals(ZoneType.Library)) {
if (libraryPosition == -1) {
prompt = "Choose card(s) to put on the bottom of {player's} library";
} else if (libraryPosition == 0) {
prompt = "Choose card(s) to put on top of {player's} library";
}
}
}
if (sa.hasParam("PrimaryPrompt")) {
prompt = sa.getParam("PrimaryPrompt");
} else {
prompt = "Choose card(s) to put into " + destZone1.name();
if (destZone1.equals(ZoneType.Library)) {
if (libraryPosition == -1) {
prompt = "Choose card(s) to put on the bottom of {player's} library";
} else if (libraryPosition == 0) {
prompt = "Choose card(s) to put on top of {player's} library";
}
}
}
movedCards = new CardCollection();
if (valid.isEmpty()) {
chooser.getController().notifyOfValue(sa, null, "No valid cards");
} else {
if ( p == chooser ) { // the digger can still see all the dug cards when choosing
chooser.getController().tempShowCards(top);
}
List<Card> chosen;
if (!andOrValid.equals("")) {
valid.removeAll(andOrCards); //pfps remove andOr cards to get two two choices set up correctly
chosen = chooser.getController().chooseFromTwoListsForEffect(valid, andOrCards, optional, delayedReveal, sa, prompt, p);
} else {
int max = anyNumber ? valid.size() : Math.min(valid.size(),destZone1ChangeNum);
int min = (anyNumber || optional) ? 0 : max;
chosen = chooser.getController().chooseEntitiesForEffect(valid, min, max, delayedReveal, sa, prompt, p);
}
chooser.getController().endTempShowCards();
movedCards.addAll(chosen);
}
movedCards = new CardCollection();
if (valid.isEmpty()) {
chooser.getController().notifyOfValue(sa, null, "No valid cards");
} else {
if ( p == chooser ) { // the digger can still see all the dug cards when choosing
chooser.getController().tempShowCards(top);
}
List<Card> chosen = new ArrayList<Card>();
if (!andOrValid.equals("")) {
valid.removeAll(andOrCards); //pfps remove andOr cards to get two two choices set up correctly
chosen = chooser.getController().chooseFromTwoListsForEffect(valid, andOrCards, optional, delayedReveal, sa, prompt, p);
} else {
int max = anyNumber ? valid.size() : Math.min(valid.size(),destZone1ChangeNum);
int min = (anyNumber || optional) ? 0 : max;
if ( max > 0 ) { // if max is 0 don't make a choice
chosen = chooser.getController().chooseEntitiesForEffect(valid, min, max, delayedReveal, sa, prompt, p);
}
}
chooser.getController().endTempShowCards();
movedCards.addAll(chosen);
}
if (!changeValid.isEmpty() && !sa.hasParam("ExileFaceDown") && !sa.hasParam("NoReveal")) {
game.getAction().reveal(movedCards, chooser, true,
@@ -336,8 +338,7 @@ public class DigEffect extends SpellAbilityEffect {
CardCollection afterOrder = rest;
if (sa.hasParam("RestRandomOrder")) {
CardLists.shuffle(afterOrder);
}
else if (!skipReorder && rest.size() > 1) {
} else if (!skipReorder && rest.size() > 1) {
if (destZone2 == ZoneType.Graveyard) {
afterOrder = (CardCollection) GameActionUtil.orderCardsByTheirOwners(game, rest, destZone2);
} else {

View File

@@ -1650,7 +1650,7 @@ public class Card extends GameEntity implements Comparable<Card> {
|| keyword.startsWith("Level up") || keyword.equals("Prowess") || keyword.startsWith("Eternalize")
|| keyword.startsWith("Reinforce") || keyword.startsWith("Champion") || keyword.startsWith("Prowl")
|| keyword.startsWith("Amplify") || keyword.startsWith("Ninjutsu") || keyword.startsWith("Adapt")
|| keyword.startsWith("Transfigure")
|| keyword.startsWith("Transfigure") || keyword.startsWith("Aura swap")
|| keyword.startsWith("Cycling") || keyword.startsWith("TypeCycling")) {
// keyword parsing takes care of adding a proper description
} else if (keyword.startsWith("CantBeBlockedByAmount")) {

View File

@@ -1236,10 +1236,10 @@ public class CardFactoryUtil {
return doXMath(c.getPseudoKickerMagnitude(), m, c);
}
// Count$IfMainPhase.<numMain>.<numNotMain> // 7/10
if (sq[0].contains("IfMainPhase")) {
// Count$IfCastInOwnMainPhase.<numMain>.<numNotMain> // 7/10
if (sq[0].contains("IfCastInOwnMainPhase")) {
final PhaseHandler cPhase = cc.getGame().getPhaseHandler();
final boolean isMyMain = cPhase.getPhase().isMain() && cPhase.getPlayerTurn().equals(cc);
final boolean isMyMain = cPhase.getPhase().isMain() && cPhase.getPlayerTurn().equals(cc) && c.getCastFrom() != null;
return doXMath(Integer.parseInt(sq[isMyMain ? 1 : 2]), m, c);
}
@@ -3746,6 +3746,19 @@ public class CardFactoryUtil {
origSA.setAftermath(true);
origSA.getRestrictions().setZone(ZoneType.Graveyard);
// The Exile part is done by the System itself
} else if (keyword.startsWith("Aura swap")) {
final String[] k = keyword.split(":");
final String manacost = k[1];
final String effect = "AB$ ExchangeZone | Cost$ " + manacost + " | Zone2$ Hand | Type$ Aura "
+ " | PrecostDesc$ Aura swap | CostDesc$ " + ManaCostParser.parse(manacost)
+ " | StackDescription$ SpellDescription | SpellDescription$ (" + inst.getReminderText() + ")";
final SpellAbility sa = AbilityFactory.getAbility(effect, card);
sa.setIntrinsic(intrinsic);
sa.setTemporary(!intrinsic);
inst.addSpellAbility(sa);
} else if (keyword.startsWith("Awaken")) {
final String[] k = keyword.split(":");
final String counters = k[1];

View File

@@ -967,6 +967,19 @@ public class CardProperty {
if (restriction.startsWith("Remembered") || restriction.startsWith("Imprinted")) {
CardCollection list = AbilityUtils.getDefinedCards(source, restriction, spellAbility);
return CardLists.filter(list, CardPredicates.sharesNameWith(card)).isEmpty();
} else if (restriction.equals("YourGraveyard")) {
return CardLists.filter(sourceController.getCardsIn(ZoneType.Graveyard), CardPredicates.sharesNameWith(card)).isEmpty();
} else if (restriction.equals("OtherYourBattlefield")) {
// Obviously it's going to share a name with itself, so consider that in the
CardCollection list = CardLists.filter(sourceController.getCardsIn(ZoneType.Battlefield), CardPredicates.sharesNameWith(card));
if (list.size() == 1) {
Card c = list.getFirst();
if (c.getTimestamp() == card.getTimestamp() && c.getId() == card.getId()) {
list.remove(card);
}
}
return list.isEmpty();
}
}
} else if (property.startsWith("sharesControllerWith")) {

View File

@@ -65,7 +65,7 @@ public final class CardUtil {
"Transmute", "Replicate", "Recover", "Suspend", "Aura swap",
"Fortify", "Transfigure", "Champion", "Evoke", "Prowl", "IfReach",
"Reinforce", "Unearth", "Level up", "Miracle", "Overload",
"Scavenge", "Bestow", "Outlast", "Dash", "Renown", "Surge", "Emerge", "Hexproof:").build();
"Scavenge", "Bestow", "Outlast", "Dash", "Surge", "Emerge", "Hexproof:").build();
/** List of keyword endings of keywords that could be modified by text changes. */
public static final ImmutableList<String> modifiableKeywordEndings = ImmutableList.<String>builder().add(
"walk", "cycling", "offering").build();

View File

@@ -389,7 +389,6 @@ public class PhaseHandler implements java.io.Serializable {
}
playerTurn.removeKeyword("Skip all combat phases of this turn.");
game.getCleanup().executeUntil(getNextTurn());
nUpkeepsThisTurn = 0;
// Rule 514.3
@@ -397,6 +396,9 @@ public class PhaseHandler implements java.io.Serializable {
// Rule 514.3a - state-based actions
game.getAction().checkStateEffects(true);
// done this after check state effects, so it only has effect next check
game.getCleanup().executeUntil(getNextTurn());
break;
default:
@@ -722,6 +724,7 @@ public class PhaseHandler implements java.io.Serializable {
runParams.put("Attacker", a);
runParams.put("Blockers", blockers);
runParams.put("NumBlockers", blockers.size());
runParams.put("Defender", combat.getDefenderByAttacker(a));
runParams.put("DefendingPlayer", combat.getDefenderPlayerByAttacker(a));
game.getTriggerHandler().runTrigger(TriggerType.AttackerBlocked, runParams, false);

View File

@@ -144,8 +144,6 @@ public abstract class Spell extends SpellAbility implements java.io.Serializable
if (lkicheck) {
game.getAction().checkStaticAbilities(false);
game.getTracker().unfreeze();
// reset owner for lki
card.setController(null, 0);
}
if (!(isInstant || activator.canCastSorcery() || flash || getRestrictions().isInstantSpeed()
@@ -154,7 +152,7 @@ public abstract class Spell extends SpellAbility implements java.io.Serializable
return false;
}
if (!this.getRestrictions().canPlay(card, this)) {
if (!this.getRestrictions().canPlay(getHostCard(), this)) {
return false;
}

View File

@@ -52,25 +52,25 @@ public class TriggerAttackerBlocked extends Trigger {
/** {@inheritDoc} */
@Override
public final boolean performTest(final Map<String, Object> runParams2) {
if (this.mapParams.containsKey("ValidCard")) {
if (!matchesValid(runParams2.get("Attacker"), this.mapParams.get("ValidCard").split(","),
this.getHostCard())) {
if (hasParam("ValidCard")) {
if (!matchesValid(runParams2.get("Attacker"), getParam("ValidCard").split(","),
getHostCard())) {
return false;
}
}
if (this.mapParams.containsKey("MinBlockers")) {
if ((int)runParams2.get("NumBlockers") < Integer.valueOf(this.mapParams.get("MinBlockers"))) {
if (hasParam("MinBlockers")) {
if ((int)runParams2.get("NumBlockers") < Integer.valueOf(getParam("MinBlockers"))) {
return false;
}
}
if (this.mapParams.containsKey("ValidBlocker")) {
if (hasParam("ValidBlocker")) {
@SuppressWarnings("unchecked")
int count = CardLists.getValidCardCount(
(Iterable<Card>) runParams2.get("Blockers"),
this.mapParams.get("ValidBlocker"),
this.getHostCard().getController(), this.getHostCard()
getParam("ValidBlocker"),
getHostCard().getController(), getHostCard()
);
if ( count == 0 ) {
@@ -84,10 +84,11 @@ public class TriggerAttackerBlocked extends Trigger {
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject("Attacker", this.getRunParams().get("Attacker"));
sa.setTriggeringObject("Blockers", this.getRunParams().get("Blockers"));
sa.setTriggeringObject("DefendingPlayer", this.getRunParams().get("DefendingPlayer"));
sa.setTriggeringObject("NumBlockers", this.getRunParams().get("NumBlockers"));
sa.setTriggeringObject("Attacker", getRunParams().get("Attacker"));
sa.setTriggeringObject("Blockers", getRunParams().get("Blockers"));
sa.setTriggeringObject("Defender", getRunParams().get("Defender"));
sa.setTriggeringObject("DefendingPlayer", getRunParams().get("DefendingPlayer"));
sa.setTriggeringObject("NumBlockers", getRunParams().get("NumBlockers"));
}
@Override

View File

@@ -510,6 +510,9 @@ public class WrappedAbility extends Ability {
|| ApiType.RemoveCounter.equals(sa.getApi())
|| ApiType.AddOrRemoveCounter.equals(sa.getApi())
|| ApiType.MoveCounter.equals(sa.getApi())
|| ApiType.Draw.equals(sa.getApi())
|| ApiType.GainLife.equals(sa.getApi())
|| ApiType.LoseLife.equals(sa.getApi())
// Token has no Defined it should not be timestamp problems
|| ApiType.Token.equals(sa.getApi())

View File

@@ -6,7 +6,7 @@
<packaging.type>jar</packaging.type>
<build.min.memory>-Xms1024m</build.min.memory>
<build.max.memory>-Xmx1536m</build.max.memory>
<alpha-version>1.6.20.001</alpha-version>
<alpha-version>1.6.21.001</alpha-version>
<sign.keystore>keystore</sign.keystore>
<sign.alias>alias</sign.alias>
<sign.storepass>storepass</sign.storepass>
@@ -19,7 +19,7 @@
<parent>
<artifactId>forge</artifactId>
<groupId>forge</groupId>
<version>1.6.21-SNAPSHOT</version>
<version>1.6.22-SNAPSHOT</version>
</parent>
<artifactId>forge-gui-android</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<artifactId>forge</artifactId>
<groupId>forge</groupId>
<version>1.6.21-SNAPSHOT</version>
<version>1.6.22-SNAPSHOT</version>
</parent>
<artifactId>forge-gui-desktop</artifactId>

View File

@@ -18,6 +18,7 @@ import forge.toolbox.FComboBox;
import forge.toolbox.FComboBoxPanel;
import forge.toolbox.FLabel;
import forge.toolbox.FOptionPane;
import forge.util.Localizer;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
@@ -38,6 +39,8 @@ import java.util.List;
public enum CSubmenuPreferences implements ICDoc {
/** */
SINGLETON_INSTANCE;
final Localizer localizer = Localizer.getInstance();
private VSubmenuPreferences view;
private ForgePreferences prefs;
@@ -66,7 +69,7 @@ public enum CSubmenuPreferences implements ICDoc {
if (updating) { return; }
// prevent changing DEV_MODE while network game running
if (FServerManager.getInstance().isMatchActive()) {
System.out.println("Can't change DEV_MODE while a network match is in progress!");
System.out.println(localizer.getMessage("CantChangeDevModeWhileNetworkMath"));
return;
}
@@ -192,7 +195,7 @@ public enum CSubmenuPreferences implements ICDoc {
public void run() {
prefs.setPref(FPref.DISABLE_DISPLAY_JAVA_8_UPDATE_WARNING, false);
prefs.save();
FOptionPane.showMessageDialog("Compatibility warnings re-enabled!");
FOptionPane.showMessageDialog(localizer.getMessage("CompatibilityWarningsReEnabled"));
}
});
@@ -242,10 +245,8 @@ public enum CSubmenuPreferences implements ICDoc {
}
private void resetForgeSettingsToDefault() {
final String userPrompt =
"This will reset all preferences to their defaults and restart Forge.\n\n" +
"Reset and restart Forge?";
if (FOptionPane.showConfirmDialog(userPrompt, "Reset Settings")) {
final String userPrompt =localizer.getMessage("AresetForgeSettingsToDefault");
if (FOptionPane.showConfirmDialog(userPrompt, localizer.getMessage("TresetForgeSettingsToDefault"))) {
final ForgePreferences prefs = FModel.getPreferences();
prefs.reset();
prefs.save();
@@ -255,38 +256,28 @@ public enum CSubmenuPreferences implements ICDoc {
}
private void resetDeckEditorLayout() {
final String userPrompt =
"This will reset the Deck Editor screen layout.\n" +
"All tabbed views will be restored to their default positions.\n\n" +
"Reset layout?";
if (FOptionPane.showConfirmDialog(userPrompt, "Reset Deck Editor Layout")) {
final String userPrompt =localizer.getMessage("AresetDeckEditorLayout");
if (FOptionPane.showConfirmDialog(userPrompt, localizer.getMessage("TresetDeckEditorLayout"))) {
if (FScreen.DECK_EDITOR_CONSTRUCTED.deleteLayoutFile()) {
FOptionPane.showMessageDialog("Deck Editor layout has been reset.");
FOptionPane.showMessageDialog(localizer.getMessage("OKresetDeckEditorLayout"));
}
}
}
private void resetWorkshopLayout() {
final String userPrompt =
"This will reset the Workshop screen layout.\n" +
"All tabbed views will be restored to their default positions.\n\n" +
"Reset layout?";
if (FOptionPane.showConfirmDialog(userPrompt, "Reset Workshop Layout")) {
final String userPrompt =localizer.getMessage("AresetWorkshopLayout");
if (FOptionPane.showConfirmDialog(userPrompt, localizer.getMessage("TresetWorkshopLayout"))) {
if (FScreen.WORKSHOP_SCREEN.deleteLayoutFile()) {
FOptionPane.showMessageDialog("Workshop layout has been reset.");
FOptionPane.showMessageDialog(localizer.getMessage("OKresetWorkshopLayout"));
}
}
}
private void resetMatchScreenLayout() {
final String userPrompt =
"This will reset the layout of the Match screen.\n" +
"If you want to save the current layout first, please use " +
"the Dock tab -> Save Layout option in the Match screen.\n\n" +
"Reset layout?";
if (FOptionPane.showConfirmDialog(userPrompt, "Reset Match Screen Layout")) {
final String userPrompt =localizer.getMessage("AresetMatchScreenLayout");
if (FOptionPane.showConfirmDialog(userPrompt, localizer.getMessage("TresetMatchScreenLayout"))) {
if (FScreen.deleteMatchLayoutFile()) {
FOptionPane.showMessageDialog("Match Screen layout has been reset.");
FOptionPane.showMessageDialog(localizer.getMessage("OKresetMatchScreenLayout"));
}
}
}

View File

@@ -31,6 +31,7 @@ import forge.toolbox.FSkin.SkinColor;
import forge.toolbox.FSkin.SkinFont;
import forge.toolbox.FSkin.SkinImage;
import forge.toolbox.special.CardZoomer;
import forge.util.Localizer;
import net.miginfocom.swing.MigLayout;
import javax.swing.*;
@@ -54,12 +55,13 @@ public enum VSubmenuAchievements implements IVSubmenu<CSubmenuAchievements> {
private static final SkinColor NOT_EARNED_COLOR = TEXT_COLOR.alphaColor(128);
private static final SkinColor TEXTURE_OVERLAY_COLOR = FSkin.getColor(Colors.CLR_THEME);
private static final SkinColor BORDER_COLOR = FSkin.getColor(Colors.CLR_BORDERS);
final Localizer localizer = Localizer.getInstance();
// Fields used with interface IVDoc
private DragCell parentCell;
private final DragTab tab = new DragTab("Achievements");
private final DragTab tab = new DragTab(localizer.getMessage("Achievements"));
private final FLabel lblTitle = new FLabel.Builder()
.text("Achievements").fontAlign(SwingConstants.CENTER)
.text(localizer.getMessage("Achievements")).fontAlign(SwingConstants.CENTER)
.opaque(true).fontSize(16).build();
private final FComboBox<AchievementCollection> cbCollections = new FComboBox<AchievementCollection>();
private final TrophyCase trophyCase = new TrophyCase();
@@ -167,7 +169,7 @@ public enum VSubmenuAchievements implements IVSubmenu<CSubmenuAchievements> {
*/
@Override
public String getMenuTitle() {
return "Achievements";
return localizer.getMessage("Achievements");
}
/* (non-Javadoc)

View File

@@ -12,6 +12,7 @@ import forge.screens.home.IVSubmenu;
import forge.screens.home.VHomeUI;
import forge.toolbox.*;
import forge.util.FileUtil;
import forge.util.Localizer;
import forge.util.RuntimeVersion;
import net.miginfocom.swing.MigLayout;
@@ -29,6 +30,8 @@ import java.awt.event.ActionListener;
public enum VSubmenuDownloaders implements IVSubmenu<CSubmenuDownloaders> {
/** */
SINGLETON_INSTANCE;
final Localizer localizer = Localizer.getInstance();
// Fields used with interface IVDoc
private DragCell parentCell;
@@ -38,15 +41,15 @@ public enum VSubmenuDownloaders implements IVSubmenu<CSubmenuDownloaders> {
private final JPanel pnlContent = new JPanel(new MigLayout("insets 0, gap 0, wrap, ay center"));
private final FScrollPane scrContent = new FScrollPane(pnlContent, false);
private final FLabel btnDownloadSetPics = _makeButton("Download LQ Set Pictures");
private final FLabel btnDownloadPics = _makeButton("Download LQ Card Pictures");
private final FLabel btnDownloadQuestImages = _makeButton("Download Quest Images");
private final FLabel btnDownloadAchievementImages = _makeButton("Download Achievement Images");
private final FLabel btnReportBug = _makeButton("Report a Bug");
private final FLabel btnImportPictures = _makeButton("Import Data");
private final FLabel btnHowToPlay = _makeButton("How To Play");
private final FLabel btnDownloadPrices = _makeButton("Download Card Prices");
private final FLabel btnLicensing = _makeButton("License Details");
private final FLabel btnDownloadSetPics = _makeButton(localizer.getMessage("btnDownloadSetPics"));
private final FLabel btnDownloadPics = _makeButton(localizer.getMessage("btnDownloadPics"));
private final FLabel btnDownloadQuestImages = _makeButton(localizer.getMessage("btnDownloadQuestImages"));
private final FLabel btnDownloadAchievementImages = _makeButton(localizer.getMessage("btnDownloadAchievementImages"));
private final FLabel btnReportBug = _makeButton(localizer.getMessage("btnReportBug"));
private final FLabel btnImportPictures = _makeButton(localizer.getMessage("btnImportPictures"));
private final FLabel btnHowToPlay = _makeButton(localizer.getMessage("btnHowToPlay"));
private final FLabel btnDownloadPrices = _makeButton(localizer.getMessage("btnDownloadPrices"));
private final FLabel btnLicensing = _makeButton(localizer.getMessage("btnLicensing"));
/**
* Constructor.
@@ -61,47 +64,48 @@ public enum VSubmenuDownloaders implements IVSubmenu<CSubmenuDownloaders> {
if (javaRecentEnough()) {
pnlContent.add(btnDownloadPics, constraintsBTN);
pnlContent.add(_makeLabel("Download default card picture for each card."), constraintsLBL);
pnlContent.add(_makeLabel(localizer.getMessage("lblDownloadPics")), constraintsLBL);
pnlContent.add(btnDownloadSetPics, constraintsBTN);
pnlContent.add(_makeLabel("Download all pictures of each card (one for each set the card appeared in)"), constraintsLBL);
pnlContent.add(_makeLabel(localizer.getMessage("lblDownloadSetPics")), constraintsLBL);
pnlContent.add(btnDownloadQuestImages, constraintsBTN);
pnlContent.add(_makeLabel("Download tokens and icons used in Quest mode."), constraintsLBL);
pnlContent.add(_makeLabel(localizer.getMessage("lblDownloadQuestImages")), constraintsLBL);
pnlContent.add(btnDownloadAchievementImages, constraintsBTN);
pnlContent.add(_makeLabel("Download achievement images to really make your trophies stand out."), constraintsLBL);
pnlContent.add(_makeLabel(localizer.getMessage("lblDownloadAchievementImages")), constraintsLBL);
pnlContent.add(btnDownloadPrices, constraintsBTN);
pnlContent.add(_makeLabel("Download up-to-date price list for in-game card shops."), constraintsLBL);
pnlContent.add(_makeLabel(localizer.getMessage("lblDownloadPrices")), constraintsLBL);
} else {
String text = "Your version of Java is too old to use the content downloaders.";
String text = localizer.getMessage("lblYourVersionOfJavaIsTooOld");
FLabel label = new FLabel.Builder().fontAlign(SwingConstants.CENTER).text(text).fontStyle(Font.BOLD).fontSize(18).build();
pnlContent.add(label, "w 90%!, h 25px!, center, gap 0 0 30px 3px");
text = "Please update to the latest version of Java 8 to use this feature.";
text = localizer.getMessage("lblPleaseUpdateToTheLatestVersionOfJava");
label = new FLabel.Builder().fontAlign(SwingConstants.CENTER).text(text).fontStyle(Font.BOLD).fontSize(18).build();
pnlContent.add(label, "w 90%!, h 25px!, center, gap 0 0 0 36px");
text = "You're running " + System.getProperty("java.version") + ". You need at least version 1.8.0_101.";
text = localizer.getMessage("lblYoureRunning") + " " + System.getProperty("java.version");
text = text + " . " + localizer.getMessage("lblYouNeedAtLeastJavaVersion") ;
label = new FLabel.Builder().fontAlign(SwingConstants.CENTER).text(text).fontStyle(Font.BOLD).fontSize(18).build();
pnlContent.add(label, "w 90%!, h 25px!, center, gap 0 0 0 36px");
}
pnlContent.add(btnImportPictures, constraintsBTN);
pnlContent.add(_makeLabel("Import data from a local directory."), constraintsLBL);
pnlContent.add(_makeLabel(localizer.getMessage("lblImportPictures")), constraintsLBL);
pnlContent.add(btnReportBug, constraintsBTN);
pnlContent.add(_makeLabel("Something broken?"), constraintsLBL);
pnlContent.add(_makeLabel(localizer.getMessage("lblReportBug")), constraintsLBL);
pnlContent.add(btnHowToPlay, constraintsBTN);
pnlContent.add(_makeLabel("Rules of the Game."), constraintsLBL);
pnlContent.add(_makeLabel(localizer.getMessage("lblHowToPlay")), constraintsLBL);
pnlContent.add(btnLicensing, constraintsBTN);
pnlContent.add(_makeLabel("Forge legal."), constraintsLBL);
pnlContent.add(_makeLabel(localizer.getMessage("lblLicensing")), constraintsLBL);
}
@@ -210,7 +214,7 @@ public enum VSubmenuDownloaders implements IVSubmenu<CSubmenuDownloaders> {
*/
@Override
public String getMenuTitle() {
return "Content Downloaders";
return localizer.getMessage("ContentDownloaders");
}
/* (non-Javadoc)

View File

@@ -15,6 +15,7 @@ import forge.screens.home.VHomeUI;
import forge.toolbox.*;
import forge.toolbox.FSkin.SkinnedLabel;
import forge.toolbox.FSkin.SkinnedTextField;
import forge.util.Localizer;
import net.miginfocom.swing.MigLayout;
import org.apache.commons.lang3.StringUtils;
@@ -27,91 +28,94 @@ import java.awt.event.KeyEvent;
import java.util.*;
import java.util.List;
/**
* Assembles Swing components of preferences submenu singleton.
*
* <br><br><i>(V at beginning of class name denotes a view class.)</i>
*/
public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
/** */
SINGLETON_INSTANCE;
final Localizer localizer = Localizer.getInstance();
// Fields used with interface IVDoc
private DragCell parentCell;
private final DragTab tab = new DragTab("Preferences");
private final DragTab tab = new DragTab(localizer.getMessage("Preferences"));
/** */
private final JPanel pnlPrefs = new JPanel();
private final FScrollPane scrContent = new FScrollPane(pnlPrefs, false,
ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
private final FLabel btnReset = new FLabel.Builder().opaque(true).hoverable(true).text("Reset to Default Settings").build();
private final FLabel btnDeleteMatchUI = new FLabel.Builder().opaque(true).hoverable(true).text("Reset Match Layout").build();
private final FLabel btnDeleteEditorUI = new FLabel.Builder().opaque(true).hoverable(true).text("Reset Editor Layout").build();
private final FLabel btnDeleteWorkshopUI = new FLabel.Builder().opaque(true).hoverable(true).text("Reset Workshop Layout").build();
private final FLabel btnUserProfileUI = new FLabel.Builder().opaque(true).hoverable(true).text("Open User Directory").build();
private final FLabel btnContentDirectoryUI = new FLabel.Builder().opaque(true).hoverable(true).text("Open Content Directory").build();
private final FLabel btnResetJavaFutureCompatibilityWarnings = new FLabel.Builder().opaque(true).hoverable(true).text("Reset Java Compatibility Warnings").build();
private final FLabel btnReset = new FLabel.Builder().opaque(true).hoverable(true).text(localizer.getMessage("btnReset")).build();
private final FLabel btnDeleteMatchUI = new FLabel.Builder().opaque(true).hoverable(true).text(localizer.getMessage("btnDeleteMatchUI")).build();
private final FLabel btnDeleteEditorUI = new FLabel.Builder().opaque(true).hoverable(true).text(localizer.getMessage("btnDeleteEditorUI")).build();
private final FLabel btnDeleteWorkshopUI = new FLabel.Builder().opaque(true).hoverable(true).text(localizer.getMessage("btnDeleteWorkshopUI")).build();
private final FLabel btnUserProfileUI = new FLabel.Builder().opaque(true).hoverable(true).text(localizer.getMessage("btnUserProfileUI")).build();
private final FLabel btnContentDirectoryUI = new FLabel.Builder().opaque(true).hoverable(true).text(localizer.getMessage("btnContentDirectoryUI")).build();
private final FLabel btnResetJavaFutureCompatibilityWarnings = new FLabel.Builder().opaque(true).hoverable(true).text(localizer.getMessage("btnResetJavaFutureCompatibilityWarnings")).build();
private final FLabel btnPlayerName = new FLabel.Builder().opaque(true).hoverable(true).text("").build();
private final JCheckBox cbRemoveSmall = new OptionsCheckBox("Remove Small Creatures");
private final JCheckBox cbCardBased = new OptionsCheckBox("Include Card-based Deck Generation");
private final JCheckBox cbSingletons = new OptionsCheckBox("Singleton Mode");
private final JCheckBox cbRemoveArtifacts = new OptionsCheckBox("Remove Artifacts");
private final JCheckBox cbAnte = new OptionsCheckBox("Play for Ante");
private final JCheckBox cbAnteMatchRarity = new OptionsCheckBox("Match Ante Rarity");
private final JCheckBox cbEnableAICheats = new OptionsCheckBox("Allow AI Cheating");
private final JCheckBox cbManaBurn = new OptionsCheckBox("Mana Burn");
private final JCheckBox cbManaLostPrompt = new OptionsCheckBox("Prompt Mana Pool Emptying");
private final JCheckBox cbDevMode = new OptionsCheckBox("Developer Mode");
private final JCheckBox cbLoadCardsLazily = new OptionsCheckBox("Load Card Scripts Lazily");
private final JCheckBox cbLoadHistoricFormats = new OptionsCheckBox("Load Historic Formats");
private final JCheckBox cbWorkshopSyntax = new OptionsCheckBox("Workshop Syntax Checker");
private final JCheckBox cbEnforceDeckLegality = new OptionsCheckBox("Deck Conformance");
private final JCheckBox cbPerformanceMode = new OptionsCheckBox("Performance Mode");
private final JCheckBox cbFilteredHands = new OptionsCheckBox("Filtered Hands");
private final JCheckBox cbImageFetcher = new OptionsCheckBox("Automatically Download Missing Card Art");
private final JCheckBox cbCloneImgSource = new OptionsCheckBox("Clones Use Original Card Art");
private final JCheckBox cbScaleLarger = new OptionsCheckBox("Scale Image Larger");
private final JCheckBox cbRenderBlackCardBorders = new OptionsCheckBox("Render Black Card Borders");
private final JCheckBox cbLargeCardViewers = new OptionsCheckBox("Use Large Card Viewers");
private final JCheckBox cbSmallDeckViewer = new OptionsCheckBox("Use Small Deck Viewer");
private final JCheckBox cbDisplayFoil = new OptionsCheckBox("Display Foil Overlay");
private final JCheckBox cbRandomFoil = new OptionsCheckBox("Random Foil");
private final JCheckBox cbRandomArtInPools = new OptionsCheckBox("Randomize Card Art in Generated Card Pools");
private final JCheckBox cbEnableSounds = new OptionsCheckBox("Enable Sounds");
private final JCheckBox cbEnableMusic = new OptionsCheckBox("Enable Music");
private final JCheckBox cbAltSoundSystem = new OptionsCheckBox("Use Alternate Sound System");
private final JCheckBox cbUiForTouchScreen = new OptionsCheckBox("Enhance UI for Touchscreens");
private final JCheckBox cbTimedTargOverlay = new OptionsCheckBox("Enable Targeting Overlay Optimization");
private final JCheckBox cbCompactMainMenu = new OptionsCheckBox("Use Compact Main Sidebar Menu");
private final JCheckBox cbDetailedPaymentDesc = new OptionsCheckBox("Spell Description in Payment Prompt");
private final JCheckBox cbPromptFreeBlocks = new OptionsCheckBox("Free Block Handling");
private final JCheckBox cbPauseWhileMinimized = new OptionsCheckBox("Pause While Minimized");
private final JCheckBox cbCompactPrompt = new OptionsCheckBox("Compact Prompt");
private final JCheckBox cbEscapeEndsTurn = new OptionsCheckBox("Use Escape Key to End Turn");
private final JCheckBox cbPreselectPrevAbOrder = new OptionsCheckBox("Preselect Last Order of Abilities");
private final JCheckBox cbHideReminderText = new OptionsCheckBox("Hide Reminder Text");
private final JCheckBox cbOpenPacksIndiv = new OptionsCheckBox("Open Packs Individually");
private final JCheckBox cbTokensInSeparateRow = new OptionsCheckBox("Display Tokens in a Separate Row");
private final JCheckBox cbStackCreatures = new OptionsCheckBox("Stack Creatures");
private final JCheckBox cbFilterLandsByColorId = new OptionsCheckBox("Filter Lands by Color in Activated Abilities");
private final JCheckBox cbShowStormCount = new OptionsCheckBox("Show Storm Count in Prompt Pane");
private final JCheckBox cbRemindOnPriority = new OptionsCheckBox("Visually Alert on Receipt of Priority");
private final JCheckBox cbUseSentry = new OptionsCheckBox("Automatically submit bug reports.");
private final JCheckBox cbRemoveSmall = new OptionsCheckBox(localizer.getMessage("cbRemoveSmall"));
private final JCheckBox cbCardBased = new OptionsCheckBox(localizer.getMessage("cbCardBased"));
private final JCheckBox cbSingletons = new OptionsCheckBox(localizer.getMessage("cbSingletons"));
private final JCheckBox cbRemoveArtifacts = new OptionsCheckBox(localizer.getMessage("cbRemoveArtifacts"));
private final JCheckBox cbAnte = new OptionsCheckBox(localizer.getMessage("cbAnte"));
private final JCheckBox cbAnteMatchRarity = new OptionsCheckBox(localizer.getMessage("cbAnteMatchRarity"));
private final JCheckBox cbEnableAICheats = new OptionsCheckBox(localizer.getMessage("cbEnableAICheats"));
private final JCheckBox cbManaBurn = new OptionsCheckBox(localizer.getMessage("cbManaBurn"));
private final JCheckBox cbManaLostPrompt = new OptionsCheckBox(localizer.getMessage("cbManaLostPrompt"));
private final JCheckBox cbDevMode = new OptionsCheckBox(localizer.getMessage("cbDevMode"));
private final JCheckBox cbLoadCardsLazily = new OptionsCheckBox(localizer.getMessage("cbLoadCardsLazily"));
private final JCheckBox cbLoadHistoricFormats = new OptionsCheckBox(localizer.getMessage("cbLoadHistoricFormats"));
private final JCheckBox cbWorkshopSyntax = new OptionsCheckBox(localizer.getMessage("cbWorkshopSyntax"));
private final JCheckBox cbEnforceDeckLegality = new OptionsCheckBox(localizer.getMessage("cbEnforceDeckLegality"));
private final JCheckBox cbPerformanceMode = new OptionsCheckBox(localizer.getMessage("cbPerformanceMode"));
private final JCheckBox cbFilteredHands = new OptionsCheckBox(localizer.getMessage("cbFilteredHands"));
private final JCheckBox cbImageFetcher = new OptionsCheckBox(localizer.getMessage("cbImageFetcher"));
private final JCheckBox cbCloneImgSource = new OptionsCheckBox(localizer.getMessage("cbCloneImgSource"));
private final JCheckBox cbScaleLarger = new OptionsCheckBox(localizer.getMessage("cbScaleLarger"));
private final JCheckBox cbRenderBlackCardBorders = new OptionsCheckBox(localizer.getMessage("cbRenderBlackCardBorders"));
private final JCheckBox cbLargeCardViewers = new OptionsCheckBox(localizer.getMessage("cbLargeCardViewers"));
private final JCheckBox cbSmallDeckViewer = new OptionsCheckBox(localizer.getMessage("cbSmallDeckViewer"));
private final JCheckBox cbDisplayFoil = new OptionsCheckBox(localizer.getMessage("cbDisplayFoil"));
private final JCheckBox cbRandomFoil= new OptionsCheckBox(localizer.getMessage("cbRandomFoil"));
private final JCheckBox cbRandomArtInPools = new OptionsCheckBox(localizer.getMessage("cbRandomArtInPools"));
private final JCheckBox cbEnableSounds = new OptionsCheckBox(localizer.getMessage("cbEnableSounds"));
private final JCheckBox cbEnableMusic = new OptionsCheckBox(localizer.getMessage("cbEnableMusic"));
private final JCheckBox cbAltSoundSystem = new OptionsCheckBox(localizer.getMessage("cbAltSoundSystem"));
private final JCheckBox cbUiForTouchScreen = new OptionsCheckBox(localizer.getMessage("cbUiForTouchScreen"));
private final JCheckBox cbTimedTargOverlay = new OptionsCheckBox(localizer.getMessage("cbTimedTargOverlay"));
private final JCheckBox cbCompactMainMenu = new OptionsCheckBox(localizer.getMessage("cbCompactMainMenu"));
private final JCheckBox cbDetailedPaymentDesc = new OptionsCheckBox(localizer.getMessage("cbDetailedPaymentDesc"));
private final JCheckBox cbPromptFreeBlocks = new OptionsCheckBox(localizer.getMessage("cbPromptFreeBlocks"));
private final JCheckBox cbPauseWhileMinimized = new OptionsCheckBox(localizer.getMessage("cbPauseWhileMinimized"));
private final JCheckBox cbCompactPrompt = new OptionsCheckBox(localizer.getMessage("cbCompactPrompt"));
private final JCheckBox cbEscapeEndsTurn = new OptionsCheckBox(localizer.getMessage("cbEscapeEndsTurn"));
private final JCheckBox cbPreselectPrevAbOrder = new OptionsCheckBox(localizer.getMessage("cbPreselectPrevAbOrder"));
private final JCheckBox cbHideReminderText = new OptionsCheckBox(localizer.getMessage("cbHideReminderText"));
private final JCheckBox cbOpenPacksIndiv = new OptionsCheckBox(localizer.getMessage("cbOpenPacksIndiv"));
private final JCheckBox cbTokensInSeparateRow = new OptionsCheckBox(localizer.getMessage("cbTokensInSeparateRow"));
private final JCheckBox cbStackCreatures = new OptionsCheckBox(localizer.getMessage("cbStackCreatures"));
private final JCheckBox cbFilterLandsByColorId = new OptionsCheckBox(localizer.getMessage("cbFilterLandsByColorId"));
private final JCheckBox cbShowStormCount = new OptionsCheckBox(localizer.getMessage("cbShowStormCount"));
private final JCheckBox cbRemindOnPriority = new OptionsCheckBox(localizer.getMessage("cbRemindOnPriority"));
private final JCheckBox cbUseSentry = new OptionsCheckBox(localizer.getMessage("cbUseSentry"));
private final Map<FPref, KeyboardShortcutField> shortcutFields = new HashMap<>();
// ComboBox items are added in CSubmenuPreferences since this is just the View.
private final FComboBoxPanel<GameLogEntryType> cbpGameLogEntryType = new FComboBoxPanel<>("Game Log Verbosity:");
private final FComboBoxPanel<CloseAction> cbpCloseAction = new FComboBoxPanel<>("Close Action:");
private final FComboBoxPanel<String> cbpDefaultFontSize = new FComboBoxPanel<>("Default Font Size:");
private final FComboBoxPanel<String> cbpAiProfiles = new FComboBoxPanel<>("AI Personality:");
private final FComboBoxPanel<String> cbpDisplayCurrentCardColors = new FComboBoxPanel<>("Show Detailed Card Color:");
private final FComboBoxPanel<String> cbpAutoYieldMode = new FComboBoxPanel<>("Auto-Yield:");
private final FComboBoxPanel<String> cbpCounterDisplayType = new FComboBoxPanel<>("Counter Display Type:");
private final FComboBoxPanel<String> cbpCounterDisplayLocation = new FComboBoxPanel<>("Counter Display Location:");
private final FComboBoxPanel<String> cbpGraveyardOrdering = new FComboBoxPanel<>("Allow Ordering Cards Put in Graveyard:");
private final FComboBoxPanel<GameLogEntryType> cbpGameLogEntryType = new FComboBoxPanel<>(localizer.getMessage("cbpGameLogEntryType")+":");
private final FComboBoxPanel<CloseAction> cbpCloseAction = new FComboBoxPanel<>(localizer.getMessage("cbpCloseAction")+":");
private final FComboBoxPanel<String> cbpDefaultFontSize = new FComboBoxPanel<>(localizer.getMessage("cbpDefaultFontSize")+":");
private final FComboBoxPanel<String> cbpAiProfiles = new FComboBoxPanel<>(localizer.getMessage("cbpAiProfiles")+":");
private final FComboBoxPanel<String> cbpDisplayCurrentCardColors = new FComboBoxPanel<>(localizer.getMessage("cbpDisplayCurrentCardColors")+":");
private final FComboBoxPanel<String> cbpAutoYieldMode = new FComboBoxPanel<>(localizer.getMessage("cbpAutoYieldMode")+":");
private final FComboBoxPanel<String> cbpCounterDisplayType = new FComboBoxPanel<>(localizer.getMessage("cbpCounterDisplayType")+":");
private final FComboBoxPanel<String> cbpCounterDisplayLocation =new FComboBoxPanel<>(localizer.getMessage("cbpCounterDisplayLocation")+":");
private final FComboBoxPanel<String> cbpGraveyardOrdering = new FComboBoxPanel<>(localizer.getMessage("cbpGraveyardOrdering")+":");
/**
* Constructor.
@@ -128,7 +132,7 @@ public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
final String descriptionConstraints = "w 80%!, h 22px!, gap 28px 0 0 20px, span 2 1";
// Troubleshooting
pnlPrefs.add(new SectionLabel("Troubleshooting"), sectionConstraints);
pnlPrefs.add(new SectionLabel(localizer.getMessage("Troubleshooting")), sectionConstraints);
// Reset buttons
final String twoButtonConstraints1 = "w 38%!, h 30px!, gap 25px 0 0 10px";
@@ -141,199 +145,199 @@ public enum VSubmenuPreferences implements IVSubmenu<CSubmenuPreferences> {
pnlPrefs.add(btnContentDirectoryUI, twoButtonConstraints2);
// General Configuration
pnlPrefs.add(new SectionLabel("General Configuration"), sectionConstraints);
pnlPrefs.add(new SectionLabel(localizer.getMessage("GeneralConfiguration")), sectionConstraints);
pnlPrefs.add(getPlayerNamePanel(), titleConstraints + ", h 26px!");
pnlPrefs.add(new NoteLabel("Sets the name that you will be referred to by Forge during gameplay."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlPlayerName")), descriptionConstraints);
pnlPrefs.add(cbCompactMainMenu, titleConstraints);
pnlPrefs.add(new NoteLabel("Enable for a space efficient sidebar that displays only one menu group at a time (RESTART REQUIRED)."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlCompactMainMenu")), descriptionConstraints);
pnlPrefs.add(cbUseSentry, titleConstraints);
pnlPrefs.add(new NoteLabel("When enabled, automatically submits bug reports to developers."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlUseSentry")), descriptionConstraints);
pnlPrefs.add(btnResetJavaFutureCompatibilityWarnings, "w 300px!, h 30px!, gap 27px 0 0 20px, span 2 1");
// Gameplay Options
pnlPrefs.add(new SectionLabel("Gameplay"), sectionConstraints);
pnlPrefs.add(new SectionLabel(localizer.getMessage("GamePlay")), sectionConstraints);
pnlPrefs.add(cbpAiProfiles, comboBoxConstraints);
pnlPrefs.add(new NoteLabel("Choose your AI opponent."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlpAiProfiles")), descriptionConstraints);
pnlPrefs.add(cbAnte, titleConstraints);
pnlPrefs.add(new NoteLabel("Determines whether or not the game is played for ante."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlAnte")), descriptionConstraints);
pnlPrefs.add(cbAnteMatchRarity, titleConstraints);
pnlPrefs.add(new NoteLabel("Attempts to make antes the same rarity for all players."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlAnteMatchRarity")), descriptionConstraints);
pnlPrefs.add(cbEnableAICheats, titleConstraints);
pnlPrefs.add(new NoteLabel("Allow the AI to cheat to gain advantage (for personalities that have cheat shuffling options set)."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlEnableAICheats")), descriptionConstraints);
pnlPrefs.add(cbManaBurn, titleConstraints);
pnlPrefs.add(new NoteLabel("Play with mana burn (from pre-Magic 2010 rules)."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlManaBurn")), descriptionConstraints);
pnlPrefs.add(cbManaLostPrompt, titleConstraints);
pnlPrefs.add(new NoteLabel("When enabled, you get a warning if passing priority would cause you to lose mana in your mana pool."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlManaLostPrompt")), descriptionConstraints);
pnlPrefs.add(cbEnforceDeckLegality, titleConstraints);
pnlPrefs.add(new NoteLabel("Enforces deck legality relevant to each environment (minimum deck sizes, max card count etc)."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlEnforceDeckLegality")), descriptionConstraints);
pnlPrefs.add(cbPerformanceMode, titleConstraints);
pnlPrefs.add(new NoteLabel("Disables additional static abilities checks to speed up the game engine. (Warning: breaks some 'as if had flash' scenarios when casting cards owned by opponents)."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlPerformanceMode")), descriptionConstraints);
pnlPrefs.add(cbFilteredHands, titleConstraints);
pnlPrefs.add(new NoteLabel("Generates two starting hands and keeps the one with the closest to average land count for the deck. (Requires restart)"), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlFilteredHands")), descriptionConstraints);
pnlPrefs.add(cbCloneImgSource, titleConstraints);
pnlPrefs.add(new NoteLabel("When enabled clones will use their original art instead of the cloned card's art."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlCloneImgSource")), descriptionConstraints);
pnlPrefs.add(cbPromptFreeBlocks, titleConstraints);
pnlPrefs.add(new NoteLabel("When enabled, if you would have to pay 0 to block, pay automatically without prompt."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlPromptFreeBlocks")), descriptionConstraints);
pnlPrefs.add(cbPauseWhileMinimized, titleConstraints);
pnlPrefs.add(new NoteLabel("When enabled, Forge pauses when minimized (primarily for AI vs AI)."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlPauseWhileMinimized")), descriptionConstraints);
pnlPrefs.add(cbEscapeEndsTurn, titleConstraints);
pnlPrefs.add(new NoteLabel("When enabled, Escape key functions as an alternative shortcut to end the current turn."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlEscapeEndsTurn")), descriptionConstraints);
pnlPrefs.add(cbDetailedPaymentDesc, titleConstraints);
pnlPrefs.add(new NoteLabel("When enabled, detailed spell/ability descriptions are shown when choosing targets and paying costs."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlDetailedPaymentDesc")), descriptionConstraints);
pnlPrefs.add(cbShowStormCount, titleConstraints);
pnlPrefs.add(new NoteLabel("When enabled, displays the current storm count in the prompt pane."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlShowStormCount")), descriptionConstraints);
pnlPrefs.add(cbRemindOnPriority, titleConstraints);
pnlPrefs.add(new NoteLabel("When enabled, flashes the player choice area upon receiving priority."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlRemindOnPriority")), descriptionConstraints);
pnlPrefs.add(cbPreselectPrevAbOrder, titleConstraints);
pnlPrefs.add(new NoteLabel("When enabled, preselects the last defined simultaneous ability order in the ordering dialog."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlPreselectPrevAbOrder")), descriptionConstraints);
pnlPrefs.add(cbpGraveyardOrdering, comboBoxConstraints);
pnlPrefs.add(new NoteLabel("Determines when to let the player choose the order of cards simultaneously put in graveyard (never, always, or only when playing with cards for which it matters, for example, Volrath's Shapeshifter)."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlpGraveyardOrdering")), descriptionConstraints);
pnlPrefs.add(cbpAutoYieldMode, comboBoxConstraints);
pnlPrefs.add(new NoteLabel("Defines the granularity level of auto-yields (per unique ability or per unique card)."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlpAutoYieldMode")), descriptionConstraints);
// Deck building options
pnlPrefs.add(new SectionLabel("Random Deck Generation"), sectionConstraints);
pnlPrefs.add(new SectionLabel(localizer.getMessage("RandomDeckGeneration")), sectionConstraints);
pnlPrefs.add(cbRemoveSmall, titleConstraints);
pnlPrefs.add(new NoteLabel("Disables 1/1 and 0/X creatures in generated decks."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlRemoveSmall")), descriptionConstraints);
pnlPrefs.add(cbSingletons, titleConstraints);
pnlPrefs.add(new NoteLabel("Disables non-land duplicates in generated decks."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlSingletons")), descriptionConstraints);
pnlPrefs.add(cbRemoveArtifacts, titleConstraints);
pnlPrefs.add(new NoteLabel("Disables artifact cards in generated decks."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlRemoveArtifacts")), descriptionConstraints);
pnlPrefs.add(cbCardBased, titleConstraints);
pnlPrefs.add(new NoteLabel("Builds more synergistic random decks (requires restart)."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlCardBased")), descriptionConstraints);
// Deck building options
pnlPrefs.add(new SectionLabel("Deck Editor Options"), sectionConstraints);
pnlPrefs.add(new SectionLabel(localizer.getMessage("DeckEditorOptions")), sectionConstraints);
pnlPrefs.add(cbFilterLandsByColorId, titleConstraints);
pnlPrefs.add(new NoteLabel("When using card color filters, filter lands in a way to make it easier to find relevant mana producing lands."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlFilterLandsByColorId")), descriptionConstraints);
// Advanced
pnlPrefs.add(new SectionLabel("Advanced Settings"), sectionConstraints);
pnlPrefs.add(new SectionLabel(localizer.getMessage("AdvancedSettings")), sectionConstraints);
pnlPrefs.add(cbDevMode, titleConstraints);
pnlPrefs.add(new NoteLabel("Enables menu with functions for testing during development."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlDevMode")), descriptionConstraints);
pnlPrefs.add(cbWorkshopSyntax, titleConstraints);
pnlPrefs.add(new NoteLabel("Enables syntax checking of card scripts in the Workshop. Note: functionality still in testing phase!"), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlWorkshopSyntax")), descriptionConstraints);
pnlPrefs.add(cbpGameLogEntryType, comboBoxConstraints);
pnlPrefs.add(new NoteLabel("Changes how much information is displayed in the game log. Sorted by least to most verbose."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlGameLogEntryType")), descriptionConstraints);
pnlPrefs.add(cbpCloseAction, comboBoxConstraints);
pnlPrefs.add(new NoteLabel("Changes what happens when clicking the X button in the upper right."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlCloseAction")), descriptionConstraints);
pnlPrefs.add(cbLoadCardsLazily, titleConstraints);
pnlPrefs.add(new NoteLabel("If turned on, Forge will load card scripts as they're needed instead of at start up. (Warning: Experimental)"), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlLoadCardsLazily")), descriptionConstraints);
pnlPrefs.add(cbLoadHistoricFormats, titleConstraints);
pnlPrefs.add(new NoteLabel("If turned on, Forge will load all historic format definitions, this may take slightly longer to load at startup."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlLoadHistoricFormats")), descriptionConstraints);
// Graphic Options
pnlPrefs.add(new SectionLabel("Graphic Options"), sectionConstraints + ", gaptop 2%");
pnlPrefs.add(new SectionLabel(localizer.getMessage("GraphicOptions")), sectionConstraints + ", gaptop 2%");
pnlPrefs.add(cbpDefaultFontSize, comboBoxConstraints);
pnlPrefs.add(new NoteLabel("The default font size within the UI. All font elements are scaled relative to this. (Needs restart)"), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlDefaultFontSize")), descriptionConstraints);
pnlPrefs.add(cbImageFetcher, titleConstraints);
pnlPrefs.add(new NoteLabel("Enables live fetching of missing card images from an online resource."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlImageFetcher")), descriptionConstraints);
pnlPrefs.add(cbDisplayFoil, titleConstraints);
pnlPrefs.add(new NoteLabel("Displays foil cards with the visual foil overlay effect."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlDisplayFoil")), descriptionConstraints);
pnlPrefs.add(cbRandomFoil, titleConstraints);
pnlPrefs.add(new NoteLabel("Adds foil effect to random cards."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlRandomFoil")), descriptionConstraints);
pnlPrefs.add(cbScaleLarger, titleConstraints);
pnlPrefs.add(new NoteLabel("Allows card pictures to be expanded larger than their original size."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlScaleLarger")), descriptionConstraints);
pnlPrefs.add(cbRenderBlackCardBorders, titleConstraints);
pnlPrefs.add(new NoteLabel("Render black borders around card images."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlRenderBlackCardBorders")), descriptionConstraints);
pnlPrefs.add(cbLargeCardViewers, titleConstraints);
pnlPrefs.add(new NoteLabel("Makes all card viewers much larger for use with high resolution images. Will not fit on smaller screens."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlLargeCardViewers")), descriptionConstraints);
pnlPrefs.add(cbSmallDeckViewer, titleConstraints);
pnlPrefs.add(new NoteLabel("Sets the deck viewer window to be 800x600 rather than a proportion of the screen size."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlSmallDeckViewer")), descriptionConstraints);
pnlPrefs.add(cbRandomArtInPools, titleConstraints);
pnlPrefs.add(new NoteLabel("Generates cards with random art in generated limited mode card pools."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlRandomArtInPools")), descriptionConstraints);
pnlPrefs.add(cbUiForTouchScreen, titleConstraints);
pnlPrefs.add(new NoteLabel("Increases some UI elements to provide a better experience on touchscreen devices. (Needs restart)"), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlUiForTouchScreen")), descriptionConstraints);
pnlPrefs.add(cbCompactPrompt, titleConstraints);
pnlPrefs.add(new NoteLabel("Hide header and use smaller font in Prompt pane to make it more compact."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlCompactPrompt")), descriptionConstraints);
/*pnlPrefs.add(cbStackCardView, titleConstraints); TODO: Show this checkbox when setting can support being enabled
pnlPrefs.add(new NoteLabel("Show cards and abilities on Stack in card view rather than list view."), descriptionConstraints);*/
pnlPrefs.add(cbHideReminderText, titleConstraints);
pnlPrefs.add(new NoteLabel("Hide reminder text in Card Detail pane."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlHideReminderText")), descriptionConstraints);
pnlPrefs.add(cbOpenPacksIndiv, titleConstraints);
pnlPrefs.add(new NoteLabel("When opening Fat Packs and Booster Boxes, booster packs will be opened and displayed one at a time."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlOpenPacksIndiv")), descriptionConstraints);
pnlPrefs.add(cbTokensInSeparateRow, titleConstraints);
pnlPrefs.add(new NoteLabel("Displays tokens in a separate row on the battlefield below the non-token creatures."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlTokensInSeparateRow")), descriptionConstraints);
pnlPrefs.add(cbStackCreatures, titleConstraints);
pnlPrefs.add(new NoteLabel("Stacks identical creatures on the battlefield like lands, artifacts, and enchantments."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlStackCreatures")), descriptionConstraints);
pnlPrefs.add(cbTimedTargOverlay, titleConstraints);
pnlPrefs.add(new NoteLabel("Enables throttling-based optimization of targeting overlay to reduce CPU use (only disable if you experience choppiness on older hardware, requires starting a new match)."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlTimedTargOverlay")), descriptionConstraints);
pnlPrefs.add(cbpCounterDisplayType, comboBoxConstraints);
pnlPrefs.add(new NoteLabel("Selects the style of the in-game counter display for cards. Text-based is a new tab-like display on the cards. Image-based is the old counter image. Hybrid displays both at once."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlCounterDisplayType")), descriptionConstraints);
pnlPrefs.add(cbpCounterDisplayLocation, comboBoxConstraints);
pnlPrefs.add(new NoteLabel("Determines where to position the text-based counters on the card: close to the top or close to the bottom."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlCounterDisplayLocation")), descriptionConstraints);
pnlPrefs.add(cbpDisplayCurrentCardColors, comboBoxConstraints);
pnlPrefs.add(new NoteLabel("Displays the breakdown of the current color of cards in the card detail information panel."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlDisplayCurrentCardColors")), descriptionConstraints);
// Sound options
pnlPrefs.add(new SectionLabel("Sound Options"), sectionConstraints + ", gaptop 2%");
pnlPrefs.add(new SectionLabel(localizer.getMessage("SoundOptions")), sectionConstraints + ", gaptop 2%");
pnlPrefs.add(cbEnableSounds, titleConstraints);
pnlPrefs.add(new NoteLabel("Enable sound effects during the game."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlEnableSounds")), descriptionConstraints);
pnlPrefs.add(cbEnableMusic, titleConstraints);
pnlPrefs.add(new NoteLabel("Enable background music during the game."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlEnableMusic")), descriptionConstraints);
pnlPrefs.add(cbAltSoundSystem, titleConstraints);
pnlPrefs.add(new NoteLabel("Use the alternate sound system (only use if you have issues with sound not playing or disappearing)."), descriptionConstraints);
pnlPrefs.add(new NoteLabel(localizer.getMessage("nlAltSoundSystem")), descriptionConstraints);
// Keyboard shortcuts
pnlPrefs.add(new SectionLabel("Keyboard Shortcuts"), sectionConstraints);
pnlPrefs.add(new SectionLabel(localizer.getMessage("KeyboardShortcuts")), sectionConstraints);
final List<Shortcut> shortcuts = KeyboardShortcuts.getKeyboardShortcuts();

View File

@@ -28,7 +28,7 @@ import forge.toolbox.FScrollPane;
import forge.toolbox.FSkin;
import forge.toolbox.FSkin.SkinnedTextArea;
import net.miginfocom.swing.MigLayout;
import forge.util.Localizer;
import javax.swing.*;
/**
@@ -40,10 +40,11 @@ import javax.swing.*;
public enum VSubmenuReleaseNotes implements IVSubmenu<CSubmenuReleaseNotes> {
SINGLETON_INSTANCE;
final Localizer localizer = Localizer.getInstance();
// Fields used with interface IVDoc
private DragCell parentCell;
private final DragTab tab = new DragTab("Release Notes");
private final DragTab tab = new DragTab(localizer.getMessage("ReleaseNotes"));
private final JPanel pnlMain = new JPanel();
private SkinnedTextArea tar;
@@ -93,7 +94,7 @@ public enum VSubmenuReleaseNotes implements IVSubmenu<CSubmenuReleaseNotes> {
*/
@Override
public String getMenuTitle() {
return "Release Notes";
return localizer.getMessage("ReleaseNotes");
}
/* (non-Javadoc)

View File

@@ -19,7 +19,10 @@ package forge.view.arcane;
import java.util.HashMap;
import java.util.Map;
import java.util.Collections;
import java.util.Comparator;
import java.awt.event.MouseEvent;
import javax.swing.ScrollPaneConstants;
import javax.swing.WindowConstants;
@@ -30,8 +33,10 @@ import forge.game.zone.ZoneType;
import forge.properties.ForgePreferences.FPref;
import forge.screens.match.CMatchUI;
import forge.toolbox.FScrollPane;
import forge.toolbox.FMouseAdapter;
import forge.toolbox.FSkin;
import forge.util.Lang;
import forge.util.collect.FCollection;
public class FloatingZone extends FloatingCardArea {
private static final long serialVersionUID = 1927906492186378596L;
@@ -101,8 +106,28 @@ public class FloatingZone extends FloatingCardArea {
private final ZoneType zone;
private PlayerView player;
protected boolean sortedByName = false;
protected FCollection<CardView> cardList;
private final Comparator<CardView> comp = new Comparator<CardView>() {
@Override
public int compare(CardView lhs, CardView rhs) {
if ( !getMatchUI().mayView(lhs) ) {
return ( getMatchUI().mayView(rhs) ) ? 1 : 0 ;
} else if ( !getMatchUI().mayView(rhs) ) {
return -1;
} else {
return lhs.getName().compareTo(rhs.getName());
}
}
};
protected Iterable<CardView> getCards() {
return player.getCards(zone);
cardList = new FCollection<CardView>(player.getCards(zone));
if ( sortedByName ) {
Collections.sort(cardList, comp);
}
return cardList;
}
private FloatingZone(final CMatchUI matchUI, final PlayerView player0, final ZoneType zone0) {
@@ -136,10 +161,35 @@ public class FloatingZone extends FloatingCardArea {
setVertical(true);
}
private void toggleSorted() {
sortedByName = !sortedByName;
setTitle();
refresh();
// revalidation does not appear to be necessary here
getWindow().repaint();
}
@Override
protected void onShow() {
super.onShow();
if (!hasBeenShown) {
getWindow().getTitleBar().addMouseListener(new FMouseAdapter() {
@Override public final void onRightClick(final MouseEvent e) {
toggleSorted();
}
});
}
}
private void setTitle() {
title = Lang.getPossessedObject(player.getName(), zone.name()) + " (%d)" +
( sortedByName ? " - sorted by name (right click in title to not sort)" : " (right click in title to sort)" ) ;
}
private void setPlayer(PlayerView player0) {
if (player == player0) { return; }
player = player0;
title = Lang.getPossessedObject(player0.getName(), zone.name()) + " (%d)";
setTitle();
boolean isAi = player0.isAI();
switch (zone) {

View File

@@ -6,13 +6,13 @@
<packaging.type>jar</packaging.type>
<build.min.memory>-Xms128m</build.min.memory>
<build.max.memory>-Xmx2048m</build.max.memory>
<alpha-version>1.6.20.001</alpha-version>
<alpha-version>1.6.21.001</alpha-version>
</properties>
<parent>
<artifactId>forge</artifactId>
<groupId>forge</groupId>
<version>1.6.21-SNAPSHOT</version>
<version>1.6.22-SNAPSHOT</version>
</parent>
<artifactId>forge-gui-ios</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<artifactId>forge</artifactId>
<groupId>forge</groupId>
<version>1.6.21-SNAPSHOT</version>
<version>1.6.22-SNAPSHOT</version>
</parent>
<artifactId>forge-gui-mobile-dev</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<artifactId>forge</artifactId>
<groupId>forge</groupId>
<version>1.6.21-SNAPSHOT</version>
<version>1.6.22-SNAPSHOT</version>
</parent>
<artifactId>forge-gui-mobile</artifactId>

View File

@@ -34,7 +34,7 @@ import java.util.List;
import java.util.Stack;
public class Forge implements ApplicationListener {
public static final String CURRENT_VERSION = "1.6.20.001";
public static final String CURRENT_VERSION = "1.6.21.001";
private static final ApplicationListener app = new Forge();
private static Clipboard clipboard;

View File

@@ -1528,7 +1528,13 @@ public class FDeckEditor extends TabPageScreen<FDeckEditor> {
modelPath = "";
setSaved(true);
}
editor.setDeck(model.getHumanDeck());
if (model != null) {
editor.setDeck(model.getHumanDeck());
}
else {
editor.setDeck(null);
}
}
private boolean isModelInSyncWithFolder() {

View File

@@ -4,7 +4,7 @@
<parent>
<artifactId>forge</artifactId>
<groupId>forge</groupId>
<version>1.6.21-SNAPSHOT</version>
<version>1.6.22-SNAPSHOT</version>
</parent>
<artifactId>forge-gui</artifactId>

View File

@@ -4,7 +4,7 @@ Types:Creature Elemental
PT:1/1
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDig | TriggerDescription$ At the beginning of your upkeep, reveal cards from the top of your library until you reveal a creature card. Until your next turn, CARDNAME's base power becomes twice that card's power and its toughness. Put the revealed cards on the bottom of your library in a random order.
SVar:TrigDig:DB$ DigUntil | Reveal$ True | Valid$ Creature | ValidDescription$ creature card | FoundDestination$ Exile | RevealedDestination$ Exile | RememberFound$ True | ImprintRevealed$ True | SubAbility$ DBAnimate
SVar:DBAnimate:DB$ Animate | Power$ X | Toughness$ Y | SubAbility$ DBMovetoLib
SVar:DBAnimate:DB$ Animate | Power$ X | Toughness$ Y | UntilYourNextTurn$ True | SubAbility$ DBMovetoLib | References$ X,Y
SVar:DBMovetoLib:DB$ ChangeZoneAll | ChangeType$ Card.IsRemembered,Card.IsImprinted | Origin$ Exile | Destination$ Library | RandomOrder$ True | LibraryPosition$ -1 | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | ClearImprinted$ True
SVar:X:Remembered$CardPower/Times.2

View File

@@ -5,8 +5,8 @@ PT:5/4
K:Flash
K:Flying
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigEffect | TriggerDescription$ When CARDNAME enters the battlefield, until end of turn, damage that would reduce your life total to less than 1 reduces it to 1 instead.
SVar:TrigEffect:DB$ Effect | Name$ CARDNAME Effect | ReplacementEffects$ ElderscaleCondition | Duration$ UntilEndOfTurn
SVar:SelflessDamage:Event$ Continuous | EffectZone$ Command | Affected$ You | AddKeyword$ DamageLifeThreshold:1 | Description$ Spells can't reduce your life total to less than 1 reduces it to 1 instead.
A:AB$ SetLife | Cost$ 4 W W ExileFromGrave<1/CARDNAME> | ActivationZone$ Graveyard | LifeAmount$ 10 | SpellDescription$ Your life total becomes 10.
SVar:TrigEffect:DB$ Effect | Name$ Angel of Grace Effect | StaticAbilities$ SelflessDamage | Description$ Until end of turn, damage that would reduce your life total to less than 1 reduces it to 1 instead.
SVar:SelflessDamage:Mode$ Continuous | EffectZone$ Command | Affected$ You | AddKeyword$ DamageLifeThreshold:1 | Description$ Until end of turn, damage that would reduce your life total to less than 1 reduces it to 1 instead.
A:AB$ SetLife | Cost$ 4 W W ExileFromGrave<1/CARDNAME> | Defined$ You | ActivationZone$ Graveyard | LifeAmount$ 10 | SpellDescription$ Your life total becomes 10.
SVar:RemRandomDeck:True
Oracle:Flash\nFlying\nWhen Angel of Grace enters the battlefield, until end of turn, damage that would reduce your life total to less than 1 reduces it to 1 instead.\n{4}{W}{W}, Exile Angel of Grace from your graveyard: Your life total becomes 10.

View File

@@ -4,4 +4,5 @@ Types:Enchantment
T:Mode$ Attacks | ValidCard$ Creature.YouCtrl | Alone$ True | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ Whenever a creature you control attacks alone, it gets +X/+X until end of turn, where X is the number of creatures you control.
SVar:TrigPump:DB$ Pump | Defined$ TriggeredAttacker | NumAtt$ +X | NumDef$ +X | References$ X
SVar:X:Count$Valid Creature.YouCtrl
SVar:PlayMain1:TRUE
Oracle:Whenever a creature you control attacks alone, it gets +X/+X until end of turn, where X is the number of creatures you control.

View File

@@ -2,6 +2,6 @@ Name:Applied Biomancy
ManaCost:G U
Types:Instant
A:SP$ Charm | Cost$ G U | MinCharmNum$ 1 | CharmNum$ 2 | Choices$ DBPump,DBUnsummon
SVar:DBPump:DB$ Pump | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ +1 | NumDef$ +1 | SpellDescription$ Target creature gets +1/+1 until end of turn.
SVar:DBUnsummon:DB$ ChangeZone | ValidTgts$ Creature | TgtPrompt$ Select target creature | Origin$ Battlefield | Destination$ Hand | SpellDescription$ Return target creature to its owner's hand.
SVar:DBPump:DB$ Pump | ValidTgts$ Creature | TgtPrompt$ Select target creature to get +1/+1 | NumAtt$ +1 | NumDef$ +1 | SpellDescription$ Target creature gets +1/+1 until end of turn.
SVar:DBUnsummon:DB$ ChangeZone | ValidTgts$ Creature | TgtPrompt$ Select target creature to return to owner's hand | Origin$ Battlefield | Destination$ Hand | SpellDescription$ Return target creature to its owner's hand.
Oracle:Choose one or both —\n• Target creature gets +1/+1 until end of turn.\n• Return target creature to its owner's hand.

View File

@@ -2,8 +2,8 @@ Name:Arcanum Wings
ManaCost:1 U
Types:Enchantment Aura
K:Enchant creature
K:Aura swap:2 U
A:SP$ Attach | Cost$ 1 U | ValidTgts$ Creature | AILogic$ Pump
S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ Flying | Description$ Enchanted creature has flying.
A:AB$ ExchangeZone | Cost$ 2 U | Zone2$ Hand | Type$ Aura | CostDesc$ Aura swap {2}{U} | SpellDescription$ ({2}{U}: Exchange this Aura with an Aura card in your hand.)
SVar:Picture:http://www.wizards.com/global/images/magic/general/arcanum_wings.jpg
Oracle:Enchant creature\nEnchanted creature has flying.\nAura swap {2}{U} ({2}{U}: Exchange this Aura with an Aura card in your hand.)

View File

@@ -2,5 +2,5 @@ Name:Arrester's Admonition
ManaCost:2 U
Types:Instant
A:SP$ ChangeZone | Cost$ 2 U | ValidTgts$ Creature | TgtPrompt$ Select target creature | Origin$ Battlefield | Destination$ Hand | SubAbility$ DBAddendum | SpellDescription$ Return target creature to its owner's hand.
SVar:DBAddendum:DB$ Draw | NumCards$ 1 | ConditionPlayerTurn$ True | ConditionPhases$ Main1,Main2 | SpellDescription$ Addendum - If you cast this spell during your main phase, draw a card.
SVar:DBAddendum:DB$ Draw | NumCards$ 1 | ConditionPlayerTurn$ True | ConditionPhases$ Main1,Main2 | ConditionDefined$ Self | ConditionPresent$ Card.wasCast | SpellDescription$ Addendum - If you cast this spell during your main phase, draw a card.
Oracle:Return target creature to its owner's hand.\nAddendum — If you cast this spell during your main phase, draw a card.

View File

@@ -2,5 +2,5 @@ Name:Arrester's Zeal
ManaCost:W
Types:Instant
A:SP$ Pump | Cost$ W | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ +2 | NumDef$ +2 | SubAbility$ DBAddendum | SpellDescription$ Target creature gets +2/+2 until end of turn.
SVar:DBAddendum:DB$ Pump | Cost$ W | Defined$ Targeted | ConditionPlayerTurn$ True | ConditionPhases$ Main1,Main2 | SpellDescription$ Addendum - If you cast this spell during your main phase, that creature gains flying until end of turn.
SVar:DBAddendum:DB$ Pump | Defined$ Targeted | ConditionPlayerTurn$ True | ConditionPhases$ Main1,Main2 | ConditionDefined$ Self | ConditionPresent$ Card.wasCast | KW$ Flying | SpellDescription$ Addendum - If you cast this spell during your main phase, that creature gains flying until end of turn.
Oracle:Target creature gets +2/+2 until end of turn.\nAddendum — If you cast this spell during your main phase, that creature gains flying until end of turn.

View File

@@ -3,6 +3,6 @@ ManaCost:2 U U
Types:Instant
A:SP$ Draw | Cost$ 2 U U | NumCards$ 4 | ValidTgts$ Player | TgtPrompt$ Choose a player | SubAbility$ DBDiscard | SpellDescription$ Target player draws four cards, then discards three cards. If you cast this spell during your main phase, instead that player draws four cards, then discards two cards.
SVar:DBDiscard:DB$Discard | NumCards$ X | Mode$ TgtChoose | Defined$ Targeted | References$ X
SVar:X:Count$IfMainPhase.2.3
SVar:X:Count$IfCastInOwnMainPhase.2.3
SVar:Picture:http://www.wizards.com/global/images/magic/general/careful_consideration.jpg
Oracle:Target player draws four cards, then discards three cards. If you cast this spell during your main phase, instead that player draws four cards, then discards two cards.

View File

@@ -2,5 +2,5 @@ Name:Clear the Stage
ManaCost:4 B
Types:Instant
A:SP$ Pump | Cost$ 4 B | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ -3 | NumDef$ -3 | IsCurse$ True | SubAbility$ DBChangeZone | SpellDescription$ Target creature gets -3/-3 until end of turn. If you control a creature with power 4 or greater, you may return up to one target creature card from your graveyard to your hand.
SVar:DBChangeZone:DB$ ChangeZone | Origin$ Graveyard | Destination$ Hand | TgtPrompt$ Choose target creature card in your graveyard | ValidTgts$ Creature.YouCtrl | TargetMin$ 0 | TargetMax$ 1 | TargetsWithDefinedController$ ParentTarget | ConditionPresent$ Creature.YouCtrl+powerGE4
SVar:DBChangeZone:DB$ ChangeZone | Origin$ Graveyard | Destination$ Hand | TgtPrompt$ Choose target creature card in your graveyard | ValidTgts$ Creature.YouOwn | TargetMin$ 0 | TargetMax$ 1 | ConditionPresent$ Creature.YouCtrl+powerGE4
Oracle:Target creature gets -3/-3 until end of turn. If you control a creature with power 4 or greater, you may return up to one target creature card from your graveyard to your hand.

View File

@@ -3,7 +3,7 @@ ManaCost:2 U
Types:Instant
A:SP$ Pump | Cost$ 2 U | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ -4 | IsCurse$ True | SubAbility$ DBDraw | SpellDescription$ Target creature gets -4/-0 until end of turn.
SVar:DBDraw:DB$ Draw | NumCards$ 1 | SpellDescription$ Draw a card. | SubAbility$ DBAddendum
SVar:DBAddendum:DB$ Tap | Defined$ Targeted | ConditionPlayerTurn$ True | ConditionPhases$ Main1,Main2 | SubAbility$ DBPump | SpellDescription$ Addendum - If you cast this spell during your main phase, tap that creature and it doesn't untap during its controller's next untap step.
SVar:DBPump:DB$ Pump | Defined$ Targeted | ConditionPlayerTurn$ True | ConditionPhases$ Main1,Main2 | KW$ HIDDEN This card doesn't untap during your next untap step. | Permanent$ True
SVar:DBAddendum:DB$ Tap | Defined$ Targeted | ConditionPlayerTurn$ True | ConditionPhases$ Main1,Main2 | ConditionDefined$ Self | ConditionPresent$ Card.wasCast | SubAbility$ DBPump | SpellDescription$ Addendum - If you cast this spell during your main phase, tap that creature and it doesn't untap during its controller's next untap step.
SVar:DBPump:DB$ Pump | Defined$ Targeted | ConditionPlayerTurn$ True | ConditionPhases$ Main1,Main2 | ConditionDefined$ Self | ConditionPresent$ Card.wasCast | KW$ HIDDEN This card doesn't untap during your next untap step. | Permanent$ True
SVar:PlayMain1:TRUE
Oracle:Target creature gets -4/-0 until end of turn.\nDraw a card.\nAddendum — If you cast this spell during your main phase, tap that creature and it doesn't untap during its controller's next untap step.

View File

@@ -3,8 +3,8 @@ ManaCost:1 W U
Types:Creature Vedalken Wizard
PT:1/3
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigExile | TriggerDescription$ When CARDNAME enters the battlefield, exile target nonland permanent an opponent controls and all other nonland permanents that player controls with the same name as that permanent until CARDNAME leaves the battlefield.
SVar:TrigExile:DB$ ChangeZone | Origin$ Battlefield | Destination$ Exile | ValidTgts$ Permanent.nonLand+OppCtrl | TgtPrompt$ Select target nonland permanent an opponent controls | RememberTargets$ True | SubAbility$ DBChangeZoneAll
SVar:DBChangeZoneAll:DB$ ChangeZoneAll | Origin$ Battlefield | Destination$ Exile | ChangeType$ Remembered.sameName+ControlledBy TargetedOrController | RememberChanged$ True | SubAbility$ DBEffect
SVar:TrigExile:DB$ ChangeZone | Origin$ Battlefield | Destination$ Exile | ValidTgts$ Permanent.nonLand+OppCtrl | TgtPrompt$ Select target nonland permanent an opponent controls | ConditionPresent$ Card.Self | RememberTargets$ True | SubAbility$ DBChangeZoneAll
SVar:DBChangeZoneAll:DB$ ChangeZoneAll | Origin$ Battlefield | Destination$ Exile | ChangeType$ Remembered.sameName+ControlledBy TargetedOrController | ConditionPresent$ Card.Self | RememberChanged$ True | SubAbility$ DBEffect
SVar:DBEffect:DB$ Effect | Triggers$ ComeBack | RememberObjects$ Remembered | ImprintCards$ Self | SVars$ TrigReturn,ExileSelf | ConditionPresent$ Card.Self | Duration$ Permanent | ForgetOnMoved$ Exile | SubAbility$ DBCleanup
SVar:ComeBack:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.IsImprinted | Execute$ TrigReturn | TriggerZones$ Command | TriggerController$ TriggeredCardController | Static$ True | TriggerDescription$ Those permanents are exiled until EFFECTSOURCE leaves the battlefield
SVar:TrigReturn:DB$ ChangeZoneAll | Origin$ Exile | Destination$ Battlefield | ChangeType$ Card.IsRemembered | SubAbility$ ExileSelf

View File

@@ -4,8 +4,7 @@ Types:Enchantment
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigGainLife | TriggerDescription$ When CARDNAME enters the battlefield, you gain 2 life and draw a card.
SVar:TrigGainLife:DB$GainLife | Defined$ You | LifeAmount$ 2 | SubAbility$ DBDraw
SVar:DBDraw:DB$Draw | Defined$ You | NumCards$ 1
T:Mode$ SpellCast | ValidCard$ Instant | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | PlayerTurn$ True | CheckSVar$ X | SVarCompare$ GE1 | Execute$ TrigChangeZone | OptionalDecider$ You | TriggerDescription$ Whenever you cast an instant spell during your main phase, you may return CARDNAME to its owner's hand.
T:Mode$ SpellCast | ValidCard$ Instant | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | PlayerTurn$ True | Phase$ Main1,Main2 | Execute$ TrigChangeZone | OptionalDecider$ You | TriggerDescription$ Whenever you cast an instant spell during your main phase, you may return CARDNAME to its owner's hand.
SVar:TrigChangeZone:DB$ ChangeZone | Origin$ Battlefield | Destination$ Hand | Defined$ Self
SVar:X:Count$IfMainPhase.1.0
DeckHas:Ability$LifeGain
Oracle:When Dovin's Acuity enters the battlefield, you gain 2 life and draw a card.\nWhenever you cast an instant spell during your main phase, you may return Dovin's Acuity to its owner's hand.

View File

@@ -4,5 +4,5 @@ Types:Instant
A:SP$ ChangeZoneAll | Cost$ 5 W U | ChangeType$ Card | Origin$ Hand,Graveyard | Destination$ Library | Shuffle$ True | Random$ True | SubAbility$ DBDraw | UseAllOriginZones$ True | AILogic$ Timetwister | SpellDescription$ Each player shuffles their hand and hand into their library, then draws seven cards. Exile CARDNAME.
SVar:DBDraw:DB$ Draw | NumCards$ 7 | Defined$ Player | SubAbility$ DBChange
SVar:DBChange:DB$ ChangeZone | Origin$ Stack | Destination$ Exile | SubAbility$ DBAddendum
SVar:DBAddendum:DB$ ChangeZone | Origin$ Hand | Destination$ Battlefield | ChangeType$ Permanent.cmcLE7+YouCtrl | SubAbility$ DBPump | RememberChanged$ True | ChangeNum$ 1 | ConditionPlayerTurn$ True | ConditionPhases$ Main1,Main2 | SpellDescription$ Addendum - If you cast this spell during your main phase, you may put a permanent card with converted mana cost 7 or less from your hand onto the battlefield.
SVar:DBAddendum:DB$ ChangeZone | Origin$ Hand | Destination$ Battlefield | ChangeType$ Permanent.cmcLE7+YouCtrl | ChangeNum$ 1 | ConditionPlayerTurn$ True | ConditionPhases$ Main1,Main2 | ConditionDefined$ Self | ConditionPresent$ Card.wasCast | SpellDescription$ Addendum - If you cast this spell during your main phase, you may put a permanent card with converted mana cost 7 or less from your hand onto the battlefield.
Oracle:Each player shuffles their hand and graveyard into their library, then draws seven cards. Exile Emergency Powers.\nAddendum — If you cast this spell during your main phase, you may put a permanent card with converted mana cost 7 or less from your hand onto the battlefield.

View File

@@ -7,4 +7,5 @@ K:Trample
K:Haste
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigPumpAll | TriggerDescription$ When CARDNAME enters the battlefield, other creatures you control get +2/+2 and gain vigilance and trample until end of turn.
SVar:TrigPumpAll:DB$PumpAll | ValidCards$ Creature.Other+YouCtrl | NumAtt$ +2 | NumDef$ +2 | KW$ Vigilance & Trample
SVar:PlayMain1:TRUE
Oracle:Vigilance, trample, haste\nWhen End-Raze Forerunners enters the battlefield, other creatures you control get +2/+2 and gain vigilance and trample until end of turn.

View File

@@ -4,8 +4,9 @@ Types:Artifact Creature Construct
PT:1/1
K:etbCounter:P1P1:3:ValidCard$ Card.Self+wasNotCastFromHand:CARDNAME enters the battlefield with three +1/+1 counters on it if you didn't cast it from your hand.
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Battlefield | Destination$ Graveyard | Execute$ TrigExile | TriggerController$ TriggeredCardController | TriggerDescription$ When CARDNAME dies, exile it with three time counters on it and it gains suspend.
SVar:TrigExile:DB$ ChangeZone | Defined$ TriggeredCard | Origin$ Graveyard | Destination$ Exile | SubAbility$ DBPutCounter
SVar:DBPutCounter:DB$ PutCounter | Defined$ TriggeredCardLKICopy | CounterType$ TIME | CounterNum$ 3 | SubAbility$ GiveSuspend
SVar:GiveSuspend:DB$ Pump | Defined$ TriggeredCard | KW$ Suspend | PumpZone$ Exile | Permanent$ True
SVar:TrigExile:DB$ ChangeZone | Defined$ TriggeredCard | Origin$ Graveyard | Destination$ Exile | SubAbility$ DBPutCounter | RememberChanged$ True
SVar:DBPutCounter:DB$ PutCounter | Defined$ Remembered | CounterType$ TIME | CounterNum$ 3 | SubAbility$ GiveSuspend
SVar:GiveSuspend:DB$ Pump | Defined$ Remembered | KW$ Suspend | PumpZone$ Exile | Permanent$ True | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:Picture:http://www.wizards.com/global/images/magic/general/epochrasite.jpg
Oracle:Epochrasite enters the battlefield with three +1/+1 counters on it if you didn't cast it from your hand.\nWhen Epochrasite dies, exile it with three time counters on it and it gains suspend. (At the beginning of your upkeep, remove a time counter. When the last is removed, cast this card without paying its mana cost. It has haste.)

View File

@@ -1,8 +1,8 @@
Name:Flames of the Raze-Boar
ManaCost:5 R
Types:Instant
A:SP$ DealDamage | Cost$ 5 R | NumDmg$ 4 | ValidTgts$ Creature.OppCtrl | TgtPrompt$ Select target creature an opponent controls | SubAbility$ DBDealDamage | SpellDescription$ CARDNAME deals 4 damage to target creature an opponent controls. Then CARDNAME deals 2 damage to each other creature that player controls if you control a creature with power 4 or greater.
SVar:DBDealDamage:DB$ DamageAll | NumDmg$ 2 | ValidCards$ Creature.ControlledBy TargetedOrController | ConditionCheckSVar$ X | ConditionSVarCompare$ GE1 | References$ X| SubAbility$ DBCleanup
A:SP$ DealDamage | Cost$ 5 R | NumDmg$ 4 | ValidTgts$ Creature.OppCtrl | RememberTargets$ True | TgtPrompt$ Select target creature an opponent controls | SubAbility$ DBDealDamage | SpellDescription$ CARDNAME deals 4 damage to target creature an opponent controls. Then CARDNAME deals 2 damage to each other creature that player controls if you control a creature with power 4 or greater.
SVar:DBDealDamage:DB$ DamageAll | NumDmg$ 2 | ValidCards$ Creature.IsNotRemembered+ControlledBy TargetedOrController | ConditionCheckSVar$ X | ConditionSVarCompare$ GE1 | References$ X| SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Count$Valid Creature.powerGE4+YouCtrl
Oracle:Flames of the Raze-Boar deals 4 damage to target creature an opponent controls. Then Flames of the Raze-Boar deals 2 damage to each other creature that player controls if you control a creature with power 4 or greater.

View File

@@ -2,3 +2,4 @@ Name:Goblin Bruiser
ManaCost:1 R R
Types:Creature Goblin Warrior
PT:3/3
Oracle:

View File

@@ -1,6 +1,6 @@
Name:Guardian Project
ManaCost:3 G
Types:Enchantment
T:Mode$ ChangesZone | ValidCard$ Creature.nonToken+YouCtrl | Origin$ Any | Destination$ Battlefield | Execute$ TrigDraw | TriggerZones$ Battlefield | TriggerDescription$ Whenever a nontoken creature enters the battlefield under your control, if that creature does not have the same name as another creature you control or a creature card in your graveyard, draw a card.
T:Mode$ ChangesZone | ValidCard$ Creature.nonToken+YouCtrl+doesNotShareNameWith YourGraveyard+doesNotShareNameWith OtherYourBattlefield | Origin$ Any | Destination$ Battlefield | Execute$ TrigDraw | TriggerZones$ Battlefield | TriggerDescription$ Whenever a nontoken creature enters the battlefield under your control, if that creature doesn't have the same name as another creature you control or a creature card in your graveyard, draw a card.
SVar:TrigDraw:DB$Draw | Defined$ You | NumCards$ 1
Oracle:Whenever a nontoken creature enters the battlefield under your control, if that creature does not have the same name as another creature you control or a creature card in your graveyard, draw a card.
Oracle:Whenever a nontoken creature enters the battlefield under your control, if that creature doesn't have the same name as another creature you control or a creature card in your graveyard, draw a card.

View File

@@ -2,6 +2,6 @@ Name:Haunting Hymn
ManaCost:4 B B
Types:Instant
A:SP$ Discard | Cost$ 4 B B | ValidTgts$ Player | NumCards$ X | Mode$ TgtChoose | References$ X | SpellDescription$ Target player discards two cards. If you cast this spell during your main phase, that player discards four cards instead.
SVar:X:Count$IfMainPhase.4.2
SVar:X:Count$IfCastInOwnMainPhase.4.2
SVar:Picture:http://www.wizards.com/global/images/magic/general/haunting_hymn.jpg
Oracle:Target player discards two cards. If you cast this spell during your main phase, that player discards four cards instead.

View File

@@ -2,6 +2,7 @@ Name:Imperiosaur
ManaCost:2 G G
Types:Creature Dinosaur
Text:Spend only mana produced by basic lands to cast CARDNAME.
PT:5/5
A:SP$ PermanentCreature | Cost$ Mana<2 G G\Basic>
SVar:Picture:http://resources.wizards.com/magic/cards/fut/en-us/card130634.jpg
Oracle:Spend only mana produced by basic lands to cast Imperiosaur.

View File

@@ -2,13 +2,12 @@ Name:Kaya, Orzhov Usurper
ManaCost:1 W B
Types:Legendary Planeswalker Kaya
Loyalty:3
A:AB$ ChangeZone | Cost$ AddCounter<1/LOYALTY> | Origin$ Graveyard | Destination$ Exile | TargetMin$ 0 | TargetMax$ 2 | TargetsFromSingleZone$ True | ValidTgts$ Card | TgtPrompt$ Select target card from a graveyard | Planeswalker$ True | SubAbility$ DBGainLife | SpellDescription$ Exile up to two target cards from a single graveyard. You gain 2 life if at least one creature card was exiled this way.
SVar:DBGainLife:DB$GainLife | Defined$ You | LifeAmount$ 2 | ConditionCheckSVar$ X | ConditionSVarCompare$ EQ0 | References$ X | SubAbility$ DBCleanup
A:AB$ ChangeZone | Cost$ AddCounter<1/LOYALTY> | Origin$ Graveyard | Destination$ Exile | TargetMin$ 0 | TargetMax$ 2 | TargetsFromSingleZone$ True | ValidTgts$ Card | TgtPrompt$ Select target card from a graveyard | Planeswalker$ True | SubAbility$ DBGainLife | RememberChanged$ True | SpellDescription$ Exile up to two target cards from a single graveyard. You gain 2 life if at least one creature card was exiled this way.
SVar:DBGainLife:DB$GainLife | Defined$ You | LifeAmount$ 2 | ConditionDefined$ Remembered | ConditionPresent$ Creature | ConditionCompare$ GE1 | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Count$ValidExile
A:AB$ ChangeZone | Cost$ SubCounter<1/LOYALTY> | Planeswalker$ True | Origin$ Battlefield | Destination$ Exile | TgtPrompt$ Choose target nonland permanent with converted mana cost 1 or less | ValidTgts$ Permanent.nonLand+cmcLE1 | SpellDescription$ Exile target nonland permanent with converted mana cost 1 or less.
A:AB$ DealDamage | Cost$ SubCounter<5/LOYALTY> | Planeswalker$ True | Ultimate$ True | ValidTgts$ Player | NumDmg$ X | References$ X | SubAbility$ DBYouGainLife | SpellDescription$ CARDNAME deals damage to target player equal to the number of cards that player owns in exile and you gain that much life.
A:AB$ DealDamage | Cost$ SubCounter<5/LOYALTY> | Planeswalker$ True | Ultimate$ True | ValidTgts$ Player | RememberTargets$ True | NumDmg$ X | References$ X | SubAbility$ DBYouGainLife | SpellDescription$ CARDNAME deals damage to target player equal to the number of cards that player owns in exile and you gain that much life.
SVar:DBYouGainLife:DB$ GainLife | Defined$ You | LifeAmount$ X | References$ X
SVar:X:TargetedPlayer$CardsInExile
SVar:X:Count$ValidExile Card.RememberedPlayerOwn
DeckHas:Ability$LifeGain
Oracle:[+1]: Exile up to two target cards from a single graveyard. You gain 2 life if at least one creature card was exiled this way.\n[-1]: Exile target nonland permanent with converted mana cost 1 or less.\n[-5]: Kaya, Orzhov Usurper deals damage to target player equal to the number of cards that player owns in exile and you gain that much life.

View File

@@ -2,7 +2,7 @@ Name:Knight of the Last Breath
ManaCost:5 W B
Types:Creature Giant Knight
PT:4/4
A:AB$ Token | Cost$ 3 Sac<1/Creature.nonToken+Other/another creature> | TokenAmount$ 1 | TokenScript$ wb_1_1_spirit_flying | TokenOwner$ You | LegacyImage$ wb 1 1 spirit flying rna | SpellDescription$ Create a 1/1 white and black Spirit creature token with flying.
A:AB$ Token | Cost$ 3 Sac<1/Creature.nonToken+Other/another nontoken creature> | TokenAmount$ 1 | TokenScript$ wb_1_1_spirit_flying | TokenOwner$ You | LegacyImage$ wb 1 1 spirit flying rna | SpellDescription$ Create a 1/1 white and black Spirit creature token with flying.
SVar:RemRandomDeck:True
K:Afterlife:3
SVar:AIPreference:SacCost$Creature.cmcLE1

View File

@@ -2,8 +2,8 @@ Name:Lavinia, Azorius Renegade
ManaCost:W U
Types:Legendary Creature Human Soldier
PT:2/2
S:Mode$ CantBeCast | ValidCard$ Card.nonCreature+nonLand | Caster$ Opponent | Description$ Each opponent can't cast noncreature spells with converted mana cost greater than the number of lands that player controls.
SVar:RemRandomDeck:True
S:Mode$ CantBeCast | ValidCard$ Card.nonCreature+nonLand+cmcGTX | Caster$ Opponent | Description$ Each opponent can't cast noncreature spells with converted mana cost greater than the number of lands that player controls.
SVar:X:Count$Valid Land.OppCtrl
T:Mode$ SpellCast | ValidCard$ Card | ValidActivatingPlayer$ Opponent | TriggerZones$ Battlefield | Execute$ TrigCounter | ManaSpent$ EQ0 | TriggerDescription$ Whenever an opponent casts a spell, if no mana was spent to cast it, counter that spell.
SVar:TrigCounter:DB$ Counter | Defined$ TriggeredSpellAbility
SVar:RemRandomDeck:True

View File

@@ -3,14 +3,12 @@ ManaCost:4 W
Types:Creature Beast
PT:4/5
K:Vigilance
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ DBChooseExile | TriggerDescription$ When CARDNAME enters the battlefield, exile any number of other nontoken creatures you control until it leaves the battlefield.
SVar:DBChooseExile:DB$ ChooseCard | Defined$ You | MinAmount$ 0 | Amount$ MaxTgts | References$ MaxTgts | Choices$ Creature.nonToken+Other+YouCtrl | ChoiceTitle$ Choose any number of other nontoken creatures you control | ChoiceZone$ Battlefield | SubAbility$ TrigExile
SVar:TrigExile:DB$ ChangeZone | Origin$ Battlefield | Destination$ Exile | RememberChanged$ True | Defined$ ChosenCard | SubAbility$ DBEffect
SVar:DBEffect:DB$ Effect | Triggers$ ComeBack | RememberObjects$ RememberedCard | ImprintCards$ Self | SVars$ TrigReturn,ExileSelf | ConditionPresent$ Card.Self | Duration$ Permanent | ForgetOnMoved$ Exile | SubAbility$ DBCleanup
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigExile | TriggerDescription$ When CARDNAME enters the battlefield, exile any number of other nontoken creatures you control until it leaves the battlefield.
SVar:TrigExile:DB$ ChangeZone | Origin$ Battlefield | Destination$ Exile | RememberChanged$ True | Hidden$ True | ChangeType$ Creature.nonToken+Other+YouCtrl | ChangeNum$ MaxTgts | SelectPrompt$ Choose any number of other nontoken creatures you control | SubAbility$ DBEffect | References$ MaxTgts
SVar:DBEffect:DB$ Effect | Triggers$ ComeBack | RememberObjects$ RememberedCard | ImprintCards$ Self | SVars$ TrigReturn,ExileSelf | ConditionPresent$ Card.Self | Duration$ Permanent | ForgetOnMoved$ Exile
SVar:ComeBack:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.IsImprinted | Execute$ TrigReturn | TriggerZones$ Command | TriggerController$ TriggeredCardController | Static$ True | TriggerDescription$ That creature is exiled until EFFECTSOURCE leaves the battlefield
SVar:TrigReturn:DB$ ChangeZoneAll | Origin$ Exile | Destination$ Battlefield | ChangeType$ Card.IsRemembered | SubAbility$ ExileSelf
SVar:ExileSelf:DB$ ChangeZone | Origin$ Command | Destination$ Exile | Defined$ Self
SVar:DBCleanup:DB$ Cleanup | ClearChosenCard$ True
S:Mode$ Continuous | Affected$ Card.Self | AddPower$ X | AddToughness$ X | References$ X | Description$ CARDNAME gets +2/+2 for each card exiled with it.
#Triggers to forget remembered on this
T:Mode$ ChangesZone | ValidCard$ Card.IsRemembered | Origin$ Exile | Destination$ Any | TriggerZones$ Battlefield | Static$ True | Execute$ TrigForget

View File

@@ -2,6 +2,6 @@ Name:Might of Old Krosa
ManaCost:G
Types:Instant
A:SP$ Pump | Cost$ G | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ X | NumDef$ X | References$ X | SpellDescription$ Target creature gets +2/+2 until end of turn. If you cast this spell during your main phase, that creature gets +4/+4 until end of turn instead.
SVar:X:Count$IfMainPhase.4.2
fCSVar:X:Count$IfCastInOwnMainPhase.4.2
SVar:Picture:http://www.wizards.com/global/images/magic/general/might_of_old_krosa.jpg
Oracle:Target creature gets +2/+2 until end of turn. If you cast this spell during your main phase, that creature gets +4/+4 until end of turn instead.

View File

@@ -4,6 +4,6 @@ Types:Creature Spirit
PT:3/2
K:Menace
K:Deathtouch
S:Mode$ Continuous | Affected$ Instant.YouCtrl,Sorcery.YouCtrl | AddKeyword$ Deathtouch | Description$ Instant and sorcery spells you control have deathtouch.
S:Mode$ Continuous | Affected$ Instant.YouCtrl,Sorcery.YouCtrl | AddKeyword$ Deathtouch | AffectedZone$ Stack | Description$ Instant and sorcery spells you control have deathtouch.
SVar:PlayMain1:TRUE
Oracle:Menace, deathtouch\nInstant and sorcery spells you control have deathtouch. (Any amount of damage they deal to a creature is enough to destroy it.)

View File

@@ -1,6 +1,6 @@
Name:Precognitive Perception
ManaCost:3 U U
Types:Instant
A:SP$ Scry | Cost$ 3 U U | ScryNum$ 3 | ConditionPlayerTurn$ True | ConditionPhases$ Main1,Main2 | SubAbility$ DBDraw | SpellDescription$ Draw three cards.\nAddendum — If you cast this spell during your main phase, instead scry 3, then draw three cards.
A:SP$ Scry | Cost$ 3 U U | ScryNum$ 3 | ConditionPlayerTurn$ True | ConditionPhases$ Main1,Main2 | ConditionDefined$ Self | ConditionPresent$ Card.wasCast | SubAbility$ DBDraw | SpellDescription$ Draw three cards.\nAddendum — If you cast this spell during your main phase, instead scry 3, then draw three cards.
SVar:DBDraw:DB$ Draw | Cost$ 3 U U | NumCards$ 3
Oracle:Draw three cards.\nAddendum — If you cast this spell during your main phase, instead scry 3, then draw three cards.

View File

@@ -2,6 +2,6 @@ Name:Return to Dust
ManaCost:2 W W
Types:Instant
A:SP$ ChangeZone | Cost$ 2 W W | Origin$ Battlefield | Destination$ Exile | ValidTgts$ Artifact,Enchantment | TgtPrompt$ Select target artifact or enchantment | TargetMin$ 1 | TargetMax$ X | References$ X | SpellDescription$ Exile target artifact or enchantment. If you cast this spell during your main phase, you may exile up to one other target artifact or enchantment.
SVar:X:Count$IfMainPhase.2.1
SVar:X:Count$IfCastInOwnMainPhase.2.1
SVar:Picture:http://www.wizards.com/global/images/magic/general/return_to_dust.jpg
Oracle:Exile target artifact or enchantment. If you cast this spell during your main phase, you may exile up to one other target artifact or enchantment.

View File

@@ -5,7 +5,6 @@ K:Flash
K:Enchant creature
A:SP$ Attach | Cost$ 1 W | ValidTgts$ Creature | AILogic$ Pump
S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddPower$ 1 | AddToughness$ 2 | AddKeyword$ Vigilance | Description$ Enchanted creature gets +1/+2 and has vigilance.
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ TrigPump | PlayerTurn$ True | CheckSVar$ X | SVarCompare$ GE1 | TriggerDescription$ When CARDNAME enters the battlefield, if you cast it during your main phase, enchanted creature gains lifelink until end of turn.
T:Mode$ ChangesZone | ValidCard$ Card.Self+wasCast | Origin$ Any | Destination$ Battlefield | Execute$ TrigPump | PlayerTurn$ True | Phase$ Main1,Main2 | TriggerDescription$ Addendum — When CARDNAME enters the battlefield, if you cast it during your main phase, enchanted creature gains lifelink until end of turn.
SVar:TrigPump:DB$ Pump | Defined$ Enchanted | KW$ Lifelink
SVar:X:Count$IfMainPhase.1.0
Oracle:Flash\nEnchant creature\nEnchanted creature gets +1/+2 and has vigilance.\nAddendum — When Sentinel's Mark enters the battlefield, if you cast it during your main phase, enchanted creature gains lifelink until end of turn.

View File

@@ -2,3 +2,4 @@ Name:Shorecomber Crab
ManaCost:U
Types:Creature Crab
PT:0/4
Oracle:

View File

@@ -2,3 +2,4 @@ Name:Shrine Keeper
ManaCost:1 W
Types:Creature Human Cleric
PT:2/2
Oracle:

View File

@@ -2,6 +2,6 @@ Name:Smothering Tithe
ManaCost:3 W
Types:Enchantment
T:Mode$ Drawn | ValidCard$ Card.OppOwn | TriggerZones$ Battlefield | Execute$ TrigToken | TriggerDescription$ Whenever an opponent draws a card, that player may pay {2}. If the player doesn't, you create a colorless Treasure artifact token with flying{T}, Sacrifice this artifact: Add one mana of any color.
SVar:TrigToken:DB$ Token | TokenAmount$ 1 | TokenScript$ c_a_treasure_sac | TokenOwner$ TriggeredPlayer | LegacyImage$ c treasure
SVar:TrigToken:DB$ Token | TokenAmount$ 1 | UnlessCost$ 2 | UnlessPayer$ TriggeredCardController | TokenScript$ c_a_treasure_sac | TokenOwner$ You | LegacyImage$ c treasure
DeckHas:Ability$Token
Oracle:Whenever an opponent draws a card, that player may pay {2}. If the player doesn't, you create a colorless Treasure artifact token with "{T}, Sacrifice this artifact: Add one mana of any color."

View File

@@ -3,6 +3,6 @@ ManaCost:R
Types:Creature Goblin Warrior
PT:0/2
K:Defender
A:AB$ DealDamage | Cost$ T | NumDmg$ 1 | ValidPlayers$ Player | ValidDescription$ each player. | SpellDescription$ CARDNAME deals 1 damage to each player.
A:AB$ DamageAll | Cost$ T | NumDmg$ 1 | ValidPlayers$ Player | ValidDescription$ each player. | SpellDescription$ CARDNAME deals 1 damage to each player.
SVar:NonCombatPriority:1
Oracle:Defender\n{T}: Spear Spewer deals 1 damage to each player.

View File

@@ -2,6 +2,6 @@ Name:Sphinx's Insight
ManaCost:2 W U
Types:Instant
A:SP$ Draw | Cost$ 2 W U | NumCards$ 2 | SubAbility$ DBLife | StackDescription$ SpellDescription | SpellDescription$ Draw two cards.
SVar:DBLife:DB$ GainLife | LifeAmount$ 2 | ConditionPlayerTurn$ True | ConditionPhases$ Main1,Main2 | SpellDescription$ Addendum - If you cast this spell during your main phase, you gain 2 life.
SVar:DBLife:DB$ GainLife | LifeAmount$ 2 | ConditionPlayerTurn$ True | ConditionPhases$ Main1,Main2 | ConditionDefined$ Self | ConditionPresent$ Card.wasCast | SpellDescription$ Addendum - If you cast this spell during your main phase, you gain 2 life.
DeckHas:Ability$LifeGain
Oracle:Draw two cards.\nAddendum - If you cast this spell during your main phase, you gain 2 life.

View File

@@ -2,6 +2,6 @@ Name:Sulfurous Blast
ManaCost:2 R R
Types:Instant
A:SP$ DamageAll | Cost$ 2 R R | NumDmg$ X | References$ X | ValidCards$ Creature | ValidPlayers$ Player | ValidDescription$ each creature and each player. | SpellDescription$ CARDNAME deals 2 damage to each creature and each player. If you cast this spell during your main phase, CARDNAME deals 3 damage to each creature and each player instead.
SVar:X:Count$IfMainPhase.3.2
SVar:X:Count$IfCastInOwnMainPhase.3.2
SVar:Picture:http://www.wizards.com/global/images/magic/general/sulfurous_blast.jpg
Oracle:Sulfurous Blast deals 2 damage to each creature and each player. If you cast this spell during your main phase, Sulfurous Blast deals 3 damage to each creature and each player instead.

View File

@@ -2,5 +2,5 @@ Name:Summary Judgment
ManaCost:1 W
Types:Instant
A:SP$ DealDamage | Cost$ 1 W | ValidTgts$ Creature.tapped | NumDmg$ X | References$ X | TgtPrompt$ Select target tapped creature | SpellDescription$ CARDNAME deals 3 damage to target tapped creature. If you cast this spell during your main phase, CARDNAME deals 5 damage to that creature instead.
SVar:X:Count$IfMainPhase.5.3
SVar:X:Count$IfCastInOwnMainPhase.5.3
Oracle:Summary Judgment deals 3 damage to target tapped creature.\nAddendum — If you cast this spell during your main phase, it deals 5 damage to that creature instead.

View File

@@ -2,6 +2,6 @@ Name:Swirling Torrent
ManaCost:5 U
Types:Sorcery
A:SP$ Charm | Cost$ 5 U | MinCharmNum$ 1 | CharmNum$ 2 | Choices$ DBSubmerge,DBUnsummon
SVar:DBSubmerge:DB$ ChangeZone | ValidTgts$ Creature | Origin$ Battlefield | Destination$ Library | LibraryPosition$ 0 | SpellDescription$ Put target attacking or blocking creature on top of its owner's library.
SVar:DBUnsummon:DB$ ChangeZone | ValidTgts$ Creature | Origin$ Battlefield | Destination$ Hand
SVar:DBSubmerge:DB$ ChangeZone | ValidTgts$ Creature | TgtPrompt$ Select target creature to put on top of owner's library | Origin$ Battlefield | Destination$ Library | LibraryPosition$ 0 | SpellDescription$ Put target creature on top of its owner's library.
SVar:DBUnsummon:DB$ ChangeZone | ValidTgts$ Creature | TgtPrompt$ Select target creature to return to owner's hand | Origin$ Battlefield | Destination$ Hand | SpellDescription$ Return target creature to its owner's hand.
Oracle:Choose one or both —\n• Put target creature on top of its owner's library.\n• Return target creature to its owner's hand.

View File

@@ -2,3 +2,4 @@ Name:Titanic Pelagosaur
ManaCost:3 U U
Types:Creature Dinosaur
PT:4/6
Oracle:

View File

@@ -2,3 +2,4 @@ Name:Treetop Warden
ManaCost:1 G
Types:Creature Elf Warrior
PT:2/2
Oracle:

View File

@@ -2,6 +2,7 @@ Name:Unbreakable Formation
ManaCost:2 W
Types:Instant
A:SP$ PumpAll | Cost$ 2 W | ValidCards$ Creature.YouCtrl | KW$ Indestructible | SubAbility$ DBAddendum | SpellDescription$ Creatures you control gain indestructible until end of turn.
SVar:DBAddendum:DB$ PumpAll | ValidCards$ Creature.YouCtrl | KW$ Vigilance | ConditionPlayerTurn$ True | ConditionPhases$ Main1,Main2 | SubAbility$ DBPutCounters | SpellDescription$ Addendum — If you cast this spell during your main phase, put a +1/+1 counter on each of those creatures, and they also gain vigilance until end of turn.
SVar:DBPutCounters:DB$ PutCounterAll | ValidCards$ Creature.YouCtrl | ConditionPlayerTurn$ True | ConditionPhases$ Main1,Main2 | CounterType$ P1P1 | CounterNum$ 1
SVar:DBAddendum:DB$ PumpAll | ValidCards$ Creature.YouCtrl | KW$ Vigilance | ConditionPlayerTurn$ True | ConditionPhases$ Main1,Main2 | ConditionDefined$ Self | ConditionPresent$ Card.wasCast | SubAbility$ DBPutCounters | SpellDescription$ Addendum — If you cast this spell during your main phase, put a +1/+1 counter on each of those creatures, and they also gain vigilance until end of turn.
SVar:DBPutCounters:DB$ PutCounterAll | ValidCards$ Creature.YouCtrl | ConditionPlayerTurn$ True | ConditionPhases$ Main1,Main2 | ConditionDefined$ Self | ConditionPresent$ Card.wasCast | CounterType$ P1P1 | CounterNum$ 1
DeckHas:Ability$LifeGain & Ability$Counters
Oracle:Creatures you control gain indestructible until end of turn.\nAddendum — If you cast this spell during your main phase, put a +1/+1 counter on each of those creatures, and they also gain vigilance until end of turn.

View File

@@ -3,5 +3,5 @@ Name:Brawl
Order:101
Type:Casual
Subtype:Commander
Sets:XLN, RIX, DOM, M19, GRN
Sets:XLN, RIX, DOM, M19, GRN, RNA
Banned:Sorcerous Spyglass

View File

@@ -3,5 +3,5 @@ Name:Modern
Order:102
Subtype:Modern
Type:Sanctioned
Sets:8ED, MRD, DST, 5DN, CHK, BOK, SOK, 9ED, RAV, GPT, DIS, CSP, TSP, TSB, PLC, FUT, 10E, LRW, EVE, SHM, MOR, ALA, CFX, ARB, M10, ZEN, WWK, ROE, M11, SOM, MBS, NPH, M12, ISD, DKA, AVR, M13, RTR, GTC, DGM, M14, THS, BNG, JOU, M15, KTK, FRF, DTK, MM2, ORI, BFZ, OGW, SOI, EMN, KLD, AER, AKH, W17, HOU, XLN, RIX, DOM, M19, GRN
Banned:Ancient Den; Birthing Pod; Blazing Shoal; Chrome Mox; Cloudpost; Dark Depths; Deathrite Shaman; Dig Through Time; Dread Return; Eye of Ugin; Gitaxian Probe; Glimpse of Nature; Golgari Grave-Troll; Great Furnace; Green Sun's Zenith; Hypergenesis; Mental Misstep; Ponder; Preordain; Punishing Fire; Rite of Flame; Seat of the Synod; Second Sunrise; Seething Song; Sensei's Divining Top; Skullclamp; Splinter Twin; Stoneforge Mystic; Summer Bloom; Treasure Cruise; Tree of Tales; Umezawa's Jitte; Vault of Whispers
Sets:8ED, MRD, DST, 5DN, CHK, BOK, SOK, 9ED, RAV, GPT, DIS, CSP, TSP, TSB, PLC, FUT, 10E, LRW, EVE, SHM, MOR, ALA, CFX, ARB, M10, ZEN, WWK, ROE, M11, SOM, MBS, NPH, M12, ISD, DKA, AVR, M13, RTR, GTC, DGM, M14, THS, BNG, JOU, M15, KTK, FRF, DTK, MM2, ORI, BFZ, OGW, SOI, EMN, KLD, AER, AKH, W17, HOU, XLN, RIX, DOM, M19, GRN, RNA
Banned:Ancient Den; Birthing Pod; Blazing Shoal; Chrome Mox; Cloudpost; Dark Depths; Deathrite Shaman; Dig Through Time; Dread Return; Eye of Ugin; Gitaxian Probe; Glimpse of Nature; Golgari Grave-Troll; Great Furnace; Green Sun's Zenith; Hypergenesis; Krark-Clan Ironworks; Mental Misstep; Ponder; Preordain; Punishing Fire; Rite of Flame; Seat of the Synod; Second Sunrise; Seething Song; Sensei's Divining Top; Skullclamp; Splinter Twin; Stoneforge Mystic; Summer Bloom; Treasure Cruise; Tree of Tales; Umezawa's Jitte; Vault of Whispers

View File

@@ -4,3 +4,178 @@ splash.loading.examining-cards = Loading cards, examining folder
splash.loading.cards-folders = Loading cards from folders
splash.loading.cards-archive = Loading cards from archive
splash.loading.decks = Loading decks...
# VSubmenuPreferences.java
Preferences = Preferences
btnReset = Reset to Default Settings
btnDeleteMatchUI = Reset Match Layout
btnDeleteEditorUI = Reset Editor Layout
btnDeleteWorkshopUI = Reset Workshop Layout
btnUserProfileUI = Open User Directory
btnContentDirectoryUI = Open Content Directory
btnResetJavaFutureCompatibilityWarnings = Reset Java Compatibility Warnings
cbRemoveSmall = Remove Small Creatures
cbCardBased = Include Card-based Deck Generation
cbSingletons = Singleton Mode
cbRemoveArtifacts = Remove Artifacts
cbAnte = Play for Ante
cbAnteMatchRarity = Match Ante Rarity
cbEnableAICheats = Allow AI Cheating
cbManaBurn = Mana Burn
cbManaLostPrompt = Prompt Mana Pool Emptying
cbDevMode = Developer Mode
cbLoadCardsLazily = Load Card Scripts Lazily
cbLoadHistoricFormats = Load Historic Formats
cbWorkshopSyntax = Workshop Syntax Checker
cbEnforceDeckLegality = Deck Conformance
cbPerformanceMode = Performance Mode
cbFilteredHands = Filtered Hands
cbImageFetcher = Automatically Download Missing Card Art
cbCloneImgSource = Clones Use Original Card Art
cbScaleLarger = Scale Image Larger
cbRenderBlackCardBorders = Render Black Card Borders
cbLargeCardViewers = Use Large Card Viewers
cbSmallDeckViewer = Use Small Deck Viewer
cbDisplayFoil = Display Foil Overlay
cbRandomFoil = Random Foil
cbRandomArtInPools = Randomize Card Art in Generated Card Pools
cbEnableSounds = Enable Sounds
cbEnableMusic = Enable Music
cbAltSoundSystem = Use Alternate Sound System
cbUiForTouchScreen = Enhance UI for Touchscreens
cbTimedTargOverlay = Enable Targeting Overlay Optimization
cbCompactMainMenu = Use Compact Main Sidebar Menu
cbDetailedPaymentDesc = Spell Description in Payment Prompt
cbPromptFreeBlocks = Free Block Handling
cbPauseWhileMinimized = Pause While Minimized
cbCompactPrompt = Compact Prompt
cbEscapeEndsTurn = Use Escape Key to End Turn
cbPreselectPrevAbOrder = Preselect Last Order of Abilities
cbHideReminderText = Hide Reminder Text
cbOpenPacksIndiv = Open Packs Individually
cbTokensInSeparateRow = Display Tokens in a Separate Row
cbStackCreatures = Stack Creatures
cbFilterLandsByColorId = Filter Lands by Color in Activated Abilities
cbShowStormCount = Show Storm Count in Prompt Pane
cbRemindOnPriority = Visually Alert on Receipt of Priority
cbUseSentry = Automatically submit bug reports.
cbpGameLogEntryType = Game Log Verbosity
cbpCloseAction = Close Action
cbpDefaultFontSize = Default Font Size
cbpAiProfiles = AI Personality
cbpDisplayCurrentCardColors = Show Detailed Card Color
cbpAutoYieldMode = Auto-Yield
cbpCounterDisplayType = Counter Display Type
cbpCounterDisplayLocation = Counter Display Location
cbpGraveyardOrdering = Allow Ordering Cards Put in Graveyard
Troubleshooting = Troubleshooting
GeneralConfiguration = General Configuration
nlPlayerName = Sets the name that you will be referred to by Forge during gameplay.
nlCompactMainMenu = Enable for a space efficient sidebar that displays only one menu group at a time (RESTART REQUIRED).
nlUseSentry = When enabled, automatically submits bug reports to developers.
GamePlay = Gameplay
nlpAiProfiles = Choose your AI opponent
nlAnte = Determines whether or not the game is played for ante.
nlAnteMatchRarity = Attempts to make antes the same rarity for all players.
nlEnableAICheats = Allow the AI to cheat to gain advantage (for personalities that have cheat shuffling options set).
nlManaBurn = Play with mana burn (from pre-Magic 2010 rules).
nlManaLostPrompt = When enabled, you get a warning if passing priority would cause you to lose mana in your mana pool.
nlEnforceDeckLegality = Enforces deck legality relevant to each environment (minimum deck sizes, max card count etc).
nlPerformanceMode = Disables additional static abilities checks to speed up the game engine. (Warning: breaks some 'as if had flash' scenarios when casting cards owned by opponents).
nlFilteredHands = Generates two starting hands and keeps the one with the closest to average land count for the deck. (Requires restart)
nlCloneImgSource = When enabled clones will use their original art instead of the cloned card's art.
nlPromptFreeBlocks = When enabled, if you would have to pay 0 to block, pay automatically without prompt.
nlPauseWhileMinimized = When enabled, Forge pauses when minimized (primarily for AI vs AI).
nlEscapeEndsTurn = When enabled, Escape key functions as an alternative shortcut to end the current turn.
nlDetailedPaymentDesc = When enabled, detailed spell/ability descriptions are shown when choosing targets and paying costs.
nlShowStormCount = When enabled, displays the current storm count in the prompt pane.
nlRemindOnPriority = When enabled, flashes the player choice area upon receiving priority.
nlPreselectPrevAbOrder = When enabled, preselects the last defined simultaneous ability order in the ordering dialog.
nlpGraveyardOrdering = Determines when to let the player choose the order of cards simultaneously put in graveyard (never, always, or only when playing with cards for which it matters, for example, Volrath's Shapeshifter).
nlpAutoYieldMode = Defines the granularity level of auto-yields (per unique ability or per unique card).
RandomDeckGeneration = Random Deck Generation
nlRemoveSmall = Disables 1/1 and 0/X creatures in generated decks
nlSingletons = Disables non-land duplicates in generated decks
nlRemoveArtifacts = Disables artifact cards in generated decks
nlCardBased = Builds more synergistic random decks (requires restart)
DeckEditorOptions = Deck Editor Options
nlFilterLandsByColorId = When using card color filters, filter lands in a way to make it easier to find relevant mana producing lands.
AdvancedSettings = Advanced Settings
nlDevMode = Enables menu with functions for testing during development.
nlWorkshopSyntax = Enables syntax checking of card scripts in the Workshop. Note: functionality still in testing phase!
nlGameLogEntryType = Changes how much information is displayed in the game log. Sorted by least to most verbose.
nlCloseAction = Changes what happens when clicking the X button in the upper right.
nlLoadCardsLazily = If turned on, Forge will load card scripts as they're needed instead of at start up. (Warning: Experimental)
nlLoadHistoricFormats = If turned on, Forge will load all historic format definitions, this may take slightly longer to load at startup.
GraphicOptions = Graphic Options
nlDefaultFontSize = The default font size within the UI. All font elements are scaled relative to this. (Needs restart)
nlImageFetcher = Enables live fetching of missing card images from an online resource.
nlDisplayFoil = Displays foil cards with the visual foil overlay effect.
nlRandomFoil = Adds foil effect to random cards.
nlScaleLarger = Allows card pictures to be expanded larger than their original size.
nlRenderBlackCardBorders = Render black borders around card images.
nlLargeCardViewers = Makes all card viewers much larger for use with high resolution images. Will not fit on smaller screens.
nlSmallDeckViewer = Sets the deck viewer window to be 800x600 rather than a proportion of the screen size.
nlRandomArtInPools = Generates cards with random art in generated limited mode card pools.
nlUiForTouchScreen = Increases some UI elements to provide a better experience on touchscreen devices. (Needs restart)
nlCompactPrompt = Hide header and use smaller font in Prompt pane to make it more compact.
nlHideReminderText = Hide reminder text in Card Detail pane.
nlOpenPacksIndiv = When opening Fat Packs and Booster Boxes, booster packs will be opened and displayed one at a time.
nlTokensInSeparateRow = Displays tokens in a separate row on the battlefield below the non-token creatures.
nlStackCreatures = Stacks identical creatures on the battlefield like lands, artifacts, and enchantments.
nlTimedTargOverlay = Enables throttling-based optimization of targeting overlay to reduce CPU use (only disable if you experience choppiness on older hardware, requires starting a new match).
nlCounterDisplayType = Selects the style of the in-game counter display for cards. Text-based is a new tab-like display on the cards. Image-based is the old counter image. Hybrid displays both at once.
nlCounterDisplayLocation = Determines where to position the text-based counters on the card: close to the top or close to the bottom.
nlDisplayCurrentCardColors = Displays the breakdown of the current color of cards in the card detail information panel.
SoundOptions = Sound Options
nlEnableSounds = Enable sound effects during the game
nlEnableMusic = Enable background music during the game
nlAltSoundSystem = Use the alternate sound system (only use if you have issues with sound not playing or disappearing)
KeyboardShortcuts = Keyboard Shortcuts
# VSubmenuAchievements.java
Achievements = Achievements
# VSubmenuDownloaders.java
btnDownloadSetPics = Download LQ Set Pictures
btnDownloadPics = Download LQ Card Pictures
btnDownloadQuestImages = Download Quest Images
btnDownloadAchievementImages = Download Achievement Images
btnReportBug =Report a Bug
btnImportPictures = Import Data
btnHowToPlay = How To Play
btnDownloadPrices = Download Card Prices
btnLicensing = License Details
lblDownloadPics = Download default card picture for each card.
lblDownloadSetPics = Download all pictures of each card (one for each set the card appeared in)
lblDownloadQuestImages = Download tokens and icons used in Quest mode.
lblDownloadAchievementImages = Download achievement images to really make your trophies stand out.
lblDownloadPrices = Download up-to-date price list for in-game card shops.
lblYourVersionOfJavaIsTooOld = Your version of Java is too old to use the content downloaders.
lblPleaseUpdateToTheLatestVersionOfJava = Please update to the latest version of Java
lblYoureRunning = You're running
lblYouNeedAtLeastJavaVersion = You need at least version 1.8.0_101.
lblImportPictures = Import data from a local directory.
lblReportBug = Something broken?
lblHowToPlay = Rules of the Game.
lblLicensing = Forge legal.
ContentDownloaders = Content Downloaders
ReleaseNotes = Release Notes
# CSubmenuPreferences.java
CantChangeDevModeWhileNetworkMath = Can't change DEV_MODE while a network match is in progress!
CompatibilityWarningsReEnabled = Compatibility warnings re-enabled!
AresetForgeSettingsToDefault = This will reset all preferences to their defaults and restart Forge.\n\n Reset and restart Forge?
TresetForgeSettingsToDefault =Reset Settings
AresetDeckEditorLayout =This will reset the Deck Editor screen layout.\n All tabbed views will be restored to their default positions.\n\n Reset layout?
TresetDeckEditorLayout =Reset Deck Editor Layout
OKresetDeckEditorLayout=Deck Editor layout has been reset.
AresetWorkshopLayout = This will reset the Workshop screen layout.\n All tabbed views will be restored to their default positions.\n\n Reset layout?
TresetWorkshopLayout = Reset Workshop Layout
OKresetWorkshopLayout = Workshop layout has been reset.
AresetMatchScreenLayout = This will reset the layout of the Match screen.\n If you want to save the current layout first, please use the Dock tab -> Save Layout option in the Match screen.\n\n Reset layout?
TresetMatchScreenLayout = Reset Match Screen Layout
OKresetMatchScreenLayout = Match Screen layout has been reset.

View File

@@ -0,0 +1,16 @@
[metadata]
Name:Possibility Storm - Ravnica Allegiance #03
URL:http://www.possibilitystorm.com/wp-content/uploads/2019/02/100.-RNA3.jpg
Goal:Win
Turns:1
Difficulty:Mythic
Description:Win this turn. Your solution must satisfy all possible blocking scenarios.
[state]
humanlife=20
ailife=15
turn=1
activeplayer=human
activephase=MAIN1
humanhand=Status // Statue;Grand Warlord Radha;Hero of Precinct One;Gruul Spellbreaker
humanbattlefield=Judith, the Scourge Diva;Novice Knight;Pitiless Pontiff;Teysa Karlov;Elenda, the Dusk Rose;Godless Shrine|NoETBTrigs;Godless Shrine|NoETBTrigs;Stomping Ground|NoETBTrigs;Stomping Ground|NoETBTrigs
aibattlefield=Shalai, Voice of Plenty;Humongulus;Rakdos, the Showstopper

View File

@@ -17,7 +17,7 @@ Icon=Dungeon Crawling Black.jpg
Deck Type=constructed
[Main]
24 Swamp|USG
4 Despondency|ULG
4 Despondency|USG
4 Fog of Gnats|ULG
16 Giant Cockroach|ULG
4 Mana Leech|USG

View File

@@ -1,11 +1,6 @@
Name:Hornet
Name:Ragavan
ManaCost:no cost
Types:Artifact Creature Insect
Colors:colorless
PT:1/1
K:Flying
K:Haste
Oracle:Flying, Haste
| TokenName$ Hornet | TokenTypes$ Artifact,Creature,Insect | TokenOwner$ You | TokenColors$ Colorless | TokenPower$ 1 | TokenToughness$ 1 | TokenKeywords$ Flying<>Haste
Types:Legendary Creature Monkey
Colors:red
PT:2/1
Oracle:

View File

@@ -614,5 +614,10 @@ public class QuestController {
model.currentDeck = s;
}
public DeckConstructionRules getDeckConstructionRules(){return model.deckConstructionRules;}
public DeckConstructionRules getDeckConstructionRules(){
if (model == null) {
return null;
}
return model.deckConstructionRules;
}
}

View File

@@ -5,7 +5,7 @@
<artifactId>forge</artifactId>
<packaging>pom</packaging>
<name>Forge Parent</name>
<version>1.6.21-SNAPSHOT</version>
<version>1.6.22-SNAPSHOT</version>
<description>
Forge lets you play the card game Magic: The Gathering against a computer opponent using all of the rules.