Original critical-result routing contract
client/tests/critical_result.c executes these unchanged lifted original
14.9.1 kkr.dll functions:
| Original address | Function covered |
|---|---|
| 100aecb0 | AttackInfo activation |
| 1007a660 / 1007a320 | Weapon-holder delivery and slot lookup |
| 100ab4c0 | Insert damage/result in 50-entry ring |
| 100ab580 / 100ab560 / 100ab500 | Nonempty check, result peek, damage pop |
| 100ab5a0 | Consume queued damage/result at impact |
| 10075db0 | Assign actor raw stat with IP editing inactive |
| 1007be50 | Immediate generic damage when attacker is absent |
Generated addresses are rebased from 10000000 to 36000000. The fixture links lifted-0034.c, lifted-0035.c, lifted-0050.c and lifted-0051.c directly.
The four known-attacker scenarios cover normal 4 and critical 5, death 0/7, ammo 3/0/-1, local defender/uninvolved observer, and ring index 49 wrapping to 0. The packet deliberately names another target identity, different from the current opponent used for impact; the packet target remains undamaged.
For each valid known-attacker result:
- Receipt inserts exactly the supplied damage13/result4or5 and assigns ammunition immediately to item stat 26, including literal -1. HP remains 100.
- Impact reads HP 27 once and assigns 87 once. Attacker and alternate packet target remain 100. The exact result 4 or 5 reaches feedback unchanged.
- Death reason 7 is stored on the current opponent's holder and passed to death handling after HP assignment. This is a branch probe, not a claim about the canonical meaning of reason 7.
- Calling impact again with the empty queue performs no further HP read, assignment, feedback or death call. No duplicate subtraction occurs.
Five missing-attacker scenarios cover result 4/5, death 0/7, local/nonlocal target and missing target. A local known payload target receives one immediate 100 to 87 subtraction and generic damage text for both 4 and 5; no critical result reaches the generic formatter. Nonlocal or absent payload targets are ignored. This path does not queue or assign ammunition.
Identity lookup/casts, locality, target-state test, weapon damage type 90,
actor/item stat storage, feedback formatting and death are external fixture
boundaries. The actual critical suffix text formatter 1001d0b0 is NOT
executed here. Its result 5 branch is retained static evidence:
ev_16fbb07444de249fd19ed14114c99abb43239d8f64214cc0e4494b36dc8a7c77.
Other source evidence already retained in
local/reports/combat-outcomes-1491-evidence.json:
- AttackInfo activation:
ev_0cc37e0846b6c5fec44cd473f9f37925b7f4306a91fbda1205dd100b39e99ff2. - Holder queue delivery:
ev_790e0fb860befdf361ba02e2da4774481ec57677ce1d6bd1ba5c975915020df9. - Queue insertion:
ev_ca279c37ea9a840dee4b09faef44c804e8b296d284356a7e6f8bd26479d61636. - Impact consumption:
ev_520ea6a76399b14f885b060bd23c6ddafd4226878686f08217ba4da81894dba1. - Missing-attacker fallback:
ev_413afb184890a3558f249b230ebf838e3f9a8c0828eb2968b647339e95b2b029.
This contract does not exercise the network reader, actual animation scheduling, renderer, death implementation, sound, chat text or server critical probability/damage calculations. It tests the exact original activation and queue algorithms with supplied outcomes. Browser testing must still verify critical text, animation timing and complete packet flow.
Build/run logs are native-contract-build.log, native-contract.log,
wasm-contract-build.log and wasm-contract.log in this directory.