Commit Graph

2391 Commits

Author SHA1 Message Date
leriomaggio
1a7288815c Updated resetTable to reuse the code in setEditorMode and to update the DeckSection Dropdown
This FIXES a bug causing the Deck Editor to not properly restore its state after saving a Deck and not originally in Main Decksection.
This commit also avoids repeating code and reset tables only if necessary.
2021-10-24 16:17:05 +02:00
leriomaggio
2d40d0135c Added support for new Dungeon DeckSection in Constructed Editor (w/ i18n) 2021-10-23 22:14:15 +02:00
leriomaggio
0343da977c Removed FIXME and added note 2021-10-23 21:48:35 +02:00
leriomaggio
9f97b34a3a Recognise new Dungeon DeckSection Placeholder, and improved support to .dec files
.Dec files have collector nr//art-index as separated by a Pipe.
RegExps with collector numbers have been extended to further support decks in this format (with simply copy & paste the listing).
Tests updated/added to verify the new regexp & behaviour.
2021-10-23 21:45:04 +02:00
Anthony Calosa
c1a56f95d2 Update funny cards
collector number that starts with "F" denotes funny, to filter funny cards from legal sets and exclude them in the card audit
2021-10-23 17:12:02 +08:00
Anthony Calosa
0d194ba645 [Desktop] Update card audit
- only display the missing cards and not implemented cards.
2021-10-23 13:36:00 +08:00
paul_snoops
c409e907c2 Exclude "funny" cards from audit 2021-10-22 12:59:41 +01:00
Anthony Calosa
165a564caf unused imports 2021-10-21 15:45:30 +08:00
tool4EvEr
43019b3881 Add some more modern resolution choices 2021-10-20 22:27:36 +02:00
leriomaggio
87439388db Improved support for Unknown cards in DeckImport
DeckImport now avoids including non-deck and metadata info in decklist as UnknownText, whilst any line that looks like a card request (i.e. includes a card quantity in the beginning) is interpreted as Unknown card.

This seems a good compromise with showing typo and any mispelling in card list whilst avoiding flooding decklist with unnecessary info.
2021-10-20 10:47:44 +02:00
Michael Kamensky
48f894b1ae - Fix shared params lines. 2021-10-20 07:09:00 +03:00
leriomaggio
a67da59564 Unknown/Unrecognised text is not muted anymore and displayed as unknown card.
Added new entry in language files (ITA already translated too)
2021-10-20 00:48:02 +02:00
Michael Kamensky
445d655dd3 - Consolidate shared parameters in a variable. 2021-10-19 19:35:35 +03:00
Michael Kamensky
33566c037c Merge branch 'gauntletfix' into 'master'
Fix some more NPE related to gauntlets

See merge request core-developers/forge!5583
2021-10-18 16:27:26 +00:00
TRT
5b72d1f682 Fix some more NPE related to gauntlets 2021-10-18 15:26:09 +02:00
friarsol
399ea54088 Disable in-game uploader for now 2021-10-17 17:40:24 -04:00
tool4EvEr
fd9ee82b53 Fix NPE when starting Quick Gauntlet with no deck selected 2021-10-16 22:52:28 +02:00
Michael Kamensky
67b4e31a5a - Fix compile and tests 2021-10-16 21:15:09 +03:00
Michael Kamensky
6b94871b78 - A Linux script that tries to detect the Java version and run the game in a way specific to the given version. Seems to work with OpenJDK. 2021-10-16 18:29:18 +03:00
leriomaggio
700e4f1d8e Merge remote-tracking branch 'upstream/master' into deck-importer-decks-file-format 2021-10-16 08:58:49 +01:00
Anthony Calosa
d364896f98 show indicator when needed 2021-10-16 12:11:38 +08:00
leriomaggio
9590db52b8 included "Special" in Card Rarity examples in Instructions
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
2021-10-16 00:44:49 +01:00
leriomaggio
ccf556f01b Setting accept button label properly
New Deck is set when current deck is empty

Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
2021-10-15 20:33:45 +01:00
leriomaggio
d056d2a683 Added "Special" placeholder for card rarity
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
2021-10-15 19:40:02 +01:00
leriomaggio
30a7c6aed4 Adding support for Dual/Double-sided cards in parsing + patch for commander export from Deckstats
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
2021-10-15 19:33:13 +01:00
leriomaggio
f56cf00a6f Adding DB tests for dual and double cards
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
2021-10-15 19:32:28 +01:00
leriomaggio
80268e95fd Merge remote-tracking branch 'upstream/master' into deck-importer-decks-file-format 2021-10-15 19:15:38 +01:00
Hans Mackowiak
997e566af0 Resolve "Daybound & Nightbound" 2021-10-15 13:20:36 +00:00
leriomaggio
e91277f271 Merge remote-tracking branch 'upstream/master' into deck-importer-decks-file-format 2021-10-15 13:39:00 +01:00
leriomaggio
f35164c0d6 Full updates with latest translations and Token types
This commit introduces major refactoring to code of Deck Import to extend support to all DeckRecognizer.Token types, as well as better-organised methods for message and status display. On this note, the CSS has been updated, along with decklist HTML which now leverages on HTML-table to display tokens and status messages separately and all well-aligned.
Card Preview has been also refined, with proper CSS classes and messages.
Finally, the HTML_WELCOME_TEXT now reflects the latest changes in translation file (e.g. included an additional example, and extra paragraph in Options)

Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
2021-10-15 13:15:18 +01:00
tool4EvEr
3b86f4f0c2 Fix NPE with Mount Velus Manticore 2021-10-14 13:26:31 +02:00
leriomaggio
1718ca9020 Added full support to card preview with foil and correct updates
Now all cards displayed in cardpreview panel will automatically adapt to any change in the decklist.
That is, the panel will be reset only if current-displayed card is not in decklist anymore. In all other cases, the preview will adjust depending on the new token status, and/or whether the card is/was foiled!

Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
2021-10-10 09:10:19 +01:00
leriomaggio
44cfc76552 Added support for Foiled cards in Token Key (w. tests)
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
2021-10-10 08:24:47 +01:00
leriomaggio
89daddd643 New method to retrieve displayed item.
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
2021-10-10 00:01:33 +01:00
leriomaggio
e9aa12bc46 Extensive code refactoring, updates with new token types, and new support for allowed deck sections
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
2021-10-08 16:46:33 +01:00
leriomaggio
9f04f0cec7 Improved Token Mana Symbol Regexp with support for two colours tokens (and symbols)
All corresponding tests have been extended, and improved to cover the new supported Mana Tokens

Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
2021-10-08 13:45:31 +01:00
leriomaggio
fd776a3ae9 Updated Stats Panel to be normal instances, as panel didn't get updated with singletons.
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
2021-10-06 20:34:08 +01:00
leriomaggio
835b05e573 Added support for corner case to match correct section accounting for unsupported sections.
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
2021-10-06 20:13:25 +01:00
leriomaggio
c5ac93a12e Heavy refactoring of DeckRecognizer to introduce cardList parsing, allowed sections, and revised TokenTypes
This commit includes a substantial change//integration into main body of DeckRecognizer API.
First off, the types of tokens emitted by recognised as now increased, leaving place to newly specialised WARNING messages, as well as tokens for cards in invalid set or sections. Moreover, a new token for UNSUPPORTED_DECK_SECTION has been introduced, which works in pair with the new extra addition of allowed Deck sections.
This new list of allowed sections is also used whenever a new DeckSection token is created (constructor) so that if the section is not currently supported, an UNSUPPORTED_DECK_SECTION token is emitted instead.

