Skip to content

Commit

Permalink
fix: task not executed
Browse files Browse the repository at this point in the history
  • Loading branch information
moesnow committed Sep 3, 2023
1 parent e22f044 commit 105c476
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
10 changes: 5 additions & 5 deletions assets/config/task_mappings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
"完成1个日常任务": "完成1个日常任务",
"金": "完成1次「拟造花萼(金)」",
"赤": "完成1次「拟造花萼(赤)」",
"凝滞虚影": "完成1次「凝滞虚影」",
"侵蚀隧洞": "完成1次「侵蚀隧洞」",
"凝滞虚": "完成1次「凝滞虚影」",
"侵蚀隧": "完成1次「侵蚀隧洞」",
"属性": "单场战斗中,触发3种不同属性的弱点击破",
"效果": "累计触发弱点击破效果5次",
"敌人": "累计消灭20个敌人",
"利用弱点": "利用弱点进入战斗并获胜3次",
"秘技": "累计施放2次秘技",
"委托": "派遣1次委托",
"拍照": "拍照1次",
"破坏物": "累计击碎3个可破坏物",
"忘却之庭": "完成1次「忘却之庭」",
"历战余响": "完成1次「历战余响」",
"可破坏": "累计击碎3个可破坏物",
"忘却之": "完成1次「忘却之庭」",
"历战余": "完成1次「历战余响」",
"模拟宇宙": "通关「模拟宇宙」(任意世界)的1个区域",
"支援角色": "使用支援角色并获得战斗胜利1次",
"终结技": "施放终结技造成制胜一击1次",
Expand Down
10 changes: 5 additions & 5 deletions tasks/daily/daily.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ def start():
config.save_timestamp("last_run_timestamp")

task_functions = {
"拍照1次": lambda: Photo.photograph,
"合成1次消耗品": lambda: Synthesis.consumables,
"合成1次材料": lambda: Synthesis.material,
"使用1件消耗品": lambda: Synthesis.use_consumables,
"拍照1次": lambda: Photo.photograph(),
"合成1次消耗品": lambda: Synthesis.consumables(),
"合成1次材料": lambda: Synthesis.material(),
"使用1件消耗品": lambda: Synthesis.use_consumables(),
"完成1次「拟造花萼(金)」": lambda: Power.instance("拟造花萼(金)", config.instance_names["拟造花萼(金)"], 10, 1),
"完成1次「拟造花萼(赤)」": lambda: Power.instance("拟造花萼(赤)", config.instance_names["拟造花萼(赤)"], 10, 1),
"完成1次「凝滞虚影」": lambda: Power.instance("凝滞虚影", config.instance_names["凝滞虚影"], 30, 1),
"完成1次「侵蚀隧洞」": lambda: Power.instance("侵蚀隧洞", config.instance_names["侵蚀隧洞"], 40, 1),
"完成1次「忘却之庭」": lambda: ForgottenHall.start_daily,
"完成1次「忘却之庭」": lambda: ForgottenHall.start_daily(),
}
logger.hr(_("今日实训"), 2)
for key, value in config.daily_tasks.items():
Expand Down
2 changes: 2 additions & 0 deletions tasks/power/power.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ def run_instances(instance_type, instance_name, power_need, number):

@staticmethod
def instance(instance_type, instance_name, power_need, number=None):

logger.hr(_("准备{type}").format(type=instance_type), 2)
power = Power.power()
if number is None:
number = power // power_need
Expand Down

0 comments on commit 105c476

Please sign in to comment.