Added hint when drawing 0 cards (#4697)

* Logging a player drawing 0 cards will now result in the message "player had no cards left to draw."

* Added hint when drawing when deck is empty

* Added hint when drawing when deck is empty

* Added hint when drawing when deck is empty

* Update cockatrice/src/messagelogwidget.cpp

update log message to present tense

Co-authored-by: ebbit1q <ebbit1q@gmail.com>

* added deckIsEmpty parameter to messagelogwidget::logDrawCards

* run format

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
This commit is contained in:
Tobyclark 2022-10-29 06:46:29 -07:00 committed by GitHub
parent b99bd0176a
commit 8e4ddf366c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 8 deletions

View file

@ -2216,7 +2216,7 @@ void Player::eventDrawCards(const Event_DrawCards &event)
hand->reorganizeCards();
deck->reorganizeCards();
emit logDrawCards(this, event.number());
emit logDrawCards(this, event.number(), deck->getCards().size() == 0);
}
void Player::eventRevealCards(const Event_RevealCards &event)