experimental/ai_attack.py

Download file

Release 2026-11-04-r2 · SHA256 7b74b0cbfcffe24015181e5491912c85060314c6fbac766e9f7722a1d4efe33c · Click a line number for a direct link.

1"""Guarded Hard attack decisions; native pass/shot execution remains in place."""2ORIGIN=0x2D880034def install(data,assemble,patch):5    code=assemble('ai_attack',ORIGIN)6    assert len(code)<=0x480,'attack overlaps native keeper season accounting at2D8C80'7    patch(ORIGIN,b'\xff'*len(code),code)8    def jump(addr,old,entry):patch(addr,bytes.fromhex(old),b'\x4e\xf9'+(ORIGIN+entry).to_bytes(4,'big')+b'\x4e\x71')9    jump(0xD1DE,'41fa13b4600031e4',0)10    jump(0xD3BE,'41fa11d460003004',0)11    patch(0xE45E,bytes.fromhex('700661002c24'),b'\x4e\xb9'+(ORIGIN+4).to_bytes(4,'big'))12    patch(0xE292,bytes.fromhex('61d06600004e'),b'\x4e\xf9'+(ORIGIN+8).to_bytes(4,'big'))13