Skip to content

Moved absorb logic from EntityEffectManager to FormulaHelper #2752

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dakoller123
Copy link

Hey Guys!

I'd like to attempt another PR regarding spell absorb. 4 years ago it was closed due to feature freeze. Today I re-forked unity and re-did the whole change from scratch, I've also made an experimental dfumod that overrid the absorb effect.

What has changed:

  • Moved TryAbsorbtion method from EntityEffectManager to FormulaHelper, alongside it's helper methods
  • TryAbsorption now returns the absorbed spell point count instead of a bool and an out variable
  • TryAbsorption has the target caster entity and the absorb incumbent effects as function parameters now so its side effect-free
  • Tiny refactor around the usage of TryAbsorb, the same 'if bundletype is spell' was reused 3 times

What was out of scope:

  • Moving Reflection and Resistance to the FormulaHelper in a similar fashion. Once this PR is approved I might do that as well

How it was tested:

  • I built my own binaries from my fork and used an experimental version of Mighty Magick mod where I overrid the formula. It all worked as expected.

Link to the old PR for reference:
#2179

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