Browse Source

Test generating a level for the butcher quests

pull/4673/head
Anders Jenbo 4 years ago
parent
commit
50a222f1a2
  1. 3
      Source/quests.cpp
  2. 4
      test/Fixtures.cmake
  3. 28
      test/drlg_l1_test.cpp
  4. BIN
      test/fixtures/Levels/L1Data/rnd6.DUN
  5. BIN
      test/fixtures/hellfire/2-1180526547.dun

3
Source/quests.cpp

@ -121,6 +121,9 @@ int QuestGroup3[3] = { Q_MUSHROOM, Q_ZHAR, Q_ANVIL };
*/
int QuestGroup4[2] = { Q_VEIL, Q_WARLORD };
/**
* @brief There is no reason to run this, the room has already had a proper sector assigned
*/
void DrawButcher()
{
int x = 2 * setpc_x + 16;

4
test/Fixtures.cmake

@ -19,11 +19,12 @@ set(devilutionx_fixtures
diablo/12-2104541047.dun
diablo/13-428074402.dun
diablo/14-717625719.dun
diablo/15-1583642716-changed.dun
diablo/15-1583642716.dun
diablo/15-1583642716-changed.dun
diablo/16-741281013.dun
hellfire/1-401921334.dun
hellfire/2-128964898.dun
hellfire/2-1180526547.dun
hellfire/3-1512491184.dun
hellfire/3-1799396623.dun
hellfire/4-1190318991.dun
@ -38,6 +39,7 @@ set(devilutionx_fixtures
hellfire/24-1324803725.dun
Levels/L1Data/Banner1.DUN
Levels/L1Data/Banner2.DUN
Levels/L1Data/rnd6.DUN
Levels/L1Data/SKngDO.DUN
Levels/L2Data/Blind1.DUN
Levels/L4Data/diab1.DUN

28
test/drlg_l1_test.cpp

@ -42,7 +42,7 @@ TEST(Drlg_l1, CreateL5Dungeon_diablo_2_1383137027)
MyPlayer->pOriginalCathedral = true;
Quests[Q_PWATER]._qlevel = 2;
InitQuests();
Quests[Q_PWATER]._qactive = QUEST_INIT;
Quests[Q_BUTCHER]._qactive = QUEST_NOTAVAIL;
@ -95,6 +95,7 @@ TEST(Drlg_l1, CreateL5Dungeon_hellfire_2_128964898)
LoadExpectedLevelData("hellfire/2-128964898.dun");
MyPlayer->pOriginalCathedral = false;
InitQuests();
Quests[Q_PWATER]._qactive = QUEST_NOTAVAIL;
Quests[Q_BUTCHER]._qactive = QUEST_NOTAVAIL;
@ -104,11 +105,27 @@ TEST(Drlg_l1, CreateL5Dungeon_hellfire_2_128964898)
EXPECT_EQ(ViewPosition, Point(49, 63));
}
TEST(Drlg_l1, CreateL5Dungeon_hellfire_2_1180526547)
{
LoadExpectedLevelData("hellfire/2-1180526547.dun");
MyPlayer->pOriginalCathedral = false;
InitQuests();
Quests[Q_PWATER]._qactive = QUEST_NOTAVAIL;
Quests[Q_BUTCHER]._qactive = QUEST_INIT;
TestCreateDungeon(2, 1180526547, ENTRY_MAIN);
EXPECT_EQ(ViewPosition, Point(83, 68));
TestCreateDungeon(2, 1180526547, ENTRY_PREV);
EXPECT_EQ(ViewPosition, Point(81, 45));
}
TEST(Drlg_l1, CreateL5Dungeon_hellfire_3_1799396623)
{
LoadExpectedLevelData("hellfire/3-1799396623.dun");
MyPlayer->pOriginalCathedral = false;
InitQuests();
Quests[Q_SKELKING]._qactive = QUEST_NOTAVAIL;
TestCreateDungeon(3, 1799396623, ENTRY_MAIN);
@ -122,7 +139,7 @@ TEST(Drlg_l1, CreateL5Dungeon_hellfire_3_1512491184)
LoadExpectedLevelData("hellfire/3-1512491184.dun");
MyPlayer->pOriginalCathedral = false;
Quests[Q_SKELKING]._qlevel = 3;
InitQuests();
Quests[Q_SKELKING]._qactive = QUEST_INIT;
TestCreateDungeon(3, 1512491184, ENTRY_MAIN);
@ -136,6 +153,7 @@ TEST(Drlg_l1, CreateL5Dungeon_hellfire_4_1190318991)
LoadExpectedLevelData("hellfire/4-1190318991.dun");
MyPlayer->pOriginalCathedral = false;
InitQuests();
Quests[Q_LTBANNER]._qactive = QUEST_NOTAVAIL;
TestCreateDungeon(4, 1190318991, ENTRY_MAIN);
@ -149,7 +167,7 @@ TEST(Drlg_l1, CreateL5Dungeon_hellfire_4_1924296259)
LoadExpectedLevelData("hellfire/4-1924296259.dun");
MyPlayer->pOriginalCathedral = false;
Quests[Q_LTBANNER]._qlevel = 4;
InitQuests();
Quests[Q_LTBANNER]._qactive = QUEST_INIT;
TestCreateDungeon(4, 1924296259, ENTRY_MAIN);
@ -172,6 +190,10 @@ TEST(Drlg_l1, CreateL5Dungeon_crypt_2_1191662129)
{
LoadExpectedLevelData("hellfire/22-1191662129.dun");
InitQuests();
Quests[Q_PWATER]._qactive = QUEST_NOTAVAIL;
Quests[Q_BUTCHER]._qactive = QUEST_NOTAVAIL;
TestCreateDungeon(22, 1191662129, ENTRY_MAIN);
EXPECT_EQ(ViewPosition, Point(71, 47));
TestCreateDungeon(22, 1191662129, ENTRY_PREV);

BIN
test/fixtures/Levels/L1Data/rnd6.DUN vendored

Binary file not shown.

BIN
test/fixtures/hellfire/2-1180526547.dun vendored

Binary file not shown.
Loading…
Cancel
Save