Commit Graph
9 Commits
Author SHA1 Message Date
dfj f46b039328 Run the test suite in Gitea Actions on every push
Lua tests / test (push) Failing after 56s
Add .gitea/workflows/tests.yaml per the Gitea Actions quick start:
check out the repo, install Lua 5.4, then run the offline suite
(lua5.4 Amibis/Tests/run.lua). A failed test fails the job.

Document the workflow in README, AGENTS.md, and the tests README.
2026-10-24 15:53:04 +02:00
dfj d8fefc947e Close the window when Escape is pressed
Register the main frame ("AmibisMainFrame") in UISpecialFrames so Escape
hides it and suppresses the game menu while it is open, matching the
default UI panels.

Move the stats-retry timer cleanup into the frame's OnHide script so the
close button, Escape, and /amibis all stop the timer.

Tests: the mock now registers named frames in _G and runs OnHide scripts.
The UI suite simulates FrameXML's CloseSpecialWindows() and asserts the
frame hides and the retry timer is cleared. 108 passing.
2026-10-24 13:57:09 +02:00
dfj 5fba4ac10c Keep latest-phase progress independent of the selected phase
The bar could change when switching phases: latestCompletionRatio was nil
until the selected phase's stats were complete AND the latest list was
cached, and the UI then fell back to the selected phase's own completion
ratio. Right after login the latest list's items are often not cached
yet, so switching phases visibly moved the bar.

Always compute a latest-phase ratio inside CompareGear: stats-based when
both the latest list and the equipped items are cached, otherwise slot
completion against the latest list. Return latestStatsComplete so the UI
can mark the estimate with "~" and keep retrying until stats load
(capped at 20 attempts). The UI now uses latestCompletionRatio directly
instead of falling back to the selected phase.

Also refresh on PLAYER_EQUIPMENT_CHANGED so gear swaps update the bar.

Tests: phase-independent ratio, slot-based fallback while the latest
list is uncached, and equal ratios across selected phases once cached.
106 passing.
2026-10-24 13:37:33 +02:00
dfj b66491c5be Tailor stat comparison and scoring to each spec
Replace the flat per-spec key list with SPEC_STAT_PROFILES: an ordered
{ stat, weight } table for every class/spec. The panel now shows what
matters to the selected spec instead of falling back to spell stats for
physical specs: casters get spell damage/hit/crit/haste, melee get
strength/AP/hit/expertise/armor pen, tanks get stamina/armor/defense/
dodge/parry/block, healers get healing/spirit/MP5.

The same weights drive upgrade ranking, the completion ratio, and which
two gains are shown in the top-upgrades line, so e.g. spell damage
outweighs spirit for Shadow while stamina outweighs expertise for a
Protection tank.

Add GetItemStats mappings for physical stats (attack power, ranged/feral
AP, strength, agility, hit, expertise, armor pen, defense, dodge, parry,
block, block value, armor). TBC per-school hit/crit/haste keys fold into
one stat. Drop the unused spellPower row from TBC profiles.

Tests: weighted scoring expectations, physical/tank mappings, profile
coverage and 8-row panel limit, weighted ratios. 104 passing.
2026-10-24 01:00:24 +02:00
dfj 907d274b3a 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.
2026-10-24 00:42:37 +02:00
dfj 48040c3ae1 Refresh T5 BiS lists from wowtbc.gg and normalize source formatting
All 20 T5 tables regenerated from the current wowtbc.gg page-data
JSON (same group/raid-variant extraction as T4/T6): fixes 9 stale items
(Quagmirran's Eye trinket, Corruptor set, Shapeshifter's Signet,
Ranger-General's Chestguard, Band of Eternity v2, etc.) and aligns
slot sets with the site's default view. Warlock T5 now splits:
Affliction gets WARLOCK_AFFLICTION_T5 (Corruptor), Demonology and
Destruction keep Voidheart. Source strings normalized: quest rewards
and dungeon bosses dash-joined, professions space-joined, site typos
folded (Mother Sharaz, Karanthress, Blood Furnace HC). 81 tests.
2026-10-11 16:41:29 +02:00
dfj c59a705d05 Add T4/T6 phase data, phase selector bar, and latest-phase progress
Data: T4 (Karazhan/Gruul/Magtheridon) and T6 (Black Temple/Hyjal) BiS
lists for all 9 classes x 3 specs, sourced from wowtbc.gg page-data
JSON. Phase registry gains PHASE_ORDER-driven ordering, GetLatestPhase
and ResolvePhase fallback. Stat scanning takes MAX across all alias-key
stats (spell damage schools, healing, haste/crit/mp5 ratings).

UI: horizontal phase selector bar between title and summary with a
progress fill that measures completion against the latest available
phase regardless of the selected phase. CompareGear returns latestPhase
and latestCompletionRatio; GetCompletionRatio delegates to a new
StatRatio helper. Default phase switched to T6.
2026-10-11 15:59:32 +02:00
dfj 87059f128d Update AGENTS.md
Update to reflect the addition of other spec's bis lists
2026-06-04 00:29:22 +02:00
dfj 5284007998 Initial publication 2026-06-04 00:04:49 +02:00