aorecomp

Anarchy Online classic in the browser

git clone https://aorecomp.ubeagle.com/code/aorecomp.git


docs/nano-direct-damage.md (8639B)


Catalog direct-damage programs

The shared casting path supports 33 reviewed ordinary programs whose entire OnUse effect is one immediate health Hit. It reads the original signed damage endpoints and damage stat, uses the program's own cost, attack delay, recharge, range and requirements, and commits the result through the existing atomic nano outcome transaction. There is no program-ID switch for damage delivery.

The same execution path also supports the 30 complete paired caster-heal and hostile-Hit contracts described in Trader health drains.

This extends the existing PvE reconstruction policy: visible living creatures, an inclusive uniform damage roll, and range checks at admission and completion. Original resistance/fumble rolls, AC/modifier ordering, reflect/absorb, PvP, line of sight, interruption/refund policy and packet timing remain unresolved. Expanding these complete effects does not establish those server policies.

Original contracts and admission

The audit reparsed the original 14.9.1 resource database. Of 246 programs with one selected-target immediate health Hit, 33 have the ordinary reviewed 0x80008000 flag contract. They retain the attack/Nano Resist dictionaries, zero defaults for those dictionaries, a single unconditional Hit 53002, and one action-3 requirement expression. The damage types span stats 90 through 97. The single-Hit contracts reject ticks, other targets/resources, unknown sections, metadata variants and unrecognized argument forms. The additional complete compound contract is described below.

Thirty-one ordinary crystals upload these programs. Heat Miser 26310 and Nano Bolt 27114 have no ordinary single-program uploader in the scanned item catalog; test fixtures seed their learned entries without inventing acquisition. Multi-upload test items remain unsupported. The native upload and crystal consumption transaction is shared with supported stat buffs. Winter's Bite's startup crystal now uses its authored requirements through that common reader.

Examples of the original single-hit contracts:

Program Health damage Damage stat Raw cost Attack / recharge, cs Range, m
Winter's Bite 29618 10..23 95 cold 10 261 / 100 25
Fire Stream 28608 26..46 97 fire 15 327 / 208 25
Corrosive Spray 28601 17..30 93 chemical 12 126 / 258 25
Inflict Harm 28667 16..29 91 melee 13 265 / 102 25
Radioactive Cloud 28632 244..442 94 radiation 114 314 / 126 22
Izgimmer's Last Word 28618 4118..8907 94 radiation 1079 2000 / 800 35

Crystals and programs retain their own postfix requirements. Most use visual profession 368; Heat Miser uses actual profession 60. All authored skill gates are checked independently. Raw cost is distinct from the existing native float-based debit policy: with modifier 100, these positive integer costs debit one point less. For example Fire Stream reserves 14 and Corrosive Spray 11.

Ice Flechette 28612 additionally supports its full Hit followed by CastNano 53051 of 144632: four initiative debuffs for 6000 cs. Its child installation, refresh, expiry and persistence are covered in passive debuffs. Mind Pain 29114 and Mind Scream 29298 also support their complete six-nano-skill children 144616/144619. Other secondary contracts and area programs such as Radiation Pulse 28631 remain excluded. An additional 27 complete Hit plus TauntNPC programs now share the instant damage path; see NPC threat and taunts for their separate census and policy. The separate flag 0x80000 zeroes native cast/recharge deadlines; it is outside this ordinary timing contract.

Complete decoded census, rejected neighbors, uploaders and fixture provenance are retained in local/direct-damage-nano-research/. The checked-in server/testdata/direct-damage-nanos.json records all 33 contracts independently of the runtime reader.

Native result contract

Original KKR SHA-256 is a37bc1c15053fdcc5572772309f7074c4f83baffe2faa164df40b059b7c480c0. The retained audit contains 25 complete original REA records and 13 checked citations in docs/research-notes/direct-damage-nano-research/native/README.md; no fresh binary analysis session was opened.

