mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -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
|
|
@ -32,7 +32,7 @@ Server_CardZone::Server_CardZone(Server_Player *_player,
|
|||
bool _has_coords,
|
||||
ServerInfo_Zone::ZoneType _type)
|
||||
: player(_player), name(_name), has_coords(_has_coords), type(_type), cardsBeingLookedAt(0),
|
||||
alwaysRevealTopCard(false)
|
||||
alwaysRevealTopCard(false), alwaysLookAtTopCard(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -305,6 +305,7 @@ void Server_CardZone::getInfo(ServerInfo_Zone *info, Server_Player *playerWhosAs
|
|||
info->set_with_coords(has_coords);
|
||||
info->set_card_count(cards.size());
|
||||
info->set_always_reveal_top_card(alwaysRevealTopCard);
|
||||
info->set_always_look_at_top_card(alwaysLookAtTopCard);
|
||||
if ((((playerWhosAsking == player) || omniscient) && (type != ServerInfo_Zone::HiddenZone)) ||
|
||||
((playerWhosAsking != player) && (type == ServerInfo_Zone::PublicZone))) {
|
||||
QListIterator<Server_Card *> cardIterator(cards);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue