This commit is contained in:
33333-33333 2026-07-11 21:13:39 +09:00
commit d14550dad6
78 changed files with 2827 additions and 563 deletions

View file

@ -374,7 +374,16 @@
let spawned = 0;
for (let i = 0; i < n; i++) {
const a = -Math.PI * 0.15 + deterministicRange(this, "zunchi-burst-angle", -0.92, 0.92, source, pin, i) + (i / Math.max(1, n - 1) - 0.5) * 1.2;
const it = new Item("zunchi", clamp(sx + deterministicRange(this, "zunchi-burst-x", -8, 8, source, pin, i), 40, this.w - 40), clamp(sy + deterministicRange(this, "zunchi-burst-y", -8, 8, source, pin, i), 40, this.h - 40));
const spawnX = clamp(sx + deterministicRange(this, "zunchi-burst-x", -8, 8, source, pin, i), 40, this.w - 40);
const spawnY = clamp(sy + deterministicRange(this, "zunchi-burst-y", -8, 8, source, pin, i), 40, this.h - 40);
const sand = this.toiletSandAt?.(spawnX, spawnY) || null;
if (sand) {
sand.toiletFlash = 1;
sand.awakeUntil = Math.max(sand.awakeUntil || 0, (this.time || 0) + 0.8);
this.markTerrainDirtyAt?.(sand.x, sand.y, Math.max(64, (sand.r || 48) * 1.72), "toilet-sand-absorb");
continue;
}
const it = new Item("zunchi", spawnX, spawnY);
it.amount = 240;
it.vx = Math.cos(a) * deterministicRange(this, "zunchi-burst-speed-x", 260, 560, source, pin, i) + deterministicRange(this, "zunchi-burst-jitter-x", -40, 40, source, pin, i);
it.vy = Math.sin(a) * deterministicRange(this, "zunchi-burst-speed-y", 200, 480, source, pin, i) - deterministicRange(this, "zunchi-burst-up", 30, 160, source, pin, i);
@ -389,8 +398,28 @@
return spawned;
},
toiletSandAt(x, y) {
const candidates = typeof this.itemsOfType === "function"
? this.itemsOfType("toilet")
: (this.nearbyItems?.(x, y, 96) || []);
for (const item of candidates || []) {
if (!item || item.dead || item.type !== "toilet") continue;
if (globalThis.TarinaiToiletSandSystem?.contains?.(item, x, y)) return item;
}
return null;
},
spawnZunchi(x, y, source = null) {
const it = new Item("zunchi", clamp(x, 40, this.w - 40), clamp(y, 40, this.h - 40));
const spawnX = clamp(x, 40, this.w - 40);
const spawnY = clamp(y, 40, this.h - 40);
const sand = this.toiletSandAt?.(spawnX, spawnY) || null;
if (sand) {
sand.toiletFlash = 1;
sand.awakeUntil = Math.max(sand.awakeUntil || 0, (this.time || 0) + 0.8);
this.markTerrainDirtyAt?.(sand.x, sand.y, Math.max(64, (sand.r || 48) * 1.72), "toilet-sand-absorb");
return null;
}
const it = new Item("zunchi", spawnX, spawnY);
it.amount = 260;
it.stage = "fresh";
it.spawnGrace = Math.max(it.spawnGrace || 0, 10.0);
@ -661,7 +690,7 @@
return dist(a, ball) + ap - (dist(b, ball) + bp);
});
for (const t of arr.slice(5)) {
t.goIdle((ball.type === "balloon" ? "水風船" : "ボール") + "が混み合っているので眺めている");
t.goIdle((ball.type === "balloon" ? "\u6c34\u98a8\u8239" : "\u30dc\u30fc\u30eb") + "\u304c\u6df7\u307f\u5408\u3063\u3066\u3044\u308b\u306e\u3067\u773a\u3081\u3066\u3044\u308b");
t.wanderAngle = Math.atan2(t.y - ball.y, t.x - ball.x) + deterministicRange(this, "ball-chaser-release-angle", -0.45, 0.45, t, ball);
}
}
@ -694,7 +723,7 @@
ball.amount = Math.max(ball.amount || 999, 999);
audio.ballHit?.();
this.effects.push(new Effect("ring", ball.x, ball.y, { size: Math.max(16, ball.r * (0.95 + ball.pokeCombo * 0.05)), life: 0.22, color: isBalloon ? "rgba(94,188,236,0.56)" : "rgba(255,255,255,0.58)" }));
if (!isBalloon) this.log("ボールをつついて転がした。", "observe", { eventType: "ball_poke" });
if (!isBalloon) this.log("\u30dc\u30fc\u30eb\u3092\u3064\u3064\u3044\u3066\u8ee2\u304c\u3057\u305f\u3002", "observe", { eventType: "ball_poke" });
return true;
},