<commit_before>const AgendaCard = require('../../agendacard.js');

class TradingWithQohor extends AgendaCard {
    setupCardAbilities(ability) {
        this.persistentEffect({
            condition: () => !this.controller.anyCardsInPlay(card => card.getType() === 'attachment'),
            match: card => card === card.controller.activePlot,
            targetController: 'opponent',
            effect: ability.effects.modifyGold(1)
        });

        this.reaction({
            when: {
                onClaimApplied: event => event.player === this.controller
            },
            cost: ability.costs.sacrifice(card => card.getType() === 'attachment'),
            handler: context => {
                this.game.promptForDeckSearch(context.player, {
                    activePromptTitle: 'Select a card',
                    cardType: 'attachment',
                    onSelect: (player, card) => this.cardSelected(player, card, context.costs.sacrifice),
                    onCancel: player => this.doneSelecting(player, context.costs.sacrifice),
                    source: this
                });
            }
        });
    }

    cardSelected(player, card, costCard) {
        player.putIntoPlay(card);
        this.game.addMessage('{0} uses {1} and sacrifices {2} to search their deck and put {3} into play',
            player, this, costCard, card);
    }

    doneSelecting(player, costCard) {<commit_msg>Limit Qohor to search different cards by name (#2101)<commit_after>const AgendaCard = require('../../agendacard.js');

class TradingWithQohor extends AgendaCard {
    setupCardAbilities(ability) {
        this.persistentEffect({
            condition: () => !this.controller.anyCardsInPlay(card => card.getType() === 'attachment'),
            match: card => card === card.controller.activePlot,
            targetController: 'opponent',
            effect: ability.effects.modifyGold(1)
        });

        this.reaction({
            when: {
                onClaimApplied: event => event.player === this.controller
            },
            cost: ability.costs.sacrifice(card => card.getType() === 'attachment'),
            handler: context => {
                this.game.promptForDeckSearch(context.player, {
                    activePromptTitle: 'Select a card',
                    cardCondition: card => card.getType() === 'attachment' && card.getPrintedCost() <= context.costs.sacrifice.getPrintedCost() &&
                                           card.name !== context.costs.sacrifice.name,
                    onSelect: (player, card) => this.cardSelected(player, card, context.costs.sacrifice),
                    onCancel: player => this.doneSelecting(player, context.costs.sacrifice),
                    source: this
                });
            }
        });
    }

    cardSelected(player, card, costCard) {
        player.putIntoPlay(card);
        this.game.addMessage('{0} uses {1} and sacrifices {2} to search their deck and put {3} into play',
            player, this, costCard, card);
    }

    doneSelecting(player, costCard) {
{'fraction_non_alphanumeric': 0.12669683257918551, 'fraction_numerical': 0.004524886877828055, 'mean_word_length': 2.0136319376825704, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 20, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '970781', 'n_tokens_mistral': 840, 'n_tokens_neox': 796, 'n_words': 168}