Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
BoB - A New Name (#3304) (#3337)
Browse files Browse the repository at this point in the history
* BoB - A New Name (#3304)

* Fix lint
  • Loading branch information
ngroover authored and James Oddy committed Jul 10, 2019
1 parent 8bdd442 commit 15fe405
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
17 changes: 17 additions & 0 deletions server/game/cards/09.2-BoB/ANewName.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const DrawCard = require('../../drawcard.js');
const AbilityDsl = require('../../abilitydsl');

class ANewName extends DrawCard {
setupCardAbilities() {
this.whileAttached({
effect: [
AbilityDsl.effects.addTrait('courtier'),
AbilityDsl.effects.addTrait('bushi')
]
});
}
}

ANewName.id = 'a-new-name';

module.exports = ANewName;
35 changes: 35 additions & 0 deletions test/server/cards/09.2-BoB/ANewName.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
describe('A New Name', function() {
integration(function() {
describe('A New Name', function () {
beforeEach(function () {
this.setupTest({
phase: 'conflict',
player1: {
inPlay: ['asahina-artisan', 'doji-challenger'],
hand: ['a-new-name']
},
player2: {
inPlay: ['adept-of-the-waves', 'miya-mystic']
}
});

this.player1.playAttachment('a-new-name', 'asahina-artisan');
this.artisan = this.player1.findCardByName('asahina-artisan');
this.noMoreActions();
});

it('should have bushi trait', function() {
expect(this.artisan.getTraits()).toContain('bushi');
});

it('should have courtier trait', function() {
expect(this.artisan.getTraits()).toContain('courtier');
});

it('should have +1/+1', function() {
expect(this.artisan.getMilitarySkill()).toBe(1);
expect(this.artisan.getPoliticalSkill()).toBe(1);
});
});
});
});

0 comments on commit 15fe405

Please sign in to comment.