Trader health drains
The shared direct-damage path now admits all 30 complete ordinary Trader health-drain programs and their 30 original crystals. This includes the issued Weak Health Funnel crystal78417, which learns program76742. The complete set is in the original-record fixture. Weak Delayed Health Payment 43374 is a separate supported team-heal/self-damage contract.
Original contract
Each admitted program has exactly two unconditional, one-shot HP Hit53002 functions, in this order:
- Target1 heals the caster, with damage-type argument0.
- Target3 damages the selected recipient, with energy argument92.
All 30 pairs have fixed authored amounts. Weak Health Funnel heals4 and hits10; Greater Health Funnel76717 heals63 and hits119; Sophisticated Health Plunder77195 heals577 and hits580. Healing and damage clamp independently to the caster's maximum and victim's current HP. The unconditional positive Hit does not become a percentage of clipped damage. Full caster health still allows the hostile Hit. Neither effect may execute alone after a failed transaction.
The programs have flags0x8000, medical school2, positive ordinary cost/range and casting/recharge metadata, and no timed effect or strain. Attack/defense dictionaries retain their authored BM/TimeSpace weights and NanoResist defense. Conditional, repeated, opaque, differently scoped or extra effects reject the whole program.
The action's postfix OnTarget18 marker switches subsequent attribute tests from caster to selected recipient. These contracts require the target's maximum HP stat1 to exceed damage-1. This is not a current-HP test or a caster-HP test; a target with one remaining HP can still qualify. The marker's authored operands are both zero. Skill and profession tests before it continue to use the caster. Missing targets and unsupported criteria reject without a reservation.
The source census reopens the shipped14.9.1 ResourceDatabase and reparses all
60 records using the maintained format-aware decoder. Program payload hashes,
full effects/criteria, crystal uploaders, index identity and parser identity are
retained in local/health-drain-nanos/original-records.json. Each program's
payload hash matches the decoded catalog. These are authored-resource facts;
they do not recover unavailable original-server resistance or PvP policy.
Execution and delivery
Crystal learning uses the existing complete-program upload and atomic consumption path. Casting uses the shared learned-program, action, range, visibility and creature-target admission, reservation, cancellation and recharge. The existing PvE subset and no-resistance-roll reconstruction remain in force. Original charging/refund and completion-gate policies remain open in feature backlog.
Completion stages the caster heal and target Hit together. The same transaction commits caster HP, reserved nano consumption, recharge and NPC state, including ordinary damage contributions, death, loot and XP when applicable. Required caster-health writes check their returned row; failed/ignored writes or failed commit publish neither effect. Existing cancellation/refund permits a fresh complete retry. A clamped zero caster gain causes no unnecessary HP write.
After commit, the caster receives the same received-hit-aware absolute health snapshot used by direct healing. Observers and team resources use the shared delivery paths. Normal heal feedback reports the actual clamped gain. The target receives the existing nano damage result and retaliation/death handling; the caster does not start a weapon attack.
Weak Health Funnel's raw cost16 produces debit15 under the recovered floating operation order; see nano cost. Its original attack/recharge are 300/400 centiseconds. No bespoke cost or timing is attached to this program.
Verification
Public-handler tests cover all30 crystal uploads and complete paired outcomes, exact resource metadata/costs, repeated completion, cold state and source consumption. A controlled higher-HP NPC profile isolates the stronger catalog contracts; it does not establish original creature balance. Focused cases cover target maximum-HP equality, a one-HP victim, full/partly full caster, missing target, cancellation, range/death invalidation, unsupported partial pairs, failed/ignored writes, failed commit and complete retry.
The two-client WASM fixture uses cap-checked level2 Traders, one issued crystal
and an ordinary full-health level1 Leet at a controlled starting position. Real
inventory upload and native program-icon casting produce caster HP20->24,
nano30->15 and target HP100->90 on both replicas. Both page replays carry the
stored NPC HP90; cold loading retains both HP changes, learned program, consumed
crystal and recharge. The other character's authoritative HP/nano stay20/30.
The accepted capture is local/health-drain-nanos/20261104-071103,35.37s.
This fixture advances the nano scheduler, with no gameplay farming. Owner disconnect stops retaliation; the reloaded idle Leet can predict normal quiet recovery before capture. Replay checks the actual SimpleChar maximum/current HP pair100/90 and records later predicted HP separately. The earlier strict constant-90 replay assertion exposed that established prediction phase, not a lost drain outcome. The shared NPC recovery and broader HP/cadence audits remain separate. All four accepted traces have no native exceptions or dropped events; no client rewrite was needed.
Related regressions pass 49 roots/1,033 results in216.631s, including the ordinary
damage/healing catalogs, self-only target forms, signed requirements and atomic
outcomes. Focused race checks pass 11 roots/97 results in154.750s. Maintained
Go packages pass vet, and JavaScript syntax/whitespace checks pass. Independent
packet/state checks and exact source hashes are in that folder's
verification.json; these are scoped runs, not a new full-server-suite result.