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

Bureaucracy phase: powering hybrid plants with non-stored resources #42

Open
doug-cady opened this issue May 31, 2022 · 1 comment
Open

Comments

@doug-cady
Copy link
Contributor

Plants must fire using their own stored resources

Today in a game I had an issue come up with powering a hybrid power plant (plant 29) with 1 oil while storing its max 2 coal:

  • plant 29 has 2 hybrid cap (2 oil or 2 coal, or 1 of each), uses 1 oil/coal ~ 4 cities
  • plant 35 has 2 oil cap, 1 oil ~ 5 cities
  • Resources stored: 2 coal, 1 oil (after powering plant 35)

TLDR; Since plant 29 is at max capacity with 2 coal stored and is the only plant that can store/burn coal, I shouldn't be allowed to burn the oil on it. I should be forced to burn the coal.

Rules Check

The Power Grid rules agrees this is the case (from https://boardgamegeek.com/wiki/page/Power_Grid_FAQ#toc45):

Plants must fire using their own stored resources

A plant may only fire using resources that are stored directly on its card. Note that before firing plants, resources may be shuffled around among plants so long as resource types and limits are observed, but after the reshuffling is done, plants must be fired using their own resources. Therefore, a hybrid plant storing its maximum capacity in oil cannot be fired using coal stored by another power plant. Furthermore, resources cannot be voluntarily discarded to make this possible. This ruling was made by Friedemann Friese himself. May a plant burn resources stored on another plant (Answer: No)

Screenshots

Here is before I burn the 1 oil on plant 29:
pg_hybrid_issue_1

Here is after I burn the oil:
pg_hybrid_issue_2

What to Modify in Code

My guess for what would be need to be modified is the if statement starting on line 1809 in engine.ts in the is_valid function where it only checks if a particular plant can burn coal/oil and has at least 1 available to burn.

if (hybridUsed > player.coalLeft - coalUsed + player.oilLeft - oilUsed) { return false; }

Thank you for making a great game. This issue isn't really game breaking, but imo is a bug nonetheless.

@LucasAMello
Copy link
Collaborator

Thanks for catching this. Unfortunately this is hard to solve with how the code is. There's no indicator of where the resources are stored, no command to move them around. I could solve the example you had, but for more complex examples it would be way harder (imagine if instead of the garbage plant you had another fully stocked coal plant, or even worse, another hybrid plant).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants