Skip to content

Commit

Permalink
18USA: Cannot buy pullmans from bank during buy trains phase
Browse files Browse the repository at this point in the history
  • Loading branch information
ventusignis committed Feb 23, 2022
1 parent 9015755 commit a5d7bf2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/engine/game/g_18_usa/step/buy_train.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ def should_buy_train?(entity)

def buyable_trains(entity)
buyable_trains = super
# Cannot buy pullmans from the bank/depot? # TODO: Confirm if this is true and if false, remove this line.
# https://github.com/tobymao/18xx/issues/7097
buyable_trains.reject! { |t| @game.pullman_train?(t) && t.from_depot? }
# Cannot buy a pullman if you have a pullman
buyable_trains.reject! { |t| @game.pullman_train?(t) } if entity.runnable_trains&.any? { |t| @game.pullman_train?(t) }
buyable_trains
Expand Down

0 comments on commit a5d7bf2

Please sign in to comment.