Skip to content

[1862 USA & Canada] PR 04: SR mechanics — GHU discount, NYH par lock, private close triggers#12736

Open
neutronc wants to merge 3 commits into
tobymao:masterfrom
neutronc:1862_usa_canada_pB_sr_mechanics_v2
Open

[1862 USA & Canada] PR 04: SR mechanics — GHU discount, NYH par lock, private close triggers#12736
neutronc wants to merge 3 commits into
tobymao:masterfrom
neutronc:1862_usa_canada_pB_sr_mechanics_v2

Conversation

@neutronc

@neutronc neutronc commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Fixes #12623

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

Two SR/OR mechanic features for 1862 USA & Canada:

GHU token discount + NYH par price lock

  • Great Horseshoe Unlocked (GHU) private ability: owning corporation pays $20 less per token placement (min $0). Implemented in Step::Token override.
  • NYH corporation must par at exactly $100 (the fixed price on its director share). Step::BuySellParShares blocks other par prices for NYH.

Private company close triggers

  • No train-purchase close event in 1862 — privates close on named triggers only.
  • SOC closes when both CPR and UP have connected to Salt Lake City (Golden Spike).
  • NHSC closes when NYH floats.
  • PSC closes when WP pays its first dividend.
  • FNY closes when NYC pays its first dividend.
  • TOR closes automatically after the Toronto gray tile is placed (handled via closed_when_used_up on its tile-lay ability).
  • Step::Dividend override handles first-payout detection for PSC/FNY.

Screenshots

N/A — no tile or map changes.

Any Assumptions / Hacks

None.

neutronc and others added 2 commits June 5, 2026 21:44
…$100

GHU (Bahnhoflizenz): fix owner_type corporation→player; custom Token
step auto-applies the $80 discount (min $0) when the operating corp's
director owns GHU.

NHSC/NYH: custom BuySellParShares step restricts NYH par prices to
exactly $100. NHSC gives the buyer NYH's director cert; the par price
is locked by rule regardless of market availability.

Both step files wired into stock_round and operating_round.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
SOC closes when CPR or UP floats; NHSC closes when NYH floats.
PSC closes on WP's first dividend; FNY closes on NYC's first dividend.
TOR auto-closes via closed_when_used_up on its tile_lay ability.

Custom Step::Dividend detects first payout via operating_history and
calls game.on_first_payout! to fire the trigger.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ollybh ollybh added new games Issues relating to games that are not yet alpha test level 1862UsaCanada labels Jun 6, 2026
Comment thread lib/engine/game/g_1862_usa_canada/step/buy_sell_par_shares.rb Outdated
…or nyh_par_prices

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@neutronc neutronc requested a review from ollybh June 9, 2026 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1862UsaCanada new games Issues relating to games that are not yet alpha test level

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[1862 USA & Canada 2015 Version] Implementation tracking

2 participants