Skip to content

Blockilization: an aircraft pointed at an enemy out of range says so - #46

Merged
Potrock merged 1 commit into
mainfrom
claude/project-thread-yej685
Oct 29, 2026
Merged

Potrock merged 1 commit into
mainfrom
claude/project-thread-yej685

Conversation

@Potrock

@Potrock Potrock commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

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:

  • The click on an enemy it can't strike gives a toast saying why ("Out of range: it strikes up to 10 tiles away", or "Not in sight: it strikes only what you can see now") and sends nothing, so the aircraft keeps its move.
  • The tile's card and the unit card's line say the same (airWhyNot in client/store.ts, used through whyNot).
  • Over one of its bases, the unit card's line says "Rebases here: that takes its turn" (it said "Your Infantry is there (one soldier to a tile)" over a garrisoned city).
  • The unit card's help reads "Click an enemy you can see within 10 tiles to strike it…".

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 build passes (type-check, the boundary check, the bundle)
  • npm run test:headless passes
  • A game imports only from @platform / @platform/client (no new imports beyond the game's own modules)
  • Names are original (parody welcome, no real trademarks)
  • Assets are my own, generated in the repo, or MIT-compatible (none added)

🤖 Generated with Claude Code

https://claude.ai/code/session_01U4mVqwqfnbw2LyX5eF58Fa

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
@Potrock Potrock self-assigned this Oct 27, 2026
@Potrock
Potrock merged commit c05aac2 into main Oct 29, 2026
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants