aorecomp

Anarchy Online classic in the browser

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


commit 56d02d5e6846f09e532677ffe28b679403289239
parent 497235a06246b2c4f7003b18a45be47262606d61
Author: anon <anon@example.com>
Date:   Sun,  1 Nov 2026 21:53:18 +0000

Verify earned level seven and retained quality eight armor

Diffstat:
MTODO.md | 33++++++++++++++++++++++++++++++++-
Mdocs/character-progression.md | 22+++++++++++++++++++---
Mdocs/mission-levels.md | 109+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aserver/seventh_level_reward_test.go | 99+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 259 insertions(+), 4 deletions(-)

diff --git a/TODO.md b/TODO.md @@ -136,6 +136,13 @@ instances are accounted for. See [native earned level six](docs/mission-levels.md#native-earned-level-six). Two fresh WASM clients and page reconnects retain all 39 owned items, with all 113 global item/location rows and both completed contracts conserved. +The same Enforcer has now earned level seven through fifteen full-health +level-ten encounters and three exact-book returns. Earned 705-IP training +qualifies the saved QL8 pants/body; both are worn and the previous body remains +in inventory. All eight native AC values match original endpoint interpolation. +Final cold startup and both page reconnects retain 36 owned items, 790 credits, +225 current XP, 21087 IP and full 254 HP, with all 110 physical records accounted +for. See [native earned level seven](docs/mission-levels.md#native-earned-level-seven). Next execution order: @@ -767,7 +774,8 @@ for exact records, protocol, tests and remaining reconstruction assumptions. level-7 enemies and receives the QL7 reward. Subsequent ordinary level-5 kills now earn player level5, whose normal training unlocks the saved QL6 glove. The ordinary level-six boundary, training and two accepted QL8 promises - are now verified; level seven onward and an original universal HP/XP/skill + are now verified. Level seven, the saved QL8 armor and its earned training + also pass; level eight onward and an original universal HP/XP/skill curve remain unverified. See the [native upper-range check](docs/mission-levels.md#native-level-four-upper-range-check), including zero/one-free-slot reward refusals, two-slot retry and complete item accounting through reconnect. @@ -784,6 +792,12 @@ for exact records, protocol, tests and remaining reconstruction assumptions. [native earned level-six run](docs/mission-levels.md#native-earned-level-six) verifies that boundary through ordinary combat and training. The controlled fixture does not establish original encounter balance. + The level6 -> 7 regression checks above-cap refusal, the 4000-IP award, + exact 705-IP training and cold conservation through retained QL8 pants/body + wear. The [native earned level-seven run](docs/mission-levels.md#native-earned-level-seven) + verifies fifteen full-health level-ten kills, the saved rewards' qualification, + all eight effective AC values and the unchanged QL10 promise after leveling. + Its final cold check conserves all 36 player-owned items and five contracts. - [x] Verify mapped Tiny Stalkers as a second ordinary early combat family. Admit only SR01 at levels 2..4 through shared profiles, preserving medium identity confidence, attack-selection uncertainty and provisional balance. @@ -1258,6 +1272,11 @@ replay/failure tests and WASM checks are recorded in [IP training](docs/ip-train after settling and at full recovery. Correlate those native snapshots with their captured absolute health packets before attributing this to transport. See [starter fauna](docs/starter-fauna.md). + At earned raw Body Development 35, a post-kill capture receives quiet HP 102, + then predicts 106 as native counter 58 advances 230 -> 232. The next quiet + packet confirms 106 after 2040 ms; no item charge changed. This separate + prediction-phase case is retained in + `local/earned-seven/post-kill-hp-phase-verified.json`; the broader audit stays open. - [x] Use one nano-restoring item. Check: nano recovery, consumption and its lock match that item rather than inheriting the health item's behavior. - [x] Use one sitting treatment kit. Check: it works in the permitted posture @@ -3166,6 +3185,13 @@ with payloads and known client/server provenance. The later seven-part sale also confirms that initially sparse logical slots can occupy compact GUI cells. Its wire offers identify exact sources despite the visual order; see [earned recovery restock](docs/mission-levels.md#earned-recovery-restock). +- [ ] [P2] Capture effective equipment defenses in the browser harness. + Actor stat snapshots contain raw AC 90..97, while worn-item modifiers are + separate. Check: repeatable snapshots distinguish base values from all eight + effective AC values and agree with the original Protection form through + wear, removal, reconnect and cold startup. The earned QL8 body/pants run + currently verifies effective values by inspecting that form's screenshots; + raw zero AC entries are not evidence of lost armor. - [ ] [P1] Audit native inventory-proxy identities immediately after rewards. Mission 81's new boots have the correct slot, QL, templates and count while their raw proxy still reports type/id 0; page replay populates exact ID 87. @@ -3177,6 +3203,11 @@ with payloads and known client/server provenance. A later ordinary laboratory purchase has the same initial proxy shape; cold reconstruction supplies permanent ID253 with all 50 charges intact. See [earned recovery restock](docs/mission-levels.md#earned-recovery-restock). + Another earned laboratory, instance 263, has the same initial proxy shape. + Ordinary shop-to-city zoning populates identity 51005/263 while retaining + its slot, templates and 50 charges. Immediate use before zoning remains + unverified. + Evidence: `local/earned-seven/tmp_proxy_history.py` and its native captures. - [ ] [P1] Audit inventory layout persistence through city/shop zoning and earned sales. The connected run starts with its saved 516-byte map, then an OPFS inspection after the ten-part sale/laboratory purchase returns no icon files. diff --git a/docs/character-progression.md b/docs/character-progression.md @@ -303,10 +303,26 @@ than native encounter balance. The separate [ordinary earned level-six run](mission-levels.md#native-earned-level-six) now verifies the boundary and the same training cost through the WASM client. -The focused progression/training selection passes 18 root tests and 81 total +`TestEarnedSeventhLevelUnlocksRetainedQualityEightArmor` checks level six to +seven with a controlled 150-XP encounter at 4925 current XP. An above-cap +training batch preserves raw abilities, IP and both saved QL8 rewards. The +kill leaves 75 XP and awards 4000 IP while maximum health rises from 227 to +234 and current health stays 150. + +Training Strength 19 -> 24, Agility 21 -> 26, Body Development 35 -> 40 and +1h Blunt 35 -> 40 costs exactly 705 IP, leaving 21087. Maximum health becomes +254 without refilling current health. The retained QL8 pants can then be worn; +removing the QL5 body preserves it in inventory before the QL8 body is worn. +Cold reconstruction after each equipment move retains every identity, quality, +slot, charge count, wallet and trained stat. The controlled encounter isolates +progression bookkeeping and does not measure original encounter balance. The +[ordinary earned level-seven run](mission-levels.md#native-earned-level-seven) +verifies the same training and saved rewards through native input. + +The focused progression/training selection passes 18 root tests and 75 total test/subtest results both normally and under the race detector. It includes -both later earned-level regressions, all six kill attack paths and the skill -training suite. `go vet ./server/...` also passes. +all three later earned-level regressions and the skill training suite. +`go vet ./server/...` also passes. ## Retained evidence diff --git a/docs/mission-levels.md b/docs/mission-levels.md @@ -395,3 +395,112 @@ mission records; the active Thug's Delight retains its ordinary remaining duration. The cold check passed in 26.08 seconds. Evidence is in `local/earned-sixth-boundary/sixth-cold-20261101-092446/` and `sixth-cold-verified.json`. + +## Native earned level seven + +The retained Atrox Enforcer continued from level six with 725 current XP, +18004 IP, full 227 HP, 177 credits and 32 owned items. Ten spare equipment and +loot instances sold for 638 credits through ordinary city/shop travel. Buying +one 50-charge laboratory for 150 credits left 665. All other original items +and the older laboratory counts 21/31/17 were conserved. Native training raised +raw Evade Close 21 -> 27 for 212 IP before the next encounters. + +Three first, unforced hard offers requested at level six selected level-ten +encounters and QL10 promises: Metaplast boots, helmet and sleeve. Each request +cost six credits. All fifteen encounters began at their full 300 HP, with the +player at full 227 HP. The same earned QL8 bat, QL5 body and QL6 gloves remained +equipped through every fight. Thug's Delight supplied its original +14 1h Blunt +modifier, giving attack rating 54. A normal refresh through Programs spent +19 nano points and retained one active instance with the authored hour duration. + +The fifteen kills added 4500 XP. The last crossed 4925 current XP to level +seven with 225 remaining and one 4000-IP award, leaving 21792 IP. Its native +level-up payload was `[7,21792,20875,20650,26150,0,2,300]`. Maximum health rose +to 234 while current health stayed damaged at 75. The private observer retained +zero XP/cash, its seven issued items and 1500 IP, without private encounters or +the owner's level-up payload. Encounter HP, XP and skills remain the existing +explicit provisional profiles; this run does not establish original NPC growth +or a universal balance curve. + +One immediate post-kill sample records native HP 106 and server HP 102. +The wire first delivered quiet HP 102; native counter 58 then advanced +230 -> 232 and predicted four HP. The next quiet packet confirmed 106 after +2040 ms, before any laboratory use. The audit retains both sampled values and +their packet chronology. This is a measured prediction-phase case within the +existing broader health audit, not evidence of a newly working combat heal. + +The first two exact-book returns delivered boots 269 and helmet 274, both QL10, +and 40 credits. Their ten kills yielded 36 corpse credits and five Monster Parts. +Those exact parts, 266/267/268/272/273, sold for 12 and 18 credits, leaving +759 credits and 25 owned items before the third request. Forty charges from +laboratory 263 left ten; the older laboratories remained unchanged through +those sales. The stopped checkpoint accounts for all 111 physical records; +the later sales leave 106 with every other item and placement unchanged. + +A fresh server and two fresh WASM contexts reconstructed all 37 owned items +from that checkpoint, including the newly rewarded helmet's permanent identity. +Both page reconnects retained stats, wallets, progress, supplies and all four +completed contracts without page errors. The third contract was then accepted +and played from that same earned state. Evidence is retained under +`local/earned-seven/`, including `first-checkpoint-verified.json`, +`resume-cold-verified.json`, `continued-sales-verified.json`, +`post-kill-hp-phase-verified.json`, `native-fights-progress.json` and +`seventh-boundary-verified.json`. + +After the earned level-up, one native training batch spent 705 IP: Strength +19 -> 24, Agility 21 -> 26, raw Body Development 35 -> 40 and raw 1h Blunt +35 -> 40. The staged form left server state unchanged until ACCEPT. Current +health stayed 234 while maximum health became 254; one ordinary laboratory +charge then restored full health. Attack rating became 59. These are earned +skill purchases, not control-editor changes. + +The saved QL8 pants and body both require strict Strength >23 and Agility >25. +The new abilities qualify both. Native wear moved pants 262 to slot 27; +removing the QL5 body 252 retained it in bag slot 72, and wearing body 257 +moved that exact QL8 instance to slot 21. All other items were conserved. +Independent interpolation of the original endpoint payloads gives pants AC +25/22/25/19/4/4/4/4 and body AC 40/36/40/31/6/6/6/6, in stat order 90..97. +The original Protection form showed all eight expected totals: without the +body, 38/34/34/27/8/8/8/8; with both rewards, 78/70/74/58/14/14/14/14. +The read-only actor snapshot contains raw AC values, so the screenshots of +this form establish the effective values. + +The third exact-book return consumed key 275 and book 276, delivered the +promised QL10 Metaplast sleeve 280 and added 20 credits. The promise selected +at level six stayed unchanged after reaching seven. All three QL10 rewards +remain in inventory. Total corpse cash is 53; the three retained new Monster +Parts are 277/278 at QL11 and 279 at QL10. The final wallet reconciles as +177 + 638 sales - 150 purchase - 18 request fees + 53 corpse cash + 60 rewards ++ 30 later part sales = 790 credits. + +The stopped database accounts for all 110 physical item/location records: +29 owner items, seven observer items and 74 other items. All ten originally +sold instances and five later sold parts are absent; every other original +instance is conserved, with only the documented equipment moves and laboratory +239's charge debit. The four laboratories retain 21/9/17/10 charges after +62 uses. Every old mission/encounter row remains unchanged, all three new +contracts are complete and all fifteen new encounters are dead. Unrelated +wallets, learned programs and character stats are unchanged. Integrity and +foreign-key checks pass. See `third-contract-verified.json`, +`seventh-training-verified.json`, `seventh-armor-verified.json`, +`quality-eight-armor-expected.json` and +`final-checkpoint-verified.json` under `local/earned-seven/`. + +A second fresh server and two fresh WASM contexts reconstructed the final +36 owned items with permanent identities, all five completed contracts, the +trained stats, full health/nano and wallets. Both page reconnects retained +that state without native errors. The Protection form again showed the same +eight effective AC values after cold startup and after reconnect. Independent +SQL comparison conserved every item/location, wallet, learned program and +mission row; ordinary NPC movement, regeneration clocks and the running nano +duration advanced normally. See `final-cold-verified.json` and +`cold-20261101-135131/` under `local/earned-seven/`. Both owned browser runs +closed their clients and temporary servers normally. + +The focused Go progression/training selection passes 18 root tests and 75 +results normally and under the race detector; vet passes. The controlled +[level-seven regression](character-progression.md#later-earned-level-regression) +checks cap refusal, the earned IP award, the 705-IP batch, preserved current +health and cold conservation through both armor moves. Original NPC balance, +level eight onward, conditional mission XP/tokens and broader coverage remain +open. diff --git a/server/seventh_level_reward_test.go b/server/seventh_level_reward_test.go @@ -0,0 +1,99 @@ +package main + +import ( + "slices" + "testing" + "time" +) + +func TestEarnedSeventhLevelUnlocksRetainedQualityEightArmor(t *testing.T) { + world := newOmniTrainingBossKillWorld(t, "unarmed") + player, client := world.characters[1], world.clients[1] + player.appearance = player.appearance&^(7<<4) | 4<<4 + player.profession, player.level, player.experience = 9, 6, 4925 + player.stats = defaultCharacterStats(4) + player.stats.Abilities = characterAbilitiesStats{19, 21, 22, 6, 7, 3} + player.stats.Body.BodyDevelopment, player.stats.Melee.OneHandBlunt = 35, 35 + player.stats.Body.Brawling, player.stats.Body.Dimach = 21, 11 + player.stats.Melee.SneakAttack, player.stats.Melee.FastAttack = 19, 19 + player.stats.Speed.EvadeClose = 27 + player.stats.ImprovementPoints, player.health = 17792, 150 + if err := world.saveUser_locked(player); err != nil { + t.Fatal(err) + } + + // Retain both unqualified rewards beside the worn equipment and supplies. + items := []ownedItem{ + {ID: 3, Type: 51018, Template: 122691, Quality: 8, Slot: 6, Count: 1}, + {ID: 4, Type: 51005, Template: 25812, Quality: 1, Slot: 64, Count: 31}, + {ID: 5, Type: 51022, Template: 85686, Quality: 5, Slot: 21, Count: 1}, + {ID: 6, Type: 51022, Template: 85686, Quality: 8, Slot: 65, Count: 1}, + {ID: 7, Type: 51022, Template: 85512, Quality: 8, Slot: 66, Count: 1}, + } + if err := world.saveInventory_locked(player, playerInventory{LastID: 7, Items: slices.Clone(items), Credits: 665}); err != nil { + t.Fatal(err) + } + + // The one-hit encounter isolates earned caps, training and retained rewards. + world.combatRoll = func(uint32) uint32 { return 0 } + trained := player.baseStats() + trained.Abilities.Strength, trained.Abilities.Agility = 24, 26 + trained.Body.BodyDevelopment, trained.Melee.OneHandBlunt = 40, 40 + + if err := world.handleSkillTraining(client, skillTrainingRequest(trained)[20:]); err != nil { + t.Fatal(err) + } + if err := world.handleInventory(client, inventoryMovePacket(1, 66, 27)[20:]); err != nil { + t.Fatal(err) + } + cold := newTestInventoryServer(t) + + if player.level != 6 || player.experience != 4925 || player.stats.Abilities != (characterAbilitiesStats{19, 21, 22, 6, 7, 3}) || + player.stats.Body.BodyDevelopment != 35 || player.stats.Melee.OneHandBlunt != 35 || player.stats.ImprovementPoints != 17792 || + client.equipment != nil || player.health != 150 || player.maximumHealth() != 227 || cold.characters[1].stats != player.stats || + !slices.Equal(cold.characters[1].inventory.Items, items) { + t.Fatal("level-six cap or rejected wear changed retained rewards, skills or IP", player.stats, player.inventory) + } + + attackForExperience(t, world, "unarmed") + world.advanceCombat(player.rechargeUntil.Add(time.Second)) + cold = newTestInventoryServer(t) + + for _, current := range []*server{world, cold} { + owner := current.characters[1] + if owner.level != 7 || owner.experience != 75 || owner.stats.ImprovementPoints != 21792 || owner.health != 150 || owner.maximumHealth() != 234 || + owner.stats.Body.BodyDevelopment != 35 || owner.stats.Melee.OneHandBlunt != 35 || !slices.Equal(owner.inventory.Items, items) || owner.inventory.Credits != 665 { + t.Fatal("earned level changed current health or lost its IP award or retained rewards", owner.profile(), owner.inventory) + } + } + + if err := world.handleSkillTraining(client, skillTrainingRequest(trained)[20:]); err != nil { + t.Fatal(err) + } + time.Sleep(time.Until(player.rechargeUntil)) + for _, move := range [][2]uint32{{66, 27}, {21, 66}, {65, 21}} { + request := inventoryMovePacket(1, move[0], move[1]) + if move[0] < 64 { + request = itemMovePacket(1, move[0], move[1]) + } + if err := world.handleInventory(client, request[20:]); err != nil || client.equipment == nil { + t.Fatal("earned training did not allow retained armor wear or removal", move, err, player.stats) + } + world.advanceEquipment(client.equipment.readyAt) + for index := range items { + if items[index].Slot == move[0] { + items[index].Slot = move[1] + } + } + cold = newTestInventoryServer(t) + + for _, current := range []*server{world, cold} { + owner := current.characters[1] + if owner.level != 7 || owner.experience != 75 || owner.stats.ImprovementPoints != 21087 || owner.health != 150 || owner.maximumHealth() != 254 || + owner.stats.Abilities != (characterAbilitiesStats{24, 26, 22, 6, 7, 3}) || owner.stats.Body.BodyDevelopment != 40 || owner.stats.Melee.OneHandBlunt != 40 || + owner.stats.Speed.EvadeClose != 27 || !slices.Equal(owner.inventory.Items, items) || owner.inventory.Credits != 665 { + t.Fatal("earned armor wear lost exact training cost, current health, identity or quality", move, owner.profile(), owner.inventory) + } + } + } +}