Giant chesplate
This commit is contained in:
@@ -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 }));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user