Damage Heals the Victim or Doesn't Do Anything If Damage Invulnerability Is Greater Than 0 and the Damage Is Modified
iKNIFEu opened this issue ยท 0 comments
Skript/Server Version
Server Version: 1.21-92-a8db527 (MC: 1.21)
Skript Version: 2.9.1 (skriptlang-github)
Installed Skript Addons:
- SkUniversal v2.13
- Lusk v1.1.1
- Skuishy v2.7 (https://aabss.cc)
- SkQuery v4.1.10
- SkBee v3.5.8 (https://github.com/ShaneBeee/SkBee)
Installed Dependencies:
- Vault v1.7.3-b131
- WorldGuard v7.0.11-beta1+a801a9d
Bug Description
When inflicting damage upon an entity while on damage ticks, it heals the mob to full health.
What I noticed is that this doesn't happen when the damage isn't very high.
(What I mean by "not very high" or "very high" is in the steps to reproduce.)
To recap,
- If damage is something like 600 hearts, it'd heal the victim to full health.
- If the damage is something like 3 hearts, it removes all effects of the damage, which isn't always the case.
Expected Behavior
If damage is very high, then it'd kill the entity, not heal it to full health.
If damage isn't very high, it'd damage the entity (or kill it based on the damage)
Steps to Reproduce
Here's the code for "very high damage":
on damage:
add 600 to damage
Code if damage "isn't very high":
on damage:
add 3 to damage
Test both codes by hitting an entity on damage ticks (place them on fire so that they almost never get out of damage ticks)
Errors or Screenshots
No response
Other
I have no good way to explain how you get damaged even during your damage invulnerability ticks, but I'll try anyway
Here's how it works:
If you hit a mob, it will hold the damage you inflicted over the period of its damage invulnerability ticks
If you hit the mob again while its on invulnerability ticks, and the damage is higher than the damage held, it will get damaged again and hold the new damage you inflicted.
Try this:
Place a mob on fire, then hit it with your hand, it won't take damage.
If you try doing that with a diamond sword for example, it'll take damage.
Hopefully it made you understand how it works
Agreement
- I have read the guidelines above and affirm I am following them with this report.