Repository navigation
Blockilization: a Great Engineer hurries only what's being built, Civ V style - #42
Merged
Merged
Conversation
… V style The hurry added 300 + 30 a citizen straight to the city's production with no cap, and what was over the current build's cost carried on to the next item, one finished a turn. A big city's engineer on a cheap build left hundreds of production over, so everything after it took a turn each for many builds. Now, as in Civ V, it puts in no more than the current build still needs (and fails, keeping the engineer, with nothing to hurry). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HaXWkqcsX9gsXphN4egMc1
This file contains hidden or 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
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.
Requested by Patrick · project thread
What this is
A fix. After a Great Engineer's hurry, everything a city built took one turn each, for many builds in a row.
Why: the hurry added
300 + 30 × popstraight tocity.prodwith no cap. When the current item finished, whatever was over its cost carried on to the next item, and only one item finishes a turn. A pop-10 city hurrying a Monument (26 production on quick) got 600, so about 570 was left over, enough for a long run of 1-turn builds.Fix (
rules/game.ts): as in Civ V (CvUnit::getHurryProductiontakes the min of the hurry and what's left on the current build), the engineer now puts in no more than the current build still needs. With nothing being built, or the build already paid for (a unit waiting for room), the order fails and the engineer is kept. A costly build like a wonder still gets the full amount.The Hurry production button's tooltip (
client/more.ts) now says it's as much as the build needs and no more.Test (
tests/cases.ts): "a Great Engineer hurries what's being built now and no more". A pop-10 city hurries a Monument with warriors queued after it. The Monument is paid exactly, only one turn's production carries over, and the next warrior takes more than a turn. It also checks that hurrying with nothing being built fails and keeps the engineer, and that a CN Tower gets the full 300 + 30 a citizen. Before the fix it fails withas much as the monument needs: expected 26, got 600.Screenshot or clip
None. This is a rules change.
Checklist
npm run buildpasses (type-check, the boundary check, the bundle). Passed in CI's "Build and headless tests" job.npm run test:headlesspasses. Passed in CI. The rules' behaviour tests (tests/effects.ts) also pass locally, 259 of 259.@platform/@platform/client(no new imports)Unrelated to this PR:
tests/effects-coverage.tscrashes insweep(Cannot read properties of undefined (reading 'feature')), and it does the same onmain.🤖 Generated with Claude Code
https://claude.ai/code/session_01HaXWkqcsX9gsXphN4egMc1