public void PlayAlly(GameState g, EventDetail allyDrawn, UserInterface ui) { string allyKept; if (!g.DraculaHasAlly()) { Logger.WriteToDebugLog("Dracula has no current Ally, keeping this one"); g.SetDraculaAlly(allyDrawn); g.RemoveEventFromEventDeck(allyDrawn); Logger.WriteToDebugLog("Dracula put " + allyDrawn.name + " into his empty Ally slot"); Logger.WriteToGameLog("Dracula put " + allyDrawn.name + " into his empty Ally slot"); allyKept = allyDrawn.name; } else { Logger.WriteToDebugLog("Dracula already has an Ally, deciding which one to keep"); string allyToKeep = logic.DecideWhichAllyToKeep(g.NameOfDraculaAlly(), allyDrawn.name); string allyDiscarded = (allyToKeep == allyDrawn.name ? g.NameOfDraculaAlly() : allyDrawn.name); Logger.WriteToDebugLog("Keeping " + allyToKeep); if (allyToKeep == allyDrawn.name) { g.RemoveDraculaAlly(); g.SetDraculaAlly(g.GetEventByNameFromEventDeck(allyToKeep)); } else { g.DiscardEventCard(allyDrawn.name); } switch (allyDiscarded) { case "Immanuel Hildesheim": { Logger.WriteToDebugLog("Discarded Immanuel Hildesheim, discarding events down to 4"); EventHandSize = 4; DiscardEventsDownTo(g, EventHandSize, ui); break; } case "Dracula's Brides": { Logger.WriteToDebugLog("Discarding Dracula's Brides, discarding encounters down to 5"); EncounterHandSize = 5; DiscardEncountersDownTo(g, EncounterHandSize); break; } } allyKept = allyToKeep; } switch (allyKept) { case "Dracula's Brides": { Logger.WriteToDebugLog("Dracula's Brides is in play, encounter hand size is 7"); EncounterHandSize = 7; break; } case "Immanuel Hildesheim": { Logger.WriteToDebugLog("Immanueal Hildesheim is in play, event hand size is 6"); EventHandSize = 6; break; } } }
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); }