Skip to content

Comments

feat: add MaxManaBonusRule and initiative mana recovery#285

Draft
trevlar wants to merge 1 commit intodevfrom
tc/fix/calculate-max-mana
Draft

feat: add MaxManaBonusRule and initiative mana recovery#285
trevlar wants to merge 1 commit intodevfrom
tc/fix/calculate-max-mana

Conversation

@trevlar
Copy link
Collaborator

@trevlar trevlar commented Feb 8, 2026

Summary

  • Add MaxManaBonusRule - a new rule type that adds to max mana (follows MaxHpBonusRule pattern)
  • Implement Initiative Mana Recovery - grants mana when rolling initiative for classes with recovery: 'initiative', cleared when combat ends
  • Update rest logic to exclude initiative-only recovery from rest restoration

Test plan

  • Create an item with a maxManaBonus rule, assign to character, and verify max mana increases
  • Remove item and verify max mana decreases
  • Create a class with mana.recovery: 'initiative' and a mana formula
  • Add character with this class to combat, roll initiative, and verify mana is granted
  • End combat and verify combat-granted mana is cleared
  • With initiative-only class, take a rest and verify mana is NOT restored

- Add MaxManaBonusRule for items/features that grant bonus max mana
- Add bonus and combatMana fields to character mana data model
- Grant mana on initiative roll for classes with recovery: 'initiative'
- Clear combat-granted mana when combat ends
- Update rest logic to exclude initiative-only recovery from rest restoration
@trevlar trevlar force-pushed the tc/fix/calculate-max-mana branch from 3f3a668 to e09212a Compare February 9, 2026 07:49
@trevlar trevlar marked this pull request as draft February 9, 2026 17:25
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