Esempio n. 1
0
        public override void InitArtifacts()
        {
            base.InitArtifacts();

            MacroFuncs.Add(1, () =>
            {
                if (gGameState.Trollsfire == 1)
                {
                    return(string.Format("{0}{0}Trollsfire is alight!", Environment.NewLine));
                }
                else
                {
                    return("");
                }
            });

            var synonyms = new Dictionary <long, string[]>()
            {
                { 3, new string[] { "label", "strange potion", "potion", "bottle" } },
                { 14, new string[] { "east wall", "wall", "smooth shape", "shape", "secret door", "door", "passage", "tunnel" } },
                { 15, new string[] { "water", "sea water", "ocean water" } },
                { 24, new string[] { "broken old boat", "old broken boat", "broken boat", "old boat" } },
            };

            foreach (var synonym in synonyms)
            {
                CreateArtifactSynonyms(synonym.Key, synonym.Value);
            }
        }
Esempio n. 2
0
        public Engine()
        {
            MacroFuncs.Add(6, () =>
            {
                var result = "(the specifics are left to your imagination)";

                if (gGameState != null && gGameState.MatureContent)
                {
                    result = Encoding.UTF8.GetString(Convert.FromBase64String("LS0gZWF0aW5nIGh1bWFuIGJhYmllcywgcmFwaW5nIHdvbWVuLCBhbmQgc28gZm9ydGg="));
                }

                return(result);
            });

            MacroFuncs.Add(7, () =>
            {
                var result = "You fool!  You just climbed down into the excrement duct!";

                if (gGameState != null && gGameState.MatureContent)
                {
                    result = Encoding.UTF8.GetString(Convert.FromBase64String("WW91IHN0dXBpZCBqZXJrISAgWW91IGp1c3QgY2xpbWJlZCBkb3duIGludG8gdGhlIHNoaXQgaG9sZSE="));
                }

                return(result);
            });

            PoundCharPolicy = PoundCharPolicy.None;
        }
Esempio n. 3
0
        public override void InitArtifacts()
        {
            base.InitArtifacts();

            MacroFuncs.Add(1, () =>
            {
                var largeFountainArtifact = gADB[24];

                Debug.Assert(largeFountainArtifact != null);

                return(largeFountainArtifact?.DoorGate != null ? "A small staircase leads down into darkness, and a passage leads back southward.  From below, many different noises can be discerned." : "A passage leads back southward.");
            });

            var synonyms = new Dictionary <long, string[]>()
            {
                { 1, new string[] { "magi-torch", "instruction label", "instruction tag", "instructions", "instruction", "label", "tag" } },
                { 3, new string[] { "small crypt door", "crypt door", "crypt", "door" } },
                { 4, new string[] { "small tomb door", "tomb door", "tomb", "door" } },
                { 5, new string[] { "crypt door", "door" } },
                { 6, new string[] { "bucket" } },
                { 10, new string[] { "gravestone", "stone" } },
                { 13, new string[] { "chest" } },
                { 14, new string[] { "old map", "map" } },
                { 15, new string[] { "bottle" } },
                { 16, new string[] { "gauntlets", "gauntlet" } },
                { 17, new string[] { "wine", "cask" } },
                { 19, new string[] { "cloak" } },
                { 22, new string[] { "egg" } },
                { 23, new string[] { "nest" } },
                { 24, new string[] { "fountain", "basin", "grotesque face", "face" } },
                { 25, new string[] { "gold pile", "gold coins", "gold", "coins" } },
                { 28, new string[] { "rod" } },
                { 33, new string[] { "parchment" } },
                { 34, new string[] { "sword" } },
                { 35, new string[] { "buried coffin", "casket", "coffin" } },
                { 36, new string[] { "skeleton", "bones" } },
                { 37, new string[] { "cross" } },
                { 38, new string[] { "coil" } },
            };

            foreach (var synonym in synonyms)
            {
                CreateArtifactSynonyms(synonym.Key, synonym.Value);
            }

            var torchArtifact = gADB[1];

            Debug.Assert(torchArtifact != null);

            gGameState.TorchRounds = RollDice(1, 81, 399);

            torchArtifact.Value = (long)Math.Round(5.0 * ((double)gGameState.TorchRounds / 50.0));

            torchArtifact.LightSource.Field1 = gGameState.TorchRounds;
        }
