Example #1
0
 internal void PlayBloodTransfusion(UserInterface ui)
 {
     EventDetail draculaEventCard = Dracula.WillPlayDevilishPower(this, ui);
     bool eventIsCancelled = false;
     if (draculaEventCard != null)
     {
         switch (draculaEventCard.name)
         {
             case "DevilishPower":
                 ui.TellUser("Dracula played Devilish power to cancel this event");
                 DiscardEventFromDracula("Devilish Power");
                 int hunterPlayingGoodluck = ui.AskWhichHunterIsUsingGoodLuckToCancelEvent();
                 if (hunterPlayingGoodluck > -1)
                 {
                     DiscardEventFromHunterAtIndex("Good Luck", hunterPlayingGoodluck, ui);
                 }
                 else
                 {
                     eventIsCancelled = true;
                 }
                 break;
         }
     }
     if (!eventIsCancelled)
     {
         int hunterIndexA = ui.GetIndexOfHunterGivingBloodTransfusion();
         int hunterIndexB = ui.GetIndexOfHunterReceivingBloodTransfusion();
         Hunters[hunterIndexA].Health--;
         Hunters[hunterIndexB].NumberOfBites--;
         if (Hunters[hunterIndexB].NumberOfBites < 1)
         {
             Hunters[hunterIndexB].ItemShownToDraculaForBeingBitten = null;
             Hunters[hunterIndexB].EventShownToDraculaForBeingBitten = null;
         }
         ui.TellUser(Hunters[hunterIndexA].Name + " donated blood (1 health) to " + Hunters[hunterIndexB].Name + " who was cured of a Bite");
         Logger.WriteToDebugLog(Hunters[hunterIndexA].Name + " donated blood (1 health) to " + Hunters[hunterIndexB].Name + " who was cured of a Bite");
         Logger.WriteToGameLog(Hunters[hunterIndexA].Name + " donated blood (1 health) to " + Hunters[hunterIndexB].Name + " who was cured of a Bite");
     }
 }