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);
        }
        public Location LoadShipFour()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Pirate Ship Four";
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerPirateShips.SHIP_FOUR_MOBS));

            if (!defeatedMobs)
            {
                returnData.Description = "A large ship full of pirate's elite raiders.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new ElitePirateRaider());
                mobs.Add(new ElitePirateRaider());
                mobs.Add(new ElitePirateRaider());
                mobs.Add(new ElitePirateRaider());
                mobs.Add(new ElitePirateRaider());
                mobs.Add(new ElitePirateRaider());
                mobs.Add(new ElitePirateRaider());
                mobs.Add(new ElitePirateRaider());
                mobs.Add(new ElitePirateRaider());
                mobs.Add(new ElitePirateRaider());
                CombatAction combatAction = new CombatAction("Elite Pirate Raiders", mobs);
                combatAction.PostCombat += ShipFourMobs;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "A large ship full of the pirate's dead elite raiders.";
            }

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

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

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedMobs)
            {
                locationDefinition = BeachTowerPirateShips.GetTownInstance().GetPirateFleetMastersShipDefinition();
                adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
        public Location LoadShipOne()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Pirate Ship One";
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerPirateShips.SHIP_ONE_MOBS));

            if (!defeatedMobs)
            {
                returnData.Description = "A large ship full of pirates and food.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new Pirate());
                mobs.Add(new Pirate());
                mobs.Add(new Pirate());
                mobs.Add(new Pirate());
                mobs.Add(new Pirate());
                mobs.Add(new Pirate());
                mobs.Add(new Pirate());
                mobs.Add(new Pirate());
                CombatAction combatAction = new CombatAction("Pirates", mobs);
                combatAction.PostCombat += ShipOneMobs;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "A large ship full of dead pirates and food.";
            }


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

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

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedMobs)
            {
                locationDefinition = BeachTowerPirateShips.GetTownInstance().GetShipTwoDefinition();
                adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
        public Location LoadEntrance()
        {
            Location returnData;

            returnData             = new Location();
            returnData.Name        = "Boat to Pirate Ships";
            returnData.Description = "A small boat on the shoreline meant to take you to the pirate ships hanging out near the shore.";


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

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

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            locationDefinition = BeachTowerPirateShips.GetTownInstance().GetShipOneDefinition();
            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
        public Location LoadShipThree()
        {
            Location returnData;

            returnData             = new Location();
            returnData.Name        = "Pirate Ship Three";
            returnData.Description = "A large ship full of pirate slave masters and slaves.";
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerPirateShips.SHIP_THREE_MOBS));
            bool freedSlaves  = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerPirateShips.SHIP_THREE_SLAVES));

            if (!defeatedMobs)
            {
                returnData.Description = "A large ship full of pirateslave masters and slaves.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new SlaveMaster());
                mobs.Add(new Slave());
                mobs.Add(new Slave());
                mobs.Add(new Slave());
                mobs.Add(new SlaveMaster());
                mobs.Add(new Slave());
                mobs.Add(new Slave());
                mobs.Add(new Slave());
                mobs.Add(new SlaveMaster());
                mobs.Add(new Slave());
                mobs.Add(new Slave());
                mobs.Add(new Slave());
                mobs.Add(new SlaveMaster());
                CombatAction combatAction = new CombatAction("Slave Masters and Slaves", mobs);
                combatAction.PostCombat += ShipThreeMobs;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "A large ship full of dead pirateslave masters and slaves.";
            }

            if (defeatedMobs && !freedSlaves)
            {
                List <LocationAction> locationActions = new List <LocationAction>();
                TakeItemAction        itemAction      = new TakeItemAction("Free", "Slaves", "You free the remaining slaves and send them back toward the shore, hoping the Beach Tower guard can get to them before any other pirates find them.");
                locationActions.Add(itemAction);
                itemAction.PostItem += FreeSlavesShipThree;
                returnData.Actions   = locationActions;
            }


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

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

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedMobs && freedSlaves)
            {
                locationDefinition = BeachTowerPirateShips.GetTownInstance().GetShipFourDefinition();
                adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

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

            returnData      = new Location();
            returnData.Name = "West Tents";
            bool defeatedPirates = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerBeachHead.WEST_PIRATES));
            bool tookChest       = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerBeachHead.WEST_CHEST));

            //Actions
            if (!defeatedPirates)
            {
                returnData.Description = "A collection of tents in the west. There are two pirates mingling about and a treasure chest.";

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

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

                locationActions.Add(combatAction);

                returnData.Actions = locationActions;
            }
            else
            {
                if (!tookChest)
                {
                    returnData.Description = "A collection of tents in the west. There are two dead headless pirates treasure chest.";
                }
                else
                {
                    returnData.Description = "A collection of tents in the west. There are two dead headless pirates and an open treasure chest.";
                }
            }

            if (defeatedPirates && !tookChest)
            {
                List <LocationAction> locationActions = new List <LocationAction>();
                TreasureChestAction   itemAction      = new TreasureChestAction(2);
                locationActions.Add(itemAction);
                itemAction.PostItem += WestChest;
                returnData.Actions   = locationActions;
            }

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

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

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedPirates)
            {
                Accomplishment report = BeachTower.GetBeachTowerAccomplishments().Find(x => x.Name.Contains("Pirate Ships"));
                if (GameState.Hero.Accomplishments.Contains(report))
                {
                    locationDefinition = BeachTowerPirateShips.GetTownInstance().GetEntranceDefinition();
                    adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);
                }

                returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }