mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-26 00:23:55 -07:00
Hide 'increase tax' play actions on multi-card selection
This commit is contained in:
parent
3fea1246f1
commit
c4e8d01064
2 changed files with 7 additions and 2 deletions
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue