Skip to content

Commit

Permalink
[1861/1867] Restart major corps with 70% ownership limit in 2p games
Browse files Browse the repository at this point in the history
If a major company is nationalised and then restarted it defaults to a
60% player ownership limit. This is wrong for the two-player variants,
which allow a player to own up to 70% of a company.

Fixes #11246.
  • Loading branch information
ollybh committed Nov 23, 2024
1 parent 68ad6f7 commit 94c7deb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/engine/game/g_1867/game.rb
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,14 @@ def nationalize!(corporation)
end
end

def reset_corporation(corporation)
corp = super
# When a major is restarted it defaults to a 60% ownership limit.
# This is wrong for the two-player variants.
corp.max_ownership_percent = 70 if @players.size == 2
corp
end

def place_639_token(tile)
return unless @national_reservations.any?
return if tile.cities.any? { |c| c.tokened_by?(@national) }
Expand Down

0 comments on commit 94c7deb

Please sign in to comment.