"""Await a chest defender from a prepared interception tile using public UI. Only advance the known Blaziken speed warning. Stop on battle or any other dialogue; on timeout immediately try to freeze the actual Bag screen. """ from play import * from chest_safe_pause import classify,finish_bag_entry if '--world-open' not in sys.argv: assert classify(snap())=='bag','Begin in actual Bag' act('x:.12','wait:1','x:.12') deadline=time.time()+45 while time.time().72 and len(v['text'])>12 for v in r): raise SystemExit('Unexpected dialogue; immediate review needed') act('wait:.25') else: act('x:.12','wait:.3','c:.12','wait:1.2') finish_bag_entry() raise SystemExit('No battle; safely paused in Bag')