const ProvinceCard = require('../../provincecard.js');
const AbilityDsl = require('../../abilitydsl');

class EffectiveDeception extends ProvinceCard {
    setupCardAbilities() {
        this.wouldInterrupt({
            title: 'Cancel triggered ability',
            when: {
                onInitiateAbilityEffects: (event, context) => context.source.isConflictProvince()
            },
            effect: 'cancel the effects of {1}\'s ability',
            effectArgs: context => context.event.card,
            gameAction: AbilityDsl.actions.cancel()
        });
    }
}

EffectiveDeception.id = 'effective-deception';

module.exports = EffectiveDeception;

@@ -330,16 +330,36 @@
 text) =%3E
+%0A                   
  context
@@ -386,16 +386,82 @@
 ovince()
+ &&%0A                    event.context.ability.isTriggeredAbility()
 %0A       

Fix Effective Deception bug (#3555)