Hide 'increase tax' play actions on multi-card selection

This commit is contained in:
DawnFire42 2026-06-16 16:47:06 -04:00
parent 3fea1246f1
commit c4e8d01064
No known key found for this signature in database
GPG key ID: 24BB855EE2911B33
2 changed files with 7 additions and 2 deletions

View file

@ -165,11 +165,15 @@ CardMenu::CardMenu(PlayerGraphicsItem *_player, const CardItem *_card, bool _sho
if (writeableCard) { if (writeableCard) {
addAction(aPlay); addAction(aPlay);
if (player->getTaxCounterIfActive(CounterIds::CommanderTax)) { // Only offer for single selection: a multi-select would over-count casts by
// bumping one commander's tax counter once per command-zone card.
const bool singleSelection = gameScene->selectedCards().size() <= 1;
if (singleSelection && player->getTaxCounterIfActive(CounterIds::CommanderTax)) {
addAction(aPlayAndIncreaseTax); addAction(aPlayAndIncreaseTax);
} }
if (player->getTaxCounterIfActive(CounterIds::PartnerTax)) { if (singleSelection && player->getTaxCounterIfActive(CounterIds::PartnerTax)) {
addAction(aPlayAndIncreasePartnerTax); addAction(aPlayAndIncreasePartnerTax);
} }

View file

@ -23,6 +23,7 @@
*/ */
namespace CounterIds namespace CounterIds
{ {
// Tax counters store a cast count (times cast from command zone).
constexpr int CommanderTax = 8; ///< Primary commander tax counter constexpr int CommanderTax = 8; ///< Primary commander tax counter
constexpr int PartnerTax = 9; ///< Partner commander tax counter constexpr int PartnerTax = 9; ///< Partner commander tax counter
constexpr int FirstUserId = 10; ///< First ID available for user-created counters constexpr int FirstUserId = 10; ///< First ID available for user-created counters