leemi / androminion

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

Envoy/Advisor doesn't take current player turn into account when discarding #661

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Scenario A)

Envoy and Advisor will typically pick the highest costing card after a few 
specific checks, however, one thing that should be considered is whether or not 
the player has any actions remaining.

What steps will reproduce the problem?
1. Set up your deck so you have at least 10 cards, including Envoy and another 
Action card (in this example, I used Chapel. Turn 1 & 2, acquire Chapel and 
Envoy. Turn 3, trash 2 estates with Chapel. Turn 4, Envoy is in hand, and there 
are exactly 5 cards in my deck)
2. Play Envoy. I now have zero actions remaining
3. AI chooses to discard Chapel.

In this case, the Chapel would be a dead weight because I have no actions 
remaining with which to play it. The smarter play would be to discard a 
treasure, as even though it's a copper, it's still useful, as opposed to the 
action card.

Scenario B) 

A slight tweak recommended while analysing the above, Chapel and other cards 
that trash 2+ cards should probably be added to the list of cards to look for 
when choosing cards to discard, assuming there are still actions remaining. 
Ideally, this could be considered if the rest of the cards revealed are in the 
trash list; don't give a player an opportunity to trash a lot of junk.

Scenario A seems more straightforward, while Scenario B is a bit more 
subjective, and I welcome thoughts on it. I'm also starting to toy around with 
android development, (I've been learning some by looking at Androminion's code 
base) so I'd be happy to take a stab at a fix for this.

Original issue reported on code.google.com by PieBan...@gmail.com on 29 Sep 2014 at 1:28

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

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

GoogleCodeExporter commented 9 years ago
How was this fixed? I don't see the changes in the change log

Original comment by PieBan...@gmail.com on 15 Mar 2015 at 12:08