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

class CentipedeTattoo extends DrawCard {
    setupCardAbilities(ability) {
        this.whileAttached({
            effect: ability.effects.addKeyword('tattooed')
        });

        this.whileAttached({
            when: {
                afterConflict: event => event.conflict.loser === this.controller && event.conflict.isParticipating(this)
            },
            effect: [
                ability.effects.doesNotBowAsAttacker,
                ability.effects.doesNotBowAsDefender
            ]
        });
    }

    canAttach(card) {
        if(this.hasTrait('monk')) {
            return super.canAttach(card);
        }<commit_msg>Fixed condition on which Centipede Tattoo fires<commit_after>const DrawCard = require('../../drawcard.js');

class CentipedeTattoo extends DrawCard {
    setupCardAbilities(ability) {
        this.whileAttached({
            effect: ability.effects.addKeyword('tattooed')
        });
        this.whileAttached({
            // when: {
            //     afterConflict: event => event.conflict.isParticipating(this.parent) && event.conflict.loser === this.parent.controller
            // },
            condition: () => (
                this.game.currentConflict &&
                this.game.currentConflict.loser &&
                this.game.currentConflict.isParticipating(this.parent) &&
                this.game.currentConflict.loser === this.parent.controller
            ),
            effect: [
                ability.effects.doesNotBowAsAttacker(),
                ability.effects.doesNotBowAsDefender()
            ]
        });
    }

    canAttach(card) {
        if(card.hasTrait('monk')) {
            return super.canAttach(card);
        }
{'fraction_non_alphanumeric': 0.11954674220963173, 'fraction_numerical': 0.0, 'mean_word_length': 1.8346709470304976, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '7311586', 'n_tokens_mistral': 501, 'n_tokens_neox': 467, 'n_words': 62}