コード例 #1
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);
        }
コード例 #2
0
        public static AnkouUndergroundTunnel GetTownInstance()
        {
            if (_AnkouUndergroundTunnel == null)
            {
                _AnkouUndergroundTunnel = new AnkouUndergroundTunnel();
            }

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

            returnData      = new Location();
            returnData.Name = "Ritual Room";
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouUndergroundTunnel.DEFEATED_BUFFER_ROOM_BANDITS));

            //Actions
            if (!defeatedMobs)
            {
                returnData.Description = "A dark room, swirling with strong dark energy. There are six necromancers in a cirlce chanting together";

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

                List <Mob> mob = new List <Mob>();
                mob.Add(new Necromancer());
                mob.Add(new Necromancer());
                mob.Add(new Necromancer());
                mob.Add(new Necromancer());
                mob.Add(new Necromancer());
                mob.Add(new Necromancer());
                CombatAction combatAction = new CombatAction("Necromancers", mob);
                combatAction.PostCombat += RitualRoomMobs;

                locationActions.Add(combatAction);

                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "A dark room, swirling with strong dark energy. There are six dead necromancers on the ground, their bodies forming a circle.";
            }

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

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

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedMobs)
            {
                locationDefinition = AnkouUndergroundTunnel.GetTownInstance().GetCoordinationRoomDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

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

            returnData      = new Location();
            returnData.Name = "Small Room";
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouUndergroundTunnel.DEFEATED_SMALL_ROOM_MOBS));

            //Actions
            if (!defeatedMobs)
            {
                returnData.Description = "A small room that has two peasants and two nobles playing a game of cards amongst themselves, killing time.";
                List <LocationAction> locationActions = new List <LocationAction>();

                List <Mob> mob = new List <Mob>();
                mob.Add(new Peasant());
                mob.Add(new Noble());
                mob.Add(new Peasant());
                mob.Add(new Noble());
                CombatAction combatAction = new CombatAction("Peasants and Nobles", mob);
                combatAction.PostCombat += SmallRoomMobs;

                locationActions.Add(combatAction);

                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "A small room that has four dead bodies scattered about the ground.";
            }

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

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

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedMobs)
            {
                locationDefinition = AnkouUndergroundTunnel.GetTownInstance().GetRitualRoomDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

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

            returnData      = new Location();
            returnData.Name = "Muddy Room";
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouUndergroundTunnel.DEFEATED_MUDDY_ROOM_BANDITS));

            //Actions
            if (!defeatedMobs)
            {
                returnData.Description = "A muddy room that has two mobs pacing it, guarding further access to the tunnel";
                List <LocationAction> locationActions = new List <LocationAction>();

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

                locationActions.Add(combatAction);

                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "A muddy room that has two dead mobs laying on the ground, their blood pulled on the cold ground.";
            }

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

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

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedMobs)
            {
                locationDefinition = AnkouUndergroundTunnel.GetTownInstance().GetSmallRoomDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

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