mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
AlwaysRevealTopCard done, issue #31 fixed
This commit is contained in:
parent
840b577f42
commit
c835a827b0
6 changed files with 20 additions and 5 deletions
|
|
@ -1297,12 +1297,19 @@ void Player::eventRevealCards(const Event_RevealCards &event)
|
|||
emit logRevealCards(this, zone, cardList.at(i)->id(), cardName, this, true);
|
||||
}
|
||||
} else {
|
||||
if (!cardList.isEmpty())
|
||||
bool showZoneView = true;
|
||||
QString cardName;
|
||||
if (cardList.size() == 1) {
|
||||
cardName = QString::fromStdString(cardList.first()->name());
|
||||
if ((event.card_id() == 0) && dynamic_cast<PileZone *>(zone)) {
|
||||
zone->getCards().first()->setName(cardName);
|
||||
zone->update();
|
||||
showZoneView = false;
|
||||
}
|
||||
}
|
||||
if (showZoneView && !cardList.isEmpty())
|
||||
static_cast<GameScene *>(scene())->addRevealedZoneView(this, zone, cardList, event.grant_write_access());
|
||||
|
||||
QString cardName;
|
||||
if (cardList.size() == 1)
|
||||
cardName = QString::fromStdString(cardList.first()->name());
|
||||
emit logRevealCards(this, zone, event.card_id(), cardName, otherPlayer, false);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue