PkmnLib.NET/PkmnLib.Dynamic/Libraries/DamageCalculator.cs
Deukhoofd 6d448e4e8d
All checks were successful
Build / Build (push) Successful in 52s
Implements confusion effect
2025-06-22 11:56:29 +02:00

26 lines
916 B
C#

using PkmnLib.Dynamic.Models;
using PkmnLib.Static.Moves;
namespace PkmnLib.Dynamic.Libraries;
/// <summary>
/// A damage library holds the functions related to the calculation of damage.
/// </summary>
public interface IDamageCalculator
{
/// <summary>
/// Calculate the damage for a given hit on a Pokemon.
/// </summary>
uint GetDamage(IExecutingMove? executingMove, MoveCategory category, IPokemon user, IPokemon target,
int targetCount, byte hitNumber, IHitData hitData);
/// <summary>
/// Calculate the base power for a given hit on a Pokemon.
/// </summary>
ushort GetBasePower(IExecutingMove executingMove, IPokemon target, byte hitNumber, IHitData hitData);
/// <summary>
/// Returns whether a specified hit should be critical or not.
/// </summary>
bool IsCritical(IBattle battle, IExecutingMove executingMove, IPokemon target, byte hitNumber);
}