Cleaning Up Code

Please use code tags.

Looks plenty good, probably not worth worrying about it unless you need to rework it anyway and see a good opportunity to improve it.

Just a small suggestion, if you have an ItemStats subclass for every WeaponClass, you could just switch on the object to avoid needing an explicit cast:

switch (weaponInfo.itemStats)
{
    case MeleeItemStats meleeItemStats:
        // ...
        break;
    case RangedItemStats rangedItemStats:
        // ...
        break;
    case MagicItemStats magicItemStats:
        // ...
        break;
}
1 Like