aorecomp

Anarchy Online classic in the browser

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


commit 014ad27f08656ebf2b5611cadb18d1be2f6c53cc
parent 9024baa7db5cbb57770f806acb68ad2c186fa17c
Author: anon <anon@example.com>
Date:   Thu, 29 Oct 2026 22:46:42 +0000

Expand selected-quality starter mission armor rewards

Diffstat:
MTODO.md | 6++++--
Mdocs/armor.md | 9++++++---
Mdocs/mission-levels.md | 21+++++++++++++++++++++
Mserver/gamedata/mission_booths_test.go | 2+-
Mserver/gamedata/missions.yaml | 2+-
Mserver/mission_item_rewards_test.go | 5+++++
Mserver/mission_reward_pool_test.go | 63+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
7 files changed, 101 insertions(+), 7 deletions(-)

diff --git a/TODO.md b/TODO.md @@ -71,8 +71,10 @@ the shared provisional recipe to their own original local entrance; see entry, traversal, reconnect and return. Its bound book can be collected and survives restart without respawning. Returning that exact book to its issuing booth now completes the fixed contract and atomically grants authored cash -and a selected-quality equipment reward. The small reward pool is provisional; -new missions now select the five Leets' level and scalable reward QL from player +and a selected-quality equipment reward. The provisional pool includes the six +reviewed Metaplast armor families and the Baseballbat; historical membership +and probabilities remain unresolved. +New missions now select the five Leets' level and scalable reward QL from player level and difficulty, using explicitly provisional later measurements. Leet levels 1..10 currently have admitted combat profiles; unsupported requests return no offer without charging. See [mission levels](docs/mission-levels.md). diff --git a/docs/armor.md b/docs/armor.md @@ -1,9 +1,12 @@ # Metaplast armor in 14.9.1 All six Metaplast armor families support QL 1 through 200 using their reviewed -catalog endpoint pairs. Their native identity type is 51022. Acquisition remains -fixture-controlled, like the first weapon and corpse items. The item editor can -set an intermediate quality while retaining the instance ID. +catalog endpoint pairs. Their native identity type is 51022. The shared starter +mission reward pool includes all six families at the mission's selected quality, +alongside the Baseballbat. This pool is reconstruction policy: historical +membership and probabilities remain unresolved. Gloves also occur in the +provisional training-boss loot pool. Both acquisition paths use the ordinary +item instance and equipment rules. | Piece | Worn, QL 1 | High-Quality, QL 200 | Native slots | Catalog shard | | --- | --- | --- | --- | --- | diff --git a/docs/mission-levels.md b/docs/mission-levels.md @@ -14,6 +14,27 @@ pool produces an empty offer without charging, allocating persistent identities, or modifying the recipe. Existing mission persistence already stores the concrete values. Outdoor populations still use their authored level ranges. +The provisional starter pool contains the six reviewed Metaplast families and +the Baseballbat. This provides rewards for head, chest, arms, hands, legs and +feet through the same selected-quality item rules. The exact historical pool +and selection probabilities remain unresolved. All 130 starter bindings share +this recipe; changing it cannot replace an already advertised or accepted item. + +The production-pool regression selects each of its seven entries for a level-5 +character at the hardest setting. Every offer advertises QL8 with its reviewed +endpoint pair. Acceptance retains that promise after a pool edit; cold loading +retains all five level-8 encounters. Settlement checks cover the additional +Metaplast pieces at QL8, duplicate returns and exact cold ownership. The related +reward and quality selection passes 23 test roots / 169 results both normally +and under the race detector, plus `go vet ./server/...`. + +An existing native contract also retained its promised QL8 bat across deployment +of this larger pool. Both GPU WASM clients reconstructed all 34 owned instances; +the two killed encounters stayed dead and the three remaining encounters loaded +at full health. The ordinary observer saw no private encounters. Evidence is in +`local/earned-level-six/pool-cold-native-verified.json` and +`local/earned-level-six/reward-tests-verified.json`. + ## Evidence and provisional policy The shipped `text/help/The Mission Window.txt` describes difficulty relative to diff --git a/server/gamedata/mission_booths_test.go b/server/gamedata/mission_booths_test.go @@ -88,7 +88,7 @@ func TestStarterMissionTemplateReferencesOriginalAssets(t *testing.T) { item := ItemTemplates[definition.ObjectiveItem] if definition.Playfield != booth.Playfield || definition.Playfield != 3000 || definition.Entrance != 3221228472 || - len(definition.RewardItems) != 2 || definition.RewardItems[0] != 85596 || definition.RewardItems[1] != 122691 || definition.RewardQuality != 0 || + !slices.Equal(definition.RewardItems, []uint32{85596, 85742, 85638, 85512, 85557, 85686, 122691}) || definition.RewardQuality != 0 || !ItemQualitySupported(85596, 2) || !ItemQualitySupported(122691, 2) || definition.PassageDoor != 41565 || definition.Position != [3]float32{89.30216217041016, 115.14443969726562, 151.16087341308594} || item == nil || item.ID != 40822 || item.Quality == nil || *item.Quality != 1 || diff --git a/server/gamedata/missions.yaml b/server/gamedata/missions.yaml @@ -18,7 +18,7 @@ experience: 100 # Reconstruction pool at mission QL; original membership and probabilities are unresolved. - reward_items: [85596, 122691] + reward_items: [85596, 85742, 85638, 85512, 85557, 85686, 122691] # Native-tested open passage; historical mission-style selection is unresolved. passage_door: 41565 diff --git a/server/mission_item_rewards_test.go b/server/mission_item_rewards_test.go @@ -125,6 +125,11 @@ func TestMissionItemRewardGrantsOneSelectedQualityInstance(t *testing.T) { {"armor low", 85596, 1, 0x052e2f0c, 85596, 85596}, {"armor intermediate", 85596, 2, 0x052e2f0c, 85596, 85595}, {"armor high", 85595, 200, 0x052e2f0c, 85595, 85595}, + {"sleeves intermediate", 85742, 8, 0x052e2f0c, 85742, 85741}, + {"boots intermediate", 85638, 8, 0x052e2f0c, 85638, 85637}, + {"pants intermediate", 85512, 8, 0x052e2f0c, 85512, 85511}, + {"helmet intermediate", 85557, 8, 0x052e2f0c, 85557, 85556}, + {"body intermediate", 85686, 8, 0x052e2f0c, 85686, 85685}, {"weapon intermediate", 123742, 2, 0x3b1d2268, 123742, 123743}, {"melee intermediate", 122691, 2, 0x3b1d2268, 122691, 122692}, {"backpack intermediate", 206730, 51, 0x465a5d73, 206730, 206731}, diff --git a/server/mission_reward_pool_test.go b/server/mission_reward_pool_test.go @@ -9,6 +9,69 @@ import ( "testing" ) +func TestStarterMissionRewardPoolRetainsEveryFamilyAtTheSelectedMissionQuality(t *testing.T) { + for choice, endpoints := range [][2]uint32{ + {85596, 85595}, {85742, 85741}, {85638, 85637}, {85512, 85511}, + {85557, 85556}, {85686, 85685}, {122691, 122692}, + } { + t.Run(fmt.Sprint(endpoints[0]), func(t *testing.T) { + definition := gamedata.MissionTemplates[3221228472] + world, output := newMissionOfferWorld(t) + gamedata.MissionTemplates[3221228472] = definition + world.nextNPC = 2000000 + player, client := world.characters[1], world.clients[1] + player.level = 5 + if err := world.saveUser_locked(player); err != nil { + t.Fatal(err) + } + draws := 0 + world.combatRoll = func(bound uint32) uint32 { + if bound != 7 { + t.Fatal("production reward pool lost a reviewed family", bound) + } + draws++ + return uint32(choice) + } + request := missionOffersRequest() + request[17] = 11 + + if err := world.handleMissionOffers(client, request); err != nil { + t.Fatal(err) + } + if client.missionOffer == nil { + t.Fatal("supported production contract returned no offer") + } + offer := *client.missionOffer + definition.RewardItems = []uint32{121567} + gamedata.MissionTemplates[3221228472] = definition + if err := world.handleMissionAcceptance(client, missionAcceptanceRequest(offer)); err != nil { + t.Fatal(err) + } + cold := reloadMissionEntranceWorld(t) + + var advertised []byte + for _, word := range []uint32{2018, endpoints[0], endpoints[1], 8, 0} { + advertised = binary.BigEndian.AppendUint32(advertised, word) + } + mission := cold.characters[1].missions[0] + if draws != 1 || mission.offer.definition.RewardItem != endpoints[0] || mission.offer.definition.RewardQuality != 8 || + !bytes.Contains(output.packets[1], advertised) || !bytes.Contains(missionJournalPacket(mission, mission.expiresAt), advertised) || + len(mission.offer.definition.RewardItems) != 0 || cold.characters[1].inventory.Credits != 0 || + len(cold.items) != 2 || cold.nextItem != 2 { + t.Fatal("production reward changed after advertisement or was allocated before completion", mission.offer.definition) + } + if len(offer.definition.Encounters) != 1 || offer.definition.Encounters[0].Level != 8 || len(cold.mobileNPCs[mission.world]) != 5 { + t.Fatal("reward and encounter quality did not follow the same selected mission level") + } + for _, npc := range cold.mobileNPCs[mission.world] { + if npc.level != 8 { + t.Fatal("cold encounter lost its selected mission level", npc.id, npc.level) + } + } + }) + } +} + func TestMissionRewardPoolRetainsItsAdvertisedChoiceThroughAcceptanceAndColdLoad(t *testing.T) { for _, choice := range []uint32{0, 1} { t.Run(fmt.Sprint(choice), func(t *testing.T) {