Bots: talent links of Wowhead's current Forever trees; bot builds keep the row rule
Checked against Wowhead (T4, 11-12): its Forever calculator writes the tree version as a
word now ("vkndmh"), and moves an older "v2" link to it. It then dropped talents from the
links our bots printed, because the bots held talents in rows their own tab had not opened
(an Arms warrior's Anger Management on 9 Arms points, a mage's Arcane Subtlety with no point
in the top row). The Forever trait data opens a row by the points of all three tabs, so the
game let our builds through; a player's talent frame and Wowhead do not.
- TalentCode: reads "v<word>" as well as "v<digit>" in front of the code; links are written
with the current version ("vkndmh...<code>_t0") so they open as they are; RowsOpen checks
the talent frame's row rule (5 points per row above, same tab).
- PlayerbotAPI: the talent walk keeps that rule for our builds too
(Playerbot.ClassicTalents.RowsPerTab = 1, new; 0 = as before), and always for a code the
owner gives. A bot that holds a build which breaks it is walked once more.
- Tests: the vkndmh links, and the bot builds Wowhead dropped talents from.
This commit is contained in:
@@ -140,7 +140,7 @@ TEST_CASE("A build is written back as the calculator writes it", "[ClassicTalent
|
||||
CHECK(Encode({ {}, {}, {} }).empty());
|
||||
Parsed const p = Parse("050205223101311531-5500003-003");
|
||||
CHECK(Encode(p.tabs) == "050205223101311531-5500003-003");
|
||||
CHECK(Link(8, "05--003") == "https://www.wowhead.com/forever/talent-calc/mage/v205--003");
|
||||
CHECK(Link(8, "05--003") == "https://www.wowhead.com/forever/talent-calc/mage/vkndmh05--003_t0");
|
||||
CHECK(Parse(Link(1, "--05003201")).tabs == Parse("--05003201").tabs);
|
||||
CHECK(Link(6, "1").empty()); // no death knights in Forever
|
||||
}
|
||||
@@ -172,3 +172,38 @@ TEST_CASE("A levelling bot buys the tab with most points first, row by row", "[C
|
||||
REQUIRE(tie.size() == 2);
|
||||
CHECK(tie[0].tab == 0);
|
||||
}
|
||||
|
||||
// T4 (11-12): Wowhead's Forever calculator writes the tree version as a word now ("vkndmh"), and moves an older "v2" link to it.
|
||||
TEST_CASE("A link of the current calculator trees (a word for the version) is read like the older v2 one", "[ClassicTalentCode]")
|
||||
{
|
||||
Parsed const now = Parse("https://www.wowhead.com/forever/talent-calc/warrior/vkndmh--05003201_t0/2BEffh");
|
||||
REQUIRE(now.ok());
|
||||
CHECK(now.cls == 1);
|
||||
CHECK(now.tabs == Parse("https://www.wowhead.com/forever/talent-calc/warrior/v2--05003201_t0/2BEffh").tabs);
|
||||
CHECK(Validate(now, Warrior()).total == 11);
|
||||
|
||||
Parsed const mage = Parse("https://www.wowhead.com/forever/talent-calc/mage/vkndmh-55523331230133131_t0");
|
||||
REQUIRE(mage.ok());
|
||||
CHECK(mage.tabs[0].empty());
|
||||
CHECK(Validate(mage, Mage()).perTab == std::vector<int>{ 0, 44, 0 });
|
||||
CHECK(Parse("vkndmh050205223101311531-5500003-003").tabs == Parse("050205223101311531-5500003-003").tabs);
|
||||
}
|
||||
|
||||
// T4: the bots' own builds held talents in rows their tab had not opened (the game data opens a row by the points of all three tabs);
|
||||
// Wowhead dropped them. RowsOpen is the talent frame's rule the walk now keeps.
|
||||
TEST_CASE("A build with points in a row its own tab has not opened breaks the talent frame's rule", "[ClassicTalentCode]")
|
||||
{
|
||||
auto tabs = [](char const* code) { return Parse(code).tabs; };
|
||||
// The bot builds Wowhead dropped talents from.
|
||||
CHECK_FALSE(RowsOpen(tabs("30303013-350500355022100031-000003"), Warrior())); // Anger Management on 9 Arms points; Thunder Clap on none
|
||||
CHECK_FALSE(RowsOpen(tabs("000205-55523331230133131"), Mage())); // Arcane Subtlety with no top-row point
|
||||
// What Wowhead kept of them, and builds made in the calculator.
|
||||
CHECK(RowsOpen(tabs("30303-350500355022100031"), Warrior()));
|
||||
CHECK(RowsOpen(tabs("-55523331230133131"), Mage()));
|
||||
CHECK(RowsOpen(tabs("050205223101311531-5500003-003"), Mage()));
|
||||
CHECK(RowsOpen(tabs("--05003201"), Warrior()));
|
||||
// A levelling bot part way down a build: top rows first keeps it open.
|
||||
CHECK(RowsOpen(tabs("0502052"), Mage()));
|
||||
CHECK_FALSE(RowsOpen(tabs("0002"), Mage()));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user