Initial work on implementing Pokemon
This commit is contained in:
22
PkmnLib.Dynamic/Events/DamageEvent.cs
Normal file
22
PkmnLib.Dynamic/Events/DamageEvent.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using PkmnLib.Dynamic.Models;
|
||||
|
||||
namespace PkmnLib.Dynamic.Events;
|
||||
|
||||
public record DamageEvent : IEventData
|
||||
{
|
||||
public DamageEvent(IPokemon pokemon, uint previousHealth, uint newHealth, DamageSource source)
|
||||
{
|
||||
Pokemon = pokemon;
|
||||
PreviousHealth = previousHealth;
|
||||
NewHealth = newHealth;
|
||||
Source = source;
|
||||
}
|
||||
|
||||
public IPokemon Pokemon { get; init; }
|
||||
public uint PreviousHealth { get; init; }
|
||||
public uint NewHealth { get; init; }
|
||||
public DamageSource Source { get; init; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public EventBatchId BatchId { get; init; } = new();
|
||||
}
|
||||
16
PkmnLib.Dynamic/Events/FaintEvent.cs
Normal file
16
PkmnLib.Dynamic/Events/FaintEvent.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using PkmnLib.Dynamic.Models;
|
||||
|
||||
namespace PkmnLib.Dynamic.Events;
|
||||
|
||||
public class FaintEvent : IEventData
|
||||
{
|
||||
public FaintEvent(IPokemon pokemon)
|
||||
{
|
||||
Pokemon = pokemon;
|
||||
}
|
||||
|
||||
public IPokemon Pokemon { get; init; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public EventBatchId BatchId { get; init; } = new();
|
||||
}
|
||||
@@ -7,5 +7,5 @@ namespace PkmnLib.Dynamic.Events;
|
||||
/// </summary>
|
||||
public interface IEventData
|
||||
{
|
||||
|
||||
public EventBatchId BatchId { get; init; }
|
||||
}
|
||||
21
PkmnLib.Dynamic/Events/HealEvent.cs
Normal file
21
PkmnLib.Dynamic/Events/HealEvent.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using PkmnLib.Dynamic.Models;
|
||||
|
||||
namespace PkmnLib.Dynamic.Events;
|
||||
|
||||
public class HealEvent : IEventData
|
||||
{
|
||||
public HealEvent(IPokemon pokemon, uint previousHealth, uint newHealth)
|
||||
{
|
||||
Pokemon = pokemon;
|
||||
PreviousHealth = previousHealth;
|
||||
NewHealth = newHealth;
|
||||
}
|
||||
|
||||
public IPokemon Pokemon { get; }
|
||||
public uint PreviousHealth { get; }
|
||||
public uint NewHealth { get; }
|
||||
|
||||
|
||||
/// <inheritdoc />
|
||||
public EventBatchId BatchId { get; init; } = new();
|
||||
}
|
||||
Reference in New Issue
Block a user