<commit_before><commit_msg>Implement Robb Stark [ATSK] (#371)<commit_after>const DrawCard = require('../../../drawcard.js');

class RobbStark extends DrawCard {
    setupCardAbilities(ability) {
        this.persistentEffect({
            condition: () => (
                this.game.currentChallenge &&
                this.game.currentChallenge.challengeType === 'military'
            ),
            match: this,
            effect: ability.effects.dynamicStrength(() => this.numberOfLoyalChars())
        });

        this.action({
            title: 'Stand and remove a character from the challenge',
            method: 'initiate',
            limit: ability.limit.perChallenge(1)
        });
    }

    initiate(player) {
        if(!this.game.currentChallenge || !this.game.currentChallenge.challengeType === 'military' || !this.game.currentChallenge.isParticipating(this)) {
            return false;
        }

        this.game.promptForSelect(player, {
            cardCondition: card => (
                card.location === 'play area' && 
                card.getType() === 'character' && 
                !card.hasTrait('King') &&
                this.game.currentChallenge.isParticipating(card)),
            activePromptTitle: 'Select character to stand and remove',
            waitingPromptTitle: 'Waiting for opponent to use ' + this.name,
            onSelect: (player, card) => this.onCardSelected(player, card)
        });
    }

    onCardSelected(player, card) {
        card.controller.standCard(card);
        this.game.currentChallenge.removeFromChallenge(card);

        this.game.addMessage('{0} uses {1} to stand {2} and remove them from the challenge', player, this, card);

        return true;
    }

    numberOfLoyalChars () {
        var cards = this.controller.cardsInPlay.filter(card => {
            return card.isLoyal() && card.getType() === 'character';
        });

        return cards.length;
    }
}

RobbStark.code = '04002';

module.exports = RobbStark;
{'fraction_non_alphanumeric': 0.12993503248375812, 'fraction_numerical': 0.005997001499250375, 'mean_word_length': 2.2032, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, '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': '5821427', 'n_tokens_mistral': 585, 'n_tokens_neox': 542, 'n_words': 107}