Пример #1
0
 public Inventory(Process p)
 {
     proc = p;
     inv = new List<string>(); //Create a list for the inventory
     AddItem("candle", "A big wax candle. Could burn for a while if lit.");
     AddItem("stick", "A fat piece of wood.");
 }
Пример #2
0
        public KeywordHandler(Process p)
        {
            proc = p;

            Keyword newKw;
            keywords = new List<Keyword>(); //Stores all keywords in the game

            //Add all the global keywords (Do NOT include items)
            newKw = AddKeyword("help", "Bring up this help dialog.", Keyword.DISCOVERED, true);
                newKw.AddAlias("advice");
                newKw.AddAlias("h");
                newKw.AddAlias("keyword");
                newKw.AddAlias("keywords");
            newKw = AddKeyword("items", "Lists the items in your inventory.", Keyword.DISCOVERED, true);
                newKw.AddAlias("item");
                newKw.AddAlias("inv");
                newKw.AddAlias("inventory");
                newKw.AddAlias("supply");
                newKw.AddAlias("supplies");
            newKw = AddKeyword("save", "", Keyword.HIDDEN, true);     //Hidden because it currently doesn't do anything
                newKw.AddAlias("s");
            newKw = AddKeyword("exit", "Quit the game.", Keyword.DISCOVERED, true);
                newKw.AddAlias("escape");
                newKw.AddAlias("quit");
                newKw.AddAlias("q");
                newKw.AddAlias("x");
            //Add all keywords that are locked at game start (Again, do NOT include items)
            newKw = AddKeyword("climb", "Climb up something.", Keyword.LOCKED);
                newKw.AddAlias("ascend");
                newKw.AddAlias("tower");
            AddKeyword("destroy", "Use your super strength to destroy stuff.", Keyword.LOCKED);
            AddKeyword("down", "Climb down from somewhere high up.", Keyword.LOCKED);
            AddKeyword("hole", "Crawl through a hole.", Keyword.LOCKED);
            AddKeyword("rope", "", Keyword.LOCKED);
            AddKeyword("win", "Win the game!", Keyword.LOCKED);
            //Add all keywords that start unlocked (Defaulted to HIDDEN status)
            newKw = AddKeyword("back", "Go back to where you came from. (Or look back)", Keyword.DISCOVERED);
                newKw.AddAlias("backtrack");
                newKw.AddAlias("leave");
                newKw.AddAlias("withdraw");
            newKw = AddKeyword("crawl");
                newKw.AddAlias("creep");
                newKw.AddAlias("slither");
                newKw.AddAlias("squirm");
            newKw = AddKeyword("cry");
                newKw.AddAlias("bawl");
                newKw.AddAlias("mourn");
                newKw.AddAlias("sob");
                newKw.AddAlias("wail");
                newKw.AddAlias("weep");
            AddKeyword("dig");
            newKw = AddKeyword("eat");
                newKw.AddAlias("bite");
                newKw.AddAlias("chew");
                newKw.AddAlias("devour");
                newKw.AddAlias("ingest");
                newKw.AddAlias("swallow");
            AddKeyword("fly", "Try to fly. (Pfft... Good luck.)");
            newKw = AddKeyword("hit");
                newKw.AddAlias("bang");
                newKw.AddAlias("break");
                newKw.AddAlias("punch");
                newKw.AddAlias("smack");
                newKw.AddAlias("smash");
                newKw.AddAlias("strike");
            newKw = AddKeyword("jump");
                newKw.AddAlias("hurdle");
                newKw.AddAlias("vault");
            newKw = AddKeyword("kick");
                newKw.AddAlias("boot");
                newKw.AddAlias("punt");
            newKw = AddKeyword("look", "Take a closer look at your surroundings.");
                newKw.AddAlias("glance");
                newKw.AddAlias("observe");
                newKw.AddAlias("peek");
                newKw.AddAlias("peer");
                newKw.AddAlias("see");
                newKw.AddAlias("stare");
                newKw.AddAlias("view");
            AddKeyword("open");
            AddKeyword("pray", "Pray for guidance. It can't hurt... Usually.");
            newKw = AddKeyword("pull");
                newKw.AddAlias("drag");
                newKw.AddAlias("tug");
                newKw.AddAlias("yank");
            newKw = AddKeyword("push");
                newKw.AddAlias("nudge");
                newKw.AddAlias("shove");
            newKw = AddKeyword("run");
                newKw.AddAlias("dash");
                newKw.AddAlias("rush");
                newKw.AddAlias("sprint");
            newKw = AddKeyword("scratch");
                newKw.AddAlias("claw");
                newKw.AddAlias("scrape");
            newKw = AddKeyword("sit");
                newKw.AddAlias("rest");
                newKw.AddAlias("squat");
            newKw = AddKeyword("die", "Kill yourself... This isn't really useful, it's just entertaining.", Keyword.DISCOVERED);
                newKw.AddAlias("suicide");
            newKw = AddKeyword("sleep");
                newKw.AddAlias("doze");
                newKw.AddAlias("nap");
                newKw.AddAlias("snooze");
            newKw = AddKeyword("touch");
                newKw.AddAlias("extend");
                newKw.AddAlias("feel");
                newKw.AddAlias("pat");
                newKw.AddAlias("reach");
                newKw.AddAlias("rub");
                newKw.AddAlias("stroke");
                newKw.AddAlias("tap");
            newKw = AddKeyword("walk");
                newKw.AddAlias("jog");
                newKw.AddAlias("move");
                newKw.AddAlias("step");
                newKw.AddAlias("stroll");
                newKw.AddAlias("travel");
            AddKeyword("wall", "Move towards a wall.");
            newKw = AddKeyword("yell");
                newKw.AddAlias("bellow");
                newKw.AddAlias("hoot");
                newKw.AddAlias("holler");
                newKw.AddAlias("howl");
                newKw.AddAlias("roar");
                newKw.AddAlias("scream");
                newKw.AddAlias("shout");
                newKw.AddAlias("yelp");
        }
Пример #3
0
        static void Main(string[] args)
        {
            Process proc = new Process();
            proc.DisplayRoom();

            while (true)
            {
                if(proc.AcceptInput())
                    proc.DisplayRoom();
            }
        }