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

            returnData             = new Location();
            returnData.Name        = "Beach Side Village";
            returnData.Description = "A small village located a few miles to the south of the Beach Tower. The village is overrun with bandits who have set several of the buildings ablaze. The smoke rises into the air and can be seen for miles off.";

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

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

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

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

            Accomplishment trackBandit = BeachTower.GetBeachTowerAccomplishments().Find(x => x.Name.Contains("Tracked Down Masked Bandit"));

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

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

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

            returnData      = new Location();
            returnData.Name = "Dark Master's Office";
            bool   defeatedMobs           = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerMysteriousHouse.DARK_MASTER));
            bool   openedChest            = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerMysteriousHouse.DARK_MASTER_TREASURE));
            string darkMasterSpeechBefore = "''Hello, " + GameState.Hero.Identifier + ". '' A deep voice sounds from behind the hood of the cloack. It lacks all compasion and warmth, and instead feels cold and evil sending chills running down your spine.\n''I have to bring myself to wonder, why have you come here and disturbed the clouds that we enjoy so much? I have lived my life hidden in shadows, and I will not let you change that.''";
            string darkMasterSpeechAfter  = "The Dark Master gasp for breath as his hood falls from his face. You can see that his eyes are a pale red, which were most likely a darker shade of red before the fight you just had. He looks up at you, both hatred and resignation seen in his eyes. He gasp out, ''I didn't want to be involved. He made me. I heard stories about,'' *coughs* ''you. Didn't want to fight. But he made me. Make him pay. Spies in the tower. They can... '' *coughs up blood* ''lead you to him. Go. Make him pay.''";

            if (!defeatedMobs)
            {
                returnData.Description = "The office is lit only by a small lamp sitting on the desk in the center of the room. The flames flicker on the walls, briefly illuminating skeletons hanging from them. The flames show a man in a dark cloak sitting at the desk, his face clouded by the darkness.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new DarkMaster());
                CombatAction combatAction = new CombatAction("Dark Master", mobs, darkMasterSpeechBefore, darkMasterSpeechAfter);
                combatAction.PostCombat += DarkMaster;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "The office is lit only by a small lamp sitting on the desk in the center of the room. The flames flicker on the walls, briefly illuminating skeletons hanging from them. The Dark Master's body lays collapsed upon his desk.";
            }

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


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

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

            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 LoadScoutLeaderTent()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Scout Leader's Tent";
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerScoutingParty.SCOUT_LEADER));
            bool tookTreasure = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerScoutingParty.TREASURE));

            string before = "The Scout Leader looks up from his maps and smiles evily at you. He walks up to you saying, ''Well, well, well. If it isn't, " + GameState.Hero.Identifier + ". You think you're going to stop the invasion? You're a fool, " + GameState.Hero.Identifier + ". There is no way you are going to stop the storm that is to come. Blood will fall in Asku. And there is nothing you can do to stop it.''";
            string after  = "The Scout Leader collapses to the ground, coughing up blood. With his last breath he looks up to you and gasp out, ''You think... This changes things? We sail toward Asku now. The Beach Head will fall first. Then the whole country. Beware the dawn.''";

            if (!defeatedMobs)
            {
                returnData.Description = "The scout leaders tent is located at the eastern edge of the tent cluster. The Scout Leader is inside pouring over maps of Asku.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new ScoutLeader());
                CombatAction combatAction = new CombatAction("Scout Leader", mobs, before, after);
                combatAction.PostCombat += ScoutLeader;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else if (!tookTreasure)
            {
                returnData.Description = "The scout leaders tent is located at the eastern edge of the tent cluster. The Scout Leader lies dead in the middle of his tent. There is an unopened treasure chest on the side of the tent.";
                List <LocationAction> locationActions = new List <LocationAction>();
                TreasureChestAction   itemAction      = new TreasureChestAction(5);
                locationActions.Add(itemAction);
                itemAction.PostItem += TreasureChest;
                returnData.Actions   = locationActions;
            }
            else
            {
                returnData.Description = "The scout leaders tent is located at the eastern edge of the tent cluster. The Scout Leader lies dead in the middle of his tent.";
            }

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

            //Town Center
            LocationDefinition locationDefinition = BeachTowerScoutingParty.GetTownInstance().GetTentClusterDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

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

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
コード例 #4
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);
        }
