Commit graph

6190 commits

Author SHA1 Message Date
DawnFire42
4354191918
Generalize tax counters to 5 sequential slots with server-enforced ordering 2026-08-10 20:04:51 -04:00
DawnFire42
876a14758e
Connect tax counter state signals to menu 2026-08-10 19:35:59 -04:00
DawnFire42
314b56d176
Use ID checks instead of name checks for tax counter validation in player actions 2026-08-10 19:27:03 -04:00
DawnFire42
4d972f4df5
Create command zone conditionally based on game setting 2026-08-10 18:53:40 -04:00
DawnFire42
cf9a4e9a02
Remove explicit z-value from command zone like other zones 2026-08-10 18:33:34 -04:00
DawnFire42
1c82d972ae
Add test for missing tax counter to pin evaluateModifyCounter check ordering + test comment cleanup 2026-08-10 18:33:33 -04:00
DawnFire42
9121064709
Extract evaluateCreateCounter helper to directly test reserved-name guard in cmdCreateCounter 2026-08-10 18:33:33 -04:00
DawnFire42
1f5df5b0e1
Remove unnecessary View command zone action 2026-08-10 18:33:33 -04:00
DawnFire42
4aa430abd0
Option to remove commander tax disappear when partner tax in use 2026-08-10 18:33:32 -04:00
DawnFire42
1e2c7737d0
Remove explicit ArrowCursor from CommanderTaxCounter for consistent UX 2026-08-10 18:33:32 -04:00
DawnFire42
c8ed9835bd
extract getOverlayColor() to AbstractCounter for shared fill+hover styling and Use server-provided color and radius for tax counters 2026-08-10 18:33:31 -04:00
DawnFire42
eeae205f51
Removed unintended stack zone minimum clamping 2026-08-10 18:33:31 -04:00
DawnFire42
529a1f94c4
Remove redundant rearrangeCounters call from rearrangeZones to eliminate re-entrancy 2026-08-10 18:33:31 -04:00
DawnFire42
36c4c5aa51
Parent MoveMenu to CardMenu to fix memory leak on menu rebuild 2026-08-10 18:33:30 -04:00
DawnFire42
e881c3f437
Replace direct emit of PlayerLogic signal with requestRearrangeCounters slot call 2026-08-10 18:33:30 -04:00
DawnFire42
7b135fe10c
Add active guard to counter mousePressEvent 2026-08-10 18:33:29 -04:00
DawnFire42
e889e2dff5
Route tax counters by reserved ID instead of name to mirror other counters and avoid issues 2026-08-10 18:33:29 -04:00
DawnFire42
b688405af3
Removed unnecessary check to prevent cards from moving to the same position 2026-08-10 18:33:29 -04:00
DawnFire42
f28ceca1de
Unified fix to allow cards to be dropped correctly in vertical stacked zones without requiring cross-zone special case 2026-08-10 18:33:28 -04:00
DawnFire42
bb2afaadd1
Command zone fixed arrow from owner of the zone 2026-08-10 18:33:28 -04:00
DawnFire42
d0df70e68f
Fix stale documentation and align doc comments with CONTRIBUTING guidelines 2026-08-10 18:33:27 -04:00
DawnFire42
1ba839ca20
Add command zone visibility and filtering to game lobby 2026-08-10 18:33:27 -04:00
DawnFire42
127d8a5f5a
convert commandzone theme assets to JPG like the other zones 2026-08-10 18:32:35 -04:00
DawnFire42
7f4abbdee0
Use guarded qFuzzyCompare idiom in CommandZone to match StackZone 2026-08-10 18:32:35 -04:00
DawnFire42
0c32e275c5
Remove redundant pre-checks from cmdIncCounter and cmdSetCounter so evaluateModifyCounter is the single authorization decision point 2026-08-10 18:32:35 -04:00
DawnFire42
3f2bac9b57
Add name validation to tax counter actions to guard against ID collision with old servers 2026-08-10 18:32:34 -04:00
DawnFire42
08ec0cc5ee
Remove inactive counters submenus from the player counters menu 2026-08-10 18:32:34 -04:00
DawnFire42
d1c73e2ee5
Updated doc comment 2026-08-10 18:32:33 -04:00
DawnFire42
0df638f231
adjust to rebase 2026-08-10 18:32:33 -04:00
DawnFire42
02f1a2091c
Move command zone checkbox to its own row in game creation dialog 2026-08-10 18:32:33 -04:00
DawnFire42
7a092677c7
Optimize setMinimumHeight to skip geometry updates when effective height unchanged 2026-08-10 18:32:32 -04:00
DawnFire42
d42b7c8003
Fix command zone tax counter position after counter re-sync 2026-08-10 18:32:32 -04:00
DawnFire42
aed13a242d
Gate commander tax increment on server-accepted move 2026-08-10 18:32:31 -04:00
DawnFire42
577d4f257e
Add tests for CounterNames::isTaxCounter reserved-name guard 2026-08-10 18:32:31 -04:00
DawnFire42
e4d50cf731
Fix use-after-free in CommandZone teardown by disconnecting signals before member destruction 2026-08-10 18:32:31 -04:00
DawnFire42
e447542957
Add test case to pin tax counter ID boundary 2026-08-10 18:32:30 -04:00
DawnFire42
e84d2fb3a1
added missing shortcut registration 2026-08-10 18:32:30 -04:00
DawnFire42
31b157009c
removed stale include 2026-08-10 18:32:29 -04:00
DawnFire42
bfc6c8ce71
cleaned up comments from tests 2026-08-10 18:32:29 -04:00
DawnFire42
c56cbd2b52
Added command zone test 2026-08-10 18:32:29 -04:00
DawnFire42
be50bf0234
comment fix 2026-08-10 18:32:28 -04:00
DawnFire42
5d2f9eb68f
Added shortcuts registration with empty default 2026-08-10 18:32:28 -04:00
DawnFire42
ae5d8d37c3
rebase fix 2026-08-10 18:32:28 -04:00
DawnFire42
209306440e
Wire command zone menu, harden counter command handling, and expand tests
- Connect aMoveToCommandZone to cmMoveToCommandZone; the menu item was
    added, shown, and shortcut-bound but never wired, so it did nothing
  - Extract evaluateModifyCounter() and route cmdIncCounter/cmdSetCounter
    through it, replacing isCommandZoneCounterBlocked; reject inc/set on
    an inactive tax counter so a hidden counter cannot accumulate value
  - Reject reserved tax counter names in cmdCreateCounter to prevent a
    client from spoofing a system tax counter via a user-created counter
  - Route AbstractCounter::valueChanged through the virtual setValue() so
    CommanderTaxCounter clamps and refreshes its tooltip on value changes
  - Deduplicate actPlayAndIncreaseTax/actPlayAndIncreasePartnerTax into a
    single playAndIncreaseTax(counterId) helper
  - Move MINIMUM_STACKING_HEIGHT from CommandZone to the PlayerGraphicsItem
    layout code, its only consumer
  - Remove unused AbstractCounter forward declaration from player_logic.h
  - Add EvaluateModifyCounter tests and PartnerTax cases for
    evaluateSetCounterActive
  - Pin the FirstUserId floor in new_counter_id_test using ids 3 and 5 so
    a naive "highest id + 1" regression fails the test
