Unify CTE calcs, show equipped arti CTE in virtue-companion#603
Open
SorkyStorious wants to merge 2 commits into
Open
Unify CTE calcs, show equipped arti CTE in virtue-companion#603SorkyStorious wants to merge 2 commits into
SorkyStorious wants to merge 2 commits into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).