{"size": 1205, "ext": "js", "max_stars_repo_path": "server/game/cards/16-TTWDFL/OldBearMormont.js", "max_stars_repo_name": "LaudateCorpus1/throneteki", "max_stars_repo_stars_event_min_datetime": "2016-11-06T15:14:28.000Z", "max_stars_repo_stars_event_max_datetime": "2018-05-14T21:12:36.000Z", "max_issues_repo_path": "server/game/cards/16-TTWDFL/OldBearMormont.js", "max_issues_repo_name": "LaudateCorpus1/throneteki", "max_issues_repo_issues_event_min_datetime": "2016-11-07T01:07:55.000Z", "max_issues_repo_issues_event_max_datetime": "2018-05-16T09:12:57.000Z", "max_forks_repo_path": "server/game/cards/16-TTWDFL/OldBearMormont.js", "max_forks_repo_name": "LaudateCorpus1/throneteki", "max_forks_repo_forks_event_min_datetime": "2016-11-06T15:14:38.000Z", "max_forks_repo_forks_event_max_datetime": "2018-04-23T10:34:19.000Z"}
{"max_stars_count": 49, "max_issues_count": 831, "max_forks_count": 54, "avg_line_length": 32.5675675676, "max_line_length": 153, "alphanum_fraction": 0.5037344398}
const DrawCard = require('../../drawcard');
const GameActions = require('../../GameActions');

class OldBearMormont extends DrawCard {
    setupCardAbilities(ability) {
        this.action({
            title: 'Stand character',
            cost: ability.costs.kneelSelf(),
            target: {
                cardCondition: card => card !== this && card.kneeled && (card.isMatch({ faction: 'thenightswatch' }) || card.isMatch({ trait: 'Lord' })),
                gameAction: 'stand'
            },
            message: '{player} kneels {source} to stand {target}',
            handler: context => {
                this.game.resolveGameAction(
                    GameActions.standCard(context => ({
                        card: context.target
                    })),
                    context
                );
            }
        });

        this.reaction({
            when: {
                onCharacterKilled: event => event.card.controller === this.controller
            },
            message: '{player} uses {source} to stand {source}',
            gameAction: GameActions.standCard({ card: this })
        });
    }
}

OldBearMormont.code = '16010';

module.exports = OldBearMormont;
