#pragma once #include "Task/InterfaceTask.h" #include #include namespace asst { class MultiCopilotTaskPlugin; class BattleProcessTask; class BattleFormationTask; class ProcessTask; class ParadoxRecognitionTask; // 抄作业任务 class CopilotTask final : public InterfaceTask { public: struct MultiCopilotConfig { int id = -1; std::string filename; // 文件名 std::string stage_name; // 关卡名 bool is_raid = false; // 是否是突袭 bool is_sandbox = false; // 是否是沙盘推演 int sandbox_option1 = 1; // 沙盘选项1 (1 or 2) int sandbox_option2 = 1; // 沙盘选项2 (1 or 2) MEO_JSONIZATION( MEO_OPT id, filename, stage_name, MEO_OPT is_raid, MEO_OPT is_sandbox, MEO_OPT sandbox_option1, MEO_OPT sandbox_option2); }; public: inline static constexpr std::string_view TaskType = "Copilot"; CopilotTask(const AsstCallback& callback, Assistant* inst); virtual ~CopilotTask() override = default; virtual bool set_params(const json::value& params) override; std::string get_stage_name() const { return m_stage_name; } private: std::optional parse_copilot_filename(const std::string& name); std::shared_ptr m_multi_copilot_plugin_ptr = nullptr; std::vector> m_sandbox_tasks; std::shared_ptr m_medicine_task_ptr = nullptr; std::shared_ptr m_formation_task_ptr = nullptr; std::shared_ptr m_battle_task_ptr = nullptr; std::shared_ptr m_stop_task_ptr = nullptr; std::string m_stage_name; bool m_has_subtasks_duplicate = false; }; }