Repository navigation
Count a swing only when the log shows it landing - #60
Merged
Merged
Conversation
A melee swing is written twice: the attacker's SWING_DAMAGE and the SWING_DAMAGE_LANDED copy. Some swings never get a copy inside the pull: the boss's killing blow lands after ENCOUNTER_END, swings on units logged neutral get none at all, and now and then a copy is simply missing. Damage Done now leaves out every swing (and every swing a shield took whole) without a landed copy in the pull, instead of only those whose copy follows the end. Pulls whose log writes no landed copies at all keep counting the attacker lines. Nothing after a pull's end matters any more, so loading no longer reads past it and the engine no longer reloads pulls whose tail was cut.
Items like Seriously Sharp Seashell make a player damage themselves, and an Evoker's buff on that player still logs its support line for those ticks. The hit itself is no Damage Done, but the Evoker's share of it now counts for the Evoker in reattributed mode; nothing is taken from the player, whose hit never counted.
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.
Damage Done now counts a melee swing only when the pull contains its
SWING_DAMAGE_LANDEDcopy. This also covers a swing a shield took whole. Swings on units logged neutral never get a copy, and now and then a copy is simply missing; those swings no longer count. The killing blow whose copy lands afterENCOUNTER_ENDwas already left out; this rule generalizes that case. Pulls whose log writes no landed copies at all keep counting the attacker lines.Since nothing after a pull's end matters any more, loading no longer reads past it. The engine also no longer reloads pulls whose tail was cut.
A second commit credits an Evoker's support share of a hit a player dealt themselves (e.g. Seriously Sharp Seashell ticks) to the Evoker in reattributed mode. The player's own hit still does not count, so nothing is taken from them.
No index format bump: the index only stores the pull list, and both changes apply when a pull is loaded.