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

[site] Discard Trains step to display page description instead of default 'Discard Trains' #11322

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

philcampeau
Copy link
Collaborator

Fixes #9128

Before clicking "Create"

  • Branch is derived from the latest master
  • Add the pins or archive_alpha_games label if this change will break existing games
  • Code passes linter with docker compose exec rack rubocop -a
  • Tests pass cleanly with docker compose exec rack rake

Implementation Notes

Explanation of Change

This change, initially done for 18NY, will now allow all games to define what their Discard Trains step should display when prompting the discard of excess trains.

I also updated the description in lib/engine/step/discard_train.rb from 'Discard Train' to 'Discard Trains', since that's what was being displayed anyway.

Screenshots

Any Assumptions / Hacks

I know a previous fix (#9136) broke some things on the site. From the tests I've run on my end, these changes seem to work, but I'm happy to hear it if I'm wrong!

@philcampeau philcampeau requested a review from crericha as a code owner November 5, 2024 21:27
@philcampeau philcampeau changed the title [site] Discard Trains step to display Description instead of default 'Discard Trains' [site] Discard Trains step to display page description instead of default 'Discard Trains' Nov 5, 2024
@@ -10,6 +10,10 @@ class DiscardTrain < Engine::Step::DiscardTrain
def process_discard_train(action)
@game.salvage_train(action.train)
end

def description
'Salvage Excess Trains'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rulebook explicitly uses discard here.

Whenever trains are salvaged or discarded, the owning company receives the salvage value
If a phase change includes a reduction in the Train Limit [3], all companies, including the one
operating, must immediately discard any trains in excess of the Train Limit to the Bank Pool 
for salvage value.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does, but is that the optimum phrasing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the site doesn't add the text "for salvage value", I feel this is an improvement.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Salvage, as a verb, means to save something from destruction. So salvaging a train would be rescuing one from the scrap yard and putting it back into use, the opposite of what is happening here.

@philcampeau
Copy link
Collaborator Author

Throughout the rules of 18NY, and everywhere else in this game, salvaging is used to mean removing a train from a corp and receiving compensation.

@scottredracecar
Copy link
Collaborator

scottredracecar commented Dec 20, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[18NY] Change Text for Forced Salvage of Trains Over Limit on Phase Change
4 participants