예제 #1
0
        public override void Initialize()
        {
            Name = "Persian rug";
            Synonyms.Are("rug", "persian", "persian", "fine", "finest", "dragon's");

            FoundIn <SecretCanyon>();

            Describe = () =>
            {
                if (DragonIsHere)
                {
                    return("The dragon is sprawled out on the Persian rug!");
                }

                return("The Persian rug is spread out on the floor here.");
            };

            Before <Take>(() =>
            {
                if (DragonIsHere)
                {
                    Print("You'll need to get the dragon to move first!");
                    return(true);
                }

                return(false);
            });
        }
예제 #2
0
        public override void Initialize()
        {
            Name = "Atop Stalactite";
            Synonyms.Are("atop", "stalactite");
            Description =
                "A large stalactite extends from the roof and almost reaches the floor below. " +
                "You could climb down it, and jump from it to the floor, " +
                "but having done so you would be unable to reach it to climb back up.";

            NorthTo <SecretNSCanyon1>();

            DownTo(() =>
            {
                if (Random.Number(1, 100) <= 40)
                {
                    return(Rooms.Get <AlikeMaze6>());
                }
                if (Random.Number(1, 100) <= 50)
                {
                    return(Rooms.Get <AlikeMaze9>());
                }
                return(Rooms.Get <AlikeMaze4>());
            });

            Before <Climb>(() =>
            {
                MovePlayer.To(DOWN());
                return(true);
            });
        }
예제 #3
0
        public override void Initialize()
        {
            Name = "In West Pit";

            Synonyms.Are("in", "west", "pit");

            Description =
                "You are at the bottom of the western pit in the twopit room. " +
                "There is a large hole in the wall about 25 feet above you.";

            NoDwarf = true;

            Before <Climb>(() =>
            {
                if (Noun is Plant)
                {
                    return(false);
                }

                var plant = Objects.Get <Plant>();

                if (plant.Height == PlantSize.Tiny)
                {
                    Print("There is nothing here to climb. Use \"up\" or \"out\" to leave the pit.");
                    return(true);
                }

                return(false);
            });

            UpTo <WestEndOfTwoPitRoom>();
        }
예제 #4
0
        public override void Initialize()
        {
            Name = "At Slit In Streambed";
            Synonyms.Are("slit", "in", "streambed");
            Description = "At your feet all the water of the stream splashes into a 2-inch slit in the rock. Downstream the streambed is bare rock.";

            NorthTo <Valley>();
            EastTo <Forest1>();
            WestTo <Forest1>();
            SouthTo <OutsideGrate>();

            Before <Down>(() =>
            {
                Print("You don't fit through a two-inch slit!");
                return(true);
            });

            Before <In>(() =>
            {
                Print("You don't fit through a two-inch slit!");
                return(true);
            });

            Has <TwoInchSlit>();
            Has <Stream>();
        }
예제 #5
0
 /*
  * Verb 'go' 'run' 'walk'
  *                                           -> VagueGo
  * noun=ADirection                           -> Go
  * noun                                      -> Enter
  * 'out'                                     -> Exit
  * 'in'                                      -> GoIn
  * 'in'/'through' noun                       -> Enter;
  */
 public Go()
 {
     Name = "go";
     Synonyms.Are("walk", "run");
     // Grammars.Add(K.DIRECTION_TOKEN, ()=> false);
     //Grammars.Add(K.NOUN_TOKEN, EnterIt);
 }
예제 #6
0
 public override void Initialize()
 {
     Name = "tiny slits";
     Synonyms.Are("slit", "slits", "tiny");
     // has multitude
     FoundIn <InPit>();
 }
예제 #7
0
        public override void Initialize()
        {
            Name = "recent issues of \"Spelunker Today\"";
            Synonyms.Are("magazines", "magazine", "issue", "issues", "spelunker", "today");
            Description        = "I'm afraid the magazines are written in Dwarvish.";
            InitialDescription = "There are a few recent issues of ~Spelunker Today~ magazine here.";
            Article            = "a few";
            // multitude

            FoundIn <Anteroom>();

            After <Take>(() =>
            {
                if (CurrentRoom.Location is WittsEnd)
                {
                    Score.Add(-1);
                }
            });

            After <Drop>(() =>
            {
                if (CurrentRoom.Location is WittsEnd)
                {
                    Score.Add(1);
                    Print("You really are at wit's end.");
                }
            });
        }
