private void SetTheCurrentMonsterForTheCurrentLocation(Location location, TTS tts) { // Populate the current monster with this location's monster (or null, if there is no monster here) CurrentMonster = location.NewInstanceOfMonsterLivingHere(); if (CurrentMonster != null) { RaiseMessage("Tu vês " + CheckMonsterGender(CurrentMonster.Name, 1) + " " + CurrentMonster.Name + "."); if (text != "") { tts.Speak(text + " e vês " + CheckMonsterGender(CurrentMonster.Name, 1) + " " + CurrentMonster.Name + "."); text = ""; } else { tts.Speak("Tu vês " + CheckMonsterGender(CurrentMonster.Name, 1) + " " + CurrentMonster.Name + "."); } } else { if (text != "") { tts.Speak(text); text = ""; } } }
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// private void SetTheCurrentMonsterForTheCurrentLocation(Location location) { CurrentMonster = location.NewInstanceOfMonsterLivingHere(); if (CurrentMonster != null) { RaiseMessage("You see a " + CurrentMonster.Name); } }
private void SetTheCurrentMonsterForTheCurrentLocation(Location location) { // Populate the current monster with this location's monster (or null, if there is no monster here) CurrentMonster = location.NewInstanceOfMonsterLivingHere(); if (CurrentMonster != null) { RaiseMessage("You see a " + location.MonsterLivingHere.Name); } }
public void MoveTo(Location newLocation) { if (!HasRequiredItemToEnterThisLocation(newLocation)) { RaiseMessage("You must have a " + newLocation.ItemRequiredToEnter.Name + " to enter this location."); return; // return without moving to the new location } // We have any required item, or there wasn't an item required, CurrentLocation = newLocation; CompletelyHeal(); #region QuestInNewLocation if (newLocation.HasAQuest) { if (PlayerDoesNotHaveThisQuest(newLocation.QuestAvailableHere)) { GiveQuestToPlayer(newLocation.QuestAvailableHere); } else // Player doesn't have the quest yet - so add it to his quest list { if (PlayerHasNotCompleted(newLocation.QuestAvailableHere) && PlayerHasAllQuestCompletionItems(newLocation.QuestAvailableHere)) { // Quest is completed!! CompleteQuestAndGiveRewards(newLocation.QuestAvailableHere); } } // end player has this quest / or not } // end quest is available here #endregion #region MonsterLivingHere // Does the location have a monster? if (newLocation.HasAMonster) { // Create a new random monster from those available in this location _currentMonster = newLocation.NewInstanceOfMonsterLivingHere(); RaiseMessage("You see a " + _currentMonster.Name); } else // There is not a MonsterLivingHere { _currentMonster = null; } #endregion }
private static void PopulateLocation() { //odds y<0 evens y>0 Location Camp = new Location(Location_ID_Camp, "Camp", "The makeshift place you call home... cozy", false); // Location Forest = new Location(Location_ID_Forst, "Forest", "The entrance to the forest from the pasture of your camp.", false); Forest.NewInstanceOfMonsterLivingHere(); Forest.AddMonster(Monster_ID_Bandit, 20); Forest.AddMonster(Monster_ID_Arcobot, 20); Forest.AddMonster(Monster_ID_Ent, 1); Forest.MonsterAppearanceChance = 50; Location f1 = new Location(Location_ID_Forst, "Forest", "The entrance to the forest from the pasture of your camp.", false);//0,1 f1.NewInstanceOfMonsterLivingHere(); f1.AddMonster(Monster_ID_Bandit, 20); f1.AddMonster(Monster_ID_Arcobot, 20); f1.AddMonster(Monster_ID_Ent, 1); f1.MonsterAppearanceChance = 50; Location f2 = new Location(Location_ID_Forst, "Forest", "The entrance to the forest from the pasture of your camp.", false); f2.NewInstanceOfMonsterLivingHere(); f2.AddMonster(Monster_ID_Bandit, 20); f2.AddMonster(Monster_ID_Arcobot, 20); f2.AddMonster(Monster_ID_Ent, 1); f2.MonsterAppearanceChance = 50; Location f3 = new Location(Location_ID_Forst, "Forest", "You notice a clearing of the trees, and see a cave; also seeing something enter the cave.", false); f3.NewInstanceOfMonsterLivingHere(); f3.AddMonster(Monster_ID_Bandit, 20); f3.AddMonster(Monster_ID_Arcobot, 20); f3.AddMonster(Monster_ID_Ent, 5); f3.MonsterAppearanceChance = 50; Location f4 = new Location(Location_ID_Forst, "Forest", "seems like some of the trees, are gone.", false); f4.NewInstanceOfMonsterLivingHere(); f4.AddMonster(Monster_ID_Bandit, 20); f4.AddMonster(Monster_ID_Arcobot, 20); f4.AddMonster(Monster_ID_Ent, 5); f4.MonsterAppearanceChance = 50; Location f5 = new Location(Location_ID_Forst, "Forest", "The plant life is more alive than usual.", false); f5.NewInstanceOfMonsterLivingHere(); f5.AddMonster(Monster_ID_Bandit, 20); f5.AddMonster(Monster_ID_Arcobot, 20); f5.AddMonster(Monster_ID_Ent, 5); f5.MonsterAppearanceChance = 50; Location f6 = new Location(Location_ID_Forst, "Forest", "Tall trees stand in your way, These trees are so big a weagon can fit though one.", false); f6.NewInstanceOfMonsterLivingHere(); f6.AddMonster(Monster_ID_Bandit, 20); f6.AddMonster(Monster_ID_Arcobot, 20); f6.MonsterAppearanceChance = 50; Location f7 = new Location(Location_ID_Forst, "Forest", "Tall trees stand in your way, These trees are so big a weagon can fit though one.", false); f7.NewInstanceOfMonsterLivingHere(); f7.AddMonster(Monster_ID_Bandit, 20); f7.AddMonster(Monster_ID_Arcobot, 20); f7.AddMonster(Monster_ID_Ent, 10); f7.MonsterAppearanceChance = 50; Location f8 = new Location(Location_ID_Forst, "Forest", "There are hunting traps around the area, noting humans are around this area; hopfully friendly.", false); f8.NewInstanceOfMonsterLivingHere(); f8.AddMonster(Monster_ID_Bandit, 20); f8.AddMonster(Monster_ID_Arcobot, 20); f8.MonsterAppearanceChance = 50; Location f10 = new Location(Location_ID_Forst, "Forest", "There are hunting traps around the area, noting humans are around this area; hopfully friendly.", false); f10.NewInstanceOfMonsterLivingHere(); f10.AddMonster(Monster_ID_Bandit, 20); f10.AddMonster(Monster_ID_Arcobot, 20); f10.MonsterAppearanceChance = 50; Location f10a = new Location(Location_ID_Forst, "Forest", "Tall trees stand in your way, These trees are so big a weagon can fit though one.", false); f10a.NewInstanceOfMonsterLivingHere(); f10a.AddMonster(Monster_ID_Bandit, 20); f10a.AddMonster(Monster_ID_Arcobot, 20); f10a.MonsterAppearanceChance = 50; Location f6a = new Location(Location_ID_Forst, "Forest", "There are hunting traps around the area, noting humans are around this area; hopfully friendly.", false); f6a.NewInstanceOfMonsterLivingHere(); f6a.AddMonster(Monster_ID_Bandit, 20); f6a.AddMonster(Monster_ID_Arcobot, 20); f6a.MonsterAppearanceChance = 50; Location f01 = new Location(Location_ID_Forst, "Forest", "Tall trees stand in your way, These trees are so big a weagon can fit though one.", false); f01.NewInstanceOfMonsterLivingHere(); f01.AddMonster(Monster_ID_Bandit, 20); f01.AddMonster(Monster_ID_Arcobot, 20); f01.MonsterAppearanceChance = 50; Location f02 = new Location(Location_ID_Forst, "Forest", "Tall trees stand in your way, These trees are so big a weagon can fit though one.", false); f02.NewInstanceOfMonsterLivingHere(); f02.AddMonster(Monster_ID_Bandit, 20); f02.AddMonster(Monster_ID_Arcobot, 20); f02.MonsterAppearanceChance = 50; Location f03 = new Location(Location_ID_Forst, "Forest", "Tall trees stand, but also large plants; noticing more bones around the forest", false); f03.NewInstanceOfMonsterLivingHere(); f03.AddMonster(Monster_ID_Bandit, 20); f03.AddMonster(Monster_ID_Arcobot, 20); f03.AddMonster(Monster_ID_Ent, 10); f03.AddMonster(Monster_ID_Man_Eater, 5); f03.MonsterAppearanceChance = 50; // Location Jungle = new Location(Location_ID_Jungle, "Jungle", "Vines hang from the tree tops, barely little light come from the canopy; don't travel at night here.", false); // Location Mountain = new Location(Location_ID_Mountain, "Mountain", "Far pass the town and jungle is mountains it going to take a while to get their; and it looks cold bring a coat.", false); // Location Town = new Location(Location_ID_Town, "Lost Town", "Before the Jungle stand a small hut town, peaceful and calm without bandits atleast.", false); Location t8a = new Location(Location_ID_Town, "Lost Town", "The Town seems pleasant, with its stalls for its little shops", false); Location t8b = new Location(Location_ID_Town, "Lost Town", "More people are going around the place, going from to where.", false); Location t8c = new Location(Location_ID_Town, "Lost Town", "Before you stands a large building, probally a court house.", false); Location Jail = new Location(Location_ID_Town, "Jail", "No one seems to be locked up yet.", false); Jail.MonsterAppearanceChance = 1; Jail.AddMonster(Monster_ID_BORIS, 1); Location GuildHall = new Location(Location_ID_Town, "Guild Hall", "Looks like some random jobs can be found here, look like you'll need more gold.", false); GuildHall.QuestAvailableHere = QuestByID(Quest_ID_Clear_retreive_5_Chucks_of_lether); Location Med = new Location(Location_ID_Town, "Clinic", "Rest here, if you feeling a bit down", false); Med.QuestAvailableHere = QuestByID(Quest_ID_Clear_Kill_5_arcobot); Location Shop = new Location(Location_ID_LostsSHOP, "Shop", "Welecome to the Shop", false); // Change later Vendortron9000 Vendy = new Vendortron9000("Vendy"); Vendy.Additemtoinventory(ItemByID(Item_ID_Chunks_of_leather), 999); Vendy.Additemtoinventory(ItemByID(Item_ID_hedgeapple), 999); Vendy.Additemtoinventory(ItemByID(Item_ID_Sword), 99); Vendy.Additemtoinventory(ItemByID(Item_ID_Staff), 99); Vendy.Additemtoinventory(ItemByID(Item_ID_arcobot_Fang), 99); Vendy.Additemtoinventory(ItemByID(Item_ID_Bow), 99); Shop.Vending = Vendy; Location Bar = new Location(Location_ID_LostsBar, "Bar", "You Enter the Bar, a few people are sitting down drink their booze.", false); // Location BanditEncampment = new Location(Location_ID_Bandit_Encampment, "Bandit Encampment", "Bandits stand gaurd, The wall that surrounds them makes it only one way in one way out.", false); // Location Pasture = new Location(Location_ID_Pasture, "Pasture", "You stand in the pasture, where your camps lays.", false); Location p1 = new Location(Location_ID_Pasture, "Pasture", "The open green field stands before you.", false); Location p2 = new Location(Location_ID_Pasture, "Pasture", "The open green field stands before you.", false); // Location Cave = new Location(Location_ID_Cave, "Cave Entrance", "There seems to be a cave wonders of what could be in the bellows of it.", false); // Cave.NewInstanceOfMonsterLivingHere(); Cave.AddMonster(Monster_ID_2BearsHighFiving, 20); Cave.MonsterAppearanceChance = 80; Location DeepCave = new Location(Location_ID_DeepCave, "Deep Cave", "The further you go the darker it gets.", false); // Location Beach = new Location(Location_ID_Beach, "Beach", "Pearly white sand on a sunny day, to bad theres creatures here.", false); // Location Water = new Location(Location_ID_Water, "Water", "The water is cool and deep, if you enter it might just rip you ashreds.", false); // Camp.LocationToNorth = Pasture; Pasture.LocationToEast = p1; Pasture.LocationToWest = p2; //OG LINE Pasture.LocationToNorth = Forest; Pasture.LocationToSouth = Camp; p2.LocationToEast = Pasture; //0,1 TOP ROW p2.LocationToNorth = f2; p1.LocationToWest = Pasture; p1.LocationToNorth = f1; //0,-1 BOTTOM ROW //FOREST AREA Forest.LocationToNorth = f01; //1,0 OG LINE Forest.LocationToEast = f1; Forest.LocationToWest = f2; Forest.LocationToSouth = Pasture; f2.LocationToEast = Forest;//1,1 // top f2.LocationToNorth = f4; f2.LocationToSouth = p2; f1.LocationToNorth = f3;//1,-1 f1.LocationToSouth = p1; f1.LocationToWest = Forest; f01.LocationToNorth = f02;//2,0 OG LINE f01.LocationToEast = f3; f01.LocationToSouth = Forest; f01.LocationToWest = f4; f4.LocationToNorth = f6;//2,1 f4.LocationToEast = f01; f4.LocationToSouth = f2; f3.LocationToNorth = f5;//2.-1 f3.LocationToWest = f01; f3.LocationToSouth = f1; f3.LocationToEast = Cave; f02.LocationToNorth = f03; //3,0 f02.LocationToEast = f5; f02.LocationToWest = f6; f02.LocationToSouth = f01; f6.LocationToNorth = f8; //3,1 f6.LocationToWest = f6a; f6.LocationToSouth = f4; f6.LocationToEast = f02; f5.LocationToNorth = f7; //3,-1 f5.LocationToSouth = f3; f5.LocationToWest = f02; f6a.LocationToNorth = Town;//3,2 f6a.LocationToEast = f6; f03.LocationToEast = f7; //4,0 f03.LocationToSouth = f02; f03.LocationToWest = f8; f7.LocationToWest = f03; //4,-1 f7.LocationToSouth = f5; f8.LocationToWest = Town; //4,1 f8.LocationToEast = f03; f8.LocationToNorth = f10; f8.LocationToSouth = f6; f10.LocationToSouth = f8;//5,1 f10.LocationToWest = f10a; f10a.LocationToEast = f10;//5,2 f10a.LocationToSouth = Town; //Town Town.LocationToSouth = f6a; //4,2 OR ENTRANCE OF TOWN Town.LocationToNorth = f10a; Town.LocationToEast = f8; Town.LocationToWest = t8a; t8a.LocationToWest = t8b; //4,3 t8a.LocationToEast = Town; t8a.LocationToSouth = Jail; // Jailhouse at 3,3 t8b.LocationToEast = t8a; // 4,4 t8b.LocationToNorth = Bar; //Bar t8b.LocationToSouth = GuildHall; //Guild Hall t8b.LocationToWest = t8c; t8c.LocationToEast = t8b; //4,5 t8c.LocationToSouth = Med; //Med t8c.LocationToNorth = Shop; //Shop Med.LocationToNorth = t8c; //Med 3,5 Shop.LocationToSouth = t8c; //Shop 5,5 GuildHall.LocationToNorth = t8b; //Guild Hall 3,4 Bar.LocationToSouth = t8b; //Bar 5,4 Jail.LocationToNorth = t8a; //Jail 3,3 //Cave Cave.LocationToWest = f3; //BREAKER _locations.Add(Camp); _locations.Add(Town); _locations.Add(Forest); _locations.Add(Cave); _locations.Add(Pasture); _locations.Add(Shop); }