* Add an alternate power plant deck option for Europe and North America New game option `alternatePowerPlants`. On the Europe and North America maps it replaces the standard deck with the alternate deck: same card numbers, new fuels and outputs. The option is ignored on every other map. The deck adds a garbage/oil hybrid plant type (plants 8, 22 and 35). It burns any mix of garbage and oil and has one shared storage tank, like the coal/oil hybrid. Buying, storage, discarding, powering and end-game scoring all handle the shared tank. Players without that plant keep the existing coal/oil logic unchanged, and games without the option keep their exact state shape. * Draw alternate-deck plants in the journal from the alternate deck The journal drew every plant through getPowerPlant(number, mapName), which only knew the India and standard catalogues. In an alternate-deck game the journal showed the standard card for each number: 22 appeared as a wind 2, 27 as a wind 3 and 33 as a wind 4. getPowerPlant now looks plants up through plantCatalogue, so it takes an alternatePowerPlants flag. The journal passes the game's option through. Every other caller passes no flag and gets the same card as before. Found in a hand playtest of this PR on Europe. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: John Gold <goldjohn6@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| .vscode | ||
| src | ||
| .eslintignore | ||
| .eslintrc.js | ||
| .gitignore | ||
| .pnpm-debug.log | ||
| .travis.yml | ||
| index.ts | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| pnpm-lock.yaml | ||
| README.md | ||
| tsconfig.json | ||
| wrapper.ts | ||
powergrid-engine
Typescript engine for Power Grid.
Setup
Requirements
Recent version of node / pnpm.
Dependencies
In the project's folder:
pnpm
Build
To compile Typescript into javascript:
pnpm build
Test
pnpm test