コード例 #1
0
        public Location LoadAnkouForestEntrance()
        {
            Location returnData;

            returnData             = new Location();
            returnData.Name        = "Ankou Forest Entrance";
            returnData.Description = "The long path of the forest begins here. Light does not penetrate the trees here, the darkness is all encompassing, and the air is crushing.";

            //Actions

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

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

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            locationDefinition = AnkouForest.GetTownInstance().GetStraightOneDefinition();
            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
コード例 #2
0
        public Location LoadMurderShackEntrance()
        {
            Location returnData;

            returnData             = new Location();
            returnData.Name        = "Murderer's Shack";
            returnData.Description = "The room appears as if it is falling aprt. The walls are coming undone and there are giant holes in the ceiling.";

            //Actions

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

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

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            locationDefinition = AnkouMurderShack.GetTownInstance().GetStorageRoomDefinition();
            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);


            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
コード例 #3
0
        public Location LoadStraightFour()
        {
            Location returnData;

            returnData             = new Location();
            returnData.Name        = "Ankou Forest Straight Path Four";
            returnData.Description = "The long path of the forest continues. Light does not penetrate the trees here, the darkness is all encompassing, and the air is crushing.";

            //Actions

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

            LocationDefinition locationDefinition = AnkouForest.GetTownInstance().GetStraightThreeDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            Accomplishment rescuePeasants = Ankou.GetAnkouAccomplishments().Find(x => x.Name.Contains("Rescue Peasants"));

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

            locationDefinition = AnkouForest.GetTownInstance().GetStraightFiveDefinition();
            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);


            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
コード例 #4
0
        public Location LoadRightThree()
        {
            Location returnData;

            returnData             = new Location();
            returnData.Name        = "Ankou Forest Right Path Three";
            returnData.Description = "The long path of the forest ends here. There are rocks placed on the path to prevent further travel in this direction. Light does not penetrate the trees here, the darkness is all ecompassing, and the air is crushing.";

            //Actions

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

            // Town Center
            LocationDefinition locationDefinition = AnkouForest.GetTownInstance().GetRightTwoDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            Accomplishment killNecroContractor = Ankou.GetAnkouAccomplishments().Find(x => x.Name.Contains("Kill Necromancer Contractor"));

            if (GameState.Hero.Accomplishments.Contains(killNecroContractor))
            {
                locationDefinition = AnkouBanditAndNecroCave.GetTownInstance().GetStartingLocationDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
コード例 #5
0
        public Location LoadEntrance()
        {
            Location returnData;

            returnData             = new Location();
            returnData.Name        = "Underground Tunnel";
            returnData.Description = "A small trapdoor that leads to an underground tunnel, beneath the Ankou Town Center. The entrance is small without a lot of room, meant to obscure the purpose of the tunnel - making it appear smaller than it really is.";

            //Actions

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

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

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            locationDefinition = AnkouUndergroundTunnel.GetTownInstance().GetMuddyRoomDefinition();
            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
コード例 #6
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);
        }
コード例 #7
0
ファイル: Ankou.cs プロジェクト: rjtwoh01/TheDarkestHour
        public void HeardLocateNecrosRumor()
        {
            Accomplishment accomplishment = Ankou.GetAnkouAccomplishments().Find(x => x.Name.Contains("Locate Necromancers"));

            GameState.Hero.Accomplishments.Add(accomplishment);
            //Reload the TownCenter so it will open up the Forest to go hunt down the necromancer camp
            LocationHandler.ResetLocation(TOWN_CENTER_KEY);
        }
コード例 #8
0
ファイル: Ankou.cs プロジェクト: rjtwoh01/TheDarkestHour
        public void HeardTravelToTowerRumor()
        {
            Accomplishment accomplishment = Ankou.GetAnkouAccomplishments().Find(x => x.Name.Contains("Travel to the Tower"));

            GameState.Hero.Accomplishments.Add(accomplishment);
            //Reload the TownCenter so it will open up the Ariean's Estate
            LocationHandler.ResetLocation(TOWN_CENTER_KEY);
        }
コード例 #9
0
ファイル: Ankou.cs プロジェクト: rjtwoh01/TheDarkestHour
        public void HeardScummyMurdererRomor()
        {
            Accomplishment accomplishment = Ankou.GetAnkouAccomplishments().Find(x => x.Name.Contains("Scummy Murderer"));

            GameState.Hero.Accomplishments.Add(accomplishment);
            //Reload the TownCenter so it will open up the Shack that the murderer is in.
            LocationHandler.ResetLocation(TOWN_CENTER_KEY);
        }
コード例 #10
0
ファイル: Ankou.cs プロジェクト: rjtwoh01/TheDarkestHour
        public void HeardScoutUndergroundHideoutRumor()
        {
            Accomplishment accomplishment = Ankou.GetAnkouAccomplishments().Find(x => x.Name.Contains("Scouted Underground Hideout"));

            GameState.Hero.Accomplishments.Add(accomplishment);
            //Reload the TownCenter so it will open up the Ariean's Estate
            LocationHandler.ResetLocation(TOWN_CENTER_KEY);
        }
コード例 #11
0
        public Location LoadBufferRoom()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Buffer Room";
            bool defeatedBandits = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouBanditShack.DEFEATED_BUFFER_ROOM_BANDITS));

            //Actions
            if (!defeatedBandits)
            {
                returnData.Description = "A small room that separates the kitchen from the holding room. Three bandits are guarding the holding room.";

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

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

                locationActions.Add(combatAction);

                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "A small room that separates the kitchen from the holding room. Three bandits lay vanquished before the door.";
            }

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

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

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedBandits)
            {
                locationDefinition = AnkouBanditShack.GetTownInstance().GetHoldingRoomDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            Accomplishment scoutUndergroundHideout = Ankou.GetAnkouAccomplishments().Find(x => x.Name.Contains("Scouted Underground Hideout"));

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


            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
コード例 #12
0
ファイル: Ankou.cs プロジェクト: rjtwoh01/TheDarkestHour
        public static Ankou GetTownInstance()
        {
            if (_Ankou == null)
            {
                _Ankou = new Ankou();
            }

            return(_Ankou);
        }
コード例 #13
0
        public Location LoadStraightTwo()
        {
            Location returnData;

            returnData             = new Location();
            returnData.Name        = "Ankou Forest Straight Path Two";
            returnData.Description = "The long path of the forest continues. There is now a three way fork in the road. The road splits to the left, right, and continues on straight. Light does not penetrate the trees here, the darkness is all encompassing, and the air is crushing.";

            //Actions

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

            LocationDefinition locationDefinition = AnkouForest.GetTownInstance().GetStraightOneDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            locationDefinition = AnkouForest.GetTownInstance().GetStraightThreeDefinition();
            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            locationDefinition = AnkouForest.GetTownInstance().GetLeftOneDefinition();
            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            locationDefinition = AnkouForest.GetTownInstance().GetRightOneDefinition();
            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            Accomplishment investigatePeasantLeader = Ankou.GetAnkouAccomplishments().Find(x => x.Name.Contains("Investigated Peasant Leader"));

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


            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
コード例 #14
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);
        }
