Adds another unit test to Assurance
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
e85460fd22
commit
e9658cef1a
|
@ -44,4 +44,23 @@ void Assurance_DamageWithEvent(){
|
||||||
RequireEquals(200, damage);
|
RequireEquals(200, damage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test name="Assurance: damage with damage on the other turn"]
|
||||||
|
void Assurance_DamageWithEventOnDifferentTurn(){
|
||||||
|
auto battle = CreateSimpleBattle(684, "charizard", "venusaur", 100);
|
||||||
|
auto mon1 = battle.GetBattleSide(0).GetPokemon(0);
|
||||||
|
auto mon2 = battle.GetBattleSide(1).GetPokemon(0);
|
||||||
|
|
||||||
|
mon2.Damage(10, DamageSource::AttackDamage);
|
||||||
|
|
||||||
|
mon1.PassTurn();
|
||||||
|
mon2.PassTurn();
|
||||||
|
|
||||||
|
auto script = cast<Gen7::Assurance>(CreateMoveScript("Assurance"));
|
||||||
|
Require(script !is null);
|
||||||
|
uint damage = 100;
|
||||||
|
auto executingMove = CreateExecutingMove("Assurance", mon1, mon2);
|
||||||
|
script.OverrideDamage(executingMove, mon2, 0x0, damage);
|
||||||
|
RequireEquals(100, damage);
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
Loading…
Reference in New Issue