Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
@@ -56,6 +56,33 @@ TEST_CASE("Use damaging move", "[Integrations]") {
|
||||
REQUIRE(c2->GetCurrentHealth() < c2->GetBoostedStat(Statistic::Health));
|
||||
}
|
||||
|
||||
TEST_CASE("Run more turns", "[Integrations]") {
|
||||
auto library = TestLibrary::Get();
|
||||
auto c1 =
|
||||
CreateCreature(library, "testSpecies1"_cnc, 50).WithAttack("standard"_cnc, AttackLearnMethod::Unknown).Create();
|
||||
CreatureParty party1{c1};
|
||||
auto battleParty1 = new BattleParty(&party1, {CreatureIndex(0, 0)});
|
||||
auto c2 =
|
||||
CreateCreature(library, "testSpecies1"_cnc, 1).WithAttack("standard"_cnc, AttackLearnMethod::Unknown).Create();
|
||||
auto c3 =
|
||||
CreateCreature(library, "testSpecies1"_cnc, 1).WithAttack("standard"_cnc, AttackLearnMethod::Unknown).Create();
|
||||
CreatureParty party2{c2, c3};
|
||||
auto battleParty2 = new BattleParty(&party2, {CreatureIndex(1, 0)});
|
||||
|
||||
auto battle = Battle(library, {battleParty1, battleParty2});
|
||||
|
||||
battle.SwitchCreature(0, 0, c1);
|
||||
battle.SwitchCreature(1, 0, c2);
|
||||
|
||||
battle.TrySetChoice(new AttackTurnChoice(c1, c1->GetAttacks()[0], CreatureIndex(1, 0)));
|
||||
battle.TrySetChoice(new PassTurnChoice(c2));
|
||||
|
||||
REQUIRE(c2->IsFainted());
|
||||
battle.SwitchCreature(1, 0, c3);
|
||||
battle.TrySetChoice(new AttackTurnChoice(c1, c1->GetAttacks()[0], CreatureIndex(1, 0)));
|
||||
battle.TrySetChoice(new PassTurnChoice(c3));
|
||||
}
|
||||
|
||||
TEST_CASE("Finish battle when all battle of one side have fainted", "[Integrations]") {
|
||||
auto library = TestLibrary::Get();
|
||||
auto c1 =
|
||||
|
||||
Reference in New Issue
Block a user