Skip to content

A creature's energy shield refills at a fifth of its maximum a second, three seconds after damage (#1562) - #2584

Merged
sdubois777 merged 3 commits into
developmentfrom
fix/a-creatures-shield-refills-1
Oct 29, 2026
Merged

sdubois777 merged 3 commits into
developmentfrom
fix/a-creatures-shield-refills-1

Conversation

@sdubois777

Copy link
Copy Markdown
Owner

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.h and .cpp: in ApplyStartingAttributes, a creature's energy shield regeneration is set to its maximum shield times EnergyShieldRegenShareOfMaximum (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

  • Build: 72 actions, 62 files compiled.
  • Each new test alone: 1 performed, 1 succeeded. Printed:
    • "Shielder: maximum 80.5, 40.2 after the hit, 40.2 at 2.5 s, 56.3 at 4 s" (one second of refill after the wait: 16.1 = a fifth of 80.5)
    • "the kind's own shield: maximum 500.0, 250.0 after the hit, 250.0 at 2.5 s, 350.0 at 4 s" (100 = a fifth of 500)
  • Whole Unreal suite: 4351 performed, 4351 succeeded, 0 failed (registered 4351; 4351 declared in the tree, gap 0). Memory: peak 8,007 MB, final 7,686 MB.
  • Python: "7024 passed, 8 skipped"; JUnit tests=7032, failures=0, errors=0, skipped=8. ruff: "All checks passed!".
  • Proof P1 (the rate written as 0): PROVED. The Shielder test failed with the break in and passed restored.
  • Proof P2 (the rate taken from Shielder's share only): PROVED. The kind's test failed with the break in and passed restored.

After the tested commit, only docs/DECISIONS.md changed (the record).

🤖 Generated with Claude Code

sdubois777 and others added 3 commits October 28, 2026 18:25
…, three seconds after damage (#1562)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…4351 on 4faf66b

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…51 tests, both proofs PROVED

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sdubois777
sdubois777 merged commit 4fba6bd into development Oct 29, 2026
3 checks passed
@sdubois777
sdubois777 deleted the fix/a-creatures-shield-refills-1 branch October 29, 2026 01:24
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