コード例 #5
0
        public Location LoadPirateFleetMastersShip()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Pirate Fleet Master's Ship";
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerPirateShips.FLEET_MASTER));
            bool openedChest  = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerPirateShips.FLEET_MASTER_CHEST));

            if (!defeatedMobs)
            {
                returnData.Description = "A large ship belonging to the pirate fleet master. He is standing at the bridge of the ship with one hand on the wheel, observing the shore.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new PirateFleetMaster());
                CombatAction combatAction = new CombatAction("Pirate Fleet Master", mobs);
                combatAction.PostCombat += FleetMaster;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "A large ship belonging to the pirate fleet master. He is standing in the middle of the ship, dead as the victims of Davy Jones.";
            }

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


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

            //Town Center
            LocationDefinition locationDefinition = BeachTowerPirateShips.GetTownInstance().GetShipFourDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

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

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

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

            returnData             = new Location();
            returnData.Name        = "Mysterious House";
            returnData.Description = "A dark mysterious house sitting on the the far edge of the woods that border the beach. The house looks run down and has a sinister quality about it. You can feel the chill in the air as you approach closer to it. Be on your guard. Evil awaits.";


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

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

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            locationDefinition = BeachTowerMysteriousHouse.GetTownInstance().GetLandingRoomDefinition();
            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

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

            returnData             = new Location();
            returnData.Name        = "Beach Head";
            returnData.Description = "The beach head travels for as far as the eyes can see. Off in the distance you can spot the tents that the pirates pitched. You can see small blobs moving about around the tents which must be the pirates.";


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

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

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            locationDefinition = BeachTowerBeachHead.GetTownInstance().GetNorthTentsDefinition();
            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
コード例 #9
0
        public Location LoadMayorsHouse()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Outside the Mayor's House";
            //Add a confront masked bandit action
            //There will be a conversation with the bandit, followed by a brief fight
            //After the fight the bandit will throw out an insult and flee
            //The player will then have to try to get into the house but realize its impossible.
            //There is some type of spell on the house preventing access.
            //The player will have to chase down the masked bandit to figure out how to get in.
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerCapturedVillage.HOUSE_DISTRICT_MOBS));
            bool openDoor     = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerCapturedVillage.HOUSE_DISTRICT_VILLAGERS));
            bool openedChest  = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerCapturedVillage.MASKED_BANDIT_TREASURE));

            if (!defeatedMobs)
            {
                returnData.Description = "At the center of the House District is the Mayor's House. A large house, at least twice as large as the houses that surround it. It looks to be untouched by the bandits, but you can hear screaming from within - as if people are being tortured inside. There is a masked bandit standing calmly at the front of the house preventing access inside.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new MaskedBandit());
                CombatAction combatAction = new CombatAction("Masked Bandit", mobs);
                combatAction.PostCombat += MaskedBandit;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else if (defeatedMobs && !openDoor)
            {
                returnData.Description = "At the center of the House District is the Mayor's House. A large house, at least twice as large as the houses that surround it. It looks to be untouched by the bandits, but you can hear screaming from within - as if people are being tortured inside.";
                List <LocationAction> locationActions = new List <LocationAction>();
                TakeItemAction        itemAction      = new TakeItemAction("Open", "Door", "You try to open the door but are repelled by a magical force. You realize you cannot break into the house. You have to somehow track down the Masked Bandit and force him to reveal how to get into the house and save the people trapped inside.");
                itemAction.PostItem += OpenMayorHouseDoor;
                locationActions.Add(itemAction);
                returnData.Actions = locationActions;
            }
            if (openDoor && !openedChest)
            {
                returnData.Description = "At the center of the House District is the Mayor's House. A large house, at least twice as large as the houses that surround it. It looks to be untouched by the bandits, but you can hear screaming from within - as if people are being tortured inside.";
                List <LocationAction> locationActions = new List <LocationAction>();
                TreasureChestAction   itemAction      = new TreasureChestAction(5);
                locationActions.Add(itemAction);
                itemAction.PostItem += MaskedBanditChest;
                returnData.Actions   = locationActions;
            }
            else
            {
                returnData.Description = "At the center of the House District is the Mayor's House. A large house, at least twice as large as the houses that surround it. It looks to be untouched by the bandits, but you can hear screaming from within - as if people are being tortured inside.";
            }

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

            //Town Center
            LocationDefinition locationDefinition = BeachTowerCapturedVillage.GetTownInstance().GetHouseDistrictDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            //This is just a temporary port back to Beach Tower TownHall for in development testing (since next quest isn't in yet)
            if (openedChest)
            {
                locationDefinition = BeachTower.GetTownInstance().GetTownCenterDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            Accomplishment freeMayor = BeachTower.GetBeachTowerAccomplishments().Find(x => x.Name.Contains("Free Mayor"));

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

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
コード例 #10
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);
        }
