mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-27 00:53:55 -07:00
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:
parent
4e57868037
commit
4de5274996
1 changed files with 1 additions and 1 deletions
|
|
@ -15,7 +15,7 @@ TableZoneLogic::TableZoneLogic(Player *_player,
|
||||||
void TableZoneLogic::addCardImpl(CardItem *card, int _x, int _y)
|
void TableZoneLogic::addCardImpl(CardItem *card, int _x, int _y)
|
||||||
{
|
{
|
||||||
cards.append(card);
|
cards.append(card);
|
||||||
if (!card->getFaceDown()) {
|
if (!card->getFaceDown() && card->getPT().isEmpty()) {
|
||||||
card->setPT(card->getCardInfo().getPowTough());
|
card->setPT(card->getCardInfo().getPowTough());
|
||||||
}
|
}
|
||||||
card->setGridPoint(QPoint(_x, _y));
|
card->setGridPoint(QPoint(_x, _y));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue