Ejemplo n.º 1
0
 public bool ChooseToCancelEventWithDevilishPower(GameState game, Event eventBeingPlayedNow, Event eventInitiallyPlayed, HunterPlayer hunterPlayingEvent)
 {
     if (game.Dracula.EventHand.Find(card => card.Event == Event.DevilishPower) != null)
     {
         int randomChances = 4;
         if (eventInitiallyPlayed == Event.DevilishPower && game.HunterAlly != null & game.HunterAlly.Event == Event.SisterAgatha)
         {
             randomChances = 0;
         }
         switch (eventInitiallyPlayed)
         {
             case Event.Evasion: randomChances = (NumberOfPossibleCurrentLocations / 3); break;
             case Event.NewspaperReports: if (game.OldestUnrevealedLocationInTrail() == game.Dracula.CurrentLocation)
                 {
                     return false;
                 }
                 else
                 {
                     randomChances = (NumberOfPossibleCurrentLocations / 3);
                 }
                 break;
             case Event.TimeRunsShort: randomChances = 3; break;
             case Event.GoodLuck: randomChances = 2; break;
             case Event.HiredScouts: randomChances = (int)((0.75 * (NumberOfPossibleCurrentLocations - 5)) * (0.75 * (NumberOfPossibleCurrentLocations - 5))); break;
         }
         if (new Random().Next(0, randomChances) == 0)
         {
             return true;
         }
     }
     return false;
 }