Skip to content

Commit

Permalink
adjusts revenue_for method
Browse files Browse the repository at this point in the history
  • Loading branch information
philcampeau committed Aug 24, 2024
1 parent 18cfac8 commit 71ef9af
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/engine/game/g_steam_over_holland/game.rb
Original file line number Diff line number Diff line change
Expand Up @@ -369,10 +369,8 @@ def check_distance(route, visits, train = nil)
def revenue_for(route, stops)
revenue = super

route.corporation.companies.each do |company|
abilities(company, :hex_bonus) do |ability|
revenue += stops.sum { |s| ability.hexes.include?(s.hex.id) ? ability.amount : 0 }
end
abilities(route.corporation, :hex_bonus) do |ability|
revenue += ability.amount * stops.count { |s| ability.hexes.include?(s.hex.id) }
end

revenue
Expand Down

0 comments on commit 71ef9af

Please sign in to comment.