Esempio n. 4
0
        public Engine()
        {
            // Note: this is an example of a macro function that will be used by both EamonDD and EamonRT in macro
            // resolution.  It is hardened to check for the existance of gCharacter, which will only exist in
            // EamonRT (the gGameState object, though not used here, is another thing to always check for).

            MacroFuncs.Add(1, () =>
            {
                return(gCharacter != null ? gCharacter.Name : UnknownName);
            });
        }
Esempio n. 5
0
        public override void InitMonsters()
        {
            base.InitMonsters();

            // Note: since these macro functions are installed by InitMonsters, we can assume this is
            // being executed by EamonRT so there is no need to overharden the functions.  But, it is
            // still recommended!

            MacroFuncs.Add(1, () =>
            {
                var characterMonster = gMDB[gGameState.Cm];

                Debug.Assert(characterMonster != null);

                return(characterMonster.EvalGender(" sir", " madam", ""));
            });

            MacroFuncs.Add(5, () =>
            {
                var result = "room";

                var characterRoom = gGameState != null && gGameState.Ro > 0 ? gRDB[gGameState.Ro] : null;

                if (characterRoom != null && characterRoom.Type == RoomType.Outdoors)
                {
                    result = "area";
                }

                return(result);
            });

            // Sets up random monster rooms

            for (var i = 7; i <= 11; i++)
            {
                var randomMonster = gMDB[i];

                Debug.Assert(randomMonster != null);

                while (true)
                {
                    randomMonster.Location = RollDice(1, 56, 3);

                    if (randomMonster.Location != 58)
                    {
                        break;
                    }
                }
            }
        }
Esempio n. 6
0
        public override void InitArtifacts()
        {
            base.InitArtifacts();

            MacroFuncs.Add(1, () =>
            {
                var roomUids = new long[] { };

                var result = "east and west";

                if (gGameState != null && roomUids.Contains(gGameState.Ro))
                {
                    result = "north and south";
                }

                return(result);
            });

            MacroFuncs.Add(2, () =>
            {
                var result = "northeast";

                if (gGameState != null)
                {
                    // TODO: implement
                }

                return(result);
            });

            var synonyms = new Dictionary <long, string[]>()
            {
                { 1, new string[] { "everdes", "volcano", "mountain" } },
                { 2, new string[] { "purple lavender", "sage", "lavender" } },
                { 3, new string[] { "dust devils", "devils", "whirlwinds", "devil", "whirlwind" } },
                { 5, new string[] { "fence" } },
                { 14, new string[] { "gate" } },
                { 77, new string[] { "narrow crevice", "vertical crevice", "crevice", "crevace", "fissure" } },
                { 78, new string[] { "large rock", "boulder", "rock" } },
                { 79, new string[] { "bell", "chime", "hammer" } },
                { 80, new string[] { "signpost", "sign" } },
            };

            foreach (var synonym in synonyms)
            {
                CreateArtifactSynonyms(synonym.Key, synonym.Value);
            }
        }
Esempio n. 7
0
        public override void InitArtifacts()
        {
            base.InitArtifacts();

            MacroFuncs.Add(1, () =>
            {
                // silver lantern

                return(gGameState != null && gGameState.Ls == 7 ? "lit" : "unlit");
            });

            var synonyms = new Dictionary <long, string[]>()
            {
                { 2, new string[] { "bag", "sack" } },
                { 5, new string[] { "raptor", "bird" } },
                { 6, new string[] { "miners pick", "pick" } },
                { 7, new string[] { "lantern" } },
                { 11, new string[] { "pitchfork", "fork" } },
                { 15, new string[] { "gold", "ore" } },
                { 16, new string[] { "big stick" } },
                { 17, new string[] { "trap" } },
                { 29, new string[] { "dead baby worm", "dead sand worm", "dead worm" } },
                { 30, new string[] { "dead lion", "dead cougar", "dead puma", "dead wildcat", "dead bobcat" } },
                { 31, new string[] { "dead miner" } },
                { 34, new string[] { "dead fox" } },
                { 35, new string[] { "dead small bat", "dead vampire bat", "dead bat" } },
                { 36, new string[] { "dead large bat", "dead fruit bat", "dead bat" } },
                { 37, new string[] { "dead small bat", "dead fruit bat", "dead bat" } },
                { 38, new string[] { "dead large bat", "dead vampire bat", "dead bat" } },
                { 39, new string[] { "dead Fido" } },
                { 44, new string[] { "dead Daisy" } },
                { 46, new string[] { "dead ferret" } },
                { 47, new string[] { "dead ferret" } },
                { 52, new string[] { "tracks", "track" } },
            };

            foreach (var synonym in synonyms)
            {
                CreateArtifactSynonyms(synonym.Key, synonym.Value);
            }
        }
Esempio n. 8
0
        public override void InitArtifacts()
        {
            base.InitArtifacts();

            // Note: since these macro functions are installed by InitArtifacts, we can assume this is
            // being executed by EamonRT so there is no need to overharden the functions.  But, it is
            // still recommended!

            MacroFuncs.Add(1, () =>
            {
                var cargoArtifact = gADB[129];

                Debug.Assert(cargoArtifact != null);

                var lilMonster = gMDB[37];

                Debug.Assert(lilMonster != null);

                if (cargoArtifact.IsCarriedByMonster(lilMonster))
                {
                    return(", dropping the \"Runcible Cargo\" at your feet as she disappears.");
                }
                else
                {
                    return(".");
                }
            });

            MacroFuncs.Add(2, () =>
            {
                if (gGameState != null)
                {
                    var shopDoorArtifact = gADB[gGameState.Ro == 20 ? 136 : 17];

                    Debug.Assert(shopDoorArtifact != null);

                    var ac = shopDoorArtifact.DoorGate;

                    Debug.Assert(ac != null);

                    return(ac.Field2 != 0 ? "  You've locked yourself out." : "");
                }
                else
                {
                    return("");
                }
            });

            MacroFuncs.Add(3, () =>
            {
                if (gGameState != null)
                {
                    var lilMonster = gMDB[37];

                    Debug.Assert(lilMonster != null);

                    return(lilMonster.Friendliness > Friendliness.Enemy ? "Larcenous Lil prepares to attack!" : "");
                }
                else
                {
                    return("");
                }
            });

            var synonyms = new Dictionary <long, string[]>()
            {
                { 25, new string[] { "lantern" } },
                { 37, new string[] { "bureau", "drawers" } },
                { 69, new string[] { "window" } },
                { 73, new string[] { "sign" } },
                { 74, new string[] { "window" } },
                { 78, new string[] { "refrigerator", "fridge" } },
                { 80, new string[] { "oven" } },
                { 89, new string[] { "sign" } },
                { 90, new string[] { "sign" } },
                { 95, new string[] { "lantern" } },
                { 118, new string[] { "desks" } },
                { 129, new string[] { "cargo" } },
                { 136, new string[] { "rear door", "shop door", "door" } },
            };

            foreach (var synonym in synonyms)
            {
                CreateArtifactSynonyms(synonym.Key, synonym.Value);
            }

            // Signs (Sam's/weathered/supported/station)

            var signArtifact = gADB[16];

            Debug.Assert(signArtifact != null);

            signArtifact.Seen = true;

            var weatheredSignArtifact = gADB[73];

            Debug.Assert(weatheredSignArtifact != null);

            weatheredSignArtifact.Seen = true;

            var supportedSignArtifact = gADB[89];

            Debug.Assert(supportedSignArtifact != null);

            supportedSignArtifact.Seen = true;

            var stationSignArtifact = gADB[90];

            Debug.Assert(stationSignArtifact != null);

            stationSignArtifact.Seen = true;

            // (Barney) Rubble, Maintenance grate, Sewer grate

            Globals.DoubleDoors.Add(Globals.CreateInstance <IArtifactLinkage>(x =>
            {
                x.RoomUid      = 12;
                x.ArtifactUid1 = 18;
                x.ArtifactUid2 = 139;
            }));

            Globals.DoubleDoors.Add(Globals.CreateInstance <IArtifactLinkage>(x =>
            {
                x.RoomUid      = 13;
                x.ArtifactUid1 = 139;
                x.ArtifactUid2 = 18;
            }));

            Globals.DoubleDoors.Add(Globals.CreateInstance <IArtifactLinkage>(x =>
            {
                x.RoomUid      = 13;
                x.ArtifactUid1 = 24;
                x.ArtifactUid2 = 140;
            }));

            Globals.DoubleDoors.Add(Globals.CreateInstance <IArtifactLinkage>(x =>
            {
                x.RoomUid      = 14;
                x.ArtifactUid1 = 140;
                x.ArtifactUid2 = 24;
            }));

            Globals.DoubleDoors.Add(Globals.CreateInstance <IArtifactLinkage>(x =>
            {
                x.RoomUid      = 17;
                x.ArtifactUid1 = 26;
                x.ArtifactUid2 = 138;
            }));

            Globals.DoubleDoors.Add(Globals.CreateInstance <IArtifactLinkage>(x =>
            {
                x.RoomUid      = 29;
                x.ArtifactUid1 = 138;
                x.ArtifactUid2 = 26;
            }));
        }
Esempio n. 9
0
        public override void InitArtifacts()
        {
            base.InitArtifacts();

            MacroFuncs.Add(2, () =>
            {
                var goldCurtainArtifact = gADB[40];

                Debug.Assert(goldCurtainArtifact != null);

                return(goldCurtainArtifact.DoorGate != null ? " a drawn gold curtain covers a doorway to the" : " another doorway is");
            });

            MacroFuncs.Add(3, () =>
            {
                var goldCurtainArtifact = gADB[40];

                Debug.Assert(goldCurtainArtifact != null);

                return(goldCurtainArtifact.DoorGate != null ? "  A gold curtain is open to the north." : "");
            });

            var synonyms = new Dictionary <long, string[]>()
            {
                { 1, new string[] { "small wooden shovel", "small scoop shovel", "wooden scoop shovel", "small shovel", "wooden shovel", "scoop shovel", "shovel" } },
                { 2, new string[] { "adventurer" } },
                { 3, new string[] { "cloth bound diary", "cloth diary", "bound diary", "diary" } },
                { 4, new string[] { "life orb", "orb" } },
                { 5, new string[] { "cube" } },
                { 6, new string[] { "cups" } },
                { 7, new string[] { "large limb", "tree limb", "limb" } },
                { 8, new string[] { "villager in chains", "chained villager" } },
                { 9, new string[] { "jewel bag", "jewels" } },
                { 11, new string[] { "chained merchant", "dwarf merchant", "merchant" } },
                { 12, new string[] { "key" } },
                { 13, new string[] { "axe" } },
                { 14, new string[] { "shortsword", "sword" } },
                { 15, new string[] { "rabbit" } },
                { 16, new string[] { "small box", "wooden box", "box" } },
                { 17, new string[] { "rock" } },
                { 18, new string[] { "ring" } },
                { 19, new string[] { "pea sized crystal ball", "pea-sized ball", "pea sized ball", "crystal ball", "ball" } },
                { 20, new string[] { "box" } },
                { 21, new string[] { "key" } },
                { 22, new string[] { "key" } },
                { 23, new string[] { "coins" } },
                { 26, new string[] { "straw mattresses", "mattresses" } },
                { 27, new string[] { "key" } },
                { 29, new string[] { "bones" } },
                { 31, new string[] { "shark", "fish" } },
                { 32, new string[] { "cleaver" } },
                { 33, new string[] { "weapon racks", "weapons" } },
                { 34, new string[] { "key" } },
                { 35, new string[] { "wine barrels", "wines" } },
                { 36, new string[] { "cups" } },
                { 37, new string[] { "ivory safe", "door", "safe" } },
                { 38, new string[] { "goebel" } },
                { 39, new string[] { "door" } },
                { 40, new string[] { "curtain" } },
                { 41, new string[] { "book" } },
                { 42, new string[] { "bones" } },
                { 43, new string[] { "pedestal" } },
                { 44, new string[] { "large device", "green device", "device" } },
                { 45, new string[] { "key" } },
                { 46, new string[] { "animals" } },
                { 47, new string[] { "key" } },
                { 49, new string[] { "large device", "green device", "device" } },
                { 50, new string[] { "magic bow", "elven bow", "bow" } },
                { 51, new string[] { "large dead death dog", "dead death dog", "dead dog" } },
                { 52, new string[] { "smoldering fluids", "ashen fluids", "ash", "fluids" } },
                { 53, new string[] { "ugly dead one-eyed ogre", "ugly dead one eyed ogre", "ugly dead ogre", "dead one-eyed ogre", "dead one eyed ogre", "dead ogre" } },
                { 54, new string[] { "body" } },
                { 55, new string[] { "body" } },
                { 56, new string[] { "dead rat" } },
                { 57, new string[] { "dead rat" } },
                { 58, new string[] { "dead zombie" } },
                { 59, new string[] { "dead zombie" } },
                { 60, new string[] { "dead zombie" } },
                { 62, new string[] { "dead patrol" } },
                { 63, new string[] { "dead zombie" } },
                { 64, new string[] { "dead soldiers" } },
                { 65, new string[] { "dead citizens" } },
                { 66, new string[] { "dead guards" } },
                { 67, new string[] { "dead guard" } },
                { 68, new string[] { "dead chef" } },
                { 69, new string[] { "dead old woman", "dead drow woman", "dead woman" } },
                { 70, new string[] { "dead diners" } },
                { 71, new string[] { "dead drows" } },
                { 72, new string[] { "dead bartender", "dead barkeeper" } },
                { 73, new string[] { "dead patron" } },
                { 74, new string[] { "dead guard" } },
                { 75, new string[] { "dead priest" } },
            };

            foreach (var synonym in synonyms)
            {
                CreateArtifactSynonyms(synonym.Key, synonym.Value);
            }
        }
Esempio n. 10
0
        public override void InitArtifacts()
        {
            base.InitArtifacts();

            MacroFuncs.Add(2, () =>
            {
                var cellDoorArtifact = gADB[87];

                Debug.Assert(cellDoorArtifact != null);

                var ac = cellDoorArtifact.DoorGate;

                Debug.Assert(ac != null);

                return(ac.GetKeyUid() > 0 ? "locked" : "unlocked");
            });

            MacroFuncs.Add(3, () =>
            {
                var cellDoorArtifact = gADB[88];

                Debug.Assert(cellDoorArtifact != null);

                var ac = cellDoorArtifact.DoorGate;

                Debug.Assert(ac != null);

                return(ac.GetKeyUid() > 0 ? "locked" : "unlocked");
            });

            MacroFuncs.Add(4, () =>
            {
                var result = "floor";

                var characterRoom = gGameState != null && gGameState.Ro > 0 ? gRDB[gGameState.Ro] : null;

                if (characterRoom != null && characterRoom.Type == RoomType.Outdoors)
                {
                    result = "ground";
                }

                return(result);
            });

            var synonyms = new Dictionary <long, string[]>()
            {
                { 11, new string[] { "sword" } },
                { 34, new string[] { "axe" } },
                { 38, new string[] { "sword" } },
                { 40, new string[] { "sword" } },
                { 41, new string[] { "scimitar" } },
                { 42, new string[] { "sword" } },
                { 43, new string[] { "pan" } },
                { 47, new string[] { "ingots", "ingot" } },
                { 51, new string[] { "healing potion", "potion" } },
                { 52, new string[] { "human blood", "blood", "potion" } },
                { 53, new string[] { "sulphuric acid", "acid", "h2so4", "potion" } },
                { 56, new string[] { "bars", "bar" } },
                { 58, new string[] { "stones", "stone" } },
                { 62, new string[] { "healing potion", "potion" } },
                { 63, new string[] { "wand" } },
                { 68, new string[] { "pig" } },
                { 69, new string[] { "bottle", "label" } },
                { 70, new string[] { "key" } },
                { 72, new string[] { "keys" } },
                { 73, new string[] { "key" } },
                { 74, new string[] { "dagger" } },
                { 75, new string[] { "robes", "robe" } },
                { 76, new string[] { "blanks" } },
                { 78, new string[] { "dagger" } },
                { 80, new string[] { "ring" } },
                { 81, new string[] { "bound slave", "bound girl", "slave girl", "girl" } },
                { 82, new string[] { "hieroglyphs", "glyphs", "inscriptions", "wall" } },
                { 83, new string[] { "door" } },
                { 84, new string[] { "door" } },
                { 85, new string[] { "door" } },
                { 86, new string[] { "door" } },
                { 87, new string[] { "door" } },
                { 88, new string[] { "door" } },
            };

            foreach (var synonym in synonyms)
            {
                CreateArtifactSynonyms(synonym.Key, synonym.Value);
            }

            var artTypes = new ArtifactType[] { ArtifactType.Drinkable, ArtifactType.Edible };

            var artUids = new long[] { 51, 62, 68 };

            // Sets up potion/roast pig random heal amounts

            for (var i = 0; i < artUids.Length; i++)
            {
                var healingArtifact = gADB[artUids[i]];

                Debug.Assert(healingArtifact != null);

                var ac = healingArtifact.GetArtifactCategory(artTypes);

                Debug.Assert(ac != null);

                ac.Field1 = RollDice(1, 10, 0);
            }

            // Places fireball wand and ring of regeneration

            var wandArtifact = gADB[63];

            Debug.Assert(wandArtifact != null);

            wandArtifact.Location = RollDice(1, 28, 28);

            var ringArtifact = gADB[64];

            Debug.Assert(ringArtifact != null);

            ringArtifact.Location = wandArtifact.Location;
        }