예제 #8
0
 public Pick()
 {
     Name = "pick up";
     Synonyms.Are("pick");
     Grammars.Add("up <multi>", PickUpObject);
     Grammars.Add("<multi> up", PickUpObject);
 }
        public override void Initialize()
        {
            Name = "At West End of Twopit Room";
            Synonyms.Are("twopit", "room");
            Description =
                "You are at the west end of the twopit room. " +
                "There is a large hole in the wall above the pit at this end of the room.";

            EastTo <EastEndOfTwoPitRoom>();

            WestTo <SlabRoom>();

            DownTo <WestPit>();

            UpTo(() =>
            {
                Print("It is too far up for you to reach.");
                return(this);
            });

            Before <Enter>(() =>
            {
                if (Noun is HoleAbovePit)
                {
                    Print("It is too far up for you to reach.");
                }

                return(false);
            });
        }
예제 #10
0
        public override void Initialize()
        {
            Name = "dome";
            Synonyms.Are("dome");

            Before <Examine>(() =>
            {
                if (IsCarrying <LargeGoldNugget>())
                {
                    Print("I'm not sure you'll be able to get up it with what you're carrying.");
                }
                else
                {
                    Print("It looks like you might be able to climb up it.");
                }

                return(true);
            });

            Before <Climb>(() =>
            {
                CurrentRoom.Location.DOWN();
                return(true);
            });
        }
예제 #11
0
        public override void Initialize()
        {
            Name = "streambed";
            Synonyms.Are("bed", "streambed", "rock", "small", "rocky", "bare", "dry");

            FoundIn <Valley>();
        }
예제 #12
0
 public override void Initialize()
 {
     Name = "wide stone staircase";
     Synonyms.Are("stair", "stairs", "staircase", "wide", "stone");
     Description = "The staircase leads down.";
     FoundIn <HallOfMists>();
 }
예제 #13
0
        public override void Initialize()
        {
            Name = "crystal bridge";
            Synonyms.Are("crystal", "bridge");
            Description        = "It spans the fissure, thereby providing you a way across.";
            InitialDescription = "A crystal bridge now spans the fissure.";
            Open   = true;
            Absent = true;

            FoundIn <WestSideOfFissure, EastBankOfFissure>();

            Describe = () =>
            {
                return("A crystal bridge now spans the fissure.");
            };

            DoorDirection(() =>
            {
                if (In <WestSideOfFissure>())
                {
                    return(Direction <East>());
                }
                return(Direction <West>());
            });

            DoorTo(() =>
            {
                if (In <WestSideOfFissure>())
                {
                    return(Room <EastBankOfFissure>());
                }

                return(Room <WestSideOfFissure>());
            });
        }
예제 #14
0
 public override void Initialize()
 {
     Name = "carpet";
     Synonyms.Are("carpet", "shag", "pile", "heavy", "thick");
     Description = "The carpet is quite plush.";
     FoundIn <SoftRoom>();
 }
예제 #15
0
        public override void Initialize()
        {
            Name = "At Window on Pit";
            Synonyms.Are("window", "on", "pit");
            Description =
                "You're at a low window overlooking a huge pit, which extends up out of sight. " +
                "A floor is indistinctly visible over 50 feet below. " +
                "Traces of white mist cover the floor of the pit, becoming thicker to the left. " +
                "Marks in the dust around the window would seem to indicate that someone has been here recently. " +
                "Directly across the pit from you and 25 feet away " +
                "there is a similar window looking into a lighted room. " +
                "A shadowy figure can be seen there peering back at you.";

            CantGo = "The only passage is back west to the junction.";

            WestTo <JunctionOfThree>();

            Before <Jump>(() =>
            {
                Print("You jump and break your neck!");
                GameOver.Dead();
                return(true);
            });

            Before <WaveHands>(() =>
            {
                Print("The shadowy figure waves back at you!");
                return(true);
            });
        }
예제 #16
0
 public Open()
 {
     Name = "open";
     Synonyms.Are("open, uncover, undo, unwrap");
     Grammars.Add("<noun>", OpenObject);
     Grammars.Add("<noun> with <held>", UnlockObject);
 }
예제 #17
0
        public override void Initialize()
        {
            Name = "Alcove";

            Synonyms.Are("alcove");

            Description =
                "You are in an alcove. " +
                "A small northwest path seems to widen after a short distance. " +
                "An extremely tight tunnel leads east. " +
                "It looks like a very tight squeeze. " +
                "An eerie light can be seen at the other end.";

            NorthWestTo <MistyCavern>();

            EastTo(() =>
            {
                var carrying = Inventory.Items.Count;

                if (carrying == 0 || carrying == 1 && IsCarrying <EggSizedEmerald>())
                {
                    return(Room <PloverRoom>());
                }

                Print("Something you're carrying won't fit through the tunnel with you. You'd best take inventory and drop something.");
                return(this);
            });
        }
예제 #18
0
        public override void Initialize()
        {
            Name = "pool of oil";
            Synonyms.Are("pool", "oil", "small");
            Description = "It looks like ordinary oil.";

            Before <Drink>(() =>
            {
                Print("Absolutely not.");
                return(true);
            });

            Before <Take>(() =>
            {
                if (!Player.Has <Bottle>())
                {
                    Print("You have nothing in which to carry the oil.");
                }
                else
                {
                    Execute("fill bottle");
                }
                return(true);
            });
        }
예제 #19
0
        public override void Initialize()
        {
            Name = "Immense N/S Passage";
            Synonyms.Are("immense", "n/s", "passage");
            Description = "You are at one end of an immense north/south passage.";

            SouthTo <GiantRoom>();

            NorthTo(() =>
            {
                var rustyDoor = Room <RustyDoor>();

                if (rustyDoor.Locked)
                {
                    Redirect <Open>(rustyDoor, v => v.Expects(rustyDoor));
                    return(this);
                }

                if (!rustyDoor.Open)
                {
                    rustyDoor.Open = true;
                    Print("(first wrenching the door open)\n");
                }

                return(rustyDoor);
            });
        }
예제 #20
0
        public override void Initialize()
        {
            Name = "In Swiss Cheese Room";
            Synonyms.Are("swiss", "cheese", "room");
            Description =
                "You are in a room whose walls resemble swiss cheese. " +
                "Obvious passages go west, east, ne, and nw. " +
                "Part of the room is occupied by a large bedrock block.";

            WestTo <EastEndOfTwoPitRoom>();
            SouthTo <TallEWCanyon>();
            NorthEastTo <Bedquilt>();
            NorthWestTo <OrientalRoom>();
            EastTo <SoftRoom>();

            Before <Go>((Direction direction) =>
            {
                if ((direction is South && Random.Number(1, 100) <= 80) ||
                    (direction is Northwest && Random.Number(1, 100) <= 50))
                {
                    Print("You have crawled around in some little holes and wound up back in the main passage.");
                    return(true);
                }

                return(false);
            });
        }
예제 #21
0
 public override void Initialize()
 {
     Name = "cobbles";
     Synonyms.Are("cobble", "cobbles", "cobblestones", "cobblestone", "stones", "stone");
     HasPluralName = true;
     Description   = "They're just ordinary cobbles.";
 }
예제 #22
0
        public override void Initialize()
        {
            Name = "At Top of Small Pit";

            Synonyms.Are("top", "of", "small", "pit");

            Description =
                "At your feet is a small pit breathing traces of white mist. " +
                "A west passage ends here except for a small crack leading on.\n\n" +
                "Rough stone steps lead down the pit.";

            NoDwarf = true;

            EastTo <BirdChamber>();

            WestTo(() =>
            {
                Print("That crack is far too small for you to follow.");
                return(this);
            });

            DownTo(() =>
            {
                if (IsCarrying <LargeGoldNugget>())
                {
                    Print("You are at the bottom of the pit with a broken neck.");
                    GameOver.Dead();
                    return(this);
                }

                return(Rooms.Get <HallOfMists>());
            });
        }
예제 #23
0
 public override void Initialize()
 {
     Name = "large gold nugget";
     Synonyms.Are("gold", "nugget", "large", "heavy");
     Description        = "It's a large sparkling nugget of gold!";
     InitialDescription = "There is a large sparkling nugget of gold here!";
 }
예제 #24
0
        public override void Initialize()
        {
            Name = "dwarvish axe";
            Synonyms.Are("axe", "little", "dwarvish", "dwarven");
            InitialDescription = "There is a little axe here.";

            Before <Examine>(() =>
            {
                if (IsNearBear)
                {
                    return(false);
                }

                Print("It's lying beside the bear.");

                return(true);
            });

            Before <Take>(() =>
            {
                if (!IsNearBear)
                {
                    return(false);
                }

                Print("No chance. It's lying beside the ferocious bear, quite within harm's way.");
                return(true);
            });
        }
