Esempio n. 1
0
        public Location LoadEntrance()
        {
            Location returnData;

            returnData             = new Location();
            returnData.Name        = "Seedy Inn";
            returnData.Description = "A run down dirty inn used by the scum of society for black market trade and backdoor dealings. The place gives off a very bad vibe and is avoided by decent people. The entrance is falling apart and smells of old dried blood.";

            //Actions

            // Adjacent Locations
            Dictionary <string, LocationDefinition> adjacentLocationDefinitions = new Dictionary <string, LocationDefinition>();

            // Town Center
            LocationDefinition locationDefinition = Ankou.GetTownInstance().GetTownCenterDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            locationDefinition = AnkouSeedyInn.GetTownInstance().GetLoungingRoomDefinition();
            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
Esempio n. 2
0
        public Location LoadStairs()
        {
            Location returnData;

            returnData             = new Location();
            returnData.Name        = "Stairs";
            returnData.Description = "A small narrow stair case. There are individual stairs that are either missing or that have holes in them.";

            //Actions

            // Adjacent Locations
            Dictionary <string, LocationDefinition> adjacentLocationDefinitions = new Dictionary <string, LocationDefinition>();

            // Town Center
            LocationDefinition locationDefinition = AnkouSeedyInn.GetTownInstance().GetKitchenDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            locationDefinition = AnkouSeedyInn.GetTownInstance().GetBasementLandingDefinition();
            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
Esempio n. 3
0
        public static AnkouSeedyInn GetTownInstance()
        {
            if (_AnkouSeedyInn == null)
            {
                _AnkouSeedyInn = new AnkouSeedyInn();
            }

            return(_AnkouSeedyInn);
        }
Esempio n. 4
0
        public Location LoadBasementLanding()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Basement Landing";
            bool defeatedBandits = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouSeedyInn.DEFEATED_BASEMENT_LANDING_BANDITS));

            //Actions
            if (!defeatedBandits)
            {
                returnData.Description = "A small landing at the stairs. There are several bandits waiting to greet you.";

                List <LocationAction> locationActions = new List <LocationAction>();

                List <Mob> bandits = new List <Mob>();
                bandits.Add(new Bandit());
                bandits.Add(new Bandit());
                bandits.Add(new Bandit());
                bandits.Add(new Bandit());
                CombatAction combatAction = new CombatAction("Bandits", bandits);
                combatAction.PostCombat += BasementLandingBandits;

                locationActions.Add(combatAction);

                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "A small landing at the stairs. There are several dead bandits on the floor.";
            }

            // Adjacent Locations
            Dictionary <string, LocationDefinition> adjacentLocationDefinitions = new Dictionary <string, LocationDefinition>();

            // Town Center
            LocationDefinition locationDefinition = AnkouSeedyInn.GetTownInstance().GetStairsDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedBandits)
            {
                locationDefinition = AnkouSeedyInn.GetTownInstance().GetStorageDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
Esempio n. 5
0
        public Location LoadStorage()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Storage";
            bool defeatedBandits = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouSeedyInn.DEFEATED_STORAGE_BANDITS));

            //Actions
            if (!defeatedBandits)
            {
                returnData.Description = "A small room with shabby boxes. There are two bandits sorting through them.";

                List <LocationAction> locationActions = new List <LocationAction>();

                List <Mob> bandits = new List <Mob>();
                bandits.Add(new Bandit());
                bandits.Add(new Bandit());
                CombatAction combatAction = new CombatAction("Bandits", bandits);
                combatAction.PostCombat += StorageBandits;

                locationActions.Add(combatAction);

                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "A small room with shabby boxes. There are two decapitated bandits with their heads in the boxes they were looking through.";
            }

            // Adjacent Locations
            Dictionary <string, LocationDefinition> adjacentLocationDefinitions = new Dictionary <string, LocationDefinition>();

            // Town Center
            LocationDefinition locationDefinition = AnkouSeedyInn.GetTownInstance().GetBasementLandingDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedBandits)
            {
                locationDefinition = AnkouSeedyInn.GetTownInstance().GetTortureChamberDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
Esempio n. 6
0
        public Location LoadKitchen()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Kitchen";
            bool defeatedPeasants = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouSeedyInn.DEFEATED_KITCHEN_PEASANTS));

            //Actions
            if (!defeatedPeasants)
            {
                returnData.Description = "A small kitchen with old rusty equipment. There are four peasants trying to cook old moldy food. The peasants are non-aggressive and will not engage in combat with you except in retaliation.";

                List <LocationAction> locationActions = new List <LocationAction>();

                List <Mob> peasant = new List <Mob>();
                peasant.Add(new Peasant());
                peasant.Add(new Peasant());
                peasant.Add(new Peasant());
                peasant.Add(new Peasant());
                CombatAction combatAction = new CombatAction("Peasants", peasant);
                combatAction.PostCombat += KitchenPeasants;

                locationActions.Add(combatAction);

                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "A small kitchen with old rusty equipment. There are four peasants slaughtered with their blood pouring into the food.";
            }

            // Adjacent Locations
            Dictionary <string, LocationDefinition> adjacentLocationDefinitions = new Dictionary <string, LocationDefinition>();

            // Town Center
            LocationDefinition locationDefinition = AnkouSeedyInn.GetTownInstance().GetLoungingRoomDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            locationDefinition = AnkouSeedyInn.GetTownInstance().GetStairsDefinition();
            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
