public async Task <IActionResult> Edit(int id, [Bind("ID,accomplishment,JobID")] Accomplishment accomplishment)
        {
            if (id != accomplishment.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(accomplishment);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!AccomplishmentExists(accomplishment.ID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction("Index"));
            }
            return(View(accomplishment));
        }
        public Location LoadSideArea()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Watertown Forest Side Area";
            Accomplishment banditCaveAccomplishment = Watertown.GetWatertownAccomplishments().Find(x => x.Name.Contains("Bandit Cave"));

            if (!(GameState.Hero.Accomplishments.Contains(banditCaveAccomplishment)))
            {
                returnData.Description = "You move off to a little side area you saw. There is nothing here but more trees.";
            }
            else
            {
                returnData.Description = "Now that you were told of the cave's existence, you can spot it hiding behind some trees.";
            }

            //Adjacent Locations
            Dictionary <string, LocationDefinition> adjacentLocationDefinitions = new Dictionary <string, LocationDefinition>();
            LocationDefinition locationDefinition = WatertownForest.GetTownInstance().GetStartingLocationDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

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

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
示例#3
0
 public async Task <IActionResult> Edit(int id, [Bind("AccomplishmentID,JobID,Accomp")] Accomplishment accomplishment)
 {
     if (ModelState.IsValid)
     {
         try
         {
             accomplishment.AccomplishmentID = id;
             _context.Update(accomplishment);
             await _context.SaveChangesAsync();
         }
         catch (DbUpdateConcurrencyException)
         {
             if (!AccomplishmentExists(accomplishment.AccomplishmentID))
             {
                 return(NotFound());
             }
             else
             {
                 throw;
             }
         }
         return(RedirectToAction("Index"));
     }
     ViewData["JobID"] = new SelectList(_context.Jobs, "JobID", "Company", accomplishment.JobID);
     return(View(accomplishment));
 }
        public Location LoadClearing()
        {
            Location returnData = new Location();

            returnData.Name = "Forest Clearing";
            bool           defeatedBanditCaptain    = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownForest.DEFEATED_BANDIT_CAPTAIN_KEY));
            Accomplishment murderRoomAccomplishment = Watertown.GetWatertownAccomplishments().Find(x => x.Name.Contains("Bandit Spy"));

            if (!defeatedBanditCaptain)
            {
                returnData.Description = "The Bandit Captain stands in the clearing and stares at you, daring you to challenge him.";
            }
            else if (defeatedBanditCaptain && !GameState.Hero.Accomplishments.Contains(murderRoomAccomplishment))
            {
                returnData.Description = "The Bandit Captain lays dead in the clearing.";
            }
            else if (GameState.Hero.Accomplishments.Contains(murderRoomAccomplishment))
            {
                returnData.Description = "A medium sized clearing. Now that you've been told to search for the tower you can see a covered up entrance to a narrow path. It also looks like the Bandit Captain's body has been removed.";
            }

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

            if (!defeatedBanditCaptain)
            {
                List <Mob> banditCaptain = new List <Mob>();
                banditCaptain.Add(new BanditCaptain());
                CombatAction combatAction = new CombatAction("Bandit Captain", banditCaptain);
                combatAction.PostCombat += BanditCaptainResults;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }

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

            LocationDefinition locationDefinition = WatertownForest.GetTownInstance().GetStraightDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedBanditCaptain)
            {
                locationDefinition = Watertown.GetTownInstance().GetTownCenterDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

                LocationHandler.SetLocationStateValue(Watertown.LOCATION_STATE_KEY, DEFEATED_CAPTAIN_STATE, true);
                LocationHandler.ResetLocation(Watertown.INN_KEY); // Need to reload Inn so that new conversation can be set.
            }

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


            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
