<commit_before>const BaseAbility = require('./baseability.js');

class DuplicateUniqueAction extends BaseAbility {
    constructor() {
        super({ cost: null });
        this.title = 'DuplicateUniqueAction';
    }

    meetsRequirements(context) {
        var {game, player, source} = context;

        return (
            game.currentPhase === 'dynasty' &&
            !source.facedown &&
            source.getType() === 'character' &&
            (player.isCardInPlayableLocation(context.source, 'dynasty') || player.isCardInPlayableLocation(context.source, 'hand')) &&
            !player.canPutIntoPlay(source) &&
            player.canInitiateAction
        );
    }
    
    executeHandler(context) {
        let duplicate = context.player.getDuplicateInPlay(context.source);
        duplicate.modifyFate(1);
        
        let location = context.source.location;
        context.game.addMessage('{0} discards a duplicate to add 1 fate to {1}', context.player, context.source.name);
        context.player.moveCard(context.source, context.source.isDynasty ? 'dynasty discard pile' : 'conflict discard pile');
    }

    isCardAbility() {
        return false;
    }
}

module.exports = DuplicateUniqueAction;

<commit_msg>lint fix<commit_after>const BaseAbility = require('./baseability.js');

class DuplicateUniqueAction extends BaseAbility {
    constructor() {
        super({ cost: null });
        this.title = 'DuplicateUniqueAction';
    }

    meetsRequirements(context) {
        var {game, player, source} = context;

        return (
            game.currentPhase === 'dynasty' &&
            !source.facedown &&
            source.getType() === 'character' &&
            (player.isCardInPlayableLocation(context.source, 'dynasty') || player.isCardInPlayableLocation(context.source, 'hand')) &&
            !player.canPutIntoPlay(source) &&
            player.canInitiateAction
        );
    }
    
    executeHandler(context) {
        let duplicate = context.player.getDuplicateInPlay(context.source);
        duplicate.modifyFate(1);
        
        context.game.addMessage('{0} discards a duplicate to add 1 fate to {1}', context.player, context.source.name);
        context.player.moveCard(context.source, context.source.isDynasty ? 'dynasty discard pile' : 'conflict discard pile');
    }

    isCardAbility() {
        return false;
    }
}

module.exports = DuplicateUniqueAction;


{'fraction_non_alphanumeric': 0.121537825547747, 'fraction_numerical': 0.0033071517155849523, 'mean_word_length': 2.6778115501519757, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7374384', 'n_tokens_mistral': 679, 'n_tokens_neox': 673, 'n_words': 126}