mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 00:54:53 -07:00
Always look at top card (#4238)
* Add option to always look at top card of deck Similar to "always reveal", but reveals card only to the owner, not all players. * Add option to always look at top card of deck Similar to "always reveal", but reveals card only to the owner, not all players. * Update bug_report.md (#4246) * Update bug_report.md * reproduction steps * Update to address review comments * Clangify * set playerId on dumpEvent Co-authored-by: tooomm <tooomm@users.noreply.github.com> Co-authored-by: ebbit1q <ebbit1q@gmail.com> Co-authored-by: Zach H <zahalpern+github@gmail.com>
This commit is contained in:
parent
00ed5c370c
commit
073349fd05
12 changed files with 120 additions and 54 deletions
|
|
@ -152,6 +152,14 @@ void MessageLogWidget::logAlwaysRevealTopCard(Player *player, CardZone *zone, bo
|
|||
.arg(zone->getTranslatedName(true, CaseTopCardsOfZone)));
|
||||
}
|
||||
|
||||
void MessageLogWidget::logAlwaysLookAtTopCard(Player *player, CardZone *zone, bool reveal)
|
||||
{
|
||||
appendHtmlServerMessage((reveal ? tr("%1 can now look at top card %2 at any time.")
|
||||
: tr("%1 no longer can look at top card %2 at any time."))
|
||||
.arg(sanitizeHtml(player->getName()))
|
||||
.arg(zone->getTranslatedName(true, CaseTopCardsOfZone)));
|
||||
}
|
||||
|
||||
void MessageLogWidget::logAttachCard(Player *player, QString cardName, Player *targetPlayer, QString targetCardName)
|
||||
{
|
||||
appendHtmlServerMessage(tr("%1 attaches %2 to %3's %4.")
|
||||
|
|
@ -823,6 +831,8 @@ void MessageLogWidget::connectToPlayer(Player *player)
|
|||
SLOT(logRevealCards(Player *, CardZone *, int, QString, Player *, bool, int)));
|
||||
connect(player, SIGNAL(logAlwaysRevealTopCard(Player *, CardZone *, bool)), this,
|
||||
SLOT(logAlwaysRevealTopCard(Player *, CardZone *, bool)));
|
||||
connect(player, SIGNAL(logAlwaysLookAtTopCard(Player *, CardZone *, bool)), this,
|
||||
SLOT(logAlwaysLookAtTopCard(Player *, CardZone *, bool)));
|
||||
}
|
||||
|
||||
MessageLogWidget::MessageLogWidget(const TabSupervisor *_tabSupervisor,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue