public virtual void Execute(IWork.Token token)
 {
     if (token.GameManager.PlayerEntity.Inventory.ContainsItem(Item))
     {
         Act.WriteLine($"{Item.Name} is already in your inventory.");
         return;
     }
     token.GameManager.ActiveScene.RemoveItem(Item);
     token.GameManager.PlayerEntity.Inventory.AddItem(Item);
     Act.WriteLine($"Added {Item.Name.ToLower()} to inventory.");
     token.GameManager.PlayerEntity.Inventory.GenerateDisplay();
 }
 public override void Execute(IWork.Token token)
 {
     if (ropeItem.CanUse && token.GameManager.ActiveScene == scene)
     {
         Act.WriteLine("You throw the rope onto the glowing figure, and it pulls it in like a blackhole along with you.");
         token.GameManager.SetActiveScene(setScene);
     }
     else
     {
         Act.WriteLine("Nowhere to use the rope.");
     }
 }
Esempio n. 3
0
 public override void Execute(IWork.Token token)
 {
     Act.WriteLine(text[index]);
     if (index < text.Length - 1)
     {
         labScene.CapsulesDescription = "A pure white liquid floats in the four capsules.";
         capsuleItem.Description      = "A pure white liquid floats in the four capsules.";
         concourseScene.SetDescription("The tables and walls are illuminated by a figure floating at the center of the room. The massive window glows with pure white, an identical energy the floating figure emits throughout the Concourse. The Hall is to the west.");
         windowItem.Description   = "The stars from here are invisible to the naked eye because of the sharp light the figure emits within the Concourse.";
         labScene.RopeItem.CanUse = true;
         index += 1;
     }
 }
Esempio n. 4
0
 public abstract void Execute(IWork.Token token);
 public override void Execute(IWork.Token token)
 {
     Act.Display(Item);
 }
Esempio n. 6
0
 public void Execute(IWork.Token token)
 {
     token.GameManager.SetActiveScene(Scene);
 }
            public void Execute(IWork.Token token)
            {
                Act.WriteLine(@"""Both contestants are ready!"" yells the voice. The crowd eagerly awaits the beginning of the contest. ""Three,"" says the figure. ""3"" displays the screen. ""Two,"" says the figure. ""2"" displays the screen. ""One,"" says the figure. ""1"" displays the screen. The figure raises its hand and points up. ""Let’s begin!""");

                int playerScore = 0, opponentScore = 0;

                Act.AsyncConsole console = new Act.AsyncConsole();
                Question         question;
                string           answer;

                System.Threading.Thread.Sleep(12000);
                while (questions.Count > 0)
                {
                    int index = rng.Next(0, questions.Count);
                    question = questions[index];
                    Act.WriteLine(question.Value);
                    questions.RemoveAt(index);
                    if (ReadInputBefore(console, question, out answer))
                    {
                        // PLAYER ANSWERED!
                        if (question.CheckAnswer(answer.ToUpper()))
                        {
                            playerScore += 1;
                            Correct(StaticData.PlayerName);
                        }
                        else
                        {
                            playerScore -= 1;
                            Incorrect(question, StaticData.PlayerName);
                        }
                    }
                    else if (question.OpponentCorrect)
                    {
                        opponentScore += 1;
                        // Opponent answered correctly!
                        Correct(StaticData.OpponentName);
                    }
                    else
                    {
                        opponentScore -= 1;
                        // Opponent answered incorrectly!
                        Incorrect(question, StaticData.OpponentName);
                    }
                }

                if (playerScore > opponentScore)
                {
                    Act.WriteLine($@"""We have a winner!"" the figure points to you, and the crowd rallies! {StaticData.OpponentName} drops into a trapdoor and your platform begins to rise above the crowd.

Now you see, the spotlight upon the ceiling was the eye, burning like a star. You ascend closer and closer towards it, and your skin begins to burn and incinerate as you turn to ash.

You awake from a sleeplike state and see your body morphed into a radiating transcendental figure. Everywhere you look, all the light from the direction directs towards your sight and you witness every entity along your vision. Every star, blackhole, alien, machine, and other floating figures. Larger than a single individual, inhabiting an immense amount of energy within you, you have no concern for struggle or war. Now, with your clairvoyance, you seek to bring others towards a similar fate.");
                }
                else
                {
                    Act.WriteLine($@"""We have a winner!"" the figure points to {StaticData.OpponentName}. You drop into a trapdoor leading straight to the Control Room.

Through the large window, you see a faint orange glow in the distance. The watchful eye vanished from space like it were never there. ""The {StaticData.OpponentShipName} has been eliminated!"" shouts the radio in excitement, and you realize the orange is emitting from the destruction of the {StaticData.OpponentShipName}. ""And the millennial long war has come to an end! The {StaticData.PlayerShipName} and we, its supporters, are victorious!""");
                }

                Act.WriteTitle("THE END");

                Act.ReadLine();
                token.GameManager.Quit();
            }
 public override void Execute(IWork.Token token)
 {
     Act.Display(Map.Grid);
 }
 public override void Execute(IWork.Token token)
 {
     base.Execute(token);
     Scene.SetDescription("Empty room with a hook on its wall. The Lab is to the east.");
 }
 public override void Execute(IWork.Token token)
 {
     Act.WriteLine(@"""Hello,"" you say. ""Is anyone there?"" No response. ""Hello,"" you say again. ""If anyone can hear me, broadcast your signal."" The radio sits in silence.");
 }