* Fix#6659: Correct logging for bottom-of-library card moves
Cause:
- This issue happens due to logic of moving the card from the top of the
deck being reused when moving from the bottom of the deck, in a way
that makes it impossible to check if the card came from the bottom.
Resolution:
- Updated the logging logic in the client for card moves.
- Added a gRPC parameter ('is_from_bottom') for card moves.
- Updates the server logic to reverse the order of the card move if the
'is_from_bottom' parameter is true.
- Added a test to show the expected behaviour of the fix.
NOTE: While the changes in this patch seem big, this is due to changing
the loop in the moveCard function to a helper function, in order to make
the bug fix change. The only change to the loop was to pass a
variable attribution to the moveCard function because it was redundant
to be in the loop.
* chore: run format on test
* refactor: new way to check if a move is from the bottom of the deck
* refactor: change isFromBottom check to static function
* update comments
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
---------
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
* Change button colors to be palette aware.
Took 13 minutes
Took 41 seconds
Took 15 seconds
* Change button style.
Took 24 minutes
Took 4 seconds
---------
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
* [DeckAnalytics] Add a checkbox to include/exclude sideboard for calculation
Took 15 minutes
* default to false, actually
Took 2 minutes
---------
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
* Add -R option in Windows NSIS script
Took 23 minutes
* Small fix.
Took 3 minutes
---------
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
the adventure side of adventure cards used to be the first entry in
mtgjson, at some point this changed to the second entry, better
reflecting its secondary nature, however cockatrice has hardcoded the
treatment of the card to assume the second part was the "main" part,
when implementing the treatment of prepare layout cards (#6792) I
copied the behavior over which was then already incorrect, this pr
removes the special treatment of this card layout bringing the result
back in line with expectation: the main part of the card provides the
main type used in cockatrice for sorting and behavior
Don't double emit cardClicked and also pass along the mouseEvent so we can check if it's a left or right click.
Took 26 minutes
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
* add ccache eviction for files older than 7 days
also clean up some of the scripts to be more internally consistent
* move name build into the docker container again
* remove one extra empty line [skip ci]
* allow canceling concurrent builds on master for both desktop and docker
* add ccache eviction age to macos as well
* Use fusions own palette.
Took 6 minutes
* Start from default palette always.
Took 4 minutes
* Add modern style.
Took 24 seconds
* Scope this fix to Windows.
Took 4 minutes
---------
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
* Properly reset default theme.
Took 9 minutes
* Descend in preference on windows.
Took 9 minutes
* Also reset style for custom themes.
Took 3 minutes
* Try things
Took 9 minutes
* Add modern windows style.
Took 8 minutes
* Update theme_manager.cpp
---------
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
* feat: enable expressions in card counters
* fix includes
* fix multiple selection
* cleanup useless conversions
* const ref where possible
* do not use const, be consistent with local patterns in the file
Reorganize card context menus across table, stack, and graveyard/exile zones for better consistency: promote Draw Arrow and Clone actions, move related card entries to the bottom, add Play/Play Face Down to the stack menu, and flatten if/else blocks with early returns. Also fix playCard() ignoring the faceDown flag when routing instants/sorceries from the stack, which sent them to the graveyard instead of the table.
Adds a Table option to the Move menu, allowing cards to be moved directly to the battlefield from any zone. Extracts the repeated tableRow-to-grid-Y conversion logic into TableZone::tableRowToGridY(), consolidating five call sites and fixing a latent bug where cards with tableRow > 2 could land on the wrong row.