"/execute store result score @s .objective run damage @s 5" only returns a true/false value of if the command is successful or not, like "/execute store success" should and does, rather than what I would expect: returning the value of damage dealt.
For example: storing the result of dealing 5 damage to a player with 20 health will return a value of 1, and returns a value of 0 if the player is invulnerable at that time. This is the behavior I would expect out of "execute store success" exclusively.
What I expected to happen from storing the result of dealing 5 damage to a player with 20 health was returning a value of 5, and storing the result of dealing 5 damage to a player with 3 health returning 3, since that's how much health there was that was damaged.
Steps to reproduce:
- Create a scoreboard objective: "/scoreboard objectives add .objective dummy"
- Display the objective to the sidebar: "/scoreboard objectives setdisplay sidebar .objective"
- While in survival mode, store the result of damaging yourself to the objective: "/execute store result score @s .objective run damage @s 5"
- Notice the output is "1" rather than the expected "5"