It is currently 31 Oct 2025, 15:43
   
Text Size

Implementing ante

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins

Implementing ante

Postby slapshot5 » 15 Dec 2011, 13:08

Hi all,

I'm working on implementing ante in to Forge. My first step is to implement it for Constructed Mode. (Implementing for Quest Mode will be more difficult, but that is the ultimate goal.)

0. Added Ante as a Zone (public)
1. There is (will be) a Setting on the Settings Menu for "Play for Ante" (default is to *not* play for ante)
2. When playing a constructed game, the antes are displaying in a pop-up box after coin toss and before drawing hands. (You should be able to view ante'd cards any time, so maybe add a display to the Player panel?)
3. If you win, any cards that the computer ante'd will be removed from his/her deck
3a. First Question - should the human be immediately offered to add these to his/her deck? I would lean towards yes.
3b. If you lose, any cards you ante'd will be removed from your deck. Computer will *not* add a copy to his/her deck.
4. As long as you Continue or Restart, the decks will continue without any cards that player lost in ante.
4a. If you quit, and then start a new Match with the same deck, all cards lost to ante will be restored.
4b. Question Two - Is this the desired behavior, or should the Decks reset on Restart (if you restart a match, it will be like cards lost to ante never happened)? My vote is yes on the first, no on the second - only reset decks on a Quit.

I know this isn't really a big deal in constructed, but during testing it has added something a little exciting to constructed mode.

I will post more about implementing in Quest once I'm done testing in Constructed and have that part checked in. (And also Limited and Draft - if we want these to have ante - but those are further down my list.)

-slapshot5
Last edited by slapshot5 on 15 Dec 2011, 13:49, edited 1 time in total.
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

Re: Implementing ante

Postby slapshot5 » 15 Dec 2011, 13:32

I just had to ante my Black Lotus. 8-[ Don't let anyone tell you this doesn't add a little "Uh-oh" to the game, even in constructed. LOL.

-slapshot5
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

Re: Implementing ante

Postby friarsol » 15 Dec 2011, 15:11

3a. While you do become the owner, that card isn't exactly part of the deck you started the match with. I think the way I'd prefer the most (from a Quest mode perspective) is holding onto the card in a "won cards" section and putting it in the Reward box at the end of the match. Although, that makes less sense in a constructed setting than a Quest mode setting. I could be swayed either way.


http://wiki.mtgsalvation.com/article/Ante
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Implementing ante

Postby Rob Cashwalker » 15 Dec 2011, 15:57

There's really no point to Ante outside of Quest...
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Re: Implementing ante

Postby Sloth » 15 Dec 2011, 17:25

Rob Cashwalker wrote:There's really no point to Ante outside of Quest...
That's what I think too. (unless you want to go uber baroken with Contract from Below) [-X
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Implementing ante

Postby moomarc » 15 Dec 2011, 19:57

Rob Cashwalker wrote:There's really no point to Ante outside of Quest...
I like the "Uh oh!". factor for the randomness it adds. It also makes me rethink deck building because in combo decks its even more important to add duplicate cards in case its ante'd, so there's more of a challenge there. So even though there's no real point in constructed, its definitely worth having the option. :mrgreen:
-Marc
User avatar
moomarc
Pixel Commander
 
Posts: 2091
Joined: 04 Jun 2010, 15:22
Location: Johannesburg, South Africa
Has thanked: 371 times
Been thanked: 372 times

Re: Implementing ante

Postby Chris H. » 15 Dec 2011, 23:03

moomarc wrote:I like the "Uh oh!". factor for the randomness it adds. It also makes me rethink deck building because in combo decks its even more important to add duplicate cards in case its ante'd, so there's more of a challenge there. So even though there's no real point in constructed, its definitely worth having the option. :mrgreen:
`
And being able to play test it before adding this feature to quest mode may prove to be valuable.
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Implementing ante

Postby slapshot5 » 16 Dec 2011, 00:31

I've checked in ante for Constructed as outlined above. The only TODO item for that would be to add this info to the Player panel. I should be able to do that tonight. Then I will start looking into Quest Mode.

-slapshot5
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

Re: Implementing ante

Postby slapshot5 » 16 Dec 2011, 05:07

Ok. I've added the ante'd cards to the Player Panel. I'd like to get a listener on there to display the Card in the PicturePanel/CardDetailsPanel, but the possibility exists that a single player has more than one card in their Ante Zone at a time. If anyone has an idea, go for it.

Here's what I'm thinking for quest mode:

1. If you win a game, the cards in the Computer's ante zone get added to your card pool. (That should be fine since you can only go to your card pool at the end of a match, not between games within a match.)
1a. If you win, the cards in the Computer's ante zone are removed from his deck for the rest of that match. Question: What happens If you play the same opponent at the same difficulty twice in a quest? (Can you even do that? - I don't play quest mode, so I have no idea.)
2. If you lose, the cards from your ante zone are removed from the deck that you are currently playing, and that many copies are also removed form your card pool.
2a. Also, before the next match, the we'd have to programmatically go through all your quest decks to ensure each quest deck contains no more than the number of each card in your card pool.

Example: You card pool contains 3 Serra Angel. You have three quest decks. Deck1 has 3 Serra Angel. Deck2 has 2 Serra Angel. Deck3 has 1 Serra Angel. You play a match with Deck1. In game 1, you ante a Serra Angel and lose. In game 2, you ante another Serra Angel and lose. Your card pool now contains 1 Serra Angel. When this match is completed (and has been since the computer has now won this match), we go though and Deck1 has 1 Serra Angel. Deck2, we have gone in and removed 1 copy of Serra Angel, so it also has 1 Serra Angel. Deck3 is unaffected since it only had 1 Serra Angel to begin with, and your card pool still contains 1 Serra Angel.

Question: Do we want to add something in the Quest WinLoseFrame saying which cards you have won/lost after each game? Or is it understood that if you ante'd a card and lost, you no longer have that card?

Any other considerations? I appreciate any help people can offer dealing with Quest and testing. Like I said, I don't use Quest mode, so I really don't know how everything is supposed to work with card pools and quest decks and bazaars and plant walls and whatnot.

-slapshot5
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

Re: Implementing ante

Postby friarsol » 16 Dec 2011, 13:39

1a. Yes it is possible, but I'd treat all instances of an AI opponent as a Fresh instance.

2a. This sounds right. Check the code for selling cards, you might be able to just reuse that code, without the gaining of credits.

We definitely need something in the WinLoseFrame detailing what you gained from Ante and what you lost from Ante.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Implementing ante

Postby moomarc » 16 Dec 2011, 14:29

Have you implemented anything to check decks for cards with ante effects at game start, seeing as if you're not playing for ante they're meant to be removed from your deck? I haven't had a chance to try ante out yet, so I apologise if the question's redundant.
-Marc
User avatar
moomarc
Pixel Commander
 
Posts: 2091
Joined: 04 Jun 2010, 15:22
Location: Johannesburg, South Africa
Has thanked: 371 times
Been thanked: 372 times

Re: Implementing ante

Postby slowe » 17 Dec 2011, 05:33

Some quick thoughts:
- First, I have to agree that ante has no place outside of Quest (or any future game mode with a finite card pool).

- Is it really correct to ante each game rather than once for a full match? It feels weird - usually games won/lost don't matter, only the match outcome, whether in tournament play or for current quest rewards. At the same time, matches are a product of tournament play, and there are no tournament rules for ante... Hmm. How did it work in Shandalar?

- Make sure to use the printing-specific card objects when removing ante from the player's card pool. So, in the example if the Serra Angels you lost were from Alpha and the one left is from Beta, remove the appropriate copies from the card pool and the decks. This works properly when you sell cards, so as Sol said, look at that code.

On that note, I agree with Sol's other two points as well.
slowe
 
Posts: 127
Joined: 05 Jan 2010, 14:04
Has thanked: 6 times
Been thanked: 10 times

Re: Implementing ante

Postby slapshot5 » 17 Dec 2011, 05:47

slowe wrote:Some quick thoughts:
- First, I have to agree that ante has no place outside of Quest (or any future game mode with a finite card pool).
This is why there is a setting and you can change it at will. I you want to play ante in Constructed (like I do), you can, if you don't want to, you won't.

- Is it really correct to ante each game rather than once for a full match? It feels weird - usually games won/lost don't matter, only the match outcome, whether in tournament play or for current quest rewards. At the same time, matches are a product of tournament play, and there are no tournament rules for ante... Hmm. How did it work in Shandalar?
Yes. The correct way is that ante is done for each game. I have no idea about Shandalar.

- Make sure to use the printing-specific card objects when removing ante from the player's card pool. So, in the example if the Serra Angels you lost were from Alpha and the one left is from Beta, remove the appropriate copies from the card pool and the decks. This works properly when you sell cards, so as Sol said, look at that code.
Good to know. Hadn't thought about that. I will see what I can do.

-slapshot5
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

Re: Implementing ante

Postby slapshot5 » 17 Dec 2011, 12:53

Here's another thought I had while coding this:

If you lose a card to ante in Quest mode, should we add it to the card shop to give you a chance to buy it back?

This would kind of be like the playing culture of "if you win a card in ante, you are required/expected/whatever to offer it back in trade".

Thoughts? I don't really care either way.

It will *not* be available in Card Shop unless people speak up. (Only because that's the way I have it coded right now...)

-slapshot5
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

Re: Implementing ante

Postby Chris H. » 17 Dec 2011, 13:21

slapshot5 wrote:Here's another thought I had while coding this:

If you lose a card to ante in Quest mode, should we add it to the card shop to give you a chance to buy it back?

This would kind of be like the playing culture of "if you win a card in ante, you are required/expected/whatever to offer it back in trade".

Thoughts? I don't really care either way.

It will *not* be available in Card Shop unless people speak up. (Only because that's the way I have it coded right now...)

-slapshot5
`
I think that people will likely appreciate the chance to get back that important card for their deck that they lost in ante.

Buying it back at the card shop may not require too much coding.

Another option would provide a list of cards in your card pool with their costs and you would have to select enough cards to equal or exceed the cost of the card that you lost as part of the trade. This might be viewed as a closer approxiamation of a "trade" taking place but might require more coding.

Either approach would be appreciated by the peeps who play quest.
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Next

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 16 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 16 users online :: 0 registered, 0 hidden and 16 guests (based on users active over the past 10 minutes)
Most users ever online was 9298 on 10 Oct 2025, 12:54

Users browsing this forum: No registered users and 16 guests

Login Form