diff --git a/docs/cardpool-status.md b/docs/cardpool-status.md index 263b70bb..b41e7524 100644 --- a/docs/cardpool-status.md +++ b/docs/cardpool-status.md @@ -657,7 +657,7 @@ |:heavy_check_mark: | 17018| Calling The Cavalry | | 17019| Rite Of Profane Abstersion |:heavy_multiplication_x:| 17020| Showboating -| | 17021| All Or Nothing +|:heavy_check_mark: | 17021| All Or Nothing ## `10-BMR` Blood Moon Rising diff --git a/server/game/cards/09.3-TSs/AllOrNothing.js b/server/game/cards/09.3-TSs/AllOrNothing.js new file mode 100644 index 00000000..2690ea3c --- /dev/null +++ b/server/game/cards/09.3-TSs/AllOrNothing.js @@ -0,0 +1,44 @@ +const ActionCard = require('../../actioncard.js'); + +class AllOrNothing extends ActionCard { + setupCardAbilities() { + this.job({ + title: 'All Or Nothing', + playType: 'noon', + target: { + activePromptTitle: 'Select location', + cardCondition: { location: 'play area' }, + cardType: ['location'] + }, + message: context => this.game.addMessage('{0} plays {1} marking {2}.', + this.owner, this, context.target), + onSuccess: (job, context) => { + let messg = "{0} uses {1}"; + const NofAtts = job.mark.attachments.length; + if(NofAtts > 0) { + context.player.discardCards(job.mark.attachments, () => { + messg += " to discard " + NofAtts + " attachments"; + }, { isCardEffect: true }, context); + } + if(['deed','townsquare'].includes(job.mark.getType())) { + const chasedDudes = job.mark.getDudes(dude => dude.isWanted() || dude.hasKeyword('abomination')); + const NofBadDudes = chasedDudes.length; + context.player.discardCards(chasedDudes, () => { + messg += (NofAtts?" and ":" to discard ") + NofBadDudes + " dudes from {2}"; + }, { isCardEffect: true }, context); + } else if(NofAtts > 0) { + messg += " from {2}"; + } else { + messg += " on {2} to no notable effect"; + } + this.game.queueSimpleStep(() => { + this.game.addMessage(messg, this.owner, this, job.mark); + }); + } + }); + } +} + +AllOrNothing.code = '17021'; + +module.exports = AllOrNothing;