protected override ChoiceResult Decide_Thief(Choice choice) { if (choice.Text.StartsWith("Choose a Treasure card of")) { return new ChoiceResult(new CardCollection(this.FindBestCards(choice.Cards, 1))); } // Always gain all Treasure cards else if (choice.Text.StartsWith("Choose which cards you'd like to gain")) { // Except Coppers CardCollection ccThief = new CardCollection(choice.Cards.Where(c => c.CardType != Cards.Universal.TypeClass.Copper)); int coppers = this.RealThis.CountAll(this.RealThis, c => c.CardType == Cards.Universal.TypeClass.Copper, true, false); int allTreasures = this.RealThis.CountAll(this.RealThis, c => (c.Category & Category.Treasure) == Category.Treasure, true, false); double percentageCoppers = ((double)coppers) / allTreasures; // Don't gain Loan if we don't have many Coppers if (percentageCoppers < 0.1 || (coppers < 3 && percentageCoppers < 0.4)) ccThief.RemoveAll(c => c.CardType == Cards.Prosperity.TypeClass.Loan); return new ChoiceResult(ccThief); } return base.Decide_Thief(choice); }