Repository navigation
fix(companion): base a revealed Ditto's repeat boost on Ditto itself - #378
Merged
Merged
Conversation
A disguised Ditto hatches with the repeat growth boost of its disguise's line, and the reveal kept it: a repeat Ditto grew at the standard rate while a first Ditto could keep 2x growth. The reveal now recomputes the boost from Ditto's own base. The disguise phase is unchanged.
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.
Summary
A disguised Ditto hatches with the repeat growth boost of its disguise's line (#253), and the reveal kept that value. A player who had already graduated a Ditto therefore got no 2× growth on the next one, while a first Ditto disguised as an already graduated line kept 2× growth for its whole Ditto phase.
The reveal now recomputes
hasGrowthBoostfrom Ditto's own base (hasCollectedFinal(forBaseID: 132)), the same predicate every other line uses at hatch:The disguise phase is unchanged: it keeps its line's boost so growth speed does not give the disguise away, and the reveal threshold is still halved when that line was already graduated. Levels never go down (
advanceGrowthkeeps the maximum), the carried-over usage is the same, and an already revealed Ditto in an existing save keeps its current flag. This matches the README: "A hatch from an evolution line you have already graduated grows 2× faster."Note for review:
testBoostedDisguiseRevealsAtTheHalvedThresholdAndKeepsTheBoostpinned the previous behavior. It is renamed totestBoostedDisguiseRevealsAtTheHalvedThresholdAndANewDittoDropsTheBoostand inverted, since carrying the disguise's boost into Ditto rewards a line the player graduated, not a repeat Ditto.testBoostedEasyDittoRetainsLevelAndIdentityAcrossRevealnow covers the dropped boost and still checks that level and identity survive the reveal.testRevealingAnAlreadyGraduatedDittoGrantsTheRepeatBoostcovers the repeat Ditto. Both new expectations fail onmain. The repeat boost entry indocs/reference/defect-log.mdrecords why the reveal tests missed it (they all seeded an emptycollectedFinals).Type of change
Checklist
swift buildandswift testpass locally (1385 tests, 0 failures, coverage gate passes)Sources/PokeTokenBar/UI/is untouched