fix(scripts): Spider Queen rain of fire hits two spots in each outer ring (issue 2016)

The live boss script's rain of fire takes every target of the first ROF target group and ROFImpactCnt (2) different
random targets of each other group. The server took one per group, so the rain was sparser than live. The impacts are
now picked like the live script (without repeats inside a group).

Check in game: AG Spider Queen stage 3; the rain of fire lands on the centre ring and on two spots in each outer ring.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-09-29 10:43:06 -05:00
parent 300932c657
commit 5dba7d5136
3 changed files with 39 additions and 19 deletions

View File

@@ -149,6 +149,13 @@ TEST_F(SpiderQueenTest, RapidFireSweepsOverTheEdgeBetweenZonesEightAndOne) {
EXPECT_EQ(BossSpiderQueenEnemyServer::BuildRapidFireTargets("Zone2Vol", true, ArenaGroup), Ids({ 1, 2, 3, 4, 5, 6, 7 }));
}
TEST_F(SpiderQueenTest, RainOfFireTakesTheFirstGroupAndTwoOfEachOther) {
const std::vector<std::vector<LWOOBJID>> groups = { { 1, 2, 3 }, { 10, 11, 12, 13 }, { 20 }, {}, { 40, 41 } };
// Always the last remaining target
const auto impacts = BossSpiderQueenEnemyServer::PickRainOfFireImpacts(groups, [](const size_t count) { return count - 1; });
EXPECT_EQ(impacts, (std::vector<LWOOBJID>{ 1, 2, 3, 13, 12, 20, 41, 40 }));
}
TEST_F(SpiderQueenTest, ZoneVolumesTellTheBossWhereThePlayerIs) {
for (const auto& group : { "Zone1Vol", "Zone2Vol", "Zone3Vol", "Zone4Vol", "Zone5Vol", "Zone6Vol", "Zone7Vol", "Zone8Vol", "AggroVol", "TeleVol" }) {
Add(0x2000 + static_cast<LWOOBJID>(entities.size()), 14400, { group });