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

[1849] modified purchase price for double share is wrong #10870

Closed
michaeljb opened this issue Jun 4, 2024 · 1 comment · Fixed by #10874
Closed

[1849] modified purchase price for double share is wrong #10870

michaeljb opened this issue Jun 4, 2024 · 1 comment · Fixed by #10874
Assignees
Labels
1849 bug Prevents game from being played correctly

Comments

@michaeljb
Copy link
Collaborator

michaeljb commented Jun 4, 2024

I think this is caused by #10840, seems modify_purchase_price affected more games than I found at first.

RCS’s double share is shown as 4x the share price instead of 2x https://18xx.games/game/162396

this must only break the UI since no 1849 games failed engine validation

https://gist.github.com/michaeljb/b283a005483bb44f9c18afee3859b3af

@michaeljb michaeljb added bug Prevents game from being played correctly 1849 labels Jun 4, 2024
@michaeljb michaeljb self-assigned this Jun 4, 2024
@michaeljb
Copy link
Collaborator Author

modify purchase price changes the bundle price, and the view logic using it needs to better distinguish between number of certs and number of shares in the bundle. RoyalGorge’s B6 is unique in that it allows purchasing multiple certs. Need to see if the “share_price” arg in the action there is actually per share price or per cert price

michaeljb added a commit to michaeljb/18xx.games that referenced this issue Jun 4, 2024
`modify_purchase_price` modifies the price of the bundle, but it was being
passed as an arg that modifies the price of each share in the bundle; some
variables have been renamed, the per-share price is computed, and the correct
value is now passed into `buy_shares`

Fixes tobymao#10870
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1849 bug Prevents game from being played correctly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant