Exemple #1
0
        public void Gameover()
        {
            if (CurrentHitPoints <= 0)
            {
                // Display message
                RaiseMessage("The " + _currentMonster.Name + " killed you.");
                RaiseMessage("Let's begin again.");
                RaiseMessage("You wake up in your home.", true);
            }


            // Reset all values and clear all items and quests

            Inventory.Clear();
            Inventory.Add(new InventoryItem(World.ItemByID(World.ITEM_ID_RUSTY_SWORD), 1));
            Quests.Clear();
            Gold = 0;
            AddExperiencePoints(-ExperiencePoints);

            // Make sure all the databound objects update by calling this
            AllChange();

            // Move player to "Home"
            MoveHome();
        }