Repository navigation
A creature's energy shield refills at a fifth of its maximum a second, three seconds after damage (#1562) - #2584
Merged
Conversation
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.
A creature's energy shield now refills at a fifth of its maximum per second, starting three seconds after it last took damage (#1562). Until now every creature's shield regeneration was set to zero, so a damaged shield never came back.
The rate is the design document's own figure:
docs/Cataclysm_GDD_v2.md, the Energy Shield section, "It refills at a fifth of its own maximum per second ... Every source of maximum energy shield grants that rate alongside it", sourced there to Path of Exile's 20% per second. The Succubus section says its shield "behaves exactly like the player's" and "refills three seconds after the last damage it took".What changed
game/Source/Cataclysm/Character/CataclysmEnemyCharacter.hand.cpp: inApplyStartingAttributes, a creature's energy shield regeneration is set to its maximum shield timesEnergyShieldRegenShareOfMaximum(0.2). This covers both the Shielder enemy modifier's shield and a shield the creature's kind carries (as the Succubus's does). A creature with no shield still regenerates nothing; health and mana regeneration stay zero. The existing three-second wait is unchanged.game/Source/Cataclysm/Tests/CataclysmEnemyModifierTests.cpp: two tests, one for a floor creature that draws Shielder and one for a creature whose kind carries a shield.docs/DECISIONS.md: the entry and window w78's record.Evidence: window w78, at df85590 on development 4faf66b
After the tested commit, only
docs/DECISIONS.mdchanged (the record).🤖 Generated with Claude Code