rftg icon indicating copy to clipboard operation
rftg copied to clipboard

Double use of temp military

Open galehar opened this issue 8 years ago • 1 comments

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.

galehar avatar Nov 26 '16 11:11 galehar

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.

bnordli avatar Nov 28 '16 07:11 bnordli