mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-22 00:35:34 +00:00
rogue farming feature: enter rogue when RogueWorld_WeeklyFarming is enabled to acquire materials from boss
This commit is contained in:
parent
f50fbb7951
commit
0d4ee2640f
@ -193,7 +193,9 @@
|
||||
"DomainStrategy": "combat",
|
||||
"UseImmersifier": true,
|
||||
"DoubleEvent": true,
|
||||
"UseStamina": false
|
||||
"UseStamina": false,
|
||||
"WeeklyFarming": false,
|
||||
"WeeklyFarmingCount": 0
|
||||
},
|
||||
"RogueBlessing": {
|
||||
"PresetBlessingFilter": "preset",
|
||||
|
@ -1423,6 +1423,14 @@
|
||||
"UseStamina": {
|
||||
"type": "checkbox",
|
||||
"value": false
|
||||
},
|
||||
"WeeklyFarming": {
|
||||
"type": "checkbox",
|
||||
"value": false
|
||||
},
|
||||
"WeeklyFarmingCount": {
|
||||
"type": "input",
|
||||
"value": 0
|
||||
}
|
||||
},
|
||||
"RogueBlessing": {
|
||||
|
@ -237,6 +237,8 @@ RogueWorld:
|
||||
UseImmersifier: true
|
||||
DoubleEvent: true
|
||||
UseStamina: false
|
||||
WeeklyFarming: false
|
||||
WeeklyFarmingCount: 0
|
||||
|
||||
RogueBlessing:
|
||||
PresetBlessingFilter:
|
||||
|
@ -133,6 +133,8 @@ class GeneratedConfig:
|
||||
RogueWorld_UseImmersifier = True
|
||||
RogueWorld_DoubleEvent = True
|
||||
RogueWorld_UseStamina = False
|
||||
RogueWorld_WeeklyFarming = False
|
||||
RogueWorld_WeeklyFarmingCount = 0
|
||||
|
||||
# Group `RogueBlessing`
|
||||
RogueBlessing_PresetBlessingFilter = 'preset' # preset, custom
|
||||
|
@ -940,6 +940,14 @@
|
||||
"UseStamina": {
|
||||
"name": "Farm Planers Using Trailblase Power",
|
||||
"help": "Task \"Dungeon\" will no longer run, and all trailblaze power will be used first to claim immersion rewards, except for double events."
|
||||
},
|
||||
"WeeklyFarming": {
|
||||
"name": "RogueWorld.WeeklyFarming.name",
|
||||
"help": "RogueWorld.WeeklyFarming.help"
|
||||
},
|
||||
"WeeklyFarmingCount": {
|
||||
"name": "RogueWorld.WeeklyFarmingCount.name",
|
||||
"help": "RogueWorld.WeeklyFarmingCount.help"
|
||||
}
|
||||
},
|
||||
"RogueBlessing": {
|
||||
|
@ -940,6 +940,14 @@
|
||||
"UseStamina": {
|
||||
"name": "Reclamar de planers mediante poder trazacaminos",
|
||||
"help": "La tarea de mazmorra ya no se ejecutará y todo el poder trazacaminos se usará primero para reclamar recompensas de inmersión, excepto para eventos dobles"
|
||||
},
|
||||
"WeeklyFarming": {
|
||||
"name": "RogueWorld.WeeklyFarming.name",
|
||||
"help": "RogueWorld.WeeklyFarming.help"
|
||||
},
|
||||
"WeeklyFarmingCount": {
|
||||
"name": "RogueWorld.WeeklyFarmingCount.name",
|
||||
"help": "RogueWorld.WeeklyFarmingCount.help"
|
||||
}
|
||||
},
|
||||
"RogueBlessing": {
|
||||
|
@ -940,6 +940,14 @@
|
||||
"UseStamina": {
|
||||
"name": "RogueWorld.UseStamina.name",
|
||||
"help": "RogueWorld.UseStamina.help"
|
||||
},
|
||||
"WeeklyFarming": {
|
||||
"name": "RogueWorld.WeeklyFarming.name",
|
||||
"help": "RogueWorld.WeeklyFarming.help"
|
||||
},
|
||||
"WeeklyFarmingCount": {
|
||||
"name": "RogueWorld.WeeklyFarmingCount.name",
|
||||
"help": "RogueWorld.WeeklyFarmingCount.help"
|
||||
}
|
||||
},
|
||||
"RogueBlessing": {
|
||||
|
@ -940,6 +940,14 @@
|
||||
"UseStamina": {
|
||||
"name": "使用开拓力刷内圈遗器",
|
||||
"help": "每日副本任务将不再打本,所有开拓力将优先被用于领取浸器奖励,双倍活动时除外"
|
||||
},
|
||||
"WeeklyFarming": {
|
||||
"name": "积分满后继续刷取材料",
|
||||
"help": "每周积分满后不停止,刷取完33次boss以获取形迹材料"
|
||||
},
|
||||
"WeeklyFarmingCount": {
|
||||
"name": "剩余材料刷取次数",
|
||||
"help": "每周刷取33次boss,即11次模拟宇宙"
|
||||
}
|
||||
},
|
||||
"RogueBlessing": {
|
||||
|
@ -940,6 +940,14 @@
|
||||
"UseStamina": {
|
||||
"name": "用開拓力農遺器",
|
||||
"help": "每日副本任務將不再打本,所有開拓力將優先被用於領取浸器獎勵,雙倍活動時除外"
|
||||
},
|
||||
"WeeklyFarming": {
|
||||
"name": "RogueWorld.WeeklyFarming.name",
|
||||
"help": "RogueWorld.WeeklyFarming.help"
|
||||
},
|
||||
"WeeklyFarmingCount": {
|
||||
"name": "RogueWorld.WeeklyFarmingCount.name",
|
||||
"help": "RogueWorld.WeeklyFarmingCount.help"
|
||||
}
|
||||
},
|
||||
"RogueBlessing": {
|
||||
|
@ -332,7 +332,8 @@ class RogueEntry(RouteBase, RogueRewardHandler, RoguePathHandler, DungeonUI):
|
||||
"""
|
||||
logger.info(f'RogueWorld_UseImmersifier={self.config.RogueWorld_UseImmersifier}, '
|
||||
f'RogueWorld_UseStamina={self.config.RogueWorld_UseStamina}, '
|
||||
f'RogueWorld_DoubleEvent={self.config.RogueWorld_DoubleEvent}'
|
||||
f'RogueWorld_DoubleEvent={self.config.RogueWorld_DoubleEvent}, '
|
||||
f'RogueWorld_WeeklyFarming={self.config.RogueWorld_WeeklyFarming}, '
|
||||
f'RogueDebug_DebugMode={self.config.RogueDebug_DebugMode}')
|
||||
# This shouldn't happen
|
||||
if self.config.RogueWorld_UseStamina and not self.config.RogueWorld_UseImmersifier:
|
||||
@ -347,11 +348,16 @@ class RogueEntry(RouteBase, RogueRewardHandler, RoguePathHandler, DungeonUI):
|
||||
return
|
||||
|
||||
if self.config.stored.SimulatedUniverse.is_expired():
|
||||
# Expired, do rogue
|
||||
pass
|
||||
# Expired, do rogue and reset weekly farming count
|
||||
self.config.RogueWorld_WeeklyFarmingCount = 11
|
||||
|
||||
elif self.config.stored.SimulatedUniverse.is_full():
|
||||
if self.config.RogueWorld_UseImmersifier and self.config.stored.Immersifier.value > 0:
|
||||
logger.info('Reached weekly point limit but still have immersifiers left, continue to use them')
|
||||
logger.info(
|
||||
'Reached weekly point limit but still have immersifiers left, continue to use them')
|
||||
elif self.config.RogueWorld_WeeklyFarming and self.config.RogueWorld_WeeklyFarmingCount > 0:
|
||||
logger.info(
|
||||
'Reached weekly point limit but still continue to farm materials')
|
||||
else:
|
||||
raise RogueReachedWeeklyPointLimit
|
||||
else:
|
||||
|
@ -28,6 +28,11 @@ class Rogue(RouteLoader, RogueEntry):
|
||||
|
||||
self.rogue_run()
|
||||
self.rogue_reward_claim()
|
||||
# runs when one rogue run finishes (do not handle whether the last rogue run finished or failed due to one who use this feature has less chance of failure -- would be better if check boss battle result instead of rogue result, but this version also works), and decreases rogue farming count by 1
|
||||
if self.config.RogueWorld_WeeklyFarming and self.config.RogueWorld_WeeklyFarmingCount > 0:
|
||||
self.config.RogueWorld_WeeklyFarmingCount -= 1
|
||||
logger.attr("WeeklyFarmingCount",
|
||||
self.config.RogueWorld_WeeklyFarmingCount)
|
||||
return True
|
||||
|
||||
def run(self):
|
||||
|
Loading…
Reference in New Issue
Block a user