internal EventDetail WillPlayDevilishPower(GameState g, UserInterface ui) { EventDetail eventToReturn = logic.DecideWhetherToPlayDevilishPower(g, this); if (eventToReturn != null) { int hunterIndex = ui.AskWhichHunterIsUsingGoodLuckToCancelEvent(); if (hunterIndex > 0) { g.DiscardEventFromHunterAtIndex("Good Luck", hunterIndex, ui); EventCardsInHand.Remove(EventCardsInHand.Find(c => c.name == "Devilish Power")); eventToReturn = null; } } return eventToReturn; }
public void PlayImmediately(GameState g, EventDetail eventCardDrawn, UserInterface ui) { switch (eventCardDrawn.name) { case "Evasion": int hunterPlayingGoodluckC = ui.AskWhichHunterIsUsingGoodLuckToCancelEvent(); if (hunterPlayingGoodluckC > 0) { g.DiscardEventFromHunterAtIndex("Good Luck", hunterPlayingGoodluckC, ui); } else { PlayEvasion(g, ui); break; } break; case "Night Visit": int hunterPlayingGoodluck = ui.AskWhichHunterIsUsingGoodLuckToCancelEvent(); if (hunterPlayingGoodluck > 0) { g.DiscardEventFromHunterAtIndex("Good Luck", hunterPlayingGoodluck, ui); } else { PlayNightVisit(g, ui); break; } break; case "Vampiric Influence": int hunterPlayingGoodluckB = ui.AskWhichHunterIsUsingGoodLuckToCancelEvent(); if (hunterPlayingGoodluckB > 0) { g.DiscardEventFromHunterAtIndex("Good Luck", hunterPlayingGoodluckB, ui); } else { PlayVampiricInfluence(g, ui); break; } break; } }
internal void PlayDevilishPowerToRemoveHeavenlyHostOrHunterAlly(GameState g, UserInterface ui) { List<LocationDetail> map = g.GetMap(); if (map.FindIndex(l => l.HasHost == true) > -1) { if (g.HuntersHaveAlly()) { } else { LocationDetail locationToRemoveHost = logic.DecideWhichLocationToRemoveHeavenlyHostFrom(g); Logger.WriteToDebugLog("Dracula played Devilish Power to discard a Heavenly Host from " + locationToRemoveHost.Name); ui.TellUser("Dracula played Devilish Power to discard a Heavenly Host from " + locationToRemoveHost.Name); int hunterIndex = ui.AskWhichHunterIsUsingGoodLuckToCancelEvent(); if (hunterIndex > 0) { g.DiscardEventFromHunterAtIndex("Good Luck", hunterIndex, ui); } else { locationToRemoveHost.HasHost = false; } } } else { ui.TellUser("Dracula played Devilish Power to discard the Hunters' Ally from play"); Logger.WriteToDebugLog("Dracula played Devilish Power to discard the Hunters' Ally from play"); int hunterIndex = ui.AskWhichHunterIsUsingGoodLuckToCancelEvent(); if (hunterIndex > 0) { g.DiscardEventFromHunterAtIndex("Good Luck", hunterIndex, ui); } else { g.RemoveHunterAlly(); } } }