Hit 53002 is server-owned: common executor 100bfb40 rejects it before effect dispatch, and its otherwise unreachable executor is a stub. NanoAttack 0x4727213e, reader 100b1590 / activation 100b1600, carries a signed HP delta followed by a damage stat. Its envelope identifies the victim. Activation adds the signed delta to HP 27; it has no program-ID branch or damage-type whitelist. Feedback initialization10039cf0 maps 90 projectile,91 melee,92 energy, 93 chemical,94 radiation,95 cold,96 poison and 97 fire.

The existing action 18/107 execution gate and recharge consumer are generic. On success, the server sends 107 with the actual completed program ID, then NanoAttack with the resolved negative delta and authored damage stat. Lethal hits retain the established death/corpse/StopFight and action 153 ordering. Cost, recharge, health, contributions and death/reward state commit before completion packets. Failed outcomes retain the existing cancellation/refund transaction; packet loss cannot repeat the committed damage.

Principal complete evidence: ev_065aec48e84d7bcfd376705ec06f50ef9f1ffd1b50711ff79c65ede2a927eec6 (NanoAttack), ev_f28cc89d25d840908ea753e766d4e2d1a718ef5138b04f190e82062755593b1d (effect gate), and ev_a9090944783a773664fa3351a229696dfbf286ba0e7263ad03c2c2b5942ca38a (execution/finish gate). These prove client consumers, not original-server damage arithmetic or scheduling.

Verification

Go regressions check exact admitted sets, all 31 crystal uploads, all 33 cast results and cold restores, per-program cost/timing/type, skill equality/pass boundaries, profession rejection, nonlethal contribution and lethal corpse ownership, no duplicate completion, and 12/35-metre admission/completion edges. Mutation cases reject partial effects and unsupported metadata without consuming the crystal, reserving nano or damaging a target. Existing Winter's Bite outcome/reservation failure tests remain in the shared path.

Three family/outcome race repetitions passed in 178.019 seconds. Three additional range repetitions passed in 111.994 seconds. Vet passed. The complete Go suite passed 5043 tests and subtests: server 795.418 seconds, game data 7.695 seconds.

Two owned GPU WASM clients uploaded eight ordinary crystals and executed one program for each damage stat through native mouse controls. Their matching NanoAttack deltas were projectile 100, melee 56, energy 100, chemical 19, radiation 100, cold 57, poison 88 and fire 33; lethal damage was clamped to the target's remaining health. All eight native damage labels appeared correctly. The first completion receipts already had the committed NPC health, zero reserved nano and recharge in SQLite. Each admission debited its own cost; no cast started the player's weapon attack. Page reload retained all eight programs and the two correctly rejected crystals.

The fixture initially selected Bureaucrat Drill Missile for the NT. Its profession rejection was correct; Vulcan Flechette supplied the NT projectile case. Ice Flechette's unsupported compound effect was also rejected without consumption. A separate wrong-profession upload retained its crystal.

Sequential snapshots after the melee hit showed committed HP 44, owner 45 and observer 46 as ordinary recovery advanced. These are later samples, not a simultaneous health comparison. The already-open native/server recovery-phase gap remains; this milestone verifies matching result deltas and durable outcomes, not synchronization of those prediction clocks. See NPC recovery.

After a server restart, fresh clients retained the eight learned programs and both rejected crystals. Another native Fire Stream cast debited 14, committed 37 fire damage and zero reservation, and reached both clients with the same delta. Normal nano recovery during execution was retained.

The owned players, remaining crystals and disposable Leet fixtures/respawns were removed. Unrelated-row hashes and SQLite foreign-key/integrity checks passed, retaining existing players 8/24. The single normal preview remains on the default ports. No client rebuild was needed and no browser or adapter errors were captured. Warm/cold wire, native, SQLite and cleanup checks are recorded in local/direct-damage-nano-smoke/verification.json.