Check if card has no PT set yet if dropped on table. (#6137)

* Check if card has no PT set yet if dropped on table.

Took 22 minutes

* Use isEmpty() for comparison.

Took 6 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
BruebachL 2025-09-14 12:38:17 +02:00 committed by GitHub
parent 4e57868037
commit 4de5274996
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -15,7 +15,7 @@ TableZoneLogic::TableZoneLogic(Player *_player,
void TableZoneLogic::addCardImpl(CardItem *card, int _x, int _y)
{
cards.append(card);
if (!card->getFaceDown()) {
if (!card->getFaceDown() && card->getPT().isEmpty()) {
card->setPT(card->getCardInfo().getPowTough());
}
card->setGridPoint(QPoint(_x, _y));