コード例 #11
0
        public Location LoadNecroOfficerTent()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Necromancer Intelligence Officer's Tent";
            bool   defeatedMobs             = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerHiddenCamp.NECRO_OFFICER));
            bool   openedChest              = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerHiddenCamp.NECRO_OFFICER_CHEST));
            bool   tookDocument             = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerHiddenCamp.DOCUMENT));
            string NecroOfficerSpeachBefore = GameState.Hero.Identifier + ", welcome to my humble adobe. You came here for information? How unfortunate. I will never reveal anything.";
            string NecroOfficerSpeachAfter  = "You kneel down over the Intelligence Officer's body and search him for any documents. You find a folded document that Mike might find interesting.";

            if (!defeatedMobs)
            {
                returnData.Description = "A large over the top tent. Inside of it there is a necromancer dressed in very expensive robes. The room is decorated with the most expensive pieces of furniture money can buy on this side of Ankou.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new NecroIntelligenceOfficer());

                CombatAction combatAction = new CombatAction("Necromancer Intelligence Officer", mobs, NecroOfficerSpeachBefore, NecroOfficerSpeachAfter);
                combatAction.PostCombat += NecroIntelligenceOfficer;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "A large over the top tent. Inside of it there is a necromancer dressed in very expensive robes laying dead on the ground. The room is decorated with the most expensive pieces of furniture money can buy on this side of Ankou.";
            }

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

            if (defeatedMobs && !tookDocument)
            {
                List <LocationAction> locationActions = new List <LocationAction>();
                TakeItemAction        itemAction      = new TakeItemAction("Document");
                locationActions.Add(itemAction);
                itemAction.PostItem += NecroIntelligenceOfficerDocument;
                returnData.Actions   = locationActions;
            }


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

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

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

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

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
コード例 #12
0
        public Location LoadSecretTomb()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Secret Tomb";
            bool defeatedMobs   = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerCatacomb.DEFEAT_NECROMANCER));
            bool confrontBandit = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerCatacomb.CONFRONT_MASKED_BANDIT));
            bool openChest      = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerCatacomb.TREASURE_CHEST));

            string before = "Welcome, " + GameState.Hero.Identifier + ". What a welcome surprise to see you here. I assume you've tracked this fool before me. He obviously failed at his job. No matter, I'll finish you myself.";
            string after  = "The Necromancer gasp for air as you kneel over him, a dagger you found on the floor lodged in his chest. You can see into his hood and red eyes are staring back at you. As he takes his last breath a major burst of energy releases from his body, knocking you back onto the ground. You slowly stand up, hoping that broke the barrier to the Mayor's House. Either way, you need to report to the Captain of the Guard.";

            //Add action to confront masked bandit
            //After confronting the masked bandit a necromancer steps out from the shadows and kills the masked bandit
            //Fight the necromancer
            //Killing the necromancer releases the shield on the mayor's house stopping you from getting back.
            if (!confrontBandit)
            {
                returnData.Description = "A large room with a tomb against the back wall. There is a large mural painting behind the tomb depicting what appears to be a person of royalty. This tomb must belong to a very important person. The masked bandit is kneeling before the tomb, his back turned to you";
                List <LocationAction> locationActions = new List <LocationAction>();
                TakeItemAction        itemAction      = new TakeItemAction("Confront", "Masked Bandit", "You walk up behind the Masked Bandit. He stands upm turning around to face you. Just as he's about to say something his body is crushed by an invisible force and crumples to the ground, dead. Out from a darkened corner steps a necromancer, a dark hood covering his face. You feel trepidation as evil pours off his body like a waterfall.");
                itemAction.PostItem += ConfrontMaskedBandit;
                locationActions.Add(itemAction);
                returnData.Actions = locationActions;
            }

            else if (!defeatedMobs)
            {
                returnData.Description = "A large room with a tomb against the back wall. There is a large mural painting behind the tomb depicting what appears to be a person of royalty. This tomb must belong to a very important person. The masked bandit's body lays crumpled on the floor as the necromancer stands over it, glaring menacingly at you.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new CatacombsNecromancer());
                CombatAction combatAction = new CombatAction("Catacombs Necromancer", mobs, before, after);
                combatAction.PostCombat += LeftTombMobs;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }

            else if (defeatedMobs && !openChest)
            {
                returnData.Description = "A large room with a tomb against the back wall. There is a large mural painting behind the tomb depicting what appears to be a person of royalty. This tomb must belong to a very important person. There is a treasure chest behind the tomb.";
                List <LocationAction> locationActions = new List <LocationAction>();
                TreasureChestAction   itemAction      = new TreasureChestAction(5);
                locationActions.Add(itemAction);
                itemAction.PostItem += TreasureChest;
                returnData.Actions   = locationActions;
            }
            else
            {
                returnData.Description = "A large room with a tomb against the back wall. There is a large mural painting behind the tomb depicting what appears to be a person of royalty. This tomb must belong to a very important person.";
            }


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

            //Town Center
            LocationDefinition locationDefinition = BeachTowerCatacomb.GetTownInstance().GetSecretPassageWayDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);


            //Figure out where you want the player to go after this
            //Maybe both
            if (openChest)
            {
                locationDefinition = BeachTowerCapturedVillage.GetTownInstance().GetEntranceDefinition();
                adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

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


            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

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

            returnData      = new Location();
            returnData.Name = "Master Bedroom";
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerMayorHouse.DEFEAT_BANDIT_RAID_LEADER));
            bool freeMayor    = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerMayorHouse.CAPTURED_MAYOR));
            bool tookTreasure = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerMayorHouse.TREASURE_CHEST));

            if (!defeatedMobs)
            {
                returnData.Description = "A large bedroom with a large elegent bed in the center of the fall wall. There are several bookshelves full of a wide variety of literature. There is a desk against a side wall with several documents and parchment scattered about it. It is clear the Mayor is quite a scholar. The Mayor is tied up to the front of his bed post, and a Bandit Raid Leader is standing in front of him with his sword drawn and pointed to the Mayor's neck.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new BanditRaidLeader());
                CombatAction combatAction = new CombatAction("Bandit Raid Leader", mobs);
                combatAction.PostCombat += BanditRaidLeader;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }

            else if (defeatedMobs && !freeMayor)
            {
                returnData.Description = "A large bedroom with a large elegent bed in the center of the fall wall. There are several bookshelves full of a wide variety of literature. There is a desk against a side wall with several documents and parchment scattered about it. It is clear the Mayor is quite a scholar. The Mayor is tied up to the front of his bed post.";
                List <LocationAction> locationActions = new List <LocationAction>();
                TakeItemAction        itemAction      = new TakeItemAction("Free", "Mayor", "You cut the ties that are binding the mayor to the bed. He thanks you and promptly leaves the house to asses the damage done to his town. You should report back to Mike at the Beach Tower to let him know that the Mayor is free and the town has been completely liberated.");
                itemAction.PostItem += FreeMayor;
                locationActions.Add(itemAction);
                returnData.Actions = locationActions;
            }

            else if (defeatedMobs && freeMayor && !tookTreasure)
            {
                returnData.Description = "A large bedroom with a large elegent bed in the center of the fall wall. There are several bookshelves full of a wide variety of literature. There is a desk against a side wall with several documents and parchment scattered about it. It is clear the Mayor is quite a scholar.";
                List <LocationAction> locationActions = new List <LocationAction>();
                TreasureChestAction   itemAction      = new TreasureChestAction(5);
                locationActions.Add(itemAction);
                itemAction.PostItem += TreasureChest;
                returnData.Actions   = locationActions;
            }
            returnData.Description = "A large bedroom with a large elegent bed in the center of the fall wall. There are several bookshelves full of a wide variety of literature. There is a desk against a side wall with several documents and parchment scattered about it. It is clear the Mayor is quite a scholar. The Mayor is tied up to the front of his bed post.";

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

            //Town Center
            LocationDefinition locationDefinition = BeachTowerMayorHouse.GetTownInstance().GetUpstairsHallwayDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

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

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

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


            returnData             = new Location();
            returnData.Name        = "Banken";
            returnData.Description = "The small town of Banken, located in the middle of the Ashen Forest. There are several wooden buildings throughout the town. The town is mainly populated by Forest Rangers, but there are some civilians living there as well.";

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

            Accomplishment investigateShrine = Banken.GetBankenAccomplishments().Find(x => x.Name.Contains("Investigate Religious Shrine"));

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

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

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
コード例 #15
0
        public Location LoadCaptainTent()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Captain's Tent";
            bool   defeatedPirateCaptain = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerBeachHead.PIRATE_CAPTAIN));
            bool   openedChest           = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerBeachHead.CAPTAIN_TREASURE));
            bool   tookOrders            = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerBeachHead.CAPTAIN_ORDERS));
            string parchmentText         = "I don't want to hear any more excuses captain. You will lead on the beach head and you will wreck havoc. Kill as many innocents as you can. I don't give a rat's ass if there is a military tower close by. They will not pose a threat. You will decimate them and they won't be able to do anything about it. Victory is at hand!";

            //Actions
            if (!defeatedPirateCaptain)
            {
                returnData.Description = "The tent is large and decorated with foul substances collected through decades of pillaging. The pirate captain is sitting in his chair behind his desk, looking at you with a smirk on his face.";

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

                List <Mob> mobs = new List <Mob>();
                mobs.Add(new PirateCaptain());
                CombatAction combatAction = new CombatAction("Pirate Captain", mobs);
                combatAction.PostCombat += PirateCaptain;

                locationActions.Add(combatAction);

                returnData.Actions = locationActions;
            }
            else if (defeatedPirateCaptain)
            {
                if (!openedChest)
                {
                    if (!tookOrders)
                    {
                        returnData.Description = "The tent is large and decorated with foul substances collected through decades of pillaging. The pirate captain lays dead in the center of the room. There is a piece of parchment on his desk and a treasure chest under it.";
                    }
                    else
                    {
                        returnData.Description = "The tent is large and decorated with foul substances collected through decades of pillaging. The pirate captain lays dead in the center of the room. There is a treasure chest under his desk.";
                    }

                    List <LocationAction> locationActions = new List <LocationAction>();
                    TreasureChestAction   itemAction      = new TreasureChestAction(5);
                    locationActions.Add(itemAction);
                    itemAction.PostItem += CaptainChest;
                    returnData.Actions   = locationActions;
                }
                if (openedChest && tookOrders)
                {
                    returnData.Description = "The tent is large and decorated with foul substances collected through decades of pillaging. The pirate captain lays dead in the center of the room. There is an opened treasure chest under his desk.";
                }
                if (!tookOrders && openedChest)
                {
                    returnData.Description = "The tent is large and decorated with foul substances collected through decades of pillaging. The pirate captain lays dead in the center of the room. There is a piece of parchment on his desk and an opened treasure chest under it.";
                    List <LocationAction> locationActions = new List <LocationAction>();
                    ReadPapersAction      parchmentAction = new ReadPapersAction(parchmentText);
                    parchmentAction.PostPaper += CaptainOrders;
                    locationActions.Add(parchmentAction);
                    returnData.Actions = locationActions;
                }
            }

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

            //Town Center
            LocationDefinition locationDefinition = BeachTowerBeachHead.GetTownInstance().GetSmallPathDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

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

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }