Skip to content

Commit 2112716

Browse files
authored
Merge pull request #232 from lunakv/fix-broken-test
Update broken tests
2 parents 50ab362 + 37a9d3f commit 2112716

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

card_test.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -202,21 +202,21 @@ func TestPrintCardForSlack(t *testing.T) {
202202
cardname string
203203
output string
204204
}{
205-
{"Ponder", "*<http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=451051|Ponder>* :mana-U: · Sorcery · Look at the top three cards of your library, then put them back in any order. You may shuffle your library. \\ Draw a card."},
206-
{"Shahrazad", "*<http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=980|Shahrazad>* :mana-W::mana-W: · Sorcery · Players play a Magic subgame, using their libraries as their decks. Each player who doesn't win the subgame loses half their life, rounded up. · [RL] ·"},
207-
{"Jace, the Mind Sculptor", "*<http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=442051|Jace, the Mind Sculptor>* :mana-2::mana-U::mana-U: · Legendary Planeswalker — Jace · [3] +2: Look at the top card of target player's library. You may put that card on the bottom of that player's library. \\ 0: Draw three cards, then put two cards from your hand on top of your library in any order. \\ −1: Return target creature to its owner's hand. \\ −12: Exile all cards from target player's library, then that player shuffles their hand into their library."},
208-
{"Expansion", "*<http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=452974|Expansion>* :mana-UR::mana-UR: · Instant · Copy target instant or sorcery spell with converted mana cost 4 or less. You may choose new targets for the copy.\n*<http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=452974|Explosion>* :mana-X::mana-U::mana-U::mana-R::mana-R: · Instant · Explosion deals X damage to any target. Target player draws X cards."},
209-
{"Bushi Tenderfoot", "*<http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=78600|Bushi Tenderfoot>* :mana-W: · Creature — Human Soldier · 1/1 · When a creature dealt damage by Bushi Tenderfoot this turn dies, flip Bushi Tenderfoot.\n*<http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=78600|Kenzo the Hardhearted>* · Legendary Creature — Human Samurai · 3/4 · Double strike; bushido 2 _(Whenever this creature blocks or becomes blocked, it gets +2/+2 until end of turn.)_"},
210-
{"Fleetwheel Cruiser", "*<http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=417787|Fleetwheel Cruiser>* :mana-4: · Artifact — Vehicle · 5/3 · Trample, haste \\ When Fleetwheel Cruiser enters the battlefield, it becomes an artifact creature until end of turn. \\ Crew 2 _(Tap any number of creatures you control with total power 2 or more: This Vehicle becomes an artifact creature until end of turn.)_"},
211-
{"Nicol Bolas, the Arisen", "*<http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=447354|Nicol Bolas, the Ravager>* :mana-1::mana-U::mana-B::mana-R: · Legendary Creature — Elder Dragon · 4/4 · Flying \\ When Nicol Bolas, the Ravager enters the battlefield, each opponent discards a card. \\ :mana-4::mana-U::mana-B::mana-R:: Exile Nicol Bolas, the Ravager, then return him to the battlefield transformed under his owner's control. Activate this ability only any time you could cast a sorcery.\n*<http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=447354|Nicol Bolas, the Arisen>* · Legendary Planeswalker — Bolas · [Blue/Black/Red] · [7] +2: Draw two cards. \\ −3: Nicol Bolas, the Arisen deals 10 damage to target creature or planeswalker. \\ −4: Put target creature or planeswalker card from a graveyard onto the battlefield under your control. \\ −12: Exile all but the bottom card of target player's library."},
212-
{"Dryad Arbor", "*<http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=136196|Dryad Arbor>* · Land Creature — Forest Dryad · 1/1 · [Green] · _(Dryad Arbor isn't a spell, it's affected by summoning sickness, and it has \":mana-T:: Add :mana-G:.\")_"},
213-
{"Arlinn Kord", "*<http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=410007|Arlinn Kord>* :mana-2::mana-R::mana-G: · Legendary Planeswalker — Arlinn · [3] +1: Until end of turn, up to one target creature gets +2/+2 and gains vigilance and haste. \\ 0: Create a 2/2 green Wolf creature token. Transform Arlinn Kord.\n*<http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=410007|Arlinn, Embraced by the Moon>* · Legendary Planeswalker — Arlinn · [Red/Green] · +1: Creatures you control get +1/+1 and gain trample until end of turn. \\ −1: Arlinn, Embraced by the Moon deals 3 damage to any target. Transform Arlinn, Embraced by the Moon. \\ −6: You get an emblem with \"Creatures you control have haste and ':mana-T:: This creature deals damage equal to its power to any target.'\""},
214-
{"Consign", "*<http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=430838|Consign>* :mana-1::mana-U: · Instant · Return target nonland permanent to its owner's hand.\n*<http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=430838|Oblivion>* :mana-4::mana-B: · Sorcery · Aftermath _(Cast this spell only from your graveyard. Then exile it.)_ \\ Target opponent discards two cards."},
215-
{"Jace, Vryn's Prodigy", "*<http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=398434|Jace, Vryn's Prodigy>* :mana-1::mana-U: · Legendary Creature — Human Wizard · 0/2 · :mana-T:: Draw a card, then discard a card. If there are five or more cards in your graveyard, exile Jace, Vryn's Prodigy, then return him to the battlefield transformed under his owner's control.\n*<http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=398434|Jace, Telepath Unbound>* · Legendary Planeswalker — Jace · [Blue] · [5] +1: Up to one target creature gets -2/-0 until your next turn. \\ −3: You may cast target instant or sorcery card from your graveyard this turn. If that card would be put into your graveyard this turn, exile it instead. \\ −9: You get an emblem with \"Whenever you cast a spell, target opponent puts the top five cards of their library into their graveyard.\""},
216-
{"Tarmogoyf", "*<http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=456783|Tarmogoyf>* :mana-1::mana-G: · Creature — Lhurgoyf · \xC2\xAD*/1+\xC2\xAD* · Tarmogoyf's power is equal to the number of card types among cards in all graveyards and its toughness is equal to that number plus 1."},
205+
{"Ponder", "*<https://scryfall.com/card/c18/96/ponder?utm_source=api|Ponder>* :mana-U: · Sorcery · Look at the top three cards of your library, then put them back in any order. You may shuffle your library. \\ Draw a card."},
206+
{"Shahrazad", "*<https://scryfall.com/card/arn/10/shahrazad?utm_source=api|Shahrazad>* :mana-W::mana-W: · Sorcery · Players play a Magic subgame, using their libraries as their decks. Each player who doesn't win the subgame loses half their life, rounded up. · [RL] ·"},
207+
{"Jace, the Mind Sculptor", "*<https://scryfall.com/card/a25/62/jace-the-mind-sculptor?utm_source=api|Jace, the Mind Sculptor>* :mana-2::mana-U::mana-U: · Legendary Planeswalker — Jace · [3] +2: Look at the top card of target player's library. You may put that card on the bottom of that player's library. \\ 0: Draw three cards, then put two cards from your hand on top of your library in any order. \\ −1: Return target creature to its owner's hand. \\ −12: Exile all cards from target player's library, then that player shuffles their hand into their library."},
208+
{"Expansion", "*<https://scryfall.com/card/grn/224/expansion-explosion?utm_source=api|Expansion>* :mana-UR::mana-UR: · Instant · Copy target instant or sorcery spell with converted mana cost 4 or less. You may choose new targets for the copy.\n*<https://scryfall.com/card/grn/224/expansion-explosion?utm_source=api|Explosion>* :mana-X::mana-U::mana-U::mana-R::mana-R: · Instant · Explosion deals X damage to any target. Target player draws X cards."},
209+
{"Bushi Tenderfoot", "*<https://scryfall.com/card/chk/2/bushi-tenderfoot-kenzo-the-hardhearted?utm_source=api|Bushi Tenderfoot>* :mana-W: · Creature — Human Soldier · 1/1 · When a creature dealt damage by Bushi Tenderfoot this turn dies, flip Bushi Tenderfoot.\n*<https://scryfall.com/card/chk/2/bushi-tenderfoot-kenzo-the-hardhearted?utm_source=api|Kenzo the Hardhearted>* · Legendary Creature — Human Samurai · 3/4 · Double strike; bushido 2 _(Whenever this creature blocks or becomes blocked, it gets +2/+2 until end of turn.)_"},
210+
{"Fleetwheel Cruiser", "*<https://scryfall.com/card/kld/214/fleetwheel-cruiser?utm_source=api|Fleetwheel Cruiser>* :mana-4: · Artifact — Vehicle · 5/3 · Trample, haste \\ When Fleetwheel Cruiser enters the battlefield, it becomes an artifact creature until end of turn. \\ Crew 2 _(Tap any number of creatures you control with total power 2 or more: This Vehicle becomes an artifact creature until end of turn.)_"},
211+
{"Nicol Bolas, the Arisen", "*<https://scryfall.com/card/m19/218/nicol-bolas-the-ravager-nicol-bolas-the-arisen?utm_source=api|Nicol Bolas, the Ravager>* :mana-1::mana-U::mana-B::mana-R: · Legendary Creature — Elder Dragon · 4/4 · Flying \\ When Nicol Bolas, the Ravager enters the battlefield, each opponent discards a card. \\ :mana-4::mana-U::mana-B::mana-R:: Exile Nicol Bolas, the Ravager, then return him to the battlefield transformed under his owner's control. Activate this ability only any time you could cast a sorcery.\n*<https://scryfall.com/card/m19/218/nicol-bolas-the-ravager-nicol-bolas-the-arisen?utm_source=api|Nicol Bolas, the Arisen>* · Legendary Planeswalker — Bolas · [Blue/Black/Red] · [7] +2: Draw two cards. \\ −3: Nicol Bolas, the Arisen deals 10 damage to target creature or planeswalker. \\ −4: Put target creature or planeswalker card from a graveyard onto the battlefield under your control. \\ −12: Exile all but the bottom card of target player's library."},
212+
{"Dryad Arbor", "*<https://scryfall.com/card/fut/174/dryad-arbor?utm_source=api|Dryad Arbor>* · Land Creature — Forest Dryad · 1/1 · [Green] · _(Dryad Arbor isn't a spell, it's affected by summoning sickness, and it has \":mana-T:: Add :mana-G:.\")_"},
213+
{"Arlinn Kord", "*<https://scryfall.com/card/soi/243/arlinn-kord-arlinn-embraced-by-the-moon?utm_source=api|Arlinn Kord>* :mana-2::mana-R::mana-G: · Legendary Planeswalker — Arlinn · [3] +1: Until end of turn, up to one target creature gets +2/+2 and gains vigilance and haste. \\ 0: Create a 2/2 green Wolf creature token. Transform Arlinn Kord.\n*<https://scryfall.com/card/soi/243/arlinn-kord-arlinn-embraced-by-the-moon?utm_source=api|Arlinn, Embraced by the Moon>* · Legendary Planeswalker — Arlinn · [Red/Green] · +1: Creatures you control get +1/+1 and gain trample until end of turn. \\ −1: Arlinn, Embraced by the Moon deals 3 damage to any target. Transform Arlinn, Embraced by the Moon. \\ −6: You get an emblem with \"Creatures you control have haste and ':mana-T:: This creature deals damage equal to its power to any target.'\""},
214+
{"Consign", "*<https://scryfall.com/card/hou/149/consign-oblivion?utm_source=api|Consign>* :mana-1::mana-U: · Instant · Return target nonland permanent to its owner's hand.\n*<https://scryfall.com/card/hou/149/consign-oblivion?utm_source=api|Oblivion>* :mana-4::mana-B: · Sorcery · Aftermath _(Cast this spell only from your graveyard. Then exile it.)_ \\ Target opponent discards two cards."},
215+
{"Jace, Vryn's Prodigy", "*<https://scryfall.com/card/ori/60/jace-vryns-prodigy-jace-telepath-unbound?utm_source=api|Jace, Vryn's Prodigy>* :mana-1::mana-U: · Legendary Creature — Human Wizard · 0/2 · :mana-T:: Draw a card, then discard a card. If there are five or more cards in your graveyard, exile Jace, Vryn's Prodigy, then return him to the battlefield transformed under his owner's control.\n*<https://scryfall.com/card/ori/60/jace-vryns-prodigy-jace-telepath-unbound?utm_source=api|Jace, Telepath Unbound>* · Legendary Planeswalker — Jace · [Blue] · [5] +1: Up to one target creature gets -2/-0 until your next turn. \\ −3: You may cast target instant or sorcery card from your graveyard this turn. If that card would be put into your graveyard this turn, exile it instead. \\ −9: You get an emblem with \"Whenever you cast a spell, target opponent puts the top five cards of their library into their graveyard.\""},
216+
{"Tarmogoyf", "*<https://scryfall.com/card/uma/187/tarmogoyf?utm_source=api|Tarmogoyf>* :mana-1::mana-G: · Creature — Lhurgoyf · \xC2\xAD*/1+\xC2\xAD* · Tarmogoyf's power is equal to the number of card types among cards in all graveyards and its toughness is equal to that number plus 1."},
217217
{"Sarkhan the Masterless Plus", "*<https://scryfall.com/card/war/143%E2%98%85/ja/sarkhan-the-masterless?utm_source=api|Sarkhan the Masterless>* :mana-3::mana-R::mana-R: · Legendary Planeswalker — Sarkhan · [5] Whenever a creature attacks you or a planeswalker you control, each Dragon you control deals 1 damage to that creature. \\ +1: Until end of turn, each planeswalker you control becomes a 4/4 red Dragon creature and gains flying. \\ −3: Create a 4/4 red Dragon creature token with flying."},
218218
{"Fire//Ice No Multiverse", "*<https://scryfall.com/card/wc01/ar128/fire-ice?utm_source=api|Fire>* :mana-1::mana-R: · Instant · Fire deals 2 damage divided as you choose among one or two targets.\n*<https://scryfall.com/card/wc01/ar128/fire-ice?utm_source=api|Ice>* :mana-1::mana-U: · Instant · Tap target permanent. \\ Draw a card."},
219-
{"Ancestral Recall", "*<http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=382841|Ancestral Recall>* :mana-U: · Instant · Target player draws three cards. · [RL] · [:point_right: 5 :point_left:]"},
219+
{"Ancestral Recall", "*<https://scryfall.com/card/vma/1/ancestral-recall?utm_source=api|Ancestral Recall>* :mana-U: · Instant · Target player draws three cards. · [RL] · [:point_right: 5 :point_left:]"},
220220
}
221221
for _, table := range tables {
222222
fi, err := os.Open(RealCards[table.cardname])

rules_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ func TestBetterGetRule(t *testing.T) {
3030
{"define source", "<b>Source of Damage</b>: The object that dealt that damage. See rule 609.7.\n<b>609.7a.</b> If an effect requires a player to choose a source of damage, they may choose a permanent; a spell on the stack (including a permanent spell); any object referred to by an object on the stack, by a replacement or prevention effect that’s waiting to apply, or by a delayed triggered ability that’s waiting to trigger (even if that object is no longer in the zone it used to be in); or a face-up object in the command zone. A source doesn’t need to be capable of dealing damage to be a legal choice. The source is chosen when the effect is created. If the player chooses a permanent, the effect will apply to the next damage dealt by that permanent, regardless of whether it’s combat damage or damage dealt as the result of a spell or ability. If the player chooses a permanent spell, the effect will apply to any damage dealt by that spell and any damage dealt by the permanent that spell becomes when it resolves."},
3131
{"define mana abilities", "<b>Mana Ability</b>: An activated or triggered ability that could create mana and doesn’t use the stack. See rule 605, “Mana Abilities.”\n<b>605.1a.</b> An activated ability is a mana ability if it meets all of the following criteria: it doesn’t require a target (see rule 115.6), it could add mana to a player’s mana pool when it resolves, and it’s not a loyalty ability. (See rule 606, “Loyalty Abilities.”)"},
3232
{"define legend rule", "<b>Legend Rule</b>: A state-based action that causes a player who controls two or more legendary permanents with the same name to put all but one into their owners’ graveyards. See rule 704.5j.\n<b>704.5j.</b> If two or more legendary permanents with the same name are controlled by the same player, that player chooses one of them, and the rest are put into their owners’ graveyards. This is called the “legend rule.”"},
33-
{"define monarch", "<b>Monarch</b>: A designation a player can have. Some effects instruct a player to become the monarch. The monarch draws a card at the beginning of their end step. Dealing combat damage to the monarch steals the title from that player. See rule 722, “The Monarch.”\n<b>722.2.</b> There are two inherent triggered abilities associated with being the monarch. These triggered abilities have no source and are controlled by the player who was the monarch at the time the abilities triggered. This is an exception to rule 113.8. The full texts of these abilities are “At the beginning of the monarch’s end step, that player draws a card” and “Whenever a creature deals combat damage to the monarch, its controller becomes the monarch.”"},
34-
{"define destroy", "<b>Destroy</b>: To move a permanent from the battlefield to its owner’s graveyard. See rule 701.7, “Destroy.”\n<b>701.7b.</b> The only ways a permanent can be destroyed are as a result of an effect that uses the word “destroy” or as a result of the state-based actions that check for lethal damage (see rule 704.5g) or damage from a source with deathtouch (see rule 704.5h). If a permanent is put into its owner’s graveyard for any other reason, it hasn’t been “destroyed.”"},
33+
{"define monarch", "<b>Monarch</b>: A designation a player can have. Some effects instruct a player to become the monarch. The monarch draws a card at the beginning of their end step. Dealing combat damage to the monarch steals the title from that player. See rule 724, “The Monarch.”\n<b>724.2.</b> There are two inherent triggered abilities associated with being the monarch. These triggered abilities have no source and are controlled by the player who was the monarch at the time the abilities triggered. This is an exception to rule 113.8. The full texts of these abilities are “At the beginning of the monarch’s end step, that player draws a card” and “Whenever a creature deals combat damage to the monarch, its controller becomes the monarch.”"},
34+
{"define destroy", "<b>Destroy</b>: To move a permanent from the battlefield to its owner’s graveyard. See rule 701.8, “Destroy.”\n<b>701.8b.</b> The only ways a permanent can be destroyed are as a result of an effect that uses the word “destroy” or as a result of the state-based actions that check for lethal damage (see rule 704.5g) or damage from a source with deathtouch (see rule 704.5h). If a permanent is put into its owner’s graveyard for any other reason, it hasn’t been “destroyed.”"},
3535
{"define equip", "<b>Equip</b>: A keyword ability that lets a player attach an Equipment to a creature they control. See rule 301, “Artifacts,” and rule 702.6, “Equip.”\n<b>702.6a.</b> Equip is an activated ability of Equipment cards. “Equip [cost]” means “[Cost]: Attach this permanent to target creature you control. Activate only as a sorcery.”"},
3636
}
3737
for _, table := range tables {

0 commit comments

Comments
 (0)