From 3dc8fbfd6d09073a1084d1f37f52ab2c8d52aba6 Mon Sep 17 00:00:00 2001 From: Chris Rericha Date: Sun, 2 Feb 2025 01:48:47 -0500 Subject: [PATCH 1/3] [1837] Fix hidden company meta check --- lib/engine/game/g_1837/game.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/engine/game/g_1837/game.rb b/lib/engine/game/g_1837/game.rb index 518a474eea..753e9319d9 100644 --- a/lib/engine/game/g_1837/game.rb +++ b/lib/engine/game/g_1837/game.rb @@ -287,7 +287,7 @@ def initial_auction_companies def setup non_purchasable = @companies.flat_map do |c| - [abilities(c, :acquire_company, time: 'any')&.company, c.meta['hidden'] ? c.id : nil] + [abilities(c, :acquire_company, time: 'any')&.company, c.meta[:hidden] ? c.id : nil] end.compact @companies.each { |company| company.owner = @bank unless non_purchasable.include?(company.id) } setup_mines From 4dfe375b92950b210c5a83e9d828cea700befe42 Mon Sep 17 00:00:00 2001 From: Chris Rericha Date: Sun, 2 Feb 2025 01:57:27 -0500 Subject: [PATCH 2/3] [Core] Skip logging par if there is no par price --- lib/engine/share_pool.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/engine/share_pool.rb b/lib/engine/share_pool.rb index 9cda7491d9..943829b718 100644 --- a/lib/engine/share_pool.rb +++ b/lib/engine/share_pool.rb @@ -48,7 +48,7 @@ def buy_shares(entity, shares, exchange: nil, exchange_price: nil, swap: nil, price = bundle.price par_price = corporation.par_price&.price - if ipoed != corporation.ipoed && !silent + if ipoed != corporation.ipoed && par_price && !silent @log << "#{entity.name} #{@game.ipo_verb(corporation)} #{corporation.name} at "\ "#{@game.format_currency(par_price)}" end From 46fbb46b77332c45587a689cde41b499cb41cb61 Mon Sep 17 00:00:00 2001 From: Chris Rericha Date: Sun, 2 Feb 2025 02:10:00 -0500 Subject: [PATCH 3/3] [1837] Fix placing minor home tokens in the stock round --- lib/engine/game/g_1837/game.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/engine/game/g_1837/game.rb b/lib/engine/game/g_1837/game.rb index 753e9319d9..38851aa72f 100644 --- a/lib/engine/game/g_1837/game.rb +++ b/lib/engine/game/g_1837/game.rb @@ -597,6 +597,7 @@ def new_auction_round def stock_round Engine::Round::Stock.new(self, [ + G1837::Step::HomeToken, G1837::Step::DiscardTrain, G1837::Step::BuySellParShares, ]) @@ -666,7 +667,7 @@ def float_minor!(minor) cash = minor_initial_cash(minor) @bank.spend(cash, minor) @log << "#{minor.name} receives #{format_currency(cash)}" - if !@round.is_a?(Engine::Round::Auction) && minor.name == 'SD5' + if !@round.is_a?(Engine::Round::Auction) && minor.id == 'SD5' coordinates = minor.coordinates minor.coordinates = coordinates.shift remove_reservations!(minor, coordinates)