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

            returnData             = new Location();
            returnData.Name        = "Hallway";
            returnData.Description = "The hallway is a wide one lined with scattered boxes, some of them with offical looking documents sitting on top of them.";


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

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

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            locationDefinition = BeachTowerSpies.GetTownInstance().GetEastRoomDefinition();
            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            locationDefinition = BeachTowerSpies.GetTownInstance().GetWestRoomDefinition();
            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            locationDefinition = BeachTowerSpies.GetTownInstance().GetNorthRoomDefinition();
            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

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

            returnData      = new Location();
            returnData.Name = "Ornate Room";
            bool   defeatedMobs          = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerSpies.SPY_MASTER));
            bool   openedChest           = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerSpies.SPY_MASTER_TREASURE));
            string spyMasterSpeechBefore = "''So, " + GameState.Hero.Identifier + "... You have come at last. I must admit, I was curious how long it would take for my little operation here to become compromised. Though this was a little sooner than expected. No matter, I will deal with you and can make my escape then before those idiot guards realize anything has gone wrong. Yes, that should do it. Any last words?'' \nWithout waiting for a reply for a reply he swiftly draws two swords and lunges at you. You narrowly dodge the attack and brace yourself for a fight.";
            string spyMasterSpeechAfter  = "You stand over the Spy Master as the life force leaves his body. He looks up at you and says, ''You'll... pay... you... bastard. This... is... not... the... end... My... masters... have... plans. A... darkness... rises... in... the... east.'' He gasp out the last word and then chokes on the air as he struggles to breathe. After a few seconds he succumbs to his wounds and departs this life.";

            if (!defeatedMobs)
            {
                returnData.Description = "A large ornate room furnished with the best that nobles could afford when they commissioned the building of the tower. A spy master is pacing back and forth in the middle of it, his forhead creased in concentration.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new SpyMaster());
                CombatAction combatAction = new CombatAction("Spy Master", mobs, spyMasterSpeechBefore, spyMasterSpeechAfter);
                combatAction.PostCombat += SpyMaster;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "A large ornate room furnished with the best that nobles could afford when they commissioned the building of the tower. The spy master lies dead in the center of it.";
            }

            if (defeatedMobs && !openedChest)
            {
                List <LocationAction> locationActions = new List <LocationAction>();
                TreasureChestAction   itemAction      = new TreasureChestAction(5);
                locationActions.Add(itemAction);
                itemAction.PostItem += SpyMasterChest;
                returnData.Actions   = locationActions;
            }

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

            //Town Center
            LocationDefinition locationDefinition = BeachTowerSpies.GetTownInstance().GetHallwayDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedMobs)
            {
                locationDefinition = BeachTower.GetTownInstance().GetTownCenterDefinition();
                adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

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

            returnData      = new Location();
            returnData.Name = "Barracks";
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerSpies.EAST_ROOM_SPIES));

            if (!defeatedMobs)
            {
                returnData.Description = "The room is lined with beds and there are several enemies spies loitering about.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new Spies());
                mobs.Add(new Spies());
                mobs.Add(new Spies());
                mobs.Add(new Spies());
                mobs.Add(new Spies());
                mobs.Add(new Spies());
                CombatAction combatAction = new CombatAction("Spies", mobs);
                combatAction.PostCombat += EastRoomSpies;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "The room is lined with beds which have the dead bodies of enemy spies laying on them.";
            }

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

            //Town Center
            LocationDefinition locationDefinition = BeachTowerSpies.GetTownInstance().GetHallwayDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

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

            returnData      = new Location();
            returnData.Name = "Beach Tower Underground Floor";
            bool talkedToGuard = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerSpies.TALKED_TO_GUARD));

            returnData.Description = "The air is thicker upon arriving at the underground tower floor. There is tower soldier standing guard at the entrance.";

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

            //Adding the guard report about the spies into the locationActions
            LocationAction GuardReportAction = new RumorAction("Aken - Lieutenant of the Guard", this.GuardReport);

            locationActions.Add(GuardReportAction);
            returnData.Actions = locationActions;


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

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

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            Accomplishment guard = BeachTowerSpies.GetBeachTowerSpiesAccomplishments().Find(x => x.Name.Contains("Guard Report"));

            if (GameState.Hero.Accomplishments.Contains(guard))
            {
                locationDefinition = BeachTowerSpies.GetTownInstance().GetHallwayDefinition();
                adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

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

            returnData      = new Location();
            returnData.Name = "Storage Room";
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerSpies.WEST_ROOM_SPIES));

            if (!defeatedMobs)
            {
                returnData.Description = "A small storage room with two enemy spies sorting through documents.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new Spies());
                mobs.Add(new Spies());
                CombatAction combatAction = new CombatAction("Spies", mobs);
                combatAction.PostCombat += WestRoomSpies;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "A small storage room with two dead spies thrown across the boxes.";
            }

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

            //Town Center
            LocationDefinition locationDefinition = BeachTowerSpies.GetTownInstance().GetHallwayDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
コード例 #6
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);
        }