SPELL - Add JumpTargets field to spell for targetcapped abilties.#1384
Draft
ncberman wants to merge 3 commits intowowsims:masterfrom
Draft
SPELL - Add JumpTargets field to spell for targetcapped abilties.#1384ncberman wants to merge 3 commits intowowsims:masterfrom
ncberman wants to merge 3 commits intowowsims:masterfrom
Conversation
FelixPflaum
reviewed
Mar 24, 2025
Comment on lines
+644
to
+658
| targetsToHit := min(spell.JumpTargets, sim.Environment.GetNumTargets()) | ||
| for targetIndex := int32(0); targetIndex < targetsToHit; targetIndex++ { | ||
| // Not sure if we want to split this flag into its own? | ||
| // Both are used to optimize away unneccesery calls and 99% | ||
| // of the time are gonna be used together. For now just in one | ||
| if !spell.Flags.Matches(SpellFlagNoOnCastComplete) { | ||
| spell.Unit.OnApplyEffects(sim, target, spell) | ||
| } | ||
|
|
||
| spell.ApplyEffects(sim, target, spell) | ||
|
|
||
| spell.ApplyEffects(sim, target, spell) | ||
| if targetIndex < targetsToHit-1 { | ||
| target = sim.Environment.NextTargetUnit(target) | ||
| } | ||
| } |
Contributor
There was a problem hiding this comment.
The only spells that chain in the sim are, I think, Chain Lightning, Multi Shot and Cleave. The better place to have that functionality is in the ApplyEffects function of the individual spells as it is done currently. Just replace the hardcoded chain count there instead.
Not to mention CL also requires the target number to calculate its dmg. That would even require adding an additional parameter for just those few spells.
Contributor
There was a problem hiding this comment.
I agree with the above. This functionality is very invasive to be in-here for the sake of a couple of spells which can just implement it into its own effects.
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.
No description provided.