Update to new version of Arbutils.
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@@ -64,7 +64,7 @@ TEST_CASE("Add script to script set, then remove it", "[Battling, Scripting]") {
|
||||
auto s = new TestScript("foobar");
|
||||
set.Add(s);
|
||||
REQUIRE(set.Count() == 1);
|
||||
set.Remove("foobar"_cnc);
|
||||
set.Remove("foobar"_cnc.GetHash());
|
||||
REQUIRE(set.Count() == 0);
|
||||
auto it = set.GetIterator();
|
||||
REQUIRE(it->Count() == 0);
|
||||
@@ -77,7 +77,7 @@ TEST_CASE("Add two scripts to script set, then remove them", "[Battling, Scripti
|
||||
set.Add(s);
|
||||
set.Add(s2);
|
||||
REQUIRE(set.Count() == 2);
|
||||
set.Remove("foobar"_cnc);
|
||||
set.Remove("foobar"_cnc.GetHash());
|
||||
REQUIRE(set.Count() == 1);
|
||||
auto it = set.GetIterator();
|
||||
REQUIRE(it->At(0)->GetName() == "foobar2");
|
||||
|
||||
@@ -11,7 +11,8 @@ using namespace CreatureLib::Battling;
|
||||
|
||||
TEST_CASE("Turn ordering: Attack before pass", "[Battling]") {
|
||||
auto lib = TestLibrary::Get();
|
||||
auto learnedAttack = LearnedAttack(lib->GetAttackLibrary()->Get("standard"_cnc), AttackLearnMethod::Unknown);
|
||||
auto learnedAttack =
|
||||
LearnedAttack(lib->GetAttackLibrary()->Get("standard"_cnc.GetHash()), AttackLearnMethod::Unknown);
|
||||
auto choice1 = new PassTurnChoice(nullptr);
|
||||
auto choice2 = new AttackTurnChoice(nullptr, &learnedAttack, CreatureIndex(0, 0));
|
||||
auto vec = std::vector<BaseTurnChoice*>{choice1, choice2};
|
||||
@@ -30,8 +31,8 @@ TEST_CASE("Turn ordering: Attack before pass", "[Battling]") {
|
||||
|
||||
TEST_CASE("Turn ordering: High priority goes before no priority", "[Battling]") {
|
||||
auto l = TestLibrary::Get()->GetAttackLibrary();
|
||||
auto a1 = new LearnedAttack(l->Get("standard"_cnc), AttackLearnMethod::Unknown);
|
||||
auto a2 = new LearnedAttack(l->Get("highPriority"_cnc), AttackLearnMethod::Unknown);
|
||||
auto a1 = new LearnedAttack(l->Get("standard"_cnc.GetHash()), AttackLearnMethod::Unknown);
|
||||
auto a2 = new LearnedAttack(l->Get("highPriority"_cnc.GetHash()), AttackLearnMethod::Unknown);
|
||||
auto choice1 = new AttackTurnChoice(nullptr, a1, CreatureIndex(0, 0));
|
||||
auto choice2 = new AttackTurnChoice(nullptr, a2, CreatureIndex(0, 0));
|
||||
auto vec = std::vector<BaseTurnChoice*>{choice1, choice2};
|
||||
@@ -52,8 +53,8 @@ TEST_CASE("Turn ordering: High priority goes before no priority", "[Battling]")
|
||||
|
||||
TEST_CASE("Turn ordering: Higher priority goes before high priority", "[Battling]") {
|
||||
auto l = TestLibrary::Get()->GetAttackLibrary();
|
||||
auto a1 = new LearnedAttack(l->Get("highPriority"_cnc), AttackLearnMethod::Unknown);
|
||||
auto a2 = new LearnedAttack(l->Get("higherPriority"_cnc), AttackLearnMethod::Unknown);
|
||||
auto a1 = new LearnedAttack(l->Get("highPriority"_cnc.GetHash()), AttackLearnMethod::Unknown);
|
||||
auto a2 = new LearnedAttack(l->Get("higherPriority"_cnc.GetHash()), AttackLearnMethod::Unknown);
|
||||
auto choice1 = new AttackTurnChoice(nullptr, a1, CreatureIndex(0, 0));
|
||||
auto choice2 = new AttackTurnChoice(nullptr, a2, CreatureIndex(0, 0));
|
||||
auto vec = std::vector<BaseTurnChoice*>{choice1, choice2};
|
||||
@@ -74,8 +75,8 @@ TEST_CASE("Turn ordering: Higher priority goes before high priority", "[Battling
|
||||
|
||||
TEST_CASE("Turn ordering: High priority goes before low priority", "[Battling]") {
|
||||
auto l = TestLibrary::Get()->GetAttackLibrary();
|
||||
auto a1 = new LearnedAttack(l->Get("lowPriority"_cnc), AttackLearnMethod::Unknown);
|
||||
auto a2 = new LearnedAttack(l->Get("higherPriority"_cnc), AttackLearnMethod::Unknown);
|
||||
auto a1 = new LearnedAttack(l->Get("lowPriority"_cnc.GetHash()), AttackLearnMethod::Unknown);
|
||||
auto a2 = new LearnedAttack(l->Get("higherPriority"_cnc.GetHash()), AttackLearnMethod::Unknown);
|
||||
auto choice1 = new AttackTurnChoice(nullptr, a1, CreatureIndex(0, 0));
|
||||
auto choice2 = new AttackTurnChoice(nullptr, a2, CreatureIndex(0, 0));
|
||||
auto vec = std::vector<BaseTurnChoice*>{choice1, choice2};
|
||||
@@ -96,8 +97,8 @@ TEST_CASE("Turn ordering: High priority goes before low priority", "[Battling]")
|
||||
|
||||
TEST_CASE("Turn ordering: No priority goes before low priority", "[Battling]") {
|
||||
auto l = TestLibrary::Get()->GetAttackLibrary();
|
||||
auto a1 = new LearnedAttack(l->Get("lowPriority"_cnc), AttackLearnMethod::Unknown);
|
||||
auto a2 = new LearnedAttack(l->Get("standard"_cnc), AttackLearnMethod::Unknown);
|
||||
auto a1 = new LearnedAttack(l->Get("lowPriority"_cnc.GetHash()), AttackLearnMethod::Unknown);
|
||||
auto a2 = new LearnedAttack(l->Get("standard"_cnc.GetHash()), AttackLearnMethod::Unknown);
|
||||
auto choice1 = new AttackTurnChoice(nullptr, a1, CreatureIndex(0, 0));
|
||||
auto choice2 = new AttackTurnChoice(nullptr, a2, CreatureIndex(0, 0));
|
||||
auto vec = std::vector<BaseTurnChoice*>{choice1, choice2};
|
||||
|
||||
Reference in New Issue
Block a user