mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 16:24:45 -07:00
[Client] Support face-down cards in all public zones (#6602)
* [Server] Support face-down cards in all public zones * add null check * Check using zone names instead * add comment * Rename properties and only pass forceFaceDown * [Game] Refactor CardDragItem faceDown logic * revert refactor * leave face_down unset unless forced * [Client] Support face-down cards in all public zones * leave face_down unset unless forced * log face down * update remaining logs
This commit is contained in:
parent
2fba5dcd20
commit
846ecb7e8d
6 changed files with 55 additions and 15 deletions
|
|
@ -314,9 +314,17 @@ void MessageLogWidget::logMoveCard(Player *player,
|
|||
finalStr = tr("%1 puts %2 into play%3.");
|
||||
}
|
||||
} else if (targetZoneName == GRAVE_ZONE_NAME) {
|
||||
finalStr = tr("%1 puts %2%3 into their graveyard.");
|
||||
if (card->getFaceDown()) {
|
||||
finalStr = tr("%1 puts %2%3 into their graveyard face down.");
|
||||
} else {
|
||||
finalStr = tr("%1 puts %2%3 into their graveyard.");
|
||||
}
|
||||
} else if (targetZoneName == EXILE_ZONE_NAME) {
|
||||
finalStr = tr("%1 exiles %2%3.");
|
||||
if (card->getFaceDown()) {
|
||||
finalStr = tr("%1 exiles %2%3 face down.");
|
||||
} else {
|
||||
finalStr = tr("%1 exiles %2%3.");
|
||||
}
|
||||
} else if (targetZoneName == HAND_ZONE_NAME) {
|
||||
finalStr = tr("%1 moves %2%3 to their hand.");
|
||||
} else if (targetZoneName == DECK_ZONE_NAME) {
|
||||
|
|
@ -335,10 +343,18 @@ void MessageLogWidget::logMoveCard(Player *player,
|
|||
finalStr = tr("%1 moves %2%3 to sideboard.");
|
||||
} else if (targetZoneName == STACK_ZONE_NAME) {
|
||||
soundEngine->playSound("play_card");
|
||||
finalStr = tr("%1 plays %2%3.");
|
||||
if (card->getFaceDown()) {
|
||||
finalStr = tr("%1 plays %2%3 face down.");
|
||||
} else {
|
||||
finalStr = tr("%1 plays %2%3.");
|
||||
}
|
||||
} else {
|
||||
fourthArg = targetZoneName;
|
||||
finalStr = tr("%1 moves %2%3 to custom zone '%4'.");
|
||||
if (card->getFaceDown()) {
|
||||
finalStr = tr("%1 moves %2%3 to custom zone '%4' face down.");
|
||||
} else {
|
||||
finalStr = tr("%1 moves %2%3 to custom zone '%4'.");
|
||||
}
|
||||
}
|
||||
|
||||
QString message = finalStr.arg(sanitizeHtml(player->getPlayerInfo()->getName()), cardStr, nameFrom.second);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue