Dominion Strategy Forum

Dominion => Rules Questions => Topic started by: -Stef- on October 19, 2015, 10:42:52 am

Title: buying a card
Post by: -Stef- on October 19, 2015, 10:42:52 am
I'm trying write the dominion rules down in Java, and one of the funny things is that I come to realize there is a lot I don't know.

If I buy a card, do I buy a specific instance of a card, or just whatever is on top of the pile I selected?
(this could be relevant if a card is removed from the pile due to on-buy triggers. This could empty the pile, or maybe the pile isn't uniform, or maybe I just lose track.)

When exactly in the process do I lose money?
(I don't think there is any card that makes this a relevant question; still I'd like to know)

-----

same question, just applying it now. supposedly a fan card says...

TitForTat - Action - Duration
While this is in play, whenever an opponent buys an attack Card, you gain an attack card.

... and with this card in play my opponent buys Sir Destry. It's the only attack pile in the kingdom, and below Sir Destry is Dame Anna. Who ends up with what knight? Do we even both get a knight? And what if Sir Destry was the last knight in the pile?
Title: Re: buying a card
Post by: faust on October 19, 2015, 10:50:56 am
TitForTat - Action - Duration
While this is in play, whenever an opponent buys an attack Card, you gain an attack card.

... and with this card in play my opponent buys Sir Destry. It's the only attack pile in the kingdom, and below Sir Destry is Dame Anna. Who ends up with what knight? Do we even both get a knight? And what if Sir Destry was the last knight in the pile?

I think it should go like this:

- you buy Sir Destry, losing $5
- on-buy triggers before gaining (and I believe gaining is the thing which moves the card): your opponent gains Sir Destry.
- you try to gain Sir Destry, failing to do so because you lost track

Another ruling wherein you gain Dame Anna would be awkward because you could theoretically spend $4 on Sir Martin and gain Dame Anna.

I'm pretty sure though that losing money triggers on-buy, as that is also when overpay effects kick in, and that moving the card away from the pile only happens on gain. Wasn't there some related discussion about Talisman some time ago?
Title: Re: buying a card
Post by: faust on October 19, 2015, 11:00:17 am
A thought I had: Losing the money you need to buy the card needs to happen before we enter when-buy territory. Otherwise, if I buy a Herald with $4 total, losing money and overpay would trigger simultaneously, so I could choose the order, choosing overpay first and overpaying $4.
Title: Re: buying a card
Post by: -Stef- on October 19, 2015, 11:08:47 am
I'm pretty sure though that losing money triggers on-buy, as that is also when overpay effects kick in, and that moving the card away from the pile only happens on gain. Wasn't there some related discussion about Talisman some time ago?

Hmm Talisman is a good point, but exactly to the contrary of what you're saying. Talisman would never work if you bought the specific card on top of the pile, because that card is always gone when you start to gain it due to the on-buy trigger.

What you're saying is that the lose-track rule makes you lose track of Sir Destry when now Dame Anna is on top of the pile, but it wouldn't make you lose track of a Silver if currently another Silver is on top of the pile. I hope you're wrong but maybe Donald can say something about it. I actually think you can end up buying Dame Anna for $4 with this fan card.

---

Suppose I buy a Silver with Haggler in play and Trader in Hand. I decide to haggle a Duchess and trade that for a Silver.
Now I always assumed I'd end up with two Silvers. Wrong because I lost track of the specific Silver on top of the pile because that I tried to buy?
Title: Re: buying a card
Post by: werothegreat on October 19, 2015, 11:13:56 am
If I buy a card, do I buy a specific instance of a card, or just whatever is on top of the pile I selected?
(this could be relevant if a card is removed from the pile due to on-buy triggers. This could empty the pile, or maybe the pile isn't uniform, or maybe I just lose track.)

You buy a specific instance of what is on top of the pile.  With Talisman in play, if you buy Sir Martin, you first gain a copy of Sir Martin, then you try to gain Sir Martin, and fail, because there aren't any Sir Martins any more.
Title: Re: buying a card
Post by: GendoIkari on October 19, 2015, 11:18:27 am
If I buy a card, do I buy a specific instance of a card, or just whatever is on top of the pile I selected?
(this could be relevant if a card is removed from the pile due to on-buy triggers. This could empty the pile, or maybe the pile isn't uniform, or maybe I just lose track.)

You buy a specific instance of what is on top of the pile.  With Talisman in play, if you buy Sir Martin, you first gain a copy of Sir Martin, then you try to gain Sir Martin, and fail, because there aren't any Sir Martins any more.

But if you buy a Silver with Talisman in play, then after you gain a Silver from Talisman, you still gain a Silver from your buy. This means you were NOT buying the specific card on top.

I believe it is a middle between the 2... You are buying a specific card name from a specific pile. As long as a card named "Silver" is still on top, you gain it. Doesn't matter if it's the same "Silver card" that you bought.
Title: Re: buying a card
Post by: -Stef- on October 19, 2015, 11:40:11 am
... You are buying a specific card name from a specific pile. As long as a card named "Silver" is still on top, you gain it. Doesn't matter if it's the same "Silver card" that you bought.

yes that actually makes more sense :)
I'll write that down, unless Donald comes along and has a different explanation.
Title: Re: buying a card
Post by: GendoIkari on October 19, 2015, 11:54:12 am
... You are buying a specific card name from a specific pile. As long as a card named "Silver" is still on top, you gain it. Doesn't matter if it's the same "Silver card" that you bought.

yes that actually makes more sense :)
I'll write that down, unless Donald comes along and has a different explanation.

The part I don't know, and likely will never matter, is if the pile matters. As in, if you buy a Silver from the Silver pile, can you then gain a Silver from a different pile? Multiple people have suggested fan cards that can cause a card to go on a different pile.
Title: Re: buying a card
Post by: faust on October 19, 2015, 12:00:39 pm
... You are buying a specific card name from a specific pile. As long as a card named "Silver" is still on top, you gain it. Doesn't matter if it's the same "Silver card" that you bought.

yes that actually makes more sense :)
I'll write that down, unless Donald comes along and has a different explanation.