Esempio n. 7
0
        public Location LoadLoungingRoom()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Lounging Room";
            bool defeatedPeasants = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouSeedyInn.DEFEATED_LOUNGING_ROOM_PEASANTS));

            //Actions
            if (!defeatedPeasants)
            {
                returnData.Description = "A small lounging room with a torn couch and a broken fire place. There are two drunk peasants sitting on the couch arguing with each other. They are too absorbed in their own coversation to attack you without being provocked";

                List <LocationAction> locationActions = new List <LocationAction>();

                List <Mob> peasant = new List <Mob>();
                peasant.Add(new Peasant());
                peasant.Add(new Peasant());
                CombatAction combatAction = new CombatAction("Peasants", peasant);
                combatAction.PostCombat += LoungingRoomPeasants;

                locationActions.Add(combatAction);

                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "A small lounging room with a torn couch and a broken fire place. There are two dead peasants slaughtered upon the couch, adding to to the depressing run down atmosphere.";
            }

            // Adjacent Locations
            Dictionary <string, LocationDefinition> adjacentLocationDefinitions = new Dictionary <string, LocationDefinition>();

            // Town Center
            LocationDefinition locationDefinition = AnkouSeedyInn.GetTownInstance().GetEntranceDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            locationDefinition = AnkouSeedyInn.GetTownInstance().GetKitchenDefinition();
            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
