Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
703ff790
Commit
703ff790
authored
Dec 29, 2015
by
Zach H
Browse files
token coordinates
parent
2bf998b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/player.cpp
View file @
703ff790
...
...
@@ -1136,6 +1136,9 @@ void Player::actCreateRelatedCard()
// get the target card name
QAction
*
action
=
static_cast
<
QAction
*>
(
sender
());
CardInfo
*
cardInfo
=
db
->
getCard
(
action
->
text
());
// get the target token's location
QPoint
gridPoint
=
QPoint
(
-
1
,
table
->
clampValidTableRow
(
2
-
cardInfo
->
getTableRow
()));
// create the token for the related card
Command_CreateToken
cmd
;
...
...
@@ -1146,6 +1149,9 @@ void Player::actCreateRelatedCard()
cmd
.
set_annotation
(
settingsCache
->
getAnnotateTokens
()
?
cardInfo
->
getText
().
toStdString
()
:
QString
().
toStdString
());
cmd
.
set_destroy_on_zone_change
(
true
);
cmd
.
set_target_zone
(
sourceCard
->
getZone
()
->
getName
().
toStdString
());
cmd
.
set_x
(
gridPoint
.
x
());
cmd
.
set_y
(
gridPoint
.
y
());
if
(
!
cardInfo
->
getIsToken
())
cmd
.
set_target_card_id
(
sourceCard
->
getId
());
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment