Beispiel #1
0
        public override void PrintLocked(IArtifact artifact)
        {
            Debug.Assert(artifact != null);

            // Chest

            if (artifact.Uid == 54)
            {
                gOut.Print("{0} is locked -- what do you think that padlock is... chopped liver?", artifact.GetTheName(true));
            }

            // Oak door

            else if (artifact.Uid == 85)
            {
                gOut.Print("{0} is locked shut!", artifact.GetTheName(true));
            }

            // Cell doors

            else if (artifact.Uid >= 86 && artifact.Uid <= 88)
            {
                gOut.Print("{0} is locked!", artifact.GetTheName(true));
            }
            else
            {
                base.PrintLocked(artifact);
            }
        }
Beispiel #2
0
        public override void PrintOpened(IArtifact artifact)
        {
            Debug.Assert(artifact != null);

            // Chest

            if (artifact.Uid == 54)
            {
                gOut.Print("{0} is open!", artifact.GetTheName(true));
            }

            // Oak door

            else if (artifact.Uid == 85)
            {
                gOut.Print("{0} swings open to your gentle touch.", artifact.GetTheName(true));
            }

            // Cell doors

            else if (artifact.Uid >= 86 && artifact.Uid <= 88)
            {
                gOut.Print("{0} squeaks open.", artifact.GetTheName(true));
            }
            else
            {
                base.PrintOpened(artifact);
            }
        }
Beispiel #3
0
        public virtual void PrintWearingRemoveFirst01(IArtifact artifact)
        {
            Debug.Assert(artifact != null);

            if (Globals.IsRulesetVersion(5))
            {
                gOut.Print("You're wearing {0}.", artifact.GetTheName());
            }
            else
            {
                gOut.Print("You're wearing {0}.  Remove {1} first.", artifact.GetTheName(), artifact.EvalPlural("it", "them"));
            }
        }
Beispiel #4
0
        public override void PrintLocked(IArtifact artifact)
        {
            Debug.Assert(artifact != null);

            if (artifact.Uid == 3 || artifact.Uid == 4 || artifact.Uid == 5)
            {
                gOut.Print("You can't seem to get enough leverage to pry open {0}'s door.", artifact.GetTheName());

                artifact.DoorGate.SetKeyUid(-1);
            }
            else if (artifact.Uid == 13)
            {
                gOut.Print("You work for a while on {0}'s lock but can't break it.", artifact.GetTheName());

                artifact.InContainer.SetKeyUid(-1);
            }
            else if (artifact.Uid == 35)
            {
                gOut.Print("You work for a while on {0}'s lid but can't pry it open.", artifact.GetTheName());

                artifact.InContainer.SetKeyUid(-1);
            }
            else
            {
                base.PrintLocked(artifact);
            }
        }
Beispiel #5
0
        public override void PrintCantVerbThat(IArtifact artifact)
        {
            Debug.Assert(artifact != null);

            var ac = artifact.GetCategories(0);

            Debug.Assert(ac != null);

            Globals.Buf.Clear();

            switch (ac.Field4)
            {
            case -1:

                Globals.Buf.SetPrint("{0} {1} affixed to the wall.", artifact.GetTheName(true, buf: Globals.Buf01), artifact.EvalPlural("is", "are"));

                break;

            case -2:

                Globals.Buf.SetPrint("{0} {1} carved into the wall.", artifact.GetTheName(true, buf: Globals.Buf01), artifact.EvalPlural("is", "are"));

                break;

            case -3:

                Globals.Buf.SetPrint("{0} {1} bolted down, and can't be removed.", artifact.GetTheName(true, buf: Globals.Buf01), artifact.EvalPlural("is", "are"));

                break;

            case -4:

                Globals.Buf.SetPrint("You can't get near enough to {0} to grab {1}.", artifact.GetTheName(buf: Globals.Buf01), artifact.EvalPlural("it", "them"));

                break;
            }

            if (Globals.Buf.Length > 0)
            {
                gOut.Write("{0}", Globals.Buf);
            }
            else
            {
                base.PrintCantVerbThat(artifact);
            }
        }
Beispiel #6
0
        public virtual void PrintLightAlmostOutCheck(IArtifact artifact, IArtifactCategory ac)
        {
            Debug.Assert(artifact != null && ac != null);

            if (ac.Field1 <= 20)
            {
                gOut.Print("{0}{1}", artifact.GetTheName(true, buf: Globals.Buf01), ac.Field1 <= 10 ? " is almost out!" : " grows dim!");
            }
        }
