Skip to content

Unify CTE calcs, show equipped arti CTE in virtue-companion#603

Open
SorkyStorious wants to merge 2 commits into
carpetsage:mainfrom
SorkyStorious:feature/sandbox-lab-upgrade-cte
Open

Unify CTE calcs, show equipped arti CTE in virtue-companion#603
SorkyStorious wants to merge 2 commits into
carpetsage:mainfrom
SorkyStorious:feature/sandbox-lab-upgrade-cte

Conversation

@SorkyStorious

Copy link
Copy Markdown

Adds a Lab Upgrade epic-research input to the Artifact Sandbox that feeds Clothed TE and the research-cost discount, persisted in the share-link proto (missing_lab_upgrade, backward-compatible — old links default to max, so existing CTE is unchanged).

Virtue Companion now shows the Clothed TE of your currently-equipped artifacts in the "Currently Equipped Artifacts" section header (previously only the "Optimal Artifacts" section showed a CTE value).

Also factors the CTE math into shared lib (cteFromLabUpgrade) and points Virtue Companion's calculateClothedTE at the shared primitives so both tools compute it identically. That reconciliation incidentally fixes a bug where VC counted Light of Eggendil toward virtue egg value (it's Enlightenment-only).

SorkyStorious and others added 2 commits June 14, 2026 22:04
Add a Lab Upgrade epic-research input (cheaper_research; 10 levels,
-5%/level) to the Artifact Sandbox that feeds both its Clothed TE and
its research-price effect, persisted via a new proto field
(missing_lab_upgrade=23, backward-compatible: old share links default
to max). Surface the equipped-set Clothed TE in the Virtue Companion
"Currently Equipped Artifacts" header.

Shared lib:
- Add cteFromLabUpgrade() to lib/virtue.ts (single source of truth for
  the epic-research CTE term); remove a stray console.log.

Reconcile Virtue Companion's calculateClothedTE onto the shared lib CTE
primitives (cteFromArtifacts/cteFromColleggtibles/cteFromLabUpgrade) so
the two tools compute Clothed TE identically. This also fixes a latent
bug: VC previously counted Light of Eggendil toward virtue egg value,
but per game mechanics LoE only affects the Enlightenment egg.

Review fixes:
- epicResearchMaxed() and its UI breakdown now account for labUpgrade.
- Clamp labUpgrade to [0,10] on proto load; guard against absent levels.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant