示例#1
0
 private void PlayVampiricInfluence(GameState g, UserInterface ui)
 {
     Hunter hunterToInfluence = logic.DecideWhoToInfluence(g);
     Logger.WriteToDebugLog("Playing Vampiric Influence on " + hunterToInfluence.Name);
     ui.TellUser(hunterToInfluence.Name + " was affected by Dracula's Vampiric Influence and must reveal all cards and tell Dracula their next move");
     Logger.WriteToDebugLog("Resetting everything known about " + hunterToInfluence.Name + "'s cards");
     foreach (ItemDetail item in hunterToInfluence.ItemsKnownToDracula)
     {
         g.MoveItemFromKnownItemsToItemDeck(hunterToInfluence, item);
     }
     foreach (EventDetail e in hunterToInfluence.EventsKnownToDracula)
     {
         g.MoveEventFromKnownEventsToEventDeck(hunterToInfluence, e);
     }
     for (int i = 0; i < hunterToInfluence.NumberOfItems; i++)
     {
         string line;
         do
         {
             line = ui.AskHunterToRevealItemByVampiricInfluence(hunterToInfluence.Name);
             ui.TellUser(g.GetItemByNameFromItemDeck(line).Name);
         } while (g.GetItemByNameFromItemDeck(line).Name == "Unknown item");
         g.MoveItemFromItemDeckToKnownItems(hunterToInfluence, g.GetItemByNameFromItemDeck(line));
     }
     for (int i = 0; i < hunterToInfluence.NumberOfEvents; i++)
     {
         string line;
         do
         {
             line = ui.AskHunterToRevealEventByVampiricInfluence(hunterToInfluence.Name);
             ui.TellUser(g.GetEventByNameFromEventDeck(line).name);
         } while (g.GetEventByNameFromEventDeck(line).name == "Unknown event");
         g.MoveEventFromEventDeckToKnownEvents(hunterToInfluence, g.GetEventByNameFromEventDeck(line));
     }
     string lineA;
     do
     {
         lineA = ui.AskHunterWhichLocationTheyAreMovingToNextTurn(hunterToInfluence.Name);
         ui.TellUser(g.GetLocationFromName(lineA).Name);
     } while (g.GetLocationFromName(lineA).Name == "Unknown location" || g.GetLocationFromName(lineA).Name == "Multiple locations");
     hunterToInfluence.Destination = g.GetLocationFromName(lineA);
     ui.TellUser(hunterToInfluence.Destination.Name);
     hunterToInfluence.TravelType = ui.AskHunterWhatTravelTypeForSpy(hunterToInfluence.Name);
     ui.TellUser(hunterToInfluence.TravelType);
     Logger.WriteToDebugLog(hunterToInfluence.Name + "'s next move recorded as " + hunterToInfluence.Destination.Name + " by " + hunterToInfluence.TravelType);
 }