special = 0; $f = new self($sec); $f->maxLight = $sec->lightLevel; $f->minLight = World::minSurroundingLight($sec, $sec->lightLevel); $f->count = (Random::p() & $f->maxTime) + 1; return $f; } public function think(World $w): void { if (--$this->count > 0) { return; } if ($this->sector->lightLevel === $this->maxLight) { $this->sector->lightLevel = $this->minLight; $this->count = (Random::p() & $this->minTime) + 1; } else { $this->sector->lightLevel = $this->maxLight; $this->count = (Random::p() & $this->maxTime) + 1; } } public function isRemoved(): bool { return false; } }