<commit_before>const _ = require('underscore');

const DrawCard = require('../../../drawcard.js');
 
class JoryCassel extends DrawCard {
    constructor(owner, cardData) {
        super(owner, cardData);

        this.registerEvents(['onCharacterKilled']);
    }

    onCharacterKilled(event, player, card, allowSave) {
        if(!allowSave) {
            return;
        }

        this.game.promptWithMenu(player, this, {
            activePrompt: {
                menuTitle: 'Use ' + this.name + ' to save ' + card.name + '?',
                buttons: [
                    { text: 'Yes', method: 'save' },
                    { text: 'No', method: 'cancel' }
                ]
            },<commit_msg>Only trigger jory cassel when he's controlled by us<commit_after>const _ = require('underscore');

const DrawCard = require('../../../drawcard.js');
 
class JoryCassel extends DrawCard {
    constructor(owner, cardData) {
        super(owner, cardData);

        this.registerEvents(['onCharacterKilled']);
    }

    onCharacterKilled(event, player, card, allowSave) {
        if(!allowSave || player !== this.controller) {
            return;
        }

        this.game.promptWithMenu(player, this, {
            activePrompt: {
                menuTitle: 'Use ' + this.name + ' to save ' + card.name + '?',
                buttons: [
                    { text: 'Yes', method: 'save' },
                    { text: 'No', method: 'cancel' }
                ]
            },
{'fraction_non_alphanumeric': 0.14199192462987886, 'fraction_numerical': 0.0, 'mean_word_length': 1.7846441947565543, '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': '4323670', 'n_tokens_mistral': 432, 'n_tokens_neox': 405, 'n_words': 86}