find($villageId); if (! $home || $home->player?->user_id !== $user->id) { throw new GameRuleViolation('not_found', 'Village not found.'); } $now = now()->toImmutable(); // Support that should have arrived by now has. $this->engine->catchUpAround($villageId, $now); $stationed = UnitStack::where('village_id', $hostId)->where('home_village_id', $villageId)->where('count', '>', 0)->exists(); if ($hostId === $villageId || ! $stationed) { throw new GameRuleViolation('not_found', 'No support there.'); } GameEvent::create([ 'world_id' => $home->world_id, 'village_id' => $hostId, 'type' => GameEvent::SUPPORT_RECALLED, 'subject_id' => $villageId, 'fire_at' => $now, ]); $this->engine->catchUp($hostId, $now); Push::villages([$hostId]); return app(ShowVillage::class)($user, $villageId); } }