"""Hard pursuit, clear point shots and selective native CPU one-timers."""
ORIGIN=0x2DD000

def install(data,assemble,patch):
    code=assemble('ai_playbook',ORIGIN)
    assert 0<len(code)<0x400,'playbook overlaps CPU coach reservation'
    patch(ORIGIN,b'\xff'*len(code),code)
    patch(0xE9D4,bytes.fromhex('082a0002003067000028'),b'\x4e\xf9'+ORIGIN.to_bytes(4,'big')+bytes.fromhex('4e714e71'))
    patch(0xEC0E,bytes.fromhex('4eb9000f6c44'),b'\x4e\xb9'+(ORIGIN+8).to_bytes(4,'big'))

    patch(0xEC60,bytes.fromhex('9f2b00406a0067fe'),b'\x4e\xf9'+(ORIGIN+12).to_bytes(4,'big')+bytes.fromhex('4e71'))
