Commit 6b370ce1 authored by Max-Wilhelm Bruker's avatar Max-Wilhelm Bruker
Browse files

allow controller change even from a different zone

parent 2013ba34
......@@ -198,7 +198,7 @@ void MessageLogWidget::logMoveCard(Player *player, QString cardName, CardZone *s
else
cardStr = QString("<font color=\"blue\">%1</font>").arg(sanitizeHtml(cardName));
if ((startName == "table") && (targetName == "table")) {
if (startZone->getPlayer() != targetZone->getPlayer()) {
append(tr("%1 gives %2 control over %3.").arg(sanitizeHtml(player->getName())).arg(sanitizeHtml(targetZone->getPlayer()->getName())).arg(cardStr));
return;
}
......
......@@ -235,8 +235,8 @@ public:
ResponseCode Server_Player::moveCard(CommandContainer *cont, Server_CardZone *startzone, const QList<int> &_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()))
// Disallow controller change to other zones than the table.
if (((targetzone->getType() != PublicZone) || !targetzone->hasCoords()) && (startzone->getPlayer() != targetzone->getPlayer()))
return RespContextError;
if (!targetzone->hasCoords() && (x == -1))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment