-
Notifications
You must be signed in to change notification settings - Fork 194
[System18] Changes requested by designer #11631
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
base: master
Are you sure you want to change the base?
[System18] Changes requested by designer #11631
Conversation
@@ -15,7 +15,7 @@ module Meta | |||
GAME_LOCATION = 'Various' | |||
GAME_PUBLISHER = :all_aboard_games | |||
GAME_INFO_URL = 'https://github.com/tobymao/18xx/wiki/System18' | |||
GAME_RULES_URL = 'https://github.com/tobymao/18xx/wiki/System18' | |||
GAME_RULES_URL = 'https://www.dropbox.com/scl/fi/or38t89eczc5eki8e21y7/System18_Rules.pdf' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The link needs to include the rkley
parameter (from #10459). That lets you access the file without being signed into Dropbox.
GAME_RULES_URL = 'https://www.dropbox.com/scl/fi/or38t89eczc5eki8e21y7/System18_Rules.pdf' | |
GAME_RULES_URL = 'https://www.dropbox.com/scl/fi/or38t89eczc5eki8e21y7/System18_Rules.pdf?rlkey=n9kblkl7kvnz96oobs6hsatk2&dl=0' |
@@ -14,7 +14,7 @@ def actions(entity) | |||
end | |||
|
|||
def setup | |||
@emr_issue = false | |||
@emergency_issued = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're referencing both @emergency_issued
and @round.emergency_issued
in this file. These will be two different variables.
# Sort bundles by price in ascending order | ||
issuable_bundles.sort_by!(&:price) | ||
|
||
# Find the smallest bundle that raises enough cash to buy the train | ||
issuable_bundles.each do |bundle| | ||
total_cash = bundle.price + entity.cash | ||
return [bundle] if total_cash >= min_train_price | ||
end | ||
|
||
# If no single bundle is enough, return the largest bundle | ||
[issuable_bundles.last] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issuable_bundles
could contain share bundles for more than one corporation. I guess this is for an 1841-style game where corporations can own shares of other corporations, and these could be issued in emergency money raising.
This is going to return a single bundle for one corporation. It should return a single bundle for each corporation. So this bit needs to be moved into the @corporations.flat_map
block.
I don't know if any currently implemented rules for System18 allow corporations to own other corporations' shares, but this has been written to allow this, so should be preserved.
Fixes #10456
Fixes #10459
Before clicking "Create"
master
pins
orarchive_alpha_games
label if this change will break existing gamesdocker compose exec rack rubocop -a
docker compose exec rack rake
Implementation Notes
Explanation of Change
Requested changes from designer:
I made these changes. Additionally, I noted that there were two separate variables tracking if shared had been emergency issued: @emergency_issued and @emr_issue. I consolidated these together as @emergency_issued, as they didn't appear to be tracking different information.
I also removed this code below, since @emergency_issued is already being reset in the
def setup
method of that same step.18xx/lib/engine/game/g_system18/step/buy_train.rb
Lines 37 to 40 in 29e21ad
Screenshots
Any Assumptions / Hacks