Example #1
0
 // TODO: I am seriously considering doing away with the inventory.
 // If I do, actors will be allowed to pick one thing up in each hand,
 // with some items being flagged as requiring both hands,
 // and everything else will have to be stored in containers.
 // Pockets, bandoliers, backpacks, sheath, belts, etc.
 //===================================================================//
 //                         Constructors                              //
 //===================================================================//
 /// <summary>
 /// Creates a new <see cref="Actor"/> with the specified name, description, and <see cref="PronounSet"/>.
 /// Default state for canBeTaken is false.
 /// </summary>
 /// <param name="name">the name of the <see cref="Actor"/></param>
 /// <param name="description">a brief description of the <see cref="Actor"/></param>
 /// <param name="pronouns">the set of pronouns to be used for the <see cref="Actor"/></param>
 public Actor(string name, string description, PronounSet pronouns,
     bool isSpecific = false, bool isPlural = false, bool isProper = false,
     bool canBeTaken = false)
     : base(name, description, isSpecific, isPlural, isProper, canBeTaken)
 {
     this.pronouns = pronouns;
     this.inventory = new Inventory(this);
 }
Example #2
0
        // TODO: I am seriously considering doing away with the inventory.
        // If I do, actors will be allowed to pick one thing up in each hand,
        // with some items being flagged as requiring both hands,
        // and everything else will have to be stored in containers.
        // Pockets, bandoliers, backpacks, sheath, belts, etc.
        //===================================================================//
        //                         Constructors                              //
        //===================================================================//
        /// <summary>
        /// Creates a new <see cref="Actor"/> with the specified name, description, and <see cref="PronounSet"/>.
        /// Default state for canBeTaken is false.
        /// </summary>
        /// <param name="name">the name of the <see cref="Actor"/></param>
        /// <param name="description">a brief description of the <see cref="Actor"/></param>
        /// <param name="pronouns">the set of pronouns to be used for the <see cref="Actor"/></param>
        public Actor(string name, string description, PronounSet pronouns,
            string[] parsedNames = null,
            bool isSpecific = false, bool isPlural = false, bool isProper = false,
            bool canBeTaken = false, bool canBeDropped = true, bool isTwoHanded = true)
            : base(name, description, parsedNames,
			isSpecific:isSpecific, isPlural:isPlural, isProper:isProper,
			canBeTaken:canBeTaken, canBeDropped:canBeDropped, isTwoHanded:isTwoHanded)
        {
            this.pronouns = pronouns;
        }
Example #3
0
 /// <summary>
 /// Uses the pronoun set to generate the appropriate form of the verb
 /// to agree with the pronouns.
 /// </summary>
 /// <param name="verb">the verb to conjugate</param>
 /// <param name="form">the form of the subject of the sentence</param>
 /// <returns>the conjugated verb</returns>
 public static string GetForm(VerbSet verb, PronounSet form)
 {
     if (form == PronounSet.GetFemaleSet() || form == PronounSet.GetMaleSet() || form == PronounSet.GetNeuterSet())
     {
         return verb.singularForm;
     }
     else if (form == PronounSet.GetPluralSet())
     {
         return verb.pluralForm;
     }
     else if (form == PronounSet.GetSecondPersonSet())
     {
         return verb.secondPersonForm;
     }
     return null;
 }
Example #4
0
        //===================================================================//
        //                         Constructors                              //
        //===================================================================//
        /// <summary>
        /// Creates a new <see cref="Person"/> with the specified name,
        /// description, and set of pronouns.
        /// </summary>
        /// <param name="name">the name of the <see cref="Person"/></param>
        /// <param name="description">a brief description of the <see cref="Person"/></param>
        /// <param name="pronouns">the set of pronouns to be used for the <see cref="Person"/></param>
        public Person(string name, string description, PronounSet pronouns,
            string[] parsedNames = null,
            bool isSpecific=false, bool isPlural=false, bool isProper=true)
            : base(name, description, pronouns, parsedNames,
			isSpecific: isSpecific, isPlural: isPlural, isProper: isProper,
			canBeTaken: false)
        {
            this.clothes = new Clothes(this);
            this.hands   = new Hands(this);

            this.clothes.AddThing(
                new PantsWithTwoPockets(
                    pronouns == PronounSet.GetSecondPersonSet() ? "your pants" : !isProper ? "the " : "" + name + "'s pants",
                    "A pair of pants. It has two pockets: a left pocket, and a right pocket.",
                    pronouns == PronounSet.GetSecondPersonSet() ? new string[] { "my pants", "pants" } : new string[] { !isProper ? "the " : "" + name + "'s pants", "pants" },
                    isProper:true));
        }
Example #5
0
 //===================================================================//
 //                         Constructors                              //
 //===================================================================//
 /// <summary>
 /// Creates a new <see cref="Person"/> with the specified name,
 /// description, and set of pronouns.
 /// </summary>
 /// <param name="name">the name of the <see cref="Person"/></param>
 /// <param name="description">a brief description of the <see cref="Person"/></param>
 /// <param name="pronouns">the set of pronouns to be used for the <see cref="Person"/></param>
 public Person(string name, string description, PronounSet pronouns,
     bool isSpecific = false, bool isPlural = false, bool isProper = true)
     : base(name, description, pronouns, isSpecific, isPlural, isProper: true, canBeTaken: false)
 {
     this.clothes = new Clothes(this);
 }