Similarly, the card recognition step has been updated so that now deck validation mechanism has been integrated at the token level. In other words, everytime each card token is now matched to the most correct section, regardless of what's been specified in card list.

Last but not least, DeckRecognizer now includes the method to parse the whole card list (and not just a single line) to better encapsulate all the logics.
Added control to include Banned and Restricted cards, as well as a newly regExp to specify Mana colour tokens using MANA symbols placeholders (e.g. {G} for green).

Tests for new features have been added and internal documentation improved, and old ones updated with new tokens and APIs.

Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
2021-10-06 17:07:29 +01:00
leriomaggio
65001478b7 Heavy refactoring of DeckRecognizer to introduce cardList parsing, allowed sections, and revised TokenTypes
This commit includes a substantial change//integration into main body of DeckRecognizer API.
First off, the types of tokens emitted by recognised as now increased, leaving place to newly specialised WARNING messages, as well as tokens for cards in invalid set or sections. Moreover, a new token for UNSUPPORTED_DECK_SECTION has been introduced, which works in pair with the new extra addition of allowed Deck sections.
This new list of allowed sections is also used whenever a new DeckSection token is created (constructor) so that if the section is not currently supported, an UNSUPPORTED_DECK_SECTION token is emitted instead.

Similarly, the card recognition step has been updated so that now deck validation mechanism has been integrated at the token level. In other words, everytime each card token is now matched to the most correct section, regardless of what's been specified in card list.

Last but not least, DeckRecognizer now includes the method to parse the whole card list (and not just a single line) to better encapsulate all the logics.
Added control to include Banned and Restricted cards, as well as a newly regExp to specify Mana colour tokens using MANA symbols placeholders (e.g. {G} for green).

Tests for new features have been added and internal documentation improved, and old ones updated with new tokens and APIs.

Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
2021-10-06 16:43:24 +01:00
leriomaggio
2e1777265d Specialised Stats for Commander decks
Stats panel now includes card count also for commander deck section (instead of total) for commander (sub)type game format // editor.

Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
2021-10-06 15:54:00 +01:00
leriomaggio
73e5e5095d Setting constants for Localiser Mock so return value is testable
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
2021-10-06 15:52:35 +01:00
TRT
68f3879f11 Fix Quicken + Suspend 2021-10-04 14:05:13 +02:00
leriomaggio
88ec398e8c Changed API to make isSectionImportable public rather than protected
This is to allow DeckImport to get all the supported DeckSections in current editor, without relying on using the content of the cbxSection dropdown UI component.

Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
2021-10-02 08:27:27 +01:00
leriomaggio
f065d460c3 Updated Parameter cast to pass in DeckImport Constructor
DeckImport will now get an instance of the CDeckEditor rather than the more generic ACEditorBase.
This is to allow more refined access to methods. Also, all lives in forge-gui-desktop, therefore there should be no conflict with mobile app ui.

Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
2021-10-02 08:25:47 +01:00
Michael Kamensky
bb421ea2e6 Merge branch 'gray_text' into 'master'
Gray text preference

See merge request core-developers/forge!5485
2021-10-01 17:09:36 +00:00
tool4EvEr
781de0fd5a Clean up 2021-10-01 16:28:03 +02:00
Northmoc
0d13edd84e clean up a few things 2021-09-30 22:13:19 -04:00
Northmoc
b3a7a8aecf add the pref to different rules sets 2021-09-30 21:59:45 -04:00
Northmoc
36a8c93bc8 setting up the pref 2021-09-30 12:21:52 -04:00