devilutionX icon indicating copy to clipboard operation
devilutionX copied to clipboard

Sync Monster life steal

Open kphoenix137 opened this issue 3 weeks ago • 4 comments

Fixes: https://github.com/diasurgical/DevilutionX/issues/7995

We should never modify monster life locally. This leverages the existing command for damaging monsters by dealing inverted damage back to the monster when they hit the player and should life steal, fixing desync.

kphoenix137 avatar Dec 03 '25 17:12 kphoenix137

I suppose this will spawn a floating number. Not sure if that's good or bad.

StephenCWills avatar Dec 03 '25 23:12 StephenCWills

I suppose this will spawn a floating number. Not sure if that's good or bad.

It does, in gold text. I'd consider it a good thing, since the player can see how much life is being stolen, especially if they decide to play without the monster life bars. Although, maybe we should instead change how the floating numbers work so any number <= 0 won't display.

kphoenix137 avatar Dec 04 '25 01:12 kphoenix137

Latest commit patches floating numbers, so this feature never shows damage numbers that aren't greater than 0. I wasn't sure if this change was appropriate for this PR, but I think it has complete relevance since such a change isn't necessary otherwise.

kphoenix137 avatar Dec 04 '25 07:12 kphoenix137

I'd like to be able to see when monsters heal themselves so adding that as a separate floating number could be a good idea (for example +X HP or something)

qndel avatar Dec 05 '25 07:12 qndel

If it's preferred, I can change this PR to have life steal use its own network command.

kphoenix137 avatar Dec 13 '25 03:12 kphoenix137