-
Notifications
You must be signed in to change notification settings - Fork 189
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
[1856] eliminates the use of 2', 3', etc trains. #11374
Conversation
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.
This looks reasonable. A couple of things to think about:
- Would it be better to add events like
3_train_available
on the last 2-train and changing the float percentage from those events, instead of overriding thebuy_train_action
method? - Would it be clearer to remove the
facing_X
statuses and put this information in the game timeline?
I would say that this definitely needs a migration script before it is deployed, this is going to affect 300+ games. It should be fairly simple to do, it just needs to change some train names in the actions. I can help with this.
lib/engine/game/g_1836_jr56/game.rb
Outdated
@@ -15,7 +15,7 @@ class Game < G1856::Game | |||
include Entities | |||
include Map | |||
|
|||
CURRENCY_FORMAT_STR = '%s F' | |||
CURRENCY_FORMAT_STR = '%s F' |
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.
What is changed here? Pasting the strings into a unicode inspector doesn't show a change, but the Github web UI might have mangled something.
lib/engine/game/g_1856/game.rb
Outdated
@@ -357,9 +310,9 @@ def game_trains | |||
' Presidents may contribute personal cash but may not sell shares.' \ | |||
' CGR does not form if all corporations pay back their loans'], | |||
'remove_tokens' => ['Remove Port Token'], | |||
'no_more_escrow_corps' => ['New Corporations are Incremental Cap', | |||
'no_more_escrow_corps' => ['New Corporations are Incremental Cap ', |
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.
A trailing space has been added the the string here. I don't think that should be there.
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.
weird. Not sure how those happened. I'll fix that right now.
lib/engine/game/g_1856/game.rb
Outdated
'Does not affect corporations which have already been parred'], | ||
'no_more_incremental_corps' => ['New Corporations are Full Cap', | ||
'no_more_incremental_corps' => ['New Corporations are Full Cap ', |
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.
Another trailing space added.
There are still more changes to do, after some testing. Will close for now. |
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
Currently, 1856 (and its cousin 1836Jr56) use a prime symbol to identify the last train of each rank, effectively creating several new ranks of trains. The reason is that 1856 has a floating mechanism based on the currently available train, rather than the current phase.
There's a better way of doing this, which I've implemented here, where the event is triggered by specific trains in the rank.
The only downside to this update is it will require pinning all current games of 1856. I tried for quite a while to get a script working that would replace all the relevant trains in every active game, but I couldn't get it to work. If someone wants to give me a hand with that, I could add that to this pull request and then eliminate the need for pinning.
Screenshots
Any Assumptions / Hacks