It is currently 29 Oct 2025, 23:44
   
Text Size

Implementing ante

Post MTG Forge Related Programming Questions Here

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

Re: Implementing ante

Postby slapshot5 » 19 Dec 2011, 04:57

friarsol wrote:It looks like I have the one cards in my cardPool, but they don't seem to have the New flag.
This is now fixed in SVN.

[quote}
Also, it would be nice if the card information was displayed in the reward panel.[/quote]
Dumb question: Is it currently display in the reward panel? I know it's just text right now. Maybe as a QuestWinLoseCardViewer?

-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 » 19 Dec 2011, 12:57

It just displays the card name, but I generally have no idea what these random cards are. Formatted in the same way Random Rares and Reward Boosters makes the most sense to me.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Implementing ante

Postby slapshot5 » 19 Dec 2011, 23:42

friarsol wrote:It just displays the card name, but I generally have no idea what these random cards are. Formatted in the same way Random Rares and Reward Boosters makes the most sense to me.
This is now fixed in SVN.

-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 » 20 Dec 2011, 03:30

Thanks Slapshot. Now that you are starting to add ante cards, we should do something about res/blockdata/formats since it has all the ante cards listed there as banned (which they are) but we should separate the purely banned cards from the banned because of ante cards.

If you are playing for ante, then you can also gain the ante cards as part of the the rewards (for Vintage) for Legacy we may want to decide which of the ante cards would still be banned (Contract from Below definitely would be, the others I'm not sure if they are that powerful.)
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Implementing ante

Postby slapshot5 » 20 Dec 2011, 03:35

friarsol wrote:If you are playing for ante, then you can also gain the ante cards as part of the the rewards (for Vintage) for Legacy we may want to decide which of the ante cards would still be banned (Contract from Below definitely would be, the others I'm not sure if they are that powerful.)
What kind of mode is this for? Quest?
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 » 20 Dec 2011, 03:44

Yep, these formats are used in Quest mode for the reward Booster Pack.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Implementing ante

Postby slapshot5 » 02 Jan 2012, 03:03

friarsol wrote:Thanks Slapshot. Now that you are starting to add ante cards, we should do something about res/blockdata/formats since it has all the ante cards listed there as banned (which they are) but we should separate the purely banned cards from the banned because of ante cards.

If you are playing for ante, then you can also gain the ante cards as part of the the rewards (for Vintage) for Legacy we may want to decide which of the ante cards would still be banned (Contract from Below definitely would be, the others I'm not sure if they are that powerful.)
Submitted as Issue 589:

http://cardforge.org/bugz/view.php?id=589

-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 » 14 Jan 2012, 21:42

It looks like after a Quest game, only the card won in the last game via Ante is marked as New (the card won in the first win does not)
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Implementing ante

Postby slapshot5 » 19 Jan 2012, 05:25

friarsol wrote:It looks like after a Quest game, only the card won in the last game via Ante is marked as New (the card won in the first win does not)
Hmm. Confirmed. Not a real easy fix. I'll look at it this weekend.

-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 Roujin » 19 Jan 2012, 20:22

I'd love to see this fixed. Quite a few times I won something nice in the first match, but after the second match I only remembered that I had won something nice in the first match, but not what :lol:
Roujin
 
Posts: 75
Joined: 01 Nov 2011, 21:58
Has thanked: 6 times
Been thanked: 13 times

Re: Implementing ante

Postby slapshot5 » 21 Jan 2012, 15:05

friarsol wrote:It looks like after a Quest game, only the card won in the last game via Ante is marked as New (the card won in the first win does not)
This is now fixed in SVN.

-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 Max mtg » 31 Jan 2012, 05:54

Ante won't work.
As you add a card to Ante zone, you materialize it as forge.Card. After match you try to remove the card that is converted back into a CardPrinted. The problem is that CardDb.instance().getCard() will return you the first non-foil occurrence of the card from the first edition that contains it. (the returned CardPrinted can be unequal to the one you've materialized)

If inventory stores a different version of that card, then the remove() argument won't match the map of the card player owns, and thus the card won't be removed.
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: Implementing ante

Postby friarsol » 31 Jan 2012, 13:02

It seems to work for me and has been in for a little while now. It's successfully removing cards I lose, even ones that have a bunch of sets (Birds of Paradise)
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Implementing ante

Postby slapshot5 » 31 Jan 2012, 13:17

Ante will work and does work. I'm using the getCard(String name, String set) for this, so the sets this should not be a problem. Maybe there is a bug with foil cards?

Max - is there some kind of fix you think should happen here?

-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 Max mtg » 31 Jan 2012, 18:43

it won't work when a foiled card is put into ante, or when its artindex > 1
Take a foiled land #3 for instance.

Adding isFoil and artIndex fields to Card might help.
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Previous

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 23 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 23 users online :: 0 registered, 0 hidden and 23 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 23 guests

Login Form