コード例 #15
0
        public Location LoadCoordinationRoom()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Coordination Room";
            bool   defeatedAttackCoordinator = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouUndergroundTunnel.KILLED_ATTACK_COORDINATOR));
            bool   openedChest     = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouUndergroundTunnel.TOOK_TREASURE));
            bool   takePlans       = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouUndergroundTunnel.TOOK_ATTACK_PLANS));
            string mobSpeechBefore = "I heard you as you walked in, " + GameState.Hero.Identifier + ". You cannot sneak up on me. No, I think you've seen too much here, and I can't let you leave.\n";
            string mobSpeechAfter  = "The attack coordinator's body falls to ground dead, blood falling out of his mouth and onto the ground.\n";

            //Actions
            if (!defeatedAttackCoordinator)
            {
                returnData.Description = "A large room with maps of Ankou covering the walls. The maps are all anoted with circles and pins scattered about them. There is a small man observing the maps, his back turned to the wall.";
                List <LocationAction> locationActions = new List <LocationAction>();

                List <Mob> coordinator = new List <Mob>();
                coordinator.Add(new AttackCoordinator());
                CombatAction combatAction = new CombatAction("Attack Coordinator", coordinator, mobSpeechBefore, mobSpeechAfter);
                combatAction.PostCombat += DefeatedAttackCoordinator;

                locationActions.Add(combatAction);

                returnData.Actions = locationActions;
            }
            else if (defeatedAttackCoordinator)
            {
                if (!openedChest)
                {
                    if (!takePlans)
                    {
                        returnData.Description = "A large room with maps of Ankou covering the walls. The maps are all anoted with circles and pins scattered about them. There is a small man dead in the middle of the room, lying in his own blood. The attack plans are sitting on a table on the far edge of the room and there is an unopened chest beneath the table.";
                    }
                    else
                    {
                        returnData.Description = "A large room with maps of Ankou covering the walls. The maps are all anoted with circles and pins scattered about them. There is a small man dead in the middle of the room, lying in his own blood. There is an unopened chest beneath the table.";
                    }

                    List <LocationAction> locationActions = new List <LocationAction>();
                    TreasureChestAction   itemAction      = new TreasureChestAction(5);
                    locationActions.Add(itemAction);
                    itemAction.PostItem += CoordinatorChest;
                    returnData.Actions   = locationActions;
                }
                if (openedChest && takePlans)
                {
                    returnData.Description = "A large room with maps of Ankou covering the walls. The maps are all anoted with circles and pins scattered about them. There is a small man dead in the middle of the room, lying in his own blood. There is an opened chest beneath the table.";
                }
                if (!takePlans && openedChest)
                {
                    returnData.Description = "A large room with maps of Ankou covering the walls. The maps are all anoted with circles and pins scattered about them. There is a small man dead in the middle of the room, lying in his own blood. The attack plans are sitting on a table on the far edge of the room and there is an opened chest beneath the table.";

                    List <LocationAction> locationActions = new List <LocationAction>();
                    TakeItemAction        takePlansAction = new TakeItemAction("Attack Plans");
                    takePlansAction.PostItem += TakeAttackPlans;
                    locationActions.Add(takePlansAction);
                    returnData.Actions = locationActions;
                }
            }

            //Actions

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

            // Town Center
            LocationDefinition locationDefinition = AnkouUndergroundTunnel.GetTownInstance().GetRitualRoomDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

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

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
コード例 #16
0
        public Location LoadBedroom()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Bedroom";
            bool   defeatedPeasantWarden = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouForestCabin.KILLED_PEASANT_LEADER));
            bool   openedChest           = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouForestCabin.TOOK_TREASURE));
            bool   freePrisoners         = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouForestCabin.TOOK_MAP));
            string peasantSpeechBefore   = "Ah, I see you found me. You've been causing a lot of problems for my enemies, and some problems for me. I'm willing to forgive all the crimes you've comitted against me if you agree to focus solely on eradicating every noble in Ankou.\n\nNo? Fine then. Die. Now.\n";
            string peasantSpeechAfter    = "The peasant leader gasp out, ''You won't survive what's to come " + GameState.Hero.Identifier + ". Your world will burn, and this town will be nuthing but dust by the time we're done with you!'' \n\nHe collapses to the ground, his body cold and lifeless.\n";

            //Actions
            if (!defeatedPeasantWarden)
            {
                returnData.Description = "A small bedroom with a wooden bed and a torn sheet laying on it. The peasant leader is sitting on it, staring out the window.";
                List <LocationAction> locationActions = new List <LocationAction>();

                List <Mob> leader = new List <Mob>();
                leader.Add(new PeasantLeader());
                CombatAction combatAction = new CombatAction("Peasant Leader", leader, peasantSpeechBefore, peasantSpeechAfter);
                combatAction.PostCombat += DefeatedPeasantWarden;

                locationActions.Add(combatAction);

                returnData.Actions = locationActions;
            }
            else if (defeatedPeasantWarden)
            {
                if (!openedChest)
                {
                    if (!freePrisoners)
                    {
                        returnData.Description = "A small bedroom with a wooden bed and a torn sheet laying on it. The peasant leader lays dead at the foot of his bed. There is a map that's halfway fallen out of his pocket and a small shabby chest beneath the bed that's unopened.";
                    }
                    else
                    {
                        returnData.Description = "A small bedroom with a wooden bed and a torn sheet laying on it. The peasant leader lays dead at the foot of his bed. There is a small shabby chest beneath the bed that's unopened.";
                    }

                    List <LocationAction> locationActions = new List <LocationAction>();
                    TreasureChestAction   itemAction      = new TreasureChestAction(5);
                    locationActions.Add(itemAction);
                    itemAction.PostItem += LeaderChest;
                    returnData.Actions   = locationActions;
                }
                if (openedChest && freePrisoners)
                {
                    returnData.Description = "A small bedroom with a wooden bed and a torn sheet laying on it. The peasant leader lays dead at the foot of his bed. There is a small shabby chest beneath the bed that's opened.";
                }
                if (!freePrisoners && openedChest)
                {
                    returnData.Description = "A small bedroom with a wooden bed and a torn sheet laying on it. The peasant leader lays dead at the foot of his bed. There is a map that's halfway fallen out of his pocket and a small shabby chest beneath the bed that's opened.";

                    List <LocationAction> locationActions    = new List <LocationAction>();
                    TakeItemAction        freePrisonerAction = new TakeItemAction("Map");
                    freePrisonerAction.PostItem += TakeMap;
                    locationActions.Add(freePrisonerAction);
                    returnData.Actions = locationActions;
                }
            }

            //Actions

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

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

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

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

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
コード例 #17
0
        public Location LoadTownCenter()
        {
            Location       returnData;
            LocationAction locationAction;


            returnData             = new Location();
            returnData.Name        = "Watertown Town Center";
            returnData.Description = "Welcome to the cozy Watertown 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 sewerKingAccomplishment = Watertown.GetWatertownAccomplishments().Find(x => x.Name.Contains("Sewer King"));

            if (GameState.Hero.Accomplishments.Contains(sewerKingAccomplishment))
            {
                locationDefinition = WatertownSewer.GetTownInstance().GetSewerEntranceDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            Accomplishment banditCaptainAccomplishment = Watertown.GetWatertownAccomplishments().Find(x => x.Name.Contains("Bandit Captain"));

            if (GameState.Hero.Accomplishments.Contains(banditCaptainAccomplishment))
            {
                locationDefinition = WatertownForest.GetTownInstance().GetForestEntranceDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            Accomplishment murderRoomAccomplishment = Watertown.GetWatertownAccomplishments().Find(x => x.Name.Contains("Bandit Murder"));

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

            Accomplishment banditKingAccomplishment = Watertown.GetWatertownAccomplishments().Find(x => x.Name.Contains("Bandit God King"));

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

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
コード例 #18
0
        public Location LoadLeaderTent()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Necromancer Leader's Tent";
            bool defeatedNecros = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouNecromancerCamp.DEFEATED_NECRO_LEADER));
            bool openedChest    = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouNecromancerCamp.OPENED_CHEST));
            bool takeJournal    = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouNecromancerCamp.TOOK_JOURNAL));

            if (!defeatedNecros)
            {
                returnData.Description = "A large tent, full of many dark items. The necromancer leader sits at his desk, twirling a long, sharp knife in his hand.";

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

                List <Mob> necro = new List <Mob>();
                necro.Add(new AnkouNecroLeader());
                CombatAction combatAction = new CombatAction("Necromancer Leader", necro);
                combatAction.PostCombat += NecroLeader;

                locationActions.Add(combatAction);

                returnData.Actions = locationActions;
            }
            if (defeatedNecros)
            {
                if (!openedChest)
                {
                    if (!takeJournal)
                    {
                        returnData.Description = "A large tent, full of many dark items. The necromancer leader is dead on the ground. There is a journal on his desk and an unopened treasure chest.";
                    }
                    else
                    {
                        returnData.Description = "A large tent, full of many dark items. The necromancer leader is dead on the ground. There is an unopened treasure chest.";
                    }

                    List <LocationAction> locationActions = new List <LocationAction>();
                    TreasureChestAction   itemAction      = new TreasureChestAction(3);
                    locationActions.Add(itemAction);
                    itemAction.PostItem += Chest;
                    returnData.Actions   = locationActions;
                }
                if (openedChest && takeJournal)
                {
                    returnData.Description = "A large tent, full of many dark items. The necromancer leader is dead on the ground. There is a opened treasure chest.";
                }
                if (!takeJournal && openedChest)
                {
                    returnData.Description = "A large tent, full of many dark items. The necromancer leader is dead on the ground. There is a journal on his desk and an opened treasure chest.";
                    List <LocationAction> locationActions = new List <LocationAction>();
                    TakeItemAction        letterAction    = new TakeItemAction("Necromancer Leader's Journal");
                    letterAction.PostItem += LeaderJournal;
                    locationActions.Add(letterAction);
                    returnData.Actions = locationActions;
                }
            }

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

            // Town Center
            LocationDefinition locationDefinition = AnkouNecromancerCamp.GetTownInstance().GetLargeClearingDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

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

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
コード例 #19
0
        public Location LoadDarkRoom()
        {
            Location returnData;

            returnData             = new Location();
            returnData.Name        = "Dark Room";
            returnData.Description = "A very dark room. The walls are black and glowing purple with some dark evil magic. There are skulls aligned in ritualistic patterns on the floor. There are drawings on the walls, painted with blood. In the middle stands a small man with a black hood covering his face. He has his hands outstreched and he's chanting something and the air grows heavier the more he chants.";
            bool   defeatedNecroContractor = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouBanditAndNecroCave.KILLED_NECRO_CONTRACTOR));
            bool   openedChest             = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouBanditAndNecroCave.TOOK_TREASURE));
            bool   takeLetters             = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouBanditAndNecroCave.TOOK_JOURNAL));
            string necroSpeechBefore       = "Welcome to my humble adobe, " + GameState.Hero.Identifier + ". You won't make it out alive. Come, join me.";
            string necroSpeechAfter        = "The necromancer's body vanishes from his robes and they collapse to the ground, blackened and charred from the dark magic he used during the fight.";

            //Actions
            if (!defeatedNecroContractor)
            {
                returnData.Description = "A very dark room. The walls are black and glowing purple with some dark evil magic. There are skulls aligned in ritualistic patterns on the floor. There are drawings on the walls, painted with blood. In the middle stands a small man with a black hood covering his face. He has his hands outstreched and he's chanting something and the air grows heavier the more he chants.";
                List <LocationAction> locationActions = new List <LocationAction>();

                List <Mob> contractor = new List <Mob>();
                contractor.Add(new NecroContractor());
                CombatAction combatAction = new CombatAction("Necromancer Contractor", contractor, necroSpeechBefore, necroSpeechAfter);
                combatAction.PostCombat += DefeatedContractor;

                locationActions.Add(combatAction);

                returnData.Actions = locationActions;
            }
            else if (defeatedNecroContractor)
            {
                if (!openedChest)
                {
                    if (!takeLetters)
                    {
                        returnData.Description = "A very dark room. The walls are black and glowing purple with some dark evil magic. There are skulls aligned in ritualistic patterns on the floor. There are drawings on the walls, painted with blood. In the middle lays the blackened robe of the necroamncer contractor. There is a journal on top of the robe and an unopened chest next to it.";
                    }
                    else
                    {
                        returnData.Description = "A very dark room. The walls are black and glowing purple with some dark evil magic. There are skulls aligned in ritualistic patterns on the floor. There are drawings on the walls, painted with blood. In the middle lays the blackened robe of the necroamncer contractor. There is an unopened chest next to it.";
                    }

                    List <LocationAction> locationActions = new List <LocationAction>();
                    TreasureChestAction   itemAction      = new TreasureChestAction(2);
                    locationActions.Add(itemAction);
                    itemAction.PostItem += ContractorChest;
                    returnData.Actions   = locationActions;
                }
                if (openedChest && takeLetters)
                {
                    returnData.Description = "A very dark room. The walls are black and glowing purple with some dark evil magic. There are skulls aligned in ritualistic patterns on the floor. There are drawings on the walls, painted with blood. In the middle lays the blackened robe of the necroamncer contractor. There is an opened chest next to it.";
                }
                if (!takeLetters && openedChest)
                {
                    returnData.Description = "A very dark room. The walls are black and glowing purple with some dark evil magic. There are skulls aligned in ritualistic patterns on the floor. There are drawings on the walls, painted with blood. In the middle lays the blackened robe of the necroamncer contractor. There is a journal on top of the robe and an opened chest next to it.";

                    List <LocationAction> locationActions = new List <LocationAction>();
                    TakeItemAction        letterAction    = new TakeItemAction("Journal of pay outs and economical dealings");
                    letterAction.PostItem += Journal;
                    locationActions.Add(letterAction);
                    returnData.Actions = locationActions;
                }
            }

            //Actions

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

            // Town Center
            LocationDefinition locationDefinition = AnkouBanditAndNecroCave.GetTownInstance().GetLargeRoomDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

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

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
コード例 #20
0
        public Location LoadOverseersQuarters()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Overseer's Quarters";
            bool   defeatedOverseer     = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouUndergroundHideOut.KILLED_NECRO_OVERSEER));
            bool   openedChest          = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouUndergroundHideOut.TOOK_NECRO_OVERSEER_TREASURE));
            bool   tookJournal          = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouUndergroundHideOut.TOOK_JOURNAL));
            string overseerSpeechBefore = "Don't try to sneak up on me, I heard you come in. Tell me," + GameState.Hero.Identifier + ", how did you find this place? You know what, it doesn't really matter now does it. Your life ends here anyway.";
            string overseerSpeechAfter  = "The Necromancer Overseer stumbles, his face drained of all color after his fight with you. You jump forward and grab his sword and impale him with it. He gasp once then collapse to the ground.";

            //Actions
            if (!defeatedOverseer)
            {
                returnData.Description = "A nice large room meant to house the necromancer who was assigned to oversee the operations going on in Ankou. He is sitting at his desk scribbling away in his journal, his back turned away from the door.";
                List <LocationAction> locationActions = new List <LocationAction>();

                List <Mob> overseer = new List <Mob>();
                overseer.Add(new NecroOverseer());
                CombatAction combatAction = new CombatAction("Necromancer Overseer", overseer, overseerSpeechBefore, overseerSpeechAfter);
                combatAction.PostCombat += DefeatedOverseer;

                locationActions.Add(combatAction);

                returnData.Actions = locationActions;
            }
            else if (defeatedOverseer)
            {
                if (!openedChest)
                {
                    if (!tookJournal)
                    {
                        returnData.Description = "A nice large room meant to house the necromancer who was assigned to oversee the operations going on in Ankou. He lays dead in the center of the floor. The journal he was writing in lays on the desk. There is an unopened chest beneath the desk.";
                    }
                    else
                    {
                        returnData.Description = "A nice large room meant to house the necromancer who was assigned to oversee the operations going on in Ankou. He lays dead in the center of the floor. There is an unopened chest beneath the desk.";
                    }

                    List <LocationAction> locationActions = new List <LocationAction>();
                    TreasureChestAction   itemAction      = new TreasureChestAction(4);
                    locationActions.Add(itemAction);
                    itemAction.PostItem += OverseerChest;
                    returnData.Actions   = locationActions;
                }
                if (openedChest && tookJournal)
                {
                    returnData.Description = "A nice large room meant to house the necromancer who was assigned to oversee the operations going on in Ankou. He lays dead in the center of the floor. There is an opened chest beneath the desk.";
                }
                if (!tookJournal && openedChest)
                {
                    returnData.Description = "A nice large room meant to house the necromancer who was assigned to oversee the operations going on in Ankou. He lays dead in the center of the floor. The journal he was writing in lays on the desk. There is an opened chest beneath the desk.";

                    List <LocationAction> locationActions   = new List <LocationAction>();
                    TakeItemAction        takeJournalAction = new TakeItemAction("Journal");
                    takeJournalAction.PostItem += TookJournal;
                    locationActions.Add(takeJournalAction);
                    returnData.Actions = locationActions;
                }
            }

            //Actions

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

            // Town Center
            LocationDefinition locationDefinition = AnkouUndergroundHideOut.GetTownInstance().GetDinningHallDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

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

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
コード例 #21
0
ファイル: BeachTower.cs プロジェクト: rjtwoh01/TheDarkestHour
        public Location LoadTownCenter()
        {
            Location       returnData;
            LocationAction locationAction;


            returnData             = new Location();
            returnData.Name        = "Beach Tower Main Floor";
            returnData.Description = "Welcome to the main floor of the Beach Tower.";

            // 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 = GetCaptainOfficeDefinition();
            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            Accomplishment beachHeadPirates = BeachTower.GetBeachTowerAccomplishments().Find(x => x.Name.Contains("Beach Head Pirates"));

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

            Accomplishment mysteriousHouse = BeachTower.GetBeachTowerAccomplishments().Find(x => x.Name.Contains("Mysterious House"));

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

            Accomplishment huntSpies = BeachTower.GetBeachTowerAccomplishments().Find(x => x.Name.Contains("Hunt Spies"));

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

            Accomplishment freeVillage = BeachTower.GetBeachTowerAccomplishments().Find(x => x.Name.Contains("Recaptured Village"));

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

            Accomplishment battleForTheSeas = BeachTower.GetBeachTowerAccomplishments().Find(x => x.Name.Contains("Battle for the Seas"));

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

            //Travel to Banken
            Accomplishment travelToBanken = BeachTower.GetBeachTowerAccomplishments().Find(x => x.Name.Contains("Travel to Banken"));

            if (GameState.Hero.Accomplishments.Contains(battleForTheSeas))
            {
                locationDefinition = Banken.GetTownInstance().GetStartingLocationDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

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

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
コード例 #22
0
        public Location LoadMasterRoom()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Master Room";
            bool defeatedScummyMurderer = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouMurderShack.DEFEATED_SCUMMY_MURDERER));
            bool openedChest            = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouMurderShack.OPENED_CHEST));

            if (!defeatedScummyMurderer)
            {
                returnData.Description = "A large room with a torn up bed in the corner. The Scummy Murderer is sitting on the bed, staring at the door.";

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

                List <Mob> scummyMurderer = new List <Mob>();
                scummyMurderer.Add(new ScummyMurderer());
                CombatAction combatAction = new CombatAction("Scummy Murderer", scummyMurderer);
                combatAction.PostCombat += ScummyMurderer;

                locationActions.Add(combatAction);

                returnData.Actions = locationActions;
            }
            if (defeatedScummyMurderer)
            {
                if (!openedChest)
                {
                    returnData.Description = "A large room with a torn up bed in the corner. There is a chest at the front of the bed waiting to be opened. The Scummy Murderer's body lays mangled and strewn across his bed.";
                    List <LocationAction> locationActions = new List <LocationAction>();
                    TreasureChestAction   itemAction      = new TreasureChestAction(3);
                    locationActions.Add(itemAction);
                    itemAction.PostItem += Chest;
                    returnData.Actions   = locationActions;
                }
                else
                {
                    returnData.Description = "A large room with a torn up bed in the corner. There is an open chest at the front of the bed. The Scummy Murderer's body lays mangled and strewn across his bed.";
                }
            }

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

            // Town Center
            LocationDefinition locationDefinition = AnkouMurderShack.GetTownInstance().GetDinningRoomDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

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


            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
