Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double use of temp military #32

Open
galehar opened this issue Nov 26, 2016 · 1 comment
Open

Double use of temp military #32

galehar opened this issue Nov 26, 2016 · 1 comment

Comments

@galehar
Copy link

galehar commented Nov 26, 2016

In this game, the AI has already used its temporary military bonus from Rebel Convict Mines, and it is using it a second time in the same phase to gain another +1 military and defend against my takeover attempt. It doesn't have any other source of temporary military.
I already reported it on the BGG forum.

@bnordli
Copy link
Owner

bnordli commented Nov 28, 2016

Thanks for the report!

There are some quirks around "not fully spent temp-mil powers" that is not handled correctly. In engine.c#4873, starting with

/* Check for using military from hand */
if (hand_military > 0)

it looks like hand_military_spent should be set to the number of cards given in temp_mil, but it is actually set to 0, because of hand_military_given -= o_ptr->value; above. Because of this, the power is marked unused again in defend_takeover, with this line:

c_ptr->misc &= ~(1 << (MISC_USED_SHIFT + i));

so it is yet again available while defending.

The logic regarding temporary military must be investigated more and perhaps rewritten.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants