internal DeadDragon(IReadonlyAdventureGame game, params string[] nouns) : base(game, nouns) { ItemId = Item.DeadDragon; Name = "body of a huge green dead dragon lying off to one side"; PluralName = "body of a huge green dead dragon lying off to one side"; IsPortable = false; }
public SwissCheese(IReadonlyAdventureGame game) : base(game) { LocationId = Location.SwissCheese; Name = "Swiss Cheese"; ShortDescription = "in the Swiss Cheese room"; LongDescription = "in a room whose walls resemble Swiss cheese. Obvious passages " + "head west, east, NE, and NW. Part of the room is occupied by a large bedrock block that " + "is full of small holes, just like a Swiss cheese."; Level = 1; IsDark = true; Items = new List <IAdventureItem>(); ValidMoves = new List <IPlayerMove> { //new PlayerMove(string.Empty, Location., "west", "w"), // east-end 2 pit room new PlayerMove(string.Empty, Location.SoftRoom, "east", "e"), new PlayerMove(string.Empty, Location.Bedquilt, "northeast", "ne", "bedquilt"), new PlayerMove(string.Empty, Location.TallEastWestCanyon, "canyon"), new PlayerMove(string.Empty, Location.Oriental, "oriental"), new RandomMove(string.Empty, new List <Location> { Location.TallEastWestCanyon, Location.Oriental, Location.Oriental, }, "south", "s", "northwest", "nw"), }; MonsterValidMoves = new List <IPlayerMove> { //new PlayerMove(string.Empty, Location., "west", "w"), // east-end 2 pit room new PlayerMove(string.Empty, Location.SoftRoom, "east", "e"), new PlayerMove(string.Empty, Location.Bedquilt, "northeast", "ne", "bedquilt"), new PlayerMove(string.Empty, Location.TallEastWestCanyon, "canyon"), new PlayerMove(string.Empty, Location.Oriental, "oriental"), }; }
internal Bottle(IReadonlyAdventureGame game, params string[] nouns) : base(game, nouns) { ItemId = Item.Bottle; Name = "small glass *bottle*"; PluralName = "small glass *bottles*"; IsContainer = true; IsPortable = true; IsTransparent = true; var smash = new ItemInteraction(Game, "smash", "break"); smash.RegisteredInteractions.Add(new Display("You smash the bottle and glass flies everywhere!")); smash.RegisteredInteractions.Add(new RemoveFromInventory()); smash.RegisteredInteractions.Add(new AddToLocation(new BrokenGlass(Game))); Interactions.Add(smash); var fill = new ItemInteraction(Game, "fill"); fill.RegisteredInteractions.Add(new Display("You reach down and fill the bottle with water.")); fill.RegisteredInteractions.Add(new AddToItemContents(ItemFactory.GetInstance(Game, Item.PintOfWater))); Interactions.Add(fill); //var empty = new ItemInteraction(Game, "empty", "pour");); //Interactions.Add(empty); }
public Building(IReadonlyAdventureGame game) : base(game) { var bottle = ItemFactory.GetInstance(Game, Item.Bottle); var lamp = ItemFactory.GetInstance(Game, Item.Lamp); var key = ItemFactory.GetInstance(Game, Item.Key); var food = ItemFactory.GetInstance(Game, Item.FoodRation); var water = ItemFactory.GetInstance(Game, Item.Water); LocationId = Location.Building; Name = "Small Brick Building"; ShortDescription = "inside a small brick building."; LongDescription = " inside a small brick building, a well house for a bubbling spring."; WaterPresent = true; Items = new List <IAdventureItem> { key, lamp, bottle, food, water, }; ValidMoves = new List <IPlayerMove> { new PlayerMove("You leave the building.", Location.Road, "west", "w", "road", "out", "outside"), }; }
internal Rod(IReadonlyAdventureGame game, params string[] nouns) : base(game, nouns) { ItemId = Item.Rod; Name = "black *rod* with a rusty star on one end"; PluralName = "black *rods* with rusty stars on the ends"; IsActive = true; Contents = new List <IAdventureItem>(); IsPortable = true; // Using the rod when at the fissure, creates a crystal bridge var use = new ItemInteraction(Game, "use", "wave"); use.RegisteredInteractions.Add(new DisplayForLocation("You wave the rod with a flourish. The air shimmers and a beautiful crystal bridge appears, spanning the fissure to the west!", Location.FissureEast)); use.RegisteredInteractions.Add(new DisplayForLocation("You wave the rod with a flourish.. The air shimmers and a beautiful crystal bridge appears, spanning the fissure to the east!!", Location.FissureWest)); use.RegisteredInteractions.Add(new AddToLocation(ItemFactory.GetInstance(Game, Item.CrystalBridge))); use.RegisteredInteractions.Add(new AddMoves(new List <IPlayerMove> { new PlayerMove("You cautiously cross the crystal bridge...", Location.FissureWest, "west", "w", "bridge"), }, Game, Location.FissureEast)); use.RegisteredInteractions.Add(new AddMoves(new List <IPlayerMove> { new PlayerMove("You step out onto the crystal bridge...", Location.FissureEast, "east", "e", "bridge"), }, Game, Location.FissureWest)); Interactions.Add(use); }
internal Snake(IReadonlyAdventureGame game, params string[] nouns) : base(game, nouns) { ItemId = Item.Snake; Name = "large vicious-looking snake barring your way"; PluralName = "large vicious-looking snakes barring your way"; IsCreature = true; }
internal Bird(IReadonlyAdventureGame game, params string[] nouns) : base(game, nouns) { ItemId = Item.Bird; Name = "little *bird* singing cheerfully"; PluralName = "little *birds* singing cheerfully"; IsPortable = true; IsActive = true; MustBeContainedIn = Item.Cage; Slots = 0; PreventTakeItemId = Item.Rod; PreventTakeText = "The *bird* was unafraid when you entered, but as you approach " + "it becomes disturbed and you cannot catch it."; var free = new ItemInteraction(Game, "use", "free", "release"); free.RegisteredInteractions.Add(new Display("You open the cage and the bird flies out.")); free.RegisteredInteractions.Add(new RemoveFromInventory()); free.RegisteredInteractions.Add(new AddToLocation(this)); Interactions.Add(free); var catchInteraction = new ItemInteraction(Game, "catch", "capture", "trap"); catchInteraction.RegisteredInteractions.Add(new AliasCommand(new Take(game, "take"))); Interactions.Add(catchInteraction); }
public AdventureCommandRegistry(IReadonlyAdventureGame game) { var lookCommand = new Look(game, "look", "l"); var helpCommand = new Help(game, "help"); var moveCommand = new Move(game, "move", "go", "walk", "run", "climb", "crawl"); var takeCommand = new Take(game, "take", "get", "grab"); var dropCommand = new Drop(game, "drop"); var magicWord1 = new Xyzzy(game, "xyzzy"); var magicWord2 = new Plugh(game, "plugh"); var inventoryCommand = new Carrying(game, "inventory", "inv"); var interactCommand = new Interact(game, "use"); // Do not add aliases for this command var yes = new Yes(game, "yes", "y"); var no = new No(game, "no", "n"); var say = new Say(game, "say"); RegisteredCommands = new List <IAdventureCommand> { lookCommand, helpCommand, moveCommand, takeCommand, dropCommand, magicWord1, magicWord2, inventoryCommand, interactCommand, yes, no, say, }; }
public HallOfTheMountainKing(IReadonlyAdventureGame game) : base(game) { LocationId = Location.HallOfMountainKing; Name = "Hall of the Mountain Kings"; ShortDescription = "in Hall of the Mountain King"; LongDescription = "in the Hall of the Mountain King, with passages off in all directions. Sounds echo in this vast, high space."; Level = 1; IsDark = true; IsSpawnPoint = true; SpawnType = MonsterGroup.Dwarves; SpawnType = MonsterGroup.Dwarves; Items = new List <IAdventureItem> { ItemFactory.GetInstance(Game, Item.Snake) }; ValidMoves = new List <IPlayerMove> { new PlayerMove("A vicious-looking snake bars your way!", Location.HallOfMountainKing, "south", "s", "north", "n", "west", "w", "down", "d"), new PlayerMove("You ascend a majestic staircase of natural rock...", Location.HallOfMistsEast, "up", "east", "e"), }; MonsterValidMoves = new List <IPlayerMove> { new PlayerMove(string.Empty, Location.LowPassage, "north", "n"), new PlayerMove(string.Empty, Location.SouthSideChamber, "south", "s"), new PlayerMove(string.Empty, Location.WestSideChamber, "west", "w"), new PlayerMove(string.Empty, Location.SecretEastWestCanyon, "secret"), new PlayerMove(string.Empty, Location.HallOfMistsEast, "up", "east", "e"), }; }
internal Rug(IReadonlyAdventureGame game, params string[] nouns) : base(game, nouns) { ItemId = Item.Rug; Name = "beautiful Persian *rug*"; PluralName = "beautiful Persian *rugs*"; IsPortable = true; }
protected AdventureLocation(IReadonlyAdventureGame game) { Items = new List <IAdventureItem>(); ValidMoves = new List <IPlayerMove>(); MonsterValidMoves = new List <IPlayerMove>(); Game = game; }
private Grate(IReadonlyAdventureGame game, params string[] nouns) : base(game, nouns) { ItemId = Item.Grate; Name = "strong steel grate"; PluralName = "strong steel grates"; IsPortable = false; IsOpen = false; IsLocked = true; ItemIdToUnlock = Item.Key; var open = new ItemInteraction(Game, "open"); open.RegisteredInteractions.Add(new Open()); Interactions.Add(open); var unlock = new ItemInteraction(Game, "unlock"); unlock.RegisteredInteractions.Add(new Unlock()); unlock.RegisteredInteractions.Add(new DisplayForLocation("You open the grate and see a dark space below it. A rusty iron ladder leads down into pitch blackness!", Location.Depression)); unlock.RegisteredInteractions.Add(new DisplayForLocation("You open the grate and see the way out of the caves above you. A rusty iron ladder leads up to the daylight!", Location.Cave1)); unlock.RegisteredInteractions.Add(new AddMoves(new List <IPlayerMove> { new PlayerMove("With growing trepidation, you descend the ladder...", Location.Cave1, "down", "d", "ladder", "underground"), }, Game, Location.Depression)); unlock.RegisteredInteractions.Add(new AddMoves(new List <IPlayerMove> { new PlayerMove("You climb the rusty ladder and emerge into the light!", Location.Depression, "up", "ladder", "surface", "climb"), }, Game, Location.Cave1)); Interactions.Add(unlock); }
internal Lamp(IReadonlyAdventureGame game, params string[] nouns) : base(game, nouns) { ItemId = Item.Lamp; Name = "battered *lamp*";; PluralName = "battered *lamps*"; IsPortable = true; IsEndlessSupply = false; Slots = 0; // Takes up no space in inventory var light = new ItemInteraction(Game, "light"); light.RegisteredInteractions.Add(new ActivateItem("The lamp shines brightly.")); light.RegisteredInteractions.Add(new UpdateItemName("battered *lamp* which is lit")); light.RegisteredInteractions.Add(new AddPlayerStatus(PlayerStatus.HasLight)); Interactions.Add(light); var extinguish = new ItemInteraction(Game, "extinguish", "ext"); extinguish.RegisteredInteractions.Add(new DeactivateItem("The lamp turns off.")); extinguish.RegisteredInteractions.Add(new UpdateItemName("battered *lamp*")); extinguish.RegisteredInteractions.Add(new RemovePlayerStatus(PlayerStatus.HasLight)); Interactions.Add(extinguish); }
internal Key(IReadonlyAdventureGame game, params string[] nouns) : base(game, nouns) { ItemId = Item.Key; Name = "large iron *key*"; PluralName = "large iron *keys*"; IsPortable = true; }
internal BrokenVase(IReadonlyAdventureGame game, params string[] nouns) : base(game, nouns) { ItemId = Item.BrokenVase; Name = "spread of worthless broken pottery"; PluralName = "spread of worthless broken pottery"; IsPortable = false; }
internal Pillow(IReadonlyAdventureGame game, params string[] nouns) : base(game, nouns) { ItemId = Item.Pillow; Name = "velvet *pillow*"; PluralName = "velvet *pillows*"; IsPortable = true; }
internal FoodRation(IReadonlyAdventureGame game, params string[] nouns) : base(game, nouns) { ItemId = Item.FoodRation; Name = "packet of dried *food* rations"; PluralName = "packets of dried *food* rations"; IsPortable = true; IsEndlessSupply = true; }
internal SpentBatteries(IReadonlyAdventureGame game, params string[] nouns) : base(game, nouns) { ItemId = Item.Batteries; Name = "couple of spent *batteries*"; PluralName = "several of spent *batteries*"; IsPortable = true; IsEndlessSupply = false; }
internal PlatinumPyramid(IReadonlyAdventureGame game, params string[] nouns) : base(game, nouns) { ItemId = Item.PlatinumPyramid; Name = "platinum *pyramid*"; PluralName = "platinum *pyramids*"; IsPortable = true; IsTreasure = true; }
internal Emerald(IReadonlyAdventureGame game, params string[] nouns) : base(game, nouns) { ItemId = Item.Emerald; Name = "shining *emerald*"; PluralName = "shining *emeralds*"; IsPortable = true; IsTreasure = true; }
internal Jewelry(IReadonlyAdventureGame game, params string[] nouns) : base(game, nouns) { ItemId = Item.Jewelry; Name = "piece of *jewellery*"; PluralName = "pieces of *jewellery*"; IsPortable = true; IsTreasure = true; }
internal Coins(IReadonlyAdventureGame game, params string[] nouns) : base(game, nouns) { ItemId = Item.Nugget; Name = "pile of *coins*"; PluralName = "piles of *coins*"; IsPortable = true; IsTreasure = true; }
internal Magazines(IReadonlyAdventureGame game, params string[] nouns) : base(game, nouns) { ItemId = Item.Magazines; Name = "a few old copies of 'Spelunker Today' *magazine*"; PluralName = "a few old copies of 'Spelunker Today' *magazine*"; IsPortable = true; IsTreasure = true; }
internal Diamond(IReadonlyAdventureGame game, params string[] nouns) : base(game, nouns) { ItemId = Item.Diamond; Name = "large *diamond*"; PluralName = "large *diamonds*"; IsPortable = true; IsTreasure = true; }
private CrystalBridge(IReadonlyAdventureGame game, params string[] nouns) : base(game, nouns) { ItemId = Item.Cage; Name = "crystal bridge"; PluralName = "crystal bridges"; Contents = new List <IAdventureItem>(); IsActive = true; }
internal BarsOfSilver(IReadonlyAdventureGame game, params string[] nouns) : base(game, nouns) { ItemId = Item.BarsOfSilver; Name = "few bars of *silver*"; PluralName = "few bars of *silver*"; IsPortable = true; IsTreasure = true; }
internal ShardOfGlass(IReadonlyAdventureGame game, params string[] nouns) : base(game, nouns) { ItemId = Item.ShardOfGlass; Name = "*shard* of jagged glass"; PluralName = "*shards* of jagged glass"; IsPortable = true; IsEndlessSupply = true; }
protected AdventureItem(IReadonlyAdventureGame game, params string[] nouns) { UniqueId = Guid.NewGuid(); Game = game; Contents = new List <IAdventureItem>(); Interactions = new List <IInteraction>(); Nouns = nouns.ToList(); }
public TrollCave(IReadonlyAdventureGame game) : base(game) { LocationId = Location.TrollCave; Name = "Troll Cave"; ShortDescription = "in a dank cave that smells of Troll."; LongDescription = "in a dank cave that smells of Troll."; Items = new List <IAdventureItem>(); ValidMoves = new List <IPlayerMove>(); }
internal PirateChest(IReadonlyAdventureGame game, params string[] nouns) : base(game, nouns) { ItemId = Item.Mailbox; Name = "chest made of wood and iron"; PluralName = "chests made of wood and iron"; IsOpen = false; IsContainer = true; Contents = new List <IAdventureItem>(); }