Esempio n. 1
0
 public Boolean AddCharacter(NonPlayerCharacter character)
 {
     if (characters.Contains(character))
         return false;
     characters.Add(character.Name, character);
     return true;
 }
Esempio n. 2
0
        private void CreateNPCs()
        {
            //adding NPCs to Greg's Office;
            NonPlayerCharacter Shark = new NonPlayerCharacter("great_white_shark");
            Shark.Hostile = true;
            gregsOffice.CharacterList.Add(Shark.Name, Shark);

            NonPlayerCharacter FireDragon = new NonPlayerCharacter("firebreathing_dragon");
            FireDragon.Hostile = true;
            gregsOffice.CharacterList.Add(FireDragon.Name, FireDragon);

            NonPlayerCharacter RattleSnake = new NonPlayerCharacter("deadly_angry_rattle_snake");
            RattleSnake.Hostile = true;
            gregsOffice.CharacterList.Add(RattleSnake.Name, RattleSnake);

            NonPlayerCharacter Bunny = new NonPlayerCharacter("white_fluffy_bunny");
            gregsOffice.CharacterList.Add(Bunny.Name, Bunny);

            //adding NPCs to lounge;
            NonPlayerCharacter ToothFairy = new NonPlayerCharacter("tooth_fairy");
            lounge.CharacterList.Add(ToothFairy.Name, ToothFairy);

            NonPlayerCharacter HitMan = new NonPlayerCharacter("Leo_the_professional");
            lounge.CharacterList.Add(HitMan.Name, HitMan);

            NonPlayerCharacter DropBear = new NonPlayerCharacter("the_real_dropbear");
            DropBear.Hostile = true;
            lounge.CharacterList.Add(DropBear.Name, DropBear);

            NonPlayerCharacter WhoopSnake = new NonPlayerCharacter("the_red_butt_whoopsnake");
            WhoopSnake.Hostile = true;
            lounge.CharacterList.Add(WhoopSnake.Name, WhoopSnake);

            //adding NPCs to t127;
            NonPlayerCharacter Greg = new NonPlayerCharacter("the_ladykiller");
            Greg.Hostile = true;
            lounge.CharacterList.Add(Greg.Name, Greg);

            NonPlayerCharacter Philip = new NonPlayerCharacter("the_java_dude");
            Philip.Hostile = true;
            lounge.CharacterList.Add(Philip.Name, Philip);

            NonPlayerCharacter Lisa = new NonPlayerCharacter("bart_sister");
            lounge.CharacterList.Add(Lisa.Name, Lisa);
        }
 public Location(String description, String label, NonPlayerCharacter npc) : this()
 {
     Description = description;
     Label       = label;
     this.npc    = npc;
 }
Esempio n. 4
0
 public Boolean RemoveCharacter(NonPlayerCharacter character)
 {
     if (!(characters.Contains(character)))
         return false;
     characters.Remove(character);
     return true;
 }
Esempio n. 5
0
        private void CreateLocations()
        {
            startUp =
                new Location("an office with paper strewn everywhere, how anyone works effectively here is a mystery",
                    "Julies Office");
            lounge =
                new Location("an open space containing comfortable looking couches and artwork of dubious quality",
                    "Airport Lounge");

            Shop shop = new Shop("Some shop", "Shop");

            t127 = new Location("a lecture theatre", "T127");
            gregsOffice = new Location("a spinning vortex of terror", "Greg's Office");
            evansCave = new Shop("a crowded room full of technology related stuff", "Crazy Evan's Discount Technology");

            startUp.ExitCollection.AddExit("south", new Exit("you see an open space to the south", lounge));
            startUp.ExitCollection.AddExit("west", new Exit("you see a terrifying office to the west", gregsOffice));
            startUp.ExitCollection.AddExit("north", new Exit("you see a bleak place to the north", t127));

            lounge.ExitCollection.AddExit("north", new Exit("you see a mound of paper to the north", startUp));
            lounge.ExitCollection.AddExit("northwest", new Exit("you see a terrifying office to the northwest", gregsOffice));
            startUp.ExitCollection.AddExit("east", new Exit("you see a shop in the east", shop));
            shop.ExitCollection.AddExit("west", new Exit("you see a mound of paper to the west", startUp));

            t127.ExitCollection.AddExit("south", new Exit("you see a mound of paper to the south", startUp));

            gregsOffice.ExitCollection.AddExit("east", new Exit("you see a mound of paper to the east", startUp));
            gregsOffice.ExitCollection.AddExit("southeast", new Exit("you see an open space to the southeast", lounge));
            gregsOffice.ExitCollection.AddExit("west",
                new Exit("you see shiny stuff to the west.. it looks outdated, retro even", evansCave));

            evansCave.ExitCollection.AddExit("east", new Exit("you see a terrifying office to the east", gregsOffice));

            Key gregKey = new Key("gregkey", 10, 5, "Key Greg's office");
            Key dummyKey = new Key("dummykey",5, 5, "Dumb key");
            shop.Items.AddItem( gregKey);
            shop.Items.AddItem(dummyKey);
            gregsOffice.Locked = true;
            gregKey.Location = gregsOffice;
            NonPlayerCharacter fred = new NonPlayerCharacter("fred");
            fred.LifePoints = 3;
            fred.Hostile = true;
            lounge.CharacterList.Add("fred", fred);
        }