Skip to content
This repository was archived by the owner on Dec 21, 2022. It is now read-only.

Commit f7cf1c2

Browse files
authored
Merge pull request #88 from MaaAssistantArknights/feat/copilot-schema
适配新战斗流程文档
2 parents b8625bc + 7cae91a commit f7cf1c2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/MaaCopilotServer.Infrastructure/Services/OperationProcessService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public async Task<OperationValidationResult> Validate(string? operation)
162162
// When type is "Deploy", operator name, deploy location and deploy direction could not be null.
163163
"deploy" => action.Name is null || action.Location is null || DirectionIsValid(action.Direction) is false,
164164
// When type is "Skill", operator name could not be null.
165-
"skill" => action.Name is null,
165+
"skill" => action.Name is null && action.Location is null,
166166
// When type is "Retreat", operator name and deploy location could not be null at the same time.
167167
"retreat" => action.Name is null && action.Location is null,
168168
// When type is "Skill Usage", skill_usage could not be null.

src/MaaCopilotServer.Resources/maa-copilot-schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,11 @@
210210
},
211211
"name": {
212212
"type": "string",
213-
"description": "Operator/group name, required when `type` is one of \"Deploy (部署)\" | \"Skill (技能)\" | \"Retreat (撤退)\"."
213+
"description": "Operator/group name, required when `type` is one of \"Deploy (部署)\", Optional when `type` is \"Skill (技能)\" or \"Retreat (撤退)\"."
214214
},
215215
"location": {
216216
"type": "array",
217-
"description": "Position for deployment. Required when `type` is \"Deploy (部署)\". Optional when `type` is \"Retreat (撤退)\". Recommended only when multiple summons exist, retreating with location instead of name. Please simply use name to retreat for normal operators.",
217+
"description": "Position for deployment. Required when `type` is \"Deploy (部署)\". Optional when `type` is \"Retreat (撤退)\" or \"Skill (技能)\". Recommended only when multiple summons exist, retreating with location instead of name. Please simply use name to retreat for normal operators.",
218218
"minLength": 2,
219219
"maxLength": 2,
220220
"items": {

0 commit comments

Comments
 (0)