Exemplo n.º 1
0
 private bool ResolveDesecratedSoil(List<Hunter> huntersEncountered, UserInterface ui)
 {
     Logger.WriteToDebugLog("Hunter" + (huntersEncountered.Count() > 0 ? "s" : "") + " encountered Desecrated Soil");
     Logger.WriteToGameLog("Hunter" + (huntersEncountered.Count() > 0 ? "s" : "") + " encountered Desecrated Soil");
     ui.TellUser(huntersEncountered.First().Name + " ");
     for (int i = 1; i < huntersEncountered.Count(); i++)
     {
         ui.TellUser("and " + huntersEncountered[i].Name + " ");
     }
     ui.TellUser("encountered Desecrated Soil");
     EventDetail cardDrawn;
     string line;
     do
     {
         line = ui.GetEventCardDrawnByDesecratedSoil();
         cardDrawn = GetEventByNameFromEventDeck(line);
     } while (cardDrawn.name == "Unknown event" && !"dracula".StartsWith(line.ToLower()));
     if (!"dracula".StartsWith(line.ToLower()))
     {
         ui.TellUser(cardDrawn.name + " is discarded");
         EventDeck.Remove(cardDrawn);
         EventDiscard.Add(cardDrawn);
     }
     else
     {
         switch (cardDrawn.type)
         {
             case EventType.Ally: Dracula.PlayAlly(this, cardDrawn, ui); break;
             case EventType.Keep: Dracula.EventCardsInHand.Add(cardDrawn); break;
             case EventType.PlayImmediately: Dracula.PlayImmediately(this, cardDrawn, ui); break;
         }
     }
     Dracula.DiscardEventsDownTo(this, Dracula.EventHandSize, ui);
     return true;
 }
Exemplo n.º 2
0
 private void MatureDesecratedSoil(UserInterface ui)
 {
     Logger.WriteToDebugLog("Dracula matured Desecrated Soil");
     Logger.WriteToGameLog("Dracula matured Desecrated Soil");
     ui.TellUser("Dracula matured Desecrated Soil");
     for (int i = 0; i < 2; i++)
     {
         EventDetail cardDrawn;
         string line;
         do
         {
             line = ui.GetEventCardDrawnByDesecratedSoil();
             cardDrawn = GetEventByNameFromEventDeck(line);
         } while (cardDrawn.name == "Unknown event" && !"dracula".StartsWith(line.ToLower()));
         if (!"dracula".StartsWith(line.ToLower()))
         {
             ui.TellUser(cardDrawn.name + " is discarded");
             EventDeck.Remove(cardDrawn);
             EventDiscard.Add(cardDrawn);
         }
         else
         {
             switch (cardDrawn.type)
             {
                 case EventType.Ally: Dracula.PlayAlly(this, cardDrawn, ui); break;
                 case EventType.Keep:
                     Dracula.EventCardsInHand.Add(cardDrawn);
                     EventDeck.Remove(cardDrawn);
                     break;
                 case EventType.PlayImmediately:
                     Dracula.PlayImmediately(this, cardDrawn, ui);
                     EventDeck.Remove(cardDrawn);
                     break;
             }
         }
     }
     Dracula.DiscardEventsDownTo(this, Dracula.EventHandSize, ui);
     Dracula.TrimTrail(this, 3);
 }