diff --git a/cockatrice/src/client/settings/shortcuts_settings.h b/cockatrice/src/client/settings/shortcuts_settings.h index 09c7aada8..a3256b939 100644 --- a/cockatrice/src/client/settings/shortcuts_settings.h +++ b/cockatrice/src/client/settings/shortcuts_settings.h @@ -505,8 +505,8 @@ private: parseSequenceString("Alt+U"), ShortcutGroup::Playing_Area)}, {"Player/aDoesntUntapOnce", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Toggle Skip Untapping (One Turn)"), - parseSequenceString(""), - ShortcutGroup::Playing_Area)}, + parseSequenceString(""), + ShortcutGroup::Playing_Area)}, {"Player/aFlip", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Turn Card Over"), parseSequenceString("Alt+F"), ShortcutGroup::Playing_Area)}, diff --git a/cockatrice/src/game/board/card_state.cpp b/cockatrice/src/game/board/card_state.cpp index fda57111c..37fe7036f 100644 --- a/cockatrice/src/game/board/card_state.cpp +++ b/cockatrice/src/game/board/card_state.cpp @@ -91,12 +91,12 @@ void CardState::setDoesntUntap(bool _doesntUntap) void CardState::setDoesntUntapOnce(bool _doesntUntapOnce) { - if (doesntUntapOnce == _doesntUntapOnce) { - return; - } - doesntUntapOnce = _doesntUntapOnce; - emit doesntUntapOnceChanged(_doesntUntapOnce); - emit stateChanged(); + if (doesntUntapOnce == _doesntUntapOnce) { + return; + } + doesntUntapOnce = _doesntUntapOnce; + emit doesntUntapOnceChanged(_doesntUntapOnce); + emit stateChanged(); } void CardState::setDestroyOnZoneChange(bool _destroyOnZoneChange) diff --git a/cockatrice/src/game/player/player_event_handler.cpp b/cockatrice/src/game/player/player_event_handler.cpp index a8f99a857..0191748a8 100644 --- a/cockatrice/src/game/player/player_event_handler.cpp +++ b/cockatrice/src/game/player/player_event_handler.cpp @@ -199,15 +199,16 @@ void PlayerEventHandler::setCardAttrHelper(const GameEventContext &context, switch (attribute) { case AttrTapped: { bool tapped = avalue == "1"; - if (!(!tapped && card->getDoesntUntap() && allCards) && !(!tapped && card->getDoesntUntapOnce() && allCards)) { + if (!(!tapped && card->getDoesntUntap() && allCards) && + !(!tapped && card->getDoesntUntapOnce() && allCards)) { if (!allCards) { emit logSetTapped(player, card, tapped); } bool canAnimate = !options.testFlag(SKIP_TAP_ANIMATION) && !moveCardContext; card->setTapped(tapped, canAnimate); } else if (!tapped && card->getDoesntUntapOnce() && allCards) { - card->setDoesntUntapOnce(false); - } + card->setDoesntUntapOnce(false); + } break; } case AttrAttacking: { diff --git a/cockatrice/src/game_graphics/board/card_item.cpp b/cockatrice/src/game_graphics/board/card_item.cpp index e8c83ebcd..fe5a1cfe5 100644 --- a/cockatrice/src/game_graphics/board/card_item.cpp +++ b/cockatrice/src/game_graphics/board/card_item.cpp @@ -243,7 +243,7 @@ void CardItem::resetState(bool keepAnnotations) attachedCards.clear(); setTapped(false, false); setDoesntUntap(false); - setDoesntUntapOnce(false); + setDoesntUntapOnce(false); if (scene()) { static_cast(scene())->unregisterAnimationItem(this); } diff --git a/cockatrice/src/game_graphics/log/message_log_widget.cpp b/cockatrice/src/game_graphics/log/message_log_widget.cpp index c0b449b4a..b99114def 100644 --- a/cockatrice/src/game_graphics/log/message_log_widget.cpp +++ b/cockatrice/src/game_graphics/log/message_log_widget.cpp @@ -848,7 +848,8 @@ void MessageLogWidget::connectToPlayerEventHandler(PlayerEventHandler *playerEve connect(playerEventHandler, &PlayerEventHandler::logSetCardCounter, this, &MessageLogWidget::logSetCardCounter); connect(playerEventHandler, &PlayerEventHandler::logSetTapped, this, &MessageLogWidget::logSetTapped); connect(playerEventHandler, &PlayerEventHandler::logSetDoesntUntap, this, &MessageLogWidget::logSetDoesntUntap); - connect(playerEventHandler, &PlayerEventHandler::logSetDoesntUntapOnce, this, &MessageLogWidget::logSetDoesntUntapOnce); + connect(playerEventHandler, &PlayerEventHandler::logSetDoesntUntapOnce, this, + &MessageLogWidget::logSetDoesntUntapOnce); connect(playerEventHandler, &PlayerEventHandler::logSetPT, this, &MessageLogWidget::logSetPT); connect(playerEventHandler, &PlayerEventHandler::logSetAnnotation, this, &MessageLogWidget::logSetAnnotation); connect(playerEventHandler, &PlayerEventHandler::logMoveCard, this, &MessageLogWidget::logMoveCard); diff --git a/cockatrice/src/game_graphics/player/menu/card_menu.cpp b/cockatrice/src/game_graphics/player/menu/card_menu.cpp index d332fb296..ed078956d 100644 --- a/cockatrice/src/game_graphics/player/menu/card_menu.cpp +++ b/cockatrice/src/game_graphics/player/menu/card_menu.cpp @@ -73,7 +73,8 @@ CardMenu::CardMenu(PlayerGraphicsItem *_player, const CardItem *_card, bool _sho // Actions using invoke (type dispatch, need selection) aTap = makeAction(this, invoke(cmTap)); aDoesntUntap = makeAction(this, invoke(cmDoesntUntap), /*checkable=*/true, card && card->getDoesntUntap()); - aDoesntUntapOnce = makeAction(this, invoke(cmDoesntUntapOnce), /*checkable=*/true, card && card->getDoesntUntapOnce()); + aDoesntUntapOnce = + makeAction(this, invoke(cmDoesntUntapOnce), /*checkable=*/true, card && card->getDoesntUntapOnce()); aFlip = makeAction(this, invoke(cmFlip)); aPeek = makeAction(this, invoke(cmPeek)); aClone = makeAction(this, invoke(cmClone)); diff --git a/libcockatrice_network/libcockatrice/network/server/remote/game/server_abstract_player.cpp b/libcockatrice_network/libcockatrice/network/server/remote/game/server_abstract_player.cpp index e8edd2ca6..47467f542 100644 --- a/libcockatrice_network/libcockatrice/network/server/remote/game/server_abstract_player.cpp +++ b/libcockatrice_network/libcockatrice/network/server/remote/game/server_abstract_player.cpp @@ -1550,7 +1550,7 @@ Server_AbstractPlayer::cmdRevealCards(const Command_RevealCards &cmd, ResponseCo cardInfo->set_annotation(card->getAnnotation().toStdString()); cardInfo->set_destroy_on_zone_change(card->getDestroyOnZoneChange()); cardInfo->set_doesnt_untap(card->getDoesntUntap()); - cardInfo->set_doesnt_untap_once(card->getDoesntUntapOnce()); + cardInfo->set_doesnt_untap_once(card->getDoesntUntapOnce()); QMapIterator cardCounterIterator(card->getCounters()); while (cardCounterIterator.hasNext()) { diff --git a/libcockatrice_network/libcockatrice/network/server/remote/game/server_card.cpp b/libcockatrice_network/libcockatrice/network/server/remote/game/server_card.cpp index 0dcb4a068..74345a08f 100644 --- a/libcockatrice_network/libcockatrice/network/server/remote/game/server_card.cpp +++ b/libcockatrice_network/libcockatrice/network/server/remote/game/server_card.cpp @@ -31,7 +31,8 @@ Server_Card::Server_Card(const CardRef &cardRef, int _id, int _coord_x, int _coord_y, Server_CardZone *_zone) : zone(_zone), id(_id), coord_x(_coord_x), coord_y(_coord_y), cardRef(cardRef), tapped(false), attacking(false), - facedown(false), destroyOnZoneChange(false), doesntUntap(false), doesntUntapOnce(false), parentCard(0), stashedCard(nullptr) + facedown(false), destroyOnZoneChange(false), doesntUntap(false), doesntUntapOnce(false), parentCard(0), + stashedCard(nullptr) { } @@ -68,7 +69,7 @@ void Server_Card::resetState(bool keepAnnotations) QString Server_Card::setAttribute(CardAttribute attribute, const QString &avalue, bool allCards) { if (attribute == AttrTapped && avalue != "1" && allCards && doesntUntapOnce) { - setDoesntUntapOnce(false); + setDoesntUntapOnce(false); return QVariant(tapped).toString(); }