-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
Description
Summary
Extend the upgrade tooltip system (shipped in #104 / PR #120) to cover the two upgrade types that were intentionally deferred: click-bonus upgrades and global-multiplier upgrades.
Background
PR #120 implemented delta-TD/s tooltips for generator upgrades only. The original #104 story included two additional tooltip variants that were explicitly marked out of scope for that PR and tracked here.
Acceptance criteria
- For click-bonus upgrades: tooltip shows "Click bonus: +X TD/click" reflecting the delta to click power after purchase, accounting for all current multipliers.
- For global-multiplier upgrades: 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 hover time.
- Both variants share the same visual style as the generator tooltip (dark background, monospace font, neon accent for the delta line).
- Mobile ℹ️ icon trigger works for both variants (consistent with generator tooltip behaviour).
- Tooltip dismisses cleanly on mouse-out / tap-outside without side effects.
- Unit tests cover the new delta selectors for both upgrade types.
- No regressions on existing generator tooltip behaviour.
Out of scope
- Comparison tooltips ("this vs that upgrade")
- Prestige shop upgrade tooltips (separate follow-up)
Technical notes
- Builds on the pure-selector pattern established in PR feat: upgrade tooltip shows delta TD/s preview before purchase #120.
- Click-bonus delta:
(upgradeClickBase × (ownedCount + 1) × currentClickMultipliers) − currentClickPower. - Global-multiplier delta:
currentTotalTDs × (newMultiplier − 1)expressed as a before/after TD/s pair. - Use the same Mantine
<Tooltip>/<Popover>component; extend the existing tooltip component rather than creating a new one.
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)
Reactions are currently unavailable