-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11341 from ollybh/18ardennes-issue-shares
[18Ardennes] Allow public companies to issue shares
- Loading branch information
Showing
3 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative '../../../step/issue_shares' | ||
|
||
module Engine | ||
module Game | ||
module G18Ardennes | ||
module Step | ||
class IssueShares < Engine::Step::IssueShares | ||
def description | ||
'Issue Shares' | ||
end | ||
|
||
def pass_description | ||
'Skip (Issue Shares)' | ||
end | ||
|
||
def log_skip(entity) | ||
super unless entity.type == :minor | ||
end | ||
|
||
def process_sell_shares(action) | ||
super | ||
|
||
corporation = action.entity | ||
bundle = action.bundle | ||
old_price = corporation.share_price | ||
bundle.num_shares.times { @game.stock_market.move_left(corporation) } | ||
@game.log_share_price(corporation, old_price) | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |