Skip to content

Commit

Permalink
[18Uruguay] changed can_buy? to can_gain? and renamed function
Browse files Browse the repository at this point in the history
  • Loading branch information
patrikolesen committed Sep 27, 2024
1 parent f22b30d commit 721fc9c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/engine/game/g_18_uruguay/step/buy_sell_par_shares.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ module Game
module G18Uruguay
module Step
class BuySellParShares < Engine::Step::BuySellParShares
def can_buy?(entity, bundle)
def can_gain?(entity, bundle, exchange: false)
return false if bundle&.corporation == @game.rptla && !@game.phase.status.include?('rptla_available')
return true if loan_limit(entity, bundle)
return true if excess_loans?(entity, bundle)

super(entity, bundle)
super
end

def loan_limit(_entity, bundle)
def excess_loans?(_entity, bundle)
return false if bundle.nil?
return false if bundle.owner.corporation?

Expand Down

0 comments on commit 721fc9c

Please sign in to comment.