mirror of
https://github.com/cliffe/BreakEscape.git
synced 2026-02-20 13:50:46 +00:00
Enhance FlagStationMinigame and scenario structure
- Added functionality to complete tasks via the objectives manager in FlagStationMinigame, improving gameplay interaction. - Updated scenario.json.erb to replace flags_submitted with specific SSH and privilege flag submissions, enhancing clarity in task objectives. - Introduced new task types in the scenario schema to support task completion mechanics, ensuring better integration of gameplay elements.
This commit is contained in:
@@ -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');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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" }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user