public override void Play(Player player) { base.Play(player); while (player.Hand.Count < 7 && player.CanDraw) { Card card = player.Draw(DeckLocation.Private); if ((card.Category & Category.Action) == Category.Action) { Choice choice = Choice.CreateYesNoChoice(String.Format("Would you like to set aside {0}?", card.Name), this, card, player, null); ChoiceResult result = player.MakeChoice(choice); if (result.Options[0] == "Yes") { player.AddCardInto(DeckLocation.Revealed, player.RetrieveCardFrom(DeckLocation.Private, card)); } else if (result.Options[0] == "No") { player.AddCardToHand(player.RetrieveCardFrom(DeckLocation.Private, card)); } } else { player.AddCardToHand(player.RetrieveCardFrom(DeckLocation.Private, card)); } } player.DiscardRevealed(); }
public override void Play(Player player) { base.Play(player); player.BeginDrawing(); while (player.CanDraw) { player.Draw(DeckLocation.Revealed); if (player._Game.ComputeCost(player.Revealed.Last()) >= new Cost(3)) break; } player.EndDrawing(); if (player.Revealed.Count > 0) { Card lastCard = player.Revealed.Last(); if (player._Game.ComputeCost(player.Revealed.Last()) >= new Cost(3)) player.AddCardToHand(player.RetrieveCardFrom(DeckLocation.Revealed, lastCard)); } player.DiscardRevealed(); }
public override void Play(Player player) { base.Play(player); player.ReturnHand(player.RevealHand()); Boolean foundUniqueCard = false; player.BeginDrawing(); while (player.CanDraw) { player.Draw(DeckLocation.Revealed); if (player.Hand[player.Revealed.Last().CardType].Count == 0) { foundUniqueCard = true; break; } } player.EndDrawing(); if (foundUniqueCard && player.Revealed.Count > 0) player.AddCardToHand(player.RetrieveCardFrom(DeckLocation.Revealed, player.Revealed.Last())); player.DiscardRevealed(); }
public override void PlayDuration(Player player) { base.PlayDuration(player); player.ReceiveBenefit(this, new CardBenefit() { Cards = 1 }); player.AddCardToHand(player.RetrieveCardFrom(DeckLocation.SetAside, this)); }
public override void Play(Player player) { base.Play(player); player.BeginDrawing(); while (player.CanDraw) { player.Draw(DeckLocation.Revealed); Card lastRevealed = player.Revealed.Last(); if ((lastRevealed.Category & Cards.Category.Action) == Cards.Category.Action || (lastRevealed.Category & Cards.Category.Treasure) == Cards.Category.Treasure) break; } player.EndDrawing(); if (player.Revealed.Count > 0) player.AddCardToHand(player.RetrieveCardFrom(DeckLocation.Revealed, player.Revealed.Last())); player.DiscardRevealed(); }
internal void player_RevealSecretChamber(Player player, ref AttackedEventArgs e) { player.AddCardInto(DeckLocation.Revealed, player.RetrieveCardFrom(DeckLocation.Hand, this.PhysicalCard)); player.AddCardToHand(player.RetrieveCardFrom(DeckLocation.Revealed, this.PhysicalCard)); player.Draw(2, DeckLocation.Hand); Choice replaceChoice = new Choice("Choose order of cards to put back on your deck", this, new CardCollection() { e.AttackCard }, player.Hand, player, true, 2, 2); ChoiceResult replaceResult = player.MakeChoice(replaceChoice); player.RetrieveCardsFrom(DeckLocation.Hand, replaceResult.Cards); player.AddCardsToDeck(replaceResult.Cards, DeckPosition.Top); e.HandledBy.Add(TypeClass.SecretChamber); // Attack isn't cancelled... it's just mitigated }