Develop in Possession gain only one card at all times

Previous topic - Next topic

sangatsu

When I play a Develop during Possession,I get only one card I choose first.

In this image,I was able to choose a Gold and a Province when I trashed a Bank in a Develop.  After choosing a Gold, the effect of Develop came to an end, didn't gain a Province and shifted to the buy phase.

Stef

ok thanks fixed it.

Problem was that develop tried to determine the cost of the remaining option based on the card you gained, instead of the card you tried to gain. (so the same bug existed with trader)

jeebus

Quote from: Stef on 10 April 2017, 03:15:14 PM
Problem was that develop tried to determine the cost of the remaining option based on the card you gained, instead of the card you tried to gain. (so the same bug existed with trader)

Do you mean "instead of the card you trashed"? Because Develop shouldn't care about the cost of a gained card.

And are you then referring to trashing a card with Trader in order to gain Silvers (as opposed to the Reaction ability)?

Ingix

My interpretation:

Develop:
When you trash a card of cost X to Develop, you must gain (to your deck) 2 cards, costing X-1 and X+1 *in either order*. The game client let's you first pick any of the set of cards costing X-1 or X+1. Now, when you have picked the first card, it needs to restrict the legal options for the second pick to the other cost (the one you didn't pick first). So it needs to determine the cost of the card picked first. Normally, that is the card you gained, but with Possession, the Possessed player isn't gaining the card. The code was trying to find the "gained card", in order to determine it's cost, but did not find it, so abandoned the action.

Trader:
I assume you are right that Stef talks about Playing Trader instead of its reaction ability. I assume that it looks at the trashed card in the discard pile to determine its cost, but can't find it there when it has been set aside with Possession.

jeebus

Quote from: Ingix on 18 April 2017, 03:39:23 PM
My interpretation:

Develop:
When you trash a card of cost X to Develop, you must gain (to your deck) 2 cards, costing X-1 and X+1 *in either order*. The game client let's you first pick any of the set of cards costing X-1 or X+1. Now, when you have picked the first card, it needs to restrict the legal options for the second pick to the other cost (the one you didn't pick first). So it needs to determine the cost of the card picked first. Normally, that is the card you gained, but with Possession, the Possessed player isn't gaining the card. The code was trying to find the "gained card", in order to determine it's cost, but did not find it, so abandoned the action.

Trader:
I assume you are right that Stef talks about Playing Trader instead of its reaction ability. I assume that it looks at the trashed card in the discard pile to determine its cost, but can't find it there when it has been set aside with Possession.

Your interpretation of Develop sounds entirely reasonable and believable.

But I can't see how this connects to Trader at all. It should not matter where a card is when the code checks its properties. The card was trashed, even though it was moved afterwards. Yes, it can't be moved now (it's lost track of), but its properties can be checked. If that were a bug, a lot of other card interactions would fail.

The bug with Develop that you describe, is not because the gained card was moved, it's because it doesn't exist: No card was gained. (This is actually correct behavior in Dominion. When no card is gained, any ability that checks the properties of "the gained card" finds nothing. The bug comes from the coded "shortcut" that the user can click any card costing $1 more or $1 less, so that the code has to check the gained card - but the card ability was not meant to do so. In order to implement it "correctly", the user would first get a choice whether to gain the +$1 or the -$1 card first, then choose such a card, then choose the other card.)

I can't see that Trader's reaction ability connects to this either, so I'm still confused about what this has to do with Trader.

Stef

Quote from: jeebus on 19 April 2017, 02:45:22 AM
I can't see that Trader's reaction ability connects to this either, so I'm still confused about what this has to do with Trader.

Trader and Possession are the two cards in Dominion that respond to "would gain", and when they do their thing in fact the original gain gets cancelled entirely. Like you say it has nothing to do with lose track.

Develop used to do something with the gained card (to determine the 2nd question) which was wrong; now it does something with the card you clicked on, which seems to be correct.

jeebus

Duh. Thanks. From the first post (where I thought you were talking about trashed cards), I had it stuck in my mind that it was about Trader alone somehow being similar to Possession+Develop. But it was of course about Trader+Develop.