Adjust to rebase.

Took 28 minutes

Took 7 seconds

Took 2 minutes

Took 8 minutes

Took 13 seconds
This commit is contained in:
Lukas Brübach 2026-06-09 09:26:53 +02:00 • committed by DawnFire42
parent 6ea68c3f58
commit 0b7a323adf
No known key found for this signature in database
GPG key ID: 24BB855EE2911B33
16 changed files with 48 additions and 45 deletions

View file

@ -7,7 +7,6 @@
#include "../../game_graphics/zones/table_zone.h"
#include "../../interface/widgets/tabs/tab_game.h"
#include "../../interface/widgets/utility/get_text_with_max.h"
#include "../zones/view_zone_logic.h"
#include <libcockatrice/card/database/card_database_manager.h>
@ -1635,14 +1634,13 @@ static bool isUnwritableRevealZone(CardZoneLogic *zone)
void PlayerActions::playSelectedCards(QList<CardItem *> selectedCards, const bool faceDown)
{
playSelectedCardsImpl(faceDown, nullptr);
playSelectedCardsImpl(selectedCards, faceDown, nullptr);
}
void PlayerActions::playSelectedCardsImpl(bool faceDown,
void PlayerActions::playSelectedCardsImpl(QList<CardItem *> selectedCards,
bool faceDown,
const std::function<void(CardItem *, const QString &)> &postPlayCallback)
{
QList<CardItem *> selectedCards = player->getGameScene()->selectedCards();
// CardIds will get shuffled downwards when cards leave the deck.
// We need to iterate through the cards in reverse order so cardIds don't get changed out from under us as we play
// out the cards one-by-one.
@ -1660,9 +1658,9 @@ void PlayerActions::playSelectedCardsImpl(bool faceDown,
}
}
void PlayerActions::actPlayAndIncreaseTax()
void PlayerActions::actPlayAndIncreaseTax(QList<CardItem *> selectedCards)
{
playSelectedCardsImpl(false, [this](CardItem * /*card*/, const QString &originalZone) {
playSelectedCardsImpl(selectedCards, false, [this](CardItem * /*card*/, const QString &originalZone) {
if (originalZone == ZoneNames::COMMAND) {
AbstractCounter *ctr = player->getCounterWidget(CounterIds::CommanderTax);
if (ctr && ctr->isActive()) {
@ -1672,9 +1670,9 @@ void PlayerActions::actPlayAndIncreaseTax()
});
}
void PlayerActions::actPlayAndIncreasePartnerTax()
void PlayerActions::actPlayAndIncreasePartnerTax(QList<CardItem *> selectedCards)
{
playSelectedCardsImpl(false, [this](CardItem * /*card*/, const QString &originalZone) {
playSelectedCardsImpl(selectedCards, false, [this](CardItem * /*card*/, const QString &originalZone) {
if (originalZone == ZoneNames::COMMAND) {
AbstractCounter *ctr = player->getCounterWidget(CounterIds::PartnerTax);
if (ctr && ctr->isActive()) {