The part I don't know, and likely will never matter, is if the pile matters. As in, if you buy a Silver from the Silver pile, can you then gain a Silver from a different pile? Multiple people have suggested fan cards that can cause a card to go on a different pile.

I'd argue that normal buying and gaining always targets "the supply", i.e. the top card top every supply pile. So when you are trying to gain a card, you gain from the supply, so you look at the whole supply trying to find that card. Where you find it doesn't matter as long as it's in the supply.
Title: Re: buying a card
Post by: GendoIkari on October 19, 2015, 12:09:07 pm
... You are buying a specific card name from a specific pile. As long as a card named "Silver" is still on top, you gain it. Doesn't matter if it's the same "Silver card" that you bought.

yes that actually makes more sense :)
I'll write that down, unless Donald comes along and has a different explanation.

The part I don't know, and likely will never matter, is if the pile matters. As in, if you buy a Silver from the Silver pile, can you then gain a Silver from a different pile? Multiple people have suggested fan cards that can cause a card to go on a different pile.

I'd argue that normal buying and gaining always targets "the supply", i.e. the top card top every supply pile. So when you are trying to gain a card, you gain from the supply, so you look at the whole supply trying to find that card. Where you find it doesn't matter as long as it's in the supply.

This is reasonable, and it means that when you "buy X", what you are actually buying is a claim-check that says "gain X", a claim check that you automatically resolve as soon as any on-buy effects are over.

But I think it's also reasonable to say that "buying X from pile Y" gives you a claim check that says "gain X from pile Y".
Title: Re: buying a card
Post by: SCSN on October 19, 2015, 12:14:14 pm
... You are buying a specific card name from a specific pile. As long as a card named "Silver" is still on top, you gain it. Doesn't matter if it's the same "Silver card" that you bought.

yes that actually makes more sense :)
I'll write that down, unless Donald comes along and has a different explanation.

The part I don't know, and likely will never matter, is if the pile matters. As in, if you buy a Silver from the Silver pile, can you then gain a Silver from a different pile? Multiple people have suggested fan cards that can cause a card to go on a different pile.

I'd argue that normal buying and gaining always targets "the supply", i.e. the top card top every supply pile. So when you are trying to gain a card, you gain from the supply, so you look at the whole supply trying to find that card. Where you find it doesn't matter as long as it's in the supply.

If this were true you wouldn't be able to gain the cards you bought from the Black Market, as they are not in the supply and BM only mentions that you can buy them, not that you can gain them as well. From the fact that you gain them anyway it can be deduced that buying a card from somewhere is implicitly but inevitably followed by gaining it from that exact same location, unless something intervenes that displaces the card, at which point the lose track rule kicks in because the card you want to gain is no longer where it's supposed to be gained from.
Title: Re: buying a card
Post by: AJD on October 19, 2015, 12:15:12 pm
I think it should go like this:

- you buy Sir Destry, losing $5
- on-buy triggers before gaining (and I believe gaining is the thing which moves the card): your opponent gains Sir Destry.
- you try to gain Sir Destry, failing to do so because you lost track

This is mostly right, but not quite right—the lose-track rule isn't what causes you to fail to gain Sir Destry, it's just the fact that there isn't a Sir Destry available in the supply to gain at the moment.
Title: Re: buying a card
Post by: GendoIkari on October 19, 2015, 12:16:37 pm
... You are buying a specific card name from a specific pile. As long as a card named "Silver" is still on top, you gain it. Doesn't matter if it's the same "Silver card" that you bought.

yes that actually makes more sense :)
I'll write that down, unless Donald comes along and has a different explanation.

The part I don't know, and likely will never matter, is if the pile matters. As in, if you buy a Silver from the Silver pile, can you then gain a Silver from a different pile? Multiple people have suggested fan cards that can cause a card to go on a different pile.

I'd argue that normal buying and gaining always targets "the supply", i.e. the top card top every supply pile. So when you are trying to gain a card, you gain from the supply, so you look at the whole supply trying to find that card. Where you find it doesn't matter as long as it's in the supply.

If this were true you wouldn't be able to gain the cards you bought from the Black Market, as they are not in the supply and BM only mentions that you can buy them, not that you can gain them as well. From the fact that you gain them anyway it can be deduced that buying a card from somewhere is implicitly but inevitably followed by gaining it from that exact same location, unless something intervenes that displaces the card, at which point the lose track rule kicks in because the card you want to gain is no longer where it's supposed to be gained from.

I think the Black Market buy would override the normal buy exactly like how a Madman gain overrides a normal gain. The instruction on Black Market is "you may buy [a card from the revealed Black Market deck]". This would translate to a claim ticket that says "gain X [from the revealed Black Market deck]".
Title: Re: buying a card
Post by: AJD on October 19, 2015, 12:18:07 pm
If this were true you wouldn't be able to gain the cards you bought from the Black Market, as they are not in the supply and BM only mentions that you can buy them, not that you can gain them as well. From the fact that you gain them anyway it can be deduced that buying a card from somewhere is implicitly but inevitably followed by gaining it from that exact same location, unless something intervenes that displaces the card, at which point the lose track rule kicks in because the card you want to gain is no longer where it's supposed to be gained from.

I think you're mostly right, except for this:

Buying a card is followed by gaining a copy of it from the exact same location.

What you buy is a specific card, but it's possible for the card you end up gaining to be a different copy of the same card, rather than the specific card you actually bought. "If something displaces the card" doesn't stop you from gaining a copy of it, so the lose-track rule never applies.
Title: Re: buying a card
Post by: popsofctown on October 19, 2015, 02:17:48 pm
I always thought of it as, the game itself is only as smart as a pig, and can't differentiate between copies.

You buy the Silver on top of the pile, something happens and it goes away, but later when it comes time to gain the silver you bought, you treat the one on top of the pile as though it has the same identity as the one you bought because the game doesn't know the difference.  "Naivety theory"?

That explanation makes it obvious why you can't buy from an empty pile.  You can only try to buy the top card of the pile.  Then you gain that card, or a card you can be fooled into thinking is that card, which means it will need the same name.


By the way, I'm pretty sure you can reconstruct the situation in OP without using a fan card, and it's always nice to avoid using a fan card for a rules question if you can, right?  Haggler + Gold + buy Dame Anna -> gain Squire -> Reveal Watchtower -> Trash the Squire -> gain Dame Anna -> fail to gain Dame Anna.
Title: Re: buying a card
Post by: GendoIkari on October 19, 2015, 02:38:42 pm

By the way, I'm pretty sure you can reconstruct the situation in OP without using a fan card, and it's always nice to avoid using a fan card for a rules question if you can, right?  Haggler + Gold + buy Dame Anna -> gain Squire -> Reveal Watchtower -> Trash the Squire -> gain Dame Anna -> fail to gain Dame Anna.

Isn't this just the exact same thing as "Buy a Ruined Market (http://wiki.dominionstrategy.com/index.php/Ruined_Market) or Sir Martin (http://wiki.dominionstrategy.com/index.php/Sir_Martin) with Talisman (http://wiki.dominionstrategy.com/index.php/Talisman) in play"?
Title: Re: buying a card
Post by: popsofctown on October 19, 2015, 02:41:52 pm

By the way, I'm pretty sure you can reconstruct the situation in OP without using a fan card, and it's always nice to avoid using a fan card for a rules question if you can, right?  Haggler + Gold + buy Dame Anna -> gain Squire -> Reveal Watchtower -> Trash the Squire -> gain Dame Anna -> fail to gain Dame Anna.

Isn't this just the exact same thing as "Buy a Ruined Market (http://wiki.dominionstrategy.com/index.php/Ruined_Market) or Sir Martin (http://wiki.dominionstrategy.com/index.php/Sir_Martin) with Talisman (http://wiki.dominionstrategy.com/index.php/Talisman) in play"?

That works too.  Looks like wero mentioned it, and I missed it.  Sorry.
Title: Re: buying a card
Post by: Donald X. on October 19, 2015, 07:54:12 pm
If I buy a card, do I buy a specific instance of a card, or just whatever is on top of the pile I selected?
(this could be relevant if a card is removed from the pile due to on-buy triggers. This could empty the pile, or maybe the pile isn't uniform, or maybe I just lose track.)
You name what you're buying, and then gain it from the supply if it's available. Black Market modifies where the card can come from.

As has been pointed out, Talisman means you can't be buying a specific card instance.

When exactly in the process do I lose money?
(I don't think there is any card that makes this a relevant question; still I'd like to know)
Name a card you can afford, lose $ equal to its cost, when-buy effects trigger, gain it.

As noted overpay means losing the $ has to come ahead of when-buy triggers.

TitForTat - Action - Duration
While this is in play, whenever an opponent buys an attack Card, you gain an attack card.

... and with this card in play my opponent buys Sir Destry. It's the only attack pile in the kingdom, and below Sir Destry is Dame Anna. Who ends up with what knight? Do we even both get a knight? And what if Sir Destry was the last knight in the pile?
You gain Sir Destry, your opponent gets nothing, regardless of what's under him.
Title: Re: buying a card
Post by: werothegreat on October 19, 2015, 10:31:16 pm
You can choose to do overpay before or after other when-buy effects, right?  Not that it's going to matter all that often.
Title: Re: buying a card
Post by: Donald X. on October 19, 2015, 10:56:50 pm
You can choose to do overpay before or after other when-buy effects, right?  Not that it's going to matter all that often.
You can order it however you like relative to other when-buy triggers.
Title: Re: buying a card
Post by: dane-m on October 21, 2015, 11:42:32 am
By the way, I'm pretty sure you can reconstruct the situation in OP without using a fan card, and it's always nice to avoid using a fan card for a rules question if you can, right?  Haggler + Gold + buy Dame Anna -> gain Squire -> Reveal Watchtower -> Trash the Squire -> gain Dame Anna -> fail to gain Dame Anna.
How about this as another possibility?
The above scenario is based on the assumption that the relevant text on Messenger is an "on buy" instruction rather than an "on gain" one.  I had a quick look at the Adventures rule book but couldn't find anything to support or contradict that assumption.
Title: Re: buying a card
Post by: eHalcyon on October 21, 2015, 12:15:12 pm
The above scenario is based on the assumption that the relevant text on Messenger is an "on buy" instruction rather than an "on gain" one.  I had a quick look at the Adventures rule book but couldn't find anything to support or contradict that assumption.

The card text itself specifies that it's on your first buy, not gain.
Title: Re: buying a card
Post by: Davio on October 21, 2015, 01:31:54 pm
Oh man, I tried to implement Dominion rules in Java once, but gave up about 1 hour in. :D

I tried to make it clean by separating players, piles, etc, but eventually decided that it was easier to just pass the entire game state around, because there are so many exceptions and things to keep track of.

I'm pretty sure it's easier to implement Dominion with a giant flowchart-like automaton (something functional) than to do it in Java (oo/imperative). :)
Title: Re: buying a card
Post by: dane-m on October 22, 2015, 01:23:22 pm
The above scenario is based on the assumption that the relevant text on Messenger is an "on buy" instruction rather than an "on gain" one.  I had a quick look at the Adventures rule book but couldn't find anything to support or contradict that assumption.

The card text itself specifies that it's on your first buy, not gain.
I see what you're saying - after all it was the wording on the card that led me to assume that the instruction was an "on buy" one - but I don't quite agree that it's absolutely clear.

"When you buy this..." and "When you gain this" are the formulations we're used to for "on buy" and "on gain" instructions.  This card has a slightly different formulation, namely "When this is your first buy..."  This is most plausibly short for "When you buy this, if it is your first buy...", but I wasn't entirely convinced that it couldn't be short for "When you gain this, if it is your first buy...", though perhaps the phrasing "When this is your first buy..." as opposed to "If this is your first buy..." can be considered to eliminate that possibility.
Title: Re: buying a card
Post by: GendoIkari on October 22, 2015, 01:56:14 pm
The above scenario is based on the assumption that the relevant text on Messenger is an "on buy" instruction rather than an "on gain" one.  I had a quick look at the Adventures rule book but couldn't find anything to support or contradict that assumption.

The card text itself specifies that it's on your first buy, not gain.
I see what you're saying - after all it was the wording on the card that led me to assume that the instruction was an "on buy" one - but I don't quite agree that it's absolutely clear.

"When you buy this..." and "When you gain this" are the formulations we're used to for "on buy" and "on gain" instructions.  This card has a slightly different formulation, namely "When this is your first buy..."  This is most plausibly short for "When you buy this, if it is your first buy...", but I wasn't entirely convinced that it couldn't be short for "When you gain this, if it is your first buy...", though perhaps the phrasing "When this is your first buy..." as opposed to "If this is your first buy..." can be considered to eliminate that possibility.

Absolutely. I see this as yet another example of a card where the literal wording of the card does not fit within the technical ruleset that we have which says what wordings mean; yet it's fine because using a logical English reading of the card, we can figure out the intent and how it should work.
Title: Re: buying a card
Post by: Gubump on October 23, 2015, 09:52:47 am
I think it should go like this:

- you buy Sir Destry, losing $5
- on-buy triggers before gaining (and I believe gaining is the thing which moves the card): your opponent gains Sir Destry.
- you try to gain Sir Destry, failing to do so because you lost track

This is mostly right, but not quite right—the lose-track rule isn't what causes you to fail to gain Sir Destry, it's just the fact that there isn't a Sir Destry available in the supply to gain at the moment.

Actually, you could just gain another Knight. The card in the OP says "...you gain an attack card," not that you gain a copy of that attack card. That means you could gain a Cutpurse, a Goons, or another Knight, assuming those are in the Supply.
Title: Re: buying a card
Post by: GendoIkari on October 23, 2015, 09:58:05 am
I think it should go like this:

- you buy Sir Destry, losing $5
- on-buy triggers before gaining (and I believe gaining is the thing which moves the card): your opponent gains Sir Destry.
- you try to gain Sir Destry, failing to do so because you lost track

This is mostly right, but not quite right—the lose-track rule isn't what causes you to fail to gain Sir Destry, it's just the fact that there isn't a Sir Destry available in the supply to gain at the moment.

Actually, you could just gain another Knight. The card in the OP says "...you gain an attack card," not that you gain a copy of that attack card. That means you could gain a Cutpurse, a Goons, or another Knight, assuming those are in the Supply.

No, the person who has the card in play, the person who gets to "gain an attack card", DOES get Sir Destry. It's the person who bought Sir Destry that fails to get anything.
Title: Re: buying a card
Post by: Jeebus on October 26, 2015, 03:49:36 pm
I'm trying write the dominion rules down in Java, and one of the funny things is that I come to realize there is a lot I don't know.

Check out the rules FAQ that I compiled and put on BGG (in my sig). It answers a lot of questions (hopefully all of them). I'm now completing a PDF document with all rules and rulings that will hopefully make this more readable. The idea is that it contains all the basic rules in a friendly way, but also all the advanced rules and rulings.