Esempio n. 1
0
 public bool ResolveNewVampire(List<Hunter> huntersEncountered, out bool discard, UserInterface ui)
 {
     if (TimeIndex < 3)
     {
         ui.TellUser(huntersEncountered[0].Name + " encountered a New Vampire and disposed of it during the day");
         discard = true;
         return true;
     }
     else
     {
         EventDetail draculaEventCard = Dracula.PlaySeductionCard(this);
         DiscardEventFromDracula("Seduction");
         ui.TellUser("Dracula played Seduction");
         int dieRoll;
         if (draculaEventCard != null)
         {
             int hunterPlayingGoodluck = ui.AskWhichHunterIsUsingGoodLuckToCancelEvent();
             if (hunterPlayingGoodluck > -1)
             {
                 DiscardEventFromHunterAtIndex("Good Luck", hunterPlayingGoodluck, ui);
                 dieRoll = ui.GetDieRoll();
             }
             else
             {
                 dieRoll = 4;
             }
         }
         else
         {
             dieRoll = ui.GetDieRoll();
         }
         if (dieRoll < 4)
         {
             ui.TellUser("The Vampire attempts to bite you");
             for (int i = 0; i < huntersEncountered.Count(); i++)
             {
                 int answer;
                 if (draculaEventCard != null)
                 {
                     answer = 0;
                 }
                 else
                 {
                     answer = ui.GetHunterHolyItems(huntersEncountered[i].Name);
                 }
                 if (answer > 0)
                 {
                     Logger.WriteToDebugLog(huntersEncountered[i].Name + " negated the encounter with " + (answer == 1 ? "a crucifix" : "a heavenly host"));
                     Logger.WriteToGameLog(huntersEncountered[i].Name + " negated the encounter with " + (answer == 1 ? "a crucifix" : "a heavenly host"));
                     ui.TellUser(huntersEncountered[i].Name + " negated the encounter with " + (answer == 1 ? "a crucifix" : "a heavenly host"));
                     discard = true;
                     return true;
                 }
             }
             foreach (Hunter h in huntersEncountered)
             {
                 Logger.WriteToDebugLog(h.Name + " is bitten");
                 Logger.WriteToGameLog(h.Name + " is bitten");
                 ui.TellUser(h.Name + " is bitten");
                 discard = true;
                 return (!HandlePossibleHunterDeath(ui));
             }
             discard = true;
             return true;
         }
         else
         {
             ui.TellUser("The Vampire attempts to escape");
             for (int i = 0; i < huntersEncountered.Count(); i++)
             {
                 int answer = ui.GetHunterSharpItems(huntersEncountered[i].Name);
                 if (answer > 0)
                 {
                     Logger.WriteToDebugLog(huntersEncountered[i].Name + " prevented the Vampire escaping with " + (answer == 1 ? "a Knife" : "a Stake"));
                     Logger.WriteToGameLog(huntersEncountered[i].Name + " prevented the Vampire escaping with " + (answer == 1 ? "a Knife" : "a Stake"));
                     ui.TellUser(huntersEncountered[i].Name + " prevented the Vampire escaping with " + (answer == 1 ? "a Knife" : "a Stake"));
                     ui.TellUser("Don't forget to discard the item");
                     discard = true;
                     return true;
                 }
             }
             ui.TellUser("The Vampire escaped");
             discard = false;
             return true;
         }
     }
 }