Пример #1
0
        public override void Initialize()
        {
            Name = "snake";
            Synonyms.Are("cobra", "asp", "huge", "fierce", "green", "ferocious",
                         "venemous", "venomous", "large", "big", "killer");
            Description        = "I wouldn't mess with it if I were you.";
            InitialDescription = "A huge green fierce snake bars the way!";
            Animate            = true;

            FoundIn <HallOfMtKing>();

            Before <Attack>(() => TooDangerous);

            Before <Order, Ask, Answer>(() => Print("Hiss!"));

            Before <ThrowAt>(() =>
            {
                if (Noun is Axe)
                {
                    return(TooDangerous);
                }

                return(NothingToEat);
            });

            Before <Give>(() =>
            {
                if (Noun is LittleBird)
                {
                    Noun.Remove();
                    Print("The snake has now devoured your bird.");
                }
                else
                {
                    Print(NothingToEat);
                }

                return(true);
            });

            Before <Take>(() =>
            {
                Print("It takes you instead. Glrp!");
                GameOver.Dead();
                return(true);
            });
        }
Пример #2
0
        public override void Initialize()
        {
            Name = "burly troll";
            Synonyms.Are("burly", "troll");
            Description        = "Trolls are close relatives with rocks and have skin as tough as that of a rhinoceros.";
            InitialDescription = "A burly troll stands by the bridge and insists you throw him a treasure before you may cross.";
            Animate            = true;

            Before <Attack>(() => "The troll laughs aloud at your pitiful attempt to injure him.");

            Before <ThrowAt, Give>(() =>
            {
                if (Noun is Treasure)
                {
                    Noun.Remove();
                    MoveTo <RicketyBridge>();
                    HasCaughtTreasure = true;
                    Print("The troll catches your treasure and scurries away out of sight.");
                    Score.Add(-5, true);
                    return(true);
                }

                if (Noun is TastyFood)
                {
                    return(Print("Gluttony is not one of the troll's vices. Avarice, however, is."));
                }

                return(Print($"The troll deftly catches {Noun.Article} {Noun.Name}, examines it carefully, and tosses it back, declaring, " +
                             "\"Good workmanship, but it's not valuable enough.\""));
            });

            //Before<Order>(() => "You'll be lucky.");

            Before <Ask>(() => "Trolls make poor conversation.");
            //Before<Answer>(() => "Trolls make poor conversation.");
        }