-
Notifications
You must be signed in to change notification settings - Fork 3
/
recruitment_tests.cpp
124 lines (101 loc) · 3.65 KB
/
recruitment_tests.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
//
// recruitment_tests.cpp
// midnight
//
// Created by Chris Wild on 25/03/2023.
//
#include "../steps/common_steps.h"
#include "../../steps/map_steps.h"
SCENARIO("Morkin can recruit Shadows")
{
TMEStep::NewStory();
GIVEN("That Morkin is at the same location as Shadows")
{
TMEStep::LordsAtSameLocation(TMEStep::ch_morkin, LOMStep::ch_shadows);
AND_GIVEN("that Shadows is not recruited")
{
TMEStep::LordIsNotRecruited(LOMStep::ch_shadows);
WHEN("Morkin approaches")
{
TMEStep::LordPerformsApproach(TMEStep::ch_morkin);
THEN("Shadows should be recruited")
{
REQUIRE( TMEStep::LordHasBeenRecruited(LOMStep::ch_shadows) );
}
}
}
}
}
SCENARIO("Luxor cannot recruit Dreams")
{
TMEStep::NewStory();
GIVEN("That Luxor is at the same location as Dreams")
{
TMEStep::LordsAtSameLocation(TMEStep::ch_luxor, LOMStep::ch_dreams);
AND_GIVEN("that Dreams is not recruited")
{
TMEStep::LordIsNotRecruited(LOMStep::ch_dreams);
WHEN("Luxor approaches")
{
TMEStep::LordPerformsApproach(TMEStep::ch_luxor);
THEN("Shadows should not be recruited")
{
REQUIRE( !TMEStep::LordHasBeenRecruited(LOMStep::ch_dreams) );
}
}
}
}
}
SCENARIO("Morkin does not recruit Shadows after move without auto approach")
{
TMEStep::NewStory();
GIVEN("That Morkin is looking at Shadows")
{
TMEStep::LordsIsLookingAt(TMEStep::ch_morkin, LOMStep::ch_shadows);
MapStep::ClearObjectFromLocation( GetCharacter(TMEStep::ch_morkin)->Location() );
AND_GIVEN("that auto approach is disabled")
{
tme::variables::sv_auto_approach = false;
AND_GIVEN("that Shadows is not recruited")
{
TMEStep::LordIsNotRecruited(LOMStep::ch_shadows);
WHEN("Morkin moves forward")
{
TMEStep::LordMovesForward(TMEStep::ch_morkin);
THEN("Shadows should not be recruited")
{
REQUIRE( !TMEStep::LordHasBeenRecruited(LOMStep::ch_shadows) );
}
}
}
}
}
}
SCENARIO("Morkin recruits Shadows after move with auto approach")
{
TMEStep::NewStory();
GIVEN("That Morkin is looking at Shadows")
{
TMEStep::LordsIsLookingAt(TMEStep::ch_morkin, LOMStep::ch_shadows);
MapStep::ClearObjectFromLocation( GetCharacter(TMEStep::ch_morkin)->Location() );
AND_GIVEN("that auto approach is enabled")
{
tme::variables::sv_auto_approach = true;
AND_GIVEN("that Shadows is not recruited")
{
TMEStep::LordIsNotRecruited(LOMStep::ch_shadows);
WHEN("Morkin moves forward")
{
TMEStep::LordMovesForward(TMEStep::ch_morkin);
THEN("Shadows should be recruited")
{
REQUIRE( TMEStep::LordHasBeenRecruited(LOMStep::ch_shadows) );
}
}
}
}
}
}
// SCENARIO("Morkin cannot recruit Shadows when he is not alone")
// SCENARIO("Morkin cannot recruit Shadows with auto approach when he is not alone")
// SCENARIO("recruiting with followers")