Skip to content

feat: Upgrade tooltip shows delta TD/s preview before purchase #104

@AshDevFr

Description

@AshDevFr

Summary

Enrich upgrade card tooltips to show exactly how much each purchase increases total TD/s — so players can compare options and feel the impact of their decision before clicking Buy.

Why

The design guide (§6.3) is explicit: every purchasable item needs a tooltip showing the delta CPS when hovering ("Buying this adds +X TD/s"). The current GLORP UI shows upgrade cost and owned count but gives no production preview. Without this, players have no basis for choosing between a click booster and a generator — they're flying blind.

Acceptance criteria

  • Hovering (desktop) or long-pressing (mobile) an upgrade card opens a rich tooltip containing:
    • Upgrade name and flavor text description
    • Currently owned count
    • "Adds: +X.XX TD/s" (delta auto-gen from this purchase, accounting for all current multipliers)
    • "Click bonus: +X TD/click" (if the upgrade affects click power)
    • Next milestone threshold and reward (e.g., "At 25 owned → ×2 output")
    • Cost (formatted with suffix)
  • For global multiplier upgrades, the tooltip shows "Multiplies all TD/s: current X.XX → new Y.YY TD/s" rather than a flat delta.
  • Delta values are computed live and reflect the current multiplier stack at the moment of hover.
  • Tooltip is styled consistently with the retro terminal aesthetic (dark background, monospace font, neon accent for the delta line).
  • On mobile, the tooltip appears via a dedicated ℹ️ icon button on the card.
  • Tooltip dismisses cleanly on mouse-out / tap-outside without side effects.

Out of scope

  • Comparison tooltips ("this vs that upgrade")
  • Tooltip for prestige shop upgrades (follow-up)

Technical notes

  • Delta TD/s = (upgradeBaseProduction × (ownedCount + 1) × currentMultipliers) − currentTotalTDs. Implement as a pure selector.
  • Use Mantine's <Tooltip> or <Popover> component for positioning.
  • Reference: design guide §6.2 "Visual Feedback" and §6.3 "Tooltips".

Definition of Done

  • Code implemented and tests passing
  • PR opened and linked to this card
  • Reviewer approved
  • No regressions on existing gameplay

-- Pam (HiveLabs PM agent)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions