Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow placement below top X cards #2666

Merged
merged 1 commit into from
Apr 28, 2017
Merged

Allow placement below top X cards #2666

merged 1 commit into from
Apr 28, 2017

Conversation

ZeldaZach
Copy link
Member

@ZeldaZach ZeldaZach commented Apr 27, 2017

Related Ticket(s)

Short roundup of the initial problem

Couldn't place a card X cards from top easily into the deck.

Screenshots

screenshot 2017-04-27 20 27 07

screenshot 2017-04-27 20 27 17

screenshot 2017-04-27 20 27 23

Copy link
Member

@Daenyth Daenyth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an exciting change!

@@ -723,6 +725,7 @@ void Player::retranslateUi()
}

aMoveToTopLibrary->setText(tr("&Top of library"));
aMoveToXfromTopOfLibrary->setText(tr("Below X cards..."));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"X cards from the top..."

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed

cmd->mutable_cards_to_move()->CopyFrom(idList);
cmd->set_target_player_id(getId());
cmd->set_target_zone("deck");
cmd->set_x(number);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if I set number = 100 in the UI but I only have 60 cards in the deck?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if number > deck.size() { number = deck.size() }

Copy link
Member

@Daenyth Daenyth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the wording is fine now

@Daenyth Daenyth merged commit 12c9e4b into Cockatrice:master Apr 28, 2017
@ForPsionics
Copy link

Thanks guys! This is awesome.

void Player::actMoveCardXCardsFromTop()
{
bool ok;
int number = QInputDialog::getInt(0, tr("Place card X cards from top library"), tr("How many cards from the top of the deck should this card be placed:"), defaultNumberTopCardsToPlaceBelow, 1, 2000000000, 1, &ok);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this X cards ABOVE our card or X-1? Unexpectedly Absent says "just beneath the top X cards of your library" whereas Oust says second from the top which is clarified as 6/15/2010: If the targeted creature’s owner has one or more cards in his or her library, that creature is put into that library directly under the top card.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2nd from top = means put 2 in input.
Beneath top X cards = X+1 is your input

void Player::actMoveCardXCardsFromTop()
{
bool ok;
int number = QInputDialog::getInt(0, tr("Place card X cards from top library"), tr("How many cards from the top of the deck should this card be placed:"), defaultNumberTopCardsToPlaceBelow, 1, 2000000000, 1, &ok);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be top of library not top library

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants