Skip to content

Commit

Permalink
[1822CA] only give Sawmill bonus to E-trains with tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljb committed Dec 1, 2024
1 parent e09c60d commit 9456f75
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/engine/game/g_1822_ca/game.rb
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,8 @@ def calculate_sawmill_bonus(route)
return unless (sawmill_stop = route.visited_stops.find { |s| s.hex == @sawmill_hex })

entity = route.train.owner
return if train_type(route.train) == :etrain && !sawmill_stop.tokened_by?(entity)

sawmill_dest = sawmill_stop.city? &&
sawmill_stop.tokens.find { |t| t && t.type == :destination && t.corporation == entity } &&
(dest = destination_bonus(route.routes)) &&
Expand Down

0 comments on commit 9456f75

Please sign in to comment.