Skip to content

Commit

Permalink
🐛 Use the alternate stairs up banner is active
Browse files Browse the repository at this point in the history
  • Loading branch information
AJenbo committed Jun 15, 2023
1 parent 0cf5026 commit 8f74f86
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Source/levels/drlg_l1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1122,7 +1122,7 @@ bool PlaceCathedralStairs(lvl_entry entry)
}

// Place stairs up
position = PlaceMiniSet(MyPlayer->pOriginalCathedral ? L5STAIRSUP : STAIRSUP, DMAXX * DMAXY, true);
position = PlaceMiniSet(MyPlayer->pOriginalCathedral && !Quests[Q_LTBANNER].IsAvailable() ? L5STAIRSUP : STAIRSUP, DMAXX * DMAXY, true);
if (!position) {
if (MyPlayer->pOriginalCathedral)
return false;
Expand Down
1 change: 1 addition & 0 deletions test/Fixtures.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ set(devilutionx_fixtures
diablo/2-1383137027.dun
diablo/3-844660068.dun
diablo/4-609325643.dun
diablo/4-902156014.dun
diablo/5-68685319.dun
diablo/5-1677631846.dun
diablo/6-1824554527.dun
Expand Down
13 changes: 13 additions & 0 deletions test/drlg_l1_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,19 @@ TEST(Drlg_l1, CreateL5Dungeon_diablo_4_609325643)
EXPECT_EQ(ViewPosition, Point(55, 47));
}

TEST(Drlg_l1, CreateL5Dungeon_diablo_4_902156014)
{
LoadExpectedLevelData("diablo/4-902156014.dun");

TestInitGame();
Quests[Q_LTBANNER]._qactive = QUEST_INIT;

TestCreateDungeon(4, 902156014, ENTRY_MAIN);
EXPECT_EQ(ViewPosition, Point(75, 56));
TestCreateDungeon(4, 902156014, ENTRY_PREV);
EXPECT_EQ(ViewPosition, Point(51, 59));
}

TEST(Drlg_l1, CreateL5Dungeon_hellfire_1_401921334)
{
LoadExpectedLevelData("hellfire/1-401921334.dun");
Expand Down
Binary file added test/fixtures/diablo/4-902156014.dun
Binary file not shown.

0 comments on commit 8f74f86

Please sign in to comment.