using System.Collections.Generic;

namespace RPG_Fight_Test.Assets.Scripts.Weapons {
    public class ShortSword : IWeapon {

        List<Die> damage = new List<Die>();
        IWeapon.DAMAGE_TYPE damageType = IWeapon.DAMAGE_TYPE.SLASHING;
        public ShortSword() {
            Die d6 = new Die(6);
            d6.Modifier = 1;
            damage.Add(d6);
            Damage = damage;
        }

        public List<Die> Damage { get => damage; set => damage = value; }

        public int Reach => 1;

        public IWeapon.DAMAGE_TYPE DamageType { get => damageType; set => damageType = value; }
        public int AttackProficiency { get; set; }

        public int RollDamage() {
            int dmg = 0;
            Damage.ForEach(d => dmg += d.RollDie());
            return dmg;
        }
    }
}