自动战斗列表(初版)
This commit is contained in:
parent
e3e8b8b44a
commit
58356eb328
7 changed files with 141 additions and 28 deletions
|
@ -1,6 +1,10 @@
|
|||
from typing import Literal
|
||||
|
||||
from pydantic import BaseModel, model_validator
|
||||
from pydantic_core import PydanticUndefined
|
||||
|
||||
from mower.utils.typealias import WorkItem
|
||||
|
||||
|
||||
class ConfModel(BaseModel):
|
||||
@model_validator(mode="before")
|
||||
|
@ -124,12 +128,30 @@ class FightPart(ConfModel):
|
|||
refresh: int = 10
|
||||
"最大刷新次数"
|
||||
|
||||
class WorkConf(ConfModel):
|
||||
work_enable: bool = False
|
||||
"是否执行自动作战列表"
|
||||
squad: int = 0
|
||||
"作战编队"
|
||||
use_medicine: bool = False
|
||||
"是否使用理智药"
|
||||
enemy_breach_strategy: Literal["overlook", "give_up", "restart_game"] = (
|
||||
"give_up"
|
||||
)
|
||||
"被敌人进入时采取的策略"
|
||||
try_select_all: bool = False
|
||||
"尝试一次性选择全部干员和干员组"
|
||||
works: list[WorkItem] = []
|
||||
"自动作战列表"
|
||||
|
||||
avatar_recog_pause: bool = False
|
||||
"作战中识别干员时暂停"
|
||||
choose: ChooseConf
|
||||
"自动选干员设置"
|
||||
support: SupportConf
|
||||
"借助战要求"
|
||||
work: WorkConf
|
||||
"自动作战列表设置"
|
||||
|
||||
|
||||
class LongTaskPart(ConfModel):
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from typing import Dict, List, Tuple, Union
|
||||
from typing import Dict, List, Tuple, TypedDict, Union
|
||||
|
||||
import numpy as np
|
||||
from numpy.typing import NDArray
|
||||
|
@ -34,3 +34,10 @@ BasePlan = Dict[str, List[str]]
|
|||
|
||||
# Parameter
|
||||
ParamArgs = List[str]
|
||||
|
||||
|
||||
# Work
|
||||
class WorkItem(TypedDict):
|
||||
stage: str
|
||||
retry_times: int = 5
|
||||
support_oper: str = ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue