Krazick / 18XX-Game-Engine

18XX Game Engine
MIT License
2 stars 0 forks source link

Company with Last Revenues, with no Trains, selects PayNoDividends, should NOT hold Last Revenues again #259

Open Krazick opened 2 months ago

Krazick commented 2 months ago

A Train Company that has no trains should NEVER generate any income, and thereby paying NO Dividends should not pay any. Game actually pays to company the Previous Rounds "Last Revenues" again.

Krazick commented 2 months ago

Examination shows the 'thisRevenue' field in the trainCompany is saved with the $230 value, and when loaded with mid-Operating Company state, will not show the value, but will use it when holding dividends.

Krazick commented 2 months ago

Backing out a saved game to before the company is Prepared to Operated, then proceeding forward with the "Operate XYZ Company" will run the 'prepareCorporation' method that does reset thisRevenue to a 'NO_REVENUE_GENERATED (-1)' value, and things work properly. However, this Action does not have an Effect for setting thisRevenue field to this value, so remote clients are not instructed to reset the value.

Currently don't know how to replicate the bug.