Example #1
0
        public void Execute()
        {
            var itemToDrink = _controller.GetSelectedItem();

            if (itemToDrink != null)
            {
                var drinkable = itemToDrink.GetComponent <Drinkable>();
                if (drinkable != null)
                {
                    _actor.ApplyEffect(drinkable.effect);
                    _controller.AddMessage($"you are under effect of {drinkable.effect}");
                    _controller.RemoveCurrentItem();
                }
            }
        }