mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-14 09:48:02 +00:00
Merge remote-tracking branch 'origin/master' into code-cleanup
This commit is contained in:
12
.github/workflows/remove-stale-branches.yml
vendored
Normal file
12
.github/workflows/remove-stale-branches.yml
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 0 * * *" # Everday at midnight
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
remove-stale-branches:
|
||||||
|
name: Remove Stale Branches
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: fpicalausa/remove-stale-branches@v1.6.0
|
||||||
|
with:
|
||||||
|
dry-run: true # Check out the console output before setting this to false
|
||||||
@@ -8,9 +8,6 @@ on:
|
|||||||
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
|
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
|
||||||
required: false
|
required: false
|
||||||
default: false
|
default: false
|
||||||
schedule:
|
|
||||||
# * is a special character in YAML so you have to quote this string
|
|
||||||
- cron: '30 18 * * *'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|||||||
@@ -631,6 +631,11 @@ public class CountersPutAi extends CountersAi {
|
|||||||
return false; // only if next turn and cost is reusable
|
return false; // only if next turn and cost is reusable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Useless since the card already has the keyword (or for another reason)
|
||||||
|
if (ComputerUtil.isUselessCounter(CounterType.get(type), cards.get(0))) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean immediately = ComputerUtil.playImmediately(ai, sa);
|
boolean immediately = ComputerUtil.playImmediately(ai, sa);
|
||||||
|
|||||||
@@ -86,10 +86,7 @@ public class CCombat implements ICDoc {
|
|||||||
else
|
else
|
||||||
display.append(Lang.getInstance().getPossesive(controller.getName())).append(" ");
|
display.append(Lang.getInstance().getPossesive(controller.getName())).append(" ");
|
||||||
}
|
}
|
||||||
if (controller == null)
|
display.append(defender).append(" is attacked by:\n");
|
||||||
display.append(" is attacked by:\n");
|
|
||||||
else
|
|
||||||
display.append(defender).append(" is attacked by:\n");
|
|
||||||
|
|
||||||
// Associate Bands, Attackers Blockers
|
// Associate Bands, Attackers Blockers
|
||||||
boolean previousBand = false;
|
boolean previousBand = false;
|
||||||
|
|||||||
@@ -173,6 +173,7 @@ public class AdventureDeckEditor extends TabPageScreen<AdventureDeckEditor> {
|
|||||||
super(ItemManagerConfig.ADVENTURE_EDITOR_POOL, Forge.getLocalizer().getMessage("lblInventory"), CATALOG_ICON);
|
super(ItemManagerConfig.ADVENTURE_EDITOR_POOL, Forge.getLocalizer().getMessage("lblInventory"), CATALOG_ICON);
|
||||||
cardManager.setBtnAdvancedSearchOptions(true);
|
cardManager.setBtnAdvancedSearchOptions(true);
|
||||||
cardManager.setCatalogDisplay(true);
|
cardManager.setCatalogDisplay(true);
|
||||||
|
cardManager.setShowNFSWatermark(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -176,6 +176,7 @@ public class FSkin {
|
|||||||
Forge.getAssets().loadTexture(getSkinFile("hd_logo.png"));
|
Forge.getAssets().loadTexture(getSkinFile("hd_logo.png"));
|
||||||
Forge.getAssets().loadTexture(getDefaultSkinFile("adv_logo.png"), new TextureLoader.TextureParameter());
|
Forge.getAssets().loadTexture(getDefaultSkinFile("adv_logo.png"), new TextureLoader.TextureParameter());
|
||||||
Forge.getAssets().loadTexture(getDefaultSkinFile("cover.png"));
|
Forge.getAssets().loadTexture(getDefaultSkinFile("cover.png"));
|
||||||
|
Forge.getAssets().loadTexture(getDefaultSkinFile("nfs.png"));
|
||||||
Forge.getAssets().loadTexture(getDefaultSkinFile("overlay_alpha.png"));
|
Forge.getAssets().loadTexture(getDefaultSkinFile("overlay_alpha.png"));
|
||||||
Forge.getAssets().loadTexture(getDefaultSkinFile("spiral.png"));
|
Forge.getAssets().loadTexture(getDefaultSkinFile("spiral.png"));
|
||||||
Forge.getAssets().loadTexture(getDefaultSkinFile("splatter.png"));
|
Forge.getAssets().loadTexture(getDefaultSkinFile("splatter.png"));
|
||||||
|
|||||||
@@ -284,18 +284,21 @@ public class FDeckEditor extends TabPageScreen<FDeckEditor> {
|
|||||||
private final FLabel btnMoreOptions = deckHeader.add(new FLabel.Builder().text("...").font(FSkinFont.get(20)).align(Align.center).pressedColor(Header.getBtnPressedColor()).build());
|
private final FLabel btnMoreOptions = deckHeader.add(new FLabel.Builder().text("...").font(FSkinFont.get(20)).align(Align.center).pressedColor(Header.getBtnPressedColor()).build());
|
||||||
|
|
||||||
public FDeckEditor(EditorType editorType0, DeckProxy editDeck, boolean showMainDeck) {
|
public FDeckEditor(EditorType editorType0, DeckProxy editDeck, boolean showMainDeck) {
|
||||||
this(editorType0, editDeck.getName(), editDeck.getPath(), null, showMainDeck,null);
|
this(editorType0, editDeck.getName(), editDeck.getPath(), null, showMainDeck, null);
|
||||||
}
|
}
|
||||||
public FDeckEditor(EditorType editorType0, String editDeckName, boolean showMainDeck,FEventHandler backButton) {
|
public FDeckEditor(EditorType editorType0, DeckProxy editDeck, boolean showMainDeck, FEventHandler backButton) {
|
||||||
this(editorType0, editDeckName, "", null, showMainDeck,backButton);
|
this(editorType0, editDeck.getName(), editDeck.getPath(), null, showMainDeck, backButton);
|
||||||
|
}
|
||||||
|
public FDeckEditor(EditorType editorType0, String editDeckName, boolean showMainDeck, FEventHandler backButton) {
|
||||||
|
this(editorType0, editDeckName, "", null, showMainDeck, backButton);
|
||||||
}
|
}
|
||||||
public FDeckEditor(EditorType editorType0, String editDeckName, boolean showMainDeck) {
|
public FDeckEditor(EditorType editorType0, String editDeckName, boolean showMainDeck) {
|
||||||
this(editorType0, editDeckName, "", null, showMainDeck,null);
|
this(editorType0, editDeckName, "", null, showMainDeck, null);
|
||||||
}
|
}
|
||||||
public FDeckEditor(EditorType editorType0, Deck newDeck, boolean showMainDeck) {
|
public FDeckEditor(EditorType editorType0, Deck newDeck, boolean showMainDeck) {
|
||||||
this(editorType0, "", "", newDeck, showMainDeck,null);
|
this(editorType0, "", "", newDeck, showMainDeck, null);
|
||||||
}
|
}
|
||||||
private FDeckEditor(EditorType editorType0, String editDeckName, String editDeckPath, Deck newDeck, boolean showMainDeck,FEventHandler backButton) {
|
private FDeckEditor(EditorType editorType0, String editDeckName, String editDeckPath, Deck newDeck, boolean showMainDeck, FEventHandler backButton) {
|
||||||
super(backButton, getPages(editorType0));
|
super(backButton, getPages(editorType0));
|
||||||
|
|
||||||
editorType = editorType0;
|
editorType = editorType0;
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ public abstract class ItemManager<T extends InventoryItem> extends FContainer im
|
|||||||
private boolean hideFilters = false;
|
private boolean hideFilters = false;
|
||||||
private boolean wantUnique = false;
|
private boolean wantUnique = false;
|
||||||
private boolean showRanking = false;
|
private boolean showRanking = false;
|
||||||
|
private boolean showNFSWatermark = false;
|
||||||
private boolean multiSelectMode = false;
|
private boolean multiSelectMode = false;
|
||||||
private FEventHandler selectionChangedHandler, itemActivateHandler;
|
private FEventHandler selectionChangedHandler, itemActivateHandler;
|
||||||
private ContextMenuBuilder<T> contextMenuBuilder;
|
private ContextMenuBuilder<T> contextMenuBuilder;
|
||||||
@@ -910,6 +911,10 @@ public abstract class ItemManager<T extends InventoryItem> extends FContainer im
|
|||||||
return showRanking;
|
return showRanking;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean showNFSWatermark() {
|
||||||
|
return showNFSWatermark;
|
||||||
|
}
|
||||||
|
|
||||||
public void setWantUnique(boolean unique) {
|
public void setWantUnique(boolean unique) {
|
||||||
wantUnique = unique;
|
wantUnique = unique;
|
||||||
}
|
}
|
||||||
@@ -918,6 +923,10 @@ public abstract class ItemManager<T extends InventoryItem> extends FContainer im
|
|||||||
showRanking = showRanking0;
|
showRanking = showRanking0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setShowNFSWatermark(boolean val) {
|
||||||
|
showNFSWatermark = val;
|
||||||
|
}
|
||||||
|
|
||||||
public void setSelectionSupport(int minSelections0, int maxSelections0) {
|
public void setSelectionSupport(int minSelections0, int maxSelections0) {
|
||||||
for (ItemView<T> view : views) {
|
for (ItemView<T> view : views) {
|
||||||
view.setSelectionSupport(minSelections0, maxSelections0);
|
view.setSelectionSupport(minSelections0, maxSelections0);
|
||||||
|
|||||||
@@ -1127,8 +1127,12 @@ public class ImageView<T extends InventoryItem> extends ItemView<T> {
|
|||||||
cardPrice = ((ShopScene) Forge.getCurrentScene()).getCardPrice((PaperCard) item);
|
cardPrice = ((ShopScene) Forge.getCurrentScene()).getCardPrice((PaperCard) item);
|
||||||
drawCardLabel(g, "$" + cardPrice, Color.GOLD, x, y ,w ,h);
|
drawCardLabel(g, "$" + cardPrice, Color.GOLD, x, y ,w ,h);
|
||||||
} else {
|
} else {
|
||||||
if (((PaperCard) item).isNoSell()) {
|
if (((PaperCard) item).isNoSell() && itemManager.showNFSWatermark()) {
|
||||||
drawCardLabel(g, Forge.getLocalizer().getMessage("lblNoSell"), Color.RED, x, y, w, h);
|
Texture nfs = Forge.getAssets().getTexture(getDefaultSkinFile("nfs.png"), false);
|
||||||
|
if (nfs != null)
|
||||||
|
g.drawImage(nfs, x, y, w, h);
|
||||||
|
else
|
||||||
|
drawCardLabel(g, Forge.getLocalizer().getMessage("lblNoSell"), Color.RED, x, y, w, h);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1164,7 +1168,7 @@ public class ImageView<T extends InventoryItem> extends ItemView<T> {
|
|||||||
//g.drawImage(tr, x + (w - w * scale) / 2, y + (h - h * scale) / 1.5f, w * scale, h * scale);
|
//g.drawImage(tr, x + (w - w * scale) / 2, y + (h - h * scale) / 1.5f, w * scale, h * scale);
|
||||||
}
|
}
|
||||||
//draw plastic effect overlay.
|
//draw plastic effect overlay.
|
||||||
g.drawImage(Forge.getAssets().getTexture(getDefaultSkinFile("cover.png")), x + (w - w * scale) / 2, y + (h - h * scale) / 1.5f, w * scale, h * scale);
|
g.drawImage(Forge.getAssets().getTexture(getDefaultSkinFile("cover.png"), false), x + (w - w * scale) / 2, y + (h - h * scale) / 1.5f, w * scale, h * scale);
|
||||||
}
|
}
|
||||||
//fake labelname shadow
|
//fake labelname shadow
|
||||||
g.drawText(item.getName(), GROUP_HEADER_FONT, Color.BLACK, (x + PADDING) - 1f, (y + PADDING * 2) + 1f, w - 2 * PADDING, h - 2 * PADDING, true, Align.center, false);
|
g.drawText(item.getName(), GROUP_HEADER_FONT, Color.BLACK, (x + PADDING) - 1f, (y + PADDING * 2) + 1f, w - 2 * PADDING, h - 2 * PADDING, true, Align.center, false);
|
||||||
@@ -1192,7 +1196,7 @@ public class ImageView<T extends InventoryItem> extends ItemView<T> {
|
|||||||
//temporary fill image
|
//temporary fill image
|
||||||
g.fillRect(Color.BLACK, x + (w - w * scale) / 2, y + (h - h * scale) / 1.5f, w * scale, h * scale);
|
g.fillRect(Color.BLACK, x + (w - w * scale) / 2, y + (h - h * scale) / 1.5f, w * scale, h * scale);
|
||||||
//draw plastic effect overlay.
|
//draw plastic effect overlay.
|
||||||
g.drawImage(Forge.getAssets().getTexture(getDefaultSkinFile("cover.png")), x + (w - w * scale) / 2, y + (h - h * scale) / 1.5f, w * scale, h * scale);
|
g.drawImage(Forge.getAssets().getTexture(getDefaultSkinFile("cover.png"), false), x + (w - w * scale) / 2, y + (h - h * scale) / 1.5f, w * scale, h * scale);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,8 +48,7 @@ public class NewSealedScreen extends LaunchScreen {
|
|||||||
|
|
||||||
FThreads.invokeInEdtLater(() -> {
|
FThreads.invokeInEdtLater(() -> {
|
||||||
DeckPreferences.setSealedDeck(sealed.getName());
|
DeckPreferences.setSealedDeck(sealed.getName());
|
||||||
Forge.openScreen(new FDeckEditor(EditorType.Sealed, sealed.getName(), false));
|
Forge.openScreen(new FDeckEditor(EditorType.Sealed, sealed.getName(), false, e -> Forge.openScreen(new LoadSealedScreen(), false)));
|
||||||
Forge.setBackScreen(new LoadSealedScreen(), false); //ensure pressing back goes to load sealed screen
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,5 +66,6 @@ ScryfallCode=PMEI
|
|||||||
62 R Raiyuu, Storm's Edge @Heonhwa Choe
|
62 R Raiyuu, Storm's Edge @Heonhwa Choe
|
||||||
63 R Snuff Out @Mike Ploog
|
63 R Snuff Out @Mike Ploog
|
||||||
66 R Saryth, the Viper's Fang @Igor Kieryluk
|
66 R Saryth, the Viper's Fang @Igor Kieryluk
|
||||||
|
67 R Gush @Kev Walker
|
||||||
211 R Park Heights Pegasus @Randy Gallegos
|
211 R Park Heights Pegasus @Randy Gallegos
|
||||||
232 R Liesa, Forgotten Archangel @Dmitry Burmak
|
232 R Liesa, Forgotten Archangel @Dmitry Burmak
|
||||||
|
|||||||
@@ -796,6 +796,12 @@ F798 M Discord, Lord of Disharmony @Narendra Bintara Adi
|
|||||||
827 R Norin the Wary @Jarel Threat
|
827 R Norin the Wary @Jarel Threat
|
||||||
827b R Norin the Wary @Jarel Threat
|
827b R Norin the Wary @Jarel Threat
|
||||||
828 R Keen Duelist @Thanh Tuấn
|
828 R Keen Duelist @Thanh Tuấn
|
||||||
|
863 R Masterwork of Ingenuity @David Álvarez
|
||||||
|
864 R Sculpting Steel @Javier Charro
|
||||||
|
865 R Unnatural Growth @Justine Cruz
|
||||||
|
866 R Regrowth @Xabi Gaztelua
|
||||||
|
867 R Nature's Lore @Nicholas Elias
|
||||||
|
870 R Abundant Growth @Ryan Yee
|
||||||
871 R Soul-Guide Lantern @Tyler Walpole
|
871 R Soul-Guide Lantern @Tyler Walpole
|
||||||
872 R Yargle and Multani @Warren Mahy
|
872 R Yargle and Multani @Warren Mahy
|
||||||
873 R Dark Deal @Tyler Jacobson
|
873 R Dark Deal @Tyler Jacobson
|
||||||
|
|||||||
BIN
forge-gui/res/skins/default/nfs.png
Normal file
BIN
forge-gui/res/skins/default/nfs.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
Reference in New Issue
Block a user