const DrawCard = require('../../drawcard.js');
const { Locations, Players, CardTypes, PlayTypes} = require('../../Constants');
const AbilityDsl = require('../../abilitydsl');

class WarmWelcome extends DrawCard {
    setupCardAbilities() 

}

WarmWelcome.id = 'warm-welcome';

module.exports = WarmWelcome;

{
        this.action({
            title: 'Play a conflict card from discard',
            condition: context => context.player.opponent && context.player.showBid < context.player.opponent.showBid,
            target: {
                location: Locations.ConflictDiscardPile,
                controller: Players.Self,
                gameAction: AbilityDsl.actions.sequential([
                    AbilityDsl.actions.playCard(context => ({
                        target: context.target,
                        playType: PlayTypes.PlayFromHand
                    })),
                    AbilityDsl.actions.moveCard(context => ({
                        target: context.target.type === CardTypes.Event ? context.target : [],
                        destination: Locations.ConflictDeck, bottom: true
                    }))
                ])
            }
        });
    }