yeti_c wrote:cicero wrote:A bug in 3.5.1. Was also present in 3.4.5.
Check this game
http://www.conquerclub.com/game.php?game=1524353Choose standard stats table and check deferred armies for arbz ... it shows 4.
However arbz has not just missed a turn.
Cicero
OK - I'll look into fixing that Thursday!
C.
Code: Select all
if (log[i].has("deferred"))
playersArray[name]._deferred = armies;
else
playersArray[name]._lastBonus = playersArray[name]._lastBonus + armies;
In your processing of the log, if you see deferred armies, you are storing them. But if deferred armies are seen in the log, he is no longer deferring armies, and it should be setting it to 0. Deferred armies should only be calculated at the end of the log, if the player currently has a skipped value other than 0. Then when you get to displaying stats:
Code: Select all
if (playersArray[name]._skipped==0)
statsStr2+= makeTableCellTextWrap(isEliminated, curpid, playersArray[name]._deferred );
You are displaying the deferred value. In the case linked, the player previously missed a turn. When a deferred cash in is seen, its stored, but since the player has played a turn, skipped was set back 0 but deferred is never cleared.
As I previously mentioned, I think the deferred variable can be dropped altogether. If there are no skipped turns, deferred is 0 and if there are skipped turns, deferred is the current bonus waiting for them times the number of skipped turns.