"""Reviewed Starmie setup, using only screenshots and ordinary battle controls.""" from play import * from PIL import Image path=ROOT/'work/amaria-121-cryo-setup.json' plan=['X Sp. Def']*2+['X Speed']*3+['X Sp. Atk']*3 state=json.loads(path.read_text())if path.exists()else{'done':0,'heals':0,'recoveries':0} def run(s,*a):subprocess.run([sys.executable,str(ROOT/'scripts'/(s+'.py')),*map(str,a)],check=True) while state['done']75 and g>r*1.3 and g>b*1.3)or(r>130 and b<70 and g<220)for r,g,b in pixels)/len(pixels)) hp=max(0,int(max(fills)*320)-5);assert hp>0,'HP bar review: '+t print('AMARIA SETUP',state,'HP',hp,flush=True) # On the initial paid switch, unboosted Thunderbolt can leave HP below # the normal setup threshold. A first priority SpDef boost stops a pure # healing loop; inspect below150 rather than accepting a fragile action. if state.get('screen_remaining',99)<=1 and hp>=245: run('battle_move',0,'--watch');state['screen_remaining']=6 elif state['done']==0 and 190<=hp<245: run('battle_item',plan[0],'Hexan','--active');state['done']+=1 elif hp<245: if state['done']>=5 and hp>=160: assert state['recoveries']<12;run('battle_move',2,'--watch');state['recoveries']+=1 else: assert state['heals']<12;run('battle_item','Ultra Potion','Hexan');state['heals']+=1 else:run('battle_item',plan[state['done']],'Hexan','--active');state['done']+=1 if 'screen_remaining' in state:state['screen_remaining']-=1 path.write_text(json.dumps(state,indent=2)+'\n') print('CRYO SETUP COMPLETE; review health/status and field before sweep',flush=True)