Esempio n. 11
0
        public override void InitArtifacts()
        {
            base.InitArtifacts();

            MacroFuncs.Add(1, () =>
            {
                var largeFountainArtifact = gADB[24];

                Debug.Assert(largeFountainArtifact != null);

                return(largeFountainArtifact?.DoorGate != null ? "A small staircase leads down into darkness, and a passage leads back southward.  From below, many different noises can be discerned." : "A passage leads back southward.");
            });

            MacroFuncs.Add(2, () =>
            {
                var buriedCasketArtifact = gADB[35];

                Debug.Assert(buriedCasketArtifact != null);

                return(buriedCasketArtifact.InContainer.IsOpen() ? "open" : "closed");
            });

            var synonyms = new Dictionary <long, string[]>()
            {
                { 1, new string[] { "magi-torch", "torch instruction label", "torch instructions", "torch label", "instruction label", "instruction tag", "instructions", "label", "tag" } },
                { 3, new string[] { "small crypt door", "crypt door", "crypt", "door" } },
                { 4, new string[] { "small tomb door", "tomb door", "tomb", "door" } },
                { 5, new string[] { "crypt door", "door" } },
                { 6, new string[] { "bucket" } },
                { 8, new string[] { "bones" } },
                { 9, new string[] { "leather bound book", "leather book", "bound book", "book" } },
                { 10, new string[] { "gravestone", "stone" } },
                { 11, new string[] { "dragon's treasure", "dragon's hoard", "treasure hoard", "treasure", "hoard" } },
                { 12, new string[] { "goblet", "cup" } },
                { 13, new string[] { "chest" } },
                { 14, new string[] { "old map", "map" } },
                { 15, new string[] { "ale bottle", "bottle", "ale" } },
                { 16, new string[] { "gauntlets", "gauntlet" } },
                { 17, new string[] { "wine", "cask" } },
                { 18, new string[] { "beholder's treasure", "beholder's hoard", "treasure hoard", "treasure", "hoard" } },
                { 19, new string[] { "cloak" } },
                { 20, new string[] { "pieces" } },
                { 21, new string[] { "pouch containing stones", "pouch with stones", "pouch", "stones" } },
                { 22, new string[] { "egg" } },
                { 23, new string[] { "nest" } },
                { 24, new string[] { "fountain", "basin", "grotesque face", "face" } },
                { 25, new string[] { "gold pile", "gold coins", "gold", "coins" } },
                { 26, new string[] { "wood throne", "throne" } },
                { 27, new string[] { "book", "manuscript" } },
                { 28, new string[] { "rod" } },
                { 29, new string[] { "mace" } },
                { 31, new string[] { "sword" } },
                { 32, new string[] { "dagger" } },
                { 33, new string[] { "parchment" } },
                { 34, new string[] { "sword" } },
                { 35, new string[] { "buried coffin", "casket", "coffin" } },
                { 36, new string[] { "skeleton", "bones" } },
                { 37, new string[] { "cross" } },
                { 38, new string[] { "coil" } },
                { 43, new string[] { "dead tree" } },
                { 44, new string[] { "dead forest nettles", "dead blood nettles", "dead bloodnettles", "dead nettles" } },
                { 45, new string[] { "cloak" } },
                { 46, new string[] { "dead whipweed", "dead weed" } },
                { 48, new string[] { "dead dragon" } },
                { 49, new string[] { "dead crimson amoeba", "dead amoeba", "wine" } },
                { 50, new string[] { "dead saber claws" } },
                { 51, new string[] { "jade dust", "jade splinters", "jade chunks", "debris" } },
                { 53, new string[] { "dead crayfish" } },
                { 54, new string[] { "dead scorpion" } },
                { 56, new string[] { "dead griffin cubs", "dead griffin babies", "dead baby griffins", "dead griffin baby" } },
                { 57, new string[] { "Jaldial the lich's remains", "Jaldi'al's remains", "Jaldial's remains", "lich's remains", "lich remains", "remains", "dead Jaldi'al", "dead Jaldial", "dead lich" } },
                { 58, new string[] { "dead jungle cats", "dead bekkahs", "dead cats" } },
                { 59, new string[] { "dead Reginald" } },
                { 60, new string[] { "dead Dubro" } },
                { 61, new string[] { "dead Joque" } },
                { 62, new string[] { "dead Trevor" } },
                { 63, new string[] { "stone coffin", "coffin" } },
            };

            foreach (var synonym in synonyms)
            {
                CreateArtifactSynonyms(synonym.Key, synonym.Value);
            }

            var torchArtifact = gADB[1];

            Debug.Assert(torchArtifact != null);

            gGameState.TorchRounds = RollDice(1, 81, 399);

            torchArtifact.Value = (long)Math.Round(5.0 * ((double)gGameState.TorchRounds / 50.0));

            torchArtifact.LightSource.Field1 = gGameState.TorchRounds;

            var lanternArtifact = gADB[39];

            Debug.Assert(lanternArtifact != null);

            lanternArtifact.LightSource.Field1 = RollDice(1, 81, 299);
        }
