Skip to content

Commit

Permalink
Merge pull request #11389 from michaeljb/18RoyalGorge-metals-investor
Browse files Browse the repository at this point in the history
[18RoyalGorge] don't skip player if they can buy shares via private discount
  • Loading branch information
ollybh authored Dec 15, 2024
2 parents 981f176 + 3ce529c commit 0059153
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 0059153

Please sign in to comment.