Stop battle macros on map headers with unreadable floor digits

Browse Source
This commit is contained in:
Codex Agent
2026-10-03 15:38:20 +08:00
parent bb549c0265
commit 6cd0b2742a
3 changed files with 18 additions and 0 deletions
+4
View File
@@ -52,6 +52,10 @@ def normalize(state):
text = '选择遭遇战奖励卡' text = '选择遭遇战奖励卡'
elif re.search(r'exploring(?:floor)?\d+', compact): elif re.search(r'exploring(?:floor)?\d+', compact):
text = '正在探索第%s层' % re.search(r'\d+', compact)[0] text = '正在探索第%s层' % re.search(r'\d+', compact)[0]
elif compact.startswith('exploringfloor'):
# A missing/misread floor number still identifies the map.
# Leave the stored floor unchanged rather than invent a digit.
text = '正在探索 ' + raw
elif compact.startswith('select') and re.search(r'\d+/\d+', compact): elif compact.startswith('select') and re.search(r'\d+/\d+', compact):
text = '选择' + re.search(r'\d+/\d+', compact)[0] text = '选择' + re.search(r'\d+/\d+', compact)[0]
elif compact.startswith('refresh'): elif compact.startswith('refresh'):