zoneview improvement
This commit is contained in:
parent
ff4b451e55
commit
cc8de80db8
14 changed files with 277 additions and 176 deletions
|
@ -93,6 +93,8 @@ void CardItem::setAttacking(bool _attacking)
|
|||
void CardItem::setFaceDown(bool _facedown)
|
||||
{
|
||||
facedown = _facedown;
|
||||
if (facedown)
|
||||
setName(QString());
|
||||
update();
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,8 @@ void CardZone::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
|||
void CardZone::addCard(CardItem *card, bool reorganize, int x, int y)
|
||||
{
|
||||
if (view)
|
||||
view->addCard(new CardItem(player->getDb(), card->getName(), card->getId()), reorganize, x, y);
|
||||
if ((x <= view->getCards().size()) || (view->getNumberCards() == -1))
|
||||
view->addCard(new CardItem(player->getDb(), card->getName(), card->getId()), reorganize, x, y);
|
||||
|
||||
addCardImpl(card, x, y);
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include <QMenu>
|
||||
#include <QMessageBox>
|
||||
#include <QSettings>
|
||||
#include <stdlib.h>
|
||||
#include "serverplayer.h"
|
||||
#include "game.h"
|
||||
#include "servereventdata.h"
|
||||
|
@ -80,19 +81,17 @@ Game::Game(CardDatabase *_db, Client *_client, QGraphicsScene *_scene, QMenu *_a
|
|||
initSayMenu();
|
||||
|
||||
aTap = new QAction(tr("&Tap"), this);
|
||||
connect(aTap, SIGNAL(triggered()), this, SLOT(actTap()));
|
||||
aUntap = new QAction(tr("&Untap"), this);
|
||||
connect(aUntap, SIGNAL(triggered()), this, SLOT(actUntap()));
|
||||
aDoesntUntap = new QAction(tr("Toggle &normal untapping"), this);
|
||||
connect(aDoesntUntap, SIGNAL(triggered()), this, SLOT(actDoesntUntap()));
|
||||
aFlip = new QAction(tr("&Flip"), this);
|
||||
connect(aFlip, SIGNAL(triggered()), this, SLOT(actFlip()));
|
||||
aAddCounter = new QAction(tr("&Add counter"), this);
|
||||
connect(aAddCounter, SIGNAL(triggered()), this, SLOT(actAddCounter()));
|
||||
aRemoveCounter = new QAction(tr("&Remove counter"), this);
|
||||
connect(aRemoveCounter, SIGNAL(triggered()), this, SLOT(actRemoveCounter()));
|
||||
aSetCounters = new QAction(tr("&Set counters..."), this);
|
||||
connect(aSetCounters, SIGNAL(triggered()), this, SLOT(actSetCounters()));
|
||||
aMoveToTopLibrary = new QAction(tr("&top of library"), this);
|
||||
aMoveToBottomLibrary = new QAction(tr("&bottom of library"), this);
|
||||
aMoveToGraveyard = new QAction(tr("&graveyard"), this);
|
||||
aMoveToExile = new QAction(tr("&exile"), this);
|
||||
|
||||
cardMenu->addAction(aTap);
|
||||
cardMenu->addAction(aUntap);
|
||||
|
@ -103,6 +102,30 @@ Game::Game(CardDatabase *_db, Client *_client, QGraphicsScene *_scene, QMenu *_a
|
|||
cardMenu->addAction(aAddCounter);
|
||||
cardMenu->addAction(aRemoveCounter);
|
||||
cardMenu->addAction(aSetCounters);
|
||||
cardMenu->addSeparator();
|
||||
moveMenu = cardMenu->addMenu(tr("&Move to"));
|
||||
|
||||
moveMenu->addAction(aMoveToTopLibrary);
|
||||
moveMenu->addAction(aMoveToBottomLibrary);
|
||||
moveMenu->addAction(aMoveToGraveyard);
|
||||
moveMenu->addAction(aMoveToExile);
|
||||
|
||||
cardMenuHandlers.insert(aTap, &Game::actTap);
|
||||
cardMenuHandlers.insert(aUntap, &Game::actUntap);
|
||||
cardMenuHandlers.insert(aDoesntUntap, &Game::actDoesntUntap);
|
||||
cardMenuHandlers.insert(aFlip, &Game::actFlip);
|
||||
cardMenuHandlers.insert(aAddCounter, &Game::actAddCounter);
|
||||
cardMenuHandlers.insert(aRemoveCounter, &Game::actRemoveCounter);
|
||||
cardMenuHandlers.insert(aMoveToTopLibrary, &Game::actMoveToTopLibrary);
|
||||
cardMenuHandlers.insert(aMoveToBottomLibrary, &Game::actMoveToBottomLibrary);
|
||||
cardMenuHandlers.insert(aMoveToGraveyard, &Game::actMoveToGraveyard);
|
||||
cardMenuHandlers.insert(aMoveToExile, &Game::actMoveToExile);
|
||||
|
||||
QHashIterator<QAction *, CardMenuHandler> i(cardMenuHandlers);
|
||||
while (i.hasNext()) {
|
||||
i.next();
|
||||
connect(i.key(), SIGNAL(triggered()), this, SLOT(cardMenuAction()));
|
||||
}
|
||||
|
||||
dlgStartGame = new DlgStartGame(db);
|
||||
connect(dlgStartGame, SIGNAL(newDeckLoaded(const QStringList &)), client, SLOT(submitDeck(const QStringList &)));
|
||||
|
@ -367,63 +390,55 @@ void Game::showCardMenu(QPoint p)
|
|||
cardMenu->exec(p);
|
||||
}
|
||||
|
||||
void Game::actTap()
|
||||
void Game::cardMenuAction()
|
||||
{
|
||||
QListIterator<QGraphicsItem *> i(scene->selectedItems());
|
||||
while (i.hasNext()) {
|
||||
CardItem *temp = (CardItem *) i.next();
|
||||
if (!temp->getTapped())
|
||||
client->setCardAttr(qgraphicsitem_cast<CardZone *>(temp->parentItem())->getName(), temp->getId(), "tapped", "1");
|
||||
// Determine the appropriate handler function.
|
||||
CardMenuHandler handler = cardMenuHandlers.value(static_cast<QAction *>(sender()));
|
||||
|
||||
// The list of selected items is randomly shuffled.
|
||||
QList<QGraphicsItem *> sel = scene->selectedItems();
|
||||
while (!sel.isEmpty()) {
|
||||
unsigned int i = (unsigned int) (((double) sel.size()) * qrand() / (RAND_MAX + 1.0));
|
||||
qDebug(QString("%1 items left, i=%2").arg(sel.size()).arg(i).toLatin1());
|
||||
CardItem *card = qgraphicsitem_cast<CardItem *>(sel.takeAt(i));
|
||||
// For each item, the handler function is called.
|
||||
(this->*handler)(card);
|
||||
}
|
||||
}
|
||||
|
||||
void Game::actUntap()
|
||||
void Game::actTap(CardItem *card)
|
||||
{
|
||||
QListIterator<QGraphicsItem *> i(scene->selectedItems());
|
||||
while (i.hasNext()) {
|
||||
CardItem *temp = (CardItem *) i.next();
|
||||
if (temp->getTapped())
|
||||
client->setCardAttr(qgraphicsitem_cast<CardZone *>(temp->parentItem())->getName(), temp->getId(), "tapped", "0");
|
||||
}
|
||||
if (!card->getTapped())
|
||||
client->setCardAttr(qgraphicsitem_cast<CardZone *>(card->parentItem())->getName(), card->getId(), "tapped", "1");
|
||||
}
|
||||
|
||||
void Game::actDoesntUntap()
|
||||
void Game::actUntap(CardItem *card)
|
||||
{
|
||||
QListIterator<QGraphicsItem *> i(scene->selectedItems());
|
||||
while (i.hasNext()) {
|
||||
CardItem *temp = (CardItem *) i.next();
|
||||
client->setCardAttr(qgraphicsitem_cast<CardZone *>(temp->parentItem())->getName(), temp->getId(), "doesnt_untap", QString::number(!temp->getDoesntUntap()));
|
||||
}
|
||||
if (card->getTapped())
|
||||
client->setCardAttr(qgraphicsitem_cast<CardZone *>(card->parentItem())->getName(), card->getId(), "tapped", "0");
|
||||
}
|
||||
|
||||
void Game::actFlip()
|
||||
void Game::actDoesntUntap(CardItem *card)
|
||||
{
|
||||
QListIterator<QGraphicsItem *> i(scene->selectedItems());
|
||||
while (i.hasNext()) {
|
||||
CardItem *temp = (CardItem *) i.next();
|
||||
QString zone = qgraphicsitem_cast<CardZone *>(temp->parentItem())->getName();
|
||||
client->moveCard(temp->getId(), zone, zone, temp->getGridPoint().x(), temp->getGridPoint().y(), !temp->getFaceDown());
|
||||
}
|
||||
client->setCardAttr(qgraphicsitem_cast<CardZone *>(card->parentItem())->getName(), card->getId(), "doesnt_untap", QString::number(!card->getDoesntUntap()));
|
||||
}
|
||||
|
||||
void Game::actAddCounter()
|
||||
void Game::actFlip(CardItem *card)
|
||||
{
|
||||
QListIterator<QGraphicsItem *> i(scene->selectedItems());
|
||||
while (i.hasNext()) {
|
||||
CardItem *temp = (CardItem *) i.next();
|
||||
if (temp->getCounters() < MAX_COUNTERS_ON_CARD)
|
||||
client->setCardAttr(qgraphicsitem_cast<CardZone *>(temp->parentItem())->getName(), temp->getId(), "counters", QString::number(temp->getCounters() + 1));
|
||||
}
|
||||
QString zone = qgraphicsitem_cast<CardZone *>(card->parentItem())->getName();
|
||||
client->moveCard(card->getId(), zone, zone, card->getGridPoint().x(), card->getGridPoint().y(), !card->getFaceDown());
|
||||
}
|
||||
|
||||
void Game::actRemoveCounter()
|
||||
void Game::actAddCounter(CardItem *card)
|
||||
{
|
||||
QListIterator<QGraphicsItem *> i(scene->selectedItems());
|
||||
while (i.hasNext()) {
|
||||
CardItem *temp = (CardItem *) i.next();
|
||||
if (temp->getCounters())
|
||||
client->setCardAttr(qgraphicsitem_cast<CardZone *>(temp->parentItem())->getName(), temp->getId(), "counters", QString::number(temp->getCounters() - 1));
|
||||
}
|
||||
if (card->getCounters() < MAX_COUNTERS_ON_CARD)
|
||||
client->setCardAttr(qgraphicsitem_cast<CardZone *>(card->parentItem())->getName(), card->getId(), "counters", QString::number(card->getCounters() + 1));
|
||||
}
|
||||
|
||||
void Game::actRemoveCounter(CardItem *card)
|
||||
{
|
||||
if (card->getCounters())
|
||||
client->setCardAttr(qgraphicsitem_cast<CardZone *>(card->parentItem())->getName(), card->getId(), "counters", QString::number(card->getCounters() - 1));
|
||||
}
|
||||
|
||||
void Game::actSetCounters()
|
||||
|
@ -440,6 +455,30 @@ void Game::actSetCounters()
|
|||
}
|
||||
}
|
||||
|
||||
void Game::actMoveToTopLibrary(CardItem *card)
|
||||
{
|
||||
CardZone *startZone = qgraphicsitem_cast<CardZone *>(card->parentItem());
|
||||
client->moveCard(card->getId(), startZone->getName(), "deck", 0, 0, false);
|
||||
}
|
||||
|
||||
void Game::actMoveToBottomLibrary(CardItem *card)
|
||||
{
|
||||
CardZone *startZone = qgraphicsitem_cast<CardZone *>(card->parentItem());
|
||||
client->moveCard(card->getId(), startZone->getName(), "deck", -1, 0, false);
|
||||
}
|
||||
|
||||
void Game::actMoveToGraveyard(CardItem *card)
|
||||
{
|
||||
CardZone *startZone = qgraphicsitem_cast<CardZone *>(card->parentItem());
|
||||
client->moveCard(card->getId(), startZone->getName(), "grave", 0, 0, false);
|
||||
}
|
||||
|
||||
void Game::actMoveToExile(CardItem *card)
|
||||
{
|
||||
CardZone *startZone = qgraphicsitem_cast<CardZone *>(card->parentItem());
|
||||
client->moveCard(card->getId(), startZone->getName(), "rfg", 0, 0, false);
|
||||
}
|
||||
|
||||
void Game::actSayMessage()
|
||||
{
|
||||
QAction *a = qobject_cast<QAction *>(sender());
|
||||
|
|
|
@ -17,8 +17,12 @@ class Game : public QObject {
|
|||
private:
|
||||
static const int phaseCount = 11;
|
||||
|
||||
QMenu *actionsMenu, *sayMenu, *cardMenu;
|
||||
typedef void (Game::*CardMenuHandler)(CardItem *card);
|
||||
QHash<QAction *, CardMenuHandler> cardMenuHandlers;
|
||||
|
||||
QMenu *actionsMenu, *sayMenu, *cardMenu, *moveMenu;
|
||||
QAction *aTap, *aUntap, *aDoesntUntap, *aFlip, *aAddCounter, *aRemoveCounter, *aSetCounters,
|
||||
*aMoveToTopLibrary, *aMoveToBottomLibrary, *aMoveToGraveyard, *aMoveToExile,
|
||||
*aNextPhase, *aNextTurn, *aUntapAll, *aDecLife, *aIncLife, *aSetLife, *aShuffle, *aDraw, *aDrawCards, *aRollDice, *aCreateToken;
|
||||
DlgStartGame *dlgStartGame;
|
||||
|
||||
|
@ -32,6 +36,8 @@ private:
|
|||
Player *addPlayer(int playerId, const QString &playerName, QPointF base, bool local);
|
||||
void initSayMenu();
|
||||
private slots:
|
||||
void cardMenuAction();
|
||||
|
||||
void actNextPhase();
|
||||
void actNextTurn();
|
||||
void actUntapAll();
|
||||
|
@ -45,20 +51,23 @@ private slots:
|
|||
void actCreateToken();
|
||||
|
||||
void showCardMenu(QPoint p);
|
||||
void actDoesntUntap();
|
||||
void actFlip();
|
||||
void actAddCounter();
|
||||
void actRemoveCounter();
|
||||
void actTap(CardItem *card);
|
||||
void actUntap(CardItem *card);
|
||||
void actDoesntUntap(CardItem *card);
|
||||
void actFlip(CardItem *card);
|
||||
void actAddCounter(CardItem *card);
|
||||
void actRemoveCounter(CardItem *card);
|
||||
void actSetCounters();
|
||||
void actMoveToTopLibrary(CardItem *card);
|
||||
void actMoveToBottomLibrary(CardItem *card);
|
||||
void actMoveToGraveyard(CardItem *card);
|
||||
void actMoveToExile(CardItem *card);
|
||||
|
||||
void actSayMessage();
|
||||
|
||||
void gameEvent(const ServerEventData &msg);
|
||||
void playerListReceived(QList<ServerPlayer *> playerList);
|
||||
void readyStart();
|
||||
public slots:
|
||||
void actTap();
|
||||
void actUntap();
|
||||
signals:
|
||||
void submitDecklist();
|
||||
void hoverCard(QString name);
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include <QtPlugin>
|
||||
#include <QTranslator>
|
||||
#include <QLibraryInfo>
|
||||
#include <QDateTime>
|
||||
#include <QSettings>
|
||||
#include <stdio.h>
|
||||
|
||||
|
@ -66,7 +67,7 @@ int main(int argc, char *argv[])
|
|||
translator.load(lang);
|
||||
app.installTranslator(&translator);
|
||||
|
||||
|
||||
qsrand(QDateTime::currentDateTime().toTime_t());
|
||||
|
||||
MainWindow ui(&translator);
|
||||
qDebug("main(): MainWindow constructor finished");
|
||||
|
|
|
@ -186,7 +186,7 @@ void MessageLogWidget::logSetDoesntUntap(Player *player, QString cardName, bool
|
|||
|
||||
void MessageLogWidget::logDumpZone(Player *player, QString zoneName, QString zoneOwner, int numberCards)
|
||||
{
|
||||
if (numberCards)
|
||||
if (numberCards != -1)
|
||||
append(tr("%1 is looking at the top %2 cards of %3's %4").arg(sanitizeHtml(player->getName())).arg(numberCards).arg(zoneOwner).arg(zoneName));
|
||||
else
|
||||
append(tr("%1 is looking at %2's %3").arg(sanitizeHtml(player->getName())).arg(zoneOwner).arg(zoneName));
|
||||
|
|
|
@ -86,7 +86,7 @@ void Player::actMoveHandToBottomLibrary()
|
|||
|
||||
void Player::actViewLibrary()
|
||||
{
|
||||
emit toggleZoneView(this, "deck", 0);
|
||||
emit toggleZoneView(this, "deck", -1);
|
||||
}
|
||||
|
||||
void Player::actViewTopCards()
|
||||
|
@ -101,17 +101,17 @@ void Player::actViewTopCards()
|
|||
|
||||
void Player::actViewGraveyard()
|
||||
{
|
||||
emit toggleZoneView(this, "grave", 0);
|
||||
emit toggleZoneView(this, "grave", -1);
|
||||
}
|
||||
|
||||
void Player::actViewRfg()
|
||||
{
|
||||
emit toggleZoneView(this, "rfg", 0);
|
||||
emit toggleZoneView(this, "rfg", -1);
|
||||
}
|
||||
|
||||
void Player::actViewSideboard()
|
||||
{
|
||||
emit toggleZoneView(this, "sb", 0);
|
||||
emit toggleZoneView(this, "sb", -1);
|
||||
}
|
||||
|
||||
void Player::addZone(CardZone *z)
|
||||
|
|
|
@ -14,7 +14,6 @@ ZoneViewWidget::ZoneViewWidget(CardDatabase *_db, Player *_player, CardZone *_or
|
|||
|
||||
qreal y = 10;
|
||||
if (_origZone->getIsShufflable() && (numberCards == 0)) {
|
||||
qDebug(QString("ZoneViewWidget: bla!").toLatin1());
|
||||
shuffleCheckBox = new QCheckBox("shuffle when closing");
|
||||
shuffleCheckBox->setChecked(true);
|
||||
QGraphicsProxyWidget *shuffleProxy = new QGraphicsProxyWidget(this);
|
||||
|
|
|
@ -30,7 +30,7 @@ bool ZoneViewZone::initializeCards()
|
|||
return false;
|
||||
|
||||
const CardList &c = origZone->getCards();
|
||||
int number = numberCards == 0 ? c.size() : (numberCards < c.size() ? numberCards : c.size());
|
||||
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->getDb(), card->getName(), card->getId(), this), false, i);
|
||||
|
|
|
@ -15,7 +15,7 @@ private:
|
|||
signals:
|
||||
void removeZoneViewWidget(ZoneViewWidget *zv);
|
||||
public:
|
||||
ZoneViewZone(Player *_p, CardZone *_origZone, int _numberCards = 0, QGraphicsItem *parent = 0);
|
||||
ZoneViewZone(Player *_p, CardZone *_origZone, int _numberCards = -1, QGraphicsItem *parent = 0);
|
||||
~ZoneViewZone();
|
||||
QRectF boundingRect() const;
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||
|
|
|
@ -278,131 +278,156 @@
|
|||
<context>
|
||||
<name>Game</name>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="25"/>
|
||||
<location filename="../src/game.cpp" line="26"/>
|
||||
<source>&Untap all permanents</source>
|
||||
<translation>&Enttappe alle bleibenden Karten</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="26"/>
|
||||
<location filename="../src/game.cpp" line="27"/>
|
||||
<source>Ctrl+U</source>
|
||||
<translation>Ctrl+U</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="29"/>
|
||||
<location filename="../src/game.cpp" line="30"/>
|
||||
<source>&Decrement life</source>
|
||||
<translation>Lebenspunkt &verringern</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="30"/>
|
||||
<location filename="../src/game.cpp" line="31"/>
|
||||
<source>F11</source>
|
||||
<translation>F11</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="32"/>
|
||||
<location filename="../src/game.cpp" line="33"/>
|
||||
<source>&Increment life</source>
|
||||
<translation>Lebens&punkt erhöhen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="33"/>
|
||||
<location filename="../src/game.cpp" line="34"/>
|
||||
<source>F12</source>
|
||||
<translation>F12</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="35"/>
|
||||
<location filename="../src/game.cpp" line="36"/>
|
||||
<source>&Set life</source>
|
||||
<translation>&Setze Lebenspunkte</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="36"/>
|
||||
<location filename="../src/game.cpp" line="37"/>
|
||||
<source>Ctrl+L</source>
|
||||
<translation>Ctrl+L</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="39"/>
|
||||
<location filename="../src/game.cpp" line="40"/>
|
||||
<source>&Shuffle</source>
|
||||
<translation>Mi&schen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="40"/>
|
||||
<location filename="../src/game.cpp" line="41"/>
|
||||
<source>Ctrl+S</source>
|
||||
<translation>Ctrl+S</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="42"/>
|
||||
<location filename="../src/game.cpp" line="43"/>
|
||||
<source>&Draw a card</source>
|
||||
<translation>Karte &ziehen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="43"/>
|
||||
<location filename="../src/game.cpp" line="44"/>
|
||||
<source>Ctrl+D</source>
|
||||
<translation>Ctrl+D</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="45"/>
|
||||
<location filename="../src/game.cpp" line="46"/>
|
||||
<source>D&raw cards...</source>
|
||||
<translation>Ka&rten ziehen...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="47"/>
|
||||
<location filename="../src/game.cpp" line="48"/>
|
||||
<source>Ctrl+E</source>
|
||||
<translation>Ctrl+E</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="48"/>
|
||||
<location filename="../src/game.cpp" line="49"/>
|
||||
<source>R&oll dice...</source>
|
||||
<translation>&Würfeln...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="49"/>
|
||||
<location filename="../src/game.cpp" line="50"/>
|
||||
<source>Ctrl+I</source>
|
||||
<translation>Ctrl+I</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="52"/>
|
||||
<location filename="../src/game.cpp" line="53"/>
|
||||
<source>&Create token...</source>
|
||||
<translation>&Token erstellen...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="53"/>
|
||||
<location filename="../src/game.cpp" line="54"/>
|
||||
<source>Ctrl+T</source>
|
||||
<translation>Ctrl+T</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="56"/>
|
||||
<location filename="../src/game.cpp" line="57"/>
|
||||
<source>Next &phase</source>
|
||||
<translation>Nächste &Phase</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="57"/>
|
||||
<location filename="../src/game.cpp" line="58"/>
|
||||
<source>Ctrl+Space</source>
|
||||
<translation>Ctrl+Space</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="59"/>
|
||||
<location filename="../src/game.cpp" line="60"/>
|
||||
<source>Next &turn</source>
|
||||
<translation>Nächster &Zug</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="60"/>
|
||||
<location filename="../src/game.cpp" line="61"/>
|
||||
<source>Ctrl+Enter</source>
|
||||
<translation>Ctrl+Enter</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="60"/>
|
||||
<location filename="../src/game.cpp" line="61"/>
|
||||
<source>Ctrl+Return</source>
|
||||
<translation>Ctrl+Return</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="91"/>
|
||||
<source>&top of library</source>
|
||||
<translation>&auf die Bibliothek</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="92"/>
|
||||
<source>&bottom of library</source>
|
||||
<translation>&unter die Bibliothek</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="93"/>
|
||||
<source>&graveyard</source>
|
||||
<translation>in den &Friedhof</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="94"/>
|
||||
<source>&exile</source>
|
||||
<translation>ins &Exil</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="106"/>
|
||||
<source>&Move to</source>
|
||||
<translation>&Verschieben</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Edit messages...</source>
|
||||
<translation type="obsolete">Mitteilungen &bearbeiten...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="79"/>
|
||||
<location filename="../src/game.cpp" line="80"/>
|
||||
<source>S&ay</source>
|
||||
<translation>&Sagen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="82"/>
|
||||
<location filename="../src/game.cpp" line="83"/>
|
||||
<source>&Tap</source>
|
||||
<translation>&Tappen</translation>
|
||||
</message>
|
||||
|
@ -412,27 +437,27 @@
|
|||
<translation>E&nttappen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="86"/>
|
||||
<location filename="../src/game.cpp" line="85"/>
|
||||
<source>Toggle &normal untapping</source>
|
||||
<translation>&Normales enttappen umschalten</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="88"/>
|
||||
<location filename="../src/game.cpp" line="86"/>
|
||||
<source>&Flip</source>
|
||||
<translation>&Umdrehen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="90"/>
|
||||
<location filename="../src/game.cpp" line="87"/>
|
||||
<source>&Add counter</source>
|
||||
<translation>Zählm&arke hinzufügen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="92"/>
|
||||
<location filename="../src/game.cpp" line="88"/>
|
||||
<source>&Remove counter</source>
|
||||
<translation>Zählma&rke entfernen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="94"/>
|
||||
<location filename="../src/game.cpp" line="89"/>
|
||||
<source>&Set counters...</source>
|
||||
<translation>&Setze Zählmarken...</translation>
|
||||
</message>
|
||||
|
@ -441,78 +466,78 @@
|
|||
<translation type="obsolete">Neu a&rrangieren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="132"/>
|
||||
<location filename="../src/game.cpp" line="155"/>
|
||||
<source>F5</source>
|
||||
<translation>F5</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="133"/>
|
||||
<location filename="../src/game.cpp" line="156"/>
|
||||
<source>F6</source>
|
||||
<translation>F6</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="134"/>
|
||||
<location filename="../src/game.cpp" line="157"/>
|
||||
<source>F7</source>
|
||||
<translation>F7</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="135"/>
|
||||
<location filename="../src/game.cpp" line="158"/>
|
||||
<source>F8</source>
|
||||
<translation>F8</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="136"/>
|
||||
<location filename="../src/game.cpp" line="159"/>
|
||||
<source>F9</source>
|
||||
<translation>F9</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="137"/>
|
||||
<location filename="../src/game.cpp" line="160"/>
|
||||
<source>F10</source>
|
||||
<translation>F10</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="329"/>
|
||||
<location filename="../src/game.cpp" line="352"/>
|
||||
<source>Set life</source>
|
||||
<translation>Setze Leben</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="329"/>
|
||||
<location filename="../src/game.cpp" line="352"/>
|
||||
<source>New life total:</source>
|
||||
<translation>Neues Leben insgesammt:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="342"/>
|
||||
<location filename="../src/game.cpp" line="365"/>
|
||||
<source>Roll dice</source>
|
||||
<translation>Würfeln</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="342"/>
|
||||
<location filename="../src/game.cpp" line="365"/>
|
||||
<source>Number of sides:</source>
|
||||
<translation>Anzahl der Seiten:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="354"/>
|
||||
<location filename="../src/game.cpp" line="377"/>
|
||||
<source>Draw cards</source>
|
||||
<translation>Karten ziehen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="354"/>
|
||||
<location filename="../src/game.cpp" line="432"/>
|
||||
<location filename="../src/game.cpp" line="377"/>
|
||||
<location filename="../src/game.cpp" line="447"/>
|
||||
<source>Number:</source>
|
||||
<translation>Anzahl:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="361"/>
|
||||
<location filename="../src/game.cpp" line="384"/>
|
||||
<source>Create token</source>
|
||||
<translation>Token erstellen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="361"/>
|
||||
<location filename="../src/game.cpp" line="384"/>
|
||||
<source>Name:</source>
|
||||
<translation>Name:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="432"/>
|
||||
<location filename="../src/game.cpp" line="447"/>
|
||||
<source>Set counters</source>
|
||||
<translation>Setze Zählmarke</translation>
|
||||
</message>
|
||||
|
|
|
@ -219,127 +219,127 @@
|
|||
<context>
|
||||
<name>Game</name>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="25"/>
|
||||
<location filename="../src/game.cpp" line="26"/>
|
||||
<source>&Untap all permanents</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="26"/>
|
||||
<location filename="../src/game.cpp" line="27"/>
|
||||
<source>Ctrl+U</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="29"/>
|
||||
<location filename="../src/game.cpp" line="30"/>
|
||||
<source>&Decrement life</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="30"/>
|
||||
<location filename="../src/game.cpp" line="31"/>
|
||||
<source>F11</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="32"/>
|
||||
<location filename="../src/game.cpp" line="33"/>
|
||||
<source>&Increment life</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="33"/>
|
||||
<location filename="../src/game.cpp" line="34"/>
|
||||
<source>F12</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="35"/>
|
||||
<location filename="../src/game.cpp" line="36"/>
|
||||
<source>&Set life</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="36"/>
|
||||
<location filename="../src/game.cpp" line="37"/>
|
||||
<source>Ctrl+L</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="39"/>
|
||||
<location filename="../src/game.cpp" line="40"/>
|
||||
<source>&Shuffle</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="40"/>
|
||||
<location filename="../src/game.cpp" line="41"/>
|
||||
<source>Ctrl+S</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="42"/>
|
||||
<location filename="../src/game.cpp" line="43"/>
|
||||
<source>&Draw a card</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="43"/>
|
||||
<location filename="../src/game.cpp" line="44"/>
|
||||
<source>Ctrl+D</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="45"/>
|
||||
<location filename="../src/game.cpp" line="46"/>
|
||||
<source>D&raw cards...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="47"/>
|
||||
<location filename="../src/game.cpp" line="48"/>
|
||||
<source>Ctrl+E</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="48"/>
|
||||
<location filename="../src/game.cpp" line="49"/>
|
||||
<source>R&oll dice...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="49"/>
|
||||
<location filename="../src/game.cpp" line="50"/>
|
||||
<source>Ctrl+I</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="52"/>
|
||||
<location filename="../src/game.cpp" line="53"/>
|
||||
<source>&Create token...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="53"/>
|
||||
<location filename="../src/game.cpp" line="54"/>
|
||||
<source>Ctrl+T</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="56"/>
|
||||
<location filename="../src/game.cpp" line="57"/>
|
||||
<source>Next &phase</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="57"/>
|
||||
<location filename="../src/game.cpp" line="58"/>
|
||||
<source>Ctrl+Space</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="59"/>
|
||||
<location filename="../src/game.cpp" line="60"/>
|
||||
<source>Next &turn</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="60"/>
|
||||
<location filename="../src/game.cpp" line="61"/>
|
||||
<source>Ctrl+Enter</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="60"/>
|
||||
<location filename="../src/game.cpp" line="61"/>
|
||||
<source>Ctrl+Return</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="79"/>
|
||||
<location filename="../src/game.cpp" line="80"/>
|
||||
<source>S&ay</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="82"/>
|
||||
<location filename="../src/game.cpp" line="83"/>
|
||||
<source>&Tap</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -349,103 +349,128 @@
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="86"/>
|
||||
<location filename="../src/game.cpp" line="85"/>
|
||||
<source>Toggle &normal untapping</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="88"/>
|
||||
<location filename="../src/game.cpp" line="86"/>
|
||||
<source>&Flip</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="90"/>
|
||||
<location filename="../src/game.cpp" line="87"/>
|
||||
<source>&Add counter</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="92"/>
|
||||
<location filename="../src/game.cpp" line="88"/>
|
||||
<source>&Remove counter</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="94"/>
|
||||
<location filename="../src/game.cpp" line="89"/>
|
||||
<source>&Set counters...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="132"/>
|
||||
<location filename="../src/game.cpp" line="91"/>
|
||||
<source>&top of library</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="92"/>
|
||||
<source>&bottom of library</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="93"/>
|
||||
<source>&graveyard</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="94"/>
|
||||
<source>&exile</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="106"/>
|
||||
<source>&Move to</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="155"/>
|
||||
<source>F5</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="133"/>
|
||||
<location filename="../src/game.cpp" line="156"/>
|
||||
<source>F6</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="134"/>
|
||||
<location filename="../src/game.cpp" line="157"/>
|
||||
<source>F7</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="135"/>
|
||||
<location filename="../src/game.cpp" line="158"/>
|
||||
<source>F8</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="136"/>
|
||||
<location filename="../src/game.cpp" line="159"/>
|
||||
<source>F9</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="137"/>
|
||||
<location filename="../src/game.cpp" line="160"/>
|
||||
<source>F10</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="329"/>
|
||||
<location filename="../src/game.cpp" line="352"/>
|
||||
<source>Set life</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="329"/>
|
||||
<location filename="../src/game.cpp" line="352"/>
|
||||
<source>New life total:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="342"/>
|
||||
<location filename="../src/game.cpp" line="365"/>
|
||||
<source>Roll dice</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="342"/>
|
||||
<location filename="../src/game.cpp" line="365"/>
|
||||
<source>Number of sides:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="354"/>
|
||||
<location filename="../src/game.cpp" line="377"/>
|
||||
<source>Draw cards</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="354"/>
|
||||
<location filename="../src/game.cpp" line="432"/>
|
||||
<location filename="../src/game.cpp" line="377"/>
|
||||
<location filename="../src/game.cpp" line="447"/>
|
||||
<source>Number:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="361"/>
|
||||
<location filename="../src/game.cpp" line="384"/>
|
||||
<source>Create token</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="361"/>
|
||||
<location filename="../src/game.cpp" line="384"/>
|
||||
<source>Name:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game.cpp" line="432"/>
|
||||
<location filename="../src/game.cpp" line="447"/>
|
||||
<source>Set counters</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "card.h"
|
||||
|
||||
PlayerZone::PlayerZone(const QString &_name, bool _has_coords, ZoneType _type)
|
||||
: name(_name), has_coords(_has_coords), type(_type), cardsBeingLookedAt(-1)
|
||||
: name(_name), has_coords(_has_coords), type(_type), cardsBeingLookedAt(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -362,28 +362,28 @@ ReturnMessage::ReturnCode ServerSocket::cmdMoveCard(const QList<QVariant> ¶m
|
|||
|
||||
targetzone->insertCard(card, x, y);
|
||||
|
||||
bool targetBeingLookedAt = (targetzone->getType() != PlayerZone::HiddenZone) || (targetzone->getCardsBeingLookedAt() > x) || (targetzone->getCardsBeingLookedAt() == -1);
|
||||
bool sourceBeingLookedAt = (startzone->getType() != PlayerZone::HiddenZone) || (startzone->getCardsBeingLookedAt() > position) || (startzone->getCardsBeingLookedAt() == -1);
|
||||
|
||||
bool targetHiddenToPlayer = facedown || !targetBeingLookedAt;
|
||||
bool targetHiddenToOthers = facedown || (targetzone->getType() != PlayerZone::PublicZone);
|
||||
bool sourceHiddenToPlayer = card->getFaceDown() || !sourceBeingLookedAt;
|
||||
bool sourceHiddenToOthers = card->getFaceDown() || (startzone->getType() != PlayerZone::PublicZone);
|
||||
|
||||
QString privateCardName, publicCardName;
|
||||
if (!(sourceHiddenToPlayer && targetHiddenToPlayer))
|
||||
privateCardName = card->getName();
|
||||
if (!(sourceHiddenToOthers && targetHiddenToOthers))
|
||||
publicCardName = card->getName();
|
||||
|
||||
if (facedown)
|
||||
card->setId(newCardId());
|
||||
if ((!facedown && !card->getFaceDown())
|
||||
|| (card->getFaceDown() && !facedown && (startzone->getType() == PlayerZone::PublicZone) && (targetzone->getType() == PlayerZone::PublicZone)))
|
||||
publicCardName = card->getName();
|
||||
if ((!facedown && !card->getFaceDown())
|
||||
|| (card->getFaceDown() && !facedown && (startzone->getType() == PlayerZone::PublicZone) && (targetzone->getType() == PlayerZone::PublicZone))
|
||||
|| (!facedown && (targetzone->getType() != PlayerZone::PublicZone)))
|
||||
privateCardName = card->getName();
|
||||
|
||||
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.
|
||||
QString privateCardId = QString::number(card->getId());
|
||||
if ((targetzone->getType() == PlayerZone::HiddenZone)
|
||||
&& (startzone->getType() == PlayerZone::HiddenZone)
|
||||
&& (startzone->getCardsBeingLookedAt() <= position)
|
||||
&& (startzone->getCardsBeingLookedAt() != 0)
|
||||
&& (targetzone->getCardsBeingLookedAt() <= x)
|
||||
&& (targetzone->getCardsBeingLookedAt() != 0)) {
|
||||
if (!targetBeingLookedAt && !sourceBeingLookedAt) {
|
||||
privateCardId = QString();
|
||||
privateCardName = QString();
|
||||
}
|
||||
|
@ -399,9 +399,9 @@ ReturnMessage::ReturnCode ServerSocket::cmdMoveCard(const QList<QVariant> ¶m
|
|||
// 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() == PlayerZone::HiddenZone) && ((startzone->getCardsBeingLookedAt() > position) || (startzone->getCardsBeingLookedAt() == 0)))
|
||||
if ((startzone->getType() == PlayerZone::HiddenZone) && ((startzone->getCardsBeingLookedAt() > position) || (startzone->getCardsBeingLookedAt() == -1)))
|
||||
position = -1;
|
||||
if ((targetzone->getType() == PlayerZone::HiddenZone) && ((targetzone->getCardsBeingLookedAt() > position) || (targetzone->getCardsBeingLookedAt() == 0)))
|
||||
if ((targetzone->getType() == PlayerZone::HiddenZone) && ((targetzone->getCardsBeingLookedAt() > x) || (targetzone->getCardsBeingLookedAt() == -1)))
|
||||
x = -1;
|
||||
|
||||
if ((startzone->getType() == PlayerZone::PublicZone) || (targetzone->getType() == PlayerZone::PublicZone))
|
||||
|
@ -558,7 +558,7 @@ ReturnMessage::ReturnCode ServerSocket::cmdDumpZone(const QList<QVariant> ¶m
|
|||
|
||||
QListIterator<Card *> card_iterator(zone->cards);
|
||||
QStringList result;
|
||||
for (int i = 0; card_iterator.hasNext() && (i < number_cards || number_cards == 0); i++) {
|
||||
for (int i = 0; card_iterator.hasNext() && (i < number_cards || number_cards == -1); i++) {
|
||||
Card *tmp = card_iterator.next();
|
||||
// XXX Face down cards
|
||||
if (zone->getType() != PlayerZone::HiddenZone)
|
||||
|
@ -590,7 +590,7 @@ ReturnMessage::ReturnCode ServerSocket::cmdStopDumpZone(const QList<QVariant> &p
|
|||
return ReturnMessage::ReturnContextError;
|
||||
|
||||
if (zone->getType() == PlayerZone::HiddenZone) {
|
||||
zone->setCardsBeingLookedAt(-1);
|
||||
zone->setCardsBeingLookedAt(0);
|
||||
emit broadcastEvent(QString("stop_dump_zone|%1|%2").arg(player->getPlayerId()).arg(zone->getName()), this);
|
||||
}
|
||||
return ReturnMessage::ReturnOk;
|
||||
|
@ -603,7 +603,7 @@ ReturnMessage::ReturnCode ServerSocket::cmdRollDice(const QList<QVariant> ¶m
|
|||
return ReturnMessage::ReturnOk;
|
||||
}
|
||||
|
||||
ReturnMessage::ReturnCode ServerSocket::cmdNextTurn(const QList<QVariant> ¶ms)
|
||||
ReturnMessage::ReturnCode ServerSocket::cmdNextTurn(const QList<QVariant> &/*params*/)
|
||||
{
|
||||
int activePlayer = game->getActivePlayer();
|
||||
if (++activePlayer == game->getPlayerCount())
|
||||
|
|
Loading…
Reference in a new issue