Lots more work on implementing battling

This commit is contained in:
2024-08-10 09:44:46 +02:00
parent 554e1cf2cd
commit a049dda240
29 changed files with 1226 additions and 48 deletions

View File

@@ -2,8 +2,12 @@ using PkmnLib.Dynamic.Models;
namespace PkmnLib.Dynamic.Events;
/// <summary>
/// Event triggered when a Pokemon takes damage.
/// </summary>
public record DamageEvent : IEventData
{
/// <inheritdoc cref="DamageEvent"/>
public DamageEvent(IPokemon pokemon, uint previousHealth, uint newHealth, DamageSource source)
{
Pokemon = pokemon;
@@ -12,9 +16,24 @@ public record DamageEvent : IEventData
Source = source;
}
/// <summary>
/// The Pokemon that took damage.
/// </summary>
public IPokemon Pokemon { get; init; }
/// <summary>
/// The previous health of the Pokemon.
/// </summary>
public uint PreviousHealth { get; init; }
/// <summary>
/// The new health of the Pokemon.
/// </summary>
public uint NewHealth { get; init; }
/// <summary>
/// The source of the damage.
/// </summary>
public DamageSource Source { get; init; }
/// <inheritdoc />