コード例 #1
0
ファイル: Program.cs プロジェクト: mononen/C-TextGame
        public static void Cart()
        {
            //already in the minecart, function only meant for pulling the lever.
            if (HasVisit.cart)
            {
                Console.WriteLine(Label.CART);
            }
            else
            {
                Console.WriteLine(Desc.cart);
            }
            String KeyIn  = Input.getInput();
            String Parsed = Input.Parser(KeyIn);

            if (KeyIn.Equals("pull lever") || KeyIn.Equals("lever") || KeyIn.Equals("go"))
            {
                Nymph1();
            }
            else if (KeyIn.Equals("get out") || KeyIn.Equals("exit"))
            {
                N1();
            }
            else if (Parsed.Equals("look"))
            {
                Console.WriteLine(Desc.cartIn);
                Cart();
            }
            else if (Parsed.Equals("has visit"))
            {
                HasVisit.Print();
                Cart();
            }
            else if (Parsed.Equals("inv"))
            {
                Inventory.ItemStatusPrint();
                Cart();
            }
            else if (Parsed.Equals("quit"))
            {
                RunStat.IsRunning = false;
            }
            else if (Parsed.Equals("clr"))
            {
                Console.Clear();
                GC.Collect();
                Cart();
            }
            else if (Parsed.Equals("back"))
            {
                N1();
            }
            else
            {
                Console.WriteLine("You find yourself staring at the red lever");
                Cart();
            }
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: mononen/C-TextGame
        public static void DarkBasement()
        {
            if (HasVisit.basement)
            {
                Console.WriteLine(Label.BASEMENT);
            }
            else
            {
                Console.WriteLine(Desc.bd1);
            }
            String KeyIn  = Input.getInput();
            String Parsed = Input.Parser(KeyIn);

            if (KeyIn.Equals("turn on flashlight") || KeyIn.Equals("flashlight"))
            {
                UnderGround.LightBasement();
            }
            else if (Parsed.Equals("quit"))
            {
                RunStat.IsRunning = false;
            }
            else if (Parsed.Equals("has been"))
            {
                HasVisit.Print();
                DarkBasement();
            }
            else if (Parsed.Equals("inv"))
            {
                Inventory.ItemStatusPrint();
                DarkBasement();
            }
            else if (Parsed.Equals("back"))
            {
                Console.WriteLine(Desc.bdt);
                DarkBasement();
            }
            else if (Parsed.Equals("clr"))
            {
                Console.Clear();
                GC.Collect();
                DarkBasement();
            }
            else
            {
                Console.WriteLine("You look around confused");
                DarkBasement();
            }
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: mononen/C-TextGame
 public static void Nymph1()
 {
     if (Inventory.Nymph1Alive)
     {
         Console.WriteLine(Desc.river);
         String KeyIn  = Input.getInput();
         String Parsed = Input.Parser(KeyIn);
         if (KeyIn.Equals("attack") || KeyIn.Equals("attack with gun") || KeyIn.Equals("attack with lever") || KeyIn.Equals("attack with flare"))
         {
             FightSet.Fight(Inventory.Nymph1HP, Inventory.Nymph1DMG, "River Nymph", Inventory.Nymph1Alive);
         }
         else if (KeyIn.Equals("run") || KeyIn.Equals("run away"))
         {
             Console.WriteLine("There is nowhere to run!");
         }
         else
         {
             Console.WriteLine("You are being stared down by a nymph with a sword in her hand, and you want to do that!");
         }
     }
     else
     {
         Console.WriteLine(Desc.nymph1Dead);
         String KeyIn  = Input.getInput();
         String Parsed = Input.Parser(KeyIn);
         if (KeyIn.Equals("take sword"))
         {
             Inventory.sword       = true;
             Inventory.Nymph1Sword = true;
             Console.WriteLine("You take the fallen nymph's sword and wipe off your blood");
         }
         else if (Parsed.Equals("forward"))
         {
         }
         else if (Parsed.Equals("look"))
         {
             Console.WriteLine(Desc.cartIn);
         }
         else if (Parsed.Equals("has visit"))
         {
             HasVisit.Print();
         }
         else if (Parsed.Equals("inv"))
         {
             Inventory.ItemStatusPrint();
         }
         else if (Parsed.Equals("quit"))
         {
             RunStat.IsRunning = false;
         }
         else if (Parsed.Equals("clr"))
         {
             Console.Clear();
             GC.Collect();
         }
         else if (Parsed.Equals("back"))
         {
             N1();
         }
         else
         {
             Console.WriteLine("You find yourself looking around the room.");
             Nymph1();
         }
     }
 }
コード例 #4
0
ファイル: Program.cs プロジェクト: mononen/C-TextGame
        public static void N1()
        {
            if (HasVisit.N1)
            {
                Console.WriteLine(Label.TUNNEL);
            }
            else
            {
                Console.WriteLine(Desc.N1);
            }
            HasVisit.N1 = true;
            String KeyIn  = Input.getInput();
            String Parsed = Input.Parser(KeyIn);

            if (KeyIn.Equals("mining cart") || KeyIn.Equals("cart") || KeyIn.Equals("minecart") || KeyIn.Equals("get in mining cart") || KeyIn.Equals("get in minecart") || KeyIn.Equals("enter cart") || KeyIn.Equals("enter"))
            {
                Cart();
            }
            else if (KeyIn.Equals("take flares") || KeyIn.Equals("flares") || KeyIn.Equals("flare"))
            {
                if (Inventory.flareN1Taken)
                {
                    Console.WriteLine("There are no magazines here to take!");
                }
                else
                {
                    Inventory.flareN1Taken = true;
                    Inventory.Flare        = Inventory.Flare + 2;
                    Console.WriteLine("You take two flares.");
                }
            }
            else if (KeyIn.Equals("take flare gun") || KeyIn.Equals("flare gun"))
            {
                if (Inventory.FlareGunN1Taken)
                {
                    Console.WriteLine("There isn't a flare gun here to take!");
                }
                else
                {
                    Inventory.FlareGunN1Taken = true;
                    Inventory.FlareGun        = true;
                    Console.WriteLine("You take the flare gun.");
                }
            }
            else if (Parsed.Equals("look"))
            {
                Console.WriteLine(Desc.N1Empty);
                N1();
            }
            else if (Parsed.Equals("has visit"))
            {
                HasVisit.Print();
                N1();
            }
            else if (Parsed.Equals("inv"))
            {
                Inventory.ItemStatusPrint();
                N1();
            }
            else if (Parsed.Equals("quit"))
            {
                RunStat.IsRunning = false;
            }
            else if (Parsed.Equals("clr"))
            {
                Console.Clear();
                GC.Collect();
                N1();
            }
            else if (Parsed.Equals("back"))
            {
                LightBasement();
            }
            else
            {
                Console.WriteLine("You find yourself staring at the mine cart");
                N1();
            }
        }
コード例 #5
0
ファイル: Program.cs プロジェクト: mononen/C-TextGame
        public static void Kitchen()
        {
            if (HasVisit.kitchen)
            {
                Console.WriteLine(Label.KL);
            }
            else
            {
                Console.WriteLine(Desc.k1);
            }
            HasVisit.kitchen = true;
            String KeyIn  = Input.getInput();
            String Parsed = Input.Parser(KeyIn);

            if (KeyIn.Equals("take flask"))
            {
                if (Inventory.FlaskKitchen)
                {
                    Console.WriteLine("There isn't a flask here to take!");
                }
                else
                {
                    Console.WriteLine("you take the flask");
                    Inventory.flask = true;
                    AboveGround.Kitchen();
                }
            }
            else if (Parsed.Equals("east"))
            {
                AboveGround.Bedroom();
            }
            else if (Parsed.Equals("look"))
            {
                Console.WriteLine(Desc.k1);
                Kitchen();
            }
            else if (Parsed.Equals("quit"))
            {
                RunStat.IsRunning = false;
            }
            else if (Parsed.Equals("has been"))
            {
                HasVisit.Print();
                Kitchen();
            }
            else if (Parsed.Equals("inv"))
            {
                Inventory.ItemStatusPrint();
                Kitchen();
            }
            else if (Parsed.Equals("clr"))
            {
                Console.Clear();
                GC.Collect();
                Kitchen();
            }
            else
            {
                Console.WriteLine("You look around confused.");
                Kitchen();
            }
        }
コード例 #6
0
ファイル: Program.cs プロジェクト: mononen/C-TextGame
        public static void S1()
        {
            if (HasVisit.S1)
            {
                Console.WriteLine(Label.WELL);
            }
            else
            {
                Console.WriteLine(Desc.S1);
            }
            HasVisit.S1 = true;
            String KeyIn  = Input.getInput();
            String Parsed = Input.Parser(KeyIn);

            if (KeyIn.Equals("take rope") || KeyIn.Equals("rope"))
            {
                Console.WriteLine("You take the rope.");
                Inventory.rope = true;
            }
            else if (KeyIn.Equals("climb") || KeyIn.Equals("climb rope"))
            {
                if (Inventory.TieRope == false)
                {
                    Console.WriteLine("You fall to your death");
                    Console.WriteLine("game over.");
                    RunStat.IsRunning = false;
                }
            }
            else if (Inventory.rope == true && KeyIn.Equals("tie rope"))
            {
                Console.WriteLine("You tie the rope on the bracket.");
                Inventory.TieRope = true;
            }
            else if (Inventory.TieRope == true && KeyIn.Equals("climb"))
            {
                //temp troubleshooting code
                Console.WriteLine("You go to the bottom of the rope");
                //WellBottom();
            }
            else if (Parsed.Equals("look"))
            {
                Console.WriteLine(Desc.N1Empty);
                S1();
            }
            else if (Parsed.Equals("has visit"))
            {
                HasVisit.Print();
                S1();
            }
            else if (Parsed.Equals("inv"))
            {
                Inventory.ItemStatusPrint();
                S1();
            }
            else if (Parsed.Equals("quit"))
            {
                RunStat.IsRunning = false;
            }
            else if (Parsed.Equals("clr"))
            {
                Console.Clear();
                GC.Collect();
                S1();
            }
            else if (Parsed.Equals("back"))
            {
                LightBasement();
            }
            else
            {
                Console.WriteLine("You look around confused.");
                S1();
            }
        }
コード例 #7
0
ファイル: Program.cs プロジェクト: mononen/C-TextGame
        public static void LightBasement()
        {
            if (HasVisit.basement)
            {
                Console.WriteLine(Label.BASEMENT);
            }
            else
            {
                Console.WriteLine(Desc.bl1);
            }
            HasVisit.basement = true;
            String KeyIn  = Input.getInput();
            String Parsed = Input.Parser(KeyIn);

            if (KeyIn.Equals("take gun") || KeyIn.Equals("take pistol") || KeyIn.Equals("gun"))
            {
                Inventory.Nmm = true;
                Console.WriteLine("You pick up a 9mm handgun");
                LightBasement();
            }
            else if (KeyIn.Equals("take magazines") || KeyIn.Equals("magazines") || KeyIn.Equals("magazine") || KeyIn.Equals("take magazine") || KeyIn.Equals("take ammo") || KeyIn.Equals("ammo") || KeyIn.Equals("take mags") || KeyIn.Equals("mags"))
            {
                if (Inventory.NmmRBasementTaken)
                {
                    Console.WriteLine("There are no magazines here to take!");
                }
                else
                {
                    Inventory.NmmRBasementTaken = true;
                    Inventory.NmmR = Inventory.NmmR + 16;
                    Console.WriteLine("You take 2 magazines that each contain 8 bullets.");
                }
                LightBasement();
            }
            else if (Parsed.Equals("south"))
            {
                S1();
            }
            else if (Parsed.Equals("north"))
            {
                N1();
            }
            else if (Parsed.Equals("look"))
            {
                if (Inventory.NmmBasementTaken)
                {
                    Console.WriteLine(Desc.bl1Empty);
                }
                else
                {
                    Console.WriteLine(Desc.bl1);
                }
            }
            else if (Parsed.Equals("quit"))
            {
                RunStat.IsRunning = false;
            }
            else if (Parsed.Equals("back"))
            {
                Console.WriteLine(Desc.bdt);
                LightBasement();
            }
            else if (Parsed.Equals("has been"))
            {
                HasVisit.Print();
                LightBasement();
            }
            else if (Parsed.Equals("inv"))
            {
                Inventory.ItemStatusPrint();
                LightBasement();
            }
            else if (Parsed.Equals("clr"))
            {
                Console.Clear();
                GC.Collect();
                LightBasement();
            }
            else
            {
                Console.WriteLine("You look around confused.");
                LightBasement();
            }
        }
コード例 #8
0
ファイル: Program.cs プロジェクト: mononen/C-TextGame
        public static void Closet()
        {
            if (HasVisit.closet)
            {
                Console.WriteLine(Label.CL);
            }
            else
            {
                Console.WriteLine(Desc.c1);
            }
            HasVisit.closet = true;
            String KeyIn  = Input.getInput();
            String Parsed = Input.Parser(KeyIn);

            if (KeyIn.Equals("take flashlight") || KeyIn.Equals("flashlight") || KeyIn.Equals("take flash light"))
            {
                if (Inventory.FlareGunN1Taken)
                {
                    Console.WriteLine("There isn't a flare gun here to take!");
                }
                else
                {
                    Console.WriteLine("You take the flashlight");
                    Inventory.flashlight = true;
                    Closet();
                }
            }
            else if (KeyIn.Equals("take rug"))
            {
                Console.WriteLine("What do you expect me to do with this?! It's way too big to carry!");
                Closet();
            }
            else if (KeyIn.Equals("move rug"))
            {
                Console.WriteLine("You move the rug out of your way, revealing a trapdoor.");
                HasVisit.trapdoor = true;
                Closet();
            }
            else if (KeyIn.Equals("enter") && HasVisit.trapdoor)
            {
                UnderGround.DarkBasement();
            }
            else if (KeyIn.Equals("look") || KeyIn.Equals("look around"))
            {
                if (Inventory.flashlight)
                {
                    Console.WriteLine(Desc.c2);
                }
                else if (HasVisit.trapdoor)
                {
                    Console.WriteLine(Desc.c4);
                }
                else if (HasVisit.trapdoor && Inventory.flashlight)
                {
                    Console.WriteLine(Desc.c3);
                }
                else
                {
                    Console.WriteLine(Desc.c1);
                }
            }
            else if (Parsed.Equals("quit"))
            {
                RunStat.IsRunning = false;
            }
            else if (Parsed.Equals("has been"))
            {
                HasVisit.Print();
                Closet();
            }
            else if (Parsed.Equals("inv"))
            {
                Inventory.ItemStatusPrint();
                Closet();
            }
            else if (Parsed.Equals("back"))
            {
                Bedroom();
            }
            else if (Parsed.Equals("clr"))
            {
                Console.Clear();
                GC.Collect();
                Closet();
            }
            else
            {
                Console.WriteLine("You look around confused.");
                Closet();
            }
        }
コード例 #9
0
ファイル: Program.cs プロジェクト: mononen/C-TextGame
        public static void Bedroom()
        {
            if (HasVisit.bedroom)
            {
                Console.WriteLine(Label.BL);
            }
            else
            {
                Console.WriteLine(Desc.b1);
            }
            HasVisit.bedroom = true;
            String KeyIn  = Input.getInput();
            String Parsed = Input.Parser(KeyIn);

            if (KeyIn.Equals("take bottle"))
            {
                if (Inventory.FlareGunN1Taken)
                {
                    Console.WriteLine("There isn't a flare gun here to take!");
                }
                else
                {
                    Console.WriteLine("You take the bottle");
                    Inventory.bottle = true;
                    AboveGround.Bedroom();
                }
            }
            else if (KeyIn.Equals("take bag") || KeyIn.Equals("take sack") || KeyIn.Equals("take wool sack"))
            {
                if (Inventory.FlareGunN1Taken)
                {
                    Console.WriteLine("There isn't a flare gun here to take!");
                }
                else
                {
                    Console.WriteLine("You take the wool sack");
                    Inventory.sack = true;
                    AboveGround.Bedroom();
                }
            }
            else if (KeyIn.Equals("go left"))
            {
                Closet();
            }
            else if (Parsed.Equals("look"))
            {
                if (Inventory.bottle)
                {
                    Console.WriteLine(Desc.b2);
                }
                else if (Inventory.sack)
                {
                    Console.WriteLine(Desc.b3);
                }
                else if (Inventory.sack && Inventory.bottle)
                {
                    Console.WriteLine(Desc.b4);
                }
                else
                {
                    Console.WriteLine(Desc.b1);
                }
            }
            else if (Parsed.Equals("quit"))
            {
                RunStat.IsRunning = false;
            }
            else if (Parsed.Equals("has been"))
            {
                HasVisit.Print();
                Bedroom();
            }
            else if (Parsed.Equals("inv"))
            {
                Inventory.ItemStatusPrint();
                Bedroom();
            }
            else if (Parsed.Equals("back") || Parsed.Equals("west"))
            {
                AboveGround.Kitchen();
                Bedroom();
            }
            else if (KeyIn.Equals("clear"))
            {
                Console.Clear();
                GC.Collect();
                Bedroom();
            }
            else
            {
                Console.WriteLine("You look around confused.");
                Bedroom();
            }
        }