Better handling of filling empty slots.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
using namespace CreatureLib::Battling;
|
||||
|
||||
TEST_CASE("Set Choice one-sized side", "[Battling]") {
|
||||
auto side = BattleSide(nullptr, 1);
|
||||
auto side = BattleSide(0, nullptr, 1);
|
||||
auto c = CreateCreature(GetLibrary(), "testSpecies1", 5).Create();
|
||||
side.SetCreature(c, 0);
|
||||
auto choice = new PassTurnChoice(c);
|
||||
@@ -18,7 +18,7 @@ TEST_CASE("Set Choice one-sized side", "[Battling]") {
|
||||
}
|
||||
|
||||
TEST_CASE("Set Choice one-sized side, validate all choices set", "[Battling]") {
|
||||
auto side = BattleSide(nullptr, 1);
|
||||
auto side = BattleSide(0, nullptr, 1);
|
||||
auto c = CreateCreature(GetLibrary(), "testSpecies1", 5).Create();
|
||||
side.SetCreature(c, 0);
|
||||
auto choice = new PassTurnChoice(c);
|
||||
@@ -30,7 +30,7 @@ TEST_CASE("Set Choice one-sized side, validate all choices set", "[Battling]") {
|
||||
}
|
||||
|
||||
TEST_CASE("Set Choice two-sized side", "[Battling]") {
|
||||
auto side = BattleSide(nullptr, 2);
|
||||
auto side = BattleSide(0, nullptr, 2);
|
||||
auto c1 = CreateCreature(GetLibrary(), "testSpecies1", 5).Create();
|
||||
auto c2 = CreateCreature(GetLibrary(), "testSpecies1", 5).Create();
|
||||
side.SetCreature(c1, 0);
|
||||
@@ -46,7 +46,7 @@ TEST_CASE("Set Choice two-sized side", "[Battling]") {
|
||||
}
|
||||
|
||||
TEST_CASE("Set Choice two-sized side, validate all choices set", "[Battling]") {
|
||||
auto side = BattleSide(nullptr, 2);
|
||||
auto side = BattleSide(0, nullptr, 2);
|
||||
auto c1 = CreateCreature(GetLibrary(), "testSpecies1", 5).Create();
|
||||
auto c2 = CreateCreature(GetLibrary(), "testSpecies1", 5).Create();
|
||||
side.SetCreature(c1, 0);
|
||||
|
||||
@@ -41,8 +41,8 @@ TEST_CASE("Use damaging move", "[Integrations]") {
|
||||
|
||||
auto battle = Battle(library, {battleParty1, battleParty2});
|
||||
|
||||
battle.SwitchCreature(0, 0, c1);
|
||||
battle.SwitchCreature(1, 0, c2);
|
||||
battle.FillEmptySlot(0, 0, c1);
|
||||
battle.FillEmptySlot(1, 0, c2);
|
||||
|
||||
battle.TrySetChoice(new AttackTurnChoice(c1, c1->GetAttacks()[0], CreatureIndex(1, 0)));
|
||||
battle.TrySetChoice(new PassTurnChoice(c2));
|
||||
|
||||
Reference in New Issue
Block a user