Refactor ElementalBarsView: 3-zone color system & overtake recovery#419
Open
Shombith03 wants to merge 4 commits into
Open
Refactor ElementalBarsView: 3-zone color system & overtake recovery#419Shombith03 wants to merge 4 commits into
Shombith03 wants to merge 4 commits into
Conversation
…ence - All pips start inactive (removed always-on baseline) - 3 configurable color zones: normal (0.0-0.5), domain (0.5-1.0), super (1.0-1.5) - 6 sprites per element: 1 inactive + 5 active fill stages, cycled per zone - Debuff: reverse stagger deactivation with red tint instead of instant removal - Overtake recovery: pips fill with red color, then swap to inactive at baseline - Added SetDomainColor() for per-element domain zone color control - Preserved all juice methods (drift, joust, crystal, overtake haptics) https://claude.ai/code/session_01PaZzNVqGf4s457mREemNcY
SilhouetteController now resolves the vessel's domain palette color and calls SetDomainColor() for each element before setting initial levels, ensuring the domain zone (pips 5-9) renders with the correct palette color instead of defaulting to white. https://claude.ai/code/session_01PaZzNVqGf4s457mREemNcY
The ref local 'bar' cannot be captured inside the OnComplete lambda. Copy bar.inactiveSprite to a plain local variable before the closure. https://claude.ai/code/session_01PaZzNVqGf4s457mREemNcY
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
Redesigned the elemental bar pip system to use a 3-zone color progression (normal, domain, super) and implemented proper overtake recovery mechanics with red-colored recovery pips that animate out before resuming normal fill.
Key Changes
3-Zone Color System: Replaced single fill color with zone-based coloring:
normalZoneColor_barDomainColors[idx](customizable per element)superZoneColorSprite Management: Added
inactiveSpriteandactiveSprites[]toElementBarBindingfor per-zone sprite cycling, replacing hardcoded color-only approachOvertake Recovery Flow:
EndOvertake()clears remaining recovery pips and resets to normal filldebuffColorandinactiveSpriteduring overtakeSimplified Level System:
zeroLineIndexbaseline concept; all pips now start inactiveAnimation Refinements:
debuffShakeDuration/debuffShakeStrengthwithdebuffShrinkDuration/debuffStaggerDelayJuiceOvertakePenalty()(label shake only)New Public API:
SetDomainColor(): Update domain zone color without changing levelSetLevel(element, level): Preserve current domain color when setting levelHelper Methods:
CalculateEnabledCount(): Unified pip count logic for normal vs. recovery modesGetZoneColor(): Centralized zone color lookupImplementation Details
The refactor maintains backward compatibility for the public
SetLevel()API while enabling richer visual feedback during overtake penalties. Recovery pips are now visually distinct (red, inactive sprite) and animate out smoothly rather than shaking, improving clarity of the overtake mechanic.https://claude.ai/code/session_01PaZzNVqGf4s457mREemNcY