aorecomp

Anarchy Online classic in the browser

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


commit 3f3c4a57eea2682321dca4fc680d2e234026636c
parent 33b1d1f5522f0f45ac6ea65d316b7f3d1122202c
Author: anon <anon@example.com>
Date:   Mon,  2 Nov 2026 07:53:59 +0000

Cover level-nine training gates for retained QL10 armor

Verify the level-eight Agility cap, earned level-nine IP award, strict wear equality, exact training costs and cold conservation through pants/glove wear and removal. Record the ordinary Backyard1 bank picking gap for a separate native access audit.

Diffstat:
MTODO.md | 16++++++++++++++++
Mdocs/character-progression.md | 25++++++++++++++++++++++++-
Aserver/ninth_level_reward_test.go | 120+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 160 insertions(+), 1 deletion(-)

diff --git a/TODO.md b/TODO.md @@ -826,6 +826,12 @@ for exact records, protocol, tests and remaining reconstruction assumptions. 1275 credits, 43 laboratory/47 recharger charges and ten completed contracts. Fresh server/WASM startup conserves all 115 global physical records and the same state through both page reconnects; native level nine onward remains open. + The separate public-handler level8 -> 9 regression checks the Agility30 cap, + 4000-IP award, exact322+60 ability training, QL10 pants' strict equality + rejection with an empty destination and qualified pants/gloves wear/removal. + Every phase cold-loads retained identities, supplies, wallet and current HP; + the shortened fixture does not establish earned native level nine. See + [later earned-level regression](docs/character-progression.md#later-earned-level-regression). - [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. @@ -2994,6 +3000,16 @@ and unresolved indoor lifecycle are explicit in [flight](docs/vehicles.md#yalmah Unique scope, stack operations and reconnect/restart are covered. See [bank storage](docs/bank-storage.md) for native evidence and reconstruction policies. +- [ ] [P1] Verify ordinary Backyard1 bank rendering and picking. The earned + level-eight owner reaches within five metres of original terminal + 51005:3221752760 at [109.204704,115.00013,152.970703]. Its typed native actor + exists and projects, but no bank body is visible in the retained first-person + view and the maintained picker cannot hit it. Compare the original statel, + scene/model activation and current port before changing placement or geometry; + alternate-camera helper failures do not establish a native crash. Verify an + ordinary bank Use/transfer and cold recovery after resolving the actual cause. + The 201-terminal server tests do not prove physical native access to each. + Evidence: `local/earned-nine/native-20261101-234800/` and its README. - [x] Verify server-side bank rejection in the WASM UI with a Unique duplicate hidden in an unopened carried backpack. Action 146 restores the source and native text explains the rejection, without the action-46 contract error. diff --git a/docs/character-progression.md b/docs/character-progression.md @@ -342,7 +342,30 @@ native combat or original NPC balance. The focused earned-level, skill-training and cash-trade selection passes 20 root tests and 82 test/subtest results normally and under the race detector. -`go vet ./server/...` also passes. Native earned level eight remains open. +`go vet ./server/...` also passes. The separate +[native earned level-eight run](mission-levels.md#native-earned-level-eight) +now verifies ten full-health fights, the 442-IP batch and cold conservation. + +`TestEarnedNinthLevelUnlocksRetainedQualityTenArmor` checks the level-eight +to nine boundary with a controlled one-health level-ten encounter. At level +eight, raw Agility is capped at 30, so the requested Strength 28/Agility 31 +batch leaves both abilities, IP and retained QL10 pants/gloves unchanged. The +kill crosses 5850 current XP to level nine with 150 remaining and adds exactly +4000 IP, raising 24632 to 28632. Current health stays 180 while the maximum +rises from 281 to 288. + +Training Strength 24 -> 28 and Agility 26 -> 30 costs 322 IP, leaving 28310. +After removing the old pants to a free bag slot, the new QL10 pants still fail +their strict Agility >30 requirement. No equipment delay starts, and cold +loading retains both identities and all items. The final Agility point costs +60 IP, leaving 28250; pants/gloves then wear, remove and rewear through the +public inventory handler. Each move cold-loads exact identities, qualities, +placements, supplies, wallet, progress and unchanged current health. This +fixture does not establish ordinary earned level nine or original NPC balance. + +The new regression passes normally and under the race detector. The focused +level-five through level-nine selection passes five root tests, and vet passes. +Logs and source hashes are retained under `local/earned-nine/`. ## Retained evidence diff --git a/server/ninth_level_reward_test.go b/server/ninth_level_reward_test.go @@ -0,0 +1,120 @@ +package main + +import ( + "ao/server/gamedata" + "slices" + "testing" + "time" +) + +func TestEarnedNinthLevelUnlocksRetainedQualityTenArmor(t *testing.T) { + world, _ := newKillExperienceWorld(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, 8, 5850 + player.stats = defaultCharacterStats(4) + player.stats.Abilities = characterAbilitiesStats{24, 26, 23, 6, 7, 3} + player.stats.Body.BodyDevelopment, player.stats.Melee.OneHandBlunt = 45, 45 + player.stats.ImprovementPoints, player.health = 24632, 180 + if err := world.saveUser_locked(player); err != nil { + t.Fatal(err) + } + + // Retain the unqualified QL10 rewards beside worn armor and bought supplies. + items := []ownedItem{ + {ID: 3, Type: 51018, Template: 122691, Quality: 8, Slot: 6, Count: 1}, + {ID: 4, Type: 51022, Template: 85686, Quality: 8, Slot: 21, Count: 1}, + {ID: 5, Type: 51022, Template: 85512, Quality: 8, Slot: 27, Count: 1}, + {ID: 6, Type: 51022, Template: 85596, Quality: 6, Slot: 24, Count: 1}, + {ID: 7, Type: 51022, Template: 85512, Quality: 10, Slot: 64, Count: 1}, + {ID: 8, Type: 51022, Template: 85596, Quality: 10, Slot: 65, Count: 1}, + {ID: 9, Type: 51005, Template: 25812, Quality: 1, Slot: 66, Count: 23}, + {ID: 10, Type: 51005, Template: 25820, Quality: 1, Slot: 67, Count: 47}, + } + if err := world.saveInventory_locked(player, playerInventory{LastID: 10, Items: slices.Clone(items), Credits: 1275}); err != nil { + t.Fatal(err) + } + + // Isolate the earned award with a one-health level-ten encounter. + world.combatRoll = func(uint32) uint32 { return 0 } + world.characters[1000000].level = 10 + world.characters[1000000].combatProfile = gamedata.NPCCombatProfiles[17655][10] + trained := player.baseStats() + trained.Abilities.Strength, trained.Abilities.Agility = 28, 31 + + if err := world.handleSkillTraining(client, skillTrainingRequest(trained)[20:]); err != nil { + t.Fatal(err) + } + cold := newTestInventoryServer(t) + + for _, current := range []*server{world, cold} { + owner := current.characters[1] + if owner.level != 8 || owner.experience != 5850 || owner.stats.ImprovementPoints != 24632 || + owner.stats.Abilities != (characterAbilitiesStats{24, 26, 23, 6, 7, 3}) || + owner.health != 180 || owner.maximumHealth() != 281 || !slices.Equal(owner.inventory.Items, items) { + t.Fatal("level-eight cap changed abilities, IP, health or retained items", owner.profile(), owner.inventory) + } + } + + attackForExperience(t, world, "unarmed") + world.advanceCombat(player.rechargeUntil.Add(time.Second)) + trained.Abilities.Agility = 30 + if err := world.handleSkillTraining(client, skillTrainingRequest(trained)[20:]); err != nil { + t.Fatal(err) + } + time.Sleep(time.Until(player.rechargeUntil)) + if err := world.handleInventory(client, itemMovePacket(1, 27, 68)[20:]); err != nil || client.equipment == nil { + t.Fatal("old pants removal failed", err) + } + world.advanceEquipment(client.equipment.readyAt) + items[2].Slot = 68 + if err := world.handleInventory(client, inventoryMovePacket(1, 64, 27)[20:]); err != nil { + t.Fatal(err) + } + cold = newTestInventoryServer(t) + + if client.equipment != nil { + t.Fatal("QL10 pants accepted equality at the strict Agility gate") + } + for _, current := range []*server{world, cold} { + owner := current.characters[1] + if owner.level != 9 || owner.experience != 150 || owner.stats.ImprovementPoints != 28310 || + owner.stats.Abilities != (characterAbilitiesStats{28, 30, 23, 6, 7, 3}) || + owner.health != 180 || owner.maximumHealth() != 288 || owner.inventory.Credits != 1275 || + !slices.Equal(owner.inventory.Items, items) { + t.Fatal("earned award, partial training or rejected wear changed retained state", owner.profile(), owner.inventory) + } + } + + trained.Abilities.Agility = 31 + if err := world.handleSkillTraining(client, skillTrainingRequest(trained)[20:]); err != nil { + t.Fatal(err) + } + for _, move := range [][2]uint32{{64, 27}, {24, 69}, {65, 24}, {27, 70}, {70, 27}, {24, 71}, {71, 24}} { + 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("qualified reward wear or removal failed", move, err) + } + 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 != 9 || owner.experience != 150 || owner.stats.ImprovementPoints != 28250 || + owner.stats.Abilities != (characterAbilitiesStats{28, 31, 23, 6, 7, 3}) || + owner.stats.Body.BodyDevelopment != 45 || owner.stats.Melee.OneHandBlunt != 45 || + owner.health != 180 || owner.maximumHealth() != 288 || owner.inventory.Credits != 1275 || + !slices.Equal(owner.inventory.Items, items) { + t.Fatal("qualified armor lost exact training cost, current health or retained instances", move, owner.profile(), owner.inventory) + } + } + } +}