config.py 1.2 KB

1234567891011121314151617181920212223242526272829
  1. # This Python file uses the following encoding: utf-8
  2. # @author runhey
  3. # github https://github.com/runhey
  4. from pydantic import BaseModel, Field
  5. from datetime import time
  6. from tasks.Component.config_scheduler import Scheduler
  7. from tasks.Component.config_base import ConfigBase, Time
  8. from tasks.Component.GeneralBattle.config_general_battle import GreenMarkType
  9. class DuelConfig(ConfigBase):
  10. # 一键切换斗技御魂
  11. switch_all_soul: bool = Field(default=False, description='switch_all_soul_help')
  12. # 限制时间
  13. limit_time: Time = Field(default=Time(minute=30), description='limit_time_help')
  14. # 目标分数
  15. target_score: int = Field(default=2000, description='target_score_help')
  16. # 刷满荣誉就退出
  17. honor_full_exit: bool = Field(default=False, description='honor_full_exit_help')
  18. # 是否开启绿标
  19. green_enable: bool = Field(default=False, description='green_enable_help')
  20. # 选哪一个绿标
  21. green_mark: GreenMarkType = Field(default=GreenMarkType.GREEN_LEFT1, description='green_mark_help')
  22. class Duel(ConfigBase):
  23. scheduler: Scheduler = Field(default_factory=Scheduler)
  24. duel_config: DuelConfig = Field(default_factory=DuelConfig)