diff --git a/cockatrice/src/player.cpp b/cockatrice/src/player.cpp index d2291e4e..bef0b1cc 100644 --- a/cockatrice/src/player.cpp +++ b/cockatrice/src/player.cpp @@ -102,6 +102,7 @@ Player::Player(const ServerInfo_User &info, int _id, bool _local, TabGame *_pare shortcutsActive(false), defaultNumberTopCards(1), lastTokenDestroy(true), + lastTokenTableRow(0), id(_id), active(false), local(_local), @@ -1035,6 +1036,7 @@ void Player::actCreateToken() lastTokenPT = dlg.getPT(); if (CardInfo *correctedCard = db->getCardBySimpleName(lastTokenName, false)) { lastTokenName = correctedCard->getName(); + lastTokenTableRow = 2 - correctedCard->getTableRow(); if (lastTokenPT.isEmpty()) lastTokenPT = correctedCard->getPowTough(); } @@ -1056,7 +1058,7 @@ void Player::actCreateAnotherToken() cmd.set_annotation(lastTokenAnnotation.toStdString()); cmd.set_destroy_on_zone_change(lastTokenDestroy); cmd.set_x(-1); - cmd.set_y(0); + cmd.set_y(lastTokenTableRow); sendGameCommand(cmd); } @@ -1070,6 +1072,7 @@ void Player::actCreatePredefinedToken() lastTokenColor = cardInfo->getColors().isEmpty() ? QString() : cardInfo->getColors().first().toLower(); lastTokenPT = cardInfo->getPowTough(); lastTokenAnnotation = cardInfo->getText(); + lastTokenTableRow = 2 - cardInfo->getTableRow(); lastTokenDestroy = true; aCreateAnotherToken->setEnabled(true); diff --git a/cockatrice/src/player.h b/cockatrice/src/player.h index 3aba14db..9c51e1f6 100644 --- a/cockatrice/src/player.h +++ b/cockatrice/src/player.h @@ -185,6 +185,7 @@ private: int defaultNumberTopCards; QString lastTokenName, lastTokenColor, lastTokenPT, lastTokenAnnotation; bool lastTokenDestroy; + int lastTokenTableRow; ServerInfo_User *userInfo; int id; bool active;