예제 #25
0
        public override void Initialize()
        {
            Name = "vending machine";
            Synonyms.Are("machine", "slot", "vending", "massive", "battery", "coin");
            Description = "The instructions on the vending machine read, \"Insert coins to receive fresh batteries.\"";

            FoundIn <DeadEnd14>();

            Receive((obj) =>
            {
                if (obj is RareCoins)
                {
                    var freshBatteries = Get <FreshBatteries>();
                    freshBatteries.MoveToLocation();
                    freshBatteries.InVendingMachine = false;

                    obj.Remove();

                    return("Soon after you insert the coins in the coin slot, the vending machine makes a grinding sound, and a set of fresh batteries falls at your feet.");
                }

                return("The machine seems to be designed to take coins.");
            });

            Before <Attack>(() => "The machine is quite sturdy and survives your attack without getting so much as a scratch.");

            Before <LookUnder>(() => "You don't find anything under the machine.");

            Before <Search>(() => "You can't get inside the machine.");

            Before <Take>(() => "The vending machine is far too heavy to move.");
        }
예제 #26
0
        public override void Initialize()
        {
            Name = "In Debris Room";
            Synonyms.Are("debris", "room");
            Description =
                "You are in a debris room filled with stuff washed in from the surface. " +
                "A low wide passage with cobbles becomes plugged with mud and debris here, " +
                "but an awkward canyon leads upward and west.\n\n" +
                "A note on the wall says, \"Magic word XYZZY.\"";

            EastTo <CobbleCrawl>();
            UpTo <AwkwardSlopingEWCanyon>();
            WestTo <AwkwardSlopingEWCanyon>();

            Before <Xyzzy>(() =>
            {
                L.MovePlayerTo <InsideBuilding>();
                return(true);
            });

            NoDwarf = true;

            Has <Debris>();
            Has <Cobbles>();
            Has <Note>();
        }
예제 #27
0
        public override void Initialize()
        {
            Name = "Shell Room";
            Synonyms.Are("shell, room");
            Description =
                "You're in a large room carved out of sedimentary rock. " +
                "The floor and walls are littered with bits of shells imbedded in the stone. " +
                "A shallow passage proceeds downward, and a somewhat steeper one leads up. " +
                "A low hands and knees passage enters from the south.";

            UpTo <ArchedHall>();

            DownTo <RaggedCorridor>();

            SouthTo(() =>
            {
                var clam = Get <GiantClam>();

                if (Inventory.Contains(clam))
                {
                    if (clam.HasBeenOpened)
                    {
                        Print("You can't fit this five-foot oyster through that little passage!");
                    }
                    else
                    {
                        Print("You can't fit this five-foot clam through that little passage!");
                    }

                    return(this);
                }

                return(Rooms.Get <ComplexJunction>());
            });
        }
예제 #28
0
        public override void Initialize()
        {
            Name = "Secret E/W Canyon Above Tight Canyon";
            Synonyms.Are("secret", "e/w", "canyon", "above", "tight", "canyon");
            Description =
                "You are in a secret canyon which here runs E/W. " +
                "It crosses over a very tight canyon 15 feet below. " +
                "If you go down you may not be able to get back up.";

            EastTo <HallOfMtKing>();

            WestTo <SecretCanyon>();

            DownTo <NSCanyon>();

            Before <Go>((Direction direction) =>
            {
                if (direction is West)
                {
                    Global.CanyonFrom = this;
                }

                return(false);
            });
        }
예제 #29
0
        public override void Initialize()
        {
            Name = "ming vase";
            Synonyms.Are("vase", "ming", "delicate");
            Description = "It's a delicate, precious, ming vase!";

            DepositPoints = 14;

            After <Drop>(() =>
            {
                if (Location.Contains <VelvetPillow>())
                {
                    Print("(coming to rest, delicately, on the velvet pillow)");
                    return(false);
                }

                RepaceVaseWithShards();
                Print("The ming vase drops with a delicate crash.");
                return(true);
            });

            Before <Attack>(() =>
            {
                RepaceVaseWithShards();
                Print("You have taken the vase and hurled it delicately to the ground.");
                return(true);
            });

            Before <Receive>(() =>
            {
                Print("The vase is too fragile to use as a container.");
                return(true);
            });
        }
예제 #30
0
 public override void Initialize()
 {
     Name = "dust";
     Synonyms.Are("dust", "marks");
     Description = "It just looks like ordinary dust.";
     FoundIn <BarrenRoom>();
 }