Beispiel #7
0
        public virtual void PrintContainerNotEmpty(IArtifact artifact, ContainerType containerType, bool isPlural)
        {
            Debug.Assert(artifact != null && Enum.IsDefined(typeof(ContainerType), containerType));

            gOut.Print("{0} {1} {2} {3} {4}.  Remove it first.",
                       artifact.GetTheName(true),
                       artifact.EvalPlural("has", "have"),
                       isPlural ? "some stuff" : "something",
                       gEngine.EvalContainerType(containerType, "inside", "on", "under", "behind"),
                       artifact.EvalPlural("it", "them"));
        }
Beispiel #8
0
        public override void PrintLightOut(IArtifact artifact)
        {
            Debug.Assert(artifact != null);

            if (artifact.Uid == 1)
            {
                gOut.Print("{0} suddenly flickers and then goes out.", artifact.GetTheName(true));
            }
            else
            {
                base.PrintLightOut(artifact);
            }
        }
Beispiel #9
0
        public override void PrintLightObj(IArtifact artifact)
        {
            Debug.Assert(artifact != null);

            if (artifact.Uid == 1)
            {
                gOut.Print("A magical flame bursts from {0}.", artifact.GetTheName());
            }
            else
            {
                base.PrintLightObj(artifact);
            }
        }
Beispiel #10
0
        public override void PrintOpenObjWithKey(IArtifact artifact, IArtifact key)
        {
            Debug.Assert(artifact != null && key != null);

            // Large green device

            if (artifact.Uid == 44)
            {
                gOut.Print("You try to open the glowing device with {0}.", key.GetTheName());
            }
            else
            {
                base.PrintOpenObjWithKey(artifact, key);
            }
        }
Beispiel #11
0
        public override void PrintObjBlocksTheWay(IArtifact artifact)
        {
            Debug.Assert(artifact != null);

            // Tombs and crypts need to be opened before entry

            if (artifact.Uid == 3 || artifact.Uid == 4 || artifact.Uid == 5)
            {
                gOut.Print("{0}'s door will have to be opened first!", artifact.GetTheName(true));
            }
            else
            {
                base.PrintObjBlocksTheWay(artifact);
            }
        }
Beispiel #12
0
        public override void PrintClosed(IArtifact artifact)
        {
            Debug.Assert(artifact != null);

            if (artifact.Uid == 3 || artifact.Uid == 4 || artifact.Uid == 5)
            {
                gOut.Print("With great effort, {0}'s door slides closed.", artifact.GetTheName());

                artifact.DoorGate.SetKeyUid(-1);
            }
            else
            {
                base.PrintClosed(artifact);
            }
        }
Beispiel #13
0
        public override void PrintLightAlmostOutCheck(IArtifact artifact, IArtifactCategory ac)
        {
            Debug.Assert(artifact != null && ac != null);

            if (artifact.Uid == 1)
            {
                if (ac.Field1 <= 10 && gEngine.RollDice(1, 100, 0) > 50)
                {
                    gOut.Print("{0} flickers momentarily.", artifact.GetTheName(true, buf: Globals.Buf01));
                }
            }
            else
            {
                base.PrintLightAlmostOutCheck(artifact, ac);
            }
        }
Beispiel #14
0
        public override void PrintOpenObjWithKey(IArtifact artifact, IArtifact key)
        {
            Debug.Assert(artifact != null && key != null);

            if (artifact.Uid == 3 || artifact.Uid == 4 || artifact.Uid == 5)
            {
                gOut.Print("With great effort, {0}'s door slides open.", artifact.GetTheName());
            }
            else if (artifact.Uid == 13)
            {
                gOut.Print("You manage to break open {0}, and find several items inside!", artifact.GetTheName());
            }
            else if (artifact.Uid == 35)
            {
                gOut.Print("You manage to pry open {0}'s lid, and find something inside!", artifact.GetTheName());
            }
            else
            {
                base.PrintOpenObjWithKey(artifact, key);
            }
        }
Beispiel #15
0
        public virtual void PrintGiveObjToActor(IArtifact artifact, IMonster monster)
        {
            Debug.Assert(artifact != null && monster != null);

            gOut.Print("You give {0} to {1}.", artifact.GetTheName(), monster.GetTheName(buf: Globals.Buf01));
        }
