-
Notifications
You must be signed in to change notification settings - Fork 190
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
Conversation
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
…extra to charter * in previous 1822MX implementation, the extra token was simply destroyed instead of being returned Fixes tobymao#9494
Possibly breaks some 1822MX games |
tobymao
approved these changes
Aug 28, 2023
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #9494
#9376