using System;
using System.Collections.Generic;
namespace TurnBasedTest
{
public class Weapon : Item
{
public enum WeaponTypes { Sword, Axe, Spear, Bow, Crossbow, Wand, Staff, Gauntlet };
public WeaponTypes weaponType;
public int damage;
public Weapon(string _name, int _value, int _damage, WeaponTypes _weaponType) : base(_name, _value, _itemType:ItemTypes.Weapon)
{
damage = _damage;
itemType = ItemTypes.Weapon;
weaponType = _weaponType;
}
public void Display()
{
Console.WriteLine("Weapon Type: " + weaponType);
Console.WriteLine("Damage: " + damage);
}
}
}
so lets say i have a Weapon Class that is inherited from the Item class. right now I have an enumerator for weapon types but should i split them all up into seperate classes that inheret from Weapon? They don't do any other damage calculations, so im guessing no. Also, I have a WeaponTypes weaponType to keep track of the individual weapon type when it's created, but this naming is confusing, what can I do to remedy it? I obviously don't want WeaponTypes weaponType.
oh btw this is c#