Skip to content

Commit

Permalink
Merge pull request tobymao#9214 from roseundy/rs_ipo_bug2
Browse files Browse the repository at this point in the history
Rolling Stock: one more ipo fix
  • Loading branch information
tobymao authored May 29, 2023
2 parents 85d2cdc + ee562c1 commit 20fe877
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/engine/game/g_rolling_stock/step/ipo_company.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,12 @@ def process_par(action)
buy_and_issue(player, company, share_price, corporation, 1)
elsif share_price.price * 2 >= company.value
buy_and_issue(player, company, share_price, corporation, 2)
else
elsif share_price.price * 3 >= company.value
# we should only get here in RS not RSS
buy_and_issue(player, company, share_price, corporation, 3)
else
# we should only get here in RS not RSS
buy_and_issue(player, company, share_price, corporation, 4)
end

corporation.companies << company
Expand Down Expand Up @@ -89,8 +92,10 @@ def cost_to_ipo(par_price, company)
par_price - company.value
elsif par_price * 2 >= company.value
(par_price * 2) - company.value
else
elsif par_price * 3 >= company.value
(par_price * 3) - company.value
else
(par_price * 4) - company.value
end
end

Expand Down

0 comments on commit 20fe877

Please sign in to comment.