Summary
Match spawns every fighter entity with fighter.maxHp = 100 and nothing ever
updates it. That is correct for every human and bot, and wrong for a training
dummy, whose HP is configurable (TrainingConfig.dummyHp).
A dummy configured with dummyHp: 200 shows a full bar at 200 HP and a full
bar at 100 HP, because the fraction is clamped to 1. A dummy with dummyHp: 50
shows a full bar the moment it is above 50.
Why it is minor, and why it is still worth fixing
Nobody is misled in a real match — everyone has 100 HP there. It only shows up in
the training room, which is the one place the numbers are supposed to be exactly
right, because it is the instrument other measurements are taken with. A health
bar that lies in the tool used to check whether an uppercut beat a guard is the
wrong kind of wrong.
Cause
maxHp is client-side guesswork. The server knows the real value —
ConnectedPlayer.hp is initialised from dummy.config.dummyHp — but it is not on
the wire. training-state already carries the resolved config to the client, so
the training room has the number; the nameplate simply is not reading it.
Suggested approach
Cheapest correct fix: have TrainingRoom set fighter.maxHp on the dummy's
entity from the echoed config. No wire change, and it keeps maxHp out of the
snapshot, which is the right call for a value that is 100 for every fighter that
is not a dummy.
Definition of done
- A dummy at
dummyHp: 200 shows a half-full bar at 100 HP.
- The training probe asserts it, so the next person to touch nameplates cannot
quietly regress it.
Summary
Matchspawns every fighter entity withfighter.maxHp = 100and nothing everupdates it. That is correct for every human and bot, and wrong for a training
dummy, whose HP is configurable (
TrainingConfig.dummyHp).A dummy configured with
dummyHp: 200shows a full bar at 200 HP and a fullbar at 100 HP, because the fraction is clamped to 1. A dummy with
dummyHp: 50shows a full bar the moment it is above 50.
Why it is minor, and why it is still worth fixing
Nobody is misled in a real match — everyone has 100 HP there. It only shows up in
the training room, which is the one place the numbers are supposed to be exactly
right, because it is the instrument other measurements are taken with. A health
bar that lies in the tool used to check whether an uppercut beat a guard is the
wrong kind of wrong.
Cause
maxHpis client-side guesswork. The server knows the real value —ConnectedPlayer.hpis initialised fromdummy.config.dummyHp— but it is not onthe wire.
training-statealready carries the resolved config to the client, sothe training room has the number; the nameplate simply is not reading it.
Suggested approach
Cheapest correct fix: have
TrainingRoomsetfighter.maxHpon the dummy'sentity from the echoed config. No wire change, and it keeps
maxHpout of thesnapshot, which is the right call for a value that is 100 for every fighter that
is not a dummy.
Definition of done
dummyHp: 200shows a half-full bar at 100 HP.quietly regress it.