2026-08-10 18:32:27 -04:00
DawnFire42
6fcce28258
fix clamping 2026-08-10 18:32:27 -04:00
DawnFire42
0117047a18
Sync command zone visibility on construction and reflow stack on height change
- Sync command zone visibility in the PlayerGraphicsItem constructor in case processPlayerInfo runs before the signal is connected.
    - Emit CommandZone::effectiveHeightChanged() when a minimized zone's height changes so the stack zone repositions.
2026-08-10 18:32:26 -04:00
DawnFire42
68a5953c4f
Hide 'increase tax' play actions on multi-card selection 2026-08-10 18:32:26 -04:00
DawnFire42
f0f255f4d6
Reconcile tax counter visibility ownership and harden tax log formatting
- Make AbstractCounter::setActive() the sole owner of counter visibility; document the contract.
  - Drop the redundant setVisible() from CommandZone::rearrangeTaxCounters(); it now only lays out by isActive().
  - Format tax log lines with a single atomic 4-arg arg() instead of mixing string and int overloads.
2026-08-10 18:32:26 -04:00
DawnFire42
6746d97a51
Prefix shadowed CounterState constructor args with underscores 2026-08-10 18:32:25 -04:00
DawnFire42
ff1c93ccc5
Extract counter command authorization into testable helpers
Pull the pure guard logic out of cmdDelCounter and cmdSetCounterActive
  into static evaluateDelCounter/evaluateSetCounterActive methods, leaving
  the handlers as thin shells over the decision. Add command_zone_tests
  covering every authorization branch of both evaluators.
2026-08-10 18:32:25 -04:00