Commit 20bfb4d0 authored by Matt Lowe's avatar Matt Lowe
Browse files

Fix for hand target casting

if you have the setting to NOT play cards to the stack enabled, it meant
that any spells (like Lightning Bolt) would be cast to the stack but no
arrow would show. This was an edge case I missed.
parent b8401592
......@@ -4,6 +4,7 @@
#include "arrowitem.h"
#include "playertarget.h"
#include "carditem.h"
#include "carddatabase.h"
#include "cardzone.h"
#include "player.h"
#include "settingscache.h"
......@@ -227,7 +228,13 @@ void ArrowDragItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
}
if (startZone->getName().compare("hand") == 0) {
startCard->playCard(false);
cmd.set_start_zone(settingsCache->getPlayToStack() ? "stack" :"table");
CardInfo *ci = startCard->getInfo();
if (((!settingsCache->getPlayToStack() && ci->getTableRow() == 3) ||
((settingsCache->getPlayToStack() && ci->getTableRow() != 0) &&
startCard->getZone()->getName().toStdString() != "stack")))
cmd.set_start_zone("stack");
else
cmd.set_start_zone(settingsCache->getPlayToStack() ? "stack" :"table");
}
player->sendGameCommand(cmd);
}
......
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