-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Fix spectre buffs only applying from the selected spectre #10225
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
canuysal
wants to merge
1
commit into
PathOfBuildingCommunity:dev
Choose a base branch
from
canuysal:fix_multiple_spectre_buffs
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+149
−26
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| describe("TestSpectreBuffs", function() | ||
| before_each(function() | ||
| newBuild() | ||
| end) | ||
|
|
||
| teardown(function() | ||
| -- newBuild() takes care of resetting everything in setup() | ||
| end) | ||
|
|
||
| it("applies buff skills from every spectre in the spectre list", function() | ||
| build.spectreList = { | ||
| "Metadata/Monsters/LeagueAzmeri/SpecialCorpses/DemonBossHigh", -- Perfect Blood Demon | ||
| "Metadata/Monsters/LeagueAzmeri/SpecialCorpses/TigerHigh", -- Perfect Forest Tiger (Haste) | ||
| "Metadata/Monsters/LeagueAzmeri/SpecialCorpses/TurtleHigh", -- Perfect Guardian Turtle (Determination) | ||
| } | ||
| build.skillsTab:PasteSocketGroup("Raise Spectre 20/0 1") | ||
| build.calcsTab:BuildOutput() | ||
|
|
||
| local env = build.calcsTab.mainEnv | ||
| -- The main minion is the Blood Demon, so the Tiger's and Turtle's auras only apply if | ||
| -- the other spectres in the list are processed as well | ||
| assert.is_true(env.modDB.conditions["AffectedByHaste"] == true) | ||
| assert.is_true(env.modDB.conditions["AffectedByDetermination"] == true) | ||
| assert.is_true(env.minion.modDB.conditions["AffectedByHaste"] == true) | ||
| assert.is_true(env.minion.modDB.conditions["AffectedByDetermination"] == true) | ||
| -- The Tiger and Turtle are beasts, so the condition applies even with the Demon selected | ||
| assert.is_true(env.modDB.conditions["HaveBeastSpectre"] == true) | ||
| end) | ||
|
|
||
| it("applies buff skills from the selected spectre only once", function() | ||
| build.spectreList = { | ||
| "Metadata/Monsters/LeagueAzmeri/SpecialCorpses/TurtleHigh", -- Perfect Guardian Turtle (Determination) | ||
| } | ||
| build.skillsTab:PasteSocketGroup("Raise Spectre 20/0 1") | ||
| build.calcsTab:BuildOutput() | ||
|
|
||
| local env = build.calcsTab.mainEnv | ||
| assert.is_true(env.modDB.conditions["AffectedByDetermination"] == true) | ||
| end) | ||
| end) |
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P1] Temporary spectres can exceed the active limit
Codex found that this changed loop activates every library entry for every Raise Spectre group without enforcing the calculated spectre limit. The supplied regression already uses three spectre types with a level-20 gem whose
ActiveSpectreLimitis 2. In a five-entry reproducer, all five temporary minions are created and the overflow entries grant PDR, Onslaught, and three curses. This can materially inflate player and minion calculations whenever the library is larger than the available slots. Would it make sense to represent the actually active spectre types explicitly—or select them deterministically—and cap that set toActiveSpectreLimitbefore downstream processing? An overflow regression could then confirm that extra library entries contribute no effects.