diff --git a/public/break_escape/js/minigames/flag-station/flag-station-minigame.js b/public/break_escape/js/minigames/flag-station/flag-station-minigame.js index beb8cbb..4c0452b 100644 --- a/public/break_escape/js/minigames/flag-station/flag-station-minigame.js +++ b/public/break_escape/js/minigames/flag-station/flag-station-minigame.js @@ -495,6 +495,16 @@ export class FlagStationMinigame extends MinigameScene { }); } } + + if (reward.type === 'complete_task' && reward.taskId) { + // Complete the specified task via objectives manager + if (window.objectivesManager) { + window.objectivesManager.completeTask(reward.taskId); + console.log('[FlagStation] Completed task:', reward.taskId); + } else { + console.warn('[FlagStation] ObjectivesManager not available'); + } + } } } diff --git a/scenarios/lab_intro_linux/scenario.json.erb b/scenarios/lab_intro_linux/scenario.json.erb index 9ff8022..4c77d02 100644 --- a/scenarios/lab_intro_linux/scenario.json.erb +++ b/scenarios/lab_intro_linux/scenario.json.erb @@ -7,7 +7,8 @@ "player_name": "Agent 0x00", "lab_instruction_complete": false, "vm_launched": false, - "flags_submitted": 0 + "ssh_flag_submitted": false, + "privilege_flag_submitted": false }, "objectives": [ { @@ -32,14 +33,18 @@ "status": "locked" }, { - "taskId": "submit_desktop_flags", - "title": "Submit both flags from the desktop system", + "taskId": "submit_ssh_flag", + "title": "Submit SSH brute force flag from desktop system", "type": "unlock_object", "targetObject": "flag_station_lab", - "targetCount": 2, - "currentCount": 0, - "status": "locked", - "showProgress": true + "status": "locked" + }, + { + "taskId": "submit_privilege_flag", + "title": "Submit privilege escalation flag from desktop system", + "type": "unlock_object", + "targetObject": "flag_station_lab", + "status": "locked" } ] } @@ -143,14 +148,24 @@ 'flag{privilege_escalation_success}' ]) %>, "flagRewards": [ + { + "type": "complete_task", + "taskId": "submit_ssh_flag", + "description": "SSH access flag submitted - demonstrates SSH brute force skills" + }, { "type": "emit_event", "event_name": "ssh_flag_submitted", "description": "SSH access flag submitted - demonstrates SSH brute force skills" }, + { + "type": "complete_task", + "taskId": "submit_privilege_flag", + "description": "Privilege escalation flag submitted - demonstrates advanced Linux skills" + }, { "type": "emit_event", - "event_name": "sudo_flag_submitted", + "event_name": "privilege_flag_submitted", "description": "Privilege escalation flag submitted - demonstrates advanced Linux skills" } ] diff --git a/scripts/scenario-schema.json b/scripts/scenario-schema.json index 452c987..4b33e95 100644 --- a/scripts/scenario-schema.json +++ b/scripts/scenario-schema.json @@ -383,11 +383,12 @@ "properties": { "type": { "type": "string", - "enum": ["give_item", "unlock_door", "emit_event", "reveal_secret"] + "enum": ["give_item", "unlock_door", "emit_event", "reveal_secret", "complete_task"] }, "item_name": { "type": "string" }, "target_room": { "type": "string" }, "event_name": { "type": "string" }, + "taskId": { "type": "string" }, "description": { "type": "string" } } }