<commit_before>const DrawCard = require('../../drawcard');

class TheIronThrone extends DrawCard {
    setupCardAbilities(ability) {
        this.reaction({
            when: {
                onPhaseStarted: () => true
            },
            cost: ability.costs.kneelSelf(),
            handler: () => {
                this.game.promptWithMenu(this.controller, this, {
                    activePrompt: {
                        menuTitle: 'Name a card',
                        controls: [
                            { type: 'card-name', command: 'menuButton', method: 'selectCardName' }
                        ]
                    }
                });
            }
        });
    }

    selectCardName(player, cardName) {
        this.game.addMessage('{0} kneels {1} to name {2}', player, this, cardName);
        this.untilEndOfPhase(ability => ({
            effect: [
                ability.effects.cannotMarshal(card => card.name.toLowerCase() === cardName.toLowerCase()),
                ability.effects.cannotPlay(card => card.name.toLowerCase() === cardName.toLowerCase()),
                ability.effects.cannotPutIntoPlay(card => card.name.toLowerCase() === cardName.toLowerCase())
            ]
        }));
        return true;
    }
}

TheIronThrone.code = '13117';

module.exports = TheIronThrone;
<commit_msg>Apply The Iron Throne effect to all players (#2768)<commit_after>const DrawCard = require('../../drawcard');

class TheIronThrone extends DrawCard {
    setupCardAbilities(ability) {
        this.reaction({
            when: {
                onPhaseStarted: () => true
            },
            cost: ability.costs.kneelSelf(),
            handler: () => {
                this.game.promptWithMenu(this.controller, this, {
                    activePrompt: {
                        menuTitle: 'Name a card',
                        controls: [
                            { type: 'card-name', command: 'menuButton', method: 'selectCardName' }
                        ]
                    }
                });
            }
        });
    }

    selectCardName(player, cardName) {
        this.game.addMessage('{0} kneels {1} to name {2}', player, this, cardName);
        this.untilEndOfPhase(ability => ({
            targetController: 'any',
            effect: [
                ability.effects.cannotMarshal(card => card.name.toLowerCase() === cardName.toLowerCase()),
                ability.effects.cannotPlay(card => card.name.toLowerCase() === cardName.toLowerCase()),
                ability.effects.cannotPutIntoPlay(card => card.name.toLowerCase() === cardName.toLowerCase())
            ]
        }));
        return true;
    }
}

TheIronThrone.code = '13117';

module.exports = TheIronThrone;

{'fraction_non_alphanumeric': 0.13049800072700837, 'fraction_numerical': 0.007270083605961469, 'mean_word_length': 1.6134852801519468, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3097096', 'n_tokens_mistral': 755, 'n_tokens_neox': 719, 'n_words': 124}