48 lines
1.4 KiB
C#
48 lines
1.4 KiB
C#
using PkmnLib.Dynamic.Models;
|
|
using PkmnLib.Plugin.Gen7.Scripts.Moves;
|
|
|
|
namespace PkmnLib.Plugin.Gen7.Tests.Scripts.Moves;
|
|
|
|
/// <summary>
|
|
/// Tests for the <see cref="ChipAway"/> move script.
|
|
/// Gen VII Bulbapedia behavior: "Chip Away inflicts damage, ignoring any changes to the target's Defense
|
|
/// and evasion stat stages — positive and negative."
|
|
/// </summary>
|
|
public class ChipAwayTests
|
|
{
|
|
/// <summary>
|
|
/// Bulbapedia: Chip Away inflicts damage "ignoring any changes to the target's Defense [...] stat
|
|
/// stages".
|
|
/// </summary>
|
|
[Test]
|
|
public async Task BypassDefensiveStatBoosts_Always_Bypasses()
|
|
{
|
|
// Arrange
|
|
var script = new ChipAway();
|
|
var bypass = false;
|
|
|
|
// Act
|
|
script.BypassDefensiveStatBoosts(Substitute.For<IExecutingMove>(), Substitute.For<IPokemon>(), 0, ref bypass);
|
|
|
|
// Assert
|
|
await Assert.That(bypass).IsTrue();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Bulbapedia: Chip Away inflicts damage "ignoring any changes to the target's [...] evasion stat
|
|
/// stages".
|
|
/// </summary>
|
|
[Test]
|
|
public async Task BypassEvasionStatBoosts_Always_Bypasses()
|
|
{
|
|
// Arrange
|
|
var script = new ChipAway();
|
|
var bypass = false;
|
|
|
|
// Act
|
|
script.BypassEvasionStatBoosts(Substitute.For<IExecutingMove>(), Substitute.For<IPokemon>(), 0, ref bypass);
|
|
|
|
// Assert
|
|
await Assert.That(bypass).IsTrue();
|
|
}
|
|
} |