Add ZA (Phase 4) BiS lists for all specs

Populate Zul'Aman gear for all 9 classes x 3 specs from the wowtbc.gg
page-data JSON, using the same per-phase `bis` extraction (group/raid
variant preferred) as the earlier tiers. ZA becomes the fourth phase in
PHASE_ORDER and the new default, so the progress bar now measures
completion against ZA.

Shared lists mirror the existing phase conventions: Discipline = Holy,
BM = MM, Combat = Subtlety, and all three warlock specs share one ZA
list. Relic entries (idols/librams/totems) stay omitted like T4-T6.

Two source corrections are folded in: one site data bug where Holy
Paladin's ZA main hand pointed at Hammer of Sanctification (Sunwell
only) is replaced with the T6 pick, Crystal Spire of Karabor, and
canonical item names replace the site's case/typo variants.

Tests: 88 passing, including ZA coverage, shared-list invariants, and
latest-phase progress against ZA.
This commit is contained in:
dfj committed 2026-10-24 00:42:37 +02:00
1 parent 48040c3ae1
commit 907d274b3a
7 files changed
+556 -41

No files matched your search

+1 -1
View File
@@ -23,7 +23,7 @@ apt-get download lua5.4 && dpkg -x lua5.4_*.deb /tmp/lua && /tmp/lua/usr/bin/lua
| File | Covers |
|---|---|
| `test_data.lua` | `BIS_DATA` registry: 9 classes × 3 specs, well-formed slot entries (valid slots, positive item IDs, non-empty names/sources, optional enchant shape), canonical phase order, `ResolvePhase` fallback, shared-list invariants, T6 spot checks |
| `test_data.lua` | `BIS_DATA` registry: 9 classes × 3 specs, well-formed slot entries (valid slots, positive item IDs, non-empty names/sources, optional enchant shape), canonical phase order, `ResolvePhase` fallback, shared-list invariants, T4/T5/ZA spot checks |
| `test_stats.lua` | `ScanItemStats`: MAX aggregation across alias keys (spell damage schools, healing, haste/crit/mp5 ratings), single-mapping pass-through, unmapped key filtering, nil handling |
| `test_compare.lua` | `CompareGear`: BIS counting, upgrade ranking by stat gain, positive-diffs-only scoring, spec-specific stat keys (Shadow counts spell damage, Holy counts healing), phase resolution, `GetStatKeysForSpec`, `GetCompletionRatio` |
+8 -6
View File
@@ -254,12 +254,12 @@ describe("latest phase progress", function()
it("exposes the latest phase and nil ratio while stats load", function()
local data = ns.Amibis:CompareGear()
expect(data.latestPhase).toEqual("T6")
expect(data.latestPhase).toEqual("ZA")
expect(data.latestCompletionRatio).toBeNil()
end)
it("measures progress against the latest phase, not the selected one", function()
local latestList = ns.Data.BISLists:GetBISList("PRIEST", "Shadow", "T6")
local latestList = ns.Data.BISLists:GetBISList("PRIEST", "Shadow", "ZA")
local oldList = ns.Data.BISLists:GetBISList("PRIEST", "Shadow", "T4")
for slot, entry in pairs(oldList) do
MockItems[entry.itemID] = {
@@ -283,16 +283,18 @@ describe("latest phase progress", function()
AmibisDB.selectedPhase = "T4"
local data = ns.Amibis:CompareGear()
expect(data.phase).toEqual("T4")
expect(data.latestPhase).toEqual("T6")
expect(data.latestPhase).toEqual("ZA")
expect(ns.Amibis:GetCompletionRatio(data)).toBeCloseTo(1.0)
expect(data.latestCompletionRatio < 1.0).toBeTruthy()
expect(data.latestCompletionRatio > 0.3).toBeTruthy()
end)
it("ratio matches for T6-only lists (latest equals selected)", function()
local list = ns.Data.BISLists:GetBISList("PALADIN", "Protection", "T6")
it("ratio matches when the latest phase is also selected", function()
local list = ns.Data.BISLists:GetBISList("PRIEST", "Shadow", "ZA")
expect(list).toBeTruthy()
AmibisDB.selectedPhase = "ZA"
local data = ns.Amibis:CompareGear()
expect(data.latestPhase).toEqual("T6")
expect(data.phase).toEqual("ZA")
expect(data.latestPhase).toEqual("ZA")
end)
end)
+61 -1
View File
@@ -65,17 +65,19 @@ describe("phase ordering and resolution", function()
expect(phases[1]).toEqual("T4")
expect(phases[2]).toEqual("T5")
expect(phases[3]).toEqual("T6")
expect(phases[4]).toEqual("ZA")
end)
it("reports the latest phase for every spec", function()
for _, class in ipairs(BIS:GetAvailableClasses()) do
for _, spec in ipairs(BIS:GetAvailableSpecs(class)) do
expect(BIS:GetLatestPhase(class, spec)).toEqual("T6")
expect(BIS:GetLatestPhase(class, spec)).toEqual("ZA")
end
end
end)
it("keeps the saved phase when it exists", function()
expect(BIS:ResolvePhase("PRIEST", "Shadow", "ZA")).toEqual("ZA")
expect(BIS:ResolvePhase("PRIEST", "Shadow", "T6")).toEqual("T6")
expect(BIS:ResolvePhase("PRIEST", "Shadow", "T5")).toEqual("T5")
end)
@@ -164,6 +166,64 @@ describe("T5 (Phase 2) data", function()
end)
end)
describe("ZA (Phase 4) data", function()
it("covers every spec", function()
for _, class in ipairs(BIS:GetAvailableClasses()) do
for _, spec in ipairs(BIS:GetAvailableSpecs(class)) do
local list = BIS:GetBISList(class, spec, "ZA")
expect(list).toBeTruthy()
end
end
end)
it("shadow priest ZA neck comes from Zul'jin", function()
local list = BIS:GetBISList("PRIEST", "Shadow", "ZA")
expect(list["Neck"].itemID).toEqual(33466)
expect(list["Neck"].name).toEqual("Loop of Cursed Bones")
expect(list["Neck"].source).toEqual("Zul'Aman - Zul'jin")
end)
it("hunter BM and MM share the ZA list", function()
local bm = BIS:GetBISList("HUNTER", "Beast Mastery", "ZA")
expect(BIS:GetBISList("HUNTER", "Marksmanship", "ZA")).toEqual(bm)
expect(bm["Trinket0"].name).toEqual("Berserker's Call")
expect(bm["Trinket0"].source).toEqual("Zul'Aman - Zul'jin")
end)
it("discipline priest shares the holy ZA list", function()
expect(BIS:GetBISList("PRIEST", "Discipline", "ZA"))
.toEqual(BIS:GetBISList("PRIEST", "Holy", "ZA"))
end)
it("all three warlock specs share the ZA list", function()
local affliction = BIS:GetBISList("WARLOCK", "Affliction", "ZA")
expect(BIS:GetBISList("WARLOCK", "Demonology", "ZA")).toEqual(affliction)
expect(BIS:GetBISList("WARLOCK", "Destruction", "ZA")).toEqual(affliction)
end)
it("every list includes at least one Zul'Aman drop", function()
for _, class in ipairs(BIS:GetAvailableClasses()) do
for _, spec in ipairs(BIS:GetAvailableSpecs(class)) do
local list = BIS:GetBISList(class, spec, "ZA")
local found = false
for _, entry in pairs(list) do
if entry.source:find("Zul'Aman", 1, true) then
found = true
break
end
end
expect(found).toBeTruthy()
end
end
end)
it("excludes items that are not available until Sunwell", function()
local list = BIS:GetBISList("PALADIN", "Holy", "ZA")
expect(list["MainHand"].itemID).toEqual(32500)
expect(list["MainHand"].name).toEqual("Crystal Spire of Karabor")
end)
end)
describe("source formatting", function()
it("dash-joins quest rewards", function()
local list = BIS:GetBISList("PRIEST", "Holy", "T5")