diff --git a/cockatrice/src/game/player/player_actions.cpp b/cockatrice/src/game/player/player_actions.cpp index de909ca5e..107daa139 100644 --- a/cockatrice/src/game/player/player_actions.cpp +++ b/cockatrice/src/game/player/player_actions.cpp @@ -1777,6 +1777,15 @@ void PlayerActions::cardMenuAction(QList selectedCards, CardMenuActi commandList.append(cmd); break; } + case cmDoesntUntapOnce: { + auto *cmd = new Command_SetCardAttr; + cmd->set_zone(card->getZone()->getName().toStdString()); + cmd->set_card_id(card->getId()); + cmd->set_attribute(AttrDoesntUntapOnce); + cmd->set_attr_value(card->getDoesntUntapOnce() ? "0" : "1"); + commandList.append(cmd); + break; + } case cmFlip: { auto *cmd = new Command_FlipCard; cmd->set_zone(card->getZone()->getName().toStdString()); diff --git a/cockatrice/src/game_graphics/board/card_item.cpp b/cockatrice/src/game_graphics/board/card_item.cpp index 78cab4985..b0850627d 100644 --- a/cockatrice/src/game_graphics/board/card_item.cpp +++ b/cockatrice/src/game_graphics/board/card_item.cpp @@ -146,6 +146,20 @@ void CardItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, painter->restore(); } + if (state->getDoesntUntapOnce()) { + painter->save(); + + painter->setRenderHint(QPainter::Antialiasing, false); + + QPen pen; + pen.setColor(Qt::red); + pen.setWidth(0); // Cosmetic pen + painter->setPen(pen); + painter->drawPath(shape()); + + painter->restore(); + } + painter->restore(); } 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 9a1e03e93..0dcb4a068 100644 --- a/libcockatrice_network/libcockatrice/network/server/remote/game/server_card.cpp +++ b/libcockatrice_network/libcockatrice/network/server/remote/game/server_card.cpp @@ -62,6 +62,7 @@ void Server_Card::resetState(bool keepAnnotations) setAnnotation(QString()); } setDoesntUntap(false); + setDoesntUntapOnce(false); } QString Server_Card::setAttribute(CardAttribute attribute, const QString &avalue, bool allCards)