Esempio n. 1
0
        /// <summary>
        /// Create a camp at current location.
        /// </summary>
        /// <param name="npc">NPC to join camp</param>
        protected void JoinCamp(Character npc)
        {
            // join camp
            npc.JoinCamp();

            // add production
            if (ItemPool.HasTrap(GetAvailableProducts(CurrentLocation)))
            {
                Item trap = ItemPool.GetBestTrap(GetAvailableProducts(CurrentLocation));

                // put item into a room if available
                if (CurrentLocation.Rooms.Count > 0)
                {
                    CurrentLocation.StoreItemRandom(trap);
                }
                // otherwise add to NPC inventory
                else
                {
                    npc.Items.Add(trap);
                }
            }
        }