Giant chesplate

This commit is contained in:
2026-10-01 16:58:30 -03:00
parent a7835261e1
commit 1fc92a7b00
21 changed files with 148 additions and 51 deletions
+9 -2
View File
@@ -1372,6 +1372,7 @@ export class GameServer {
}
player.vitals.tick(
player.health,
player.max_health,
(amount) => this.heal_player(player, amount),
(amount) => this.damage_player(player, amount, "starve"),
);
@@ -1533,9 +1534,15 @@ export class GameServer {
sync("extra", items, () => ({ type: "container", container: "extra", items }));
}
// like minecraft, losing max health, like a curio's modifier going away, takes the health over it
if (player.health > player.max_health) player.health = player.max_health;
const { food, saturation } = player.vitals;
const health = player.health;
sync("vitals", [health, food, saturation], () => ({ type: "vitals", health, food, saturation }));
const { health, max_health } = player;
sync(
"vitals",
[health, max_health, food, saturation],
() => ({ type: "vitals", health, max_health, food, saturation }),
);
const attack_speed = player.attribute(ATTRIBUTES.attack_speed);
sync("attack_speed", attack_speed, () => ({ type: "attack_speed", value: attack_speed }));