Esempio n. 12
0
        public Engine()
        {
            MacroFuncs.Add(3, () =>
            {
                var result = "to bright sunlight";

                if (gGameState != null)
                {
                    var room = gRDB[17] as Framework.IRoom;

                    Debug.Assert(room != null);

                    if (gGameState.IsNightTime())
                    {
                        result = "into the night";
                    }
                    else if (room.GetWeatherIntensity() > 1)
                    {
                        result = "to daylight";
                    }
                }

                return(result);
            });

            MacroFuncs.Add(8, () =>
            {
                var result = "You are at a bend in the passage.  To the south, you see a small chamber of carved stone, and eastward the corridor continues.";

                if (gGameState != null && !gGameState.GetSecretDoors(1))
                {
                    result = "You are at a dead-end in the passage.  Eastward the corridor continues.";
                }

                return(result);
            });

            MacroFuncs.Add(9, () =>
            {
                var result = "  You may go north or east.";

                if (gGameState != null)
                {
                    if (gGameState.GetSecretDoors(2) && !gGameState.GetSecretDoors(4))
                    {
                        result = "  You may go north.";
                    }
                    else if (!gGameState.GetSecretDoors(2) && gGameState.GetSecretDoors(4))
                    {
                        result = "  You may go east.";
                    }
                }

                return(result);
            });

            MacroFuncs.Add(10, () =>
            {
                var result = " between the two openings (to the east and south)";

                if (gGameState != null && !gGameState.GetSecretDoors(3))
                {
                    result = "";
                }

                return(result);
            });
        }