コード例 #23
0
        public Location LoadHoldingRoom()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Holding Room";
            bool   defeatedBanditWarden = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouBanditShack.KILLED_BANDIT_WARDEN));
            bool   openedChest          = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouBanditShack.TOOK_TREASURE));
            bool   freePrisoners        = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouBanditShack.RESCUED_PEASANTS));
            string banditSpeechBefore   = "So you did come after all, " + GameState.Hero.Identifier + ". I guess I was wrong about you. I thought you weren't this stupid. No matter, this is better for us after all. You see, what's going to happen is I'm going to kill you. Slowly, and painfully. But before you take your last breath, you'll have to watch all of these people die a horrific death. Kind of a sad story. A 'hero' such as to come so far only to falter when it really matters. Die now, " + GameState.Hero.Identifier + ".";
            string banditSpeechAfter    = "''How... How could you have bested me?'' Gasp out the Bandit Warden. He is hunched over, his sword laying next to him. You walk over to him and kick him down on the floor and pick up his sword. You stare at his eyes and watch as they widden in horror as he realizes the end is here. You swiftly behead and turn your attention to the suffering prisoners. Despite what they've been through, there is a visible look of relief on their faces as they realize that their captor has been slain and they are safe now.";

            //Actions
            if (!defeatedBanditWarden)
            {
                returnData.Description = "The largest room in the shack is dedicated to holding prisoners. There are ten peasants chained to the wall. All of them are nude, including the women and childern. All of them have whip lashes covering their bodies. A young teenaged woman on the right hand corner has fresh blood running down her chest from an cut between her breast.";
                List <LocationAction> locationActions = new List <LocationAction>();

                List <Mob> wardnen = new List <Mob>();
                wardnen.Add(new BanditWarden());
                CombatAction combatAction = new CombatAction("Bandit Warden", wardnen, banditSpeechBefore, banditSpeechAfter);
                combatAction.PostCombat += DefeatedBanditWarden;

                locationActions.Add(combatAction);

                returnData.Actions = locationActions;
            }
            else if (defeatedBanditWarden)
            {
                if (!openedChest)
                {
                    if (!freePrisoners)
                    {
                        returnData.Description = "The largest room in the shack is dedicated to holding prisoners. There are ten peasants chained to the wall. All of them are nude, including the women and childern. All of them have whip lashes covering their bodies. A young teenaged woman on the right hand corner has fresh blood running down her chest from an cut between her breast. There is an unopened chest where the warden used to stand.";
                    }
                    else
                    {
                        returnData.Description = "The largest room in the shack is dedicated to holding prisoners. The chains that used to hold the prisoners are missing but the bodily imprints of the prisoners remains on the wall, and their blood remains behind standing as testimony to the horrors experienced here. There is an unopened chest where the warden use to stand.";
                    }

                    List <LocationAction> locationActions = new List <LocationAction>();
                    TreasureChestAction   itemAction      = new TreasureChestAction(5);
                    locationActions.Add(itemAction);
                    itemAction.PostItem += WardenChest;
                    returnData.Actions   = locationActions;
                }
                if (openedChest && freePrisoners)
                {
                    returnData.Description = "The largest room in the shack is dedicated to holding prisoners. The chains that used to hold the prisoners are missing but the bodily imprints of the prisoners remains on the wall, and their blood remains behind standing as testimony to the horrors experienced here. There is an opened chest where the warden use to stand.";
                }
                if (!freePrisoners && openedChest)
                {
                    returnData.Description = "The largest room in the shack is dedicated to holding prisoners. There are ten peasants chained to the wall. All of them are nude, including the women and childern. All of them have whip lashes covering their bodies. A young teenaged woman on the right hand corner has fresh blood running down her chest from an cut between her breast. There is an unopened chest where the warden used to stand.";

                    List <LocationAction> locationActions    = new List <LocationAction>();
                    TakeItemAction        freePrisonerAction = new TakeItemAction("Free", "Prisoners", "You hastily cut down the chains holding the prisoners. You make sure all of them are able to walk and you usher them out of the house and to safety. You urge the more injured ones to seek medical help and promise them that that the town constable office will pay for all expenses.");
                    freePrisonerAction.PostItem += FreePrisoners;
                    locationActions.Add(freePrisonerAction);
                    returnData.Actions = locationActions;
                }
            }

            //Actions

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

            // Town Center
            LocationDefinition locationDefinition = AnkouBanditShack.GetTownInstance().GetBufferRoomDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

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

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
コード例 #24
0
ファイル: Ankou.cs プロジェクト: rjtwoh01/TheDarkestHour
        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);
        }