Esempio n. 8
0
        public Location LoadTortureChamber()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Torture Chamber";
            bool   defeatedBanditTorturer = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouSeedyInn.KILLED_BANDIT_TORTURER));
            bool   openedChest            = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouSeedyInn.TOOK_TREASURE));
            bool   takeLetters            = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouSeedyInn.TOOK_NOTES_OF_PAYMENT));
            string banditSpeechBefore     = "Welcome, " + GameState.Hero.Identifier + ". You're the new guest of honor. I hope you like my work here, you'll be my new canvas after all. What do you say we get to know each other, you look a tad uncomfortable.";
            string banditSpeechAfter      = "The Bandit Torturer's dead body falls to the ground and you feel a profound sense of relief knowing the world has been rid of this evil being.";

            //Actions
            if (!defeatedBanditTorturer)
            {
                returnData.Description = "A medium sized room painted red with blood. There is blood all over the floor and several dead bodies laying in the corner. There is a freshly dead of a young woman laying on a table in the center of the room. She is nude with several cuts and burns all over her body. Blood is still falling from her wounds. Next to her is what can only be the Bandit Torturer.";
                List <LocationAction> locationActions = new List <LocationAction>();

                List <Mob> torturer = new List <Mob>();
                torturer.Add(new BanditTorturer());
                CombatAction combatAction = new CombatAction("Badnit Torturer", torturer, banditSpeechBefore, banditSpeechAfter);
                combatAction.PostCombat += DefeatedBanditTorturer;

                locationActions.Add(combatAction);

                returnData.Actions = locationActions;
            }
            else if (defeatedBanditTorturer)
            {
                if (!openedChest)
                {
                    if (!takeLetters)
                    {
                        returnData.Description = "A medium sized room painted red with blood. There is blood all over the floor and several dead bodies laying in the corner. There is a freshly dead of a young woman laying on a table in the center of the room. She is nude with several cuts and burns all over her body. Blood is still falling from her wounds. Next to her is the dead body of the Bandit Torturer. There are notes signifying his payment for his work from a necromancer in his pocket. And there is an unopened chest in the corner of the room.";
                    }
                    else
                    {
                        returnData.Description = "A medium sized room painted red with blood. There is blood all over the floor and several dead bodies laying in the corner. There is a freshly dead of a young woman laying on a table in the center of the room. She is nude with several cuts and burns all over her body. Blood is still falling from her wounds. Next to her is the dead body of the Bandit Torturer. There is an unopened chest in the corner of the room.";
                    }

                    List <LocationAction> locationActions = new List <LocationAction>();
                    TreasureChestAction   itemAction      = new TreasureChestAction(5);
                    locationActions.Add(itemAction);
                    itemAction.PostItem += TorturerChest;
                    returnData.Actions   = locationActions;
                }
                if (openedChest && takeLetters)
                {
                    returnData.Description = "A medium sized room painted red with blood. There is blood all over the floor and several dead bodies laying in the corner. There is a freshly dead of a young woman laying on a table in the center of the room. She is nude with several cuts and burns all over her body. Blood is still falling from her wounds. Next to her is the dead body of the Bandit Torturer. There is an opened chest in the corner of the room.";
                }
                if (!takeLetters && openedChest)
                {
                    returnData.Description = "A medium sized room painted red with blood. There is blood all over the floor and several dead bodies laying in the corner. There is a freshly dead of a young woman laying on a table in the center of the room. She is nude with several cuts and burns all over her body. Blood is still falling from her wounds. Next to her is the dead body of the Bandit Torturer. There are notes signifying his payment for his work from a necromancer in his pocket. And there is an opened chest in the corner of the room";

                    List <LocationAction> locationActions = new List <LocationAction>();
                    TakeItemAction        letterAction    = new TakeItemAction("Necromancer notes of payment");
                    letterAction.PostItem += Letters;
                    locationActions.Add(letterAction);
                    returnData.Actions = locationActions;
                }
            }
            // Adjacent Locations
            Dictionary <string, LocationDefinition> adjacentLocationDefinitions = new Dictionary <string, LocationDefinition>();

            // Town Center
            LocationDefinition locationDefinition = AnkouSeedyInn.GetTownInstance().GetStorageDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedBanditTorturer && takeLetters)
            {
                locationDefinition = Ankou.GetTownInstance().GetTownCenterDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
Esempio n. 9
0
        public Location LoadTownCenter()
        {
            Location       returnData;
            LocationAction locationAction;


            returnData             = new Location();
            returnData.Name        = "Ankou Town Center";
            returnData.Description = "Welcome to the cozy Ankou Town Center.";

            // Location Actions
            List <LocationAction> locationActions = new List <LocationAction>();

            locationAction = new DisplayStatsAction();
            locationActions.Add(locationAction);

            locationAction = new DisplayInventoryAction();
            locationActions.Add(locationAction);

            locationAction = new DisplayPotionBagAction();
            locationActions.Add(locationAction);

            locationAction = new DisplayEquippedAction();
            locationActions.Add(locationAction);

            locationAction = new AffixSwapperAction();
            locationActions.Add(locationAction);

            locationAction = new StoreAction();
            locationActions.Add(locationAction);

            locationAction = new MainMenuAction();
            locationActions.Add(locationAction);

            locationAction = new ExitGame();
            locationActions.Add(locationAction);

            returnData.Actions = locationActions;



            // Adjacent Locations
            Dictionary <string, LocationDefinition> adjacentLocationDefinitions = new Dictionary <string, LocationDefinition>();

            LocationDefinition locationDefinition = GetArenaDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            locationDefinition = GetInnDefinition();
            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            locationDefinition = GetConstableOfficeDefinition();
            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            Accomplishment scummyMurdererMission = Ankou.GetAnkouAccomplishments().Find(x => x.Name.Contains("Scummy Murderer"));

            if (GameState.Hero.Accomplishments.Contains(scummyMurdererMission))
            {
                locationDefinition = AnkouMurderShack.GetTownInstance().GetEntranceDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            Accomplishment locateNecroMission = Ankou.GetAnkouAccomplishments().Find(x => x.Name.Contains("Locate Necromancers"));

            if (GameState.Hero.Accomplishments.Contains(locateNecroMission))
            {
                locationDefinition = AnkouForest.GetTownInstance().GetEntranceDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }
            Accomplishment silenceAriean = Ankou.GetAnkouAccomplishments().Find(x => x.Name.Contains("Silence Ariean"));

            if (GameState.Hero.Accomplishments.Contains(silenceAriean))
            {
                locationDefinition = AnkouArieansEstate.GetTownInstance().GetEntranceDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }
            Accomplishment killBanditTorturer = Ankou.GetAnkouAccomplishments().Find(x => x.Name.Contains("Kill Bandit Torturer"));

            if (GameState.Hero.Accomplishments.Contains(killBanditTorturer))
            {
                locationDefinition = AnkouSeedyInn.GetTownInstance().GetEntranceDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }
            Accomplishment investigateTunnels = Ankou.GetAnkouAccomplishments().Find(x => x.Name.Contains("Investigate Tunnels"));

            if (GameState.Hero.Accomplishments.Contains(investigateTunnels))
            {
                locationDefinition = AnkouUndergroundTunnel.GetTownInstance().GetEntranceDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            Accomplishment battleOfAnkou = Ankou.GetAnkouAccomplishments().Find(x => x.Name.Contains("Battle of Ankou"));

            if (GameState.Hero.Accomplishments.Contains(battleOfAnkou))
            {
                locationDefinition = AnkouBattle.GetTownInstance().GetEntranceDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            Accomplishment travelToTower = Ankou.GetAnkouAccomplishments().Find(x => x.Name.Contains("Travel to the Tower"));

            if (GameState.Hero.Accomplishments.Contains(travelToTower))
            {
                locationDefinition = BeachTower.GetTownInstance().GetTownCenterDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            locationDefinition = Watertown.GetTownInstance().GetTownCenterDefinition();
            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }