Say what a move would do before the player commits to it #40
No reviewers
Labels
No labels
area/ai
area/build
area/character
area/combat
area/data
area/docs
area/game
area/net
area/ui
area/world
size
l
size
m
size
s
type
bug
type
design
type
feature
type
refactor
type
test
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
icub3d/terra-redux-org!40
Loading…
Reference in a new issue
No description provided.
Delete branch "10-mission-hud"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Pillar 4: every number the player needs in order to decide is visible before they decide.
Until now none of them were, and #8's device run showed the cost — I picked the wrong unit
three times in a row, because the map answers a press by drawing a route whether or not
that unit can act, and then nothing happens and nothing says why.
The action bar says why
A control reads either what committing would do or the reason it will not be allowed:
Move: 3 tiles, 1 APAttack: 4 damage, lethal, 1 APAttack: 5 away, reaches 2Move: needs 1 AP, has 0Move: not this unit's turnGreying a control out tells a player they cannot. The pillar is about telling them
why.
It is also the visible confirm-and-cancel affordance ADR 0003 asked for and #23 deferred
to this issue — pressing the map a second time works, but it is neither labelled nor
discoverable.
Where the numbers come from
combat::Prospect, published by combat rather than worked out in the HUD, because workingone out means building a
Battleand ADR 0008 keeps exactly one place doing that. The HUDderives nothing. That also gave
take_actionsand the forecast a sharedsnapshot, so apreview and the act it previews cannot be looking at different worlds.
The turn order comes from the scheduler's own
upcoming, so the timeline cannot disagreewith the turns that follow it.
Attacking, two-stage like moving
Pressing somebody on the other side chooses them as a target; pressing again confirms.
Which side somebody is on is an identity and the map may know it — whether the shot
reaches, costs, or is allowed is a rule and stays in
combat, soworldstill does notdepend on it.
The overlay grows a fifth shape, a cross: a target and a destination are different
answers and are often one tile apart.
Two things the device found that the source hid
source and shipped as tofu boxes, because
assets/fonts/is empty and the built-in fontdraws little else (#27). A test asserts it rather than trusting the habit.
whatever is drawn on top, so
Waitwas pressing a tile too.Acceptance criteria
src/theme/— and I swept thepre-existing ones out of
story.rs,settings.rsandwidget.rswhile here.Val::Pxno longer appears outsidesrc/theme/.ring on the acting entry,
HP 10/10beside the bar,AP 2/2 ##beside the pips.per ADR 0003: a touchscreen has none, and the criterion's "hovering" is superseded.
Pxunder the globalUiScalethesettings screen drives, so the HUD scales with the text rather than drifting from it.
Not here, and not invented
There are no shields to draw — units have
Healthand nothing else — and no hitchance to show, because damage is a fixed number, which is what "no hidden dice the
player cannot reason about" reads as. Both are in the issue's scope list; neither exists
in the model, and inventing a stat to fill a HUD would be the wrong way round.
The timeline also sits under the status bar on the tablet — that is #26, already filed.
Verification
cargo fmt --check,cargo clippy --all-targets -- -D warnings,cargo test—180 passing, up from 173.
Ran on a Pixel Tablet through four builds: the tofu, the fall-through press, and the
"not this unit's turn" gap were each found by looking at it.
Closes #10
🤖 Generated with Claude Code
https://claude.ai/code/session_01TA4hJHkRSU3XBxZYtMKXdh