Underlying issue related to NoDamageTicks and itemrecharging/attack cooldown
Summary
Hello, I've been having this issue for quite some time. You see, I have created a skill which only fires if the attack cooldown of the player is full (kind of like the vanilla sword does a sweep attack if the player's attack cooldown isnt full).
Now, the problem I am facing is that the damage mechanic with the damage attribute preventimmunity=true sets the players attack cooldown back to 0. I have tested this using the placeholder <caster.attack_cooldown>, which I can see that it does set it back to 0. This means that they will have to wait another delay to be able to use the skill.
This isn't isolated with pi=true either, even mobs with NoDamageTicks and the mechanic setnodamageticks yields the same results.
Because of this issue, skills that rely on itemrecharging or anything similar wont work too well, and be janky.
Steps to reproduce
You can replicate this easily, you can test this by casting this skill below using /mm test cast Testing:
Testing:
Skills:
- damage{a=1;pi=true;repeat=99;repeatinterval=1} @target
- message{m="<caster.attack_cooldown>";repeat=20;repeatinterval=5} @self
and I assure you that message mechanic will spam 0.03s or something similar, even though your item is off cooldown.
Current behavior
NoDamageTicks or similar that adjusts i-frames reset player's attack cooldown to the beginning
Intended correct behavior
NoDamageTicks or similar that mechanics should not interfere with attack cooldown