This commit is contained in:
33333-33333 2026-06-24 18:49:17 +09:00
commit d875df8600
22 changed files with 625 additions and 496 deletions

View file

@ -22,7 +22,7 @@
this.usedCount = 0;
this.x = x;
this.y = y;
this.r = definition.type === "plushie" ? 13 : (definition.type === "grass_bed" ? 18 : 24);
this.r = definition.type === "plushie" ? 6.5 : (definition.type === "grass_bed" ? 18 : 24);
this.amount = this.hp;
this.seed = Math.random() * 1000;
this.roles = clonePlain(definition.roles);
@ -54,9 +54,21 @@
return;
}
this.x = owner.x;
this.y = owner.y - Math.max(18, (owner.radius || 24) * 0.78);
this.y = owner.y - Math.max(15, (owner.radius || 24) * 0.70);
if (owner.needs) owner.needs.fulfill = Math.max(0, (owner.needs.fulfill || 0) - dt * 2.8);
}
if (this.type === "grass_bed") {
const owner = this.owner(worldRef);
if (!owner) {
this.unownedDecayTimer = (this.unownedDecayTimer || 0) + dt;
const rainBoost = worldRef?.weather === "light_rain" ? 1.65 : 1;
const ageBoost = 1 + Math.min(1.8, this.unownedDecayTimer / 360);
this.damage(dt * 0.070 * rainBoost * ageBoost, worldRef, null);
if (this.dead) return;
} else {
this.unownedDecayTimer = 0;
}
}
this.amount = Math.max(0.001, this.hp);
}