Repository navigation
Blockilization: an aircraft pointed at an enemy out of range says so - #46
Merged
Merged
Conversation
A Bomber (any aircraft) clicked onto an enemy it couldn't strike, further off
than its range or out of sight, was sent to rebase there instead, and the
refusal read "Only to one of your cities (six aircraft) or Carriers (three)
with room". The tile's card said the same, and the unit card's line said
"Out of range (10): move to fire", though an aircraft can't move. Now the
click, the tile's card and the unit card all say why it can't strike
("Out of range: it strikes up to 10 tiles away", or "Not in sight"), and the
aircraft keeps its move. Over one of its bases the unit card says it rebases
there (it said one soldier to a tile when the city had a garrison), and the
unit card's help says it strikes only what you can see.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U4mVqwqfnbw2LyX5eF58Fa
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 to how Blockilization's screens handle aircraft (Bombers, Fighters, missiles) pointed at an enemy they can't strike. Air strikes themselves already worked: in a local game a Bomber selected in its city, clicked onto a barbarian Infantry 4 tiles off, struck it (100 → 72 HP, the Bomber 100 → 89, 3 XP, its move spent), and the rules' tests for aircraft all pass.
What was wrong: a click on an enemy further off than the aircraft's range (or a fogged enemy city) didn't count as an attack, so the screen sent a rebase there instead. The refusal toast read "Only to one of your cities (six aircraft) or Carriers (three) with room", the tile's card said "It rebases only to your cities and ships…", and the unit card's line said "Out of range (10): move to fire", though an aircraft can't move. A player trying to bomb something just out of reach was told nothing about range.
Now:
airWhyNotinclient/store.ts, used throughwhyNot).Client only; the rules are unchanged.
Screenshot or clip
Tried in a local Atomic Era duel (
npm run dev) with a Bomber in Thebes and barbarian Infantry placed 4 and 12 tiles off. Before: hovering the far one showed the rebase line and clicking it toasted the Carriers message. After: the card, the unit card and the toast all say "Out of range: it strikes up to 10 tiles away", the Bomber keeps its move, and the strike on the near one still goes through (72 → 39 HP).Checklist
npm run buildpasses (type-check, the boundary check, the bundle)npm run test:headlesspasses@platform/@platform/client(no new imports beyond the game's own modules)🤖 Generated with Claude Code
https://claude.ai/code/session_01U4mVqwqfnbw2LyX5eF58Fa