novendraap / androminion

Automatically exported from code.google.com/p/androminion
0 stars 0 forks source link

Graverobber topdecks cards gained by trashing an Action #610

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Play a Graverobber.
2. Choose to trash an action card.
3. Gain a card that is not currently in your deck, and have 5 or more cards in 
your deck remaining.

What is the expected output? What do you see instead?
The card you gained should go in your discard, but instead it is in your next 
hand, at the top.

What version of the product are you using? On what operating system?
Latest, Android 4.2.2 on Samsung S4.

Original issue reported on code.google.com by wesc...@gmail.com on 1 Nov 2013 at 5:19

GoogleCodeExporter commented 9 years ago
I haven't seen this problem myself, but I think I also saw in the code recently 
where this takes place, and it should also be easy to fix.  I'll look into it.

Original comment by drai...@gmail.com on 1 Nov 2013 at 5:28

GoogleCodeExporter commented 9 years ago
Ok, I've looked at this, and I see where the problem is.  In the block on line 
2043 of Game.java, any card gained by graverobber is placed on top of the deck. 
 That should have a separate case for graverobber, because in only one of the 
two "gain by graverobber" options is the card topdecked.  This would require 
adding some state to the context to determine which action was taken by 
graverobber.  It shouldn't be too hard, but I'm pretty busy with fixing bugs in 
the multiplayer code, so someone else can handle it.

Original comment by drai...@gmail.com on 2 Nov 2013 at 1:19

GoogleCodeExporter commented 9 years ago
Fixed in r916 (multiplayer).

Original comment by andromin...@gmail.com on 15 Mar 2015 at 11:01