Damage attribute "preventimmunity" lost effects against a mob using immunity table

Summary

When a mob's immunity table is activated, damages with preventimmunity set to true cannot ignore the immunity frames of this mob.

Using the latest dev build of mythicmobs (5.2.0, Build 4287)

Steps to reproduce

Create a mythicmob and activate the immunity table:

TestMob:
  Type: VILLAGER
  Health: 100
  Modules:
    ImmunityTable: true
  Options:
    NoDamageTicks: 10
    KnockbackResistance: 1
    MovementSpeed: 0

Summon the mob and cast a skill with pi damages to it:

NoImmunityDamage:
  Skills:
  - damage{repeat=5;repeati=5;a=3;pi=true}

Test how many times the mob hurts.

Current behavior

The mob was only hurt for 2 times and decreased 6 health. The immunity frame of the mob has blocked the damages for 4 times.

Intended correct behavior

The mob should be hurt 6 times and decrease 18 health.

Server log file

No logs.

Debug log snippet

https://pastebin.com/GRqbtKbi

Proposed fixes

Damages with pi set to true should ignore the immunity frames of mobs who enabled immunity tables.

Edited Oct 26, 2022 by raenzil
Assignee Loading
Time tracking Loading