Skip to content

Commit

Permalink
1847AE - fix Nationalization bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Galatolol committed Dec 14, 2023
1 parent a048eed commit 5355247
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/engine/game/g_1847_ae/step/buy_sell_par_shares.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ def can_buy?(entity, bundle)
if bundle.owner.player?
return false unless can_nationalize?(entity, bundle.corporation)

return entity.cash >= nationalization_price(bundle.price)
return entity.cash >= nationalization_price(bundle.price) &&
!@round.players_sold[entity][bundle.corporation] &&
can_gain?(entity, bundle)
end

return false unless super
Expand Down

0 comments on commit 5355247

Please sign in to comment.