Player ship upgrade/downgrade path scenario utility #2035
Closed
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.
This concept was introduced with scenario 44, Doomed Outpost. In that scenario, the player ship starts at the bottom of the upgrade path. Upgrades can be obtained at various stations. The upgrades gradually get more expensive as more powerful upgrades are procured. This utility puts all the various upgrade path details in tables. There is an upgrade path for each player ship model available. There are even upgrade paths for player ships specific to the Doomed Outpost scenario.
This concept was refined in scenario 40, Shop Til You Drop. The player ship starts at the lower end, but not at the very bottom. Upgrade and downgrade is possible. The player selects the method of upgrade. The most expensive just does the upgrade. The next most expensive does the upgrade at the cost of downgrading a different system, specified in advance. The cheapest upgrade is done by a pit droid. It has a random chance of downgrading another randomly selected system.
The utility also includes a mechanism for updating the science database with the player ship upgrade path information.
Rather than replicate this upgrade/downgrade path information in each scenario where I want to use it, I'm placing it in this utility. This reduces the number of lines of code in a scenario that might include this functionality.