public Location LoadMurderShackEntrance() { Location returnData; returnData = new Location(); returnData.Name = "Murderer's Shack"; returnData.Description = "The room appears as if it is falling aprt. The walls are coming undone and there are giant holes in the ceiling."; //Actions // Adjacent Locations Dictionary <string, LocationDefinition> adjacentLocationDefinitions = new Dictionary <string, LocationDefinition>(); // Town Center LocationDefinition locationDefinition = Ankou.GetTownInstance().GetTownCenterDefinition(); adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition); locationDefinition = AnkouMurderShack.GetTownInstance().GetStorageRoomDefinition(); adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition); returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions; return(returnData); }
public static AnkouMurderShack GetTownInstance() { if (_AnkouMurderShack == null) { _AnkouMurderShack = new AnkouMurderShack(); } return(_AnkouMurderShack); }
public Location LoadDinningRoom() { Location returnData; returnData = new Location(); returnData.Name = "Dinning Room"; bool defatedGuards = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouMurderShack.DEFEATED_DINNING_ROOM_GUARDS)); if (!defatedGuards) { returnData.Description = "A medium sized room with several tables and plates scattered about. There is food laying about, ready to be cooked. There are both peasants and bandits guarding the room."; //Actions List <LocationAction> locationActions = new List <LocationAction>(); List <Mob> guards = new List <Mob>(); guards.Add(new Peasant()); guards.Add(new Peasant()); guards.Add(new Peasant()); guards.Add(new Peasant()); guards.Add(new Bandit()); guards.Add(new Bandit()); CombatAction combatAction = new CombatAction("Guards", guards); combatAction.PostCombat += DinningRoomGuards; locationActions.Add(combatAction); returnData.Actions = locationActions; } if (defatedGuards) { returnData.Description = "A medium sized room with several tables and plates scattered about. There is food laying about, ready to be cooked. The goblets are full of the blood of the dead gaurds."; } // Adjacent Locations Dictionary <string, LocationDefinition> adjacentLocationDefinitions = new Dictionary <string, LocationDefinition>(); // Town Center LocationDefinition locationDefinition = AnkouMurderShack.GetTownInstance().GetHallwayDefinition(); adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition); if (defatedGuards) { locationDefinition = AnkouMurderShack.GetTownInstance().GetMasterRoomDefinition(); adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition); } returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions; return(returnData); }
public Location LoadStorageRoom() { Location returnData; returnData = new Location(); returnData.Name = "Storage Room"; bool defeatedPeasants = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouMurderShack.DEFEATED_STORAGE_ROOM_PEASANTS)); if (!defeatedPeasants) { returnData.Description = "The room is full of large stacks of boxes. There are several of the town's peasants armed with shabby swords working inventory."; //Actions List <LocationAction> locationActions = new List <LocationAction>(); List <Mob> peasants = new List <Mob>(); peasants.Add(new Peasant()); peasants.Add(new Peasant()); peasants.Add(new Peasant()); peasants.Add(new Peasant()); CombatAction combatAction = new CombatAction("Peasants", peasants); combatAction.PostCombat += StorageRoomPeasants; locationActions.Add(combatAction); returnData.Actions = locationActions; } if (defeatedPeasants) { returnData.Description = "The room is full of large stacks of boxes. The peasant's bodies are strewn across several of the boxes."; } // Adjacent Locations Dictionary <string, LocationDefinition> adjacentLocationDefinitions = new Dictionary <string, LocationDefinition>(); // Town Center LocationDefinition locationDefinition = AnkouMurderShack.GetTownInstance().GetEntranceDefinition(); adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition); if (defeatedPeasants) { locationDefinition = AnkouMurderShack.GetTownInstance().GetHallwayDefinition(); adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition); } returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions; return(returnData); }
public Location LoadHallway() { Location returnData; returnData = new Location(); returnData.Name = "Hallway"; bool defeatedPeasants = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouMurderShack.DEFEATED_HALLWAY_PEASANTS)); if (!defeatedPeasants) { returnData.Description = "A rather wide but short hallway with two poorly armed peasants patrolling it."; //Actions List <LocationAction> locationActions = new List <LocationAction>(); List <Mob> peasants = new List <Mob>(); peasants.Add(new Peasant()); peasants.Add(new Peasant()); CombatAction combatAction = new CombatAction("Peasants", peasants); combatAction.PostCombat += HallwayPeasants; locationActions.Add(combatAction); returnData.Actions = locationActions; } if (defeatedPeasants) { returnData.Description = "A rather wide but short hallway. Two bloodied bodies lay crumpled on the floor."; } // Adjacent Locations Dictionary <string, LocationDefinition> adjacentLocationDefinitions = new Dictionary <string, LocationDefinition>(); // Town Center LocationDefinition locationDefinition = AnkouMurderShack.GetTownInstance().GetStorageRoomDefinition(); adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition); if (defeatedPeasants) { locationDefinition = AnkouMurderShack.GetTownInstance().GetDinningRoomDefinition(); adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition); } returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions; return(returnData); }
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); }
public Location LoadMasterRoom() { Location returnData; returnData = new Location(); returnData.Name = "Master Room"; bool defeatedScummyMurderer = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouMurderShack.DEFEATED_SCUMMY_MURDERER)); bool openedChest = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouMurderShack.OPENED_CHEST)); if (!defeatedScummyMurderer) { returnData.Description = "A large room with a torn up bed in the corner. The Scummy Murderer is sitting on the bed, staring at the door."; //Actions List <LocationAction> locationActions = new List <LocationAction>(); List <Mob> scummyMurderer = new List <Mob>(); scummyMurderer.Add(new ScummyMurderer()); CombatAction combatAction = new CombatAction("Scummy Murderer", scummyMurderer); combatAction.PostCombat += ScummyMurderer; locationActions.Add(combatAction); returnData.Actions = locationActions; } if (defeatedScummyMurderer) { if (!openedChest) { returnData.Description = "A large room with a torn up bed in the corner. There is a chest at the front of the bed waiting to be opened. The Scummy Murderer's body lays mangled and strewn across his bed."; List <LocationAction> locationActions = new List <LocationAction>(); TreasureChestAction itemAction = new TreasureChestAction(3); locationActions.Add(itemAction); itemAction.PostItem += Chest; returnData.Actions = locationActions; } else { returnData.Description = "A large room with a torn up bed in the corner. There is an open chest at the front of the bed. The Scummy Murderer's body lays mangled and strewn across his bed."; } } // Adjacent Locations Dictionary <string, LocationDefinition> adjacentLocationDefinitions = new Dictionary <string, LocationDefinition>(); // Town Center LocationDefinition locationDefinition = AnkouMurderShack.GetTownInstance().GetDinningRoomDefinition(); adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition); if (defeatedScummyMurderer) { locationDefinition = Ankou.GetTownInstance().GetTownCenterDefinition(); adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition); } returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions; return(returnData); }