示例#1
0
        internal void PlayHiredScouts(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)
            {
                string line = "";
                LocationDetail locationToReveal;
                do
                {
                    line = ui.GetFirstLocationNameForHiredScouts();
                    locationToReveal = GetLocationFromName(line);
                    ui.TellUser(locationToReveal.Name);
                } while (locationToReveal.Name == "Unknown location" || locationToReveal.Name == "Multiple locations");
                if (LocationIsInTrail(locationToReveal))
                {
                    bool revealingThis = true;
                    draculaEventCard = Dracula.WillPlaySensationalistPress(this, 0);
                    if (draculaEventCard != null)
                    {
                        switch (draculaEventCard.name)
                        {
                            case "Sensationalist Press":
                                ui.TellUser("Dracula played Sensationalist Press to cancel revealing" + locationToReveal.Name);
                                DiscardEventFromDracula("Sensationalist Press");
                                int hunterPlayingGoodluck = ui.AskWhichHunterIsUsingGoodLuckToCancelEvent();
                                if (hunterPlayingGoodluck > -1)
                                {
                                    DiscardEventFromHunterAtIndex("Good Luck", hunterPlayingGoodluck, ui);
                                }
                                else
                                {
                                    revealingThis = false;
                                }
                                break;
                        }
                    }
                    if (revealingThis)
                    {
                        locationToReveal.IsRevealed = true;
                        ui.TellUser("Revealing " + locationToReveal.Name);
                        for (int i = 0; i < locationToReveal.Encounters.Count(); i++)
                        {
                            locationToReveal.Encounters[i].isRevealed = true;
                            ui.TellUser(" and " + locationToReveal.Encounters[i].name);
                        }
                        ui.TellUser("");
                        ui.drawGameState(this);
                    }
                }
                else
                {
                    ui.TellUser(locationToReveal.Name + " is not in Dracula's trail");
                }
                do
                {
                    line = ui.GetSecondLocationNameForHiredScouts();
                    locationToReveal = GetLocationFromName(line);
                    ui.TellUser(locationToReveal.Name);
                } while (locationToReveal.Name == "Unknown location" || locationToReveal.Name == "Multiple locations");
                if (LocationIsInTrail(locationToReveal))
                {
                    locationToReveal.IsRevealed = true;
                    ui.TellUser("Revealing " + locationToReveal.Name);
                    for (int i = 0; i < locationToReveal.Encounters.Count(); i++)
                    {
                        locationToReveal.Encounters[i].isRevealed = true;
                        ui.TellUser(" and " + locationToReveal.Encounters[i].name);
                    }
                    ui.TellUser("");
                }
                else
                {
                    ui.TellUser(locationToReveal.Name + " is not in Dracula's trail");
                }
            }
        }