Skip to content

Stealth Tank never cloaks — isCloakable is parsed but unused #2

Description

@DavidClawson

The Stealth Tank (STNK) is permanently visible. Cloaking is not implemented anywhere in the simulation or the renderer.

Evidence. Data/UnitData.swift:110 sets isCloakable: true (and isStealthy: true) on .stank, and the field is faithfully carried through Assets/DataOverrides.swift. Outside the data table and a debug sprite viewer, nothing reads it — grep for isCloakable across Game/ and Rendering/ returns nothing.

What the original does. TECHNO.CPP maintains a cloak state machine per object: a cloakable unit fades to cloaked after a delay when idle, uncloaks to fire (and stays uncloaked briefly afterward), and is only rendered to the owning player — as a shimmer — while cloaked. Enemy targeting must not acquire a cloaked object at all, which is the part that actually changes how Nod plays.

Scope. Roughly four pieces:

  1. Cloak state + timers on GameObject (cloaked / uncloaking / uncloaked), ticked in the right gameTick phase.
  2. Uncloak on firing and on taking damage; recloak after the delay.
  3. Target acquisition skips cloaked objects owned by another house.
  4. Rendering: shimmer for the owner, invisible for everyone else.

Determinism. This changes simulation state, so it will move the pinned baselines. That is fine — but it must land behind the ruleset if it changes Classic1995 pacing in a way we are not ready to repin, and the PR needs new digests plus a CLAUDE.md note. Read the determinism contract in CONTRIBUTING.md first. Start by asking on the issue whether to gate it; do not guess.

Caveat before starting. This is the largest of the current starter issues — take it if you want to learn the object model properly, not if you want a quick first patch. #1 and #4 are much smaller.

Parity: the ⬜ "Stealth Tank cloaking" row in docs/PARITY.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomersparityBehavior differs from the original 1995 Tiberian Dawn

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions