Skip to content

Commit

Permalink
[18RoyalGorge] don't skip player if they can buy shares via private d…
Browse files Browse the repository at this point in the history
…iscount

Fixes #11363
  • Loading branch information
michaeljb committed Dec 1, 2024
1 parent e09c60d commit 3ce529c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lib/engine/game/g_18_royal_gorge/step/buy_sell_par_shares.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,20 @@ def can_sell?(entity, bundle)

super
end

def can_buy_any?(entity)
super || can_buy_company_discounted_bundles?(entity)
end

def can_buy_company_discounted_bundles?(entity)
return false if bought?

cash = available_cash(entity)
bundles = company_discounted_bundles(@game.gold_corp) + company_discounted_bundles(@game.steel_corp)
bundles.any? do |_, bundle|
cash >= modify_purchase_price(bundle)
end
end
end
end
end
Expand Down

0 comments on commit 3ce529c

Please sign in to comment.