mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Merge branch 'master' of https://git.cardforge.org/core-developers/forge
This commit is contained in:
@@ -1874,7 +1874,7 @@ public class GameAction {
|
|||||||
// Assumes that the list of players is in APNAP order, which should be the case
|
// Assumes that the list of players is in APNAP order, which should be the case
|
||||||
// Optional here as well to handle the way that mulligans do the choice
|
// Optional here as well to handle the way that mulligans do the choice
|
||||||
// 701.17. Scry
|
// 701.17. Scry
|
||||||
// 701.17a To “scry N” means to look at the top N cards of your library, then put any number of them
|
// 701.17a To "scry N" means to look at the top N cards of your library, then put any number of them
|
||||||
// on the bottom of your library in any order and the rest on top of your library in any order.
|
// on the bottom of your library in any order and the rest on top of your library in any order.
|
||||||
// 701.17b If a player is instructed to scry 0, no scry event occurs. Abilities that trigger whenever a
|
// 701.17b If a player is instructed to scry 0, no scry event occurs. Abilities that trigger whenever a
|
||||||
// player scries won’t trigger.
|
// player scries won’t trigger.
|
||||||
|
|||||||
@@ -113,7 +113,8 @@ public class TriggerChangesZone extends Trigger {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// if it is a die trigger, and the hostcard is the moved one, but it doesn't has the trigger
|
// if it is a die trigger, and the hostcard is the moved one, but it doesn't has the trigger
|
||||||
if (leavesBattlefield && moved.equals(getHostCard()) && !moved.hasTrigger(this)) {
|
// only for non-static
|
||||||
|
if (!isStatic() && leavesBattlefield && moved.equals(getHostCard()) && !moved.hasTrigger(this)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -735,7 +735,7 @@ public class TriggerHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (kw.startsWith("Dieharmonicon")) {
|
} else if (kw.startsWith("Dieharmonicon")) {
|
||||||
// 700.4. The term dies means “is put into a graveyard from the battlefield.”
|
// 700.4. The term dies means "is put into a graveyard from the battlefield."
|
||||||
if (runParams.get("Origin") instanceof String) {
|
if (runParams.get("Origin") instanceof String) {
|
||||||
final String origin = (String) runParams.get("Origin");
|
final String origin = (String) runParams.get("Origin");
|
||||||
if ("Battlefield".equals(origin) && runParams.get("Destination") instanceof String) {
|
if ("Battlefield".equals(origin) && runParams.get("Destination") instanceof String) {
|
||||||
@@ -765,7 +765,7 @@ public class TriggerHandler {
|
|||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
} else if (kw.startsWith("Dieharmonicon")) {
|
} else if (kw.startsWith("Dieharmonicon")) {
|
||||||
// 700.4. The term dies means “is put into a graveyard from the battlefield.”
|
// 700.4. The term dies means "is put into a graveyard from the battlefield."
|
||||||
final String valid = kw.split(":")[1];
|
final String valid = kw.split(":")[1];
|
||||||
if (!table.filterCards(ImmutableList.of(ZoneType.Battlefield), ZoneType.Graveyard,
|
if (!table.filterCards(ImmutableList.of(ZoneType.Battlefield), ZoneType.Graveyard,
|
||||||
valid, ck, null).isEmpty()) {
|
valid, ck, null).isEmpty()) {
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ public class PlayerPanel extends FPanel {
|
|||||||
this.add(avatarLabel, "spany 2, width 80px, height 80px");
|
this.add(avatarLabel, "spany 2, width 80px, height 80px");
|
||||||
|
|
||||||
createNameEditor();
|
createNameEditor();
|
||||||
this.add(lobby.newLabel("Name:"), "w 40px, h 30px, gaptop 5px");
|
this.add(lobby.newLabel(localizer.getMessage("lblName") +":"), "w 40px, h 30px, gaptop 5px");
|
||||||
this.add(txtPlayerName, "h 30px, pushx, growx");
|
this.add(txtPlayerName, "h 30px, pushx, growx");
|
||||||
|
|
||||||
nameRandomiser = createNameRandomizer();
|
nameRandomiser = createNameRandomizer();
|
||||||
@@ -138,7 +138,7 @@ public class PlayerPanel extends FPanel {
|
|||||||
this.add(radioHuman, "gapright 5px");
|
this.add(radioHuman, "gapright 5px");
|
||||||
this.add(radioAi, "wrap");
|
this.add(radioAi, "wrap");
|
||||||
|
|
||||||
this.add(lobby.newLabel("Team:"), "w 40px, h 30px");
|
this.add(lobby.newLabel(localizer.getMessage("lblTeam") + ":"), "w 40px, h 30px");
|
||||||
populateTeamsComboBoxes();
|
populateTeamsComboBoxes();
|
||||||
|
|
||||||
// Set these before action listeners are added
|
// Set these before action listeners are added
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import forge.toolbox.FLabel;
|
|||||||
import forge.toolbox.FScrollPane;
|
import forge.toolbox.FScrollPane;
|
||||||
import forge.toolbox.FSkin;
|
import forge.toolbox.FSkin;
|
||||||
import forge.toolbox.FSkin.SkinImage;
|
import forge.toolbox.FSkin.SkinImage;
|
||||||
|
import forge.util.Localizer;
|
||||||
import forge.view.FDialog;
|
import forge.view.FDialog;
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
@@ -23,7 +24,9 @@ public class AvatarSelector extends FDialog {
|
|||||||
private final Map<Integer, SkinImage> avatarMap = FSkin.getAvatars();
|
private final Map<Integer, SkinImage> avatarMap = FSkin.getAvatars();
|
||||||
|
|
||||||
public AvatarSelector(final String playerName, final int currentIndex, final Collection<Integer> usedIndices) {
|
public AvatarSelector(final String playerName, final int currentIndex, final Collection<Integer> usedIndices) {
|
||||||
this.setTitle("Select avatar for " + playerName);
|
final Localizer localizer = Localizer.getInstance();
|
||||||
|
String s = localizer.getMessage("lblSelectAvatarFor");
|
||||||
|
this.setTitle(s.replace("%s",playerName));
|
||||||
|
|
||||||
final JPanel pnlAvatarPics = new JPanel(new WrapLayout());
|
final JPanel pnlAvatarPics = new JPanel(new WrapLayout());
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import forge.menus.MenuUtil;
|
|||||||
import forge.model.FModel;
|
import forge.model.FModel;
|
||||||
import forge.properties.ForgePreferences;
|
import forge.properties.ForgePreferences;
|
||||||
import forge.properties.ForgePreferences.FPref;
|
import forge.properties.ForgePreferences.FPref;
|
||||||
|
import forge.util.Localizer;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
|
||||||
@@ -21,7 +22,8 @@ public final class ConstructedGameMenu {
|
|||||||
private static ForgePreferences prefs = FModel.getPreferences();
|
private static ForgePreferences prefs = FModel.getPreferences();
|
||||||
|
|
||||||
public static JMenu getMenu() {
|
public static JMenu getMenu() {
|
||||||
JMenu menu = new JMenu("Game");
|
final Localizer localizer = Localizer.getInstance();
|
||||||
|
JMenu menu = new JMenu(localizer.getMessage("lblGame"));
|
||||||
menu.setMnemonic(KeyEvent.VK_G);
|
menu.setMnemonic(KeyEvent.VK_G);
|
||||||
menu.add(getMenuItem_SingletonMode());
|
menu.add(getMenuItem_SingletonMode());
|
||||||
menu.add(getMenuItem_ArtifactsMode());
|
menu.add(getMenuItem_ArtifactsMode());
|
||||||
@@ -30,8 +32,9 @@ public final class ConstructedGameMenu {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static JMenuItem getMenuItem_SmallCreaturesMode() {
|
private static JMenuItem getMenuItem_SmallCreaturesMode() {
|
||||||
JCheckBoxMenuItem menu = new JCheckBoxMenuItem("Remove Small Creatures");
|
final Localizer localizer = Localizer.getInstance();
|
||||||
MenuUtil.setMenuHint(menu, "Remove 1/1 and 0/X creatures in generated decks.");
|
JCheckBoxMenuItem menu = new JCheckBoxMenuItem(localizer.getMessage("cbRemoveSmall"));
|
||||||
|
MenuUtil.setMenuHint(menu, localizer.getMessage("lblRemoveSmallCreatures"));
|
||||||
menu.setState(prefs.getPrefBoolean(FPref.DECKGEN_NOSMALL));
|
menu.setState(prefs.getPrefBoolean(FPref.DECKGEN_NOSMALL));
|
||||||
menu.addActionListener(new ActionListener() {
|
menu.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -51,8 +54,9 @@ public final class ConstructedGameMenu {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static JMenuItem getMenuItem_ArtifactsMode() {
|
private static JMenuItem getMenuItem_ArtifactsMode() {
|
||||||
JCheckBoxMenuItem menu = new JCheckBoxMenuItem("Remove Artifacts");
|
final Localizer localizer = Localizer.getInstance();
|
||||||
MenuUtil.setMenuHint(menu, "Remove artifact cards in generated decks.");
|
JCheckBoxMenuItem menu = new JCheckBoxMenuItem(localizer.getMessage("cbRemoveArtifacts"));
|
||||||
|
MenuUtil.setMenuHint(menu, localizer.getMessage("lblRemoveArtifacts"));
|
||||||
menu.setState(prefs.getPrefBoolean(FPref.DECKGEN_ARTIFACTS));
|
menu.setState(prefs.getPrefBoolean(FPref.DECKGEN_ARTIFACTS));
|
||||||
menu.addActionListener(new ActionListener() {
|
menu.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -73,8 +77,9 @@ public final class ConstructedGameMenu {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static JMenuItem getMenuItem_SingletonMode() {
|
private static JMenuItem getMenuItem_SingletonMode() {
|
||||||
JCheckBoxMenuItem menu = new JCheckBoxMenuItem("Singleton Mode");
|
final Localizer localizer = Localizer.getInstance();
|
||||||
MenuUtil.setMenuHint(menu, "Prevent non-land duplicates in generated decks.");
|
JCheckBoxMenuItem menu = new JCheckBoxMenuItem(localizer.getMessage("cbSingletons"));
|
||||||
|
MenuUtil.setMenuHint(menu, localizer.getMessage("PreventNonLandDuplicates"));
|
||||||
menu.setState(prefs.getPrefBoolean(FPref.DECKGEN_SINGLETONS));
|
menu.setState(prefs.getPrefBoolean(FPref.DECKGEN_SINGLETONS));
|
||||||
menu.addActionListener(new ActionListener() {
|
menu.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -431,7 +431,7 @@ public enum CSubmenuPreferences implements ICDoc {
|
|||||||
private void setPlayerNameButtonText() {
|
private void setPlayerNameButtonText() {
|
||||||
final FLabel btn = view.getBtnPlayerName();
|
final FLabel btn = view.getBtnPlayerName();
|
||||||
final String name = prefs.getPref(FPref.PLAYER_NAME);
|
final String name = prefs.getPref(FPref.PLAYER_NAME);
|
||||||
btn.setText(StringUtils.isBlank(name) ? "Human" : name);
|
btn.setText(StringUtils.isBlank(name) ? localizer.getMessage("lblHuman") : name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
|
|||||||
@@ -37,6 +37,8 @@ import forge.toolbox.FSkin;
|
|||||||
import forge.toolbox.FSkin.SkinColor;
|
import forge.toolbox.FSkin.SkinColor;
|
||||||
import forge.toolbox.FSkin.SkinnedLabel;
|
import forge.toolbox.FSkin.SkinnedLabel;
|
||||||
import forge.util.ReflectionUtil;
|
import forge.util.ReflectionUtil;
|
||||||
|
import forge.util.Localizer;
|
||||||
|
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public class FNavigationBar extends FTitleBarBase {
|
public class FNavigationBar extends FTitleBarBase {
|
||||||
@@ -71,15 +73,16 @@ public class FNavigationBar extends FTitleBarBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void updateBtnCloseTooltip() {
|
public void updateBtnCloseTooltip() {
|
||||||
|
final Localizer localizer = Localizer.getInstance();
|
||||||
switch (Singletons.getControl().getCloseAction()) {
|
switch (Singletons.getControl().getCloseAction()) {
|
||||||
case NONE:
|
case NONE:
|
||||||
btnClose.setToolTipText("Close");
|
btnClose.setToolTipText(localizer.getMessage("lblClose"));
|
||||||
break;
|
break;
|
||||||
case CLOSE_SCREEN:
|
case CLOSE_SCREEN:
|
||||||
btnClose.setToolTipText(this.selectedTab.screen.getCloseButtonTooltip());
|
btnClose.setToolTipText(this.selectedTab.screen.getCloseButtonTooltip());
|
||||||
break;
|
break;
|
||||||
case EXIT_FORGE:
|
case EXIT_FORGE:
|
||||||
btnClose.setToolTipText("Exit Forge");
|
btnClose.setToolTipText(localizer.getMessage("lblExitForge"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
language.name = English (US)
|
language.name = English (US)
|
||||||
|
#SplashScreen.java
|
||||||
splash.loading.examining-cards = Loading cards, examining folder
|
splash.loading.examining-cards = Loading cards, examining folder
|
||||||
splash.loading.cards-folders = Loading cards from folders
|
splash.loading.cards-folders = Loading cards from folders
|
||||||
splash.loading.cards-archive = Loading cards from archive
|
splash.loading.cards-archive = Loading cards from archive
|
||||||
@@ -242,4 +243,14 @@ lblOff=Off
|
|||||||
lblCardMouseOver=Card Mouseover
|
lblCardMouseOver=Card Mouseover
|
||||||
lblAlwaysOn=Always On
|
lblAlwaysOn=Always On
|
||||||
lblAutoYields=Auto-Yields
|
lblAutoYields=Auto-Yields
|
||||||
lblDeckList = Deck List
|
lblDeckList = Deck List
|
||||||
|
lblClose=Close
|
||||||
|
lblExitForge=Exit Forge
|
||||||
|
#ConstructedGameMenu.java
|
||||||
|
lblSelectAvatarFor=Select avatar for %s
|
||||||
|
lblRemoveSmallCreatures=Remove 1/1 and 0/X creatures in generated decks.
|
||||||
|
lblRemoveArtifacts=Remove artifact cards in generated decks.
|
||||||
|
PreventNonLandDuplicates=Prevent non-land duplicates in generated decks.
|
||||||
|
#PlayerPanel.java
|
||||||
|
lblName=Name
|
||||||
|
lblTeam=Team
|
||||||
Reference in New Issue
Block a user