diff --git a/cockatrice/cockatrice.pro b/cockatrice/cockatrice.pro
index 66679fe3..d3e826a9 100644
--- a/cockatrice/cockatrice.pro
+++ b/cockatrice/cockatrice.pro
@@ -173,7 +173,8 @@ TRANSLATIONS += \
translations/cockatrice_es.ts \
translations/cockatrice_pt.ts \
translations/cockatrice_pt-br.ts \
- translations/cockatrice_fr.ts
+ translations/cockatrice_fr.ts \
+ translations/cockatrice_jp.ts
win32 {
RC_FILE = cockatrice.rc
}
diff --git a/cockatrice/cockatrice.qrc b/cockatrice/cockatrice.qrc
index a31626d3..bea7ad2c 100644
--- a/cockatrice/cockatrice.qrc
+++ b/cockatrice/cockatrice.qrc
@@ -30,6 +30,7 @@
translations/cockatrice_pt.qm
translations/cockatrice_pt-br.qm
translations/cockatrice_fr.qm
+ translations/cockatrice_jp.qm
resources/appicon.svg
resources/add_to_sideboard.svg
resources/decrement.svg
diff --git a/cockatrice/src/carddragitem.cpp b/cockatrice/src/carddragitem.cpp
index f3ab1a54..56d6c2c6 100644
--- a/cockatrice/src/carddragitem.cpp
+++ b/cockatrice/src/carddragitem.cpp
@@ -72,17 +72,18 @@ void CardDragItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
QPointF sp = pos();
sc->removeItem(this);
+ QList dragItemList;
CardZone *startZone = static_cast(item)->getZone();
if (currentZone && !(static_cast(item)->getAttachedTo() && (startZone == currentZone))) {
- if (!occupied)
- currentZone->handleDropEvent(this, startZone, (sp - currentZone->scenePos()).toPoint(), faceDown);
+ dragItemList.append(this);
for (int i = 0; i < childDrags.size(); i++) {
CardDragItem *c = static_cast(childDrags[i]);
if (!(static_cast(c->item)->getAttachedTo() && (startZone == currentZone)) && !c->occupied)
- currentZone->handleDropEvent(static_cast(c), startZone, (sp - currentZone->scenePos() + c->getHotSpot()).toPoint(), faceDown);
+ dragItemList.append(c);
sc->removeItem(c);
}
}
+ currentZone->handleDropEvent(dragItemList, startZone, (sp - currentZone->scenePos()).toPoint(), faceDown);
event->accept();
}
diff --git a/cockatrice/src/carditem.cpp b/cockatrice/src/carditem.cpp
index 7e76cfa7..5bd4d655 100644
--- a/cockatrice/src/carditem.cpp
+++ b/cockatrice/src/carditem.cpp
@@ -16,8 +16,8 @@
#include "settingscache.h"
#include "tab_game.h"
-CardItem::CardItem(Player *_owner, const QString &_name, int _cardid, QGraphicsItem *parent)
- : AbstractCardItem(_name, _owner, parent), zone(0), id(_cardid), attacking(false), facedown(false), destroyOnZoneChange(false), doesntUntap(false), dragItem(0), attachedTo(0)
+CardItem::CardItem(Player *_owner, const QString &_name, int _cardid, bool _revealedCard, QGraphicsItem *parent)
+ : AbstractCardItem(_name, _owner, parent), zone(0), id(_cardid), revealedCard(_revealedCard), attacking(false), facedown(false), destroyOnZoneChange(false), doesntUntap(false), dragItem(0), attachedTo(0)
{
owner->addCard(this);
@@ -59,6 +59,8 @@ CardItem::CardItem(Player *_owner, const QString &_name, int _cardid, QGraphicsI
aPlay = new QAction(this);
connect(aPlay, SIGNAL(triggered()), this, SLOT(actPlay()));
+ aHide = new QAction(this);
+ connect(aHide, SIGNAL(triggered()), this, SLOT(actHide()));
for (int i = 0; i < 3; ++i) {
QAction *tempAddCounter = new QAction(this);
@@ -128,7 +130,9 @@ void CardItem::updateCardMenu()
{
cardMenu->clear();
- if (owner->getLocal()) {
+ if (revealedCard)
+ cardMenu->addAction(aHide);
+ else if (owner->getLocal()) {
if (zone) {
if (zone->getName() == "table") {
cardMenu->addAction(aTap);
@@ -169,6 +173,7 @@ void CardItem::updateCardMenu()
void CardItem::retranslateUi()
{
aPlay->setText(tr("&Play"));
+ aHide->setText(tr("&Hide"));
aTap->setText(tr("&Tap"));
aUntap->setText(tr("&Untap"));
@@ -426,7 +431,10 @@ void CardItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
cardMenu->exec(event->screenPos());
} else if ((event->button() == Qt::LeftButton) && !settingsCache->getDoubleClickToPlay()) {
setCursor(Qt::OpenHandCursor);
- playCard(event->modifiers().testFlag(Qt::ShiftModifier));
+ if (revealedCard)
+ actHide();
+ else
+ playCard(event->modifiers().testFlag(Qt::ShiftModifier));
}
AbstractCardItem::mouseReleaseEvent(event);
@@ -434,8 +442,12 @@ void CardItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
void CardItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
{
- if (settingsCache->getDoubleClickToPlay())
- playCard(event->modifiers().testFlag(Qt::ShiftModifier));
+ if (settingsCache->getDoubleClickToPlay()) {
+ if (revealedCard)
+ actHide();
+ else
+ playCard(event->modifiers().testFlag(Qt::ShiftModifier));
+ }
event->accept();
}
@@ -483,4 +495,9 @@ void CardItem::actCardCounterTrigger()
void CardItem::actPlay()
{
playCard(false);
+}
+
+void CardItem::actHide()
+{
+ zone->removeCard(this);
}
\ No newline at end of file
diff --git a/cockatrice/src/carditem.h b/cockatrice/src/carditem.h
index 844b3198..97b86774 100644
--- a/cockatrice/src/carditem.h
+++ b/cockatrice/src/carditem.h
@@ -17,6 +17,7 @@ class CardItem : public AbstractCardItem {
private:
CardZone *zone;
int id;
+ bool revealedCard;
bool attacking;
bool facedown;
QMap counters;
@@ -31,6 +32,7 @@ private:
QList aAddCounter, aSetCounter, aRemoveCounter;
QAction *aPlay,
+ *aHide,
*aTap, *aUntap, *aDoesntUntap, *aAttach, *aUnattach, *aSetPT, *aSetAnnotation, *aFlip, *aClone,
*aMoveToTopLibrary, *aMoveToBottomLibrary, *aMoveToGraveyard, *aMoveToExile;
QMenu *cardMenu, *moveMenu;
@@ -45,12 +47,13 @@ private slots:
void actSetPT();
void actSetAnnotation();
void actPlay();
+ void actHide();
public slots:
void deleteLater();
public:
enum { Type = typeCard };
int type() const { return Type; }
- CardItem(Player *_owner, const QString &_name = QString(), int _cardid = -1, QGraphicsItem *parent = 0);
+ CardItem(Player *_owner, const QString &_name = QString(), int _cardid = -1, bool revealedCard = false, QGraphicsItem *parent = 0);
~CardItem();
void retranslateUi();
CardZone *getZone() const { return zone; }
diff --git a/cockatrice/src/cardzone.cpp b/cockatrice/src/cardzone.cpp
index bae26ceb..9f9c275a 100644
--- a/cockatrice/src/cardzone.cpp
+++ b/cockatrice/src/cardzone.cpp
@@ -157,16 +157,25 @@ CardItem *CardZone::takeCard(int position, int cardId, bool /*canResize*/)
return c;
}
+void CardZone::removeCard(CardItem *card)
+{
+ cards.removeAt(cards.indexOf(card));
+ reorganizeCards();
+ emit cardCountChanged();
+ player->deleteCard(card);
+}
+
void CardZone::moveAllToZone()
{
QList data = static_cast(sender())->data().toList();
QString targetZone = data[0].toString();
int targetX = data[1].toInt();
- // Cards need to be moved in reverse order so that the other
- // cards' list index doesn't change
- for (int i = cards.size() - 1; i >= 0; i--)
- player->sendGameCommand(new Command_MoveCard(-1, getName(), cards.at(i)->getId(), player->getId(), targetZone, targetX));
+ QList idList;
+ for (int i = 0; i < cards.size(); ++i)
+ idList.append(new CardId(cards[i]->getId()));
+
+ player->sendGameCommand(new Command_MoveCard(-1, getName(), idList, player->getId(), targetZone, targetX));
}
QPointF CardZone::closestGridPoint(const QPointF &point)
diff --git a/cockatrice/src/cardzone.h b/cockatrice/src/cardzone.h
index b8caf9ab..0b1809bb 100644
--- a/cockatrice/src/cardzone.h
+++ b/cockatrice/src/cardzone.h
@@ -35,7 +35,7 @@ public slots:
public:
enum { Type = typeZone };
int type() const { return Type; }
- virtual void handleDropEvent(CardDragItem *dragItem, CardZone *startZone, const QPoint &dropPoint, bool faceDown) = 0;
+ virtual void handleDropEvent(const QList &dragItem, CardZone *startZone, const QPoint &dropPoint, bool faceDown) = 0;
CardZone(Player *_player, const QString &_name, bool _hasCardAttr, bool _isShufflable, bool _contentsKnown, QGraphicsItem *parent = 0, bool isView = false);
~CardZone();
void retranslateUi();
@@ -54,6 +54,7 @@ public:
CardItem *getCard(int cardId, const QString &cardName);
// takeCard() finds a card by position and removes it from the zone and from all of its views.
virtual CardItem *takeCard(int position, int cardId, bool canResize = true);
+ void removeCard(CardItem *card);
ZoneViewZone *getView() const { return view; }
void setView(ZoneViewZone *_view) { view = _view; }
virtual void reorganizeCards() = 0;
diff --git a/cockatrice/src/handzone.cpp b/cockatrice/src/handzone.cpp
index 75b90d28..258567e3 100644
--- a/cockatrice/src/handzone.cpp
+++ b/cockatrice/src/handzone.cpp
@@ -37,9 +37,13 @@ void HandZone::addCardImpl(CardItem *card, int x, int /*y*/)
card->update();
}
-void HandZone::handleDropEvent(CardDragItem *dragItem, CardZone *startZone, const QPoint &/*dropPoint*/, bool /*faceDown*/)
+void HandZone::handleDropEvent(const QList &dragItems, CardZone *startZone, const QPoint &/*dropPoint*/, bool /*faceDown*/)
{
- player->sendGameCommand(new Command_MoveCard(-1, startZone->getName(), dragItem->getId(), player->getId(), getName(), cards.size(), -1, false));
+ QList idList;
+ for (int i = 0; i < dragItems.size(); ++i)
+ idList.append(new CardId(dragItems[i]->getId()));
+
+ player->sendGameCommand(new Command_MoveCard(-1, startZone->getName(), idList, player->getId(), getName(), cards.size(), -1, false));
}
QRectF HandZone::boundingRect() const
diff --git a/cockatrice/src/handzone.h b/cockatrice/src/handzone.h
index cde11e83..85dde951 100644
--- a/cockatrice/src/handzone.h
+++ b/cockatrice/src/handzone.h
@@ -14,7 +14,7 @@ public slots:
void updateOrientation();
public:
HandZone(Player *_p, bool _contentsKnown, int _zoneHeight, QGraphicsItem *parent = 0);
- void handleDropEvent(CardDragItem *dragItem, CardZone *startZone, const QPoint &dropPoint, bool faceDown);
+ void handleDropEvent(const QList &dragItems, CardZone *startZone, const QPoint &dropPoint, bool faceDown);
QRectF boundingRect() const;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
void reorganizeCards();
diff --git a/cockatrice/src/pilezone.cpp b/cockatrice/src/pilezone.cpp
index cf57df21..1c9df8f9 100644
--- a/cockatrice/src/pilezone.cpp
+++ b/cockatrice/src/pilezone.cpp
@@ -48,9 +48,13 @@ void PileZone::addCardImpl(CardItem *card, int x, int /*y*/)
card->setParentItem(this);
}
-void PileZone::handleDropEvent(CardDragItem *dragItem, CardZone *startZone, const QPoint &/*dropPoint*/, bool /*faceDown*/)
+void PileZone::handleDropEvent(const QList &dragItems, CardZone *startZone, const QPoint &/*dropPoint*/, bool /*faceDown*/)
{
- player->sendGameCommand(new Command_MoveCard(-1, startZone->getName(), dragItem->getId(), player->getId(), getName(), 0, 0, false));
+ QList idList;
+ for (int i = 0; i < dragItems.size(); ++i)
+ idList.append(new CardId(dragItems[i]->getId()));
+
+ player->sendGameCommand(new Command_MoveCard(-1, startZone->getName(), idList, player->getId(), getName(), 0, 0, false));
}
void PileZone::reorganizeCards()
diff --git a/cockatrice/src/pilezone.h b/cockatrice/src/pilezone.h
index 7dbb4699..0e946066 100644
--- a/cockatrice/src/pilezone.h
+++ b/cockatrice/src/pilezone.h
@@ -9,7 +9,7 @@ public:
QRectF boundingRect() const;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
void reorganizeCards();
- void handleDropEvent(CardDragItem *dragItem, CardZone *startZone, const QPoint &dropPoint, bool faceDown);
+ void handleDropEvent(const QList &dragItems, CardZone *startZone, const QPoint &dropPoint, bool faceDown);
protected:
void mousePressEvent(QGraphicsSceneMouseEvent *event);
void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
diff --git a/cockatrice/src/player.cpp b/cockatrice/src/player.cpp
index 742ff67d..0d7ab7a4 100644
--- a/cockatrice/src/player.cpp
+++ b/cockatrice/src/player.cpp
@@ -563,9 +563,10 @@ void Player::actMoveTopCardsToGrave()
const int maxCards = zones.value("deck")->getCards().size();
if (number > maxCards)
number = maxCards;
+ QList idList;
for (int i = 0; i < number; ++i)
- commandList.append(new Command_MoveCard(-1, "deck", 0, getId(), "grave", 0, 0, false));
- sendCommandContainer(new CommandContainer(commandList));
+ idList.append(new CardId(i));
+ sendGameCommand(new Command_MoveCard(-1, "deck", idList, getId(), "grave", 0, 0, false));
}
void Player::actMoveTopCardsToExile()
@@ -578,14 +579,15 @@ void Player::actMoveTopCardsToExile()
const int maxCards = zones.value("deck")->getCards().size();
if (number > maxCards)
number = maxCards;
+ QList idList;
for (int i = 0; i < number; ++i)
- commandList.append(new Command_MoveCard(-1, "deck", 0, getId(), "rfg", 0, 0, false));
- sendCommandContainer(new CommandContainer(commandList));
+ idList.append(new CardId(i));
+ sendGameCommand(new Command_MoveCard(-1, "deck", idList, getId(), "rfg", 0, 0, false));
}
void Player::actMoveTopCardToBottom()
{
- sendGameCommand(new Command_MoveCard(-1, "deck", 0, getId(), "deck", -1, 0, false));
+ sendGameCommand(new Command_MoveCard(-1, "deck", QList() << new CardId(0), getId(), "deck", -1, 0, false));
}
void Player::actUntapAll()
@@ -1088,10 +1090,10 @@ void Player::playCard(CardItem *c, bool faceDown, bool tapped)
{
CardInfo *ci = c->getInfo();
if (ci->getTableRow() == 3)
- sendGameCommand(new Command_MoveCard(-1, c->getZone()->getName(), c->getId(), getId(), "stack", 0, 0, false));
+ sendGameCommand(new Command_MoveCard(-1, c->getZone()->getName(), QList() << new CardId(c->getId()), getId(), "stack", 0, 0, false));
else {
QPoint gridPoint = QPoint(-1, 2 - ci->getTableRow());
- sendGameCommand(new Command_MoveCard(-1, c->getZone()->getName(), c->getId(), getId(), "table", gridPoint.x(), gridPoint.y(), faceDown, tapped));
+ sendGameCommand(new Command_MoveCard(-1, c->getZone()->getName(), QList() << new CardId(c->getId()), getId(), "table", gridPoint.x(), gridPoint.y(), faceDown, tapped));
}
}
@@ -1276,42 +1278,54 @@ bool Player::clearCardsToDelete()
void Player::cardMenuAction(QAction *a)
{
QList sel = scene()->selectedItems();
+ QList cardList;
+ while (!sel.isEmpty())
+ cardList.append(qgraphicsitem_cast(sel.takeFirst()));
+
QList commandList;
- while (!sel.isEmpty()) {
- unsigned int i = (unsigned int) (((double) sel.size()) * qrand() / (RAND_MAX + 1.0));
- CardItem *card = qgraphicsitem_cast(sel.takeAt(i));
-
- switch (a->data().toInt()) {
- case 0:
- if (!card->getTapped())
- commandList.append(new Command_SetCardAttr(-1, card->getZone()->getName(), card->getId(), "tapped", "1"));
- break;
- case 1:
- if (card->getTapped())
- commandList.append(new Command_SetCardAttr(-1, card->getZone()->getName(), card->getId(), "tapped", "0"));
- break;
- case 2:
- commandList.append(new Command_SetCardAttr(-1, card->getZone()->getName(), card->getId(), "doesnt_untap", QString::number(!card->getDoesntUntap())));
- break;
- case 3: {
- QString zone = card->getZone()->getName();
- commandList.append(new Command_FlipCard(-1, zone, card->getId(), !card->getFaceDown()));
- break;
+ if (a->data().toInt() <= 4)
+ for (int i = 0; i < cardList.size(); ++i) {
+ CardItem *card = cardList[i];
+ switch (a->data().toInt()) {
+ case 0:
+ if (!card->getTapped())
+ commandList.append(new Command_SetCardAttr(-1, card->getZone()->getName(), card->getId(), "tapped", "1"));
+ break;
+ case 1:
+ if (card->getTapped())
+ commandList.append(new Command_SetCardAttr(-1, card->getZone()->getName(), card->getId(), "tapped", "0"));
+ break;
+ case 2:
+ commandList.append(new Command_SetCardAttr(-1, card->getZone()->getName(), card->getId(), "doesnt_untap", QString::number(!card->getDoesntUntap())));
+ break;
+ case 3: {
+ QString zone = card->getZone()->getName();
+ commandList.append(new Command_FlipCard(-1, zone, card->getId(), !card->getFaceDown()));
+ break;
+ }
+ case 4:
+ commandList.append(new Command_CreateToken(-1, card->getZone()->getName(), card->getName(), card->getColor(), card->getPT(), card->getAnnotation(), true, -1, card->getGridPoint().y()));
+ break;
}
- case 4:
- commandList.append(new Command_CreateToken(-1, card->getZone()->getName(), card->getName(), card->getColor(), card->getPT(), card->getAnnotation(), true, -1, card->getGridPoint().y()));
- break;
+ }
+ else {
+ QList idList;
+ for (int i = 0; i < cardList.size(); ++i)
+ idList.append(new CardId(cardList[i]->getId()));
+ QString startZone = cardList[0]->getZone()->getName();
+
+ switch (a->data().toInt()) {
case 5:
- commandList.append(new Command_MoveCard(-1, card->getZone()->getName(), card->getId(), getId(), "deck", 0, 0, false));
+ commandList.append(new Command_MoveCard(-1, startZone, idList, getId(), "deck", 0, 0, false));
break;
case 6:
- commandList.append(new Command_MoveCard(-1, card->getZone()->getName(), card->getId(), getId(), "deck", -1, 0, false));
+ commandList.append(new Command_MoveCard(-1, startZone, idList, getId(), "deck", -1, 0, false));
break;
case 7:
- commandList.append(new Command_MoveCard(-1, card->getZone()->getName(), card->getId(), getId(), "grave", 0, 0, false));
+ commandList.append(new Command_MoveCard(-1, startZone, idList, getId(), "grave", 0, 0, false));
break;
case 8:
- commandList.append(new Command_MoveCard(-1, card->getZone()->getName(), card->getId(), getId(), "rfg", 0, 0, false));
+ commandList.append(new Command_MoveCard(-1, startZone, idList, getId(), "rfg", 0, 0, false));
break;
default: ;
}
diff --git a/cockatrice/src/stackzone.cpp b/cockatrice/src/stackzone.cpp
index fa368d8e..2a2cc4cb 100644
--- a/cockatrice/src/stackzone.cpp
+++ b/cockatrice/src/stackzone.cpp
@@ -52,11 +52,16 @@ void StackZone::paint(QPainter *painter, const QStyleOptionGraphicsItem */*optio
painter->fillRect(boundingRect(), QBrush(bgPixmap));
}
-void StackZone::handleDropEvent(CardDragItem *dragItem, CardZone *startZone, const QPoint &/*dropPoint*/, bool /*faceDown*/)
+void StackZone::handleDropEvent(const QList &dragItems, CardZone *startZone, const QPoint &/*dropPoint*/, bool /*faceDown*/)
{
if (startZone == this)
return;
- player->sendGameCommand(new Command_MoveCard(-1, startZone->getName(), dragItem->getId(), player->getId(), getName(), 0, 0, false));
+
+ QList idList;
+ for (int i = 0; i < dragItems.size(); ++i)
+ idList.append(new CardId(dragItems[i]->getId()));
+
+ player->sendGameCommand(new Command_MoveCard(-1, startZone->getName(), idList, player->getId(), getName(), 0, 0, false));
}
void StackZone::reorganizeCards()
diff --git a/cockatrice/src/stackzone.h b/cockatrice/src/stackzone.h
index 5bb11ce6..d03f151a 100644
--- a/cockatrice/src/stackzone.h
+++ b/cockatrice/src/stackzone.h
@@ -12,7 +12,7 @@ private slots:
void updateBgPixmap();
public:
StackZone(Player *_p, int _zoneHeight, QGraphicsItem *parent = 0);
- void handleDropEvent(CardDragItem *dragItem, CardZone *startZone, const QPoint &dropPoint, bool faceDown);
+ void handleDropEvent(const QList &dragItems, CardZone *startZone, const QPoint &dropPoint, bool faceDown);
QRectF boundingRect() const;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
void reorganizeCards();
diff --git a/cockatrice/src/tablezone.cpp b/cockatrice/src/tablezone.cpp
index 2551c8cb..bb74b403 100644
--- a/cockatrice/src/tablezone.cpp
+++ b/cockatrice/src/tablezone.cpp
@@ -85,14 +85,18 @@ void TableZone::addCardImpl(CardItem *card, int _x, int _y)
card->update();
}
-void TableZone::handleDropEvent(CardDragItem *dragItem, CardZone *startZone, const QPoint &dropPoint, bool faceDown)
+void TableZone::handleDropEvent(const QList &dragItems, CardZone *startZone, const QPoint &dropPoint, bool faceDown)
{
- handleDropEventByGrid(dragItem, startZone, mapToGrid(dropPoint), faceDown);
+ handleDropEventByGrid(dragItems, startZone, mapToGrid(dropPoint), faceDown);
}
-void TableZone::handleDropEventByGrid(CardDragItem *dragItem, CardZone *startZone, const QPoint &gridPoint, bool faceDown, bool tapped)
+void TableZone::handleDropEventByGrid(const QList &dragItems, CardZone *startZone, const QPoint &gridPoint, bool faceDown, bool tapped)
{
- static_cast(dragItem->getItem())->getZone()->getPlayer()->sendGameCommand(new Command_MoveCard(-1, startZone->getName(), dragItem->getId(), player->getId(), getName(), gridPoint.x(), gridPoint.y(), faceDown, tapped));
+ QList idList;
+ for (int i = 0; i < dragItems.size(); ++i)
+ idList.append(new CardId(dragItems[i]->getId()));
+
+ startZone->getPlayer()->sendGameCommand(new Command_MoveCard(-1, startZone->getName(), idList, player->getId(), getName(), gridPoint.x(), gridPoint.y(), faceDown, tapped));
}
void TableZone::reorganizeCards()
diff --git a/cockatrice/src/tablezone.h b/cockatrice/src/tablezone.h
index 9761f8ea..b6566b4e 100644
--- a/cockatrice/src/tablezone.h
+++ b/cockatrice/src/tablezone.h
@@ -29,8 +29,8 @@ public:
QRectF boundingRect() const;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
void toggleTapped();
- void handleDropEvent(CardDragItem *dragItem, CardZone *startZone, const QPoint &dropPoint, bool faceDown = false);
- void handleDropEventByGrid(CardDragItem *dragItem, CardZone *startZone, const QPoint &gridPoint, bool faceDown = false, bool tapped = false);
+ void handleDropEvent(const QList &dragItems, CardZone *startZone, const QPoint &dropPoint, bool faceDown = false);
+ void handleDropEventByGrid(const QList &dragItems, CardZone *startZone, const QPoint &gridPoint, bool faceDown = false, bool tapped = false);
CardItem *getCardFromGrid(const QPoint &gridPoint) const;
CardItem *getCardFromCoords(const QPointF &point) const;
QPointF mapFromGrid(QPoint gridPoint) const;
diff --git a/cockatrice/src/window_main.cpp b/cockatrice/src/window_main.cpp
index 1badc0f0..671738a9 100644
--- a/cockatrice/src/window_main.cpp
+++ b/cockatrice/src/window_main.cpp
@@ -159,8 +159,10 @@ void MainWindow::actAbout()
+ "
" + tr("Authors:") + "
Max-Wilhelm Bruker
Marcus Schütz
"
+ "" + tr("Translators:") + "
"
+ tr("Spanish:") + " Víctor Martínez
"
- + tr("Portugese:") + " Milton Gonçalves
"
+ + tr("Portugese (Portugal):") + " Milton Gonçalves
"
+ + tr("Portugese (Brazil):") + " Thiago Queiroz
"
+ tr("French:") + " Yannick Hammer
"
+ + tr("Japanese:") + " Takumi Nakase
"
));
}
diff --git a/cockatrice/src/zoneviewzone.cpp b/cockatrice/src/zoneviewzone.cpp
index f8034541..5e3f1edc 100644
--- a/cockatrice/src/zoneviewzone.cpp
+++ b/cockatrice/src/zoneviewzone.cpp
@@ -33,7 +33,7 @@ void ZoneViewZone::initializeCards(const QList &cardList)
{
if (!cardList.isEmpty()) {
for (int i = 0; i < cardList.size(); ++i)
- addCard(new CardItem(player, cardList[i]->getName(), cardList[i]->getId(), this), false, i);
+ addCard(new CardItem(player, cardList[i]->getName(), cardList[i]->getId(), revealZone, this), false, i);
reorganizeCards();
} else if (!origZone->contentsKnown()) {
Command_DumpZone *command = new Command_DumpZone(-1, player->getId(), name, numberCards);
@@ -44,7 +44,7 @@ void ZoneViewZone::initializeCards(const QList &cardList)
int number = numberCards == -1 ? c.size() : (numberCards < c.size() ? numberCards : c.size());
for (int i = 0; i < number; i++) {
CardItem *card = c.at(i);
- addCard(new CardItem(player, card->getName(), card->getId(), this), false, i);
+ addCard(new CardItem(player, card->getName(), card->getId(), revealZone, this), false, i);
}
reorganizeCards();
}
@@ -58,7 +58,7 @@ void ZoneViewZone::zoneDumpReceived(ProtocolResponse *r)
const QList &respCardList = resp->getZone()->getCardList();
for (int i = 0; i < respCardList.size(); i++) {
- CardItem *card = new CardItem(player, respCardList[i]->getName(), respCardList[i]->getId(), this);
+ CardItem *card = new CardItem(player, respCardList[i]->getName(), respCardList[i]->getId(), revealZone, this);
addCard(card, false, i);
}
@@ -87,7 +87,6 @@ void ZoneViewZone::reorganizeCards()
cols = 2;
qDebug() << "reorganizeCards: rows=" << rows << "cols=" << cols;
- qDebug() << "SORT BY NAME:" << sortByName << "SORT BY TYPE:" << sortByType;
CardList cardsToDisplay(cards);
if (sortByName || sortByType)
@@ -125,9 +124,13 @@ void ZoneViewZone::addCardImpl(CardItem *card, int x, int /*y*/)
card->update();
}
-void ZoneViewZone::handleDropEvent(CardDragItem *dragItem, CardZone *startZone, const QPoint &/*dropPoint*/, bool /*faceDown*/)
+void ZoneViewZone::handleDropEvent(const QList &dragItems, CardZone *startZone, const QPoint &/*dropPoint*/, bool /*faceDown*/)
{
- player->sendGameCommand(new Command_MoveCard(-1, startZone->getName(), dragItem->getId(), player->getId(), getName(), 0, 0, false));
+ QList idList;
+ for (int i = 0; i < dragItems.size(); ++i)
+ idList.append(new CardId(dragItems[i]->getId()));
+
+ player->sendGameCommand(new Command_MoveCard(-1, startZone->getName(), idList, player->getId(), getName(), 0, 0, false));
}
void ZoneViewZone::removeCard(int position)
diff --git a/cockatrice/src/zoneviewzone.h b/cockatrice/src/zoneviewzone.h
index d1c1acd2..b6fe2bfd 100644
--- a/cockatrice/src/zoneviewzone.h
+++ b/cockatrice/src/zoneviewzone.h
@@ -13,7 +13,7 @@ class ZoneViewZone : public SelectZone, public QGraphicsLayoutItem {
private:
QRectF bRect, optimumRect;
int minRows, numberCards;
- void handleDropEvent(CardDragItem *dragItem, CardZone *startZone, const QPoint &dropPoint, bool faceDown);
+ void handleDropEvent(const QList &dragItems, CardZone *startZone, const QPoint &dropPoint, bool faceDown);
CardZone *origZone;
bool revealZone;
bool sortByName, sortByType;
diff --git a/cockatrice/translations/cockatrice_de.ts b/cockatrice/translations/cockatrice_de.ts
index 580b0039..dae8f4bd 100644
--- a/cockatrice/translations/cockatrice_de.ts
+++ b/cockatrice/translations/cockatrice_de.ts
@@ -24,6 +24,39 @@
%1 sieht sich %2's %3 an
+
+ AbstractCounter
+
+
+ &Set counter...
+ Zähler &setzen...
+
+
+
+ Ctrl+L
+ Ctrl+L
+
+
+
+ F11
+ F11
+
+
+
+ F12
+ F12
+
+
+
+ Set counter
+ Zähler setzen
+
+
+
+ New value for counter '%1':
+ Neuer Wert für den Zähler '%1':
+
+
AppearanceSettingsPage
@@ -175,117 +208,122 @@
CardItem
-
+
&Play
-
+ &Ausspielen
-
+
+ &Hide
+ &Verstecken
+
+
+
&Tap
&Tappen
-
+
&Untap
E&nttappen
-
+
Toggle &normal untapping
N&ormales Enttappen umschalten
-
+
&Flip
&Umdrehen
-
+
&Clone
&Kopieren
-
+
&Attach to card...
&An Karte anlegen...
-
+
Ctrl+A
Ctrl+A
-
+
Unattac&h
&Von Karte lösen
-
+
Set &P/T...
&Kampfwerte setzen...
-
+
&Set annotation...
&Hinweis setzen...
-
+
red
rot
-
+
yellow
gelb
-
+
green
grün
-
+
&Add counter (%1)
Zählmarke &hinzufügen (%1)
-
+
&Remove counter (%1)
Zählmarke &entfernen (%1)
-
+
&Set counters (%1)...
Zählmarken &setzen (%1)...
-
+
&top of library
&auf die Bibliothek
-
+
&bottom of library
&unter die Bibliothek
-
+
&graveyard
in den &Friedhof
-
+
Ctrl+Del
Ctrl+Del
-
+
&exile
ins &Exil
-
+
&Move to
&Verschieben
@@ -659,34 +697,28 @@
Counter
-
&Set counter...
- Zähler &setzen...
+ Zähler &setzen...
-
Ctrl+L
- Ctrl+L
+ Ctrl+L
-
F11
- F11
+ F11
-
F12
- F12
+ F12
-
Set counter
- Zähler setzen
+ Zähler setzen
-
New value for counter '%1':
- Neuer Wert für den Zähler '%1':
+ Neuer Wert für den Zähler '%1':
@@ -1452,7 +1484,7 @@
Show &full games
-
+ &Volle Spiele anzeigen
&Show full games
@@ -1596,113 +1628,123 @@
About Cockatrice
-
+ Über Cockatrice
Version %1
-
+ Version %1
Authors:
-
+ Autoren:
Translators:
-
+ Übersetzer:
Spanish:
-
+ Spanisch:
- Portugese:
-
+ Portugese (Portugal):
+ Portugiesisch (Portugal):
- French:
-
+ Portugese (Brazil):
+ Portugiesisch (Brasilien):
-
-
-
-
+
+ French:
+ Französisch:
+
+
+
+ Japanese:
+ Japanisch:
+
+
+
+
+
+
Error
Fehler
-
+
Server timeout
Server Zeitüberschreitung
-
+
Invalid login data.
Ungültige Anmeldedaten.
-
+
Socket error: %1
Netzwerkfehler: %1
-
+
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?
@@ -1719,27 +1761,27 @@
Spiel ver&lassen
-
+
&Deck editor
&Deck-Editor
-
+
&Full screen
&Vollbild
-
+
Ctrl+F
Ctrl+F
-
+
&Settings...
&Einstellungen...
-
+
&Exit
&Beenden
@@ -1752,7 +1794,7 @@
Esc
-
+
&Cockatrice
&Cockatrice
@@ -2053,7 +2095,7 @@
%1 gives %2 control over %3.
-
+ %1 überlässt %2 die Kontrolle über %3.
@@ -2554,57 +2596,57 @@
PhasesToolbar
-
+
Untap step
Enttappsegment
-
+
Upkeep step
Versorgungssegment
-
+
Draw step
Ziehsegment
-
+
First main phase
erste Hauptphase
-
+
Beginning of combat step
Anfangssegment der Kampfphase
-
+
Declare attackers step
Angreifer-Deklarieren-Segment
-
+
Declare blockers step
Blocker-Deklarieren-Segment
-
+
Combat damage step
Kampfschadenssegment
-
+
End of combat step
Endsegment der Kampfphase
-
+
Second main phase
zweite Hauptphase
-
+
End of turn step
Ende-des-Zuges-Segment
@@ -2612,21 +2654,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
@@ -2635,32 +2677,32 @@
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
-
+
F4
F4
@@ -2669,68 +2711,68 @@
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
-
+
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
@@ -2739,7 +2781,7 @@
Entfe&rnte Karten
-
+
&Sideboard
&Sideboard
@@ -2752,33 +2794,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
@@ -2787,28 +2829,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
@@ -2817,32 +2859,32 @@
&Mulligan nehmen...
-
+
Ctrl+M
Ctrl+M
-
+
&Shuffle
Mi&schen
-
+
Ctrl+S
Ctrl+S
-
+
&Counters
&Zähler
-
+
&Untap all permanents
&Enttappe alle bleibenden Karten
-
+
Ctrl+U
Ctrl+U
@@ -2871,42 +2913,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
@@ -2999,50 +3041,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
@@ -3055,12 +3097,12 @@
Neue Lebenspunkte insgesamt:
-
+
Roll die
Würfeln
-
+
Number of sides:
Anzahl der Seiten:
@@ -3138,17 +3180,17 @@
Sideboard
-
+
Cockatrice decks (*.cod)
Cockatrice Decks (*.cod)
-
+
Plain text decks (*.dec *.mwDeck)
Text Decks (*.dec *.mwDeck)
-
+
All files (*.*)
Alle Dateien (*.*)
@@ -3173,35 +3215,35 @@
RoomSelector
-
-
- Rooms
-
-
- Joi&n
- Teil&nehmen
+ Rooms
+ Räume
-
- Room
-
+
+ Joi&n
+ Teil&nehmen
- Description
- Beschreibung
+ Room
+ Raum
- Players
-
+ Description
+ Beschreibung
+ Players
+ Spieler
+
+
+
Games
- Spiele
+ Spiele
@@ -3224,6 +3266,44 @@
Langer Name
+
+ TabAdmin
+
+
+ Update server &message
+ Server&nachricht aktualisieren
+
+
+
+ Server administration functions
+ Funktionen zur Serverwartung
+
+
+
+ &Unlock functions
+ &Sperre aufheben
+
+
+
+ &Lock functions
+ Funktionen s&perren
+
+
+
+ Unlock administration functions
+ Wartungsfunktionen entsperren
+
+
+
+ Do you really want to unlock the administration functions?
+ Möchten Sie wirklich die Sperre der Wartungsfunktionen aufheben?
+
+
+
+ Administration
+ Wartung
+
+
TabChatChannel
@@ -3314,57 +3394,57 @@ Bitte geben Sie einen Namen ein:
TabGame
-
+
&Game
Spi&el
-
+
Next &phase
Nächste &Phase
-
+
Ctrl+Space
Ctrl+Space
-
+
Next &turn
Nächster &Zug
-
+
Ctrl+Return
Ctrl+Return
-
+
Ctrl+Enter
Ctrl+Enter
-
+
&Remove all local arrows
&Lokale Pfeile entfernen
-
+
Ctrl+R
Ctrl+R
-
+
&Concede
-
+
F2
F2
-
+
&Leave game
Spiel ver&lassen
@@ -3385,7 +3465,7 @@ Bitte geben Sie einen Namen ein:
Spiel s&tarten
-
+
&Say:
&Sagen:
@@ -3398,22 +3478,22 @@ Bitte geben Sie einen Namen ein:
Esc
-
+
Concede
Aufgeben
-
+
Are you sure you want to concede this game?
Sind Sie sicher, dass Sie das Spiel aufgeben möchten?
-
+
Leave game
Spiel verlassen
-
+
Are you sure you want to leave this game?
Sind Sie sicher, dass Sie das Spiel verlassen möchten?
@@ -3422,7 +3502,7 @@ Bitte geben Sie einen Namen ein:
Deck laden
-
+
Game %1: %2
Spiel %1: %2
@@ -3452,41 +3532,41 @@ Bitte geben Sie einen Namen ein:
TabRoom
-
-
- &Say:
- &Sagen:
-
- Chat
-
+ &Say:
+ &Sagen:
- &Room
-
+ Chat
+ Unterhaltung
+ &Room
+ &Raum
+
+
+
&Leave room
-
+ Raum ver&lassen
-
+
%1 has joined the room.
-
+ %1 hat den Raum betreten.
-
+
%1 has left the room.
-
+ %1 hat den Raum verlassen.
TabServer
-
+
Server
Server
@@ -3509,34 +3589,44 @@ Bitte geben Sie einen Namen ein:
UserInfoBox
-
+
+ User information
+ Benutzerinformationen
+
+
+
+ Real name:
+ Richtiger Name:
+
+
+
Location:
Ort:
-
+
User level:
Nutzerstatus:
-
+
Administrator
-
+ Administrator
-
+
Judge
-
+ Schiedsrichter
-
+
Registered user
-
+ Registrierter Benutzer
-
+
Unregistered user
-
+ Unregistrierter Benutzer
@@ -3565,14 +3655,24 @@ Bitte geben Sie einen Namen ein:
UserList
-
+
Users online: %1
Benutzer online: %1
-
+
Users in this room: %1
-
+ Benutzer in diesem Raum: %1
+
+
+
+ User &details
+ Benutzer&details
+
+
+
+ Direct &chat
+ &Persönliches Gespräch
@@ -3764,14 +3864,15 @@ Willst du die Änderungen speichern?
Error
- Fehler
+ Fehler
The deck could not be saved.
Please check that the directory is writable and try again.
-
+ Das Deck konnte nicht gespeichert werden.
+Bitte überprüfen Sie, dass Sie Schreibrechte in dem Verzeichnis haben, und versuchen Sie es erneut.
diff --git a/cockatrice/translations/cockatrice_en.ts b/cockatrice/translations/cockatrice_en.ts
index dfb6231d..a47980be 100644
--- a/cockatrice/translations/cockatrice_en.ts
+++ b/cockatrice/translations/cockatrice_en.ts
@@ -1,6 +1,39 @@
+
+ AbstractCounter
+
+
+ &Set counter...
+
+
+
+
+ Ctrl+L
+
+
+
+
+ F11
+
+
+
+
+ F12
+
+
+
+
+ Set counter
+
+
+
+
+ New value for counter '%1':
+
+
+
AppearanceSettingsPage
@@ -132,117 +165,122 @@
CardItem
-
+
&Play
-
-
- &Tap
-
-
-
-
- &Untap
-
-
-
-
- Toggle &normal untapping
-
-
- &Flip
-
-
-
-
- &Clone
+ &Hide
- &Attach to card...
+ &Tap
- Ctrl+A
+ &Untap
- Unattac&h
+ Toggle &normal untapping
- Set &P/T...
+ &Flip
- &Set annotation...
+ &Clone
+
+
+
+
+ &Attach to card...
- red
+ Ctrl+A
- yellow
+ Unattac&h
- green
+ Set &P/T...
-
- &Add counter (%1)
+
+ &Set annotation...
+
+
+
+
+ red
- &Remove counter (%1)
+ yellow
-
- &Set counters (%1)...
+
+ green
- &top of library
-
-
-
-
- &bottom of library
+ &Add counter (%1)
- &graveyard
-
-
-
-
- Ctrl+Del
+ &Remove counter (%1)
- &exile
+ &Set counters (%1)...
+
+
+
+
+ &top of library
+ &bottom of library
+
+
+
+
+ &graveyard
+
+
+
+
+ Ctrl+Del
+
+
+
+
+ &exile
+
+
+
+
&Move to
@@ -430,39 +468,6 @@
-
- Counter
-
-
- &Set counter...
-
-
-
-
- Ctrl+L
-
-
-
-
- F11
-
-
-
-
- F12
-
-
-
-
- Set counter
-
-
-
-
- New value for counter '%1':
-
-
-
DeckListModel
@@ -1058,119 +1063,129 @@
- Portugese:
+ Portugese (Portugal):
+ Portugese (Brazil):
+
+
+
+
French:
-
-
-
-
+
+ Japanese:
+
+
+
+
+
+
+
Error
-
+
Server timeout
-
+
Invalid login data.
-
+
Socket error: %1
-
+
Protocol version mismatch. Local version: %1, remote version: %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?
@@ -1656,365 +1671,365 @@
PhasesToolbar
-
+
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
-
+
End of turn step
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 &top of library
- Move to &exile
+
+ Move to &bottom of library
-
- Ctrl+W
+
+
+ Move to &graveyard
-
- Ctrl+D
+
+ &View library
-
- D&raw cards...
+
+ Reveal &library to
-
- 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...
+
+ Reveal t&op card to
- Put top card on &bottom
+ Move top cards to &graveyard...
-
- &Reveal to
+
+ 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 &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
+
+
+
+
+ &Reveal to
+
+
+
+
Reveal r&andom card to
-
+
C&ard
-
+
&All players
-
+
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
@@ -2060,17 +2075,17 @@
-
+
Cockatrice decks (*.cod)
-
+
Plain text decks (*.dec *.mwDeck)
-
+
All files (*.*)
@@ -2096,32 +2111,32 @@
RoomSelector
-
+
Rooms
-
+
Joi&n
-
+
Room
-
+
Description
-
+
Players
-
+
Games
@@ -2139,6 +2154,44 @@
+
+ TabAdmin
+
+
+ Update server &message
+
+
+
+
+ Server administration functions
+
+
+
+
+ &Unlock functions
+
+
+
+
+ &Lock functions
+
+
+
+
+ Unlock administration functions
+
+
+
+
+ Do you really want to unlock the administration functions?
+
+
+
+
+ Administration
+
+
+
TabDeckStorage
@@ -2209,87 +2262,87 @@ Please enter a name:
TabGame
-
+
&Game
-
+
Next &phase
-
+
Ctrl+Space
-
+
Next &turn
-
+
Ctrl+Return
-
+
Ctrl+Enter
-
+
&Remove all local arrows
-
+
Ctrl+R
-
+
&Concede
-
+
F2
-
+
&Leave game
-
+
&Say:
-
+
Concede
-
+
Are you sure you want to concede this game?
-
+
Leave game
-
+
Are you sure you want to leave this game?
-
+
Game %1: %2
@@ -2320,32 +2373,32 @@ Please enter a name:
TabRoom
-
+
&Say:
-
+
Chat
-
+
&Room
-
+
&Leave room
-
+
%1 has joined the room.
-
+
%1 has left the room.
@@ -2353,7 +2406,7 @@ Please enter a name:
TabServer
-
+
Server
@@ -2361,32 +2414,42 @@ Please enter a name:
UserInfoBox
-
+
+ User information
+
+
+
+
+ Real name:
+
+
+
+
Location:
-
+
User level:
-
+
Administrator
-
+
Judge
-
+
Registered user
-
+
Unregistered user
@@ -2417,15 +2480,25 @@ Please enter a name:
UserList
-
+
Users online: %1
-
+
Users in this room: %1
+
+
+ User &details
+
+
+
+
+ Direct &chat
+
+
WndDeckEditor
diff --git a/cockatrice/translations/cockatrice_es.ts b/cockatrice/translations/cockatrice_es.ts
index 5e99e46a..44daecba 100644
--- a/cockatrice/translations/cockatrice_es.ts
+++ b/cockatrice/translations/cockatrice_es.ts
@@ -1,6 +1,39 @@
+
+ AbstractCounter
+
+
+ &Set counter...
+ E&stablecer contadores...
+
+
+
+ Ctrl+L
+ Ctrl+L
+
+
+
+ F11
+ F11
+
+
+
+ F12
+ F12
+
+
+
+ Set counter
+ Establecer contador
+
+
+
+ New value for counter '%1':
+ Nuevo valor para el contador '%1':
+
+
AppearanceSettingsPage
@@ -140,117 +173,122 @@
CardItem
-
+
&Play
-
+
+ &Hide
+
+
+
+
&Tap
&Girar
-
+
&Untap
&Enderezar
-
+
Toggle &normal untapping
Alternar enderezamiento &normal
-
+
&Flip
&Voltear
-
+
&Clone
&Clonar
-
+
&Attach to card...
Ane&xar a una carta...
-
+
Ctrl+A
Ctrl+A
-
+
Unattac&h
Desane&xar
-
+
Set &P/T...
Establecer &F/R...
-
+
&Set annotation...
E&scribir anotación...
-
+
red
rojo
-
+
yellow
amarillo
-
+
green
verde
-
+
&Add counter (%1)
&Añadir contador (%1)
-
+
&Remove counter (%1)
&Quitar contador (%1)
-
+
&Set counters (%1)...
E&stablecer contadores (%1)...
-
+
&top of library
&parte superior de la biblioteca
-
+
&bottom of library
&fondo de la biblioteca
-
+
&graveyard
&cementerio
-
+
Ctrl+Del
Ctrl+Del
-
+
&exile
&exilio
-
+
&Move to
&Mover a
@@ -594,34 +632,28 @@
Counter
-
&Set counter...
- E&stablecer contadores...
+ E&stablecer contadores...
-
Ctrl+L
- Ctrl+L
+ Ctrl+L
-
F11
- F11
+ F11
-
F12
- F12
+ F12
-
Set counter
- Establecer contador
+ Establecer contador
-
New value for counter '%1':
- Nuevo valor para el contador '%1':
+ Nuevo valor para el contador '%1':
@@ -1235,119 +1267,129 @@
- Portugese:
+ Portugese (Portugal):
+ Portugese (Brazil):
+
+
+
+
French:
-
-
-
-
+
+ Japanese:
+
+
+
+
+
+
+
Error
Error
-
+
Server timeout
Tiempo de espera del servidor agotado
-
+
Invalid login data.
Datos de conexión invalidos.
-
+
Socket error: %1
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.
-
+
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?
@@ -1833,57 +1875,57 @@
PhasesToolbar
-
+
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 del 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 final del combate
-
+
Second main phase
Segunda fase principal
-
+
End of turn step
Paso final
@@ -1891,123 +1933,123 @@
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
-
+
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
@@ -2016,98 +2058,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
@@ -2116,90 +2158,90 @@
Mover cartas superiores al ce&menterio...
-
+
Move top cards to &exile...
Mover cartas superiores al &exilio...
-
+
Put top card on &bottom
-
+
&Reveal to
&Revelar a
-
+
Reveal r&andom card to
Revelar carta &aleatoriamente a
-
+
C&ard
C&arta
-
+
&All players
&Todos los jugadores
-
+
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
@@ -2257,17 +2299,17 @@
Reserva
-
+
Cockatrice decks (*.cod)
Mazos de Cockatrice (*.cod)
-
+
Plain text decks (*.dec *.mwDeck)
Archivos de texto plano (*.dec *.mwDeck)
-
+
All files (*.*)
Todos los archivos (*.*)
@@ -2293,32 +2335,32 @@
RoomSelector
-
+
Rooms
-
+
Joi&n
E&ntrar
-
+
Room
-
+
Description
Descripción
-
+
Players
Jugadores
-
+
Games
Partidas
@@ -2343,6 +2385,44 @@
Nombre largo
+
+ TabAdmin
+
+
+ Update server &message
+
+
+
+
+ Server administration functions
+
+
+
+
+ &Unlock functions
+
+
+
+
+ &Lock functions
+
+
+
+
+ Unlock administration functions
+
+
+
+
+ Do you really want to unlock the administration functions?
+
+
+
+
+ Administration
+
+
+
TabChatChannel
@@ -2433,87 +2513,87 @@ Por favor, introduzca un nombre:
TabGame
-
+
&Game
&Partida
-
+
Next &phase
Próxima &fase
-
+
Ctrl+Space
Ctrl+Space
-
+
Next &turn
Próximo &turno
-
+
Ctrl+Return
Ctrl+Return
-
+
Ctrl+Enter
Ctrl+Enter
-
+
&Remove all local arrows
&Retirar todas las flechas locales
-
+
Ctrl+R
Ctrl+R
-
+
&Concede
&Conceder
-
+
F2
F2
-
+
&Leave game
&Abandonar la partida
-
+
&Say:
&Decir:
-
+
Concede
Conceder
-
+
Are you sure you want to concede this game?
¿Estás seguro de que quieres conceder esta partida?
-
+
Leave game
Abandonar la partida
-
+
Are you sure you want to leave this game?
¿Estás seguro de que quieres abandonar la partida?
-
+
Game %1: %2
Partida %1: %2
@@ -2544,32 +2624,32 @@ Por favor, introduzca un nombre:
TabRoom
-
+
&Say:
&Decir:
-
+
Chat
-
+
&Room
-
+
&Leave room
-
+
%1 has joined the room.
-
+
%1 has left the room.
@@ -2577,7 +2657,7 @@ Por favor, introduzca un nombre:
TabServer
-
+
Server
Servidor
@@ -2585,32 +2665,42 @@ Por favor, introduzca un nombre:
UserInfoBox
-
+
+ User information
+
+
+
+
+ Real name:
+
+
+
+
Location:
Localización:
-
+
User level:
Nivel de usuario:
-
+
Administrator
-
+
Judge
-
+
Registered user
-
+
Unregistered user
@@ -2641,15 +2731,25 @@ Por favor, introduzca un nombre:
UserList
-
+
Users online: %1
Usuarios online: %1
-
+
Users in this room: %1
+
+
+ User &details
+
+
+
+
+ Direct &chat
+
+
WndDeckEditor
diff --git a/cockatrice/translations/cockatrice_fr.ts b/cockatrice/translations/cockatrice_fr.ts
index 874e2d48..04f53a8b 100644
--- a/cockatrice/translations/cockatrice_fr.ts
+++ b/cockatrice/translations/cockatrice_fr.ts
@@ -1,6 +1,39 @@
+
+ AbstractCounter
+
+
+ &Set counter...
+ &Fixer les compteurs
+
+
+
+ Ctrl+L
+ Ctrl+L
+
+
+
+ F11
+ F11
+
+
+
+ F12
+ F12
+
+
+
+ Set counter
+ Fixer compteurs
+
+
+
+ New value for counter '%1':
+ Nouvelle valeur pour le compteur '%1':
+
+
AppearanceSettingsPage
@@ -132,117 +165,122 @@
CardItem
-
+
&Play
-
+
+ &Hide
+
+
+
+
&Tap
&Engager
-
+
&Untap
&Dégager
-
+
Toggle &normal untapping
-
+
&Flip
&Inverser
-
+
&Clone
&Clone
-
+
&Attach to card...
&Attacher à la carte
-
+
Ctrl+A
Ctrl+A
-
+
Unattac&h
Détac&her
-
+
Set &P/T...
Fixer &F/E...
-
+
&Set annotation...
Fi&xer annotation
-
+
red
rouge
-
+
yellow
jaune
-
+
green
vert
-
+
&Add counter (%1)
&Ajouter compteur (%1)
-
+
&Remove counter (%1)
&Retirer compteur (%1)
-
+
&Set counters (%1)...
&Fixer compteurs (%1)...
-
+
&top of library
Dessus de la &Bibliothèque
-
+
&bottom of library
&Dessous de la bibliothèque
-
+
&graveyard
&Cimetière
-
+
Ctrl+Del
Ctrl+Del
-
+
&exile
&exiler
-
+
&Move to
&Aller à
@@ -456,34 +494,28 @@
Counter
-
&Set counter...
- &Fixer les compteurs
+ &Fixer les compteurs
-
Ctrl+L
- Ctrl+L
+ Ctrl+L
-
F11
- F11
+ F11
-
F12
- F12
+ F12
-
Set counter
- Fixer compteurs
+ Fixer compteurs
-
New value for counter '%1':
- Nouvelle valeur pour le compteur '%1':
+ Nouvelle valeur pour le compteur '%1':
@@ -1090,120 +1122,130 @@
- Portugese:
+ Portugese (Portugal):
+ Portugese (Brazil):
+
+
+
+
French:
-
-
-
-
+
+ Japanese:
+
+
+
+
+
+
+
Error
Erreur
-
+
Server timeout
Délai de la demande dépassé
-
+
Invalid login data.
Information de connexion érronée
-
+
Socket error: %1
Erreur de socket: %1
-
+
Protocol version mismatch. Local version: %1, remote version: %2.
Version de protocole différente. Version locale: %1 ,version distante: %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?
@@ -1705,57 +1747,57 @@
PhasesToolbar
-
+
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
-
+
End of turn step
Étape de fin de tour
@@ -1763,308 +1805,308 @@
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...
-
+
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
-
+
&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
-
+
F3
F3
-
+
Ctrl+W
Ctrl+W
-
+
F4
F4
-
+
Ctrl+D
Ctrl+D
-
+
Ctrl+E
Ctrl+E
-
+
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
@@ -2110,17 +2152,17 @@
Réserve
-
+
Cockatrice decks (*.cod)
Deck Cockatrice (*.cod)
-
+
Plain text decks (*.dec *.mwDeck)
Deck au format texte (*.dec *.mwDeck)
-
+
All files (*.*)
Tous les fichiers (*.*)
@@ -2147,32 +2189,32 @@
RoomSelector
-
+
Rooms
-
+
Joi&n
&Rejoindre
-
+
Room
-
+
Description
Description
-
+
Players
Joueurs
-
+
Games
Parties
@@ -2197,6 +2239,44 @@
Nom long
+
+ TabAdmin
+
+
+ Update server &message
+
+
+
+
+ Server administration functions
+
+
+
+
+ &Unlock functions
+
+
+
+
+ &Lock functions
+
+
+
+
+ Unlock administration functions
+
+
+
+
+ Do you really want to unlock the administration functions?
+
+
+
+
+ Administration
+
+
+
TabChatChannel
@@ -2287,87 +2367,87 @@ Entrez un nom s'il vous plait:
TabGame
-
+
&Game
&Partie
-
+
Next &phase
&Prochaine phase
-
+
Ctrl+Space
Ctrl+Espace
-
+
Next &turn
Prochain &Tour
-
+
Ctrl+Return
Ctrl+Retour
-
+
Ctrl+Enter
Ctrl+Entrée
-
+
&Remove all local arrows
&Retirer toutes les fléches locale
-
+
Ctrl+R
Ctrl+R
-
+
&Concede
&Concéder
-
+
F2
F2
-
+
&Leave game
&Quitter la partie
-
+
&Say:
&Dire:
-
+
Concede
Concéder
-
+
Are you sure you want to concede this game?
Etes vous sur de vouloir concéder la partie?
-
+
Leave game
Quitter la partie
-
+
Are you sure you want to leave this game?
Etes vous sur de vouloir quitter la partie?
-
+
Game %1: %2
Partie %1:%2
@@ -2399,32 +2479,32 @@ Entrez un nom s'il vous plait:
TabRoom
-
+
&Say:
&Dire:
-
+
Chat
-
+
&Room
-
+
&Leave room
-
+
%1 has joined the room.
-
+
%1 has left the room.
@@ -2432,7 +2512,7 @@ Entrez un nom s'il vous plait:
TabServer
-
+
Server
Serveur
@@ -2440,32 +2520,42 @@ Entrez un nom s'il vous plait:
UserInfoBox
-
+
+ User information
+
+
+
+
+ Real name:
+
+
+
+
Location:
Localisation:
-
+
User level:
Niveau utilisateur:
-
+
Administrator
-
+
Judge
-
+
Registered user
-
+
Unregistered user
@@ -2496,15 +2586,25 @@ Entrez un nom s'il vous plait:
UserList
-
+
Users online: %1
Utilisateurs en ligne:%1
-
+
Users in this room: %1
+
+
+ User &details
+
+
+
+
+ Direct &chat
+
+
WndDeckEditor
diff --git a/cockatrice/translations/cockatrice_jp.ts b/cockatrice/translations/cockatrice_jp.ts
index 817480c3..24943745 100644
--- a/cockatrice/translations/cockatrice_jp.ts
+++ b/cockatrice/translations/cockatrice_jp.ts
@@ -1,84 +1,116 @@
+
+ AbstractCounter
+
+
+ &Set counter...
+ カウンターの数を決める...
+
+
+
+ Ctrl+L
+
+
+
+
+ F11
+
+
+
+
+ F12
+
+
+
+
+ Set counter
+ カウンターの設定
+
+
+
+ New value for counter '%1':
+ カウンター '%1'の新しい値を設定する:
+
+
AppearanceSettingsPage
-
+
Zone background pictures
背景画像の設定
-
+
Path to hand background:
手札の背景画像へのパス:
-
+
Path to stack background:
スタックゾーンの背景画像へのパス:
-
+
Path to table background:
テーブルの背景画像へのパス:
-
+
Path to player info background:
プレイヤー画像へのパス:
-
+
Path to picture of card back:
カード背面画像へのパス:
-
+
Hand layout
手札のレイアウト
-
+
Display hand horizontally (wastes space)
手札を横に並べる(スペースを消費します)
-
+
Table grid layout
テーブルグリッドのレイアウト
-
Economical layout
- 省スペースレイアウト(カード間間隔を細かくできます)
+ 省スペースレイアウト(カード間間隔を細かくできます)
-
+
Invert vertical coordinate
垂直反転調整
-
+
Zone view layout
ゾーンビューレイアウト
-
+
Sort by name
名前で整列
-
+
Sort by type
タイプで整列
-
-
-
-
-
+
+
+
+
+
Choose path
画像の指定
@@ -137,112 +169,122 @@
CardItem
-
+
+ &Play
+
+
+
+
+ &Hide
+
+
+
+
&Tap
タップ
-
+
&Untap
アンタップ
-
+
Toggle &normal untapping
通常のアンタップをしない
-
+
&Flip
裏にする
-
+
&Clone
複製する
-
+
&Attach to card...
カードに付ける...
-
+
Ctrl+A
-
+
Unattac&h
取り外す
-
+
Set &P/T...
P/Tを決める...
-
+
&Set annotation...
注釈を付ける...
-
+
red
赤
-
+
yellow
黄
-
+
green
緑
-
+
&Add counter (%1)
カウンターを乗せる (%1)
-
+
&Remove counter (%1)
カウンターを取り除く (%1)
-
+
&Set counters (%1)...
カウンターの数を決める (%1)...
-
+
&top of library
ライブラリーの一番上へ
-
+
&bottom of library
ライブラリーの一番下へ
-
+
&graveyard
墓地へ
-
+
Ctrl+Del
-
+
&exile
追放領域へ
-
+
&Move to
移動させる
@@ -433,62 +475,39 @@
ChatChannelSelector
-
Chat channels
- チャットチャンネル
+ チャットチャンネル
-
Joi&n
- 参加する
+ 参加する
-
Channel
- チャンネル
+ チャンネル
-
Description
- 説明
+ 説明
-
Players
- プレイヤー
+ プレイヤー
Counter
-
&Set counter...
- カウンターの数を決める...
+ カウンターの数を決める...
-
- Ctrl+L
-
-
-
-
- F11
-
-
-
-
- F12
-
-
-
-
Set counter
- カウンターの設定
+ カウンターの設定
-
New value for counter '%1':
- カウンター '%1'の新しい値を設定する:
+ カウンター '%1'の新しい値を設定する:
@@ -669,12 +688,12 @@
部屋を作る
-
+
Error
エラー
-
+
Server error.
サーバーエラー.
@@ -816,54 +835,54 @@
DlgSettings
-
-
-
+
+
+
Error
エラー
-
+
Your card database is invalid. Would you like to go back and set the correct path?
あなたのカードデータベースは無効です.前に戻って正しいパスを設定してください.
-
+
The path to your deck directory is invalid. Would you like to go back and set the correct path?
あなたのデッキディレクトリへのパスは無効です.前に戻って正しいパスを設定してください.
-
+
The path to your card pictures directory is invalid. Would you like to go back and set the correct path?
あなたのカード画像ディレクトリへのパスは無効です.前に戻って正しいパスを設定してください.
-
+
Settings
設定
-
+
General
全般
-
+
Appearance
外観
-
+
User interface
ユーザーインターフェース
-
+
Messages
メッセージ
-
+
&Close
@@ -871,65 +890,69 @@
GameSelector
-
+
C&reate
部屋を作る
-
+
&Join
参加する
-
-
-
-
+
+
+
+
Error
エラー
-
+
Wrong password.
パスワードが間違っています.
-
+
Spectators are not allowed in this game.
この試合は観戦者は許可されていません.
-
+
The game is already full.
このゲームはすでに満員です.
-
+
The game does not exist any more.
このゲームはもう存在しません.
-
+
Join game
参加
-
+
Password:
パスワード:
-
+
Games
ゲーム
-
- &Show full games
- 全てのゲームを見る
+
+ Show &full games
+
-
+ &Show full games
+ 全てのゲームを見る
+
+
+
J&oin as spectator
観戦者として参加
@@ -937,7 +960,7 @@
GameView
-
+
Esc
@@ -1044,136 +1067,171 @@
MainWindow
-
+
Number of players
プレイヤー人数
-
+
Please enter the number of players.
プレイヤーの人数を入れてください.
-
-
+
+
Player %1
プレイヤー %1
-
+
About Cockatrice
Cockatriceについて
-
-
- <font size="8"><b>Cockatrice</b></font><br>Version %1<br><br><br><b>Authors:</b><br>Max-Wilhelm Bruker<br>Marcus Schütz<br>Marius van Zundert<br><br><b>Translators:</b><br>Spanish: Gocho<br>Portugese: Milton Gonçalves<br>
-
-
+ Version %1
+
+
+
+
+ Authors:
+
+
+
+
+ Translators:
+
+
+
+
+ Spanish:
+
+
+
+
+ Portugese (Portugal):
+
+
+
+
+ Portugese (Brazil):
+
+
+
+ French:
+
+
+
+
+ Japanese:
+
+
+
-
+
+
+
Error
エラー
-
+
Server timeout
サーバータイムアウト
-
+
Invalid login data.
無効なログインデータです.
-
+
Socket error: %1
ソケットエラー: %1
-
+
Protocol version mismatch. Local version: %1, remote version: %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?
ゲームがまだ開いています.本当に退出しますか?
@@ -1281,134 +1339,137 @@
-
+
+ %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 places %n counters (%2) on %3 (now %4).
-
+
%1 removes %n counter(s) (%2) from %3 (now %4).
%1 removes a counter (%2) from %3 (now %4).
- %1 removes %n counters (%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.
@@ -1473,52 +1534,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.
@@ -1528,102 +1589,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
@@ -1631,22 +1692,22 @@
MessagesSettingsPage
-
+
&Add
追加
-
+
&Remove
削除
-
+
Add message
メッセージを追加する
-
+
Message:
メッセージ:
@@ -1654,57 +1715,57 @@
PhasesToolbar
-
+
Untap step
アンタップステップ
-
+
Upkeep step
アップキープステップ
-
+
Draw step
ドローステップ
-
+
First main phase
第1メインフェイズ
-
+
Beginning of combat step
戦闘前ステップ
-
+
Declare attackers step
攻撃クリーチャー指定ステップ
-
+
Declare blockers step
ブロッククリーチャー指定ステップ
-
+
Combat damage step
戦闘ダメージステップ
-
+
End of combat step
戦闘終了ステップ
-
+
Second main phase
第2メインフェイズ
-
+
End of turn step
ターン終了ステップ
@@ -1712,302 +1773,307 @@
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
発言する
-
+
Move top cards to &exile...
ライブラリーの一番上からX枚追放する
-
+
+ Put top card on &bottom
+
+
+
+
&Reveal to
公開する
-
+
Reveal r&andom card to
ランダムに公開する
-
+
C&ard
カード
-
+
&All players
全てのプレイヤー
-
+
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
カウンターを設定する
@@ -2053,17 +2119,17 @@
サイドボード
-
+
Cockatrice decks (*.cod)
-
+
Plain text decks (*.dec *.mwDeck)
-
+
All files (*.*)
全てのファイル (*.*)
@@ -2086,12 +2152,44 @@
アップロード日
+
+ RoomSelector
+
+
+ Rooms
+
+
+
+
+ Joi&n
+ 参加する
+
+
+
+ Room
+
+
+
+
+ Description
+ 説明
+
+
+
+ Players
+ プレイヤー
+
+
+
+ Games
+ ゲーム
+
+
ServerMessageLog
-
Server messages
- サーバー メッセージ
+ サーバー メッセージ
@@ -2107,27 +2205,61 @@
正式名称
+
+ TabAdmin
+
+
+ Update server &message
+
+
+
+
+ Server administration functions
+
+
+
+
+ &Unlock functions
+
+
+
+
+ &Lock functions
+
+
+
+
+ Unlock administration functions
+
+
+
+
+ Do you really want to unlock the administration functions?
+
+
+
+
+ Administration
+
+
+
TabChatChannel
-
C&hat channel
- チャンネルでチャットする
+ チャンネルでチャットする
-
&Leave channel
- チャンネルから退出
+ チャンネルから退出
-
%1 has joined the channel.
- %1がチャンネルに参加しました.
+ %1がチャンネルに参加しました.
-
%1 has left the channel.
- %1はチャンネルから退出しました.
+ %1はチャンネルから退出しました.
@@ -2200,87 +2332,87 @@ Please enter a name:
TabGame
-
+
&Game
ゲーム
-
+
Next &phase
次のフェイズ
-
+
Ctrl+Space
-
+
Next &turn
次のターン
-
+
Ctrl+Return
-
+
Ctrl+Enter
-
+
&Remove all local arrows
全ての矢印を消す
-
+
Ctrl+R
-
+
&Concede
投了する
-
+
F2
-
+
&Leave game
ゲームを退出する
-
+
&Say:
発言する
-
+
Concede
投了する
-
+
Are you sure you want to concede this game?
本当にこのゲームに投了しますか?
-
+
Leave game
ゲームから退出する
-
+
Are you sure you want to leave this game?
本当にこのゲームから退出しますか?
-
+
Game %1: %2
ゲーム %1: %2
@@ -2308,10 +2440,43 @@ Please enter a name:
%1と会話
+
+ TabRoom
+
+
+ &Say:
+ 発言する
+
+
+
+ Chat
+
+
+
+
+ &Room
+
+
+
+
+ &Leave room
+
+
+
+
+ %1 has joined the room.
+
+
+
+
+ %1 has left the room.
+
+
+
TabServer
-
+
Server
サーバー
@@ -2319,35 +2484,65 @@ Please enter a name:
UserInfoBox
-
+
+ User information
+
+
+
+
+ Real name:
+
+
+
+
Location:
現在地:
-
+
User level:
ユーザーレベル:
+
+
+ Administrator
+
+
+
+
+ Judge
+
+
+
+
+ Registered user
+
+
+
+
+ Unregistered user
+
+
UserInterfaceSettingsPage
-
+
General interface settings
インターフェース総合設定
-
+
&Double-click cards to play them (instead of single-click)
ダブルクリックでカードをプレイする(シングルクリックの代わり)
-
+
Animation settings
アニメーション設定
-
+
&Tap/untap animation
タップ/アンタップアニメーション
@@ -2355,10 +2550,25 @@ Please enter a name:
UserList
-
+
Users online: %1
ユーザー オンライン: %1
+
+
+ Users in this room: %1
+
+
+
+
+ User &details
+
+
+
+
+ Direct &chat
+
+
WndDeckEditor
@@ -2443,7 +2653,20 @@ Please enter a name:
デッキをロード
-
+
+
+ Error
+ エラー
+
+
+
+
+ The deck could not be saved.
+Please check that the directory is writable and try again.
+
+
+
+
Save deck
デッキを保存
diff --git a/cockatrice/translations/cockatrice_pt-br.ts b/cockatrice/translations/cockatrice_pt-br.ts
index 12e4475e..a69c1491 100644
--- a/cockatrice/translations/cockatrice_pt-br.ts
+++ b/cockatrice/translations/cockatrice_pt-br.ts
@@ -1,84 +1,116 @@
+
+ AbstractCounter
+
+
+ &Set counter...
+ Alterar &marcador...
+
+
+
+ Ctrl+L
+ Ctrl+L
+
+
+
+ F11
+ F11
+
+
+
+ F12
+ F12
+
+
+
+ Set counter
+ Alterar marcador
+
+
+
+ New value for counter '%1':
+ Novo valor para o marcador '%1':
+
+
AppearanceSettingsPage
-
+
Zone background pictures
Imagens de fundo das zonas
-
+
Path to hand background:
Caminho para o fundo da mão:
-
+
Path to stack background:
Caminho para o fundo da pilha:
-
+
Path to table background:
Caminho para o fundo da mesa:
-
+
Path to player info background:
Caminho para o fundo das informações do jogador:
-
+
Path to picture of card back:
Caminho para a imagem do verso dos cards:
-
+
Hand layout
Layout da mão
-
+
Display hand horizontally (wastes space)
Mostrar a mão na horizontal (desperdiça espaço)
-
+
Table grid layout
Layout do campo de batalha
-
Economical layout
- Layout econômico
+ Layout econômico
-
+
Invert vertical coordinate
Inverter a coordenada vertical
-
+
Zone view layout
Layout de vista da zona
-
+
Sort by name
Ordenar por nome
-
+
Sort by type
Ordenar por tipo
-
-
-
-
-
+
+
+
+
+
Choose path
Escolher caminho
@@ -137,112 +169,122 @@
CardItem
-
+
+ &Play
+
+
+
+
+ &Hide
+
+
+
+
&Tap
&Virar
-
+
&Untap
&Desvirar
-
+
Toggle &normal untapping
&Trocar o modo de desvirar
-
+
&Flip
Virar a &face
-
+
&Clone
Clo&nar
-
+
&Attach to card...
Ane&xar ao card...
-
+
Ctrl+A
Ctrl+A
-
+
Unattac&h
De&sanexar
-
+
Set &P/T...
Alterar &P/R...
-
+
&Set annotation...
Alterar ¬a...
-
+
red
vermelho
-
+
yellow
amarelo
-
+
green
verde
-
+
&Add counter (%1)
Adicionar &marcador (%1)
-
+
&Remove counter (%1)
&Remover marcador (%1)
-
+
&Set counters (%1)...
&Alterar marcadores (%1)...
-
+
&top of library
topo do &grimório
-
+
&bottom of library
&fundo do grimório
-
+
&graveyard
&cemitério
-
+
Ctrl+Del
Ctrl+Del
-
+
&exile
&exílio
-
+
&Move to
Mo&ver para
@@ -433,62 +475,51 @@
ChatChannelSelector
-
Chat channels
- Canais de chat
+ Canais de chat
-
Joi&n
- &Entrar
+ &Entrar
-
Channel
- Canal
+ Canal
-
Description
- Descrição
+ Descrição
-
Players
- Jogadores
+ Jogadores
Counter
-
&Set counter...
- Alterar &marcador...
+ Alterar &marcador...
-
Ctrl+L
- Ctrl+L
+ Ctrl+L
-
F11
- F11
+ F11
-
F12
- F12
+ F12
-
Set counter
- Alterar marcador
+ Alterar marcador
-
New value for counter '%1':
- Novo valor para o marcador '%1':
+ Novo valor para o marcador '%1':
@@ -669,12 +700,12 @@
Criar jogo
-
+
Error
Erro
-
+
Server error.
Erro do servidor.
@@ -816,54 +847,54 @@
DlgSettings
-
-
-
+
+
+
Error
Erro
-
+
Your card database is invalid. Would you like to go back and set the correct path?
O seu banco de dados de cards é inválido. Você gostaria de voltar e corrigir o caminho?
-
+
The path to your deck directory is invalid. Would you like to go back and set the correct path?
O caminho para a sua pasta de decks é inválido. Você gostaria de voltar e corrigir o caminho?
-
+
The path to your card pictures directory is invalid. Would you like to go back and set the correct path?
O caminho para a sua pasta de imagens de cards é inválido. Você gostaria de voltar e corrigir o caminho?
-
+
Settings
Configurações
-
+
General
Geral
-
+
Appearance
Aparência
-
+
User interface
Interface do usuário
-
+
Messages
Mensagens
-
+
&Close
&Fechar
@@ -871,65 +902,69 @@
GameSelector
-
+
C&reate
&Criar
-
+
&Join
&Entrar
-
-
-
-
+
+
+
+
Error
Erro
-
+
Wrong password.
Senha incorreta.
-
+
Spectators are not allowed in this game.
Não são permitidos visitantes neste jogo.
-
+
The game is already full.
O jogo está cheio.
-
+
The game does not exist any more.
O jogo não existe mais.
-
+
Join game
Entrar no jogo
-
+
Password:
Senha:
-
+
Games
Jogos
-
- &Show full games
- &Mostrar os jogos cheios
+
+ Show &full games
+
-
+ &Show full games
+ &Mostrar os jogos cheios
+
+
+
J&oin as spectator
E&ntrar como visitante
@@ -937,7 +972,7 @@
GameView
-
+
Esc
Esc
@@ -1044,136 +1079,175 @@
MainWindow
-
+
Number of players
Número de jogadores
-
+
Please enter the number of players.
Por favor, entre o número de jogadores.
-
-
+
+
Player %1
Jogador %1
-
+
About Cockatrice
Sobre o Cockatrice
-
<font size="8"><b>Cockatrice</b></font><br>Version %1<br><br><br><b>Authors:</b><br>Max-Wilhelm Bruker<br>Marcus Schütz<br>Marius van Zundert<br><br><b>Translators:</b><br>Spanish: Gocho<br>Portugese: Milton Gonçalves<br>
- <font size="8"><b>Cockatrice</b></font><br>Version %1<br><br><br><b>Authors:</b><br>Max-Wilhelm Bruker<br>Marcus Schütz<br>Marius van Zundert<br><br><b>Translators:</b><br>Spanish: Gocho<br>Portugese: Milton Gonçalves<br>Brazilian Portuguese: Thiago Queiroz<br>
+ <font size="8"><b>Cockatrice</b></font><br>Version %1<br><br><br><b>Authors:</b><br>Max-Wilhelm Bruker<br>Marcus Schütz<br>Marius van Zundert<br><br><b>Translators:</b><br>Spanish: Gocho<br>Portugese: Milton Gonçalves<br>Brazilian Portuguese: Thiago Queiroz<br>
+ Version %1
+
+
+
+
+ Authors:
+
+
+
+
+ Translators:
+
+
+
+
+ Spanish:
+
+
+
+
+ Portugese (Portugal):
+
+
+
+
+ Portugese (Brazil):
+
+
+
+ French:
+
+
+
+
+ Japanese:
+
+
+
-
+
+
+
Error
Erro
-
+
Server timeout
Tempo esgotado do servidor
-
+
Invalid login data.
Informações de login inválidas.
-
+
Socket error: %1
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.
-
+
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?
@@ -1281,88 +1355,93 @@
vindo da pilha
-
+
+ %1 gives %2 control over %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).
@@ -1370,7 +1449,7 @@
-
+
%1 removes %n counter(s) (%2) from %3 (now %4).
%1 tira %n marcador(es) (%2) em %3 (agora com %4).
@@ -1378,37 +1457,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.
@@ -1473,52 +1552,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.
@@ -1528,102 +1607,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
@@ -1631,22 +1710,22 @@
MessagesSettingsPage
-
+
&Add
&Adicionar
-
+
&Remove
&Remover
-
+
Add message
Adicionar mensagem
-
+
Message:
Mensagem:
@@ -1654,57 +1733,57 @@
PhasesToolbar
-
+
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
-
+
End of turn step
Etapa de fim de combate
@@ -1712,302 +1791,307 @@
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
-
+
Move top cards to &exile...
Mover os cards do topo para o e&xílio...
-
+
+ Put top card on &bottom
+
+
+
+
&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
-
+
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
@@ -2053,17 +2137,17 @@
Sideboard
-
+
Cockatrice decks (*.cod)
Decks Cockatrice (*.cod)
-
+
Plain text decks (*.dec *.mwDeck)
Decks de texto simples (*.dec *.mwDeck)
-
+
All files (*.*)
Todos os arquivos (*.*)
@@ -2086,12 +2170,44 @@
Hora do upload
+
+ RoomSelector
+
+
+ Rooms
+
+
+
+
+ Joi&n
+ &Entrar
+
+
+
+ Room
+
+
+
+
+ Description
+ Descrição
+
+
+
+ Players
+ Jogadores
+
+
+
+ Games
+ Jogos
+
+
ServerMessageLog
-
Server messages
- Mensagens do servidor
+ Mensagens do servidor
@@ -2107,27 +2223,61 @@
Nome longo
+
+ TabAdmin
+
+
+ Update server &message
+
+
+
+
+ Server administration functions
+
+
+
+
+ &Unlock functions
+
+
+
+
+ &Lock functions
+
+
+
+
+ Unlock administration functions
+
+
+
+
+ Do you really want to unlock the administration functions?
+
+
+
+
+ Administration
+
+
+
TabChatChannel
-
C&hat channel
- Canal do &chat
+ Canal do &chat
-
&Leave channel
- &Sair do canal
+ &Sair do canal
-
%1 has joined the channel.
- %1 entrou no canal.
+ %1 entrou no canal.
-
%1 has left the channel.
- %1 saiu do canal.
+ %1 saiu do canal.
@@ -2201,87 +2351,87 @@ Por favor, entre um nome:
TabGame
-
+
&Game
&Jogo
-
+
Next &phase
Próxima &etapa
-
+
Ctrl+Space
Ctrl+Espaço
-
+
Next &turn
Próximo &turno
-
+
Ctrl+Return
Ctrl+Return
-
+
Ctrl+Enter
Ctrl+Enter
-
+
&Remove all local arrows
&Apagar todas as setas locais
-
+
Ctrl+R
Ctrl+R
-
+
&Concede
&Conceder
-
+
F2
F2
-
+
&Leave game
&Sair do jogo
-
+
&Say:
&Falar:
-
+
Concede
Conceder
-
+
Are you sure you want to concede this game?
Você tem certeza que deseja conceder este jogo?
-
+
Leave game
Sair do jogo
-
+
Are you sure you want to leave this game?
Você tem certeza que deseja sair deste jogo?
-
+
Game %1: %2
Jogo %1: %2
@@ -2309,10 +2459,43 @@ Por favor, entre um nome:
Falando com %1
+
+ TabRoom
+
+
+ &Say:
+ &Falar:
+
+
+
+ Chat
+
+
+
+
+ &Room
+
+
+
+
+ &Leave room
+
+
+
+
+ %1 has joined the room.
+
+
+
+
+ %1 has left the room.
+
+
+
TabServer
-
+
Server
Servidor
@@ -2320,35 +2503,65 @@ Por favor, entre um nome:
UserInfoBox
-
+
+ User information
+
+
+
+
+ Real name:
+
+
+
+
Location:
Localização:
-
+
User level:
Nível do usuário:
+
+
+ Administrator
+
+
+
+
+ Judge
+
+
+
+
+ Registered user
+
+
+
+
+ Unregistered user
+
+
UserInterfaceSettingsPage
-
+
General interface settings
Configurações gerais de interface
-
+
&Double-click cards to play them (instead of single-click)
&Duplo clique nos cards para jogá-los (ao invés de clique simples)
-
+
Animation settings
Configurações de animação
-
+
&Tap/untap animation
Animação de &virar/desvirar
@@ -2356,10 +2569,25 @@ Por favor, entre um nome:
UserList
-
+
Users online: %1
Usuários online: %1
+
+
+ Users in this room: %1
+
+
+
+
+ User &details
+
+
+
+
+ Direct &chat
+
+
WndDeckEditor
@@ -2444,7 +2672,20 @@ Por favor, entre um nome:
Abrir deck
-
+
+
+ Error
+ Erro
+
+
+
+
+ The deck could not be saved.
+Please check that the directory is writable and try again.
+
+
+
+
Save deck
Salvar deck
diff --git a/cockatrice/translations/cockatrice_pt.ts b/cockatrice/translations/cockatrice_pt.ts
index 3d9436b1..d24169af 100644
--- a/cockatrice/translations/cockatrice_pt.ts
+++ b/cockatrice/translations/cockatrice_pt.ts
@@ -1,6 +1,39 @@
+
+ AbstractCounter
+
+
+ &Set counter...
+ Definir &marcador...
+
+
+
+ Ctrl+L
+ Ctrl+L
+
+
+
+ F11
+ F11
+
+
+
+ F12
+ F12
+
+
+
+ Set counter
+ Definir marcador
+
+
+
+ New value for counter '%1':
+ Novo valor para o marcador '%1':
+
+
AppearanceSettingsPage
@@ -136,117 +169,122 @@
CardItem
-
+
&Play
&Jogar
-
+
+ &Hide
+
+
+
+
&Tap
&Virar
-
+
&Untap
Desv&irar
-
+
Toggle &normal untapping
A<erar desvirar normalmente
-
+
&Flip
Vol&tar
-
+
&Clone
Copi&ar
-
+
&Attach to card...
Ane&xar a carta...
-
+
Ctrl+A
Ctrl+A
-
+
Unattac&h
De&sanexar
-
+
Set &P/T...
Definir &P/R...
-
+
&Set annotation...
Colocar ¬a...
-
+
red
vermelho
-
+
yellow
amarelo
-
+
green
verde
-
+
&Add counter (%1)
Adicionar &marcador (%1)
-
+
&Remove counter (%1)
&Remover marcador (%1)
-
+
&Set counters (%1)...
&Denifir marcadores (%1)...
-
+
&top of library
Topo do &grimório
-
+
&bottom of library
&Fundo do grimório
-
+
&graveyard
&Cemitério
-
+
Ctrl+Del
Ctrl+Del
-
+
&exile
&Exílio
-
+
&Move to
M&over para
@@ -460,34 +498,28 @@
Counter
-
&Set counter...
- Definir &marcador...
+ Definir &marcador...
-
Ctrl+L
- Ctrl+L
+ Ctrl+L
-
F11
- F11
+ F11
-
F12
- F12
+ F12
-
Set counter
- Definir marcador
+ Definir marcador
-
New value for counter '%1':
- Novo valor para o marcador '%1':
+ Novo valor para o marcador '%1':
@@ -1092,120 +1124,134 @@
Espanhol:
-
Portugese:
- Português:
+ Português:
+
+
+
+ Portugese (Portugal):
+
+ Portugese (Brazil):
+
+
+
+
French:
Francês:
-
-
-
-
+
+ Japanese:
+
+
+
+
+
+
+
Error
Erro
-
+
Server timeout
Tempo do servidor esgotado
-
+
Invalid login data.
Informação de login incorrecta.
-
+
Socket error: %1
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.
-
+
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?
@@ -1691,57 +1737,57 @@
PhasesToolbar
-
+
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)
-
+
End of turn step
Fase Final
@@ -1749,307 +1795,307 @@
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...
-
+
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
-
+
F3
F3
-
+
Ctrl+W
Ctrl+W
-
+
F4
F4
-
+
Ctrl+D
Ctrl+D
-
+
Ctrl+E
Ctrl+E
-
+
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
@@ -2095,17 +2141,17 @@
Sideboard
-
+
Cockatrice decks (*.cod)
Decks do Cockatrice (*.cod)
-
+
Plain text decks (*.dec *.mwDeck)
Decks baseados em texto simples (*.dec *.mwDeck)
-
+
All files (*.*)
Todos os ficheiros (*.*)
@@ -2131,32 +2177,32 @@
RoomSelector
-
+
Rooms
Salas
-
+
Joi&n
E&ntrar
-
+
Room
Sala
-
+
Description
Descrição
-
+
Players
Jogadores
-
+
Games
Jogos
@@ -2181,6 +2227,44 @@
Nome longo
+
+ TabAdmin
+
+
+ Update server &message
+
+
+
+
+ Server administration functions
+
+
+
+
+ &Unlock functions
+
+
+
+
+ &Lock functions
+
+
+
+
+ Unlock administration functions
+
+
+
+
+ Do you really want to unlock the administration functions?
+
+
+
+
+ Administration
+
+
+
TabChatChannel
@@ -2271,87 +2355,87 @@ Por favor introduza um nome:
TabGame
-
+
&Game
&Jogo
-
+
Next &phase
Próxima &fase
-
+
Ctrl+Space
Ctrl+Space
-
+
Next &turn
Próximo &turno
-
+
Ctrl+Return
Ctrl+Return
-
+
Ctrl+Enter
Ctrl+Enter
-
+
&Remove all local arrows
&Remover todas as setas locais
-
+
Ctrl+R
Ctrl+R
-
+
&Concede
&Conceder
-
+
F2
F2
-
+
&Leave game
Sair do &jogo
-
+
&Say:
&Dizer:
-
+
Concede
Conceder
-
+
Are you sure you want to concede this game?
Tem a certeza que deseja conceder este jogo?
-
+
Leave game
Sair do jogo
-
+
Are you sure you want to leave this game?
Tem a certeza que deseja sair deste jogo?
-
+
Game %1: %2
Jogo %1: %2
@@ -2382,32 +2466,32 @@ Por favor introduza um nome:
TabRoom
-
+
&Say:
&Dizer:
-
+
Chat
-
+
&Room
&Sala
-
+
&Leave room
&Abandonar a sala
-
+
%1 has joined the room.
%1 entrou na sala.
-
+
%1 has left the room.
%1 abandonou na sala.
@@ -2415,7 +2499,7 @@ Por favor introduza um nome:
TabServer
-
+
Server
Servidor
@@ -2423,32 +2507,42 @@ Por favor introduza um nome:
UserInfoBox
-
+
+ User information
+
+
+
+
+ Real name:
+
+
+
+
Location:
Localização:
-
+
User level:
Nível de utilizador:
-
+
Administrator
Administrador
-
+
Judge
Juiz
-
+
Registered user
Utilizador registado
-
+
Unregistered user
Utilizador não registado
@@ -2479,15 +2573,25 @@ Por favor introduza um nome:
UserList
-
+
Users online: %1
Utilizadores online: %1
-
+
Users in this room: %1
Utilizadores nesta sala:%1
+
+
+ User &details
+
+
+
+
+ Direct &chat
+
+
WndDeckEditor
diff --git a/common/protocol.cpp b/common/protocol.cpp
index b913b5a7..3448de77 100644
--- a/common/protocol.cpp
+++ b/common/protocol.cpp
@@ -27,6 +27,7 @@ void ProtocolItem::initializeHash()
registerSerializableItem("player_ping", ServerInfo_PlayerPing::newItem);
registerSerializableItem("file", DeckList_File::newItem);
registerSerializableItem("directory", DeckList_Directory::newItem);
+ registerSerializableItem("card_id", CardId::newItem);
registerSerializableItem("containercmd", CommandContainer::newItem);
registerSerializableItem("containergame_event", GameEventContainer::newItem);
@@ -34,6 +35,7 @@ void ProtocolItem::initializeHash()
registerSerializableItem("cmddeck_upload", Command_DeckUpload::newItem);
registerSerializableItem("cmddeck_select", Command_DeckSelect::newItem);
registerSerializableItem("cmdset_sideboard_plan", Command_SetSideboardPlan::newItem);
+ registerSerializableItem("cmdmove_card", Command_MoveCard::newItem);
registerSerializableItem("resp", ProtocolResponse::newItem);
ProtocolResponse::initializeHash();
@@ -198,6 +200,21 @@ QList Command_SetSideboardPlan::getMoveList() const
return typecastItemList();
}
+Command_MoveCard::Command_MoveCard(int _gameId, const QString &_startZone, const QList &_cardIds, int _targetPlayerId, const QString &_targetZone, int _x, int _y, bool _faceDown, bool _tapped)
+ : GameCommand("move_card", _gameId)
+{
+ insertItem(new SerializableItem_String("start_zone", _startZone));
+ insertItem(new SerializableItem_Int("target_player_id", _targetPlayerId));
+ insertItem(new SerializableItem_String("target_zone", _targetZone));
+ insertItem(new SerializableItem_Int("x", _x));
+ insertItem(new SerializableItem_Int("y", _y));
+ insertItem(new SerializableItem_Bool("face_down", _faceDown));
+ insertItem(new SerializableItem_Bool("tapped", _tapped));
+
+ for (int i = 0; i < _cardIds.size(); ++i)
+ itemList.append(_cardIds[i]);
+}
+
QHash ProtocolResponse::responseHash;
ProtocolResponse::ProtocolResponse(int _cmdId, ResponseCode _responseCode, const QString &_itemName)
diff --git a/common/protocol.h b/common/protocol.h
index 15c99d40..d23969d6 100644
--- a/common/protocol.h
+++ b/common/protocol.h
@@ -25,6 +25,7 @@ enum ItemId {
ItemId_Command_DeckUpload = ItemId_Other + 100,
ItemId_Command_DeckSelect = ItemId_Other + 101,
ItemId_Command_SetSideboardPlan = ItemId_Other + 102,
+ ItemId_Command_MoveCard = ItemId_Other + 103,
ItemId_Event_ListRooms = ItemId_Other + 200,
ItemId_Event_JoinRoom = ItemId_Other + 201,
ItemId_Event_ListGames = ItemId_Other + 203,
@@ -200,6 +201,22 @@ public:
QList getMoveList() const;
};
+class Command_MoveCard : public GameCommand {
+ Q_OBJECT
+public:
+ Command_MoveCard(int _gameId = -1, const QString &_startZone = QString(), const QList &_cardIds = QList(), int _targetPlayerId = -1, const QString &_targetZone = QString(), int _x = -1, int _y = -1, bool _faceDown = false, bool _tapped = false);
+ QString getStartZone() const { return static_cast(itemMap.value("start_zone"))->getData(); }
+ QList getCardIds() const { return typecastItemList(); }
+ int getTargetPlayerId() const { return static_cast(itemMap.value("target_player_id"))->getData(); }
+ QString getTargetZone() const { return static_cast(itemMap.value("target_zone"))->getData(); }
+ int getX() const { return static_cast(itemMap.value("x"))->getData(); }
+ int getY() const { return static_cast(itemMap.value("y"))->getData(); }
+ bool getFaceDown() const { return static_cast(itemMap.value("face_down"))->getData(); }
+ bool getTapped() const { return static_cast(itemMap.value("tapped"))->getData(); }
+ static SerializableItem *newItem() { return new Command_MoveCard; }
+ int getItemId() const { return ItemId_Command_MoveCard; }
+};
+
// -----------------
// --- RESPONSES ---
// -----------------
diff --git a/common/protocol_datastructures.h b/common/protocol_datastructures.h
index 5e2ab4d6..a6a9c9ac 100644
--- a/common/protocol_datastructures.h
+++ b/common/protocol_datastructures.h
@@ -20,6 +20,12 @@ enum ResponseCode { RespNothing, RespOk, RespInvalidCommand, RespInvalidData, Re
// list index, whereas cards in any other zone are referenced by their ids.
enum ZoneType { PrivateZone, PublicZone, HiddenZone };
+class CardId : public SerializableItem_Int {
+public:
+ CardId(int _cardId = -1) : SerializableItem_Int("card_id", _cardId) { }
+ static SerializableItem *newItem() { return new CardId; }
+};
+
class ServerInfo_User : public SerializableItem_Map {
public:
enum UserLevelFlags {
diff --git a/common/protocol_item_ids.h b/common/protocol_item_ids.h
index 6e479773..2ed9fe3a 100644
--- a/common/protocol_item_ids.h
+++ b/common/protocol_item_ids.h
@@ -21,54 +21,53 @@ ItemId_Command_Shuffle = 1019,
ItemId_Command_Mulligan = 1020,
ItemId_Command_RollDie = 1021,
ItemId_Command_DrawCards = 1022,
-ItemId_Command_MoveCard = 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_Command_UpdateServerMessage = 1071,
-ItemId_Other = 1072
+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
};
diff --git a/common/protocol_items.cpp b/common/protocol_items.cpp
index 226190da..0265652f 100644
--- a/common/protocol_items.cpp
+++ b/common/protocol_items.cpp
@@ -114,18 +114,6 @@ Command_DrawCards::Command_DrawCards(int _gameId, int _number)
{
insertItem(new SerializableItem_Int("number", _number));
}
-Command_MoveCard::Command_MoveCard(int _gameId, const QString &_startZone, int _cardId, int _targetPlayerId, const QString &_targetZone, int _x, int _y, bool _faceDown, bool _tapped)
- : GameCommand("move_card", _gameId)
-{
- insertItem(new SerializableItem_String("start_zone", _startZone));
- insertItem(new SerializableItem_Int("card_id", _cardId));
- insertItem(new SerializableItem_Int("target_player_id", _targetPlayerId));
- insertItem(new SerializableItem_String("target_zone", _targetZone));
- insertItem(new SerializableItem_Int("x", _x));
- insertItem(new SerializableItem_Int("y", _y));
- insertItem(new SerializableItem_Bool("face_down", _faceDown));
- insertItem(new SerializableItem_Bool("tapped", _tapped));
-}
Command_FlipCard::Command_FlipCard(int _gameId, const QString &_zone, int _cardId, bool _faceDown)
: GameCommand("flip_card", _gameId)
{
@@ -465,7 +453,6 @@ 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("cmdmove_card", Command_MoveCard::newItem);
itemNameHash.insert("cmdflip_card", Command_FlipCard::newItem);
itemNameHash.insert("cmdattach_card", Command_AttachCard::newItem);
itemNameHash.insert("cmdcreate_token", Command_CreateToken::newItem);
diff --git a/common/protocol_items.dat b/common/protocol_items.dat
index 7a80c732..db617398 100644
--- a/common/protocol_items.dat
+++ b/common/protocol_items.dat
@@ -20,7 +20,6 @@
2:mulligan
2:roll_die:i,sides
2:draw_cards:i,number
-2:move_card:s,start_zone:i,card_id:i,target_player_id:s,target_zone:i,x:i,y:b,face_down:b,tapped
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
@@ -68,4 +67,4 @@
6:ready_start
6:concede
6:deck_select:i,deck_id
-7:update_server_message
\ No newline at end of file
+7:update_server_message
diff --git a/common/protocol_items.h b/common/protocol_items.h
index c0058a99..aed7c43c 100644
--- a/common/protocol_items.h
+++ b/common/protocol_items.h
@@ -182,21 +182,6 @@ public:
static SerializableItem *newItem() { return new Command_DrawCards; }
int getItemId() const { return ItemId_Command_DrawCards; }
};
-class Command_MoveCard : public GameCommand {
- Q_OBJECT
-public:
- Command_MoveCard(int _gameId = -1, const QString &_startZone = QString(), int _cardId = -1, int _targetPlayerId = -1, const QString &_targetZone = QString(), int _x = -1, int _y = -1, bool _faceDown = false, bool _tapped = false);
- QString getStartZone() const { return static_cast(itemMap.value("start_zone"))->getData(); };
- int getCardId() const { return static_cast(itemMap.value("card_id"))->getData(); };
- int getTargetPlayerId() const { return static_cast(itemMap.value("target_player_id"))->getData(); };
- QString getTargetZone() const { return static_cast(itemMap.value("target_zone"))->getData(); };
- int getX() const { return static_cast(itemMap.value("x"))->getData(); };
- int getY() const { return static_cast(itemMap.value("y"))->getData(); };
- bool getFaceDown() const { return static_cast(itemMap.value("face_down"))->getData(); };
- bool getTapped() const { return static_cast(itemMap.value("tapped"))->getData(); };
- static SerializableItem *newItem() { return new Command_MoveCard; }
- int getItemId() const { return ItemId_Command_MoveCard; }
-};
class Command_FlipCard : public GameCommand {
Q_OBJECT
public:
diff --git a/common/server_cardzone.cpp b/common/server_cardzone.cpp
index a2ca1a99..2d417390 100644
--- a/common/server_cardzone.cpp
+++ b/common/server_cardzone.cpp
@@ -21,6 +21,8 @@
#include "server_card.h"
#include "server_player.h"
#include "rng_abstract.h"
+#include
+#include
Server_CardZone::Server_CardZone(Server_Player *_player, const QString &_name, bool _has_coords, ZoneType _type)
: player(_player), name(_name), has_coords(_has_coords), type(_type), cardsBeingLookedAt(0)
@@ -29,7 +31,7 @@ Server_CardZone::Server_CardZone(Server_Player *_player, const QString &_name, b
Server_CardZone::~Server_CardZone()
{
- qDebug(QString("Server_CardZone destructor: %1").arg(name).toLatin1());
+ qDebug() << "Server_CardZone destructor:" << name;
clear();
}
@@ -41,6 +43,13 @@ void Server_CardZone::shuffle()
cards = temp;
}
+int Server_CardZone::removeCard(Server_Card *card)
+{
+ int index = cards.indexOf(card);
+ cards.removeAt(index);
+ return index;
+}
+
Server_Card *Server_CardZone::getCard(int id, bool remove, int *position)
{
if (type != HiddenZone) {
@@ -146,29 +155,37 @@ bool Server_CardZone::isColumnEmpty(int x, int y) const
void Server_CardZone::moveCard(CommandContainer *cont, QMap &coordMap, Server_Card *card, int x, int y)
{
coordMap.remove(card->getX());
- player->moveCard(cont, this, card->getId(), this, x, y, card->getFaceDown(), false);
+ player->moveCard(cont, this, QList() << card->getId(), this, x, y, card->getFaceDown(), false);
coordMap.insert(x, card);
}
-void Server_CardZone::fixFreeSpaces(CommandContainer *cont, int x, int y)
+void Server_CardZone::fixFreeSpaces(CommandContainer *cont)
{
QMap coordMap;
- for (int i = 0; i < cards.size(); ++i)
- if (cards[i]->getY() == y)
- coordMap.insert(cards[i]->getX(), cards[i]);
-
- int baseX = (x / 3) * 3;
- if (!coordMap.contains(baseX)) {
- if (coordMap.contains(baseX + 1))
- moveCard(cont, coordMap, coordMap.value(baseX + 1), baseX, y);
- else if (coordMap.contains(baseX + 2)) {
- moveCard(cont, coordMap, coordMap.value(baseX + 2), baseX, y);
- return;
- } else
- return;
+ QSet placesToLook;
+ for (int i = 0; i < cards.size(); ++i) {
+ coordMap.insert(cards[i]->getY() * 10000 + cards[i]->getX(), cards[i]);
+ placesToLook.insert(cards[i]->getY() * 10000 + (cards[i]->getX() / 3) * 3);
+ }
+
+ QSetIterator placeIterator(placesToLook);
+ while (placeIterator.hasNext()) {
+ int foo = placeIterator.next();
+ int y = foo / 10000;
+ int baseX = foo - y * 10000;
+
+ if (!coordMap.contains(y * 10000 + baseX)) {
+ if (coordMap.contains(y * 10000 + baseX + 1))
+ moveCard(cont, coordMap, coordMap.value(y * 10000 + baseX + 1), baseX, y);
+ else if (coordMap.contains(baseX + 2)) {
+ moveCard(cont, coordMap, coordMap.value(y * 10000 + baseX + 2), baseX, y);
+ return;
+ } else
+ return;
+ }
+ if (!coordMap.contains(y * 10000 + baseX + 1) && coordMap.contains(y * 10000 + baseX + 2))
+ moveCard(cont, coordMap, coordMap.value(y * 10000 + baseX + 2), baseX + 1, y);
}
- if (!coordMap.contains(baseX + 1) && coordMap.contains(baseX + 2))
- moveCard(cont, coordMap, coordMap.value(baseX + 2), baseX + 1, y);
}
void Server_CardZone::insertCard(Server_Card *card, int x, int y)
diff --git a/common/server_cardzone.h b/common/server_cardzone.h
index c27d907a..62a129a1 100644
--- a/common/server_cardzone.h
+++ b/common/server_cardzone.h
@@ -40,6 +40,7 @@ public:
Server_CardZone(Server_Player *_player, const QString &_name, bool _has_coords, ZoneType _type);
~Server_CardZone();
+ int removeCard(Server_Card *card);
Server_Card *getCard(int id, bool remove, int *position = NULL);
int getCardsBeingLookedAt() const { return cardsBeingLookedAt; }
@@ -52,7 +53,7 @@ public:
int getFreeGridColumn(int x, int y, const QString &cardName) const;
bool isColumnEmpty(int x, int y) const;
bool isColumnStacked(int x, int y) const;
- void fixFreeSpaces(CommandContainer *cont, int x, int y);
+ void fixFreeSpaces(CommandContainer *cont);
void moveCard(CommandContainer *cont, QMap &coordMap, Server_Card *card, int x, int y);
QList cards;
void insertCard(Server_Card *card, int x, int y);
diff --git a/common/server_player.cpp b/common/server_player.cpp
index e7da0d31..a1092d39 100644
--- a/common/server_player.cpp
+++ b/common/server_player.cpp
@@ -8,6 +8,7 @@
#include "protocol.h"
#include "protocol_items.h"
#include "decklist.h"
+#include
Server_Player::Server_Player(Server_Game *_game, int _playerId, ServerInfo_User *_userInfo, bool _spectator, Server_ProtocolHandler *_handler)
: game(_game), handler(_handler), userInfo(new ServerInfo_User(_userInfo)), deck(0), playerId(_playerId), spectator(_spectator), nextCardId(0), readyStart(false), conceded(false), deckId(-2)
@@ -198,7 +199,7 @@ bool Server_Player::deleteCounter(int counterId)
return true;
}
-ResponseCode Server_Player::moveCard(CommandContainer *cont, const QString &_startZone, int _cardId, int targetPlayerId, const QString &_targetZone, int x, int y, bool faceDown, bool tapped)
+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);
Server_Player *targetPlayer = game->getPlayers().value(targetPlayerId);
@@ -208,128 +209,168 @@ ResponseCode Server_Player::moveCard(CommandContainer *cont, const QString &_sta
if ((!startzone) || (!targetzone))
return RespNameNotFound;
- return moveCard(cont, startzone, _cardId, targetzone, x, y, faceDown, tapped);
+ return moveCard(cont, startzone, _cardIds, targetzone, x, y, faceDown, tapped);
}
-ResponseCode Server_Player::moveCard(CommandContainer *cont, Server_CardZone *startzone, int _cardId, Server_CardZone *targetzone, int x, int y, bool faceDown, bool tapped)
+class Server_Player::MoveCardCompareFunctor {
+private:
+ int x;
+public:
+ MoveCardCompareFunctor(int _x) : x(_x) { }
+ inline bool operator()(QPair a, QPair b)
+ {
+ if (a.second < x) {
+ if (b.second >= x)
+ return false;
+ else
+ return (a.second > b.second);
+ } else {
+ if (b.second < x)
+ return true;
+ else
+ return (a.second < b.second);
+ }
+ }
+};
+
+ResponseCode Server_Player::moveCard(CommandContainer *cont, Server_CardZone *startzone, const QList &_cardIds, Server_CardZone *targetzone, int x, int y, bool faceDown, bool tapped)
{
// Disallow controller change between different zones.
if ((startzone->getName() != targetzone->getName()) && (startzone->getPlayer() != targetzone->getPlayer()))
return RespContextError;
- int position = -1;
- Server_Card *card = startzone->getCard(_cardId, false, &position);
- if (!card)
- return RespNameNotFound;
- if (!card->getAttachedCards().isEmpty() && !targetzone->isColumnEmpty(x, y))
- return RespContextError;
- startzone->getCard(_cardId, true);
+ if (!targetzone->hasCoords() && (x == -1))
+ x = targetzone->cards.size();
- int oldX = card->getX(), oldY = card->getY();
-
- // Attachment relationships can be retained when moving a card onto the opponent's table
- if (startzone->getName() != targetzone->getName()) {
- // Delete all attachment relationships
- if (card->getParentCard())
- card->setParentCard(0);
-
- // Make a copy of the list because the original one gets modified during the loop
- QList attachedCards = card->getAttachedCards();
- for (int i = 0; i < attachedCards.size(); ++i)
- attachedCards[i]->getZone()->getPlayer()->unattachCard(cont, attachedCards[i]);
+ QList > cardsToMove;
+ for (int i = 0; i < _cardIds.size(); ++i) {
+ int position;
+ Server_Card *card = startzone->getCard(_cardIds[i], false, &position);
+ if (!card)
+ return RespNameNotFound;
+ if (!card->getAttachedCards().isEmpty() && !targetzone->isColumnEmpty(x, y))
+ return RespContextError;
+ cardsToMove.append(QPair(card, position));
}
- if (startzone != targetzone) {
- // Delete all arrows from and to the card
- const QList &players = game->getPlayers().values();
- for (int i = 0; i < players.size(); ++i) {
- QList arrowsToDelete;
- QMapIterator arrowIterator(players[i]->getArrows());
- while (arrowIterator.hasNext()) {
- Server_Arrow *arrow = arrowIterator.next().value();
- if ((arrow->getStartCard() == card) || (arrow->getTargetItem() == card))
- arrowsToDelete.append(arrow->getId());
+ MoveCardCompareFunctor cmp(startzone == targetzone ? -1 : x);
+ qSort(cardsToMove.begin(), cardsToMove.end(), cmp);
+
+ bool secondHalf = false;
+ int xIndex = -1;
+ for (int cardIndex = 0; cardIndex < cardsToMove.size(); ++cardIndex) {
+ Server_Card *card = cardsToMove[cardIndex].first;
+ int originalPosition = cardsToMove[cardIndex].second;
+ int position = startzone->removeCard(card);
+ if ((startzone == targetzone) && !startzone->hasCoords()) {
+ if (!secondHalf && (originalPosition < x)) {
+ xIndex = -1;
+ secondHalf = true;
+ } else if (secondHalf)
+ --xIndex;
+ else
+ ++xIndex;
+ } else
+ ++xIndex;
+ int newX = x + xIndex;
+
+ // Attachment relationships can be retained when moving a card onto the opponent's table
+ if (startzone->getName() != targetzone->getName()) {
+ // Delete all attachment relationships
+ if (card->getParentCard())
+ card->setParentCard(0);
+
+ // Make a copy of the list because the original one gets modified during the loop
+ QList attachedCards = card->getAttachedCards();
+ for (int i = 0; i < attachedCards.size(); ++i)
+ attachedCards[i]->getZone()->getPlayer()->unattachCard(cont, attachedCards[i]);
+ }
+
+ if (startzone != targetzone) {
+ // Delete all arrows from and to the card
+ const QList &players = game->getPlayers().values();
+ for (int i = 0; i < players.size(); ++i) {
+ QList arrowsToDelete;
+ QMapIterator arrowIterator(players[i]->getArrows());
+ while (arrowIterator.hasNext()) {
+ Server_Arrow *arrow = arrowIterator.next().value();
+ if ((arrow->getStartCard() == card) || (arrow->getTargetItem() == card))
+ arrowsToDelete.append(arrow->getId());
+ }
+ for (int j = 0; j < arrowsToDelete.size(); ++j)
+ players[i]->deleteArrow(arrowsToDelete[j]);
}
- for (int j = 0; j < arrowsToDelete.size(); ++j)
- players[i]->deleteArrow(arrowsToDelete[j]);
+ }
+
+ if (card->getDestroyOnZoneChange() && (startzone != targetzone)) {
+ cont->enqueueGameEventPrivate(new Event_DestroyCard(getPlayerId(), startzone->getName(), card->getId()), game->getGameId());
+ cont->enqueueGameEventPublic(new Event_DestroyCard(getPlayerId(), startzone->getName(), card->getId()), game->getGameId());
+ card->deleteLater();
+ } else {
+ if (!targetzone->hasCoords()) {
+ y = 0;
+ card->resetState();
+ } else
+ newX = targetzone->getFreeGridColumn(newX, y, card->getName());
+
+ targetzone->insertCard(card, newX, y);
+
+ bool targetBeingLookedAt = (targetzone->getType() != HiddenZone) || (targetzone->getCardsBeingLookedAt() > newX) || (targetzone->getCardsBeingLookedAt() == -1);
+ bool sourceBeingLookedAt = (startzone->getType() != HiddenZone) || (startzone->getCardsBeingLookedAt() > position) || (startzone->getCardsBeingLookedAt() == -1);
+
+ bool targetHiddenToPlayer = faceDown || !targetBeingLookedAt;
+ bool targetHiddenToOthers = faceDown || (targetzone->getType() != PublicZone);
+ bool sourceHiddenToPlayer = card->getFaceDown() || !sourceBeingLookedAt;
+ bool sourceHiddenToOthers = card->getFaceDown() || (startzone->getType() != PublicZone);
+
+ QString privateCardName, publicCardName;
+ if (!(sourceHiddenToPlayer && targetHiddenToPlayer))
+ privateCardName = card->getName();
+ if (!(sourceHiddenToOthers && targetHiddenToOthers))
+ publicCardName = card->getName();
+
+ int oldCardId = card->getId();
+ if (faceDown)
+ card->setId(newCardId());
+ card->setFaceDown(faceDown);
+
+ // The player does not get to see which card he moved if it moves between two parts of hidden zones which
+ // are not being looked at.
+ int privateNewCardId = card->getId();
+ int privateOldCardId = oldCardId;
+ if (!targetBeingLookedAt && !sourceBeingLookedAt) {
+ privateOldCardId = -1;
+ privateNewCardId = -1;
+ privateCardName = QString();
+ }
+ 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());
+
+ // 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,
+ // all cards are equal.
+ if (
+ ((startzone->getType() == HiddenZone) && ((startzone->getCardsBeingLookedAt() > position) || (startzone->getCardsBeingLookedAt() == -1)))
+ || (startzone->getType() == PublicZone)
+ )
+ position = -1;
+ if ((targetzone->getType() == HiddenZone) && ((targetzone->getCardsBeingLookedAt() > newX) || (targetzone->getCardsBeingLookedAt() == -1)))
+ 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());
+ else
+ cont->enqueueGameEventPublic(new Event_MoveCard(getPlayerId(), -1, QString(), startzone->getName(), position, targetzone->getPlayer()->getPlayerId(), targetzone->getName(), newX, y, -1, false), game->getGameId());
+
+ if (tapped)
+ setCardAttrHelper(cont, targetzone->getName(), card->getId(), "tapped", "1");
}
}
-
- if (card->getDestroyOnZoneChange() && (startzone != targetzone)) {
- cont->enqueueGameEventPrivate(new Event_DestroyCard(getPlayerId(), startzone->getName(), card->getId()), game->getGameId());
- cont->enqueueGameEventPublic(new Event_DestroyCard(getPlayerId(), startzone->getName(), card->getId()), game->getGameId());
- if (startzone->hasCoords())
- startzone->fixFreeSpaces(cont, oldX, oldY);
- card->deleteLater();
- return RespOk;
- }
-
- if (!targetzone->hasCoords()) {
- y = 0;
- if (x == -1)
- x = targetzone->cards.size();
-
- card->resetState();
- } else
- x = targetzone->getFreeGridColumn(x, y, card->getName());
-
- targetzone->insertCard(card, x, y);
-
- bool targetBeingLookedAt = (targetzone->getType() != HiddenZone) || (targetzone->getCardsBeingLookedAt() > x) || (targetzone->getCardsBeingLookedAt() == -1);
- bool sourceBeingLookedAt = (startzone->getType() != HiddenZone) || (startzone->getCardsBeingLookedAt() > position) || (startzone->getCardsBeingLookedAt() == -1);
-
- bool targetHiddenToPlayer = faceDown || !targetBeingLookedAt;
- bool targetHiddenToOthers = faceDown || (targetzone->getType() != PublicZone);
- bool sourceHiddenToPlayer = card->getFaceDown() || !sourceBeingLookedAt;
- bool sourceHiddenToOthers = card->getFaceDown() || (startzone->getType() != PublicZone);
-
- QString privateCardName, publicCardName;
- if (!(sourceHiddenToPlayer && targetHiddenToPlayer))
- privateCardName = card->getName();
- if (!(sourceHiddenToOthers && targetHiddenToOthers))
- publicCardName = card->getName();
-
- int oldCardId = card->getId();
- if (faceDown)
- card->setId(newCardId());
- card->setFaceDown(faceDown);
-
- // The player does not get to see which card he moved if it moves between two parts of hidden zones which
- // are not being looked at.
- int privateNewCardId = card->getId();
- int privateOldCardId = oldCardId;
- if (!targetBeingLookedAt && !sourceBeingLookedAt) {
- privateOldCardId = -1;
- privateNewCardId = -1;
- privateCardName = QString();
- }
- 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(), x, y, privateNewCardId, faceDown), game->getGameId());
- cont->enqueueGameEventOmniscient(new Event_MoveCard(getPlayerId(), privateOldCardId, privateCardName, startzone->getName(), privatePosition, targetzone->getPlayer()->getPlayerId(), targetzone->getName(), x, y, privateNewCardId, faceDown), game->getGameId());
-
- // 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,
- // all cards are equal.
- if (
- ((startzone->getType() == HiddenZone) && ((startzone->getCardsBeingLookedAt() > position) || (startzone->getCardsBeingLookedAt() == -1)))
- || (startzone->getType() == PublicZone)
- )
- position = -1;
- if ((targetzone->getType() == HiddenZone) && ((targetzone->getCardsBeingLookedAt() > x) || (targetzone->getCardsBeingLookedAt() == -1)))
- x = -1;
-
- if ((startzone->getType() == PublicZone) || (targetzone->getType() == PublicZone))
- cont->enqueueGameEventPublic(new Event_MoveCard(getPlayerId(), oldCardId, publicCardName, startzone->getName(), position, targetzone->getPlayer()->getPlayerId(), targetzone->getName(), x, y, card->getId(), faceDown), game->getGameId());
- else
- cont->enqueueGameEventPublic(new Event_MoveCard(getPlayerId(), -1, QString(), startzone->getName(), position, targetzone->getPlayer()->getPlayerId(), targetzone->getName(), x, y, -1, false), game->getGameId());
-
- if (tapped)
- setCardAttrHelper(cont, targetzone->getName(), card->getId(), "tapped", "1");
-
if (startzone->hasCoords())
- startzone->fixFreeSpaces(cont, oldX, oldY);
+ startzone->fixFreeSpaces(cont);
return RespOk;
}
@@ -342,7 +383,7 @@ void Server_Player::unattachCard(CommandContainer *cont, Server_Card *card)
cont->enqueueGameEventPrivate(new Event_AttachCard(getPlayerId(), zone->getName(), card->getId(), -1, QString(), -1), game->getGameId());
cont->enqueueGameEventPublic(new Event_AttachCard(getPlayerId(), zone->getName(), card->getId(), -1, QString(), -1), game->getGameId());
- moveCard(cont, zone, card->getId(), zone, -1, card->getY(), card->getFaceDown(), card->getTapped());
+ moveCard(cont, zone, QList() << card->getId(), zone, -1, card->getY(), card->getFaceDown(), card->getTapped());
}
ResponseCode Server_Player::setCardAttrHelper(CommandContainer *cont, const QString &zoneName, int cardId, const QString &attrName, const QString &attrValue)
diff --git a/common/server_player.h b/common/server_player.h
index 7a3138c3..5bd08d96 100644
--- a/common/server_player.h
+++ b/common/server_player.h
@@ -22,6 +22,7 @@ class CommandContainer;
class Server_Player : public Server_ArrowTarget {
Q_OBJECT
private:
+ class MoveCardCompareFunctor;
Server_Game *game;
Server_ProtocolHandler *handler;
ServerInfo_User *userInfo;
@@ -74,8 +75,8 @@ public:
void clearZones();
void setupZones();
- ResponseCode moveCard(CommandContainer *cont, const QString &_startZone, int _cardId, int _targetPlayer, const QString &_targetZone, int _x, int _y, bool _faceDown, bool _tapped);
- ResponseCode moveCard(CommandContainer *cont, Server_CardZone *startzone, int _cardId, Server_CardZone *targetzone, int x, int y, bool faceDown, bool tapped);
+ 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);
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 d7d354a5..0fa91781 100644
--- a/common/server_protocolhandler.cpp
+++ b/common/server_protocolhandler.cpp
@@ -343,7 +343,7 @@ ResponseCode Server_ProtocolHandler::cmdListUsers(Command_ListUsers * /*cmd*/, C
QList resultList;
QMapIterator userIterator = server->getUsers();
while (userIterator.hasNext())
- resultList.append(new ServerInfo_User(userIterator.next().value()->getUserInfo()));
+ resultList.append(new ServerInfo_User(userIterator.next().value()->getUserInfo(), false));
acceptsUserListChanges = true;
@@ -496,7 +496,7 @@ ResponseCode Server_ProtocolHandler::cmdMulligan(Command_Mulligan * /*cmd*/, Com
Server_CardZone *deck = player->getZones().value("deck");
while (!hand->cards.isEmpty())
- player->moveCard(cont, hand, hand->cards.first()->getId(), deck, 0, 0, false, false);
+ player->moveCard(cont, hand, QList() << hand->cards.first()->getId(), deck, 0, 0, false, false);
deck->shuffle();
cont->enqueueGameEventPrivate(new Event_Shuffle(player->getPlayerId()), game->getGameId());
@@ -558,8 +558,13 @@ ResponseCode Server_ProtocolHandler::cmdMoveCard(Command_MoveCard *cmd, CommandC
if (!game->getGameStarted())
return RespGameNotStarted;
-
- return player->moveCard(cont, cmd->getStartZone(), cmd->getCardId(), cmd->getTargetPlayerId(), cmd->getTargetZone(), cmd->getX(), cmd->getY(), cmd->getFaceDown(), cmd->getTapped());
+
+ QList cardIds;
+ const QList &temp = cmd->getCardIds();
+ for (int i = 0; i < temp.size(); ++i)
+ cardIds.append(temp[i]->getData());
+
+ return player->moveCard(cont, cmd->getStartZone(), cardIds, cmd->getTargetPlayerId(), cmd->getTargetZone(), cmd->getX(), cmd->getY(), cmd->getFaceDown(), cmd->getTapped());
}
ResponseCode Server_ProtocolHandler::cmdFlipCard(Command_FlipCard *cmd, CommandContainer *cont, Server_Game *game, Server_Player *player)
@@ -659,7 +664,7 @@ ResponseCode Server_ProtocolHandler::cmdAttachCard(Command_AttachCard *cmd, Comm
player->unattachCard(cont, attachedList[i]);
if (targetzone->isColumnStacked(targetCard->getX(), targetCard->getY()))
- targetPlayer->moveCard(cont, targetzone, targetCard->getId(), targetzone, targetzone->getFreeGridColumn(-2, targetCard->getY(), targetCard->getName()), targetCard->getY(), targetCard->getFaceDown(), false);
+ targetPlayer->moveCard(cont, targetzone, QList() << targetCard->getId(), targetzone, targetzone->getFreeGridColumn(-2, targetCard->getY(), targetCard->getName()), targetCard->getY(), targetCard->getFaceDown(), false);
card->setParentCard(targetCard);
card->setCoords(-1, card->getY());
diff --git a/servatrice/src/servatrice.cpp b/servatrice/src/servatrice.cpp
index f3419860..c2637d09 100644
--- a/servatrice/src/servatrice.cpp
+++ b/servatrice/src/servatrice.cpp
@@ -192,7 +192,7 @@ ServerInfo_User *Servatrice::getUserData(const QString &name)
} else
return new ServerInfo_User(name, ServerInfo_User::IsUser);
}
-#include
+
void Servatrice::updateLoginMessage()
{
checkSql();
@@ -206,7 +206,6 @@ void Servatrice::updateLoginMessage()
QMapIterator usersIterator(users);
while (usersIterator.hasNext()) {
usersIterator.next().value()->sendProtocolItem(event, false);
- qDebug() << "sent message to" << usersIterator.value()->getUserInfo()->getName();
}
delete event;
}
@@ -226,4 +225,4 @@ void Servatrice::statusUpdate()
execSqlQuery(query);
}
-const QString Servatrice::versionString = "Servatrice 0.20110103";
+const QString Servatrice::versionString = "Servatrice 0.20110114";