コード例 #1
0
ファイル: GnomeEncounter.cs プロジェクト: doworek/rpg-game
        private bool badEvent = false; //bad thing happend

        public GnomeEncounter(GameSession ses, QuestInteraction questChest, WhiteDragonEncounter whiteDragon) : base(ses)
        {
            Enterable        = false;
            Name             = "interaction0007";
            this.questChest  = questChest;
            this.whiteDragon = whiteDragon;
        }
コード例 #2
0
 public PrincessEncounter(GameSession ses, QuestInteraction quest) : base(ses)
 {
     Enterable  = false;
     Name       = "interaction0010";
     Strategy   = new PrincessDefaultStrategy(); // start with default strategy
     this.quest = quest;
 }
コード例 #3
0
        public void Execute(GameSession parentSession, QuestInteraction chest)
        {
            parentSession.SendText("\nOh-ho! You found a chest-quest!");
            parentSession.SendText("You need a key to open this chest.");
            parentSession.SendText("Your quest starts now: first find a Gnome.");
            parentSession.SendText("\nPress ENTER to start a CHEST-QUEST");
            string key = parentSession.GetValidKeyResponse(new List <string>()
            {
                "Return",
            }).Item1;

            if (key == "Return")
            {
                return;
            }
        }
コード例 #4
0
        public void Execute(GameSession parentSession, QuestInteraction chest)
        {
            chest.OpenChest();
            if (active)
            {
                parentSession.SendText("\nCongratulations!!! Quest-chest completed! You get 200 gold");
                parentSession.UpdateStat(8, 200);
                parentSession.SendText("\nPress ENTER exit");
            }
            else
            {
                parentSession.SendText("\nThis quest has ended. Go on your next adventure!");
            }
            string key = parentSession.GetValidKeyResponse(new List <string>()
            {
                "Return"
            }).Item1;

            if (key == "Return")
            {
                active = false;
                return;
            }
        }