Skip to content

[18PA] pre-alpha updates (tiles, tokens, bonus markers) #11718

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

philcampeau
Copy link
Collaborator

Before clicking "Create"

  • Branch is derived from the latest master
  • Code passes linter with docker compose exec rack rubocop -a
  • Tests pass cleanly with docker compose exec rack rake

Implementation Notes

Explanation of Change

Implemented some basic additions to the code. Tiles, token logos, the Scranton bonus (borrowed from the VA Coalfields code in 1828, but modified to not restrict access to the hex).

Corrected float percentages. EBUY_DEPOT_TRAIN_MUST_BE_CHEAPEST,

Also implemented the dividend structure for the minors (pays half to owner, other half stays in the bank)

Still very much prealpha.

Screenshots

Any Assumptions / Hacks

@ollybh ollybh added the new games Issues relating to games that are not yet alpha test level label May 8, 2025
return super if entity.corporation? && entity.type != :minor

amount = revenue / 2
{ corporation: 0, per_share: amount }
Copy link
Collaborator

Choose a reason for hiding this comment

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

Doesn't half the money go to the minor?

Suggested change
{ corporation: 0, per_share: amount }
{ corporation: amount, per_share: amount }

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No. Minors have no Treasury in 18PA:

Screenshot_20250508_192950_Chrome

end

def share_price_change(entity, revenue = 0)
return {} if entity.minor?
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are there Minors in this game? As in, Minor objects, not corporations of type minor.

module G18PA
module Step
class Track < Engine::Step::Base
include Engine::Game::G18PA::Tracker
Copy link
Collaborator

Choose a reason for hiding this comment

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

You could override potential_tile_colors in this file, instead of having a separate Tracker file.

Comment on lines +184 to +185
tile = hex_by_id(corporation.coordinates)&.tile
tile.cities[corporation.city || 0].place_token(corporation, corporation.tokens.first, free: true) unless tile.nil?
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could tile be nil? Isn't the game going to break if any corporation's home token can't be placed at this point?

@@ -145,23 +143,86 @@ class Game < Game::Base
},
].freeze

SCRANTON_HEX = 'G12'
SCRANTON_MARKER_ICON = 'coal'
Copy link
Collaborator

Choose a reason for hiding this comment

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

The map changes below have mine, not coal icons.

Suggested change
SCRANTON_MARKER_ICON = 'coal'
SCRANTON_MARKER_ICON = 'mine'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
18PA new games Issues relating to games that are not yet alpha test level
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants