示例#1
0
 internal void BlessHunterAtHunterIndex(int hunterIndex, UserInterface ui)
 {
     switch (ui.GetHolyWaterResult())
     {
         case 1:
             Hunters[hunterIndex].Health -= 2;
             HandlePossibleHunterDeath(ui);
             break;
         case 2: break;
         case 3:
             Hunters[hunterIndex].NumberOfBites--;
             if (Hunters[hunterIndex].NumberOfBites < 1)
             {
                 Hunters[hunterIndex].ItemShownToDraculaForBeingBitten = null;
                 Hunters[hunterIndex].EventShownToDraculaForBeingBitten = null;
             }
             break;
     }
 }
示例#2
0
 private void PlayHolyWater(int hunterIndex, UserInterface ui)
 {
     List<Hunter> huntersWithBitesAtThisLocation = new List<Hunter>();
     for (int i = 0; i < 3; i++)
     {
         if (Hunters[i].CurrentLocation == Hunters[hunterIndex].CurrentLocation && Hunters[i].NumberOfBites > 0)
         {
             huntersWithBitesAtThisLocation.Add(huntersWithBitesAtThisLocation[i]);
         }
     }
     Hunter hunterToHeal = null;
     if (huntersWithBitesAtThisLocation.Count > 1)
     {
         do
         {
             for (int i = 0; i < 3; i++)
             {
                 if (huntersWithBitesAtThisLocation.Contains(Hunters[i]))
                 {
                     if (ui.GetHunterHeal(Hunters[hunterIndex].Name))
                     {
                         hunterToHeal = Hunters[i];
                     }
                 }
             }
         } while (hunterToHeal == null);
     }
     else
     {
         hunterToHeal = huntersWithBitesAtThisLocation.First();
     }
     switch (ui.GetHolyWaterResult())
     {
         case 1:
             hunterToHeal.Health -= 2;
             HandlePossibleHunterDeath(ui); break;
         case 2: break;
         case 3:
             hunterToHeal.NumberOfBites--;
             if (hunterToHeal.NumberOfBites < 1)
             {
                 hunterToHeal.ItemShownToDraculaForBeingBitten = null;
                 hunterToHeal.EventShownToDraculaForBeingBitten = null;
             }
             break;
     }
     DiscardItemFromHunterAtIndex("Holy Water", hunterIndex, ui);
 }