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",
|
"player_name": "Agent 0x00",
|
||||||
"lab_instruction_complete": false,
|
"lab_instruction_complete": false,
|
||||||
"vm_launched": false,
|
"vm_launched": false,
|
||||||
"flags_submitted": 0
|
"ssh_flag_submitted": false,
|
||||||
|
"privilege_flag_submitted": false
|
||||||
},
|
},
|
||||||
"objectives": [
|
"objectives": [
|
||||||
{
|
{
|
||||||
@@ -32,14 +33,18 @@
|
|||||||
"status": "locked"
|
"status": "locked"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"taskId": "submit_desktop_flags",
|
"taskId": "submit_ssh_flag",
|
||||||
"title": "Submit both flags from the desktop system",
|
"title": "Submit SSH brute force flag from desktop system",
|
||||||
"type": "unlock_object",
|
"type": "unlock_object",
|
||||||
"targetObject": "flag_station_lab",
|
"targetObject": "flag_station_lab",
|
||||||
"targetCount": 2,
|
"status": "locked"
|
||||||
"currentCount": 0,
|
},
|
||||||
"status": "locked",
|
{
|
||||||
"showProgress": true
|
"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}'
|
'flag{privilege_escalation_success}'
|
||||||
]) %>,
|
]) %>,
|
||||||
"flagRewards": [
|
"flagRewards": [
|
||||||
|
{
|
||||||
|
"type": "complete_task",
|
||||||
|
"taskId": "submit_ssh_flag",
|
||||||
|
"description": "SSH access flag submitted - demonstrates SSH brute force skills"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "emit_event",
|
"type": "emit_event",
|
||||||
"event_name": "ssh_flag_submitted",
|
"event_name": "ssh_flag_submitted",
|
||||||
"description": "SSH access flag submitted - demonstrates SSH brute force skills"
|
"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",
|
"type": "emit_event",
|
||||||
"event_name": "sudo_flag_submitted",
|
"event_name": "privilege_flag_submitted",
|
||||||
"description": "Privilege escalation flag submitted - demonstrates advanced Linux skills"
|
"description": "Privilege escalation flag submitted - demonstrates advanced Linux skills"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -383,11 +383,12 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"type": {
|
"type": {
|
||||||
"type": "string",
|
"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" },
|
"item_name": { "type": "string" },
|
||||||
"target_room": { "type": "string" },
|
"target_room": { "type": "string" },
|
||||||
"event_name": { "type": "string" },
|
"event_name": { "type": "string" },
|
||||||
|
"taskId": { "type": "string" },
|
||||||
"description": { "type": "string" }
|
"description": { "type": "string" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user