Skip to content
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

Rewriting magic resist #297

Open
wants to merge 1 commit into
base: 1.10.2
Choose a base branch
from

Conversation

ProfHugo
Copy link

@ProfHugo ProfHugo commented Mar 26, 2017

I don't know who came up with the idea to just tweak magic damage the component (mana blast, arcane guardian, and other magic damage sources would completely bypass magic resist). For now I would just leave the code in potionhandler to not have another listener running, and have it work smoothly with things like mana shield and magic shield. Oh yea, it also works on a pretty ridiculous log scale.

Current formula:
y = e^(x/0.32845873875) - 1

where x is the total level of magic resist of all equipped armor, and y is the percent reduction granted.

Example: at 20 total levels (full MR 5 armor set), y would be 1, or 100% damage reduction.
Here's a table with a few level values:

Total Magic Resist Level | Percent Reduction Granted
-----------1---------------------------22.8%
-----------3---------------------------45.6%
-----------4---------------------------53.9%
-----------5---------------------------58.9%
-----------8---------------------------72.2%
----------12---------------------------84.3%
----------16---------------------------93.1%
----------20---------------------------100.0%

Note: Dragon Breath is also affected, as it's pretty close to being magic damage in my opinion, and I put a linear scaling formula right next to the log one (5% per level) if you want to use that one instead. I also felt like that the actual code could be put in the entityhandler, but somehow I can't get that to work.

I don't know who came up with the idea to just tweak magic damage the
component (when mana blast and arcane guardian are chilling with true
damage). For now I would just leave the code in potionhandler to not
have another listener running, and have it work smoothly with things
like mana shield and magic shield. Oh yea, it also works on a pretty
ridiculus log scale.
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