Stop battle macros on map headers with unreadable floor digits
This commit is contained in:
@@ -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'}}},
|
||||
|
||||
Reference in New Issue
Block a user