57 lines
1.5 KiB
C#
57 lines
1.5 KiB
C#
namespace Server.Game.Dungeon;
|
|
|
|
public class TickResult
|
|
{
|
|
public List<DamageEvent> DamageEvents { get; set; } = new();
|
|
public List<DeathEvent> DeathEvents { get; set; } = new();
|
|
public List<AbilityEvent> AbilityEvents { get; set; } = new();
|
|
public DungeonPhase Phase { get; set; }
|
|
}
|
|
|
|
public class DamageEvent
|
|
{
|
|
public EntityType SourceType { get; set; }
|
|
public int SourceId { get; set; }
|
|
public EntityType TargetType { get; set; }
|
|
public int TargetId { get; set; }
|
|
public int Damage { get; set; }
|
|
|
|
/// <summary>
|
|
/// Damage type key (e.g., "physical", "fire", "poison")
|
|
/// </summary>
|
|
public string DamageTypeKey { get; set; } = "physical";
|
|
|
|
/// <summary>
|
|
/// True if damage was reduced by resistance
|
|
/// </summary>
|
|
public bool WasResisted { get; set; }
|
|
|
|
/// <summary>
|
|
/// True if damage was increased by weakness
|
|
/// </summary>
|
|
public bool WasWeakness { get; set; }
|
|
|
|
/// <summary>
|
|
/// True if target was immune (0 damage)
|
|
/// </summary>
|
|
public bool WasImmune { get; set; }
|
|
}
|
|
|
|
public class DeathEvent
|
|
{
|
|
public EntityType EntityType { get; set; }
|
|
public int EntityId { get; set; }
|
|
public string EntityName { get; set; } = "";
|
|
public EntityType KillerType { get; set; }
|
|
public int KillerId { get; set; }
|
|
public string KillerName { get; set; } = "";
|
|
public int XpReward { get; set; }
|
|
}
|
|
|
|
public enum EntityType
|
|
{
|
|
Player,
|
|
Mob,
|
|
Chest
|
|
}
|