Esempio n. 1
0
        protected virtual bool DoCharm(string rawParameters, params CommandParameter[] parameters)
        {
            if (ControlledBy != null)
            {
                Send("You feel like taking, not giving, orders.");
            }
            else if (parameters.Length == 0)
            {
                if (Slave != null)
                {
                    Send("You stop controlling {0}.", Slave.DisplayName);
                    Slave.ChangeController(null);
                    Slave = null;
                }
                else
                {
                    Send("Try controlling something before trying to un-control.");
                }
            }
            else
            {
                ICharacter target = FindHelpers.FindByName(Room.People, parameters[0]);
                if (target != null)
                {
                    if (target == this)
                    {
                        Send("You like yourself even better!");
                    }
                    else
                    {
                        target.ChangeController(this);
                        Slave = target;
                        Send("{0} looks at you with adoring eyes.", target.DisplayName);
                        target.Send("Isn't {0} so nice?", DisplayName);
                    }
                }
                else
                {
                    Send(StringHelpers.CharacterNotFound);
                }
            }

            return(true);
        }