Esempio n. 13
0
        public override void InitMonsters()
        {
            base.InitMonsters();

            MacroFuncs.Add(4, () =>
            {
                var reginaldMonster = gMDB[46];

                return(GetMonsterWeaponName(reginaldMonster));
            });

            MacroFuncs.Add(5, () =>
            {
                var dubroMonster = gMDB[47];

                return(GetMonsterWeaponName(dubroMonster));
            });

            MacroFuncs.Add(6, () =>
            {
                var joqueMonster = gMDB[48];

                return(GetMonsterWeaponName(joqueMonster));
            });

            MacroFuncs.Add(7, () =>
            {
                var trevorMonster = gMDB[49];

                return(GetMonsterWeaponName(trevorMonster));
            });

            var synonyms = new Dictionary <long, string[]>()
            {
                { 1, new string[] { "rat" } },
                { 10, new string[] { "will-o'-wisp", "will o' the wisp", "will o' wisp", "wisp" } },
                { 11, new string[] { "crawler" } },
                { 12, new string[] { "mound" } },
                { 13, new string[] { "jelly" } },
                { 20, new string[] { "bloodnettle clump", "bloodnettle", "clump" } },
                { 21, new string[] { "hood" } },
                { 22, new string[] { "weed" } },
                { 23, new string[] { "animated armor", "suit of armor", "armor" } },
                { 24, new string[] { "dragon" } },
                { 25, new string[] { "amoeba" } },
                { 31, new string[] { "possessed sword", "cutlass", "sword" } },
                { 32, new string[] { "statues" } },
                { 37, new string[] { "crayfish" } },
                { 38, new string[] { "weird" } },
                { 39, new string[] { "scorpion" } },
                { 41, new string[] { "baby griffins", "griffin cubs", "griffins", "babies", "cubs" } },
                { 43, new string[] { "jaldial", "lich" } },
                { 44, new string[] { "jungle cats", "bekkahs", "cats" } },
                { 50, new string[] { "genie" } },
            };

            foreach (var synonym in synonyms)
            {
                CreateMonsterSynonyms(synonym.Key, synonym.Value);
            }
        }