tobymao / 18xx

A platform for playing 18xx games online!
https://18xx.games
Other
298 stars 185 forks source link

[1840] Cannot pay for track cost as bonus action tobymao#11315 #11336

Closed timpelican closed 1 week ago

timpelican commented 1 week ago

Fixes #11315

Before clicking "Create"

Implementation Notes

Explanation of Change

As per notes from @DestrinStorm in issue discussion, the call to lay_tile() from special_track.rb doesn't pass a spender. This means it defaults to trying to spend the money from the tram line, which never has any money to spend, and so will always fail.

The owning major corporation should always pay the cost of a bonus track lay when there is one, the same as it does for any other actions taken by the tram line, e.g. removing / placing tokens.

Fix allows the owning major corp to correctly pay the costs for the bonus yellow tile lay in a hotseat clone of both games flagged in the issue.

Screenshots

Any Assumptions / Hacks