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

Add support for repeat-based modifiers #5676

Merged
merged 7 commits into from
Apr 7, 2023

Conversation

Regisle
Copy link
Member

@Regisle Regisle commented Feb 13, 2023

built ontop of #5670

This is more of a stopgap solution, as calc offence requires a full rework to properly calc damage variances and not just averages, but thats not in the near future

This PR allows you to force repeats to do nothing, to average out (default), to only use the final repeat (sets damage to final and dps mults the number of hits down), or to use final damage but without modifying the "dps multiplier"

This also adds support for Plume of Pursuit, Fatal Flourish (Duelist hidden forbidden notable), and the caster mastery

It also fixes the more damage on divergent spell echo (it was being div by 3 instead of averaged by 2) and the interaction between divergent spell echo and greater spell echo, as well as the area granted by greater spell echo and alt qual multistrike

@QuickStick123 QuickStick123 added the enhancement New feature, calculation, or mod label Feb 13, 2023
@QuickStick123
Copy link
Contributor

Might be nice to implement vaal flicker here as well if not to hard.

Comment on lines +1908 to +1910
if env.configInput.repeatMode == "FINAL" or skillModList:Flag(nil, "OnlyFinalRepeat") then
skillData.dpsMultiplier = skillData.dpsMultiplier / (output.Repeats or 1)
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if env.configInput.repeatMode == "FINAL" or skillModList:Flag(nil, "OnlyFinalRepeat") then
skillData.dpsMultiplier = skillData.dpsMultiplier / (output.Repeats or 1)
end
if env.configInput.repeatMode == "FINAL" or skillModList:Flag(nil, "OnlyFinalRepeat") then
skillData.dpsMultiplier = skillData.dpsMultiplier / (output.Repeats or 1)
end

This could probably be implemented using hitTimeMultipler which would probably make more sense then a dps multiplier
e.g.

		if env.configInput.repeatMode == "FINAL" or skillModList:Flag(nil, "OnlyFinalRepeat") then
			skillData.hitTimeMultiplier = output.Repeats or 1
		end
		if skillData.hitTimeOverride and not skillData.triggeredOnDeath then
			output.HitTime = skillData.hitTimeOverride
			output.HitSpeed = 1 / output.HitTime
			--Brands always have hitTimeOverride
			if skillCfg.skillName and skillCfg.skillName:match("Brand") then
				output.BrandTicks = m_floor(output.Duration * output.HitSpeed)
			end
		elseif skillData.hitTimeMultiplier and output.Time and not skillData.triggeredOnDeath then
			output.HitTime = output.Time * skillData.hitTimeMultiplier
			output.HitSpeed = 1 / output.HitTime
		end
		
		-- Other Misc DPS multipliers (like custom source)
		skillData.dpsMultiplier = ( skillData.dpsMultiplier or 1 ) * ( 1 + skillModList:Sum("INC", cfg, "DPS") / 100 ) * skillModList:More(cfg, "DPS")
	end

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does make more sense to me unless there are issues with it.

@QuickStick123
Copy link
Contributor

Fixes #346

Copy link
Member

@Wires77 Wires77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I'll probably throw QuickStick's suggestion in here as well

Comment on lines +1908 to +1910
if env.configInput.repeatMode == "FINAL" or skillModList:Flag(nil, "OnlyFinalRepeat") then
skillData.dpsMultiplier = skillData.dpsMultiplier / (output.Repeats or 1)
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does make more sense to me unless there are issues with it.

@Wires77 Wires77 changed the title Repeat improvements Add support for repeat-based modifiers Apr 7, 2023
@Wires77 Wires77 merged commit 2f93c35 into PathOfBuildingCommunity:dev Apr 7, 2023
@Regisle Regisle deleted the RepeatImprovements branch April 7, 2023 04:09
Dullson pushed a commit to Dullson/PathOfBuilding that referenced this pull request Dec 6, 2023
* allow for custom mod dps multiplier

* Initial Repeat Improvements

* fix missing txt change

* implement vaal flicker

* fix stack potential with skill dps multiplier

* add display for number of repeats in calc sections
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature, calculation, or mod
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants