commit b439fd677e4abccc9da75abb103a8b420b91a5c3
parent d678d798b5f9c6e6a989d5cd07b566679f8a7651
Author: anon <anon@example.com>
Date: Wed, 28 Oct 2026 02:28:39 +0000
Add reviewed Low-Tech gloves to basic armor stock
Diffstat:
9 files changed, 344 insertions(+), 9 deletions(-)
diff --git a/TODO.md b/TODO.md
@@ -236,7 +236,9 @@ unverified mass/deletion/reclaim policies are in [backpacks](docs/backpacks.md).
low/high template delivery at low, intermediate and boundary QLs. Include
pickup, rejected wear, equip/remove, sale and cold recovery of the same instance.
Metaplast and one reviewed QL1..11 Rusty pistol family now use the shared QL
- path; useful production loot/shop membership and wider early families remain.
+ path. Reviewed Low-Tech gloves now add QL1/2 basic-shop upgrades through the
+ same consumers; ordinary earned funding, useful loot pools and wider early
+ families remain. See [early armor](docs/early-armor.md).
- [x] Verify one intermediate-quality weapon family through shared consumers.
Check: Rusty pistol endpoints 123742/123743 at QL1,2,5,6,10,11 preserve selected
damage, criticals, strict requirements, OE, delays, ammo, price and native
@@ -1107,6 +1109,16 @@ introduction and starting-item gameplay remain open below.
booth and require Strength 17/Agility 18; the earlier first-level NT run had
earned only 53 before recovery spending. Audit provisional NPC health/rewards
and recovery economics together; a controlled wallet does not prove affordability.
+- [x] Add a cheaper, level-attainable basic-armor option through reviewed data.
+ Low-Tech gloves use explicit QL1..200 endpoints and QL1/2 stock at the original
+ Omni/Clan/neutral basic armor booths. Preserve authored prices, strict wear
+ requirements, native endpoint delivery and all eight AC effects; test purchase,
+ removal, sale, cold recovery and SQL failure/ignored placement/commit retry.
+ The fixed stock subset is reconstruction policy. GPU WASM checks verify
+ both purchases, strict wear, effects/removal, canceled/accepted sale, insufficient
+ funds and exact cold retention. Controlled funds/stats/location do not close
+ the ordinary earned-income upgrade gate above. See
+ [early armor](docs/early-armor.md).
- [x] Preserve selected QL through shop catalogs, quotes, basket quantities,
purchases and native delivery. Each stock entry specifies template and QL;
reviewed families supply interpolation and invalid rows fail startup. Basic
diff --git a/docs/early-armor.md b/docs/early-armor.md
@@ -0,0 +1,96 @@
+# Low-Tech starter armor
+
+Basic Omni, Clan and neutral armor terminals now offer Low-Tech gloves at QL1
+and QL2 alongside the existing QL5 Metaplast subset. Original template 70562
+(Battered) and 85597 (Enhanced) form one reviewed QL1..200 family. The existing
+item-quality, requirements, armor, price, native delivery and transaction code
+supplies all behavior; there is no Low-Tech-specific Go branch.
+
+## Original item evidence
+
+Both complete 14.9.1 records have type 51022, ItemType 2, CanWear, gloves slot mask
+256, one texture descriptor and eight unconditional armor modifiers. Their
+section/action/function layouts match. The only variable scalar properties are
+quality stat 54, value stat 74 and properties 1/2; armor effects and strict
+Agility (stat17) / Strength (stat16) wear thresholds also vary. Their description
+explicitly calls the metal-plated clothing cheap and uncomfortable.
+
+| QL | Strength / Agility must exceed | AC90..97 | Base value |
+| --- | --- | --- | ---: |
+| 1 | 7 / 7 | 3/3/1/1/1/1/1/1 | 125 |
+| 2 | 9 / 9 | 4/4/2/1/1/1/1/1 | 127 |
+| 100 | 227 / 252 | 110/110/94/19/19/19/19/19 | 29536 |
+| 101 | 230 / 255 | 111/111/94/19/19/19/19/19 | 30134 |
+| 199 | 448 / 498 | 217/217/186/37/37/37/37/37 | 117773 |
+| 200 | 450 / 500 | 218/218/187/37/37/37/37/37 | 118965 |
+
+Intermediate values use the existing native-derived rounding and quadratic
+value stat 74 curve. Requirements remain strict; equality rejects wear without
+losing the item. Either stored endpoint resolves the same selected quality. The nearer
+endpoint supplies nonnumeric fields, with exact boundary delivery collapsing to
+one template. Armor overequipping retains the shared per-instance rules.
+
+Original payload SHA-256:
+
+- 70562: `5a04abd778e5e5cff91a763fbccf23d1a0ecb03d59783be93e655f4cca32e84a`.
+- 85597: `9c4e030393ba5e8fe6374a3fa4e1bcc56c64b896579c23f38c7bae4bf1271478`.
+
+Complete records, byte slices, index digest, catalog equality and every differing
+scalar, effect and criterion are retained in `local/early-armor-research/audit.json`.
+These records establish item behavior, not a universal pairing heuristic or
+original shop stock generation.
+
+## Purchase policy and progression boundary
+
+The two fixed rows in basic armor templates 99383/99502/99570 are reconstruction
+policy. Original terminal descriptions establish the basic armor category,
+without enumerating membership or refresh probabilities. No advanced, superior
+or training-terminal stock is inferred from this subset. No creature acquires
+an equipment drop from this change.
+
+At effective Computer Literacy 40, QL1/2 cost 124/126 credits in Omni basic armor
+and 130/132 in Clan/neutral. At a starter's lower literacy the Omni prices are
+125/127. This preserves original values and vendor modifiers. QL1 can be worn
+with two abilities at 8, while QL2 requires 10; ordinary IP and breed/level caps
+still apply. These are cheaper low-level upgrades, not proof that the current
+loot economy funds them suitably or that every breed can immediately wear them.
+The ordinary earned-income purchase/equip acceptance gate remains open.
+
+## Verification
+
+Public inventory handlers test both stored anchors at QL1,2,100,101,199,200,
+including equality rejection for each requirement, native wear endpoints,
+resolved value, all eight armor effects, removal and cold identity conservation.
+Production-booth tests buy both qualities in all three factions with the exact
+required balance, wear/remove and sell once despite a repeated acceptance.
+Failed item inserts, ignored placement and deferred commit failures retain cash,
+items and identity counters; the same purchase can retry successfully.
+
+The armor/shop regression selection passed 111 roots / 1,200 results; the new
+lifecycle selection passed 3 roots / 24 results under the race detector. Vet and
+the development-server build passed. These checks exercise the existing shared
+consumers rather than introduce a separate armor implementation.
+
+A headless Chromium WASM session used the GPU OpenGL renderer, verified from
+its actual GPU metadata. Native controls bought QL1 for 125, wore it at abilities 8
+and applied 3/3/1/1/1/1/1/1 AC. Removal cleared those effects. A canceled sale
+retained the item and wallet 127; the accepted sale removed it and credited 7,
+leaving 134. The QL2 purchase cost 127 and retained the low/high pair 70562/85597.
+Wear at abilities 8 failed with the native requirements message for 10; at 10 it
+applied 4/4/2/1/1/1/1/1 AC. Another QL1 stock pick correctly reported 118 extra
+credits needed from the remaining 7. These are controlled funds, stats and
+location, not the ordinary earned-income acceptance scenario.
+
+Initial exploratory catalog interactions sent no purchase request and are not
+counted as purchases or rejection coverage. Actual successful offers, payments,
+wear, cancellation and sale are checked against read-only native snapshots and
+SQLite. The temporary driver closes its owned browser in `finally`; user-owned
+desktop sessions are left alone. Evidence is retained in
+`local/early-armor-research/`.
+
+After closing the browser and restarting the sole preview, a fresh WASM session
+retained exact worn instance 15 at QL2, wallet 7 and all eight armor bonuses. The
+sold QL1 instance 14 remained absent. No page exception or adapter abort occurred;
+ordinary resource 404 console entries are retained separately. Only the owned
+fixture account and remaining purchased item are cleaned up; unrelated rows and
+SQLite integrity are checked before restoring the single HTTPS preview.
diff --git a/docs/npc-loot.md b/docs/npc-loot.md
@@ -80,9 +80,10 @@ Startup rejects missing/zero or reversed bounds, unknown templates and intervals
outside the template's reviewed family. Fixed-QL items accept only their authored
quality as both bounds. Quality is sampled after successful membership; fixed
and empty drops do not consume a quality roll. The shared
-`server/gamedata/item_families.yaml` lists ten reviewed endpoint pairs:
+`server/gamedata/item_families.yaml` lists eleven reviewed endpoint pairs:
six Metaplast pieces, Backpack of Survival, NCU Hacker Interface, the QL1..11
-Rusty OT M-10 Flechette Pistol and regular QL1..400 Monster Parts.
+Rusty OT M-10 Flechette Pistol, regular QL1..400 Monster Parts and QL1..200
+Low-Tech gloves.
Either endpoint identifies a family. No name or neighboring-ID heuristic pairs
additional definitions, and listing a pair does not implement its effects.
diff --git a/docs/shops.md b/docs/shops.md
@@ -160,8 +160,10 @@ including the reachable combined shops 1180/1183/1186. The original category
ranges do not enumerate item membership or recover random generation/rotation.
The fixed six-piece QL5 Metaplast selection is an explicit reconstruction,
-not a recovered historical stock table. It uses the already reviewed original
-QL1/200 endpoint families: gloves 85596, sleeves 85742, boots 85638, pants 85512,
+not a recovered historical stock table. The basic booths additionally offer a
+fixed QL1/2 Low-Tech glove subset; see [early armor](early-armor.md). Metaplast uses
+the already reviewed original QL1/200 endpoint families: gloves 85596, sleeves
+85742, boots 85638, pants 85512,
helmet 85557 and body 85686. Both arms can use separate sleeve instances. Advanced,
superior, starter and unrelated terminal stock is unchanged. There is no new
family-specific pricing, requirement, delivery or equipment branch.
diff --git a/server/gamedata/item_families.yaml b/server/gamedata/item_families.yaml
@@ -15,3 +15,5 @@
- [123742, 123743]
# Monster Parts: complete original descriptor audit; docs/npc-loot.md.
- [42640, 42641]
+# Low-Tech gloves: complete original descriptor audit; docs/early-armor.md.
+- [70562, 85597]
diff --git a/server/gamedata/item_quality_test.go b/server/gamedata/item_quality_test.go
@@ -13,6 +13,7 @@ func TestReviewedItemFamilyQualityRanges(t *testing.T) {
{85512, 85511, 1, 200}, {85557, 85556, 1, 200}, {85596, 85595, 1, 200},
{85638, 85637, 1, 200}, {85686, 85685, 1, 200}, {85742, 85741, 1, 200},
{42640, 42641, 1, 400}, {206730, 206731, 50, 150}, {158416, 158417, 1, 200}, {123742, 123743, 1, 11},
+ {70562, 85597, 1, 200},
} {
for _, template := range [2]uint32{family.lowTemplate, family.highTemplate} {
t.Run(fmt.Sprint(template), func(t *testing.T) {
diff --git a/server/gamedata/shop_stock.yaml b/server/gamedata/shop_stock.yaml
@@ -55,6 +55,7 @@
# Basic armor: a fixed QL5 Metaplast subset of the original basic-armor family.
# This is reconstruction policy; complete membership and rotation remain open.
# See docs/shops.md for the stock and authored-value evidence boundary.
-99383: [{template: 85596, quality: 5}, {template: 85742, quality: 5}, {template: 85638, quality: 5}, {template: 85512, quality: 5}, {template: 85557, quality: 5}, {template: 85686, quality: 5}]
-99502: [{template: 85596, quality: 5}, {template: 85742, quality: 5}, {template: 85638, quality: 5}, {template: 85512, quality: 5}, {template: 85557, quality: 5}, {template: 85686, quality: 5}]
-99570: [{template: 85596, quality: 5}, {template: 85742, quality: 5}, {template: 85638, quality: 5}, {template: 85512, quality: 5}, {template: 85557, quality: 5}, {template: 85686, quality: 5}]
+# The cheaper Low-Tech QL1/2 glove subset uses the same policy; docs/early-armor.md.
+99383: [{template: 85596, quality: 5}, {template: 85742, quality: 5}, {template: 85638, quality: 5}, {template: 85512, quality: 5}, {template: 85557, quality: 5}, {template: 85686, quality: 5}, {template: 70562, quality: 1}, {template: 70562, quality: 2}]
+99502: [{template: 85596, quality: 5}, {template: 85742, quality: 5}, {template: 85638, quality: 5}, {template: 85512, quality: 5}, {template: 85557, quality: 5}, {template: 85686, quality: 5}, {template: 70562, quality: 1}, {template: 70562, quality: 2}]
+99570: [{template: 85596, quality: 5}, {template: 85742, quality: 5}, {template: 85638, quality: 5}, {template: 85512, quality: 5}, {template: 85557, quality: 5}, {template: 85686, quality: 5}, {template: 70562, quality: 1}, {template: 70562, quality: 2}]
diff --git a/server/low_tech_armor_test.go b/server/low_tech_armor_test.go
@@ -0,0 +1,220 @@
+package main
+
+import (
+ "ao/server/gamedata"
+ "bytes"
+ "encoding/binary"
+ "fmt"
+ "slices"
+ "testing"
+)
+
+func TestLowTechGloveQualityWearAndRecovery(t *testing.T) {
+ for _, anchor := range []uint32{70562, 85597} {
+ for _, scenario := range []struct {
+ quality, value uint32
+ strength, agility uint16
+ armor [8]int32
+ }{
+ {1, 125, 7, 7, [8]int32{3, 3, 1, 1, 1, 1, 1, 1}},
+ {2, 127, 9, 9, [8]int32{4, 4, 2, 1, 1, 1, 1, 1}},
+ {100, 29536, 227, 252, [8]int32{110, 110, 94, 19, 19, 19, 19, 19}},
+ {101, 30134, 230, 255, [8]int32{111, 111, 94, 19, 19, 19, 19, 19}},
+ {199, 117773, 448, 498, [8]int32{217, 217, 186, 37, 37, 37, 37, 37}},
+ {200, 118965, 450, 500, [8]int32{218, 218, 187, 37, 37, 37, 37, 37}},
+ } {
+ t.Run(fmt.Sprintf("%d/QL%d", anchor, scenario.quality), func(t *testing.T) {
+ world, output := newEquipmentWorld(t)
+ t.Cleanup(func() { world.db.Close() })
+ player, client := world.characters[1], world.clients[1]
+ player.stats.Abilities.Strength, player.stats.Abilities.Agility = scenario.strength+1, scenario.agility+1
+ if err := world.saveUser_locked(player); err != nil {
+ t.Fatal(err)
+ }
+ if granted, err := world.grantItem_locked(player, anchor); err != nil || !granted {
+ t.Fatal(granted, err)
+ }
+ player.inventory.Items[1].Quality = scenario.quality
+ if err := world.saveInventory_locked(player, player.inventory); err != nil {
+ t.Fatal(err)
+ }
+ weapon := player.inventory.Items[0]
+
+ // Each authored threshold is strict; rejection must retain the item.
+ for _, ability := range []*uint16{&player.stats.Abilities.Strength, &player.stats.Abilities.Agility} {
+ *ability -= 1
+ if err := world.handleInventory(client, inventoryMovePacket(1, 65, 24)[20:]); err != nil || client.equipment != nil || player.inventory.Items[1].Slot != 65 {
+ t.Fatal("threshold equality equipped or lost the gloves", err)
+ }
+ *ability += 1
+ }
+ output.packets = nil
+ if err := world.handleInventory(client, inventoryMovePacket(1, 65, 24)[20:]); err != nil || client.equipment == nil {
+ t.Fatal("qualified selected-quality gloves did not start wear", err)
+ }
+ world.advanceEquipment(client.equipment.readyAt)
+ cold := newTestInventoryServer(t)
+ low, high := uint32(70562), uint32(85597)
+ if scenario.quality == 1 {
+ high = low
+ } else if scenario.quality == 200 {
+ low = high
+ }
+ var action []byte
+ for _, word := range []uint32{low, high, scenario.quality, 1, 6, 102, 24, 0, 0} {
+ action = binary.BigEndian.AppendUint32(action, word)
+ }
+ if len(output.packets) != 2 || !bytes.Equal(output.packets[1][29:65], action) {
+ t.Fatal("native wear lost the selected quality or endpoints")
+ }
+ if err := world.handleInventory(client, itemMovePacket(1, 24, 111)[20:]); err != nil || client.equipment == nil {
+ t.Fatal("selected-quality gloves could not be removed", err)
+ }
+ world.advanceEquipment(client.equipment.readyAt)
+ removed := newTestInventoryServer(t)
+
+ expected := ownedItem{ID: 2, Type: 51022, Template: anchor, Quality: scenario.quality, Slot: 24, Count: 1}
+ if !slices.Equal(cold.characters[1].inventory.Items, []ownedItem{weapon, expected}) || cold.characters[1].inventory.Items[1].shopPrice() != scenario.value {
+ t.Fatal("cold worn quality, identity, value or unrelated item changed", cold.characters[1].inventory)
+ }
+ expected.Slot = 65
+ if !slices.Equal(removed.characters[1].inventory.Items, []ownedItem{weapon, expected}) || removed.nextItem != 2 {
+ t.Fatal("removal lost or replaced the selected instance")
+ }
+ for index, bonus := range scenario.armor {
+ if cold.characters[1].equipmentBonus(90+uint32(index)) != bonus || removed.characters[1].equipmentBonus(90+uint32(index)) != 0 {
+ t.Fatal("selected armor effects or removal changed", index)
+ }
+ }
+ })
+ }
+ }
+}
+
+func TestLowTechBasicArmorPurchaseWearAndSale(t *testing.T) {
+ for _, terminal := range []struct {
+ id uint32
+ side uint16
+ prices, sales [2]uint32
+ }{
+ {3221226655, 2, [2]uint32{124, 126}, [2]uint32{7, 7}},
+ {3223389340, 1, [2]uint32{130, 132}, [2]uint32{5, 5}},
+ {3222078626, 0, [2]uint32{130, 132}, [2]uint32{5, 5}},
+ } {
+ for row, quality := range []uint32{1, 2} {
+ t.Run(fmt.Sprintf("%d/QL%d", terminal.id, quality), func(t *testing.T) {
+ world, _ := newPurchaseWorld(t)
+ t.Cleanup(func() { world.db.Close() })
+ player, client := world.characters[1], world.clients[1]
+ machine := gamedata.ShopMachines[terminal.id]
+ player.playfield, player.position, player.appearance = machine.Playfield, machine.Position, 0x115|terminal.side<<9
+ player.stats.Abilities.Strength, player.stats.Abilities.Agility = 10, 10
+ player.inventory.Credits = terminal.prices[row]
+ if err := world.saveUser_locked(player); err != nil {
+ t.Fatal(err)
+ }
+ if err := world.savePosition_locked(player); err != nil {
+ t.Fatal(err)
+ }
+ if err := world.saveInventory_locked(player, player.inventory); err != nil {
+ t.Fatal(err)
+ }
+ weapon := player.inventory.Items[0]
+ request := shopUseRequest(2)
+ binary.BigEndian.PutUint32(request[44:48], terminal.id)
+
+ if err := world.handleShopUse(client, request); err != nil {
+ t.Fatal(err)
+ }
+ if client.shop == nil || len(client.shop.stock) != 8 || client.shop.stock[6+row] != (gamedata.ShopItem{Template: 70562, Quality: quality}) {
+ t.Fatal("basic armor lacks its low-quality glove selection")
+ }
+ for _, request := range [][]byte{
+ shopTradePacket([2]uint32{50000, 1}, 4, [2]uint32{51035, terminal.id}, [2]uint32{111, uint32(6 + row)})[20:],
+ shopTradePacket([2]uint32{50000, 1}, 1, [2]uint32{}, [2]uint32{})[20:],
+ } {
+ if err := world.handleTrade(client, request); err != nil {
+ t.Fatal(err)
+ }
+ }
+ if err := world.handleInventory(client, inventoryMovePacket(1, 65, 24)[20:]); err != nil || client.equipment == nil {
+ t.Fatal("purchased gloves did not start wear", err)
+ }
+ world.advanceEquipment(client.equipment.readyAt)
+ worn := newTestInventoryServer(t)
+ if err := world.handleInventory(client, itemMovePacket(1, 24, 111)[20:]); err != nil || client.equipment == nil {
+ t.Fatal("purchased gloves did not start removal", err)
+ }
+ world.advanceEquipment(client.equipment.readyAt)
+ request = shopUseRequest(3)
+ binary.BigEndian.PutUint32(request[44:48], terminal.id)
+ if err := world.handleShopUse(client, request); err != nil {
+ t.Fatal(err)
+ }
+ for _, request := range [][]byte{
+ shopTradePacket([2]uint32{50000, 1}, 4, [2]uint32{50000, 1}, [2]uint32{104, 65})[20:],
+ shopTradePacket([2]uint32{50000, 1}, 1, [2]uint32{}, [2]uint32{})[20:],
+ shopTradePacket([2]uint32{50000, 1}, 1, [2]uint32{}, [2]uint32{})[20:],
+ } {
+ if err := world.handleTrade(client, request); err != nil {
+ t.Fatal(err)
+ }
+ }
+ sold := newTestInventoryServer(t)
+
+ if !slices.Equal(worn.characters[1].inventory.Items, []ownedItem{weapon, {ID: 2, Type: 51022, Template: 70562, Quality: quality, Slot: 24, Count: 1}}) || worn.characters[1].inventory.Credits != 0 || worn.characters[1].equipmentBonus(91) != int32(quality+2) {
+ t.Fatal("purchased armor or its exact wallet did not survive cold load", worn.characters[1].inventory)
+ }
+ if !slices.Equal(sold.characters[1].inventory.Items, []ownedItem{weapon}) || sold.characters[1].inventory.Credits != terminal.sales[row] || sold.nextItem != 2 || sold.characters[1].equipmentBonus(91) != 0 {
+ t.Fatal("accepted/replayed sale lost another item or credited more than once", sold.characters[1].inventory)
+ }
+ })
+ }
+ }
+}
+
+func TestLowTechPurchaseFailureRetainsWalletAndRetries(t *testing.T) {
+ for _, failure := range []struct{ name, sql string }{
+ {"item", "CREATE TRIGGER reject_glove BEFORE INSERT ON items BEGIN SELECT RAISE(FAIL,'glove'); END"},
+ {"ignored placement", "CREATE TRIGGER reject_glove BEFORE INSERT ON item_locations BEGIN SELECT RAISE(IGNORE); END"},
+ {"commit", "CREATE TABLE glove_commit_failure (id INTEGER REFERENCES items(id) DEFERRABLE INITIALLY DEFERRED); CREATE TRIGGER reject_glove AFTER INSERT ON items BEGIN INSERT INTO glove_commit_failure VALUES(9999); END"},
+ } {
+ t.Run(failure.name, func(t *testing.T) {
+ world, _ := newPurchaseWorld(t)
+ t.Cleanup(func() { world.db.Close() })
+ player, client := world.characters[1], world.clients[1]
+ player.position = gamedata.ShopMachines[3221226655].Position
+ request := shopUseRequest(2)
+ binary.BigEndian.PutUint32(request[44:48], 3221226655)
+ if err := world.handleShopUse(client, request); err != nil {
+ t.Fatal(err)
+ }
+ if err := world.handleTrade(client, shopTradePacket([2]uint32{50000, 1}, 4, [2]uint32{51035, 3221226655}, [2]uint32{111, 7})[20:]); err != nil {
+ t.Fatal(err)
+ }
+ if _, err := world.db.Exec(failure.sql); err != nil {
+ t.Fatal(err)
+ }
+ accept := shopTradePacket([2]uint32{50000, 1}, 1, [2]uint32{}, [2]uint32{})[20:]
+
+ if err := world.handleTrade(client, accept); err == nil {
+ t.Fatal("failed purchase did not report its database failure")
+ }
+ cold := newTestInventoryServer(t)
+ if player.inventory.Credits != 1000 || len(player.inventory.Items) != 1 || world.nextItem != 1 || cold.characters[1].inventory.Credits != 1000 || len(cold.characters[1].inventory.Items) != 1 || cold.nextItem != 1 {
+ t.Fatal("failed purchase spent cash or leaked an instance")
+ }
+ if _, err := world.db.Exec("DROP TRIGGER reject_glove"); err != nil {
+ t.Fatal(err)
+ }
+ if err := world.handleTrade(client, accept); err != nil {
+ t.Fatal(err)
+ }
+ retried := newTestInventoryServer(t)
+
+ if retried.characters[1].inventory.Credits != 874 || retried.nextItem != 2 || len(retried.characters[1].inventory.Items) != 2 || retried.characters[1].inventory.Items[1] != (ownedItem{ID: 2, Type: 51022, Template: 70562, Quality: 2, Slot: 65, Count: 1}) {
+ t.Fatal("purchase retry lost selected quality or charged twice", retried.characters[1].inventory)
+ }
+ })
+ }
+}
diff --git a/server/shop_quality_test.go b/server/shop_quality_test.go
@@ -30,7 +30,7 @@ func TestShopBasicArmorProductionQualityPurchase(t *testing.T) {
t.Fatal(err)
}
- if client.shop == nil || !reflect.DeepEqual(client.shop.stock, []gamedata.ShopItem{{Template: 85596, Quality: 5}, {Template: 85742, Quality: 5}, {Template: 85638, Quality: 5}, {Template: 85512, Quality: 5}, {Template: 85557, Quality: 5}, {Template: 85686, Quality: 5}}) {
+ if client.shop == nil || !reflect.DeepEqual(client.shop.stock, []gamedata.ShopItem{{Template: 85596, Quality: 5}, {Template: 85742, Quality: 5}, {Template: 85638, Quality: 5}, {Template: 85512, Quality: 5}, {Template: 85557, Quality: 5}, {Template: 85686, Quality: 5}, {Template: 70562, Quality: 1}, {Template: 70562, Quality: 2}}) {
t.Fatal("basic armor lost its explicit selected-quality subset")
}