示例#5
0
        private void SetAccomplishment(ProfessionalExperience current, AccomplishmentViewModel acc)
        {
            Accomplishment existing = string.IsNullOrEmpty(acc.Id) ?
                                      new Accomplishment
            {
                IsRelevant = acc.IsRelevant,
                Summary    = "",
                Title      = acc.Title,
            } :
            _accomplishmentService.GetById(Guid.Parse(acc.Id));

            if (acc.IsDeleted)
            {
                _accomplishmentService.Delete(existing);
            }
            else
            {
                existing.IsRelevant = acc.IsRelevant;
                existing.Title      = acc.Title;

                if (string.IsNullOrEmpty(acc.Id))
                {
                    current.Accomplishments.Add(existing);
                }
            }
        }
示例#6
0
        public Location LoadEasternForestEdge()
        {
            Location returnData;

            returnData             = new Location();
            returnData.Name        = "Ashen Forest Eastern Forest Edge";
            returnData.Description = "The Ashen Forest has ended. There are mountains a little further East. The road continues on, leading through the mountains toward Asku's east coast.";

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

            //Town Center
            LocationDefinition locationDefinition = BankenAshenForest.GetTownInstance().GetEasternForestPathThreeDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            Accomplishment banditCamp = Banken.GetBankenAccomplishments().Find(x => x.Name.Contains("Bandit Camp"));

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

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
示例#7
0
        public Location LoadPathNorth()
        {
            Location returnData;

            returnData             = new Location();
            returnData.Name        = "Path North";
            returnData.Description = "The path is long and open. It leads as far north as the eyes can see.";

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

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

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            Accomplishment scoutingParty = BeachTower.GetBeachTowerAccomplishments().Find(x => x.Name.Contains("Scouting Party"));

            if (GameState.Hero.Accomplishments.Contains(scoutingParty))
            {
                locationDefinition = BeachTowerScoutingParty.GetTownInstance().GetEntranceDefinition();
                adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
示例#8
0
        public Location LoadStraightFour()
        {
            Location returnData;

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

            //Actions

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

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

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

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

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

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


            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
示例#9
0
        public Location LoadRightThree()
        {
            Location returnData;

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

            //Actions

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

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

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

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

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

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
示例#10
0
        public ActionResult Create([Bind(Include = "AccomplishmentId,Date,TeamName,Title,Details,ValueDriversSelection")] Accomplishment accomplishment)
        {
            if (ModelState.IsValid)
            {
                List <ValueDriver> valueDrivers = new List <ValueDriver>();
                if (accomplishment.ValueDriversSelection != null)
                {
                    if (accomplishment.ValueDriversSelection.Contains(","))
                    {
                        List <string> vdList = accomplishment.ValueDriversSelection.Split(',').ToList <string>();
                        foreach (string vdID in vdList)
                        {
                            if (vdID.Length > 0)
                            {
                                valueDrivers.Add(db.ValueDrivers.Find(Int32.Parse(vdID)));
                            }
                        }
                    }
                }

                accomplishment.ValueDrivers = valueDrivers;
                db.Accomplishments.Add(accomplishment);



                db.SaveChanges();
                ViewData["test"] = accomplishment.ValueDriversSelection;

                return(RedirectToAction("Index"));
            }

            return(View(accomplishment));
        }
        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);
        }
示例#12
0
        public Location LoadForestWilderness()
        {
            Location returnData;

            returnData             = new Location();
            returnData.Name        = "Ashen Forest Wilderness";
            returnData.Description = "The path forks off, the left side leading to the wilderness. The area is thick with trees both dead and alive. There is an eviling feeling in the air. You should turn back now.";

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

            //Town Center
            LocationDefinition locationDefinition = BankenAshenForest.GetTownInstance().GetForestPathStartDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            Accomplishment shadeLord = Banken.GetBankenAccomplishments().Find(x => x.Name.Contains("Shade Lord"));

            if (GameState.Hero.Accomplishments.Contains(shadeLord))
            {
                locationDefinition = BankenForestWilderness.GetTownInstance().GetEntranceDefinition();
                adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
示例#13
0
        public Location LoadNorthernForestEdge()
        {
            Location returnData;

            returnData             = new Location();
            returnData.Name        = "Ashen Forest Northern Forest Edge";
            returnData.Description = "The Northen Edge of the Ashen Forest. The air is light and clean, far away from ancient evils now.";

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

            //Town Center
            LocationDefinition locationDefinition = BankenAshenForest.GetTownInstance().GetNorthernPathFiveDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            Accomplishment swampland = Banken.GetBankenAccomplishments().Find(x => x.Name.Contains("Swampland"));

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

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
示例#14
0
        public static Accomplishments GetWatertownAccomplishments()
        {
            if (_WatertownAccomplishments == null)
            {
                _WatertownAccomplishments = new Accomplishments();

                Accomplishment accomplishment = new Accomplishment();
                accomplishment.NameSpace   = "Watertown";
                accomplishment.Name        = "Has Heard the Sewer King Rumor";
                accomplishment.Description = "Has heard the rumor of the sewer king.   Tales of gold and rewards in the Watertown sewer.";
                _WatertownAccomplishments.Add(accomplishment);

                accomplishment             = new Accomplishment();
                accomplishment.NameSpace   = "Watertown";
                accomplishment.Name        = "Has Heard the Bandit Captain Rumor";
                accomplishment.Description = "Has heard the rumor of the bandit cave.";
                _WatertownAccomplishments.Add(accomplishment);

                accomplishment             = new Accomplishment();
                accomplishment.NameSpace   = "Watertown";
                accomplishment.Name        = "Has Heard the Hidden Room Rumor";
                accomplishment.Description = "Has heard the rumor of the bandit hidden room.";
                _WatertownAccomplishments.Add(accomplishment);

                accomplishment             = new Accomplishment();
                accomplishment.NameSpace   = "Watertown";
                accomplishment.Name        = "Has Heard Bandit Murder Rumor";
                accomplishment.Description = "Has heard the rumor of the bandit murder.";
                _WatertownAccomplishments.Add(accomplishment);

                accomplishment             = new Accomplishment();
                accomplishment.NameSpace   = "Watertown";
                accomplishment.Name        = "Has heard rumor of Explore the Forest";
                accomplishment.Description = "Has heard the rumor of exploring the forest off the sewer.";
                _WatertownAccomplishments.Add(accomplishment);

                accomplishment             = new Accomplishment();
                accomplishment.NameSpace   = "Watertown";
                accomplishment.Name        = "Has heard rumor Defeated Sewer King";
                accomplishment.Description = "Has heard the rumor of Defeated Sewer King.";
                _WatertownAccomplishments.Add(accomplishment);

                accomplishment             = new Accomplishment();
                accomplishment.NameSpace   = "Watertown";
                accomplishment.Name        = "Has Heard Bandit Spy Rumor";
                accomplishment.Description = "Has heard the rumor of the Bandit Spy in Watertown.";
                _WatertownAccomplishments.Add(accomplishment);

                accomplishment             = new Accomplishment();
                accomplishment.NameSpace   = "Watertown";
                accomplishment.Name        = "Has Heard Bandit God King Rumor";
                accomplishment.Description = "Has heard the rumor of the Bandit God King in Watertown.";
                _WatertownAccomplishments.Add(accomplishment);

                // TODO: Can add more accomplishments here;
            }

            return(_WatertownAccomplishments);
        }
示例#15
0
        public void HeardTravelToTowerRumor()
        {
            Accomplishment accomplishment = Ankou.GetAnkouAccomplishments().Find(x => x.Name.Contains("Travel to the Tower"));

            GameState.Hero.Accomplishments.Add(accomplishment);
            //Reload the TownCenter so it will open up the Ariean's Estate
            LocationHandler.ResetLocation(TOWN_CENTER_KEY);
        }
示例#16
0
        public void HeardScoutUndergroundHideoutRumor()
        {
            Accomplishment accomplishment = Ankou.GetAnkouAccomplishments().Find(x => x.Name.Contains("Scouted Underground Hideout"));

            GameState.Hero.Accomplishments.Add(accomplishment);
            //Reload the TownCenter so it will open up the Ariean's Estate
            LocationHandler.ResetLocation(TOWN_CENTER_KEY);
        }
示例#17
0
        public void HeardScummyMurdererRomor()
        {
            Accomplishment accomplishment = Ankou.GetAnkouAccomplishments().Find(x => x.Name.Contains("Scummy Murderer"));

            GameState.Hero.Accomplishments.Add(accomplishment);
            //Reload the TownCenter so it will open up the Shack that the murderer is in.
            LocationHandler.ResetLocation(TOWN_CENTER_KEY);
        }
示例#18
0
        public void HeardAbandonedFortressRumor()
        {
            Accomplishment accomplishment = Banken.GetBankenAccomplishments().Find(x => x.Name.Contains("Abandoned Fortress"));

            GameState.Hero.Accomplishments.Add(accomplishment);
            //Reload the TownCenter so it will open up the area to Complete the Task that the Task is in
            LocationHandler.ResetLocation(TOWN_CENTER_KEY);
        }
示例#19
0
        public ActionResult DeleteConfirmed(int id)
        {
            Accomplishment accomplishment = db.Accomplishments.Find(id);

            db.Accomplishments.Remove(accomplishment);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#20
0
        public void HeardBankenRumor()
        {
            Accomplishment accomplishment = BeachTower.GetBeachTowerAccomplishments().Find(x => x.Name.Contains("Travel to Banken"));

            GameState.Hero.Accomplishments.Add(accomplishment);
            //Reload the TownCenter so it will open up the area to Complete the Task that the Task is in
            LocationHandler.ResetLocation(TOWN_CENTER_KEY);
        }
示例#21
0
        public void HeardLocateNecrosRumor()
        {
            Accomplishment accomplishment = Ankou.GetAnkouAccomplishments().Find(x => x.Name.Contains("Locate Necromancers"));

            GameState.Hero.Accomplishments.Add(accomplishment);
            //Reload the TownCenter so it will open up the Forest to go hunt down the necromancer camp
            LocationHandler.ResetLocation(TOWN_CENTER_KEY);
        }
示例#22
0
        public void HeardSpyReportRumor()
        {
            Accomplishment accomplishment = BeachTowerSpies.GetBeachTowerSpiesAccomplishments().Find(x => x.Name.Contains("Guard Report"));

            GameState.Hero.Accomplishments.Add(accomplishment);
            //Reload the entrance so it will open up the hallway
            LocationHandler.ResetLocation(ENTRANCE_KEY);
        }
示例#23
0
        public Location LoadBufferRoom()
        {
            Location returnData;

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

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

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

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

                locationActions.Add(combatAction);

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

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

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

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

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

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

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


            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
示例#24
0
        public Location LoadNorthernPathThree()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Ashen Forest Northern Path Three";
            bool lookForBurialGrounds = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenAshenForest.LOOK_FOR_BURIAL_GROUNDS));

            returnData.Description = "The path leads north, deep into the forest. The air feels at its foulest here. The Ancient Burial Grounds must be near.";

            if (!lookForBurialGrounds)
            {
                List <LocationAction> locationActions = new List <LocationAction>();
                locationActions = new List <LocationAction>();
                TakeItemAction lookActiopn = new TakeItemAction("Look for ", "the Ancient Burial Grounds", "You search desparately for the Ancient Burial Grounds. The darkness closes in around your heart the further north you go. Eventually you stumble upon their location");
                locationActions.Add(lookActiopn);
                lookActiopn.PostItem += LookForBurialGrounds;
                returnData.Actions    = locationActions;
            }

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

            //Town Center
            LocationDefinition locationDefinition = BankenAshenForest.GetTownInstance().GetNorthernPathTwoDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            if (lookForBurialGrounds)
            {
                locationDefinition = BankenAncientBurialGrounds.GetTownInstance().GetEntranceDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            Accomplishment oldForestRuins = Banken.GetBankenAccomplishments().Find(x => x.Name.Contains("Old Forest Ruins"));

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

            Accomplishment inconspiciousCave = Banken.GetBankenAccomplishments().Find(x => x.Name.Contains("Inconspicious Cave"));

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

            locationDefinition = BankenAshenForest.GetTownInstance().GetNorthernPathFourDefinition();
            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
示例#25
0
        public void HeardBanditKingRumor()
        {
            Accomplishment accomplishment = Watertown.GetWatertownAccomplishments().Find(x => x.Name.Contains("Bandit God King"));

            GameState.Hero.Accomplishments.Add(accomplishment);

            // Reload the TownCenter so it will open up the hidden room
            LocationHandler.ResetLocation(TOWN_CENTER_KEY);
        }
示例#26
0
        public Location LoadKitchen()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Kitchen";
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerMysteriousHouse.KITCHEN_NECRO));

            if (!defeatedMobs)
            {
                returnData.Description = "The kitchen is dark much like the rest of the house. The air smells a tad better in here due to the smells of fresh cooking food. There are two necromancers moving about the kitchen preparing meals for the rest in the house.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new Necromancer());
                mobs.Add(new Necromancer());
                CombatAction combatAction = new CombatAction("Necromancers", mobs);
                combatAction.PostCombat += KitchenNecro;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "The kitchen is dark much like the rest of the house. The air smells a tad better in here due to the smells of fresh cooking food. Two necromancers lay dead on the ground, their blood pouring at your feet.";
            }


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

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

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);


            if (defeatedMobs)
            {
                locationDefinition = BeachTowerMysteriousHouse.GetTownInstance().GetStorageRoomDefinition();
                adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

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

            Accomplishment report = BeachTower.GetBeachTowerAccomplishments().Find(x => x.Name.Contains("Investigate Report"));

            if (GameState.Hero.Accomplishments.Contains(report))
            {
                locationDefinition = BeachTowerGloomyForest.GetTownInstance().GetEntranceDefinition();
                adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
示例#27
0
        public void HeardBanditCaptainRumor()
        {
            // TODO: Need to keep duplicate accomplishments from happening (SEE ABOVE METHOD)
            Accomplishment accomplishment = Watertown.GetWatertownAccomplishments().Find(x => x.Name.Contains("Bandit Captain"));

            GameState.Hero.Accomplishments.Add(accomplishment);

            // Reload the TownCenter so it will open up the forest
            LocationHandler.ResetLocation(TOWN_CENTER_KEY);
        }
示例#28
0
 public ActionResult Edit([Bind(Include = "AccomplishmentId,Date,TeamName,Title, Details")] Accomplishment accomplishment)
 {
     if (ModelState.IsValid)
     {
         db.Entry(accomplishment).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(accomplishment));
 }
示例#29
0
        public void HeardSewerKingRumor()
        {
            // TODO: need to keep duplicate accomplishments from happening.
            Accomplishment accomplishment = Watertown.GetWatertownAccomplishments().Find(x => x.Name.Contains("Sewer King"));

            GameState.Hero.Accomplishments.Add(accomplishment);

            // Reload the TownCenter so it will open up the sewer
            LocationHandler.ResetLocation(TOWN_CENTER_KEY);
        }
示例#30
0
 public static PersonSummaryViewModel FromPerson(Person persons, Accomplishment accomplishment)
 {
     return(new PersonSummaryViewModel
     {
         PersonId = persons.Id,
         FirstName = persons.FirstName,
         LastName = persons.LastName,
         NumberOfAccomplishments = accomplishment.Name
     });
 }