Skip to content

Commit

Permalink
recognize colorless mana symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
davidchambers committed Mar 24, 2016
1 parent 518a8a5 commit 0d787a9
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/symbols.coffee
Expand Up @@ -8,6 +8,7 @@ module.exports = _.invert
'R': 'Red'
'G': 'Green'
'2': 'Two'
'C': 'Colorless'
'S': 'Snow'
'T': 'Tap'
'Q': 'Untap'
Expand Down
1 change: 1 addition & 0 deletions test/fixtures/cards/kozilek-the-great-distortion~details
@@ -0,0 +1 @@
http://gatherer.wizards.com/Pages/Card/Details.aspx?name=Kozilek%2C%20the%20Great%20Distortion
1 change: 1 addition & 0 deletions test/fixtures/cards/kozilek-the-great-distortion~languages
@@ -0,0 +1 @@
http://gatherer.wizards.com/Pages/Card/Languages.aspx?name=Kozilek%2C%20the%20Great%20Distortion
1 change: 1 addition & 0 deletions test/fixtures/cards/kozilek-the-great-distortion~printings
@@ -0,0 +1 @@
http://gatherer.wizards.com/Pages/Card/Printings.aspx?name=Kozilek%2C%20the%20Great%20Distortion
1 change: 1 addition & 0 deletions test/fixtures/cards/sol-ring~details
@@ -0,0 +1 @@
http://gatherer.wizards.com/Pages/Card/Details.aspx?name=Sol%20Ring
1 change: 1 addition & 0 deletions test/fixtures/cards/sol-ring~languages
@@ -0,0 +1 @@
http://gatherer.wizards.com/Pages/Card/Languages.aspx?name=Sol%20Ring
1 change: 1 addition & 0 deletions test/fixtures/cards/sol-ring~printings
@@ -0,0 +1 @@
http://gatherer.wizards.com/Pages/Card/Printings.aspx?name=Sol%20Ring
12 changes: 12 additions & 0 deletions test/tutor.coffee
Expand Up @@ -361,6 +361,11 @@ describe 'tutor.card', ->
eq err, null
eq card.mana_cost, '{1}{B/P}'

it 'extracts mana cost containing colorless mana symbols',
card 'Kozilek, the Great Distortion', (err, card) ->
eq err, null
eq card.mana_cost, '{8}{C}{C}'

it 'includes mana cost only if present',
card 'Ancestral Vision', (err, card) ->
eq err, null
Expand Down Expand Up @@ -406,6 +411,13 @@ describe 'tutor.card', ->
({Q} is the untap symbol.)
'''

it 'recognizes colorless mana symbols',
card 'Sol Ring', (err, card) ->
eq err, null
eq card.text, '''
{T}: Add {C}{C} to your mana pool.
'''

it 'extracts flavor text from card identified by id',
card 2960, (err, card) ->
eq err, null
Expand Down

0 comments on commit 0d787a9

Please sign in to comment.