Code cleanup

- Add missing isCommandZoneCounterBlocked check to cmdSetCounterActive
  - Revert accidental deck view layout change from b4057a86
  - Fix duplicate @param in playSelectedCardsImpl doc
  - Add null check for PlayerLogic in CommandZoneMenu constructor
  - Add index bounds check in CommandZone handleDropEvent
  - Add index bounds check in StackZone handleDropEvent
  - Add ownership comment for tax counter widget creation
  - Add command zone to zoneGraphicsItems map
  - Conditionally show command zone menu item based on server support
  - Remove layer-violating includes from player_logic.cpp
  - Fix tax counter increment (1 per cast, not 2)
  - Add getTaxCounterIfActive() helper to PlayerGraphicsItem
This commit is contained in:
DawnFire42 2026-06-09 15:29:22 -04:00
parent 15c1d47a0b
commit d662b679f7
No known key found for this signature in database
GPG key ID: 24BB855EE2911B33
12 changed files with 43 additions and 28 deletions

View file

@ -1665,7 +1665,7 @@ void PlayerActions::actPlayAndIncreaseTax(QList<CardItem *> selectedCards)
if (originalZone == ZoneNames::COMMAND) {
CounterState *state = player->getCounters().value(CounterIds::CommanderTax, nullptr);
if (state && state->isActive()) {
sendIncCounter(CounterIds::CommanderTax, 2);
sendIncCounter(CounterIds::CommanderTax, 1);
}
}
});
@ -1677,7 +1677,7 @@ void PlayerActions::actPlayAndIncreasePartnerTax(QList<CardItem *> selectedCards
if (originalZone == ZoneNames::COMMAND) {
CounterState *state = player->getCounters().value(CounterIds::PartnerTax, nullptr);
if (state && state->isActive()) {
sendIncCounter(CounterIds::PartnerTax, 2);
sendIncCounter(CounterIds::PartnerTax, 1);
}
}
});
@ -1703,6 +1703,7 @@ void PlayerActions::actModifyTaxCounter(int counterId, int delta)
void PlayerActions::actToggleTaxCounter(int counterId)
{
CounterState *state = player->getCounters().value(counterId, nullptr);
// Prevent disabling a counter with tax accumulated; player must reset to 0 first
if (!state || (state->isActive() && state->getValue() != 0)) {
return;
}