Randomize decoy usernames and which rapports carry coded messages

Decoy names in /var/home and verifyCodes.txt were a hardcoded 4-name
list (Luke, Charles, William, Peter), so a real player registering
under one of those names would collide with it. Now each session
picks 6 decoys from a pool of 10, excluding any name already taken by
a real player, and stores the pick as a session setting.

Likewise the 3 "special report" rapports that get coded messages were
always Doyle, Vega and Lennox. Each session now randomly assigns 3 of
the 20 rapports to that role, and the win screen / mainframe-help
message reference whichever agents were actually picked instead of
the hardcoded names.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Frank
2026-08-22 17:09:52 +02:00
co-authored by Claude Sonnet 5
parent 02780d8f04
commit 6b1436dfe7
6 changed files with 155 additions and 30 deletions
+3 -1
View File
@@ -282,7 +282,8 @@ final class GameController extends AbstractController
Session $session,
Request $request,
Security $security,
PlayerRepository $playerRepository
PlayerRepository $playerRepository,
GameResponseService $gameResponseService
): Response {
/** @var User $user */
$user = $security->getUser();
@@ -304,6 +305,7 @@ final class GameController extends AbstractController
return $this->render('game/won.html.twig', [
'session' => $session,
'agentsText' => $gameResponseService->getSpecialReportAgentsText($session),
]);
}