Closed TracentEden2 closed 3 weeks ago
don't think there's any reason not to have it try to interrupt each hit, it's well known you can skill up guard/parry more than once on a multihit TP move
if weaponskills are only doing it once that could be wrong too
don't think there's any reason not to have it try to interrupt each hit, it's well known you can skill up guard/parry more than once on a multihit TP move
if weaponskills are only doing it once that could be wrong too
Yeah, I think you are right and I have updated the PR to reflect this. I think I will wait for now until WS logic is in Lua space to try to fix that. Thanks for the feedback!
I affirm:
What does this pull request do?
This PR adds the potential for interruption of players casting spells when hit for positive damage by a physical mobskill. Retail capture of such an interruption can be seen in Siknoz capture of Kirin here. The PR assumes that each hit of the mobskill gives an interruption chance (as per discussion in PR comments). The PR adds a
CLuaBaseEntity::tryHitInterrupt
to accomplish this interruption logic.The PR also refactors the
handleBlock
function and splits it into two functionsisBlocked
andgetDamageReductionForBlock
so that it is more consistent with other functions (likeisParried
) and removes the need for two return parameters. Also the refactor fixes a small bug that was inhandleBlock
related to applying the damage reduction to the hit damage.Finally the PR renames the
finaldmg
variable tohitdamage
in thegetSingleHitDamage
function in weaponskills.lua to improve readability and avoid confusion (as a variable namedfinaldmg
is used differently inhandleSinglePhysicalHit
mobskill.lua).Steps to test these changes
Fight a mob and turn off the mobs auto-attacks and start casting a long spell while spamming the mob with !tp 3000 until the mob uses many physical mobskills which hopefully interrupt the spell.