Some improvements

This commit is contained in:
armel committed 2026-09-08 22:33:51 +02:00
1 parent a914bd74fe
commit 729c0be834
16 files changed
+577 -36

No files matched your search

+9 -9
View File
@@ -16,42 +16,42 @@ final class Spawner
{
public function spawnInterval(float $elapsed): float
{
return max(0.35, 1.2 - $elapsed * 0.008);
return max(0.22, 1.0 - $elapsed * 0.01);
}
public function speedMultiplier(float $elapsed): float
{
return min(2.2, 1.0 + $elapsed * 0.004);
return min(2.6, 1.0 + $elapsed * 0.006);
}
private function tankChance(float $elapsed): float
{
return min(0.5, 0.15 + $elapsed * 0.002);
return min(0.55, 0.18 + $elapsed * 0.0025);
}
private function megaTankChance(float $elapsed): float
{
return min(0.22, $elapsed * 0.0015);
return min(0.3, $elapsed * 0.002);
}
private function runnerChance(float $elapsed): float
{
return min(0.4, 0.2 + $elapsed * 0.001);
return min(0.45, 0.22 + $elapsed * 0.0015);
}
private function leaperChance(float $elapsed): float
{
return min(0.12, 0.04 + $elapsed * 0.06);
return min(0.16, 0.05 + $elapsed * 0.08);
}
private function witchChance(float $elapsed): float
{
return min(0.3, 0.1 + $elapsed * 0.002);
return min(0.35, 0.12 + $elapsed * 0.0025);
}
private function megaWitchChance(float $elapsed): float
{
return $elapsed < 45.0 ? 0.0 : min(0.12, ($elapsed - 45.0) * 0.0008);
return $elapsed < 40.0 ? 0.0 : min(0.16, ($elapsed - 40.0) * 0.001);
}
public function spawnZombie(Room $room): void
@@ -204,7 +204,7 @@ final class Spawner
$room->entities->append(new Leaper($x, $y, $room->entities, $room, $this->initialTarget($room), [
'speed' => (80.0 + $this->rand() * 40.0) * $speedMultiplier,
'size' => 28.0,
'health' => 3,
'health' => 10,
'knockback' => 240.0,
'scoreValue' => 6,
'color' => [0.15, 0.25, 0.75, 1.0],