コード例 #1
0
        private static void StartDay()
        {
            var player = GameInstance.Instance.CurrentPlayer;

            Console.WriteLine("\nNew day. What will it bring?");
            ConsoleHelper.LogUserMessage("Current health is {0}hp", BodyStats.GetTotalHealth(GameInstance.Instance.CurrentPlayer));
            ConsoleHelper.FilterInput("Press enter to make a move and see what this day brought you", new ConsoleKey[] { ConsoleKey.Enter });

            var dayEvent = EventWeight.Pick(new List <EventWeight> {
                new EventWeight {
                    Event = EventType.None, PickWeight = 20
                },
                new EventWeight {
                    Event = EventType.VillageAproach, PickWeight = 15
                },
                new EventWeight {
                    Event = EventType.MonsterEncounter, PickWeight = 65
                }
            });

            switch (dayEvent)
            {
            case EventType.None:
                HandleNoneEncounter();
                break;

            case EventType.VillageAproach:
                HandleVillageEncounter();
                break;

            case EventType.MonsterEncounter:
                HandleMonsterEncounter();
                break;

            default:
                break;
            }
        }
コード例 #2
0
 public void PartialRegenerate(int buff = 0)
 {
     PartialRegenerate_Action(buff);
     Console.WriteLine("You have healed up a little bit.");
     ConsoleHelper.LogUserMessage("Current health is {0}hp", BodyStats.GetTotalHealth(this));
 }