using System;
using System.Collections;
using System.Collections.Generic;
using Cysharp.Threading.Tasks;
using UnityEngine;

namespace Net.Project.B.Damage
{
    public interface IDamageData
    {
        public int Index { get; set; }
        public int InitialDamage { get; }
        public int FinalDamage { get; }
    }

    public struct DamageData:IDamageData
    {
        public int Index { get; set; }
        public int InitialDamage { get; set; }
        public int FinalDamage { get; set; }
    }
    public interface IDamageType
    {
        
    }
    public interface IDamageReport
    {
        public int Index { get; }
        public ulong InitialTick { get; }
        public ulong FinalTick { get; }
        public int Initiator { get; }
        public int Target { get; }
        public int InitialDamage { get; }
        public int FinalDamage { get; }
        public bool IsFatal { get; }
        public IDamageType DamageType { get; }
        IReadOnlyCollection<IDamageData> Reports { get; }
    }
    
    public interface IDamageService
    {
        public event Func<IDamageReport, UniTask<IDamageData>> DamageFactor;
        public event Action<IDamageReport> OnDamaged; 
        public UniTask<IDamageReport> CreateDamageAsync(int initiator, int target, int initialDamage, IDamageType damageType);
    }

}
