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
+4 -4
View File
@@ -56,9 +56,9 @@ export class Vitals {
return this.food < MAX_FOOD;
}
// one tick, for someone with that much health. heal and hurt go through the game server, which fires events and
// handles dying
tick(health: number, heal: (amount: number) => void, hurt: (amount: number) => void) {
// one tick, for someone with that much health out of max_health. heal and hurt go through the game server, which
// fires events and handles dying
tick(health: number, max_health: number, heal: (amount: number) => void, hurt: (amount: number) => void) {
if (this.exhaustion > EXHAUSTION_PER_POINT) {
this.exhaustion -= EXHAUSTION_PER_POINT;
if (this.saturation > 0) {
@@ -68,7 +68,7 @@ export class Vitals {
}
}
const hurt_some = health < MAX_HEALTH;
const hurt_some = health < max_health;
if (this.saturation > 0 && hurt_some && this.food >= MAX_FOOD) {
if (++this.#timer >= FAST_REGEN_TICKS) {
const amount = Math.min(this.saturation, 6);