Beispiel #16
0
        public virtual void PrintCantReadyWeaponWithShield(IArtifact weapon, IArtifact shield)
        {
            Debug.Assert(weapon != null && shield != null);

            gOut.Print("You can't use {0} while wearing {1}.", weapon.GetTheName(), shield.GetTheName(buf: Globals.Buf01));
        }
Beispiel #17
0
        public virtual void PrintLightObj(IArtifact artifact)
        {
            Debug.Assert(artifact != null);

            gOut.Print("You've lit {0}.", artifact.GetTheName());
        }
Beispiel #18
0
        public virtual void PrintNotWhileWearingObj(IArtifact artifact)
        {
            Debug.Assert(artifact != null);

            gOut.Print("You can't do that while wearing {0}.", artifact.GetTheName());
        }
Beispiel #19
0
        public virtual void PrintWhyAttack(IArtifact artifact)
        {
            Debug.Assert(artifact != null);

            gOut.Print("Why would you attack {0}?", artifact.GetTheName());
        }
Beispiel #20
0
        public virtual void PrintNothingFound(IArtifact artifact)
        {
            Debug.Assert(artifact != null);

            gOut.Print("Searching {0} reveals nothing of interest.", artifact.GetTheName());
        }
Beispiel #21
0
        public virtual void PrintMustBeFreed(IArtifact artifact)
        {
            Debug.Assert(artifact != null);

            gOut.Print("{0} must be freed.", artifact.GetTheName(true));
        }
Beispiel #22
0
        public virtual void PrintTooHeavy(IArtifact artifact)
        {
            Debug.Assert(artifact != null);

            gOut.Print("{0} {1} too heavy.", artifact.GetTheName(true), artifact.EvalPlural("is", "are"));
        }
Beispiel #23
0
        public override void PrintOpenObjWithKey(IArtifact artifact, IArtifact key)
        {
            Debug.Assert(artifact != null && key != null);

            // Chest/oak door/cell doors

            if (artifact.Uid == 54 || artifact.Uid == 85 || (artifact.Uid >= 86 && artifact.Uid <= 88))
            {
                gOut.Print("You unlock {0} with {1}.", artifact.EvalPlural("it", "them"), key.GetTheName());

                PrintOpened(artifact);
            }
            else
            {
                base.PrintOpenObjWithKey(artifact, key);
            }
        }
Beispiel #24
0
        public virtual void PrintObjBelongsToActor(IArtifact artifact, IMonster monster)
        {
            Debug.Assert(artifact != null && monster != null);

            gOut.Print("{0} belongs to {1}.", artifact.GetTheName(true), monster.GetTheName(buf: Globals.Buf01));
        }
Beispiel #25
0
        public virtual void PrintCantWearShieldWithWeapon(IArtifact shield, IArtifact weapon)
        {
            Debug.Assert(shield != null && weapon != null);

            gOut.Print("You can't wear {0} while using {1}.", shield.GetTheName(), weapon.GetTheName(buf: Globals.Buf01));
        }
Beispiel #26
0
        public virtual void PrintOpenObjWithKey(IArtifact artifact, IArtifact key)
        {
            Debug.Assert(artifact != null && key != null);

            gOut.Print("You open {0} with {1}.", artifact.EvalPlural("it", "them"), key.GetTheName());
        }
Beispiel #27
0
        public override void ProcessArtifact(IArtifact artifact)
        {
            Debug.Assert(artifact != null);

            base.ProcessArtifact(artifact);

            // Drop in vertical shaft

            if (ActorRoom.Uid == 70 || ActorRoom.Uid == 71)
            {
                gOut.Print("{0}{1} falls down into the darkness.", Environment.NewLine, artifact.GetTheName(true));

                artifact.SetInRoomUid(69);
            }
        }
Beispiel #28
0
        public virtual void PrintObjBlocksTheWay(IArtifact artifact)
        {
            Debug.Assert(artifact != null);

            gOut.Print("{0} block{1} the way!", artifact.GetTheName(true), artifact.EvalPlural("s", ""));
        }
Beispiel #29
0
        public virtual void PrintBestLeftAlone(IArtifact artifact)
        {
            Debug.Assert(artifact != null);

            gOut.Print("{0} {1} best if left alone.", artifact.GetTheName(true), artifact.EvalPlural("is", "are"));
        }