private void EscapeMethod(string s) { Game.Instace.OutputPane.Write(new FormattedString("You wrench the ", "ropes".Cyan(), " with all your strength. They give way.")); InternalVerbs.Remove(_escape); InternalVerbs.Add(_blind); _bound = false; }
public Shelf(Location parent) : base(parent, "the shelf", 2, 0) { _pickUpBookVerb = new Verb(new FormattedString("Pick up the ", "Notebook".Cyan()), s => { _hasBook = false; InternalVerbs.Remove(_pickUpBookVerb); Player.Instance.AddItem(new NotebookItem()); }) { Enabled = false }; InternalVerbs.Add(_pickUpBookVerb); InternalVerbs.Add(new Verb(new FormattedString("Inspect ", "the shelf".Magenta()), s => { if (!_hasBook) { Game.Instace.OutputPane.Write("There is nothing here."); return; } Game.Instace.OutputPane.Write(new FormattedString("There is a ", "Notebook".Cyan(), " on the ", "shelf.".Magenta())); _pickUpBookVerb.Enabled = true; })); }
private void BlindMethod(string s) { Game.PrintUserInterface(); var c = new TheCloset(); Game.Instace.OutputPane.Write("You reach up and remove your " + "blindfold".Cyan() + ". You are in " + c.Name + "."); InternalVerbs.Remove(_blind); Player.Instance.ChangeLocation(c); }
private void UnscrewVerb(string s) { if (Player.Instance.Items.All(o => o.Name.ToString() != "Screwdriver")) { Game.Instace.OutputPane.Write(new FormattedString("You do not have a ", "Screwdriver".Cyan(), ".")); return; } Game.Instace.OutputPane.Write(new FormattedString("You use the ", "Screwdriver".Cyan(), " to open the ", "vent".Magenta(), ".")); InternalVerbs.Remove(_unscrewVerb); Props.Add(new TheVents.Vent(this, new TheVents(this), "vent", true, 3, 2)); }
public Desk(Location parent, OfficeType type, int x, int y) : base(parent, "the desk", x, y) { _item = null; switch (type) { case OfficeType.Mug: _item = new MugItem(); break; case OfficeType.Key: _item = new KeyItem(); break; } _hasItem = _item != null; InternalVerbs.Add(new Verb(new FormattedString("Inspect ", "the desk".Magenta()), s => { Game.Instace.OutputPane.Write( new FormattedString("There is nothing here but ", "a phone".Magenta(), " with no connection, ", "a computer".Magenta(), " with no power, and ", "various knick-knacks".Magenta(), " and ", "paperweights".Magenta(), ". ")); if (!_hasItem) { return; } Game.Instace.OutputPane.Write(new FormattedString("There is a ", _item.Name.Sections[0], " on ", "the desk.".Magenta())); _pickUpItemVerb.Enabled = true; })); if (_item == null) { return; } _pickUpItemVerb = new Verb("Pick up the " + _item.Name, s => { _hasItem = false; InternalVerbs.Remove(_pickUpItemVerb); Player.Instance.AddItem(_item); }) { Enabled = false }; InternalVerbs.Add(_pickUpItemVerb); }
private void WiggleMethod(string s) { Game.Instace.OutputPane.Write("You struggle against your bindings. They loosen a little."); InternalVerbs.Remove(_wiggle); InternalVerbs.Add(_escape); }