Initial work on implementing Pokemon
This commit is contained in:
1 parent
3d5fb1a818
commit
554e1cf2cd
15 files changed
+603
-30
No files matched your search
@@ -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();
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
File renamed without changes.
@@ -7,5 +7,5 @@ namespace PkmnLib.Dynamic.Events;
|
||||
/// </summary>
|
||||
public interface IEventData
|
||||
{
|
||||
|
||||
public EventBatchId BatchId { get; init; }
|
||||
}
|
||||
File renamed without changes.
@@ -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