aorecomp

Anarchy Online classic in the browser

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


docs/nano-initiative-debuffs.md (11651B)


Hostile initiative and nano-skill effects

Ice Flechette 28612 now executes its complete original contract: 13..17 cold damage and child nano 144632, which lowers Melee, Ranged, Physical and Nano Initiative by 6 for 6000 centiseconds. Startup crystal 28815 uploads the parent through the ordinary crystal path. Both upload and casting require visual profession 11 and Matter Creation greater than 8. Raw cost is 8; the existing native float debit policy reserves 7. Parent attack/recharge are 125/251 cs and range is 25 metres.

Complete contracts

The direct-damage reader accepts one immediate health Hit, optionally followed by one unconditional selected-target CastNano whose entire child contract is supported. The child reader requires a passive hostile nano, either four distinct negative initiative Modifies or all six negative nano-skill Modifies, one tick, no interval or function conditions, the complete attack/zero-resistance dictionaries, and no extra sections or casting action. Unknown or partial child effects close the parent and crystal as well. No program-ID dispatch or damage-only fallback is used.

The original resource census finds two programs containing only negative initiative Modifies. Red Tape 30090 also has an area/casting contract and fails this passive-child reader. The full passive-child census admits Ice Flechette (28612 -> 144632), Mind Pain (29114 -> 144616), and Mind Scream (29298 -> 144619). Mixed, incomplete and duplicate stat sets are rejected. The additional complete Hit plus TauntNPC family is covered in NPC threat and taunts. This does not admit arbitrary CastNano chains, hostile player casting, area effects or other debuff families.

Original payload SHA-256 identities:

Resource ID SHA-256
Crystal 28815 5720cacb5d62ac0ca74435a79749598d59b910be4be0cf14565b32e0d8924d98
Parent 28612 d3c582425ee42a26d8e997730685160b3bba148aeeb1784b9cfafcb249e0497d
Child 144632 2468d892714587cda36f453b19b3cdbd501eff2ee06bc05b395b1fcbb0bcfdcc

Decoded records and the census script/results are retained under local/ice-flechette-research/.

Native delivery and lifecycle

Parent action 18/107 does not apply the child. Original completion 100654a0 skips local execution for a SimpleChar target; the admitted CastNano executor 100be8e0 calls empty stub 1000c340. A successful survivor receives one target action 177 (53019,144632,caster,6000) alongside the parent's completion and NanoAttack. The signed Modify consumer adds each -6 once. No second modifier packet or active-effect snapshot is sent for that installation.

The omitted child strain defaults to its program identity, 144632, through NanoItem initialization 10098540/10098600. Native 10066010 replaces an existing equal-strain/equal-NCU record before applying the incoming one, so refreshing leaves one -6 contribution and renews its deadline. Hostile flag 0x8000 excludes the program from used NCU and blocks local cancellation. An authoritative target action 65 removes its membership and reverses the four modifiers. The inspected countdown and death paths do not perform that removal themselves.

The retained native ledger contains 47 complete original REA records, 16 checked citations and 15 maintained-source extracts, bound to original KKR SHA-256 a37bc1c15053fdcc5572772309f7074c4f83baffe2faa164df40b059b7c480c0. Principal records are ev_4454e12e69f0ac994b39f2628681f4ea8b1c62dfb507addeb5761df50b4ce819 (parent completion), ev_27c953512839b1cff0ac854ff041eb3e0813c2df061a8858060432f10da08405 (signed modifier arithmetic), and ev_a760dfc116df1dd38b0619334130d916b7706ee29c64a535cdef16ed448295a6 (active add/remove). Full provenance and bounded findings are in docs/research-notes/ice-flechette-research/native/README.md.

Server state and reconstruction policy

Active nanos belong to characters in SQLite, including NPCs. Damage, the child installation or refresh, contributions, caster reservation release and recharge commit together before any completion, child or damage result is sent. Saved effect contents are checked inside the transaction, including silently ignored inserts, updates and deletes. Failed outcomes publish cancellation/refund only; failed expiry retains the effect and retries.

Timers advance in memory. NPC remaining duration follows its existing periodic world checkpoint without rewriting an otherwise unchanged actor. An orderly shutdown saves current remaining time; a crash can lose time since the last checkpoint. Loaded NPC timers start immediately, while player timers retain their existing pause-until-login policy. A late observer gets the NPC's raw combat foundations followed by one active-effect replay with remaining time.

NPC weapon delays use the profile's initiative plus the relevant nano modifier; the native combat snapshot keeps the raw profile initiative so replay cannot apply -6 twice. At initiative zero and AggDef 75, Leet Bite's 1750/1750 ms cycle becomes 1760/1770 ms. Removal restores subsequent cycles. NPCs without recovered combat profiles retain their existing provisional weapon timing.

Expiry explicitly sends 65. Lethal damage removes active effects atomically and sends 65 after the death reset; a lethal Ice hit installs no new child. Respawns have a new identity with no inherited effects. Clearing on death, pausing while the server is stopped, unconditional secondary landing and exact packet ordering are reconstruction choices. The original server's death-persistence, secondary resistance, duration-modifier and offline-time policies remain unresolved. The wider resistance/AC/PvP limits in direct damage remain open.

Verification

Go tests cover complete catalog admission, malformed child rejection, original crystal consumption, damage and debit, refresh without stacking, exact expiry, cold restore, observer replay, NPC attack deadlines and raw initiative, checkpoint cadence, lethal removal and clean respawn. Statement failures, ignored writes and failed COMMIT cannot expose partial damage, modifiers or cost; removal and casts can retry. Skill equality/above-threshold and wrong profession cases test both upload and casting independently. Three race-detector repetitions passed for the lifecycle and requirements cases. The full Go suite passed 5072 tests and subtests (server 749.964 seconds; game data 7.634 seconds). The additional requirements boundaries and strengthened respawn assertion each passed three race repetitions; vet passed.

Two owned GPU WASM clients uploaded the startup crystal and observed four Ice casts through native mouse controls. Matching cold damage results were 14, 17, 14 and 13, each with a 7-point admission debit. At the first 107 receipt, SQLite already contained the child with 60 seconds, committed HP, zero reserved nano and recharge. Both native modifier maps showed exactly -6 for all four initiatives and one active child; refresh and an observer reload retained one contribution and zero used NCU. Explicit expiry restored all four to zero in both clients. A lethal Radioactive Cloud follow-up cleared the child in the same outcome; owner modifiers returned to zero and both observers received 65.

After closing both clients, a true server restart retained the second NPC's 51.829 seconds of saved effect time. A fresh WASM process received one replay with 3756 cs remaining, showed all four -6 modifiers once, and received removal 37.743 seconds later. Its modifiers returned to zero. No page or adapter errors occurred. The read-only probes and transport/database checks are retained in local/ice-flechette-smoke/verification.json.

Cleanup removed only owned fixtures. Hashes of every unrelated table row were unchanged, foreign keys and SQLite integrity passed, and unrelated players remained. The shared preview remains a single process on the default ports.

Meta-Physicist starter Mind Pain

Original startup crystal 29193 uploads Mind Pain 29114. Both require visual profession 12, Matter Creation greater than 8 and Psychological Modification greater than 6. Its original Hit deals 9..23 energy damage at a 20-metre range; raw cost 15 debits 14 under the shared native float policy. Attack/recharge are 261/100 centiseconds (stats 294/210). Its CastNano child 144616 applies -5 to Matter Metamorphosis, Biological Metamorphosis, Psychological Modification, Sensory Improvement, Matter Creation and Time and Space for six seconds, with strain 221 and NCU 1. The hostile child does not consume player NCU. Damage, all six penalties, cost and recharge share the existing atomic transaction. Refresh leaves one child; expiry removes all six penalties.

The original records are in server/gamedata/items/items_001.yaml (crystal), items_167.yaml (parent), and items_171.yaml (child). Payload SHA-256:

Resource ID SHA-256
Crystal 29193 fcd566eb6763a36bf2fb5beea7f40e1df4a222e50c799036e1fa1cf97d046ec4
Parent 29114 594303ddf15d3341c4b14033d96985d7e7e950a2d5a2e0aa4bbc2e7fdfe264c4
Child 144616 584fbb458c82c5cb4bf0f84730f3e5c63af5fd47add0205fd3421b4bfbd744f0

The same complete shape admits Mind Scream 29298 with child 144619: 78..146 energy damage, -20 to all six skills for nine seconds, and raw cost 78 (debit 77). Crystal 29395 is QL37 and requires MC >182 / PM >158, so it is not early shop stock. The server regression uploads and executes this additionally admitted contract; no new shop rows or arbitrary child chains are introduced.

TestMindPainUploadAndCastEnforceBothSkillsAndProfession covers each strict skill boundary and profession. TestMindPainDamageDebuffsRefreshExpiryAndColdRestore checks damage, six effective skill changes, no stacking, expiry and cold recovery. Rejected, silently ignored and failed-commit child writes leave damage, resources and modifiers unchanged and allow retry. The passive-child mutation regression checks all three admitted parents and rejects incomplete contracts at both upload and cast admission. Existing Ice Flechette lifecycle and failure tests remain applicable to the shared transaction.

TestCreatedMetaPhysicistCanUploadMindPainAtLevelOne uses ordinary Solitus creation, the issued crystal, normal IP/cap-checked MC 8 / PM 6 training, and idle regeneration advanced on a controlled clock. No experience or credits are earned by this fixture. This closes the starter nano admission gap, not pet attack, useful shop upgrades, NPC spellcasting or the full A5/A7 progression gates.

TestBrowserMindPain and tools/client/test_mind_pain.mjs use that created level-one character with 1474 IP remaining and 32 recovered nano, plus a nearby controlled 100-HP Leet. Real inventory right-click, native school selection, Tab targeting and program right-click upload and cast the starter nano. The passing capture shows 17 energy damage, 14 nano spent, one delivered child, all six server penalties, explicit removal at expiry, and unchanged ownership after reconnect and cold recovery. Refresh is covered by the server regression; the browser does not claim a refresh check. An initial repeat-click fixture arrived while the native client still reported a busy nano action.

Fifteen focused server test roots pass, including the existing Ice Flechette checks. Native verification passed in 27.54 seconds with artifacts under local/alpha-mind-pain/20261105-140914/; the initial rejection reproduction, regressions and browser logs are in local/alpha-mind-pain/. The test server and browser were closed. This adds no new historical server-policy evidence.