Example #1
0
 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;
             }
     }
 }
Example #2
0
 internal void DiscardEventFromHand(GameState g, string p)
 {
     g.DiscardEventCard(p);
     EventCardsInHand.Remove(GetEventCardFromHand(p));
 }