Implementing ante
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins
45 posts
• Page 3 of 3 • 1, 2, 3
Re: Implementing ante
by slapshot5 » 19 Dec 2011, 04:57
This is now fixed in SVN.friarsol wrote:It looks like I have the one cards in my cardPool, but they don't seem to have the New flag.
[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
by 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
by slapshot5 » 19 Dec 2011, 23:42
This is now fixed in SVN.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.
-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
by 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.)
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
by slapshot5 » 20 Dec 2011, 03:35
What kind of mode is this for? Quest?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.)
- 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
by 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
by slapshot5 » 02 Jan 2012, 03:03
Submitted as Issue 589: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.)
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
by 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
by slapshot5 » 19 Jan 2012, 05:25
Hmm. Confirmed. Not a real easy fix. I'll look at it this weekend.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)
-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
by 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 
Re: Implementing ante
by slapshot5 » 21 Jan 2012, 15:05
This is now fixed in SVN.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)
-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
by 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.
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
by 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
by 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
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
by 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.
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
45 posts
• Page 3 of 3 • 1, 2, 3
Who is online
Users browsing this forum: No registered users and 11 guests