Repository navigation
Fix crash calculating secondary minion energy shield - #10571
Open
AdamZ-8113 wants to merge 1 commit into
Open
AdamZ-8113 wants to merge 1 commit into
AdamZ-8113 wants to merge 1 commit into
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.
Fixes #10567
Description of the problem being solved:
6185c8c introduced an issue that would cause some builds to crash when calculating the life of a minion that takes damage before the player, such as the Void Spawns from Servant of Decay.
The energy shield calculation was looking at the selected main skill's minion instead of the minion being calculated. This changes it to use the correct minion and skill, while keeping the existing energy shield formula and spectre life table behavior.
The issue can also be reproduced on the current beta build by linking Companionship with a Golem and then selecting some other skill as your main skill. This happens because Companionship forces a defence calculation (some damage goes to the Golem) and with the Golem no longer selected as active, we get the crash. See 2nd build link for reference.
Steps taken to verify a working solution:
Link to a build that showcases this PR:
https://pobb.in/fwuxkRpGKa69
https://pob.codes/b/JQX4AGpJCmc