From 7116382a96c080f0812022a9697860a2bbf84f25 Mon Sep 17 00:00:00 2001 From: Max-Wilhelm Bruker Date: Thu, 27 Jan 2011 17:49:31 +0100 Subject: [PATCH] added 'undo last draw' feature. protocol version bump (12) --- cockatrice/src/abstractcounter.cpp | 4 +- cockatrice/src/messagelogwidget.cpp | 9 + cockatrice/src/messagelogwidget.h | 1 + cockatrice/src/player.cpp | 59 ++- cockatrice/src/player.h | 6 +- cockatrice/src/window_main.cpp | 5 +- cockatrice/translations/cockatrice_de.ts | 350 ++++++++-------- cockatrice/translations/cockatrice_en.ts | 352 ++++++++-------- cockatrice/translations/cockatrice_es.ts | 348 ++++++++-------- cockatrice/translations/cockatrice_fr.ts | 346 +++++++++------- cockatrice/translations/cockatrice_ja.ts | 342 +++++++++------- cockatrice/translations/cockatrice_pt-br.ts | 344 +++++++++------- cockatrice/translations/cockatrice_pt.ts | 346 +++++++++------- cockatrice/translations/cockatrice_ru.ts | 428 +++++++++++--------- common/protocol.cpp | 12 +- common/protocol.h | 9 +- common/protocol_item_ids.h | 100 ++--- common/protocol_items.cpp | 10 + common/protocol_items.dat | 2 + common/protocol_items.h | 14 + common/server_player.cpp | 50 ++- common/server_player.h | 5 +- common/server_protocolhandler.cpp | 36 +- common/server_protocolhandler.h | 2 +- servatrice/src/servatrice.cpp | 2 +- 25 files changed, 1763 insertions(+), 1419 deletions(-) diff --git a/cockatrice/src/abstractcounter.cpp b/cockatrice/src/abstractcounter.cpp index aed566c8..864b26b1 100644 --- a/cockatrice/src/abstractcounter.cpp +++ b/cockatrice/src/abstractcounter.cpp @@ -97,13 +97,13 @@ void AbstractCounter::mousePressEvent(QGraphicsSceneMouseEvent *event) event->ignore(); } -void AbstractCounter::hoverEnterEvent(QGraphicsSceneHoverEvent *event) +void AbstractCounter::hoverEnterEvent(QGraphicsSceneHoverEvent * /*event*/) { hovered = true; update(); } -void AbstractCounter::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) +void AbstractCounter::hoverLeaveEvent(QGraphicsSceneHoverEvent * /*event*/) { hovered = false; update(); diff --git a/cockatrice/src/messagelogwidget.cpp b/cockatrice/src/messagelogwidget.cpp index d7935435..bb68276e 100644 --- a/cockatrice/src/messagelogwidget.cpp +++ b/cockatrice/src/messagelogwidget.cpp @@ -138,6 +138,14 @@ void MessageLogWidget::logDrawCards(Player *player, int number) append(tr("%1 draws %2 cards.").arg(sanitizeHtml(player->getName())).arg(number)); } +void MessageLogWidget::logUndoDraw(Player *player, QString cardName) +{ + if (cardName.isEmpty()) + append(tr("%1 undoes his last draw.").arg(sanitizeHtml(player->getName()))); + else + append(tr("%1 undoes his last draw (%2).").arg(sanitizeHtml(player->getName())).arg(sanitizeHtml(cardName))); +} + QPair MessageLogWidget::getFromStr(CardZone *zone, QString cardName, int position) const { bool cardNameContainsStartZone = false; @@ -428,6 +436,7 @@ void MessageLogWidget::connectToPlayer(Player *player) connect(player, SIGNAL(logDumpZone(Player *, CardZone *, int)), this, SLOT(logDumpZone(Player *, CardZone *, int))); connect(player, SIGNAL(logStopDumpZone(Player *, CardZone *)), this, SLOT(logStopDumpZone(Player *, CardZone *))); connect(player, SIGNAL(logDrawCards(Player *, int)), this, SLOT(logDrawCards(Player *, int))); + connect(player, SIGNAL(logUndoDraw(Player *, QString)), this, SLOT(logUndoDraw(Player *, QString))); connect(player, SIGNAL(logRevealCards(Player *, CardZone *, int, QString, Player *)), this, SLOT(logRevealCards(Player *, CardZone *, int, QString, Player *))); } diff --git a/cockatrice/src/messagelogwidget.h b/cockatrice/src/messagelogwidget.h index 2cd2a375..ee1f5e27 100644 --- a/cockatrice/src/messagelogwidget.h +++ b/cockatrice/src/messagelogwidget.h @@ -47,6 +47,7 @@ public slots: void logShuffle(Player *player); void logRollDie(Player *player, int sides, int roll); void logDrawCards(Player *player, int number); + void logUndoDraw(Player *player, QString cardName); void logMoveCard(Player *player, QString cardName, CardZone *startZone, int oldX, CardZone *targetZone, int newX); void logFlipCard(Player *player, QString cardName, bool faceDown); void logDestroyCard(Player *player, QString cardName); diff --git a/cockatrice/src/player.cpp b/cockatrice/src/player.cpp index c1b2f62d..13da1d23 100644 --- a/cockatrice/src/player.cpp +++ b/cockatrice/src/player.cpp @@ -130,6 +130,8 @@ Player::Player(ServerInfo_User *info, int _id, bool _local, TabGame *_parent) connect(aDrawCard, SIGNAL(triggered()), this, SLOT(actDrawCard())); aDrawCards = new QAction(this); connect(aDrawCards, SIGNAL(triggered()), this, SLOT(actDrawCards())); + aUndoDraw = new QAction(this); + connect(aUndoDraw, SIGNAL(triggered()), this, SLOT(actUndoDraw())); aShuffle = new QAction(this); connect(aShuffle, SIGNAL(triggered()), this, SLOT(actShuffle())); aMulligan = new QAction(this); @@ -159,6 +161,7 @@ Player::Player(ServerInfo_User *info, int _id, bool _local, TabGame *_parent) libraryMenu = playerMenu->addMenu(QString()); libraryMenu->addAction(aDrawCard); libraryMenu->addAction(aDrawCards); + libraryMenu->addAction(aUndoDraw); libraryMenu->addSeparator(); libraryMenu->addAction(aShuffle); libraryMenu->addSeparator(); @@ -409,6 +412,7 @@ void Player::retranslateUi() aViewSideboard->setText(tr("&View sideboard")); aDrawCard->setText(tr("&Draw card")); aDrawCards->setText(tr("D&raw cards...")); + aUndoDraw->setText(tr("&Undo last draw")); aMulligan->setText(tr("Take &mulligan")); aShuffle->setText(tr("&Shuffle")); aMoveTopCardsToGrave->setText(tr("Move top cards to &graveyard...")); @@ -453,6 +457,7 @@ void Player::setShortcutsActive() aViewGraveyard->setShortcut(tr("F4")); aDrawCard->setShortcut(tr("Ctrl+D")); aDrawCards->setShortcut(tr("Ctrl+E")); + aUndoDraw->setShortcut(tr("Ctrl+Shift+D")); aMulligan->setShortcut(tr("Ctrl+M")); aShuffle->setShortcut(tr("Ctrl+S")); aUntapAll->setShortcut(tr("Ctrl+U")); @@ -475,6 +480,7 @@ void Player::setShortcutsInactive() aViewGraveyard->setShortcut(QKeySequence()); aDrawCard->setShortcut(QKeySequence()); aDrawCards->setShortcut(QKeySequence()); + aUndoDraw->setShortcut(QKeySequence()); aMulligan->setShortcut(QKeySequence()); aShuffle->setShortcut(QKeySequence()); aUntapAll->setShortcut(QKeySequence()); @@ -555,6 +561,11 @@ void Player::actDrawCards() sendGameCommand(new Command_DrawCards(-1, number)); } +void Player::actUndoDraw() +{ + sendGameCommand(new Command_UndoDraw); +} + void Player::actMoveTopCardsToGrave() { int number = QInputDialog::getInteger(0, tr("Move top cards to grave"), tr("Number:")); @@ -793,7 +804,7 @@ void Player::eventStopDumpZone(Event_StopDumpZone *event) emit logStopDumpZone(this, zone); } -void Player::eventMoveCard(Event_MoveCard *event) +void Player::eventMoveCard(Event_MoveCard *event, GameEventContext *context) { CardZone *startZone = zones.value(event->getStartZone(), 0); Player *targetPlayer = static_cast(parent())->getPlayers().value(event->getTargetPlayerId()); @@ -840,7 +851,13 @@ void Player::eventMoveCard(Event_MoveCard *event) // The log event has to be sent before the card is added to the target zone // because the addCard function can modify the card object. - emit logMoveCard(this, card->getName(), startZone, logPosition, targetZone, logX); + if (context) + switch (context->getItemId()) { + case ItemId_Context_UndoDraw: emit logUndoDraw(this, card->getName()); break; + default: ; + } + else + emit logMoveCard(this, card->getName(), startZone, logPosition, targetZone, logX); targetZone->addCard(card, true, x, y); @@ -983,25 +1000,25 @@ void Player::processGameEvent(GameEvent *event, GameEventContext *context) { qDebug() << "player event: id=" << event->getItemId(); switch (event->getItemId()) { - case ItemId_Event_Say: eventSay(qobject_cast(event)); break; - case ItemId_Event_Shuffle: eventShuffle(qobject_cast(event)); break; - case ItemId_Event_RollDie: eventRollDie(qobject_cast(event)); break; - case ItemId_Event_CreateArrows: eventCreateArrows(qobject_cast(event)); break; - case ItemId_Event_DeleteArrow: eventDeleteArrow(qobject_cast(event)); break; - case ItemId_Event_CreateToken: eventCreateToken(qobject_cast(event)); break; - case ItemId_Event_SetCardAttr: eventSetCardAttr(qobject_cast(event)); break; - case ItemId_Event_SetCardCounter: eventSetCardCounter(qobject_cast(event)); break; - case ItemId_Event_CreateCounters: eventCreateCounters(qobject_cast(event)); break; - case ItemId_Event_SetCounter: eventSetCounter(qobject_cast(event)); break; - case ItemId_Event_DelCounter: eventDelCounter(qobject_cast(event)); break; - case ItemId_Event_DumpZone: eventDumpZone(qobject_cast(event)); break; - case ItemId_Event_StopDumpZone: eventStopDumpZone(qobject_cast(event)); break; - case ItemId_Event_MoveCard: eventMoveCard(qobject_cast(event)); break; - case ItemId_Event_FlipCard: eventFlipCard(qobject_cast(event)); break; - case ItemId_Event_DestroyCard: eventDestroyCard(qobject_cast(event)); break; - case ItemId_Event_AttachCard: eventAttachCard(qobject_cast(event)); break; - case ItemId_Event_DrawCards: eventDrawCards(qobject_cast(event)); break; - case ItemId_Event_RevealCards: eventRevealCards(qobject_cast(event)); break; + case ItemId_Event_Say: eventSay(static_cast(event)); break; + case ItemId_Event_Shuffle: eventShuffle(static_cast(event)); break; + case ItemId_Event_RollDie: eventRollDie(static_cast(event)); break; + case ItemId_Event_CreateArrows: eventCreateArrows(static_cast(event)); break; + case ItemId_Event_DeleteArrow: eventDeleteArrow(static_cast(event)); break; + case ItemId_Event_CreateToken: eventCreateToken(static_cast(event)); break; + case ItemId_Event_SetCardAttr: eventSetCardAttr(static_cast(event)); break; + case ItemId_Event_SetCardCounter: eventSetCardCounter(static_cast(event)); break; + case ItemId_Event_CreateCounters: eventCreateCounters(static_cast(event)); break; + case ItemId_Event_SetCounter: eventSetCounter(static_cast(event)); break; + case ItemId_Event_DelCounter: eventDelCounter(static_cast(event)); break; + case ItemId_Event_DumpZone: eventDumpZone(static_cast(event)); break; + case ItemId_Event_StopDumpZone: eventStopDumpZone(static_cast(event)); break; + case ItemId_Event_MoveCard: eventMoveCard(static_cast(event), context); break; + case ItemId_Event_FlipCard: eventFlipCard(static_cast(event)); break; + case ItemId_Event_DestroyCard: eventDestroyCard(static_cast(event)); break; + case ItemId_Event_AttachCard: eventAttachCard(static_cast(event)); break; + case ItemId_Event_DrawCards: eventDrawCards(static_cast(event)); break; + case ItemId_Event_RevealCards: eventRevealCards(static_cast(event)); break; default: { qDebug() << "unhandled game event"; } diff --git a/cockatrice/src/player.h b/cockatrice/src/player.h index 49ccab69..5516f2f5 100644 --- a/cockatrice/src/player.h +++ b/cockatrice/src/player.h @@ -57,6 +57,7 @@ signals: void logCreateArrow(Player *player, Player *startPlayer, QString startCard, Player *targetPlayer, QString targetCard, bool _playerTarget); void logCreateToken(Player *player, QString cardName, QString pt); void logDrawCards(Player *player, int number); + void logUndoDraw(Player *player, QString cardName); void logMoveCard(Player *player, QString cardName, CardZone *startZone, int oldX, CardZone *targetZone, int newX); void logFlipCard(Player *player, QString cardName, bool faceDown); void logDestroyCard(Player *player, QString cardName); @@ -81,6 +82,7 @@ public slots: void actShuffle(); void actDrawCard(); void actDrawCards(); + void actUndoDraw(); void actMulligan(); void actMoveTopCardsToGrave(); void actMoveTopCardsToExile(); @@ -119,7 +121,7 @@ private: *aMoveRfgToTopLibrary, *aMoveRfgToBottomLibrary, *aMoveRfgToHand, *aMoveRfgToGrave, *aViewLibrary, *aViewTopCards, *aMoveTopCardsToGrave, *aMoveTopCardsToExile, *aMoveTopCardToBottom, *aViewGraveyard, *aViewRfg, *aViewSideboard, - *aDrawCard, *aDrawCards, *aMulligan, *aShuffle, + *aDrawCard, *aDrawCards, *aUndoDraw, *aMulligan, *aShuffle, *aUntapAll, *aRollDie, *aCreateToken, *aCreateAnotherToken, *aCardMenu; @@ -167,7 +169,7 @@ private: void eventDelCounter(Event_DelCounter *event); void eventDumpZone(Event_DumpZone *event); void eventStopDumpZone(Event_StopDumpZone *event); - void eventMoveCard(Event_MoveCard *event); + void eventMoveCard(Event_MoveCard *event, GameEventContext *context); void eventFlipCard(Event_FlipCard *event); void eventDestroyCard(Event_DestroyCard *event); void eventAttachCard(Event_AttachCard *event); diff --git a/cockatrice/src/window_main.cpp b/cockatrice/src/window_main.cpp index 671738a9..daf61fb7 100644 --- a/cockatrice/src/window_main.cpp +++ b/cockatrice/src/window_main.cpp @@ -186,7 +186,10 @@ void MainWindow::socketError(const QString &errorStr) void MainWindow::protocolVersionMismatch(int localVersion, int remoteVersion) { - QMessageBox::critical(this, tr("Error"), tr("Protocol version mismatch. Local version: %1, remote version: %2.").arg(localVersion).arg(remoteVersion)); + if (localVersion > remoteVersion) + QMessageBox::critical(this, tr("Error"), tr("You are trying to connect to an obsolete server. Please downgrade your Cockatrice version or connect to a suitable server.\nLocal version is %1, remote version is %2.").arg(localVersion).arg(remoteVersion)); + else + QMessageBox::critical(this, tr("Error"), tr("Your Cockatrice client is obsolete. Please update your Cockatrice version.\nLocal version is %1, remote version is %2.").arg(localVersion).arg(remoteVersion)); } void MainWindow::setClientStatusTitle() diff --git a/cockatrice/translations/cockatrice_de.ts b/cockatrice/translations/cockatrice_de.ts index 93f028ea..99e7bc7c 100644 --- a/cockatrice/translations/cockatrice_de.ts +++ b/cockatrice/translations/cockatrice_de.ts @@ -1673,7 +1673,8 @@ - + + Error Fehler @@ -1693,57 +1694,70 @@ Netzwerkfehler: %1 - - Protocol version mismatch. Local version: %1, remote version: %2. - Protokollversionen stimmen nicht überein. Lokale Version: %1, Serverversion: %2. + + You are trying to connect to an obsolete server. Please downgrade your Cockatrice version or connect to a suitable server. +Local version is %1, remote version is %2. + Sie versuchen sich an einem veralteten Server anzumelden. Bitte verwenden Sie eine ältere Cockatrice-Version oder melden Sie sich an einem aktuellen Server an. +Lokale Version ist %1, Serverversion ist %2. - + + Your Cockatrice client is obsolete. Please update your Cockatrice version. +Local version is %1, remote version is %2. + Ihr Cockatrice-Client ist veraltet. Bitte laden Sie sich die neueste Version herunter. +Lokale Version ist %1, Serverversion ist %2. + + + Protocol version mismatch. Local version: %1, remote version: %2. + Protokollversionen stimmen nicht überein. Lokale Version: %1, Serverversion: %2. + + + Connecting to %1... Verbinde zu %1... - + Disconnected nicht verbunden - + Logged in at %1 Angemeldet bei %1 - + &Connect... &Verbinden... - + &Disconnect Verbindung &trennen - + Start &local game... &Lokales Spiel starten... - + &About Cockatrice &Über Cockatrice - + &Help &Hilfe - + Are you sure? Sind Sie sicher? - + There are still open games. Are you sure you want to quit? Es gibt noch offene Spiele. Wollen Sie das Programm wirklich beenden? @@ -1760,27 +1774,27 @@ Spiel ver&lassen - + &Deck editor &Deck-Editor - + &Full screen &Vollbild - + Ctrl+F Ctrl+F - + &Settings... &Einstellungen... - + &Exit &Beenden @@ -1793,7 +1807,7 @@ Esc - + &Cockatrice &Cockatrice @@ -1877,8 +1891,8 @@ %1 zieht %2 Karten - - + + a card eine Karte @@ -2037,167 +2051,177 @@ %1 zieht %2 Karten. - + + %1 undoes his last draw. + %1 legt die zuletzt gezogene Karte zurück. + + + + %1 undoes his last draw (%2). + %1 legt die zuletzt gezogene Karte zurück (%2). + + + from table vom Spielfeld - + from graveyard aus dem Friedhof - + from exile aus dem Exil - + from hand von der Hand - + the bottom card of his library die unterste Karte seiner Bibliothek - + from the bottom of his library , die unterste Karte seiner Bibliothek, - + the top card of his library die oberste Karte seiner Bibliothek - + from the top of his library , die oberste Karte seiner Bibliothek, - + from library aus der Bibliothek - + from sideboard aus dem Sideboard - + from the stack vom Stapel - + %1 gives %2 control over %3. %1 überlässt %2 die Kontrolle über %3. - + %1 puts %2 into play%3. %1 bringt %2%3 ins Spiel. - + %1 puts %2%3 into graveyard. %1 legt %2%3 auf den Friedhof. - + %1 exiles %2%3. %1 schickt %2%3 ins Exil. - + %1 moves %2%3 to hand. %1 nimmt %2%3 auf die Hand. - + %1 puts %2%3 into his library. %1 legt %2%3 in seine Bibliothek. - + %1 puts %2%3 on bottom of his library. %1 legt %2%3 unter seine Bibliothek. - + %1 puts %2%3 on top of his library. %1 legt %2%3 auf die Bibliothek. - + %1 puts %2%3 into his library at position %4. %1 legt %2%3 in seine Bibliothek an %4. Stelle. - + %1 moves %2%3 to sideboard. %1 legt %2%3 in sein Sideboard. - + %1 plays %2%3. %1 spielt %2%3 aus. - + %1 flips %2 face-down. %1 wendet %2 auf die Rückseite. - + %1 flips %2 face-up. %1 wendet %2 auf die Vorderseite. - + %1 destroys %2. %1 zerstört %2. - + %1 attaches %2 to %3's %4. %1 legt %2 an %3s %4 an. - + %1 unattaches %2. %1 löst %2 ab. - + %1 creates token: %2%3. %1 erstellt Token: %2%3. - + %1 points from %2's %3 to %4. %1 zeigt von %2s %3 auf %4. - + %1 randomly reveals %2%3 to %4. %1 zeigt %4 zufällig %2%3 vor. - + %1 randomly reveals %2%3. %1 zeigt zufällig %2%3 offen vor. - + %1 reveals %2%3 to %4. %1 zeigt %4 %2%3 vor. - + %1 reveals %2%3. %1 zeigt %2%3 offen vor. @@ -2206,12 +2230,12 @@ %1 erstellt einen Spielstein: %2 (%3). - + %1 points from %2's %3 to %4's %5. %1 zeigt von %2s %3 auf %4s %5. - + %1 places %n counter(s) (%2) on %3 (now %4). %1 legt eine Marke (%2) auf %3 (jetzt %4). @@ -2219,7 +2243,7 @@ - + %1 removes %n counter(s) (%2) from %3 (now %4). %1 entfernt eine Marke (%2) von %3 (jetzt %4). @@ -2227,37 +2251,37 @@ - + red rot - + yellow gelb - + green grün - + %1 sets counter %2 to %3 (%4%5). %1 setzt Zähler %2 auf %3 (%4%5). - + %1 sets PT of %2 to %3. %1 setzt Kampfwerte von %2 auf %3. - + %1 sets annotation of %2 to %3. %1 versieht %2 mit dem Hinweis %3. - + %1 is looking at the top %2 cards %3. %1 sieht sich die obersten %2 Karten %3 an. @@ -2354,7 +2378,7 @@ %1 entfernt %2 Zählmarken von %3 (jetzt %4). - + %1 %2 %3. %1 %2 %3. @@ -2367,22 +2391,22 @@ %1 sieht sich die obersten %2 Karten %3 an. - + %1 is looking at %2. %1 sieht sich %2 an. - + %1 stops looking at %2. %1 sieht sich %2 nicht mehr an. - + %1 reveals %2 to %3. %1 zeigt %3 %2. - + %1 reveals %2. %1 zeigt %2 offen vor. @@ -2403,7 +2427,7 @@ %1 zeigt %2 aus %3 offen vor. - + ending phase die Zugendphase @@ -2432,57 +2456,57 @@ %1 sieht sich %2s %3 nicht mehr an - + It is now %1's turn. %1 ist am Zug. - + untap step das Enttappsegment - + upkeep step das Versorgungssegment - + draw step das Ziehsegment - + first main phase die erste Hauptphase - + beginning of combat step das Anfangssegment der Kampfphase - + declare attackers step das Angreifer-Deklarieren-Segment - + declare blockers step das Blocker-Deklarieren-Segment - + combat damage step das Kampfschadenssegment - + end of combat step das Endsegment der Kampfphase - + second main phase die zweite Hauptphase @@ -2491,7 +2515,7 @@ das Ende-des-Zuges-Segment - + It is now the %1. Es ist nun %1. @@ -2500,12 +2524,12 @@ %1 bewegt %2 %3 nach %4 - + taps tappt - + untaps enttappt @@ -2530,7 +2554,7 @@ %1 entfernt %2 Zählmarken von %3 (jetzt %4) - + his permanents seine bleibenden Karten @@ -2543,12 +2567,12 @@ %1 setzt Zähler "%2" auf %3 (%4%5) - + %1 sets %2 to not untap normally. %1 setzt %2 auf explizites Enttappen. - + %1 sets %2 to untap normally. %1 setzt %2 auf normales Enttappen. @@ -2653,21 +2677,21 @@ Player - - - + + + Move to &top of library Oben auf die Biblio&thek legen - - - + + + Move to &bottom of library Unter die &Bibliothek legen - + &View library &Zeige Bibliothek @@ -2676,37 +2700,37 @@ Oberste Karten in den F&riedhof legen... - + Move top cards to &exile... Oberste Karten ins &Exil schicken... - + F3 F3 - + View &top cards of library... Zeige die oberen Kar&ten der Bibliothek... - + &View graveyard &Zeige Friedhof - + &All players &allen Spielern - + Ctrl+F3 Ctrl+F3 - + F4 F4 @@ -2715,68 +2739,73 @@ Zeige ent&fernte Karten - + &View sideboard Zeige &Sideboard - + Player "%1" Spieler "%1" - - + + Move to &graveyard Auf den &Friedhof legen - + Reveal &library to &Bibliothek jemandem zeigen - + Reveal t&op card to &Oberste Karte jemandem zeigen - + + &Undo last draw + Zuletzt gezogene Karte zur&ücklegen + + + Take &mulligan &Mulligan nehmen - + Move top cards to &graveyard... Oberste Karten auf den F&riedhof legen... - + Put top card on &bottom Oberste Karte nach &unten legen - + &Hand &Hand - + &Reveal to Jemandem &zeigen - + Reveal r&andom card to Z&ufällige Karte jemandem zeigen - + &Library Bib&liothek - + &Graveyard &Friedhof @@ -2785,7 +2814,7 @@ Entfe&rnte Karten - + &Sideboard &Sideboard @@ -2798,33 +2827,33 @@ &Hinweis setzen... - + View top cards of library Zeige die obersten Karten der Bibliothek - + Number of cards: Anzahl der Karten: - + &Draw card Karte &ziehen - + &View exile &Zeige Exil - + &Exile &Exil - - + + Move to &hand auf die &Hand nehmen @@ -2833,28 +2862,28 @@ auf den &Friedhof legen - - + + Move to &exile ins &Exil schicken - + Ctrl+W Ctrl+W - + Ctrl+D Ctrl+D - + D&raw cards... Ka&rten ziehen... - + Ctrl+E Ctrl+E @@ -2863,32 +2892,37 @@ &Mulligan nehmen... - + Ctrl+M Ctrl+M - + &Shuffle Mi&schen - + Ctrl+S Ctrl+S - + &Counters &Zähler - + &Untap all permanents &Enttappe alle bleibenden Karten - + + Ctrl+Shift+D + Ctrl+Shift+D + + + Ctrl+U Ctrl+U @@ -2917,42 +2951,42 @@ Ctrl+L - + R&oll die... &Würfeln... - + Ctrl+I Ctrl+I - + &Create token... Spiels&tein erstellen... - + Ctrl+T Ctrl+T - + C&reate another token &Noch einen Spielstein erstellen - + Ctrl+G Ctrl+G - + S&ay S&agen - + C&ard &Karte @@ -3045,50 +3079,50 @@ F10 - + Draw cards Karten ziehen - - - - + + + + Number: Anzahl: - + Move top cards to grave Oberste Karten in den Friedhof legen - + Move top cards to exile Oberste Karten ins Exil schicken - + Set power/toughness Kampfwerte setzen - + Please enter the new PT: Bitte die neuen Kampfwerte eingeben: - + Set annotation Hinweis setzen - + Please enter the new annotation: Bitte den Hinweis eingeben: - + Set counters Setze Zählmarken @@ -3101,12 +3135,12 @@ Neue Lebenspunkte insgesamt: - + Roll die Würfeln - + Number of sides: Anzahl der Seiten: diff --git a/cockatrice/translations/cockatrice_en.ts b/cockatrice/translations/cockatrice_en.ts index 220072c0..a32de69e 100644 --- a/cockatrice/translations/cockatrice_en.ts +++ b/cockatrice/translations/cockatrice_en.ts @@ -1077,7 +1077,8 @@ - + + Error @@ -1097,87 +1098,94 @@ - - Protocol version mismatch. Local version: %1, remote version: %2. + + You are trying to connect to an obsolete server. Please downgrade your Cockatrice version or connect to a suitable server. +Local version is %1, remote version is %2. - + + Your Cockatrice client is obsolete. Please update your Cockatrice version. +Local version is %1, remote version is %2. + + + + Connecting to %1... - + Disconnected - + Logged in at %1 - + &Connect... - + &Disconnect - + Start &local game... - + &Deck editor - + &Full screen - + Ctrl+F - + &Settings... - + &Exit - + &Cockatrice - + &About Cockatrice - + &Help - + Are you sure? - + There are still open games. Are you sure you want to quit? @@ -1230,148 +1238,158 @@ - + + %1 undoes his last draw. + + + + + %1 undoes his last draw (%2). + + + + from table - + from graveyard - + from exile - + from hand - + the bottom card of his library - + from the bottom of his library - + the top card of his library - + from the top of his library - + from library - + from sideboard - + from the stack - + %1 gives %2 control over %3. - + %1 puts %2 into play%3. - + %1 puts %2%3 into graveyard. - + %1 exiles %2%3. - + %1 moves %2%3 to hand. - + %1 puts %2%3 into his library. - + %1 puts %2%3 on bottom of his library. - + %1 puts %2%3 on top of his library. - + %1 puts %2%3 into his library at position %4. - + %1 moves %2%3 to sideboard. - + %1 plays %2%3. - - + + a card - + %1 flips %2 face-down. - + %1 flips %2 face-up. - + %1 attaches %2 to %3's %4. - + %1 unattaches %2. - + %1 points from %2's %3 to %4's %5. - + %1 places %n counter(s) (%2) on %3 (now %4). %1 places a counter (%2) on %3 (now %4). @@ -1379,7 +1397,7 @@ - + %1 removes %n counter(s) (%2) from %3 (now %4). %1 removes a counter (%2) from %3 (now %4). @@ -1387,37 +1405,37 @@ - + red - + yellow - + green - + %1 sets counter %2 to %3 (%4%5). - + %1 sets PT of %2 to %3. - + %1 sets annotation of %2 to %3. - + %1 is looking at the top %2 cards %3. @@ -1482,52 +1500,52 @@ - + %1 destroys %2. - + %1 creates token: %2%3. - + %1 points from %2's %3 to %4. - + %1 %2 %3. - + %1 is looking at %2. - + %1 stops looking at %2. - + %1 reveals %2 to %3. - + %1 reveals %2. - + ending phase - + It is now %1's turn. @@ -1537,102 +1555,102 @@ - + %1 randomly reveals %2%3 to %4. - + %1 randomly reveals %2%3. - + %1 reveals %2%3 to %4. - + %1 reveals %2%3. - + untap step - + upkeep step - + draw step - + first main phase - + beginning of combat step - + declare attackers step - + declare blockers step - + combat damage step - + end of combat step - + second main phase - + It is now the %1. - + taps - + untaps - + %1 sets %2 to not untap normally. - + %1 sets %2 to untap normally. - + his permanents @@ -1721,312 +1739,322 @@ Player - - - + + + Move to &top of library - - - + + + Move to &bottom of library - - + + Move to &graveyard - + &View library - + Reveal &library to - + Reveal t&op card to - + Move top cards to &graveyard... - + F3 - + View &top cards of library... - + &View graveyard - + F4 - + &View sideboard - + Player "%1" - + &Hand - + &Library - + &Graveyard - + &Sideboard - + View top cards of library - + Number of cards: - + &Draw card - + &View exile - + &Exile + + + + Move to &hand + + - Move to &hand - - - - - Move to &exile - + Ctrl+W - + Ctrl+D - + D&raw cards... - + Ctrl+E - + Take &mulligan - + Ctrl+M - + &Shuffle - + Ctrl+S - + &Counters - + &Untap all permanents - + Ctrl+U - + R&oll die... - + Ctrl+I - + &Create token... - + Ctrl+T - + C&reate another token - + Ctrl+G - + S&ay - Move top cards to &exile... - - - - - Put top card on &bottom + &Undo last draw - &Reveal to + Move top cards to &exile... + Put top card on &bottom + + + + + &Reveal to + + + + Reveal r&andom card to - + C&ard - + &All players - + Ctrl+F3 - + + Ctrl+Shift+D + + + + Draw cards - - - - + + + + Number: - + Move top cards to grave - + Move top cards to exile - + Roll die - + Number of sides: - + Set power/toughness - + Please enter the new PT: - + Set annotation - + Please enter the new annotation: - + Set counters diff --git a/cockatrice/translations/cockatrice_es.ts b/cockatrice/translations/cockatrice_es.ts index cdcfa709..682d76b6 100644 --- a/cockatrice/translations/cockatrice_es.ts +++ b/cockatrice/translations/cockatrice_es.ts @@ -1288,7 +1288,8 @@ - + + Error Error @@ -1308,87 +1309,98 @@ Error del Socket: %1 - - Protocol version mismatch. Local version: %1, remote version: %2. - La versión del protocolo es diferente. Version local: %1, version remota: %2. + + You are trying to connect to an obsolete server. Please downgrade your Cockatrice version or connect to a suitable server. +Local version is %1, remote version is %2. + - + + Your Cockatrice client is obsolete. Please update your Cockatrice version. +Local version is %1, remote version is %2. + + + + Protocol version mismatch. Local version: %1, remote version: %2. + La versión del protocolo es diferente. Version local: %1, version remota: %2. + + + Connecting to %1... Conectando a %1... - + Disconnected Desconectado - + Logged in at %1 Conectado en %1 - + &Connect... &Conectar... - + &Disconnect &Desconectar - + Start &local game... Empezar partida &local... - + &Deck editor Editor de &mazos - + &Full screen &Pantalla completa - + Ctrl+F CTRL+F - + &Settings... &Preferencias... - + &Exit &Salir - + &Cockatrice &Cockatrice - + &About Cockatrice &Acerca de Cockatrice - + &Help A&yuda - + Are you sure? ¿Estás seguro? - + There are still open games. Are you sure you want to quit? Todavía hay partidas abiertas. ¿Estás seguro que quieres salir? @@ -1441,148 +1453,158 @@ %1 sacó un %2 con un dado de %3 caras. - + + %1 undoes his last draw. + + + + + %1 undoes his last draw (%2). + + + + from table de la mesa - + from graveyard del cementerio - + from exile del exilio - + from hand de la mano - + the bottom card of his library el fondo de la biblioteca - + from the bottom of his library del fondo de la biblioteca - + the top card of his library la parte superior de la biblioteca - + from the top of his library de la parte superior de la biblioteca - + from library de la biblioteca - + from sideboard de la reserva - + from the stack de la pila - + %1 gives %2 control over %3. %1 entrega a %2 el control sobre %3. - + %1 puts %2 into play%3. %1 pone %2 en juego%3. - + %1 puts %2%3 into graveyard. %1 pone %2%3 en el cementerio. - + %1 exiles %2%3. %1 exilia %2%3. - + %1 moves %2%3 to hand. %1 mueve %2%3 a la mano. - + %1 puts %2%3 into his library. %1 pone %2%3 en la biblioteca. - + %1 puts %2%3 on bottom of his library. %1 pone %2%3 en la parte inferior de su biblioteca. - + %1 puts %2%3 on top of his library. %1 pone %2%3 en la parte superior de su biblioteca. - + %1 puts %2%3 into his library at position %4. %1 pone %2%3 en su biblioteca en la posición %4. - + %1 moves %2%3 to sideboard. %1 mueve %2%3 a la reserva. - + %1 plays %2%3. %1 juega %2%3. - - + + a card una carta - + %1 flips %2 face-down. %1 voltea %2 boca abajo. - + %1 flips %2 face-up. %1 voltea %2 boca arriba. - + %1 attaches %2 to %3's %4. %1 anexa %2 a el %4 de %3. - + %1 unattaches %2. %1 desanexa %2. - + %1 points from %2's %3 to %4's %5. %1 apunta desde el %3 de %2 al %5 de %4. - + %1 places %n counter(s) (%2) on %3 (now %4). %1 pone un contador (%2) en %3 (ahora %4). @@ -1590,7 +1612,7 @@ - + %1 removes %n counter(s) (%2) from %3 (now %4). %1 remueve un contador (%2) de %3 (ahora %4). @@ -1598,37 +1620,37 @@ - + red rojo - + yellow amarillo - + green verde - + %1 sets counter %2 to %3 (%4%5). %1 establece los contadores de %2 a %3 (%4%5). - + %1 sets PT of %2 to %3. %1 establece F/R de %2 a %3. - + %1 sets annotation of %2 to %3. %1 establece la anotación de %2 a %3. - + %1 is looking at the top %2 cards %3. %1 esta mirando las primeras %2 cartas de %3. @@ -1693,52 +1715,52 @@ %1 roba %2 cartas. - + %1 destroys %2. %1 destruye %2. - + %1 creates token: %2%3. %1 crea una ficha: %2%3. - + %1 points from %2's %3 to %4. %1 apunta desde el %3 de %2 a %4. - + %1 %2 %3. %1 %2 %3. - + %1 is looking at %2. %1 está mirando: %2. - + %1 stops looking at %2. %1 termina de mirar: %2. - + %1 reveals %2 to %3. %1 revela %2 a %3. - + %1 reveals %2. %1 revela %2. - + ending phase fase de fin de turno - + It is now %1's turn. Es el turno de %1. @@ -1748,102 +1770,102 @@ %1 baraja su biblioteca. - + %1 randomly reveals %2%3 to %4. %1 revela aleatoriamente %2%3 a %4. - + %1 randomly reveals %2%3. %1 revela aleatoriamente %2%3. - + %1 reveals %2%3 to %4. %1 revela %2%3 a %4. - + %1 reveals %2%3. %1 revela %2%3. - + untap step paso de enderezar - + upkeep step paso de mantenimiento - + draw step paso de robar - + first main phase primera fase principal - + beginning of combat step paso de inicio de combate - + declare attackers step paso de declarar atacantes - + declare blockers step paso de declarar bloqueadores - + combat damage step paso de daño de combate - + end of combat step paso de fin de combate - + second main phase segunda fase principal - + It is now the %1. Ahora es el %1. - + taps gira - + untaps endereza - + %1 sets %2 to not untap normally. %1 establece que %2 no se endereze normalmente. - + %1 sets %2 to untap normally. %1 establece que %2 se endereze normalmente. - + his permanents sus permanentes @@ -1932,123 +1954,128 @@ Player - - - + + + Move to &top of library Mover a la &parte superior de la biblioteca - - - + + + Move to &bottom of library Mover al &fondo de la biblioteca - - + + Move to &graveyard Mover al &cementerio - + &View library &Ver biblioteca - + Reveal &library to Revelar &biblioteca a - + Reveal t&op card to Revelar la carta &superior de la biblioteca a - + + &Undo last draw + + + + Move top cards to &graveyard... Mover cartas de la parte s&uperior de la biblioteca al cementerio... - + F3 F3 - + View &top cards of library... Ver cartas de la parte &superior de la biblioteca... - + &View graveyard Ver &Cementerio - + F4 F4 - + &View sideboard Ver &sideboard - + Player "%1" Jugador "%1" - + &Hand &Mano - + &Library &Biblioteca - + &Graveyard &Cementerio - + &Sideboard &Reserva - + View top cards of library Ver cartas de la parte superior de la biblioteca - + Number of cards: Número de cartas: - + &Draw card &Robar carta - + &View exile Ver &exilio - + &Exile &Exilio - - + + Move to &hand Mover a la m&ano @@ -2057,98 +2084,98 @@ Mover al &cementerio - - + + Move to &exile Mover al &exilio - + Ctrl+W Ctrl+W - + Ctrl+D Ctrl+D - + D&raw cards... &Robar cartas... - + Ctrl+E Ctrl+E - + Take &mulligan Hacer &mulligan - + Ctrl+M Ctrl+M - + &Shuffle &Barajar - + Ctrl+S Ctrl+S - + &Counters &Contadores - + &Untap all permanents &Enderezar todos los permanentes - + Ctrl+U Ctrl+U - + R&oll die... &Lanzar dado... - + Ctrl+I Ctrl+I - + &Create token... Crear &Ficha... - + Ctrl+T Ctrl+T - + C&reate another token C&rea otra ficha - + Ctrl+G Ctrl+G - + S&ay D&ecir @@ -2157,95 +2184,100 @@ Mover cartas superiores al ce&menterio... - + Move top cards to &exile... Mover cartas superiores al &exilio... - + Put top card on &bottom Poner carta superior en la parte &inferior - + &Reveal to &Revelar a - + Reveal r&andom card to Revelar carta &aleatoriamente a - + C&ard C&arta - + &All players &Todos los jugadores - + Ctrl+F3 - + + Ctrl+Shift+D + + + + Draw cards Robar cartas - - - - + + + + Number: Número: - + Move top cards to grave Mover cartas superiores al cementerio - + Move top cards to exile Mover cartas superiores al exilio - + Roll die Lanzar dado - + Number of sides: Número de caras: - + Set power/toughness Establecer fuerza/resistencia - + Please enter the new PT: Por favor, introduzca la nueva F/R: - + Set annotation Escribir anotación - + Please enter the new annotation: Por favor, introduza la nueva anotación: - + Set counters Establecer contadores diff --git a/cockatrice/translations/cockatrice_fr.ts b/cockatrice/translations/cockatrice_fr.ts index cf5ac60b..08565758 100644 --- a/cockatrice/translations/cockatrice_fr.ts +++ b/cockatrice/translations/cockatrice_fr.ts @@ -1143,7 +1143,8 @@ - + + Error Erreur @@ -1163,88 +1164,99 @@ Erreur de socket: %1 - Protocol version mismatch. Local version: %1, remote version: %2. - Version de protocole différente. Version locale: %1 ,version distante: %2. + Version de protocole différente. Version locale: %1 ,version distante: %2. - + + You are trying to connect to an obsolete server. Please downgrade your Cockatrice version or connect to a suitable server. +Local version is %1, remote version is %2. + + + + + Your Cockatrice client is obsolete. Please update your Cockatrice version. +Local version is %1, remote version is %2. + + + + Connecting to %1... Connexion à %1... - + Disconnected Déconnecté - + Logged in at %1 Connecté à %1 - + &Connect... à verifier &Connecter... - + &Disconnect &Déconnecter - + Start &local game... Démarrer une partie &locale... - + &Deck editor Editeur de &deck - + &Full screen &Plein écran - + Ctrl+F Ctrl+F - + &Settings... &Paramètres - + &Exit &Quitter - + &Cockatrice &Cockatrice - + &About Cockatrice &A propos de Cockatrice - + &Help A&ide - + Are you sure? Etes vous sur? - + There are still open games. Are you sure you want to quit? Il y a encore des parties en cours. Etes vous sure de vouloir quitter? @@ -1364,167 +1376,177 @@ %1 pioche %2 cartes. - + from table de la table - + from graveyard depuis le cimetière - + from exile depuis la zone d'éxil - + from hand depuis la main - + the bottom card of his library la carte du dessous de sa bibliothèque - + from the bottom of his library depuis le dessous de sa bibliothèque - + the top card of his library le carte du dessus de sa bibliothèque - + from the top of his library du dessus de sa bibliothèque - + from library de la bibliothèque - + from sideboard de la réserve - + from the stack de la pile - + %1 puts %2 into play%3. what is %3? plz exemple %1 met %2 en jeu %3. - + %1 puts %2%3 into graveyard. %1 met %2%3 dans le cimetière. - + %1 exiles %2%3. %1 exile %2%3. - + %1 moves %2%3 to hand. %1 déplace %2%3 dans sa main. - + %1 puts %2%3 into his library. %1 met %2%3 dans sa bibliothèque. - + %1 puts %2%3 on bottom of his library. %1 met %2%3 en dessous de sa bibliothèque. - + %1 puts %2%3 on top of his library. %1 met %2%3 au dessus de sa bibliothèque. - + %1 puts %2%3 into his library at position %4. %1 met %2%3 dans sa bibliothèque à la position %4. - + %1 moves %2%3 to sideboard. %1 déplace %2%3 vers la réserve. - + %1 plays %2%3. %1 joue %2%3. - - + + a card une carte - + + %1 undoes his last draw. + + + + + %1 undoes his last draw (%2). + + + + %1 gives %2 control over %3. %1 donne le contrôle de %2 à%3. - + %1 flips %2 face-down. %1 retourne %2 face cachée. - + %1 flips %2 face-up. %1 retourne %2 face visible. - + %1 destroys %2. %1 détruit %2. - + %1 attaches %2 to %3's %4. need exemple %1 attache %2 à %4 de %3. - + %1 unattaches %2. %1 détache %2. - + %1 creates token: %2%3. %1 crée un jeton %2%3. - + %1 points from %2's %3 to %4. need exemple %1 désigne le %3 de %2 à %4. - + %1 points from %2's %3 to %4's %5. need exemple %1 désigne %3 de %2 à %5 de %4. - + %1 places %n counter(s) (%2) on %3 (now %4). need exemple @@ -1533,7 +1555,7 @@ - + %1 removes %n counter(s) (%2) from %3 (now %4). need exemple @@ -1542,179 +1564,179 @@ - + red rouge - + yellow jaune - + green vert - + his permanents ses permanents - + %1 %2 %3. wtf ? %1 %2 %3. - + taps engage - + untaps dégage - + %1 sets counter %2 to %3 (%4%5). need exemple %1 met les compteurs %2 à %3 (%4%5). - + %1 sets %2 to not untap normally. need exemple %1 met %2 pour ne pas se dégager normalement. - + %1 sets %2 to untap normally. %1 met %2 pour ne se dégager normalement. - + %1 sets PT of %2 to %3. exemple plz %1 met la F/E de %2 à %3. - + %1 sets annotation of %2 to %3. %1 met l'annotation de %2 à %3. - + %1 is looking at the top %2 cards %3. exemple plz %1 regarde les %2 cartes du dessus de%3. - + %1 is looking at %2. exemple plz %1 regarde %2. - + %1 stops looking at %2. need exemple to be sure %1 arrète de regarder à %2 - + %1 reveals %2 to %3. %1 révèle %2 à %3. - + %1 reveals %2. %1 révèle %2. - + %1 randomly reveals %2%3 to %4. %1 révèle aléatoirement %2%3 à %4. - + %1 randomly reveals %2%3. %1 révèle aléatoirement %2%3. - + %1 reveals %2%3 to %4. %1 révèle %2%3 à %4. - + %1 reveals %2%3. %1 révèle %2%3 - + It is now %1's turn. C'est maintenant le tour de %1. - + untap step étape de dégagement - + upkeep step étape d'entretien - + draw step étape de pioche - + first main phase première phase principale - + beginning of combat step étape de début du combat - + declare attackers step étape de déclaration des attaquants - + declare blockers step étape de déclaration des attaquants - + combat damage step étape de répartition des blessures - + end of combat step étape de fin de combat - + second main phase seconde phase principale - + ending phase phase de fin - + It is now the %1. need exemple C'est maintenant %1. @@ -1804,313 +1826,323 @@ Player - + &View graveyard &Voir le cimetière - + &View exile &Voir la zone d'exil - + Player "%1" Joueur "%1" - + &Graveyard &Cimetière - + &Exile &Exil - - - + + + Move to &top of library Déplacer vers le &dessus de la bibliothèque - - - + + + Move to &bottom of library Déplacer en des&sous de la bibliothèque - - + + Move to &graveyard Déplacer vers le cimetière - - + + Move to &exile Déplacer vers l'&exil - - + + Move to &hand Déplacer vers la &main - + &View library &Voir la bibliothèque - + View &top cards of library... Voir les cartes du &dessus de la bibliothèque... - + Reveal &library to Révéler la &bibliothèque à - + Reveal t&op card to Révéler la carte du &dessus à - + &View sideboard &Voir la réserve - + &Draw card &Piocher carte - + D&raw cards... P&iocher plusieurs cartes... - + + &Undo last draw + + + + Take &mulligan Prendre un &mulligan - + &Shuffle &Mélanger - + Move top cards to &graveyard... Déplacer les cartes du dessus vers le &cimetière... - + Move top cards to &exile... Déplacer les cartes du dessus vers le &exil... - + Put top card on &bottom Met la carte du dessus en &dessous - + &Hand &Main - + &Reveal to &Révéler à - + Reveal r&andom card to Révéler &aléatoirement une carte à - + &Sideboard Ré&serve - + &Library &Bibliothèque - + &Counters &Compteurs - + &Untap all permanents &Dégager tous les permanents - + R&oll die... Lancer le &dé... - + &Create token... &Créer un jeton... - + C&reate another token C&réer un autre jeton - + S&ay D&ire - + C&ard C&arte - + &All players &Tout les joueurs - + Ctrl+F3 - + F3 F3 - + Ctrl+W Ctrl+W - + F4 F4 - + Ctrl+D Ctrl+D - + Ctrl+E Ctrl+E - + + Ctrl+Shift+D + + + + Ctrl+M Ctrl+M - + Ctrl+S Ctrl+S - + Ctrl+U Ctrl+U - + Ctrl+I Ctrl+I - + Ctrl+T Ctrl+T - + Ctrl+G Ctrl+G - + View top cards of library Voir les cartes du dessus de la bibliothèque - + Number of cards: Nombre de cartes: - + Draw cards Piocher des cartes - - - - + + + + Number: Nombre: - + Move top cards to grave Déplacer les cartes du dessus dans le cimetière - + Move top cards to exile Déplacer les cartes du dessus vers le exil - + Roll die Lancer le dé... - + Number of sides: Nombre de faces: - + Set power/toughness Fixer force/endurance - + Please enter the new PT: maybe better with / Entrer la nouvelle F/E - + Set annotation Mettre annotation - + Please enter the new annotation: Entrez la nouvelle annotation - + Set counters Mettre des compteurs diff --git a/cockatrice/translations/cockatrice_ja.ts b/cockatrice/translations/cockatrice_ja.ts index edd7b78c..f558078d 100644 --- a/cockatrice/translations/cockatrice_ja.ts +++ b/cockatrice/translations/cockatrice_ja.ts @@ -1124,7 +1124,8 @@ - + + Error エラー @@ -1144,87 +1145,94 @@ ソケットエラー: %1 - - Protocol version mismatch. Local version: %1, remote version: %2. - + + You are trying to connect to an obsolete server. Please downgrade your Cockatrice version or connect to a suitable server. +Local version is %1, remote version is %2. + - + + Your Cockatrice client is obsolete. Please update your Cockatrice version. +Local version is %1, remote version is %2. + + + + Connecting to %1... %1へ接続しています... - + Disconnected 切断されました - + Logged in at %1 %1にログイン中 - + &Connect... 接続... - + &Disconnect 切断 - + Start &local game... ローカルゲームを開始... - + &Deck editor デッキエディター - + &Full screen フルスクリーン - + Ctrl+F - + &Settings... 設定... - + &Exit 終了 - + &Cockatrice - + &About Cockatrice - + &Help ヘルプ - + Are you sure? よろしいですか? - + There are still open games. Are you sure you want to quit? ゲームがまだ開いています.本当に退出しますか? @@ -1277,192 +1285,202 @@ - + + %1 undoes his last draw. + + + + + %1 undoes his last draw (%2). + + + + from table - + from graveyard - + from exile - + from hand - + the bottom card of his library - + from the bottom of his library - + the top card of his library - + from the top of his library - + from library - + from sideboard - + from the stack - + %1 gives %2 control over %3. - + %1 puts %2 into play%3. - + %1 puts %2%3 into graveyard. - + %1 exiles %2%3. - + %1 moves %2%3 to hand. - + %1 puts %2%3 into his library. - + %1 puts %2%3 on bottom of his library. - + %1 puts %2%3 on top of his library. - + %1 puts %2%3 into his library at position %4. - + %1 moves %2%3 to sideboard. - + %1 plays %2%3. - - + + a card - + %1 flips %2 face-down. - + %1 flips %2 face-up. - + %1 attaches %2 to %3's %4. - + %1 unattaches %2. - + %1 points from %2's %3 to %4's %5. - + %1 places %n counter(s) (%2) on %3 (now %4). %1 places a counter (%2) on %3 (now %4). - + %1 removes %n counter(s) (%2) from %3 (now %4). %1 removes a counter (%2) from %3 (now %4). - + red - + yellow - + green - + %1 sets counter %2 to %3 (%4%5). - + %1 sets PT of %2 to %3. - + %1 sets annotation of %2 to %3. - + %1 is looking at the top %2 cards %3. @@ -1527,52 +1545,52 @@ - + %1 destroys %2. - + %1 creates token: %2%3. - + %1 points from %2's %3 to %4. - + %1 %2 %3. - + %1 is looking at %2. - + %1 stops looking at %2. - + %1 reveals %2 to %3. - + %1 reveals %2. - + ending phase - + It is now %1's turn. @@ -1582,102 +1600,102 @@ - + %1 randomly reveals %2%3 to %4. - + %1 randomly reveals %2%3. - + %1 reveals %2%3 to %4. - + %1 reveals %2%3. - + untap step - + upkeep step - + draw step - + first main phase - + beginning of combat step - + declare attackers step - + declare blockers step - + combat damage step - + end of combat step - + second main phase - + It is now the %1. - + taps - + untaps - + %1 sets %2 to not untap normally. - + %1 sets %2 to untap normally. - + his permanents @@ -1766,312 +1784,322 @@ Player - - - + + + Move to &top of library ライブラリーの一番上へ移動 - - - + + + Move to &bottom of library ライブラリーの一番下へ移動 - - + + Move to &graveyard 墓地へ移動 - + &View library ライブラリーを見る - + Reveal &library to ライブラリーを公開する - + Reveal t&op card to 一番上のカードを公開する - + Move top cards to &graveyard... カードを上から墓地へ置く... - + F3 - + View &top cards of library... ライブラリーのカードを上からX枚見る - + &View graveyard 墓地を見る - + F4 - + &View sideboard サイドボードを見る - + Player "%1" プレイヤー "%1" - + &Hand 手札 - + &Library ライブラリー - + &Graveyard 墓地 - + &Sideboard サイドボード - + View top cards of library ライブラリーのカードを上からX枚見る - + Number of cards: カードの枚数: - + &Draw card カードを引く - + &View exile 追放領域を見る - + &Exile 追放領域 - - + + Move to &hand 手札に移動する - - + + Move to &exile 追放領域へ移動する - + Ctrl+W - + Ctrl+D - + D&raw cards... カードをX枚引く - + Ctrl+E - + Take &mulligan マリガンする - + Ctrl+M - + &Shuffle シャッフル - + Ctrl+S - + &Counters カウンター - + &Untap all permanents 全てのパーマネントをアンタップする - + Ctrl+U - + R&oll die... X面ダイスを振る - + Ctrl+I - + &Create token... トークンを作成する - + Ctrl+T - + C&reate another token 同じトークンを作成する - + Ctrl+G - + S&ay 発言する + &Undo last draw + + + + Move top cards to &exile... ライブラリーの一番上からX枚追放する - + Put top card on &bottom 一番上のカードを一番下に置く - + &Reveal to 公開する - + Reveal r&andom card to ランダムに公開する - + C&ard カード - + &All players 全てのプレイヤー - + Ctrl+F3 - + + Ctrl+Shift+D + + + + Draw cards カードを引く - - - - + + + + Number: 枚数 - + Move top cards to grave ライブラリーのトップからX枚墓地へ置く - + Move top cards to exile ライブラリーのトップからX枚追放領域へ置く - + Roll die ダイスを振る - + Number of sides: 面の数: - + Set power/toughness パワーとタフネスを設定する - + Please enter the new PT: 新しいP/Tを入力してください - + Set annotation 補足を付ける - + Please enter the new annotation: 新しい補足を付けてください - + Set counters カウンターを設定する diff --git a/cockatrice/translations/cockatrice_pt-br.ts b/cockatrice/translations/cockatrice_pt-br.ts index 6c277cf4..edc9cc4f 100644 --- a/cockatrice/translations/cockatrice_pt-br.ts +++ b/cockatrice/translations/cockatrice_pt-br.ts @@ -1146,7 +1146,8 @@ - + + Error Erro @@ -1166,87 +1167,98 @@ Erro de ligação:%1 - Protocol version mismatch. Local version: %1, remote version: %2. - Versão dos protocolos incompatível. Versão local:%1, versão remota:%2. + Versão dos protocolos incompatível. Versão local:%1, versão remota:%2. - + + You are trying to connect to an obsolete server. Please downgrade your Cockatrice version or connect to a suitable server. +Local version is %1, remote version is %2. + + + + + Your Cockatrice client is obsolete. Please update your Cockatrice version. +Local version is %1, remote version is %2. + + + + Connecting to %1... Conectando a %1... - + Disconnected Desconectado - + Logged in at %1 Logado em %1 - + &Connect... &Conectar... - + &Disconnect &Desconectar - + Start &local game... Iniciar jogo &local... - + &Deck editor Editor de &decks - + &Full screen Tela &cheia - + Ctrl+F Ctrl+F - + &Settings... &Configurações... - + &Exit &Sair - + &Cockatrice &Cockatrice - + &About Cockatrice So&bre o Cockatrice - + &Help &Ajuda - + Are you sure? Você tem certeza? - + There are still open games. Are you sure you want to quit? Ainda existem jogos abertos. Você tem certeza que deseja sair? @@ -1299,148 +1311,158 @@ %1 tirou um %2 com um dado de %3 lados. - + + %1 undoes his last draw. + + + + + %1 undoes his last draw (%2). + + + + from table vindo do campo de batalha - + from graveyard vindo do cemitério - + from exile vindo do exílio - + from hand vindo da mão - + the bottom card of his library o card do fundo do seu grimório - + from the bottom of his library vindo do fundo do seu grimório - + the top card of his library o card do topo do seu grimório - + from the top of his library vindo do topo do seu grimório - + from library vindo do grimório - + from sideboard vindo do sideboard - + from the stack vindo da pilha - + %1 gives %2 control over %3. %1 dá controle para %2 sobre %3. - + %1 puts %2 into play%3. %1 põe %2 no campo de batalha %3. - + %1 puts %2%3 into graveyard. %1 põe %2 no cemitério%3. - + %1 exiles %2%3. %1 exila %2%3. - + %1 moves %2%3 to hand. %1 move %2 para a mão%3. - + %1 puts %2%3 into his library. %1 põe %2 no seu grimório%3. - + %1 puts %2%3 on bottom of his library. %1 põe %2 no fundo do seu grimório%3. - + %1 puts %2%3 on top of his library. %1 põe %2 no topo do seu grimório%3. - + %1 puts %2%3 into his library at position %4. %1 põe %2 no seu grimório na posição %4%3. - + %1 moves %2%3 to sideboard. %1 move %2 para o sideboard%3. - + %1 plays %2%3. %1 põe %2 na pilha%3. - - + + a card um card - + %1 flips %2 face-down. %1 vira %2 para baixo. - + %1 flips %2 face-up. %1 vira %2 para cima. - + %1 attaches %2 to %3's %4. %1 anexa %2 a %4 de %3. - + %1 unattaches %2. %1 desanexa %2. - + %1 points from %2's %3 to %4's %5. %1 aponta para %5 de %4 com %3 de %2. - + %1 places %n counter(s) (%2) on %3 (now %4). %1 põe %n marcador(es) (%2) em %3 (agora com %4). @@ -1448,7 +1470,7 @@ - + %1 removes %n counter(s) (%2) from %3 (now %4). %1 tira %n marcador(es) (%2) em %3 (agora com %4). @@ -1456,37 +1478,37 @@ - + red vermelho - + yellow amarelo - + green verde - + %1 sets counter %2 to %3 (%4%5). %1 altera o marcador %2 para %3 (%4%5). - + %1 sets PT of %2 to %3. %1 altera o P/R de %2 para %3. - + %1 sets annotation of %2 to %3. %1 altera a nota de %2 para%3. - + %1 is looking at the top %2 cards %3. %1 está olhando para os %2 cards do topo %3. @@ -1551,52 +1573,52 @@ %1 compra %2 cards. - + %1 destroys %2. %1 destrói %2. - + %1 creates token: %2%3. %1 cria a ficha: %2%3. - + %1 points from %2's %3 to %4. %1 aponta para %4 com %3 de %2 . - + %1 %2 %3. %1 %2 %3. - + %1 is looking at %2. %1 está olhando para %2. - + %1 stops looking at %2. %1 para de olhar para %2. - + %1 reveals %2 to %3. %1 revela %2 para %3. - + %1 reveals %2. %1 revela %2. - + ending phase fase final - + It is now %1's turn. Agora é o turno de %1. @@ -1606,102 +1628,102 @@ %1 embaralha o seu grimório. - + %1 randomly reveals %2%3 to %4. %1 revela aleatoriamente %2%3. para %4. - + %1 randomly reveals %2%3. %1 revela aleatoriamente %2%3. - + %1 reveals %2%3 to %4. %1 revela %2%3 para %4. - + %1 reveals %2%3. %1 revela %2%3. - + untap step etapa de desvirar - + upkeep step etapa de manutenção - + draw step etapa de compra - + first main phase primeira fase principal - + beginning of combat step etapa de início de combate - + declare attackers step etapa de declaracão de atacantes - + declare blockers step etapa de declaração de bloqueadores - + combat damage step etapa de dano de combate - + end of combat step etapa de fim de combate - + second main phase segunda fase principal - + It is now the %1. Agora é a %1. - + taps vira - + untaps desvira - + %1 sets %2 to not untap normally. %1 define que %2 não desvira normalmente. - + %1 sets %2 to untap normally. %1 define que %2 desvira normalmente. - + his permanents as suas permanentes @@ -1790,312 +1812,322 @@ Player - - - + + + Move to &top of library Mover para o &topo do grimório - - - + + + Move to &bottom of library Mover para o &fundo do grimório - - + + Move to &graveyard Mover para o &cemitério - + &View library &Ver grimório - + Reveal &library to Revelar o &grimório para - + Reveal t&op card to Revelar o card do t&opo para - + Move top cards to &graveyard... Mover os cards do topo para o ce&mitério... - + F3 F3 - + View &top cards of library... Ver os cards do to&po do grimório... - + &View graveyard V&er cemitério - + F4 F4 - + &View sideboard &Ver sideboard - + Player "%1" Jogador "%1" - + &Hand &Mão - + &Library &Grimório - + &Graveyard &Cemitério - + &Sideboard &Sideboard - + View top cards of library Ver os cards do topo do grimório - + Number of cards: Número de cards: - + &Draw card Co&mprar card - + &View exile &Ver exílio - + &Exile &Exílio - - + + Move to &hand Mo&ver para a mão - - + + Move to &exile Mover para o &exílio - + Ctrl+W Ctrl+W - + Ctrl+D Ctrl+D - + D&raw cards... Comprar car&ds... - + Ctrl+E Ctrl+E - + Take &mulligan Pedir mu&lligan - + Ctrl+M Ctrl+M - + &Shuffle &Embaralhar - + Ctrl+S Ctrl+S - + &Counters &Marcadores - + &Untap all permanents Des&virar todos as permanentes - + Ctrl+U Ctrl+U - + R&oll die... &Jogar dado... - + Ctrl+I Ctrl+I - + &Create token... Criar fich&a... - + Ctrl+T Ctrl+T - + C&reate another token Criar &outra ficha - + Ctrl+G Ctrl+G - + S&ay &Falar + &Undo last draw + + + + Move top cards to &exile... Mover os cards do topo para o e&xílio... - + Put top card on &bottom Colocar o card do topo no &fundo - + &Reveal to Re&velar para - + Reveal r&andom card to Revelar card alea&tório para - + C&ard C&ard - + &All players To&dos os jogadores - + Ctrl+F3 - + + Ctrl+Shift+D + + + + Draw cards Comprar cards - - - - + + + + Number: Número: - + Move top cards to grave Mover os cards do topo para o cemitério - + Move top cards to exile Mover os cards do topo para o exílio - + Roll die Jogar dado - + Number of sides: Número de lados: - + Set power/toughness Alterar poder/resistência - + Please enter the new PT: Por favor, entre com o novo P/R: - + Set annotation Alterar nota - + Please enter the new annotation: Por favor, entre com a nova nota: - + Set counters Alterar marcadores diff --git a/cockatrice/translations/cockatrice_pt.ts b/cockatrice/translations/cockatrice_pt.ts index b91ec1b4..787ee460 100644 --- a/cockatrice/translations/cockatrice_pt.ts +++ b/cockatrice/translations/cockatrice_pt.ts @@ -1150,7 +1150,8 @@ - + + Error Erro @@ -1170,87 +1171,98 @@ Erro de ligação:%1 - Protocol version mismatch. Local version: %1, remote version: %2. - Versão dos protocolos incompatível. Versão local:%1, versão remota:%2. + Versão dos protocolos incompatível. Versão local:%1, versão remota:%2. - + + You are trying to connect to an obsolete server. Please downgrade your Cockatrice version or connect to a suitable server. +Local version is %1, remote version is %2. + + + + + Your Cockatrice client is obsolete. Please update your Cockatrice version. +Local version is %1, remote version is %2. + + + + Connecting to %1... Ligando a %1... - + Disconnected Desligado - + Logged in at %1 Logado em %1 - + &Connect... &Ligar... - + &Disconnect &Desligar - + Start &local game... Começar &jogo local... - + &Deck editor &Editor de decks - + &Full screen Ecrã &inteiro - + Ctrl+F Ctrl+F - + &Settings... &Configurações... - + &Exit &Sair - + &Cockatrice &Cockatrice - + &About Cockatrice S&obre o Cockatrice - + &Help &Ajuda - + Are you sure? Tens a certeza? - + There are still open games. Are you sure you want to quit? Ainda há jogos abertos. Tem a certeza que deseja sair? @@ -1368,163 +1380,173 @@ %1 compra %2 cartas. - + from table vindo da mesa - + from graveyard vindo do cemitério - + from exile vindo do exílio - + from hand vindo da mão - + the bottom card of his library a carta do fundo do seu grimório - + from the bottom of his library do fundo do seu grimório - + the top card of his library a carta do topo do seu grimório - + from the top of his library do topo do seu grimório - + from library do grimório - + from sideboard do sideboard - + from the stack da pilha - + %1 puts %2 into play%3. %1 coloca %2 em jogo %3. - + %1 puts %2%3 into graveyard. %1 coloca %2%3 no cemitério. - + %1 exiles %2%3. %1 exila %2%3. - + %1 moves %2%3 to hand. %1 move %2%3 para a mão. - + %1 puts %2%3 into his library. %1 coloca %2%3 no seu grimório. - + %1 puts %2%3 on bottom of his library. %1 coloca %2%3 no topo do seu grimório. - + %1 puts %2%3 on top of his library. %1 coloca %2%3 no topo do seu grimório. - + %1 puts %2%3 into his library at position %4. %1 coloca %2%3 no seu grimório na posição %4. - + %1 moves %2%3 to sideboard. %1 move %2%3 para o sideboard. - + %1 plays %2%3. %1 joga %2%3. - - + + a card uma carta - + + %1 undoes his last draw. + + + + + %1 undoes his last draw (%2). + + + + %1 gives %2 control over %3. %1 dá controlo sobre %3 a %2. - + %1 flips %2 face-down. %1 volta a face de %2 para baixo. - + %1 flips %2 face-up. %1 volta a face de %2 para cima. - + %1 destroys %2. %1 destroí %2. - + %1 attaches %2 to %3's %4. %1 anexa %2 a %4 de %3. - + %1 unattaches %2. %1 desanexa %2. - + %1 creates token: %2%3. %1 cria ficha: %2%3. - + %1 points from %2's %3 to %4. %1 aponta de %3 de %2 para %4. - + %1 points from %2's %3 to %4's %5. %1 aponta de %3 de %2 para %5 de %4. - + %1 places %n counter(s) (%2) on %3 (now %4). %1 coloca %n marcador (%2)de %3 (agora com %4). @@ -1532,7 +1554,7 @@ - + %1 removes %n counter(s) (%2) from %3 (now %4). %1 remove %n marcador (%2)de %3 (agora com %4). @@ -1540,172 +1562,172 @@ - + red vermelho - + yellow amarelo - + green verde - + his permanents as suas permanentes - + %1 %2 %3. %1 %2 %3. - + taps vira - + untaps desvira - + %1 sets counter %2 to %3 (%4%5). %1 altera o número de marcadores %2 para %3(%4%5). - + %1 sets %2 to not untap normally. %1 define %2 para não desvirar normalmente. - + %1 sets %2 to untap normally. %1 define %2 para desvirar normalmente. - + %1 sets PT of %2 to %3. %1 define o P/R de %2 como %3. - + %1 sets annotation of %2 to %3. %1 coloca uma nota de %2 em%3. - + %1 is looking at the top %2 cards %3. %1 está a olhar para as %2 cartas do topo %3. - + %1 is looking at %2. %1 está a olhar para %2. - + %1 stops looking at %2. %1 para de olhar para %2. - + %1 reveals %2 to %3. %1 revela %2 a %3. - + %1 reveals %2. %1 revela %2. - + %1 randomly reveals %2%3 to %4. %1 revela aleatoreamente %2%3. a %4. - + %1 randomly reveals %2%3. %1 revela aleatoreamente %2%3. - + %1 reveals %2%3 to %4. %1 revela %2%3 a %4. - + %1 reveals %2%3. %1 revela %2%3. - + It is now %1's turn. É agora o turno de %1. - + untap step Etapa de Desvirar - + upkeep step Etapa de Manutenção - + draw step Etapa de Compra - + first main phase 1ª Fase Principal (pré-combate) - + beginning of combat step Etapa de Início de Combate - + declare attackers step Etapa de Declaração de Atacantes - + declare blockers step Etapa de Declaração de Bloqueadores - + combat damage step Etapa de Dano de Combate - + end of combat step Etapa de Fim de Combate - + second main phase 2ª Fase Principal (pós-combate) - + ending phase Fase Final - + It is now the %1. É agora a %1. @@ -1794,312 +1816,322 @@ Player - + &View graveyard &Ver cemitério - + &View exile &Ver exílio - + Player "%1" Jogador "%1" - + &Graveyard &Cemitério - + &Exile &Exílio - - - + + + Move to &top of library Mover para o &topo do grimório - - - + + + Move to &bottom of library Mover para o &fundo do grimório - - + + Move to &graveyard Mover para o &cemitério - - + + Move to &exile Mover para o &exílio - - + + Move to &hand Mover para a &mão - + &View library &Ver grimório - + View &top cards of library... Ver as cartas do &topo do grimório... - + Reveal &library to Revelar &grimório a - + Reveal t&op card to Revelar carta do t&opo a - + &View sideboard &Ver sideboard - + &Draw card &Comprar carta - + D&raw cards... C&omprar cartas... - + + &Undo last draw + + + + Take &mulligan Fazer &mulligan - + &Shuffle &Baralhar - + Move top cards to &graveyard... Mover as cartas do topo para o &cemitério... - + Move top cards to &exile... Mover as cartas do topo para o &exílio... - + Put top card on &bottom Colocar carta do topo no &fundo - + &Hand &Mão - + &Reveal to &Revelar a - + Reveal r&andom card to Revelar carta &aleatória a - + &Sideboard &Sideboard - + &Library &Grimório - + &Counters &Marcadores - + &Untap all permanents &Desvirar topas as permanentes - + R&oll die... &Lançar dado... - + &Create token... Criar fic&ha... - + C&reate another token Cr&iar outra ficha - + S&ay &Dizer - + C&ard C&arta - + &All players Todos os &jogadores - + Ctrl+F3 - + F3 F3 - + Ctrl+W Ctrl+W - + F4 F4 - + Ctrl+D Ctrl+D - + Ctrl+E Ctrl+E - + + Ctrl+Shift+D + + + + Ctrl+M Ctrl+M - + Ctrl+S Ctrl+S - + Ctrl+U Ctrl+U - + Ctrl+I Ctrl+I - + Ctrl+T Ctrl+T - + Ctrl+G Ctrl+G - + View top cards of library Ver as cartas do topo do grimório - + Number of cards: Número de cartas: - + Draw cards Comprar cartas - - - - + + + + Number: Número: - + Move top cards to grave Mover as cartas to topo para o cemitério - + Move top cards to exile Mover as cartas to topo para o exílio - + Roll die Lançar dado - + Number of sides: Número de faces: - + Set power/toughness Definir poder/resistência - + Please enter the new PT: Por favor introduza o novo P/R: - + Set annotation Colocar nota - + Please enter the new annotation: Por favor introduza a nova nota: - + Set counters Definir marcadores diff --git a/cockatrice/translations/cockatrice_ru.ts b/cockatrice/translations/cockatrice_ru.ts index 278474d5..e669e214 100644 --- a/cockatrice/translations/cockatrice_ru.ts +++ b/cockatrice/translations/cockatrice_ru.ts @@ -1077,7 +1077,8 @@ - + + Error @@ -1097,87 +1098,94 @@ - - Protocol version mismatch. Local version: %1, remote version: %2. + + You are trying to connect to an obsolete server. Please downgrade your Cockatrice version or connect to a suitable server. +Local version is %1, remote version is %2. - + + Your Cockatrice client is obsolete. Please update your Cockatrice version. +Local version is %1, remote version is %2. + + + + Connecting to %1... - + Disconnected - + Logged in at %1 - + &Connect... - + &Disconnect - + Start &local game... - + &Deck editor - + &Full screen - + Ctrl+F - + &Settings... - + &Exit - + &Cockatrice - + &About Cockatrice - + &Help - + Are you sure? - + There are still open games. Are you sure you want to quit? @@ -1295,163 +1303,173 @@ - + + %1 undoes his last draw. + + + + + %1 undoes his last draw (%2). + + + + from table - + from graveyard - + from exile - + from hand - + the bottom card of his library - + from the bottom of his library - + the top card of his library - + from the top of his library - + from library - + from sideboard - + from the stack - - + + a card - + %1 gives %2 control over %3. - + %1 puts %2 into play%3. - + %1 puts %2%3 into graveyard. - + %1 exiles %2%3. - + %1 moves %2%3 to hand. - + %1 puts %2%3 into his library. - + %1 puts %2%3 on bottom of his library. - + %1 puts %2%3 on top of his library. - + %1 puts %2%3 into his library at position %4. - + %1 moves %2%3 to sideboard. - + %1 plays %2%3. - + %1 flips %2 face-down. - + %1 flips %2 face-up. - + %1 destroys %2. - + %1 attaches %2 to %3's %4. - + %1 unattaches %2. - + %1 creates token: %2%3. - + %1 points from %2's %3 to %4. - + %1 points from %2's %3 to %4's %5. - + %1 places %n counter(s) (%2) on %3 (now %4). @@ -1460,7 +1478,7 @@ - + %1 removes %n counter(s) (%2) from %3 (now %4). @@ -1469,172 +1487,172 @@ - + red - + yellow - + green - + his permanents - + %1 %2 %3. - + taps - + untaps - + %1 sets counter %2 to %3 (%4%5). - + %1 sets %2 to not untap normally. - + %1 sets %2 to untap normally. - + %1 sets PT of %2 to %3. - + %1 sets annotation of %2 to %3. - + %1 is looking at the top %2 cards %3. - + %1 is looking at %2. - + %1 stops looking at %2. - + %1 reveals %2 to %3. - + %1 reveals %2. - + %1 randomly reveals %2%3 to %4. - + %1 randomly reveals %2%3. - + %1 reveals %2%3 to %4. - + %1 reveals %2%3. - + It is now %1's turn. - + untap step - + upkeep step - + draw step - + first main phase - + beginning of combat step - + declare attackers step - + declare blockers step - + combat damage step - + end of combat step - + second main phase - + ending phase - + It is now the %1. @@ -1723,312 +1741,322 @@ Player - + &View graveyard - + &View exile - + Player "%1" - + &Graveyard - - - &Exile - - - - - Move to &top of library - - - - - - - Move to &bottom of library - - - - - - Move to &graveyard + &Exile - Move to &exile + + Move to &top of library + + + + + + + Move to &bottom of library + + + + + + Move to &graveyard + Move to &exile + + + + + Move to &hand - + &View library - + View &top cards of library... - + Reveal &library to - + Reveal t&op card to - + &View sideboard - + &Draw card - + D&raw cards... - - - Take &mulligan - - - - - &Shuffle - - - - - Move top cards to &graveyard... - - - Move top cards to &exile... + &Undo last draw - Put top card on &bottom + Take &mulligan + + + + + &Shuffle - &Hand + Move top cards to &graveyard... - &Reveal to + Move top cards to &exile... - Reveal r&andom card to - - - - - &Sideboard + Put top card on &bottom - &Library + &Hand - &Counters + &Reveal to + + + + + Reveal r&andom card to - &Untap all permanents + &Sideboard - R&oll die... + &Library - &Create token... - - - - - C&reate another token + &Counters + &Untap all permanents + + + + + R&oll die... + + + + + &Create token... + + + + + C&reate another token + + + + S&ay - + C&ard - + &All players - + Ctrl+F3 - + F3 - + Ctrl+W - + F4 - + Ctrl+D - + Ctrl+E - - - Ctrl+M - - - - - Ctrl+S - - - - - Ctrl+U - - - - - Ctrl+I - - - Ctrl+T + Ctrl+Shift+D + Ctrl+M + + + + + Ctrl+S + + + + + Ctrl+U + + + + + Ctrl+I + + + + + Ctrl+T + + + + Ctrl+G - + View top cards of library - + Number of cards: - + Draw cards - - - - + + + + Number: - + Move top cards to grave - + Move top cards to exile - + Roll die - + Number of sides: - + Set power/toughness - + Please enter the new PT: - + Set annotation - + Please enter the new annotation: - + Set counters diff --git a/common/protocol.cpp b/common/protocol.cpp index 3448de77..fbaa13fe 100644 --- a/common/protocol.cpp +++ b/common/protocol.cpp @@ -138,26 +138,32 @@ void CommandContainer::setResponse(ProtocolResponse *_resp) resp = _resp; } -void CommandContainer::enqueueGameEventPublic(GameEvent *event, int gameId) +void CommandContainer::enqueueGameEventPublic(GameEvent *event, int gameId, GameEventContext *context) { if (!gameEventQueuePublic) gameEventQueuePublic = new GameEventContainer(QList(), gameId); gameEventQueuePublic->addGameEvent(event); + if (context) + gameEventQueuePublic->setContext(context); } -void CommandContainer::enqueueGameEventOmniscient(GameEvent *event, int gameId) +void CommandContainer::enqueueGameEventOmniscient(GameEvent *event, int gameId, GameEventContext *context) { if (!gameEventQueueOmniscient) gameEventQueueOmniscient = new GameEventContainer(QList(), gameId); gameEventQueueOmniscient->addGameEvent(event); + if (context) + gameEventQueueOmniscient->setContext(context); } -void CommandContainer::enqueueGameEventPrivate(GameEvent *event, int gameId, int playerId) +void CommandContainer::enqueueGameEventPrivate(GameEvent *event, int gameId, int playerId, GameEventContext *context) { if (!gameEventQueuePrivate) gameEventQueuePrivate = new GameEventContainer(QList(), gameId); gameEventQueuePrivate->addGameEvent(event); privatePlayerId = playerId; + if (context) + gameEventQueuePrivate->setContext(context); } Command_DeckUpload::Command_DeckUpload(DeckList *_deck, const QString &_path) diff --git a/common/protocol.h b/common/protocol.h index d23969d6..ab6a6160 100644 --- a/common/protocol.h +++ b/common/protocol.h @@ -17,6 +17,7 @@ class ProtocolResponse; class DeckList; class GameEvent; class GameEventContainer; +class GameEventContext; class MoveCardToZone; enum ItemId { @@ -55,7 +56,7 @@ private: static void initializeHashAuto(); bool receiverMayDelete; public: - static const int protocolVersion = 11; + static const int protocolVersion = 12; static void initializeHash(); virtual int getItemId() const = 0; bool getReceiverMayDelete() const { return receiverMayDelete; } @@ -132,11 +133,11 @@ public: const QList &getItemQueue() const { return itemQueue; } void enqueueItem(ProtocolItem *item) { itemQueue.append(item); } GameEventContainer *getGameEventQueuePublic() const { return gameEventQueuePublic; } - void enqueueGameEventPublic(GameEvent *event, int gameId); + void enqueueGameEventPublic(GameEvent *event, int gameId, GameEventContext *context = 0); GameEventContainer *getGameEventQueueOmniscient() const { return gameEventQueueOmniscient; } - void enqueueGameEventOmniscient(GameEvent *event, int gameId); + void enqueueGameEventOmniscient(GameEvent *event, int gameId, GameEventContext *context = 0); GameEventContainer *getGameEventQueuePrivate() const { return gameEventQueuePrivate; } - void enqueueGameEventPrivate(GameEvent *event, int gameId, int playerId = -1); + void enqueueGameEventPrivate(GameEvent *event, int gameId, int playerId = -1, GameEventContext *context = 0); int getPrivatePlayerId() const { return privatePlayerId; } }; diff --git a/common/protocol_item_ids.h b/common/protocol_item_ids.h index 2ed9fe3a..f6201b19 100644 --- a/common/protocol_item_ids.h +++ b/common/protocol_item_ids.h @@ -21,53 +21,55 @@ ItemId_Command_Shuffle = 1019, ItemId_Command_Mulligan = 1020, ItemId_Command_RollDie = 1021, ItemId_Command_DrawCards = 1022, -ItemId_Command_FlipCard = 1023, -ItemId_Command_AttachCard = 1024, -ItemId_Command_CreateToken = 1025, -ItemId_Command_CreateArrow = 1026, -ItemId_Command_DeleteArrow = 1027, -ItemId_Command_SetCardAttr = 1028, -ItemId_Command_SetCardCounter = 1029, -ItemId_Command_IncCardCounter = 1030, -ItemId_Command_ReadyStart = 1031, -ItemId_Command_Concede = 1032, -ItemId_Command_IncCounter = 1033, -ItemId_Command_CreateCounter = 1034, -ItemId_Command_SetCounter = 1035, -ItemId_Command_DelCounter = 1036, -ItemId_Command_NextTurn = 1037, -ItemId_Command_SetActivePhase = 1038, -ItemId_Command_DumpZone = 1039, -ItemId_Command_StopDumpZone = 1040, -ItemId_Command_RevealCards = 1041, -ItemId_Event_Say = 1042, -ItemId_Event_Leave = 1043, -ItemId_Event_GameClosed = 1044, -ItemId_Event_Shuffle = 1045, -ItemId_Event_RollDie = 1046, -ItemId_Event_MoveCard = 1047, -ItemId_Event_FlipCard = 1048, -ItemId_Event_DestroyCard = 1049, -ItemId_Event_AttachCard = 1050, -ItemId_Event_CreateToken = 1051, -ItemId_Event_DeleteArrow = 1052, -ItemId_Event_SetCardAttr = 1053, -ItemId_Event_SetCardCounter = 1054, -ItemId_Event_SetCounter = 1055, -ItemId_Event_DelCounter = 1056, -ItemId_Event_SetActivePlayer = 1057, -ItemId_Event_SetActivePhase = 1058, -ItemId_Event_DumpZone = 1059, -ItemId_Event_StopDumpZone = 1060, -ItemId_Event_ServerMessage = 1061, -ItemId_Event_Message = 1062, -ItemId_Event_GameJoined = 1063, -ItemId_Event_UserLeft = 1064, -ItemId_Event_LeaveRoom = 1065, -ItemId_Event_RoomSay = 1066, -ItemId_Context_ReadyStart = 1067, -ItemId_Context_Concede = 1068, -ItemId_Context_DeckSelect = 1069, -ItemId_Command_UpdateServerMessage = 1070, -ItemId_Other = 1071 +ItemId_Command_UndoDraw = 1023, +ItemId_Command_FlipCard = 1024, +ItemId_Command_AttachCard = 1025, +ItemId_Command_CreateToken = 1026, +ItemId_Command_CreateArrow = 1027, +ItemId_Command_DeleteArrow = 1028, +ItemId_Command_SetCardAttr = 1029, +ItemId_Command_SetCardCounter = 1030, +ItemId_Command_IncCardCounter = 1031, +ItemId_Command_ReadyStart = 1032, +ItemId_Command_Concede = 1033, +ItemId_Command_IncCounter = 1034, +ItemId_Command_CreateCounter = 1035, +ItemId_Command_SetCounter = 1036, +ItemId_Command_DelCounter = 1037, +ItemId_Command_NextTurn = 1038, +ItemId_Command_SetActivePhase = 1039, +ItemId_Command_DumpZone = 1040, +ItemId_Command_StopDumpZone = 1041, +ItemId_Command_RevealCards = 1042, +ItemId_Event_Say = 1043, +ItemId_Event_Leave = 1044, +ItemId_Event_GameClosed = 1045, +ItemId_Event_Shuffle = 1046, +ItemId_Event_RollDie = 1047, +ItemId_Event_MoveCard = 1048, +ItemId_Event_FlipCard = 1049, +ItemId_Event_DestroyCard = 1050, +ItemId_Event_AttachCard = 1051, +ItemId_Event_CreateToken = 1052, +ItemId_Event_DeleteArrow = 1053, +ItemId_Event_SetCardAttr = 1054, +ItemId_Event_SetCardCounter = 1055, +ItemId_Event_SetCounter = 1056, +ItemId_Event_DelCounter = 1057, +ItemId_Event_SetActivePlayer = 1058, +ItemId_Event_SetActivePhase = 1059, +ItemId_Event_DumpZone = 1060, +ItemId_Event_StopDumpZone = 1061, +ItemId_Event_ServerMessage = 1062, +ItemId_Event_Message = 1063, +ItemId_Event_GameJoined = 1064, +ItemId_Event_UserLeft = 1065, +ItemId_Event_LeaveRoom = 1066, +ItemId_Event_RoomSay = 1067, +ItemId_Context_ReadyStart = 1068, +ItemId_Context_Concede = 1069, +ItemId_Context_DeckSelect = 1070, +ItemId_Context_UndoDraw = 1071, +ItemId_Command_UpdateServerMessage = 1072, +ItemId_Other = 1073 }; diff --git a/common/protocol_items.cpp b/common/protocol_items.cpp index 0265652f..0970c181 100644 --- a/common/protocol_items.cpp +++ b/common/protocol_items.cpp @@ -114,6 +114,10 @@ Command_DrawCards::Command_DrawCards(int _gameId, int _number) { insertItem(new SerializableItem_Int("number", _number)); } +Command_UndoDraw::Command_UndoDraw(int _gameId) + : GameCommand("undo_draw", _gameId) +{ +} Command_FlipCard::Command_FlipCard(int _gameId, const QString &_zone, int _cardId, bool _faceDown) : GameCommand("flip_card", _gameId) { @@ -425,6 +429,10 @@ Context_DeckSelect::Context_DeckSelect(int _deckId) { insertItem(new SerializableItem_Int("deck_id", _deckId)); } +Context_UndoDraw::Context_UndoDraw() + : GameEventContext("undo_draw") +{ +} Command_UpdateServerMessage::Command_UpdateServerMessage() : AdminCommand("update_server_message") { @@ -453,6 +461,7 @@ void ProtocolItem::initializeHashAuto() itemNameHash.insert("cmdmulligan", Command_Mulligan::newItem); itemNameHash.insert("cmdroll_die", Command_RollDie::newItem); itemNameHash.insert("cmddraw_cards", Command_DrawCards::newItem); + itemNameHash.insert("cmdundo_draw", Command_UndoDraw::newItem); itemNameHash.insert("cmdflip_card", Command_FlipCard::newItem); itemNameHash.insert("cmdattach_card", Command_AttachCard::newItem); itemNameHash.insert("cmdcreate_token", Command_CreateToken::newItem); @@ -500,5 +509,6 @@ void ProtocolItem::initializeHashAuto() itemNameHash.insert("game_event_contextready_start", Context_ReadyStart::newItem); itemNameHash.insert("game_event_contextconcede", Context_Concede::newItem); itemNameHash.insert("game_event_contextdeck_select", Context_DeckSelect::newItem); + itemNameHash.insert("game_event_contextundo_draw", Context_UndoDraw::newItem); itemNameHash.insert("cmdupdate_server_message", Command_UpdateServerMessage::newItem); } diff --git a/common/protocol_items.dat b/common/protocol_items.dat index db617398..47b4a099 100644 --- a/common/protocol_items.dat +++ b/common/protocol_items.dat @@ -20,6 +20,7 @@ 2:mulligan 2:roll_die:i,sides 2:draw_cards:i,number +2:undo_draw 2:flip_card:s,zone:i,card_id:b,face_down 2:attach_card:s,start_zone:i,card_id:i,target_player_id:s,target_zone:i,target_card_id 2:create_token:s,zone:s,card_name:s,color:s,pt:s,annotation:b,destroy:i,x:i,y @@ -67,4 +68,5 @@ 6:ready_start 6:concede 6:deck_select:i,deck_id +6:undo_draw 7:update_server_message diff --git a/common/protocol_items.h b/common/protocol_items.h index aed7c43c..9655a834 100644 --- a/common/protocol_items.h +++ b/common/protocol_items.h @@ -182,6 +182,13 @@ public: static SerializableItem *newItem() { return new Command_DrawCards; } int getItemId() const { return ItemId_Command_DrawCards; } }; +class Command_UndoDraw : public GameCommand { + Q_OBJECT +public: + Command_UndoDraw(int _gameId = -1); + static SerializableItem *newItem() { return new Command_UndoDraw; } + int getItemId() const { return ItemId_Command_UndoDraw; } +}; class Command_FlipCard : public GameCommand { Q_OBJECT public: @@ -634,6 +641,13 @@ public: static SerializableItem *newItem() { return new Context_DeckSelect; } int getItemId() const { return ItemId_Context_DeckSelect; } }; +class Context_UndoDraw : public GameEventContext { + Q_OBJECT +public: + Context_UndoDraw(); + static SerializableItem *newItem() { return new Context_UndoDraw; } + int getItemId() const { return ItemId_Context_UndoDraw; } +}; class Command_UpdateServerMessage : public AdminCommand { Q_OBJECT public: diff --git a/common/server_player.cpp b/common/server_player.cpp index d479edce..2981269d 100644 --- a/common/server_player.cpp +++ b/common/server_player.cpp @@ -150,6 +150,8 @@ void Server_Player::clearZones() while (arrowIterator.hasNext()) delete arrowIterator.next().value(); arrows.clear(); + + lastDrawList.clear(); } ServerInfo_PlayerProperties *Server_Player::getProperties() @@ -199,6 +201,37 @@ bool Server_Player::deleteCounter(int counterId) return true; } +ResponseCode Server_Player::drawCards(CommandContainer *cont, int number) +{ + Server_CardZone *deckZone = zones.value("deck"); + Server_CardZone *handZone = zones.value("hand"); + if (deckZone->cards.size() < number) + number = deckZone->cards.size(); + + QList cardListPrivate; + QList cardListOmniscient; + for (int i = 0; i < number; ++i) { + Server_Card *card = deckZone->cards.takeFirst(); + handZone->cards.append(card); + lastDrawList.append(card->getId()); + cardListPrivate.append(new ServerInfo_Card(card->getId(), card->getName())); + cardListOmniscient.append(new ServerInfo_Card(card->getId(), card->getName())); + } + cont->enqueueGameEventPrivate(new Event_DrawCards(playerId, cardListPrivate.size(), cardListPrivate), game->getGameId()); + cont->enqueueGameEventOmniscient(new Event_DrawCards(playerId, cardListOmniscient.size(), cardListOmniscient), game->getGameId()); + cont->enqueueGameEventPublic(new Event_DrawCards(playerId, cardListPrivate.size()), game->getGameId()); + + return RespOk; +} + +ResponseCode Server_Player::undoDraw(CommandContainer *cont) +{ + if (lastDrawList.isEmpty()) + return RespContextError; + + return moveCard(cont, zones.value("hand"), QList() << lastDrawList.takeLast(), zones.value("deck"), 0, 0, false, false, false, true); +} + ResponseCode Server_Player::moveCard(CommandContainer *cont, const QString &_startZone, const QList &_cardIds, int targetPlayerId, const QString &_targetZone, int x, int y, bool faceDown, bool tapped) { Server_CardZone *startzone = getZones().value(_startZone); @@ -233,7 +266,7 @@ public: } }; -ResponseCode Server_Player::moveCard(CommandContainer *cont, Server_CardZone *startzone, const QList &_cardIds, Server_CardZone *targetzone, int x, int y, bool faceDown, bool tapped, bool fixFreeSpaces) +ResponseCode Server_Player::moveCard(CommandContainer *cont, Server_CardZone *startzone, const QList &_cardIds, Server_CardZone *targetzone, int x, int y, bool faceDown, bool tapped, bool fixFreeSpaces, bool undoingDraw) { // Disallow controller change to other zones than the table. if (((targetzone->getType() != PublicZone) || !targetzone->hasCoords()) && (startzone->getPlayer() != targetzone->getPlayer())) @@ -262,6 +295,13 @@ ResponseCode Server_Player::moveCard(CommandContainer *cont, Server_CardZone *st Server_Card *card = cardsToMove[cardIndex].first; int originalPosition = cardsToMove[cardIndex].second; int position = startzone->removeCard(card); + if (startzone->getName() == "hand") { + if (undoingDraw) + lastDrawList.removeAt(lastDrawList.indexOf(card->getId())); + else if (lastDrawList.contains(card->getId())) + lastDrawList.clear(); + } + if ((startzone == targetzone) && !startzone->hasCoords()) { if (!secondHalf && (originalPosition < x)) { xIndex = -1; @@ -346,8 +386,8 @@ ResponseCode Server_Player::moveCard(CommandContainer *cont, Server_CardZone *st int privatePosition = -1; if (startzone->getType() == HiddenZone) privatePosition = position; - cont->enqueueGameEventPrivate(new Event_MoveCard(getPlayerId(), privateOldCardId, privateCardName, startzone->getName(), privatePosition, targetzone->getPlayer()->getPlayerId(), targetzone->getName(), newX, y, privateNewCardId, faceDown), game->getGameId()); - cont->enqueueGameEventOmniscient(new Event_MoveCard(getPlayerId(), privateOldCardId, privateCardName, startzone->getName(), privatePosition, targetzone->getPlayer()->getPlayerId(), targetzone->getName(), newX, y, privateNewCardId, faceDown), game->getGameId()); + cont->enqueueGameEventPrivate(new Event_MoveCard(getPlayerId(), privateOldCardId, privateCardName, startzone->getName(), privatePosition, targetzone->getPlayer()->getPlayerId(), targetzone->getName(), newX, y, privateNewCardId, faceDown), game->getGameId(), -1, undoingDraw ? new Context_UndoDraw : 0); + cont->enqueueGameEventOmniscient(new Event_MoveCard(getPlayerId(), privateOldCardId, privateCardName, startzone->getName(), privatePosition, targetzone->getPlayer()->getPlayerId(), targetzone->getName(), newX, y, privateNewCardId, faceDown), game->getGameId(), undoingDraw ? new Context_UndoDraw : 0); // Other players do not get to see the start and/or target position of the card if the respective // part of the zone is being looked at. The information is not needed anyway because in hidden zones, @@ -361,9 +401,9 @@ ResponseCode Server_Player::moveCard(CommandContainer *cont, Server_CardZone *st newX = -1; if ((startzone->getType() == PublicZone) || (targetzone->getType() == PublicZone)) - cont->enqueueGameEventPublic(new Event_MoveCard(getPlayerId(), oldCardId, publicCardName, startzone->getName(), position, targetzone->getPlayer()->getPlayerId(), targetzone->getName(), newX, y, card->getId(), faceDown), game->getGameId()); + cont->enqueueGameEventPublic(new Event_MoveCard(getPlayerId(), oldCardId, publicCardName, startzone->getName(), position, targetzone->getPlayer()->getPlayerId(), targetzone->getName(), newX, y, card->getId(), faceDown), game->getGameId(), undoingDraw ? new Context_UndoDraw : 0); else - cont->enqueueGameEventPublic(new Event_MoveCard(getPlayerId(), -1, QString(), startzone->getName(), position, targetzone->getPlayer()->getPlayerId(), targetzone->getName(), newX, y, -1, false), game->getGameId()); + cont->enqueueGameEventPublic(new Event_MoveCard(getPlayerId(), -1, QString(), startzone->getName(), position, targetzone->getPlayer()->getPlayerId(), targetzone->getName(), newX, y, -1, false), game->getGameId(), undoingDraw ? new Context_UndoDraw : 0); if (tapped) setCardAttrHelper(cont, targetzone->getName(), card->getId(), "tapped", "1"); diff --git a/common/server_player.h b/common/server_player.h index 24eebf01..b53357aa 100644 --- a/common/server_player.h +++ b/common/server_player.h @@ -30,6 +30,7 @@ private: QMap zones; QMap counters; QMap arrows; + QList lastDrawList; int playerId; bool spectator; int initialCards; @@ -75,8 +76,10 @@ public: void clearZones(); void setupZones(); + ResponseCode drawCards(CommandContainer *cont, int number); + ResponseCode undoDraw(CommandContainer *cont); ResponseCode moveCard(CommandContainer *cont, const QString &_startZone, const QList &_cardId, int _targetPlayer, const QString &_targetZone, int _x, int _y, bool _faceDown, bool _tapped); - ResponseCode moveCard(CommandContainer *cont, Server_CardZone *startzone, const QList &_cardId, Server_CardZone *targetzone, int x, int y, bool faceDown, bool tapped, bool fixFreeSpaces = true); + ResponseCode moveCard(CommandContainer *cont, Server_CardZone *startzone, const QList &_cardId, Server_CardZone *targetzone, int x, int y, bool faceDown, bool tapped, bool fixFreeSpaces = true, bool undoingDraw = false); void unattachCard(CommandContainer *cont, Server_Card *card); ResponseCode setCardAttrHelper(CommandContainer *cont, const QString &zone, int cardId, const QString &attrName, const QString &attrValue); diff --git a/common/server_protocolhandler.cpp b/common/server_protocolhandler.cpp index b8c9ab48..56cb4a76 100644 --- a/common/server_protocolhandler.cpp +++ b/common/server_protocolhandler.cpp @@ -97,6 +97,7 @@ ResponseCode Server_ProtocolHandler::processCommandHelper(Command *command, Comm case ItemId_Command_Mulligan: return cmdMulligan(static_cast(command), cont, game, player); case ItemId_Command_RollDie: return cmdRollDie(static_cast(command), cont, game, player); case ItemId_Command_DrawCards: return cmdDrawCards(static_cast(command), cont, game, player); + case ItemId_Command_UndoDraw: return cmdUndoDraw(static_cast(command), cont, game, player); case ItemId_Command_MoveCard: return cmdMoveCard(static_cast(command), cont, game, player); case ItemId_Command_FlipCard: return cmdFlipCard(static_cast(command), cont, game, player); case ItemId_Command_AttachCard: return cmdAttachCard(static_cast(command), cont, game, player); @@ -501,7 +502,7 @@ ResponseCode Server_ProtocolHandler::cmdMulligan(Command_Mulligan * /*cmd*/, Com cont->enqueueGameEventPrivate(new Event_Shuffle(player->getPlayerId()), game->getGameId()); cont->enqueueGameEventPublic(new Event_Shuffle(player->getPlayerId()), game->getGameId()); - drawCards(game, player, cont, number); + player->drawCards(cont, number); return RespOk; } @@ -515,7 +516,7 @@ ResponseCode Server_ProtocolHandler::cmdRollDie(Command_RollDie *cmd, CommandCon return RespOk; } -ResponseCode Server_ProtocolHandler::drawCards(Server_Game *game, Server_Player *player, CommandContainer *cont, int number) +ResponseCode Server_ProtocolHandler::cmdDrawCards(Command_DrawCards *cmd, CommandContainer *cont, Server_Game *game, Server_Player *player) { if (player->getSpectator()) return RespFunctionNotAllowed; @@ -523,33 +524,20 @@ ResponseCode Server_ProtocolHandler::drawCards(Server_Game *game, Server_Player if (!game->getGameStarted()) return RespGameNotStarted; - Server_CardZone *deck = player->getZones().value("deck"); - Server_CardZone *hand = player->getZones().value("hand"); - if (deck->cards.size() < number) - number = deck->cards.size(); - - QList cardListPrivate; - QList cardListOmniscient; - for (int i = 0; i < number; ++i) { - Server_Card *card = deck->cards.takeFirst(); - hand->cards.append(card); - cardListPrivate.append(new ServerInfo_Card(card->getId(), card->getName())); - cardListOmniscient.append(new ServerInfo_Card(card->getId(), card->getName())); - } - cont->enqueueGameEventPrivate(new Event_DrawCards(player->getPlayerId(), cardListPrivate.size(), cardListPrivate), game->getGameId()); - cont->enqueueGameEventOmniscient(new Event_DrawCards(player->getPlayerId(), cardListOmniscient.size(), cardListOmniscient), game->getGameId()); - cont->enqueueGameEventPublic(new Event_DrawCards(player->getPlayerId(), cardListPrivate.size()), game->getGameId()); - - return RespOk; + return player->drawCards(cont, cmd->getNumber()); } - -ResponseCode Server_ProtocolHandler::cmdDrawCards(Command_DrawCards *cmd, CommandContainer *cont, Server_Game *game, Server_Player *player) +ResponseCode Server_ProtocolHandler::cmdUndoDraw(Command_UndoDraw *cmd, CommandContainer *cont, Server_Game *game, Server_Player *player) { - return drawCards(game, player, cont, cmd->getNumber()); + if (player->getSpectator()) + return RespFunctionNotAllowed; + + if (!game->getGameStarted()) + return RespGameNotStarted; + + return player->undoDraw(cont); } - ResponseCode Server_ProtocolHandler::cmdMoveCard(Command_MoveCard *cmd, CommandContainer *cont, Server_Game *game, Server_Player *player) { if (player->getSpectator()) diff --git a/common/server_protocolhandler.h b/common/server_protocolhandler.h index 3e915f42..10d8516d 100644 --- a/common/server_protocolhandler.h +++ b/common/server_protocolhandler.h @@ -61,8 +61,8 @@ private: ResponseCode cmdShuffle(Command_Shuffle *cmd, CommandContainer *cont, Server_Game *game, Server_Player *player); ResponseCode cmdMulligan(Command_Mulligan *cmd, CommandContainer *cont, Server_Game *game, Server_Player *player); ResponseCode cmdRollDie(Command_RollDie *cmd, CommandContainer *cont, Server_Game *game, Server_Player *player); - ResponseCode drawCards(Server_Game *game, Server_Player *player, CommandContainer *cont, int number); ResponseCode cmdDrawCards(Command_DrawCards *cmd, CommandContainer *cont, Server_Game *game, Server_Player *player); + ResponseCode cmdUndoDraw(Command_UndoDraw *cmd, CommandContainer *cont, Server_Game *game, Server_Player *player); ResponseCode cmdMoveCard(Command_MoveCard *cmd, CommandContainer *cont, Server_Game *game, Server_Player *player); ResponseCode cmdFlipCard(Command_FlipCard *cmd, CommandContainer *cont, Server_Game *game, Server_Player *player); ResponseCode cmdAttachCard(Command_AttachCard *cmd, CommandContainer *cont, Server_Game *game, Server_Player *player); diff --git a/servatrice/src/servatrice.cpp b/servatrice/src/servatrice.cpp index 05f7106f..2c8cf326 100644 --- a/servatrice/src/servatrice.cpp +++ b/servatrice/src/servatrice.cpp @@ -225,4 +225,4 @@ void Servatrice::statusUpdate() execSqlQuery(query); } -const QString Servatrice::versionString = "Servatrice 0.20110126"; +const QString Servatrice::versionString = "Servatrice 0.20110127";