Example #1
0
        public Potion(PotionType type, int level = 1)
        {
            _type = type;
            if (type != null)
            {
                _name = type.GetDamageValue();
            }

            if (type == null || type == PotionType.WATER)
            {
                _level = 0;
            }

            Debug.Assert(type != null, "Type cannot be null");
            Debug.Assert(type != PotionType.WATER && level > 0 && level < 3, "Level must be 1 or 2");
            _level = level;
        }
Example #2
0
 public void SetPotionType(PotionType type) => _type = type;