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