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

[1822CA, 1822MX] if a city has multiple tokens from one corp, return extra to charter #9495

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

michaeljb
Copy link
Collaborator

  • in previous 1822MX implementation, the extra token was simply destroyed instead of being returned

Fixes #9494

#9376

…extra to charter

* in previous 1822MX implementation, the extra token was simply destroyed
  instead of being returned

Fixes tobymao#9494
@michaeljb
Copy link
Collaborator Author

Possibly breaks some 1822MX games

@michaeljb michaeljb added the pins PR that will require some games to be pinned label Aug 28, 2023
@michaeljb michaeljb merged commit addf526 into tobymao:master Aug 28, 2023
@michaeljb michaeljb deleted the 1822CA-MX-tokens-fix branch August 28, 2023 04:58
michaeljb added a commit to michaeljb/18xx.games that referenced this pull request Aug 31, 2023
* GNWR and NTR destinate in specific cities on the Winnipeg hex, which can
  have as many as 4 different cities
* GT destinates in a specific city on the Montreal hex
* ICR destinates in any city that it connects to on the Quebec hex; if it is
  connected to multiple cities when placing its destination token, it gets to
  choose
    * in the DestinationToken step, ICR needs to use the `place_token` action so
      that the chosen city can be tracked without being recomputed by the engine
* `destination_exits` defines which exits are connected to the destination city
  by a track path; when checking for a destination connection, these exits are
  used to identify the destination city (or cities, in ICR's case)
* list the cardinal direction for the locations of the destination city/cities
  on the corporation card, e.g., for GNWR, "Destination: N Winnipeg (N16)"; for
  ICR "Any Montreal"
* additional updates for `update_token!`; its logic has been moved into
  `remove_extra_tokens!` in the game class so that it can also be used in the
  DestinationToken step, not just in Tracker
      * in 1822CA, it is possible for a token to be in Winnipeg but not in the
        destination city, and then after a tile upgrade joins up the cities, the
        token is in the destination city, so the normal token needs to be
        removed in that case; it is even technically possible for multiple
        tokens to need removal at this point
      * call `remove!` instead of destroying the token and creating a new one as
        in tobymao#9495; this does necessitate setting the price to 100, since exchange
        tokens have a price of 0
michaeljb added a commit to michaeljb/18xx.games that referenced this pull request Aug 31, 2023
* GNWR and NTR destinate in specific cities on the Winnipeg hex, which can
  have as many as 4 different cities
* GT destinates in a specific city on the Montreal hex
* ICR destinates in any city that it connects to on the Quebec hex; if it is
  connected to multiple cities when placing its destination token, it gets to
  choose
    * in the DestinationToken step, ICR needs to use the `place_token` action so
      that the chosen city can be tracked without being recomputed by the engine
* `destination_exits` defines which exits are connected to the destination city
  by a track path; when checking for a destination connection, these exits are
  used to identify the destination city (or cities, in ICR's case)
* list the cardinal direction for the locations of the destination city/cities
  on the corporation card, e.g., for GNWR, "Destination: N Winnipeg (N16)"; for
  ICR "Any Montreal"
* additional updates for `update_token!`; its logic has been moved into
  `remove_extra_tokens!` in the game class so that it can also be used in the
  DestinationToken step, not just in Tracker
      * in 1822CA, it is possible for a token to be in Winnipeg but not in the
        destination city, and then after a tile upgrade joins up the cities, the
        token is in the destination city, so the normal token needs to be
        removed in that case; it is even technically possible for multiple
        tokens to need removal at this point
      * call `remove!` instead of destroying the token and creating a new one as
        in tobymao#9495; this does necessitate setting the price to 100, since exchange
        tokens have a price of 0
michaeljb added a commit to michaeljb/18xx.games that referenced this pull request Aug 31, 2023
* GNWR and NTR destinate in specific cities on the Winnipeg hex, which can
  have as many as 4 different cities

* GT destinates in a specific city on the Montreal hex

* ICR destinates in any city that it connects to on the Quebec hex; if it is
  connected to multiple cities when placing its destination token, it gets to
  choose

    * in the DestinationToken step, ICR needs to use the `place_token` action so
      that the chosen city can be tracked without being recomputed by the engine

* `destination_exits` defines which exits are connected to the destination city
  by a track path; when checking for a destination connection, these exits are
  used to identify the destination city (or cities, in ICR's case)

* list the cardinal direction for the locations of the destination city/cities
  on the corporation card, e.g., for GNWR, "Destination: N Winnipeg (N16)"; for
  ICR "Any Montreal"

* additional updates for `update_token!`; its logic has been moved into
  `remove_extra_tokens!` in the game class so that it can also be used in the
  DestinationToken step, not just in Tracker

      * in 1822CA, it is possible for a token to be in Winnipeg but not in the
        destination city, and then after a tile upgrade joins up the cities, the
        token is in the destination city, so the normal token needs to be
        removed in that case; it is even technically possible for multiple
        tokens to need removal at this point

      * call `remove!` instead of destroying the token and creating a new one as
        in tobymao#9495; this does necessitate setting the price to 100, since exchange
        tokens have a price of 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pins PR that will require some games to be pinned
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[1822MX] excess tokens disappear instead of returning to Major's "Available" tokens
2 participants