Quest Mode Funkiness
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins
7 posts
• Page 1 of 1
Quest Mode Funkiness
by friarsol » 10 Jul 2010, 13:38
I started up a new quest and after squeaking out a 1st game victory didn't feel like trying to win the next game so I quit the match up 1-0.
I was "rewarded" by being handed 1 loss, 300+ gold, and 15 random rares! Surprised, I added some of the new rares to my deck, started another game and quit after winning the first game.
This time I got another loss only 30+ gold, and 10 random rares. The third time I attempted it I was back up to 300+ gold, and 10 random rares again.
I'm not sure exactly what's going on, but it seems like if I win the first game by turn 15, the game assumes I'm winning the second game by turn 0 (even though I'm getting the loss for quitting out) and thus getting major rewards for it. I'm pretty busy this weekend, so I won't have time to look through exactly what's going on but if noone has a chance to peak at it, I'll comb through the code in a few days.
Edit: I accidentally won a match and it looks like this stopped happening. Maybe it's some code to help you with some rares if you are stuck at 0 wins?
Edit2: It seems like it's carrying over the last win from the most previous time I've played a second game. Since the 2nd printed value appears right for how long it took me to win, but the 1st value seems to be stuck at 27 (for this circumstance).
I was "rewarded" by being handed 1 loss, 300+ gold, and 15 random rares! Surprised, I added some of the new rares to my deck, started another game and quit after winning the first game.
This time I got another loss only 30+ gold, and 10 random rares. The third time I attempted it I was back up to 300+ gold, and 10 random rares again.
I'm not sure exactly what's going on, but it seems like if I win the first game by turn 15, the game assumes I'm winning the second game by turn 0 (even though I'm getting the loss for quitting out) and thus getting major rewards for it. I'm pretty busy this weekend, so I won't have time to look through exactly what's going on but if noone has a chance to peak at it, I'll comb through the code in a few days.
Edit: I accidentally won a match and it looks like this stopped happening. Maybe it's some code to help you with some rares if you are stuck at 0 wins?
Edit2: It seems like it's carrying over the last win from the most previous time I've played a second game. Since the 2nd printed value appears right for how long it took me to win, but the 1st value seems to be stuck at 27 (for this circumstance).
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Quest Mode Funkiness
by friarsol » 12 Jul 2010, 15:07
So the "stuck on a value" seems weird. When i start up the program, the first time I quit in the middle of the match the second game is won in 0 turns, allowing me to get a huge boost of money etc for winning on the 0th turn. After the first game, however many turns it took you to win that first game after launching (possibly just in the quest mode) will be "locked in" to the value as the second game win. It was at 17 for this round of play.
Now this definitely goes against the "spirit" of quest mode, and "the only one you are cheating is yourself", but it makes it easy to rack up lots of rares so this should probably be fixed. I'll start looking through the code, but if anyone can point me in the right direction that'd be great.
Related: We should have a button that opens up your quest stats, that will say which Bazaar items and levels you have, how much cash you have, how much your current worth is(total value), and your current record. Maybe even print out your last used deck (or let the player choose?)
After 15 games of this method I've racked up a 0-15 record. I haven't used the cheat method to add cards, and I have Max Wolf, Max Wall, Max Treasury, and a Library. With 2303 credits lying around I could easily fill up on some other goodies. I have some power cards not in this deck (like a Mox Ruby) but this one is pretty beastly on it's own.
41 Total Cards
12 Creatures
-------------
1x Capashen Knight
1x Deft Duelist
1x Emeria Angel
1x Hunted Phantasm
1x Mother of Runes
1x Pouncing Jaguar
1x Qasali Pridemage
1x Serra Sphinx
1x Student of Warfare
1x Utopia Tree
1x Vengevine
1x Watchwolf
12 Spells
----------
1x Absorb
3x Ancestral Recall
1x Black Lotus
1x Gaea's Anthem
1x Mox Diamond
1x Rancor
1x Sensei's Divining Top
1x Time Walk
1x Unsummon
1x Wrath of God
17 Land
--------
1x Breeding Pool
1x Evolving Wilds
1x Flooded Strand
4x Forest
4x Island
4x Plains
1x Tinder Farm
1x Tolaria West
Now this definitely goes against the "spirit" of quest mode, and "the only one you are cheating is yourself", but it makes it easy to rack up lots of rares so this should probably be fixed. I'll start looking through the code, but if anyone can point me in the right direction that'd be great.
Related: We should have a button that opens up your quest stats, that will say which Bazaar items and levels you have, how much cash you have, how much your current worth is(total value), and your current record. Maybe even print out your last used deck (or let the player choose?)
After 15 games of this method I've racked up a 0-15 record. I haven't used the cheat method to add cards, and I have Max Wolf, Max Wall, Max Treasury, and a Library. With 2303 credits lying around I could easily fill up on some other goodies. I have some power cards not in this deck (like a Mox Ruby) but this one is pretty beastly on it's own.
41 Total Cards
12 Creatures
-------------
1x Capashen Knight
1x Deft Duelist
1x Emeria Angel
1x Hunted Phantasm
1x Mother of Runes
1x Pouncing Jaguar
1x Qasali Pridemage
1x Serra Sphinx
1x Student of Warfare
1x Utopia Tree
1x Vengevine
1x Watchwolf
12 Spells
----------
1x Absorb
3x Ancestral Recall
1x Black Lotus
1x Gaea's Anthem
1x Mox Diamond
1x Rancor
1x Sensei's Divining Top
1x Time Walk
1x Unsummon
1x Wrath of God
17 Land
--------
1x Breeding Pool
1x Evolving Wilds
1x Flooded Strand
4x Forest
4x Island
4x Plains
1x Tinder Farm
1x Tolaria West
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Quest Mode Funkiness
by Chris H. » 12 Jul 2010, 16:26
I noticed that some of the cards for sale in the card shop had a price of only 10 credits. I would buy these cards and then in my card table the price for these czrds would increase to 50 or even 200 credits. I made a wee bit of profit this way, buy low and sell at a higher price. 
-

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: Quest Mode Funkiness
by Rob Cashwalker » 12 Jul 2010, 17:33
With the real-world price updates, and the random 10-50% fluctuation, it is possible that you can acquire a card for up to 50% off, and sell it LATER for up to 50% over-value. But it doesn't account for an immediate jump in price in a single instance of the card shop window.
The Force will be with you, Always.
-

Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: Quest Mode Funkiness
by Chris H. » 12 Jul 2010, 17:42
I noticed this price jump before you merged your random price function. I have abused it a few times but it is not wide spread enough to make much of a difference. It is not a major bug in need of fixing.
The bug that friar i. sol has noticed appears to cause a far greater problem. I hope that it is easy to find and fix.
The bug that friar i. sol has noticed appears to cause a far greater problem. I hope that it is easy to find and fix.
-

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: Quest Mode Funkiness
by friarsol » 13 Jul 2010, 19:56
I think I found the problem. I'll test it out and submit the fix in a bit.
Game is using:
winLose.didWinRecently() even if the player quit in the middle of the match. This causes some logic errors where winning last allows you to lose the match by quitting, but still reap the benefits of winning (except in the record).
combined with:
The fix is quite short, but I'm gonna put in a few extra checks for consistency.
Game is using:
winLose.didWinRecently() even if the player quit in the middle of the match. This causes some logic errors where winning last allows you to lose the match by quitting, but still reap the benefits of winning (except in the record).
combined with:
- Code: Select all
if (quest.getWin() % 80 == 0)
{
quest.addRandomRare(10);
...
}
The fix is quite short, but I'm gonna put in a few extra checks for consistency.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Quest Mode Funkiness
by DennisBergkamp » 13 Jul 2010, 20:39
Ah yes that looks right. Just put in a check that makes sure it's not 0.
-

DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 12 guests