Skip to content

Commit

Permalink
Merge pull request #11420 from tobymao/1837-block-bosnia-herzegovina
Browse files Browse the repository at this point in the history
[1837] Bosnia-Herzegovina hexes blocked until phase 3
  • Loading branch information
crericha authored Dec 27, 2024
2 parents a236c28 + 6d1c750 commit e447a08
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
9 changes: 9 additions & 0 deletions lib/engine/game/g_1837/entities.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ module Game
module G1837
module Entities
COMPANIES = [
{
name: 'Block Bosnia-Herzegovina hexes',
sym: '3',
value: 0,
meta: { hidden: true },
abilities: [
{ type: 'blocks_hexes', remove: '3', hexes: %w[L16 L18 L20 M17 M19 M21 N18 N20] },
],
},
{
name: 'Pilsen-Priesen Railway',
sym: 'EPP',
Expand Down
4 changes: 3 additions & 1 deletion lib/engine/game/g_1837/game.rb
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,9 @@ def initial_auction_companies
end

def setup
non_purchasable = @companies.flat_map { |c| c.meta['additional_companies'] }.compact
non_purchasable = @companies.flat_map do |c|
Array(c.meta['additional_companies']) + [c.meta['hidden'] ? c.id : nil]
end.compact
@companies.each { |company| company.owner = @bank unless non_purchasable.include?(company.id) }
setup_mines
setup_minors
Expand Down

0 comments on commit e447a08

Please sign in to comment.