Rework several libraries to use new StringViewDictionary
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone Build is failing

This commit is contained in:
2022-05-16 17:21:39 +02:00
parent dcf6b20e65
commit e6f38cfb26
11 changed files with 67 additions and 79 deletions

View File

@@ -22,7 +22,7 @@ BattleLibrary* TestLibrary::Get() {
SpeciesLibrary* TestLibrary::BuildSpeciesLibrary(const TalentLibrary* talentLibrary) {
auto l = new SpeciesLibrary();
l->Insert("testSpecies1"_cnc.GetHash(),
l->Insert("testSpecies1"_cnc,
new CreatureSpecies(
0, "testSpecies1"_cnc,
new SpeciesVariant("default"_cnc, 1, 1, 10, {0, 1}, StatisticSet<u16>(10, 10, 10, 10, 10, 10),
@@ -34,17 +34,14 @@ SpeciesLibrary* TestLibrary::BuildSpeciesLibrary(const TalentLibrary* talentLibr
AttackLibrary* TestLibrary::BuildAttackLibrary() {
auto l = new AttackLibrary();
l->Insert("standard"_cnc.GetHash(), new AttackData("standard"_cnc, 0, AttackCategory::Physical, 20, 100, 30,
AttackTarget::AdjacentOpponent, 0, new SecondaryEffect(), {}));
l->Insert("highPriority"_cnc.GetHash(),
new AttackData("highPriority"_cnc, 0, AttackCategory::Physical, 20, 100, 30,
AttackTarget::AdjacentOpponent, 1, new SecondaryEffect(), {}));
l->Insert("higherPriority"_cnc.GetHash(),
new AttackData("higherPriority"_cnc, 0, AttackCategory::Physical, 20, 100, 30,
AttackTarget::AdjacentOpponent, 2, new SecondaryEffect(), {}));
l->Insert("lowPriority"_cnc.GetHash(),
new AttackData("lowPriority"_cnc, 0, AttackCategory::Physical, 20, 100, 30,
AttackTarget::AdjacentOpponent, -1, new SecondaryEffect(), {}));
l->Insert("standard"_cnc, new AttackData("standard"_cnc, 0, AttackCategory::Physical, 20, 100, 30,
AttackTarget::AdjacentOpponent, 0, new SecondaryEffect(), {}));
l->Insert("highPriority"_cnc, new AttackData("highPriority"_cnc, 0, AttackCategory::Physical, 20, 100, 30,
AttackTarget::AdjacentOpponent, 1, new SecondaryEffect(), {}));
l->Insert("higherPriority"_cnc, new AttackData("higherPriority"_cnc, 0, AttackCategory::Physical, 20, 100, 30,
AttackTarget::AdjacentOpponent, 2, new SecondaryEffect(), {}));
l->Insert("lowPriority"_cnc, new AttackData("lowPriority"_cnc, 0, AttackCategory::Physical, 20, 100, 30,
AttackTarget::AdjacentOpponent, -1, new SecondaryEffect(), {}));
return l;
}