Merge pull request #615 from LmeSzinc/dev

Bug fix
This commit is contained in:
LmeSzinc 2024-08-26 22:48:29 +08:00 committed by GitHub
commit b0363d6c30
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 22 additions and 4 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -673,6 +673,7 @@
"Hook",
"Huohuo",
"Jade",
"Jiaoqiu",
"JingYuan",
"Jingliu",
"Kafka",
@ -868,6 +869,7 @@
"Hook",
"Huohuo",
"Jade",
"Jiaoqiu",
"JingYuan",
"Jingliu",
"Kafka",
@ -1401,6 +1403,7 @@
"Hook",
"Huohuo",
"Jade",
"Jiaoqiu",
"JingYuan",
"Jingliu",
"Kafka",

View File

@ -53,7 +53,7 @@ class GeneratedConfig:
# Group `DungeonSupport`
DungeonSupport_Use = 'when_daily' # always_use, when_daily, do_not_use
DungeonSupport_Character = 'FirstCharacter' # FirstCharacter, Acheron, Argenti, Arlan, Asta, Aventurine, Bailu, BlackSwan, Blade, Boothill, Bronya, Clara, DanHeng, DanHengImbibitorLunae, DrRatio, Firefly, FuXuan, Gallagher, Gepard, Guinaifen, Hanya, Herta, Himeko, Hook, Huohuo, Jade, JingYuan, Jingliu, Kafka, Luka, Luocha, Lynx, March7thPreservation, March7thTheHunt, Misha, Natasha, Pela, Qingque, Robin, RuanMei, Sampo, Seele, Serval, SilverWolf, Sparkle, Sushang, Tingyun, TopazNumby, TrailblazerDestruction, TrailblazerHarmony, TrailblazerPreservation, Welt, Xueyi, Yanqing, Yukong, Yunli
DungeonSupport_Character = 'FirstCharacter' # FirstCharacter, Acheron, Argenti, Arlan, Asta, Aventurine, Bailu, BlackSwan, Blade, Boothill, Bronya, Clara, DanHeng, DanHengImbibitorLunae, DrRatio, Firefly, FuXuan, Gallagher, Gepard, Guinaifen, Hanya, Herta, Himeko, Hook, Huohuo, Jade, Jiaoqiu, JingYuan, Jingliu, Kafka, Luka, Luocha, Lynx, March7thPreservation, March7thTheHunt, Misha, Natasha, Pela, Qingque, Robin, RuanMei, Sampo, Seele, Serval, SilverWolf, Sparkle, Sushang, Tingyun, TopazNumby, TrailblazerDestruction, TrailblazerHarmony, TrailblazerPreservation, Welt, Xueyi, Yanqing, Yukong, Yunli
# Group `DungeonStorage`
DungeonStorage_TrailblazePower = {}

View File

@ -100,7 +100,7 @@ class ConfigGenerator:
option_add(keys='Ornament.Dungeon.option', options=ornament)
# Insert characters
from tasks.character.keywords import CharacterList
unsupported_characters = ["Jiaoqiu"]
unsupported_characters = []
characters = [character.name for character in CharacterList.instances.values()
if character.name not in unsupported_characters]
option_add(keys='DungeonSupport.Character.option', options=characters)

View File

@ -404,6 +404,7 @@
"Hook": "Hook",
"Huohuo": "Huohuo",
"Jade": "Jade",
"Jiaoqiu": "Jiaoqiu",
"JingYuan": "Jing Yuan",
"Jingliu": "Jingliu",
"Kafka": "Kafka",

View File

@ -404,6 +404,7 @@
"Hook": "Hook",
"Huohuo": "Huohuo",
"Jade": "Jade",
"Jiaoqiu": "Jiaoqiu",
"JingYuan": "Jing Yuan",
"Jingliu": "Jingliu",
"Kafka": "Kafka",

View File

@ -404,6 +404,7 @@
"Hook": "フック",
"Huohuo": "フォフォ",
"Jade": "ジェイド",
"Jiaoqiu": "椒丘",
"JingYuan": "景元",
"Jingliu": "鏡流",
"Kafka": "カフカ",

View File

@ -404,6 +404,7 @@
"Hook": "虎克",
"Huohuo": "藿藿",
"Jade": "翡翠",
"Jiaoqiu": "椒丘",
"JingYuan": "景元",
"Jingliu": "镜流",
"Kafka": "卡芙卡",

View File

@ -404,6 +404,7 @@
"Hook": "虎克",
"Huohuo": "藿藿",
"Jade": "翡翠",
"Jiaoqiu": "椒丘",
"JingYuan": "景元",
"Jingliu": "鏡流",
"Kafka": "卡芙卡",

View File

@ -31,8 +31,15 @@ class Combat(CombatInteract, CombatPrepare, CombatState, CombatTeam, CombatSuppo
in: COMBAT_PREPARE
"""
self.combat_waves = 1
current = self.combat_get_trailblaze_power()
cost = self.combat_get_wave_cost()
if self.config.stored.TrailblazePower.value < self.combat_wave_cost:
if self._try_get_more_trablaize_power(self.combat_wave_cost):
current = self.config.stored.TrailblazePower.value
else:
return False
else:
current = self.combat_get_trailblaze_power()
if cost == 10:
# Calyx
self.combat_waves = min(current // self.combat_wave_cost, 6)
@ -54,7 +61,7 @@ class Combat(CombatInteract, CombatPrepare, CombatState, CombatTeam, CombatSuppo
# Check limits
if self.config.stored.TrailblazePower.value < self.combat_wave_cost:
return self._try_get_more_trablaize_power(self.combat_wave_cost)
return False
if self.combat_waves <= 0:
logger.info('Combat wave limited, cannot continue combat')
return False
@ -213,6 +220,9 @@ class Combat(CombatInteract, CombatPrepare, CombatState, CombatTeam, CombatSuppo
if self.obtain_frequent_check:
logger.info('Exit combat to check obtained items')
return False
if self.combat_waves <= 0:
logger.warning(f'combat_waves {self.combat_waves} <= 0 in _combat_can_again, revise to 1')
self.combat_waves = 1
# Wave limit
if self.combat_wave_limit:
if self.combat_wave_done + self.combat_waves > self.combat_wave_limit: