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

[1868Wyoming] train cross-buy is not working #10783

Closed
Rupre opened this issue May 21, 2024 · 2 comments · Fixed by #10793
Closed

[1868Wyoming] train cross-buy is not working #10783

Rupre opened this issue May 21, 2024 · 2 comments · Fixed by #10793
Assignees
Labels
1868WY 1868 Wyoming bug Prevents game from being played correctly

Comments

@Rupre
Copy link

Rupre commented May 21, 2024

The game is not allowing FE&MV to buy a 4+3 train from LNP for $324. The message is "Not a buyable train". Why say the train is available and allow me to enter the price; then reject with a message?

https://18xx.games/game/162539?action=440

@michaeljb michaeljb self-assigned this May 21, 2024
@michaeljb michaeljb changed the title [1868Wyoming] The game is not allowing FE&MV to buy a 4+3 train from LNP for $324. The message is "Not a buyable train". Why say the train is available and allow me to enter the price; then reject with a message? Game Id 162539. [1868Wyoming] train cross-buy is not working May 21, 2024
@michaeljb
Copy link
Collaborator

From experimenting in hotseat a little more, all trains except 4+3 trains can be cross-bought from other companies. Not sure what would cause that but it’s at least a lead for when I have time to properly debug this.

@michaeljb michaeljb added bug Prevents game from being played correctly 1868WY 1868 Wyoming and removed needs triage labels May 21, 2024
michaeljb added a commit to michaeljb/18xx.games that referenced this issue May 24, 2024
@michaeljb
Copy link
Collaborator

michaeljb commented May 24, 2024

  • the base code determined that both the 4 and 4+3 variants should be available for other corporations to buy (other code made sure the UI only presented the 4+3, which is how the train was bought initially by LNP)
  • FE&MV has $325, more than the face value of a 4-train ($300) but less than the 4+3's face value ($360)
  • the 1868 Wyoming code assumes that if two variants are available, we're buying from the depot
  • when buying from the depot, we can only buy a train we can afford or the cheapest, so the 4+3 gets filtered out

The fix in #10793 is to simply return the single active variant if the train is in fact owned by a company instead of the depot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1868WY 1868 Wyoming bug Prevents game from being played correctly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants