示例#1
0
        internal void RestHunterAtHunterIndex(int hunterIndex, UserInterface ui)
        {
            int numberOfEvents = 2;
            if (Hunters[hunterIndex].CurrentLocation == Hunters[1].CurrentLocation)
            {
                numberOfEvents = 1;
            }

            for (int i = 0; i < numberOfEvents; i++)
            {
                int eventDrawnFor = ui.GetEventDrawnFor();
                if (eventDrawnFor == 2)
                {
                    DrawEventCardForDracula(ui);
                }
                else
                {
                    DiscardEventCard(ui.GetEventCardName());
                }
            }
            int maxHealth = 8;
            switch (hunterIndex)
            {
                case 0:
                    maxHealth = 12;
                    break;
                case 2:
                    maxHealth = 10;
                    break;
            }
            Hunters[hunterIndex].Health = Math.Min(maxHealth, Hunters[hunterIndex].Health + 2);
            ui.TellUser(Hunters[hunterIndex].Name + " now has " + Hunters[hunterIndex].Health + " health");
        }