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
+9
View File
@@ -10,6 +10,15 @@ from decision_router import DecisionRouter
class EnglishMirrorBoundaryTest(unittest.TestCase):
def test_map_header_without_recognized_floor_number_stops_battle(self):
for label in ('Exploring Floor', 'Exploring FloorT'):
with self.subTest(label=label):
state = normalize({'items': [{'text': label, 'x': 60, 'y': 131,
'w': 302, 'h': 51, 'score': .975}]})
self.assertTrue(agent.battle_is_terminal(state))
with mock.patch.object(agent, 'map_candidates', return_value={}):
self.assertNotIn('battle', agent.candidates(state, previous_battle=True))
def test_enabled_commence_precedes_reselecting_sinners(self):
options = {'button_20': {'description': '当前可见且非灰色按钮:进行判定',
'action': {'tool': 'keypress', 'args': {'key': 'enter'}}},