Armor Points and Damage Effect
aaaeeeMC opened this issue ยท 7 comments
Suggestion
I'm surprised we're already in 2.10.0-beta1 and we haven't had this before.
The armor points of a player/entity and the damage effect support would be a fantastic addition to the next beta version of 2.10.0.
When a player/entity equips armor, their armor points increase, as seen in the armor bar. When wearing full diamond, the armor bar is full, meaning it's at 20 armor points. Let's not forget about armor toughness, which I think makes the armor points more effective.
The damage effect currently ignores all armor of an entity no matter what. damage player by 5
will take away 5 hearts from the player even with the best armor. Instead, in the next release, if we really want to make it ignore armor, we can simply specify it: damage player by 5 ignoring armor
.
We should get a settable expression to get the armor points, maybe even armor toughness or a mashup of both, of an entity. Even though not all entities can be seen with armor, it's actually there, it's just that the armor model doesn't support the entity.
My solution for this was to make a custom function for damaging that involved entity1 attacking entity2 with the SkBee effect, and a parameter to set entity1's attack damage attribute before attacking, and back to normal after, but this solution is weird and it doesn't work at all times, which is why... why not add this?
Why?
As stated above, the damage effect ignores all armor. When we want to make, for example, a spike() function that summons a spike from the ground and damages the player by a given amount, well, if we want its damage to be 10 hearts, it's going to insta-kill the player. The problem is, even if the player wears armor, it's still going to be an insta-kill. Full netherite prot 4? Insta-kill. This also applies to other entities.
I wouldn't call this feature a bonus, but rather, something that should have been possible since the first days of skripting.
Other
If I somehow am in the wrong, which I highly doubt, I still think this feature should be added, because we don't want to play hide-and-seek with stuff that is to be figured out, do we? And this game of hide-and-seek... it's a tough one. I mean, Skript was made to be as easy and simple as possible, wasn't it?
Oh also, happy late halloween!
Agreement
- I have read the guidelines above and affirm I am following them with this suggestion.
Duplicate of #6303
i didn't even realize i actually suggested this before. i completely forgot bruh...... mb
We should get a settable expression to get the armor points, maybe even armor toughness or a mashup of both
isn't this already possible with attributes which is already in vanilla?
and ignoring armor
would be a breaking change, something like considering armor
would have backwards compatibility
isn't this already possible with attributes which is already in vanilla?
here's the thing, the armor attribute doesn't seem to change when i equip armor.
isn't this already possible with attributes which is already in vanilla?
here's the thing, the armor attribute doesn't seem to change when i equip armor.
You might need to check the innate armor attribute of your player, plus their equipped items (hand, offhand, head, body, legs, boots and filter for attributes that apply to that slot)
I don't know whether Bukkit has a built-in method for getting a total effective attribute, though if it does maybe this could be included within attribute syntax somehow.
This should already be implemented, via using the total
or final
attribute value with the entity attribute expression.
Duplicate of #6303
As the attribute suggestion is already implemented, and the damage including armor suggestion is not available in spigot/paper api, and would have to be manually calculated (and therefore manually updated every version), I'm closing this issue. Feel free to re-open if there's another aspect to this issue I'm missing.