Commit graph

145 commits

Author SHA1 Message Date
RickyRister
ac543ccb2e Refactor DeckViewContainer (#5830) 2026-02-21 14:18:30 +01:00
RickyRister
aa3c8c0625 Add search filter to card view window (#5791)
* refactor out search syntax help window

* add search bar to ZoneViewWidget

* implement filter logic
2026-02-21 13:01:38 +01:00
RickyRister
7a493910d3 Fix game phases not being translated in game log (#5798) 2026-02-21 13:01:38 +01:00
BruebachL
ebf2602f31 Add main and sub type as filter options, add helper functions to remove or get specific and all filters. (#5820)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-02-21 13:01:38 +01:00
BruebachL
83757f0ea3 Add modelDirty signal, add helper functions to gather all main and sub card types. (#5819)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-02-21 13:01:38 +01:00
RickyRister
d687b01e51 Refactor: move last token info into struct (#5808)
* add override

* refactor token info into struct

* correct default destroy value
2026-02-21 13:01:37 +01:00
RickyRister
16d098517d Use QMessageBox::question for force start confirmation (#5811) 2026-02-21 13:01:37 +01:00
RickyRister
f3ffd54a04 Add confirmation dialog for force start (#5797) 2026-02-21 13:01:37 +01:00
RickyRister
d662152088
Change default log level to info (#5779)
* update qtlogging.ini

* bump some qCDebug to qCInfo and qCWarning
2025-04-03 00:17:10 -04:00
Basile Clement
2fcdb52157
fix: Use isRebalanced to detect Arena cards (#5778)
* fix: Use isRebalanced to detect Arena cards

In #5759 we introduced a setting (off by default) to disable the use of
Arena cards. This was done by checking the `isOnlineOnly` property of
the card, which accidentally also disabled online *printings* of cards
that otherwise exist in paper (e.g. Vintage Masters).

This PR does the same thing but uses the `isRebalanced` property
instead, which is `true` for Arena cards only and should have been used
from the start. This setting does not impact online-only printings such
as Vintage Masters. The settings is still on by default.

* Update setting to mention Alchemy rather than Arena
2025-04-03 00:16:38 -04:00
Zach H
a4b0cddcf8
Revert "Disable CardMenu iff no items selected (#5376)" (#5768)
This reverts commit b4036c8671.
2025-03-23 19:04:24 -04:00
Basile Clement
c71685b261
Add option to disable card rounding (#5760)
* Add option to disable card rounding

* Effing mocks

* format

* Get rid of cardCornerRadius property
2025-03-22 01:07:52 -04:00
Basile Clement
0ae7d01234
Hide arena only cards (#5759)
* Add settings (default: true) to ignore online-only cards

* Use QAbstractButton::toggled

Also, fix dbconverter build

* Mocks mocks mocks

* Update dlg_manage_sets.cpp

* translations

* Update dlg_manage_sets.cpp

---------

Co-authored-by: Zach H <zahalpern+github@gmail.com>
2025-03-22 01:07:42 -04:00
Basile Clement
76fa87c63e
Fix StackZone crash when divideCardSpaceInZone overflows (#5751)
The divideCardSpaceInZone function introduced in #4930 is buggy and
sometimes returns an index that is too large for the current zone, which
causes us to call `cards.at(index)` with an `index` that's bigger than
the amount of cards.

This is the bug that #5609 intended to fix but was improperly diagnosed.
Remove part of #5609 as the cases it is guarding against (e.g. null card
pointer) cannot actually happen.
2025-03-21 00:30:46 +00:00
RickyRister
2e01dfd23a
Remember past entries in "reveal card until X" window (#5755) 2025-03-21 00:29:59 +00:00
Basile Clement
be28d50997
Revert "Use native hover events (#5722)" (#5757)
This reverts commit e4f40a82a2.

This change had unintended consequences in the hover behavior, reverting
for now.
2025-03-21 00:25:20 +00:00
Zach H
48123c8822
Revert "Display visual feedback of where cards will go (#5737)" (#5750)
This reverts commit a7641a571f.
2025-03-19 01:53:35 +00:00
RickyRister
6c19254abd
Fix AttachTo tokens not having card info (#5747) 2025-03-18 22:22:16 +00:00
Basile Clement
a7641a571f
Display visual feedback of where cards will go (#5737)
This is part of the code from #4974, including an improved drag-and-drop
API and its use to display visual feedback of card destination on the
board.

It does not include the improved logic for pushing cards around as I
still need to figure out edge cases there - the logic for choosing where
cards go is not changed, so some of the artifacts described in #4817
and #4975 (particularly around multi-card) are still present.
2025-03-16 23:19:39 +00:00
Basile Clement
2739550087
Use enum for ThemeManager brushes (#5730)
* Use enum for ThemeManager brushes

This patch introduces an enum to distinguish the different brushes that
can be set by the theme (hand, stack, etc.) and generic functions taking
the enum rather than having one copy of each function for each brush.

This is preliminary work before merging StackZone and HandZone to
simplify #4974.

* Include <array> header

* Header spacing
2025-03-16 23:01:25 +00:00
Basile Clement
4ada011632
game: Automatic update of arrow position (#5729)
Currently, zones must keep track of which cards they move in order to
manually call `updatePath` on arrows.

This patch sets the `ItemSendsScenePositionChanges` flag on
`ArrowTarget`s to automatically update arrow positions without requiring
zones to keep track of that information.
2025-03-16 22:58:06 +00:00
Basile Clement
1851f71850
Remove revealedCard flag from CardItem (#5723)
It is no longer used since #5254.
2025-03-15 19:09:14 +00:00
Basile Clement
e4f40a82a2
Use native hover events (#5722)
* Use native hover events

* Update cockatrice/src/game/cards/abstract_card_item.cpp

* Reorder

---------

Co-authored-by: Zach H <zahalpern+github@gmail.com>
2025-03-15 19:07:51 +00:00
RickyRister
4b7d1ebb59
Refactor: split card_database into two files (#5715)
* make the duplicate

* restore original

* Refactor: split card_database into two files
2025-03-14 00:02:10 +00:00
RickyRister
ef15aa2dcd Show correct printing for top card of library 2025-03-09 05:40:03 -07:00
RickyRister
0ecf6298a3
Add actions for shuffle top/bottom X cards (#5695)
* Add actions for shuffle top/bottom X cards

* fix typo

* move shuffle actions into existing menus
2025-03-08 01:48:48 +00:00
RickyRister
1d11bb19b8
Fix view bottom cards using the wrong default (#5696) 2025-03-07 16:17:40 -05:00
RickyRister
58a2b7ff39
Fix move to top of library shuffling an extra card (#5672)
* Fix move to top of library shuffling an extra card

* Update cockatrice/src/game/player/player.cpp

---------

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2025-03-01 13:32:07 +01:00
BruebachL
3620664a9f
Cache correct providerId cards on deck load (#5668)
* Implement new method for DeckList to return cardlist with providerId, a new carddatabase method to fetch a cardlist with name and providerId and changed PictureLoader to use providerId versions of cards for caching.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-02-28 11:10:06 -05:00
RickyRister
4543038fd8
add "open in deck editor" to VDS right-click menu (#5634) 2025-02-25 18:35:56 -05:00
RickyRister
47311b1dfd
Expand/shrink card view window on double click (#5652) 2025-02-25 18:32:45 -05:00
RickyRister
21e22ed5fb
Destroy VDS in game lobby once game starts (#5643)
* push back setting change

* rename method and make it public

* destroy vds on game start
2025-02-25 18:31:44 -05:00
RickyRister
bfaeeb5aea
fix transform from non-table zones not moving card (#5648) 2025-02-25 18:30:38 -05:00
RickyRister
247e1aff83
Also parse "colors" field in xml (#5635) 2025-02-18 20:04:59 +00:00
RickyRister
5c8d1f3cff
Make AttachTo tokens work from non-table zones (#5629)
* move card to play before creating attached token

* leave comment

* hardcode createCard target zone to table

To get attached token from graveyard/exile to work
2025-02-16 17:02:45 -05:00
Zach H
356b00e8c7
Fix Ricky Crash (#5609) 2025-02-12 01:39:41 +00:00
RickyRister
23223e10b5
actually delete VDS when hiding it in game lobby (#5572) 2025-02-07 05:20:42 +00:00
RickyRister
d951b082c4
Add setting to hide visual deck storage in game lobby (#5570) 2025-02-06 13:44:33 +00:00
RickyRister
1ee0e87ba7
remove debug log that was accidentally left in (#5569) 2025-02-06 13:43:37 +00:00
RickyRister
218ed726b6
Fix wrong position and scaling of svg pixmaps when zoomed out (#5563)
* fix scaling for player icon profile pic

* fix scaling for other svgs
2025-02-04 22:22:05 +00:00
RickyRister
1de09deb59
Fix size and image quality issues with new user icons (#5546) 2025-02-02 15:08:23 +00:00
RickyRister
95cea0f191
Add custom server-side pawn colors (#5543) 2025-02-02 03:25:25 +00:00
Zach H
349c18aa6a
Fix Crash with "c:" in deck editor (#5537) 2025-02-01 04:32:01 +00:00
Zach H
b956fd4bac
Fix windows deck searching (#5536) 2025-02-01 04:13:46 +00:00
Zach H
37a0c00b3f
Support right-click on game list menu (#5522) 2025-01-25 14:03:29 +00:00
Zach H
f6c31bf901
Invert "Show" games, so all games are visible by default (#5521) 2025-01-25 07:03:36 +00:00
RickyRister
e8b1e3ef0c
don't autoclose card view if single card gets dragged into same zone (#5517)
* rename canResize param to toNewZone

* pass toNewZone down

* don't autoclose card view if card gets dragged into same zone
2025-01-25 02:08:28 +00:00
RickyRister
085f0dd26c
reduce unnecessary CardItem creation in ViewZone addCard process (#5513) 2025-01-24 05:13:08 +00:00
RickyRister
66e2e7a473
add missing override and explicit specifiers to all classes in src/game (#5511) 2025-01-22 12:57:56 +00:00
RickyRister
420cca2402
fix after merge to use ZoneView::close (#5509) 2025-01-20 22:43:05 -05:00