Turn SecondaryEffect class into pointer type, owned by AttackData.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-04-10 22:17:48 +02:00
parent beb50a60b0
commit 5ac2b7b3c9
8 changed files with 28 additions and 24 deletions

View File

@@ -33,14 +33,16 @@ SpeciesLibrary* TestLibrary::BuildSpeciesLibrary() {
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, SecondaryEffect(), {}));
l->Insert("highPriority"_cnc.GetHash(), new AttackData("highPriority"_cnc, 0, AttackCategory::Physical, 20, 100, 30,
AttackTarget::AdjacentOpponent, 1, SecondaryEffect(), {}));
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, SecondaryEffect(), {}));
l->Insert("lowPriority"_cnc.GetHash(), new AttackData("lowPriority"_cnc, 0, AttackCategory::Physical, 20, 100, 30,
AttackTarget::AdjacentOpponent, -1, SecondaryEffect(), {}));
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(), {}));
return l;
}