Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1871] Prevents sale of more than 30% during EMR #11321

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions lib/engine/game/g_1871/step/buy_train.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,8 @@ def can_sell?(entity, bundle)
return false unless sellable_bundle?(bundle)
return false if @game.class::MUST_SELL_IN_BLOCKS && @corporations_sold.include?(bundle.corporation)

# This is our new clause for 1871, if this is the corporation
# selling, we can sell all of them
return true if bundle.corporation == bundle.owner
Comment on lines -62 to -64
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does removing this test change anything? Are there any bundles of treasury shares that would be rejected by the selling_miniumum_shares? test which should be issuable?

# Corporations can sell all of their treasury shares during EMR, players may not sell more than 30% of a corporation
return false if bundle.corporation != bundle.owner && (bundle.percent > @game.class::TURN_SELL_LIMIT)

selling_minimum_shares?(bundle)
end
Expand Down
Loading